├── .project ├── .settings └── org.eclipse.ltk.core.refactoring.prefs ├── .vscode └── launch.json └── mcm ├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── index.html ├── package.json ├── src ├── App.vue ├── assets │ ├── logo.png │ └── vux_logo.png ├── components │ ├── accountBalance.vue │ ├── comp │ │ ├── index.vue │ │ ├── pickAddress.vue │ │ ├── pickCar.vue │ │ ├── pickCarAddress.vue │ │ ├── pickDeliveryAddress.vue │ │ ├── pickImg.vue │ │ ├── premiumService.vue │ │ └── taskView.vue │ ├── coupons.vue │ ├── deliverAddress.vue │ ├── editAddress.vue │ ├── evaluate.vue │ ├── feedBack.vue │ ├── forgetPassword.vue │ ├── home.vue │ ├── loginGesture.vue │ ├── loginPassword.vue │ ├── orderView.vue │ ├── orders.vue │ ├── personalCenter.vue │ ├── preOrder1.vue │ ├── register.vue │ ├── resetPassword.vue │ ├── setGesture.vue │ ├── setting.vue │ └── shop.vue ├── main.js └── router │ └── index.js └── static ├── .gitkeep ├── css ├── iconfont.css ├── iconfont.ttf ├── media_query.css └── theme.css ├── images ├── 404.jpg ├── 500.jpg ├── cy.jpg ├── damixiansheng.jpg ├── maidanglao.jpg ├── mr.jpg ├── p1.jpg ├── p2.jpg ├── p3.jpg ├── p4.jpg ├── s1.jpg ├── s2.jpg ├── s3.jpg └── shangchuantupian.png └── js ├── H5lock.publish.js ├── city.data-3.js ├── common.js └── jquery-1.9.1.min.js /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vue 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.editor.php.aptanaPhpBuilder 10 | 11 | 12 | 13 | 14 | com.aptana.ide.core.unifiedBuilder 15 | 16 | 17 | 18 | 19 | 20 | com.aptana.projects.webnature 21 | com.aptana.editor.php.phpNature 22 | 23 | 24 | 25 | 1495610110242 26 | 27 | 26 28 | 29 | org.eclipse.ui.ide.multiFilter 30 | 1.0-name-matches-false-false-node_modules 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Python", 6 | "type": "python", 7 | "request": "launch", 8 | "stopOnEntry": true, 9 | "pythonPath": "${config:python.pythonPath}", 10 | "program": "${file}", 11 | "cwd": "${workspaceRoot}", 12 | "env": {}, 13 | "envFile": "${workspaceRoot}/.env", 14 | "debugOptions": [ 15 | "WaitOnAbnormalExit", 16 | "WaitOnNormalExit", 17 | "RedirectOutput" 18 | ] 19 | }, 20 | { 21 | "name": "PySpark", 22 | "type": "python", 23 | "request": "launch", 24 | "stopOnEntry": true, 25 | "osx": { 26 | "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" 27 | }, 28 | "windows": { 29 | "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd" 30 | }, 31 | "linux": { 32 | "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" 33 | }, 34 | "program": "${file}", 35 | "cwd": "${workspaceRoot}", 36 | "env": {}, 37 | "envFile": "${workspaceRoot}/.env", 38 | "debugOptions": [ 39 | "WaitOnAbnormalExit", 40 | "WaitOnNormalExit", 41 | "RedirectOutput" 42 | ] 43 | }, 44 | { 45 | "name": "Python Module", 46 | "type": "python", 47 | "request": "launch", 48 | "stopOnEntry": true, 49 | "pythonPath": "${config:python.pythonPath}", 50 | "module": "module.name", 51 | "cwd": "${workspaceRoot}", 52 | "env": {}, 53 | "envFile": "${workspaceRoot}/.env", 54 | "debugOptions": [ 55 | "WaitOnAbnormalExit", 56 | "WaitOnNormalExit", 57 | "RedirectOutput" 58 | ] 59 | }, 60 | { 61 | "name": "Integrated Terminal/Console", 62 | "type": "python", 63 | "request": "launch", 64 | "stopOnEntry": true, 65 | "pythonPath": "${config:python.pythonPath}", 66 | "program": "${file}", 67 | "cwd": "", 68 | "console": "integratedTerminal", 69 | "env": {}, 70 | "envFile": "${workspaceRoot}/.env", 71 | "debugOptions": [ 72 | "WaitOnAbnormalExit", 73 | "WaitOnNormalExit" 74 | ] 75 | }, 76 | { 77 | "name": "External Terminal/Console", 78 | "type": "python", 79 | "request": "launch", 80 | "stopOnEntry": true, 81 | "pythonPath": "${config:python.pythonPath}", 82 | "program": "${file}", 83 | "cwd": "", 84 | "console": "externalTerminal", 85 | "env": {}, 86 | "envFile": "${workspaceRoot}/.env", 87 | "debugOptions": [ 88 | "WaitOnAbnormalExit", 89 | "WaitOnNormalExit" 90 | ] 91 | }, 92 | { 93 | "name": "Django", 94 | "type": "python", 95 | "request": "launch", 96 | "stopOnEntry": true, 97 | "pythonPath": "${config:python.pythonPath}", 98 | "program": "${workspaceRoot}/manage.py", 99 | "cwd": "${workspaceRoot}", 100 | "args": [ 101 | "runserver", 102 | "--noreload" 103 | ], 104 | "env": {}, 105 | "envFile": "${workspaceRoot}/.env", 106 | "debugOptions": [ 107 | "WaitOnAbnormalExit", 108 | "WaitOnNormalExit", 109 | "RedirectOutput", 110 | "DjangoDebugging" 111 | ] 112 | }, 113 | { 114 | "name": "Flask", 115 | "type": "python", 116 | "request": "launch", 117 | "stopOnEntry": false, 118 | "pythonPath": "${config:python.pythonPath}", 119 | "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter", 120 | "cwd": "${workspaceRoot}", 121 | "env": { 122 | "FLASK_APP": "${workspaceRoot}/quickstart/app.py" 123 | }, 124 | "args": [ 125 | "run", 126 | "--no-debugger", 127 | "--no-reload" 128 | ], 129 | "envFile": "${workspaceRoot}/.env", 130 | "debugOptions": [ 131 | "WaitOnAbnormalExit", 132 | "WaitOnNormalExit", 133 | "RedirectOutput" 134 | ] 135 | }, 136 | { 137 | "name": "Flask (old)", 138 | "type": "python", 139 | "request": "launch", 140 | "stopOnEntry": false, 141 | "pythonPath": "${config:python.pythonPath}", 142 | "program": "${workspaceRoot}/run.py", 143 | "cwd": "${workspaceRoot}", 144 | "args": [], 145 | "env": {}, 146 | "envFile": "${workspaceRoot}/.env", 147 | "debugOptions": [ 148 | "WaitOnAbnormalExit", 149 | "WaitOnNormalExit", 150 | "RedirectOutput" 151 | ] 152 | }, 153 | { 154 | "name": "Pyramid", 155 | "type": "python", 156 | "request": "launch", 157 | "stopOnEntry": true, 158 | "pythonPath": "${config:python.pythonPath}", 159 | "cwd": "${workspaceRoot}", 160 | "env": {}, 161 | "envFile": "${workspaceRoot}/.env", 162 | "args": [ 163 | "${workspaceRoot}/development.ini" 164 | ], 165 | "debugOptions": [ 166 | "WaitOnAbnormalExit", 167 | "WaitOnNormalExit", 168 | "RedirectOutput", 169 | "Pyramid" 170 | ] 171 | }, 172 | { 173 | "name": "Watson", 174 | "type": "python", 175 | "request": "launch", 176 | "stopOnEntry": true, 177 | "pythonPath": "${config:python.pythonPath}", 178 | "program": "${workspaceRoot}/console.py", 179 | "cwd": "${workspaceRoot}", 180 | "args": [ 181 | "dev", 182 | "runserver", 183 | "--noreload=True" 184 | ], 185 | "env": {}, 186 | "envFile": "${workspaceRoot}/.env", 187 | "debugOptions": [ 188 | "WaitOnAbnormalExit", 189 | "WaitOnNormalExit", 190 | "RedirectOutput" 191 | ] 192 | }, 193 | { 194 | "name": "Attach (Remote Debug)", 195 | "type": "python", 196 | "request": "attach", 197 | "localRoot": "${workspaceRoot}", 198 | "remoteRoot": "${workspaceRoot}", 199 | "port": 3000, 200 | "secret": "my_secret", 201 | "host": "localhost" 202 | } 203 | ] 204 | } -------------------------------------------------------------------------------- /mcm/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { "modules": false }], 4 | "stage-2", 5 | "es2015" 6 | ], 7 | "plugins": ["transform-runtime"], 8 | "comments": false, 9 | "env": { 10 | "test": { 11 | "presets": ["env", "stage-2"], 12 | "plugins": [ "istanbul" ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /mcm/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /mcm/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | yarn-error.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | -------------------------------------------------------------------------------- /mcm/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserlist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /mcm/README.md: -------------------------------------------------------------------------------- 1 | # mcm 2 | 3 | > 这是一个基于Vue.js以及vux框架的移动端web项目,有一套完整的点餐系统页面。集成了vue-router、jQuery(默认试用jQuery的ajax,如果需要axios可以自行安装)、微信的weixin-js-sdk以及百度地图BMap。可以移植到微信公众号开发,也可以移植作为手机app开发。 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # 初始化项目之后需要把src\components\comp\index.vue覆盖掉node_modules\vux\src\components\panel\index.vue 12 | 13 | # serve with hot reload at localhost:8080 14 | npm run dev 15 | 16 | # build for production with minification 17 | npm run build 18 | 19 | # build for production and view the bundle analyzer report 20 | npm run build --report 21 | ``` 22 | 23 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 24 | -------------------------------------------------------------------------------- /mcm/build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | console.log(chalk.cyan(' Build complete.\n')) 30 | console.log(chalk.yellow( 31 | ' Tip: built files are meant to be served over an HTTP server.\n' + 32 | ' Opening index.html over file:// won\'t work.\n' 33 | )) 34 | }) 35 | }) 36 | -------------------------------------------------------------------------------- /mcm/build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | { 16 | name: 'npm', 17 | currentVersion: exec('npm --version'), 18 | versionRequirement: packageConfig.engines.npm 19 | } 20 | ] 21 | 22 | module.exports = function () { 23 | var warnings = [] 24 | for (var i = 0; i < versionRequirements.length; i++) { 25 | var mod = versionRequirements[i] 26 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 27 | warnings.push(mod.name + ': ' + 28 | chalk.red(mod.currentVersion) + ' should be ' + 29 | chalk.green(mod.versionRequirement) 30 | ) 31 | } 32 | } 33 | 34 | if (warnings.length) { 35 | console.log('') 36 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 37 | console.log() 38 | for (var i = 0; i < warnings.length; i++) { 39 | var warning = warnings[i] 40 | console.log(' ' + warning) 41 | } 42 | console.log() 43 | process.exit(1) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /mcm/build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /mcm/build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | var compiler = webpack(webpackConfig) 25 | 26 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | quiet: true 29 | }) 30 | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 32 | log: () => {} 33 | }) 34 | // force page reload when html-webpack-plugin template changes 35 | compiler.plugin('compilation', function (compilation) { 36 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 37 | hotMiddleware.publish({ action: 'reload' }) 38 | cb() 39 | }) 40 | }) 41 | 42 | // proxy api requests 43 | Object.keys(proxyTable).forEach(function (context) { 44 | var options = proxyTable[context] 45 | if (typeof options === 'string') { 46 | options = { target: options } 47 | } 48 | app.use(proxyMiddleware(options.filter || context, options)) 49 | }) 50 | 51 | // handle fallback for HTML5 history API 52 | app.use(require('connect-history-api-fallback')()) 53 | 54 | // serve webpack bundle output 55 | app.use(devMiddleware) 56 | 57 | // enable hot-reload and state-preserving 58 | // compilation error display 59 | app.use(hotMiddleware) 60 | 61 | // serve pure static assets 62 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 63 | app.use(staticPath, express.static('./static')) 64 | 65 | var uri = 'http://localhost:' + port 66 | 67 | var _resolve 68 | var readyPromise = new Promise(resolve => { 69 | _resolve = resolve 70 | }) 71 | 72 | console.log('> Starting dev server...') 73 | devMiddleware.waitUntilValid(() => { 74 | console.log('> Listening at ' + uri + '\n') 75 | // when env is testing, don't need open it 76 | 77 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 78 | opn(uri) 79 | } 80 | _resolve() 81 | }) 82 | 83 | var server = app.listen(port) 84 | 85 | module.exports = { 86 | ready: readyPromise, 87 | close: () => { 88 | server.close() 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /mcm/build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | 15 | var cssLoader = { 16 | loader: 'css-loader', 17 | options: { 18 | minimize: process.env.NODE_ENV === 'production', 19 | sourceMap: options.sourceMap 20 | } 21 | } 22 | 23 | // generate loader string to be used with extract text plugin 24 | function generateLoaders (loader, loaderOptions) { 25 | var loaders = [cssLoader] 26 | if (loader) { 27 | loaders.push({ 28 | loader: loader + '-loader', 29 | options: Object.assign({}, loaderOptions, { 30 | sourceMap: options.sourceMap 31 | }) 32 | }) 33 | } 34 | 35 | // Extract CSS when that option is specified 36 | // (which is the case during production build) 37 | if (options.extract) { 38 | return ExtractTextPlugin.extract({ 39 | use: loaders, 40 | fallback: 'vue-style-loader' 41 | }) 42 | } else { 43 | return ['vue-style-loader'].concat(loaders) 44 | } 45 | } 46 | 47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 48 | return { 49 | css: generateLoaders(), 50 | postcss: generateLoaders(), 51 | less: generateLoaders('less'), 52 | sass: generateLoaders('sass', { indentedSyntax: true }), 53 | scss: generateLoaders('sass'), 54 | stylus: generateLoaders('stylus'), 55 | styl: generateLoaders('stylus') 56 | } 57 | } 58 | 59 | // Generate loaders for standalone style files (outside of .vue) 60 | exports.styleLoaders = function (options) { 61 | var output = [] 62 | var loaders = exports.cssLoaders(options) 63 | for (var extension in loaders) { 64 | var loader = loaders[extension] 65 | output.push({ 66 | test: new RegExp('\\.' + extension + '$'), 67 | use: loader 68 | }) 69 | } 70 | return output 71 | } 72 | -------------------------------------------------------------------------------- /mcm/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }), 12 | postcss: [ 13 | require('autoprefixer')({ 14 | browsers: ['iOS >= 7', 'Android >= 4.1'] 15 | }) 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /mcm/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var webpack = require("webpack") 2 | var path = require('path') 3 | var utils = require('./utils') 4 | 5 | var projectRoot = path.resolve(__dirname, '../') 6 | const vuxLoader = require('vux-loader') 7 | 8 | var config = require('../config') 9 | var vueLoaderConfig = require('./vue-loader.conf') 10 | 11 | function resolve (dir) { 12 | return path.join(__dirname, '..', dir) 13 | } 14 | 15 | let webpackConfig = { 16 | entry: { 17 | app: './src/main.js' 18 | }, 19 | output: { 20 | path: config.build.assetsRoot, 21 | filename: '[name].js', 22 | publicPath: process.env.NODE_ENV === 'production' 23 | ? config.build.assetsPublicPath 24 | : config.dev.assetsPublicPath 25 | }, 26 | resolve: { 27 | extensions: ['.js', '.vue', '.json'], 28 | alias: { 29 | 'vue$': 'vue/dist/vue.esm.js', 30 | '@': resolve('src'), 31 | 'H5lock': path.resolve(__dirname, '../static/js/H5lock.publish.js'), 32 | 'Com': path.resolve(__dirname, '../static/js/common.js'), 33 | 'CityData3': path.resolve(__dirname, '../static/js/city.data-3.js'), 34 | 'jquery':'jquery/dist/jquery.min.js', 35 | 'wx':'weixin-js-sdk' 36 | } 37 | }, 38 | module: { 39 | rules: [ 40 | { 41 | test: /\.vue$/, 42 | loader: 'vue-loader', 43 | options: vueLoaderConfig 44 | }, 45 | { 46 | test: /\.js|jsx$/, 47 | loader: 'babel-loader', 48 | include: [resolve('src'), resolve('test')], 49 | query: { 50 | presets: ['es2015'] 51 | } 52 | }, 53 | { 54 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 55 | loader: 'url-loader', 56 | options: { 57 | limit: 100000, 58 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 59 | } 60 | }, 61 | { 62 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 63 | loader: 'url-loader', 64 | options: { 65 | limit: 100000, 66 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 67 | } 68 | } 69 | ] 70 | } 71 | } 72 | 73 | 74 | module.exports = vuxLoader.merge(webpackConfig, { 75 | plugins: ['vux-ui', 'progress-bar', 'duplicate-style', 76 | new webpack.ProvidePlugin({ 77 | H5lock: "H5lock", 78 | Com: "Com", 79 | CityData3: "CityData3", 80 | $: "jquery", 81 | jQuery: "jquery", 82 | jQ: "jquery", 83 | wx: "wx" 84 | }) 85 | ] 86 | }) 87 | -------------------------------------------------------------------------------- /mcm/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /mcm/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var CopyWebpackPlugin = require('copy-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 10 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 11 | 12 | var env = config.build.env 13 | 14 | var webpackConfig = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ 17 | sourceMap: config.build.productionSourceMap, 18 | extract: true 19 | }) 20 | }, 21 | devtool: config.build.productionSourceMap ? '#source-map' : false, 22 | output: { 23 | path: config.build.assetsRoot, 24 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 25 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 26 | }, 27 | plugins: [ 28 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 29 | new webpack.DefinePlugin({ 30 | 'process.env': env 31 | }), 32 | new webpack.optimize.UglifyJsPlugin({ 33 | compress: { 34 | warnings: false 35 | }, 36 | sourceMap: true 37 | }), 38 | // extract css into its own file 39 | new ExtractTextPlugin({ 40 | filename: utils.assetsPath('css/[name].[contenthash].css') 41 | }), 42 | // Compress extracted CSS. We are using this plugin so that possible 43 | // duplicated CSS from different components can be deduped. 44 | new OptimizeCSSPlugin({ 45 | cssProcessorOptions: { 46 | safe: true 47 | } 48 | }), 49 | // generate dist index.html with correct asset hash for caching. 50 | // you can customize output by editing /index.html 51 | // see https://github.com/ampedandwired/html-webpack-plugin 52 | new HtmlWebpackPlugin({ 53 | filename: config.build.index, 54 | template: 'index.html', 55 | inject: true, 56 | hash: true, 57 | minify: { 58 | removeComments: true, 59 | collapseWhitespace: true, 60 | removeAttributeQuotes: true 61 | // more options: 62 | // https://github.com/kangax/html-minifier#options-quick-reference 63 | }, 64 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 65 | chunksSortMode: 'dependency' 66 | }), 67 | // split vendor js into its own file 68 | new webpack.optimize.CommonsChunkPlugin({ 69 | name: 'vendor', 70 | minChunks: function (module, count) { 71 | // any required modules inside node_modules are extracted to vendor 72 | return ( 73 | module.resource && 74 | /\.js$/.test(module.resource) && 75 | module.resource.indexOf( 76 | path.join(__dirname, '../node_modules') 77 | ) === 0 78 | ) 79 | } 80 | }), 81 | // extract webpack runtime and module manifest to its own file in order to 82 | // prevent vendor hash from being updated whenever app bundle is updated 83 | new webpack.optimize.CommonsChunkPlugin({ 84 | name: 'manifest', 85 | chunks: ['vendor'] 86 | }), 87 | // copy custom static assets 88 | new CopyWebpackPlugin([ 89 | { 90 | from: path.resolve(__dirname, '../static'), 91 | to: config.build.assetsSubDirectory, 92 | ignore: ['.*'] 93 | } 94 | ]) 95 | ] 96 | }) 97 | 98 | if (config.build.productionGzip) { 99 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 100 | 101 | webpackConfig.plugins.push( 102 | new CompressionWebpackPlugin({ 103 | asset: '[path].gz[query]', 104 | algorithm: 'gzip', 105 | test: new RegExp( 106 | '\\.(' + 107 | config.build.productionGzipExtensions.join('|') + 108 | ')$' 109 | ), 110 | threshold: 10240, 111 | minRatio: 0.8 112 | }) 113 | ) 114 | } 115 | 116 | if (config.build.bundleAnalyzerReport) { 117 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 118 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 119 | } 120 | 121 | module.exports = webpackConfig 122 | -------------------------------------------------------------------------------- /mcm/config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /mcm/config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: './', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: false, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: {}, 31 | // CSS Sourcemaps off by default because relative paths are "buggy" 32 | // with this option, according to the CSS-Loader README 33 | // (https://github.com/webpack/css-loader#sourcemaps) 34 | // In our experience, they generally work as expected, 35 | // just be aware of this issue when enabling this option. 36 | cssSourceMap: false 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /mcm/config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /mcm/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mcm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mcm", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "lyf", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js" 10 | }, 11 | "dependencies": { 12 | "fastclick": "^1.0.6", 13 | "jquery": "^3.2.1", 14 | "vue": "^2.2.2", 15 | "vue-resource": "^1.3.3", 16 | "vue-router": "^2.2.0", 17 | "vuex": "^2.1.1", 18 | "vuex-i18n": "^1.3.1", 19 | "vux": "^2.2.1" 20 | }, 21 | "devDependencies": { 22 | "autoprefixer": "^6.7.2", 23 | "babel-core": "^6.22.1", 24 | "babel-loader": "^6.2.10", 25 | "babel-plugin-transform-runtime": "^6.22.0", 26 | "babel-preset-env": "^1.2.1", 27 | "babel-preset-es2015": "^6.24.1", 28 | "babel-preset-stage-2": "^6.22.0", 29 | "babel-register": "^6.22.0", 30 | "chalk": "^1.1.3", 31 | "compression-webpack-plugin": "^0.3.2", 32 | "connect-history-api-fallback": "^1.3.0", 33 | "copy-webpack-plugin": "^4.0.1", 34 | "css-loader": "^0.26.1", 35 | "eventsource-polyfill": "^0.9.6", 36 | "express": "^4.14.1", 37 | "extract-text-webpack-plugin": "^2.0.0", 38 | "file-loader": "^0.10.0", 39 | "friendly-errors-webpack-plugin": "^1.1.3", 40 | "function-bind": "^1.1.0", 41 | "html-webpack-plugin": "^2.28.0", 42 | "http-proxy-middleware": "^0.17.3", 43 | "less": "^2.7.1", 44 | "less-loader": "^2.2.3", 45 | "opn": "^4.0.2", 46 | "optimize-css-assets-webpack-plugin": "^1.3.0", 47 | "ora": "^1.1.0", 48 | "rimraf": "^2.6.0", 49 | "semver": "^5.3.0", 50 | "url-loader": "^0.5.7", 51 | "vue-loader": "^11.1.4", 52 | "vue-style-loader": "^2.0.0", 53 | "vue-template-compiler": "^2.2.4", 54 | "vux-loader": "^1.0.61", 55 | "webpack": "^2.2.1", 56 | "webpack-bundle-analyzer": "^2.2.1", 57 | "webpack-dev-middleware": "^1.10.0", 58 | "webpack-hot-middleware": "^2.16.1", 59 | "webpack-merge": "^2.6.1", 60 | "weixin-js-sdk": "^1.2.0", 61 | "yaml-loader": "^0.4.0" 62 | }, 63 | "engines": { 64 | "node": ">= 4.0.0", 65 | "npm": ">= 3.0.0" 66 | }, 67 | "browserslist": [ 68 | "iOS >= 7", 69 | "Android >= 4.1" 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /mcm/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 25 | 34 | -------------------------------------------------------------------------------- /mcm/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/src/assets/logo.png -------------------------------------------------------------------------------- /mcm/src/assets/vux_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/src/assets/vux_logo.png -------------------------------------------------------------------------------- /mcm/src/components/accountBalance.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 129 | 130 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /mcm/src/components/comp/index.vue: -------------------------------------------------------------------------------- 1 | 199 | 200 | 266 | 267 | 319 | -------------------------------------------------------------------------------- /mcm/src/components/comp/pickAddress.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 248 | 249 | 252 | -------------------------------------------------------------------------------- /mcm/src/components/comp/pickCar.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 83 | 84 | 87 | -------------------------------------------------------------------------------- /mcm/src/components/comp/pickCarAddress.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 90 | 91 | 94 | -------------------------------------------------------------------------------- /mcm/src/components/comp/pickDeliveryAddress.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 89 | 90 | 93 | -------------------------------------------------------------------------------- /mcm/src/components/comp/pickImg.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 150 | 151 | 154 | -------------------------------------------------------------------------------- /mcm/src/components/comp/premiumService.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 100 | 101 | 104 | -------------------------------------------------------------------------------- /mcm/src/components/comp/taskView.vue: -------------------------------------------------------------------------------- 1 | 87 | 88 | 142 | 143 | 146 | -------------------------------------------------------------------------------- /mcm/src/components/coupons.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 133 | 134 | -------------------------------------------------------------------------------- /mcm/src/components/deliverAddress.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 93 | 94 | 97 | -------------------------------------------------------------------------------- /mcm/src/components/editAddress.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 101 | 102 | -------------------------------------------------------------------------------- /mcm/src/components/evaluate.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 71 | 72 | -------------------------------------------------------------------------------- /mcm/src/components/feedBack.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 103 | 104 | 107 | -------------------------------------------------------------------------------- /mcm/src/components/forgetPassword.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 95 | 96 | -------------------------------------------------------------------------------- /mcm/src/components/home.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 216 | 217 | -------------------------------------------------------------------------------- /mcm/src/components/loginGesture.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 59 | 60 | -------------------------------------------------------------------------------- /mcm/src/components/loginPassword.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 57 | 58 | -------------------------------------------------------------------------------- /mcm/src/components/orderView.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 82 | -------------------------------------------------------------------------------- /mcm/src/components/orders.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 146 | 147 | -------------------------------------------------------------------------------- /mcm/src/components/personalCenter.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 114 | 115 | -------------------------------------------------------------------------------- /mcm/src/components/preOrder1.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 101 | 102 | 103 | 115 | -------------------------------------------------------------------------------- /mcm/src/components/register.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 165 | 166 | -------------------------------------------------------------------------------- /mcm/src/components/resetPassword.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 52 | 53 | -------------------------------------------------------------------------------- /mcm/src/components/setGesture.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 73 | 74 | -------------------------------------------------------------------------------- /mcm/src/components/setting.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 66 | 67 | -------------------------------------------------------------------------------- /mcm/src/components/shop.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 273 | 274 | -------------------------------------------------------------------------------- /mcm/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import FastClick from 'fastclick' 5 | import App from './App' 6 | import router from './router/index.js' 7 | import VueResource from 'vue-resource' 8 | Vue.use(VueResource) 9 | import H5lock from 'H5lock' 10 | import Com from 'Com' 11 | import CityData3 from 'CityData3' 12 | import ToastPlugin from 'vux/src/plugins/toast/index.js' 13 | import ConfirmPlugin from 'vux/src/plugins/confirm/index.js' 14 | import LoadingPlugin from 'vux/src/plugins/loading/index.js' 15 | import AlertPlugin from 'vux/src/plugins/alert/index.js' 16 | Vue.use(LoadingPlugin) 17 | Vue.use(ToastPlugin) 18 | Vue.use(ConfirmPlugin) 19 | Vue.use(AlertPlugin) 20 | 21 | Vue.prototype.COM = Com; 22 | Vue.prototype.CityData3 = CityData3; 23 | 24 | FastClick.attach(document.body) 25 | 26 | Vue.config.productionTip = false 27 | 28 | /* eslint-disable no-new */ 29 | new Vue({ 30 | router, 31 | render: h => h(App) 32 | }).$mount('#app-box') 33 | 34 | router.beforeEach((to, from, next) => { 35 | if(to.fullPath == '' || to.fullPath == '/'){ 36 | next('/home') 37 | }else{ 38 | next() 39 | } 40 | }) -------------------------------------------------------------------------------- /mcm/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Home from '../components/home.vue' 4 | import PersonalCenter from '../components/personalCenter.vue' 5 | import LoginPassword from '../components/loginPassword.vue' 6 | import PreOrder1 from '../components/preOrder1.vue' 7 | import LoginGesture from '../components/loginGesture.vue' 8 | import Orders from '../components/orders.vue' 9 | import OrderView from '../components/orderView.vue' 10 | import Evaluate from '../components/evaluate.vue' 11 | import Setting from '../components/setting.vue' 12 | import Coupons from '../components/coupons.vue' 13 | import ResetPassword from '../components/resetPassword.vue' 14 | import SetGesture from '../components/setGesture.vue' 15 | import Shop from '../components/shop.vue' 16 | import Register from '../components/register.vue' 17 | import DeliverAddress from '../components/deliverAddress.vue' 18 | import EditAddress from '../components/editAddress.vue' 19 | import FeedBack from '../components/feedBack.vue' 20 | import AccountBalance from '../components/accountBalance.vue' 21 | import ForgetPassword from '../components/forgetPassword.vue' 22 | 23 | Vue.use(Router) 24 | 25 | export default new Router({ 26 | mode:'hash', 27 | routes: [ 28 | { 29 | path: '/home', 30 | name: 'home', 31 | component: Home 32 | }, 33 | { 34 | path:'/personalCenter', 35 | name:'personalCenter', 36 | component: PersonalCenter 37 | }, 38 | { 39 | path:'/loginPassword', 40 | name:'loginPassword', 41 | component: LoginPassword 42 | }, 43 | { 44 | path:'/loginGesture', 45 | name:'loginGesture', 46 | component: LoginGesture 47 | }, 48 | { 49 | path:'/preOrder1', 50 | name:'preOrder1', 51 | component: PreOrder1 52 | }, 53 | { 54 | path:'/orders', 55 | name:'orders', 56 | component: Orders 57 | }, 58 | { 59 | path:'/orderView', 60 | name:'orderView', 61 | component: OrderView 62 | }, 63 | { 64 | path:'/evaluate', 65 | name:'evaluate', 66 | component: Evaluate 67 | }, 68 | { 69 | path:'/setting', 70 | name:'setting', 71 | component: Setting 72 | }, 73 | { 74 | path:'/coupons', 75 | name:'coupons', 76 | component: Coupons 77 | }, 78 | { 79 | path:'/resetPassword', 80 | name:'resetPassword', 81 | component: ResetPassword 82 | }, 83 | { 84 | path:'/setGesture', 85 | name:'setGesture', 86 | component: SetGesture 87 | }, 88 | { 89 | path:'/shop', 90 | name:'shop', 91 | component: Shop 92 | }, 93 | { 94 | path:'/register', 95 | name:'register', 96 | component: Register 97 | }, 98 | { 99 | path:'/deliverAddress', 100 | name:'deliverAddress', 101 | component: DeliverAddress 102 | }, 103 | { 104 | path:'/editAddress', 105 | name:'editAddress', 106 | component: EditAddress 107 | }, 108 | { 109 | path:'/feedBack', 110 | name:'feedBack', 111 | component: FeedBack 112 | }, 113 | { 114 | path:'/accountBalance', 115 | name:'accountBalance', 116 | component: AccountBalance 117 | }, 118 | { 119 | path:'/forgetPassword', 120 | name:'forgetPassword', 121 | component: ForgetPassword 122 | } 123 | ] 124 | }) 125 | -------------------------------------------------------------------------------- /mcm/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/.gitkeep -------------------------------------------------------------------------------- /mcm/static/css/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.ttf') format('truetype'); 4 | } 5 | 6 | .iconfont { 7 | font-family:"iconfont" !important; 8 | font-size:16px; 9 | font-style:normal; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | 14 | .icon-huiyuanka:before { content: "\e600"; } 15 | 16 | .icon-fanhui:before { content: "\e64e"; } 17 | 18 | .icon-mima:before { content: "\e61d"; } 19 | 20 | .icon-shezhi:before { content: "\e688"; } 21 | 22 | .icon-gouwuche:before { content: "\e64d"; } 23 | 24 | .icon-lanzi2:before { content: "\e622"; } 25 | 26 | .icon-chongzhi:before { content: "\e60f"; } 27 | 28 | .icon-shoushimima:before { content: "\e610"; } 29 | 30 | .icon-qianjin:before { content: "\e64c"; } 31 | 32 | .icon-zhanghuyue:before { content: "\e63e"; } 33 | 34 | .icon-dianpu:before { content: "\e6a4"; } 35 | 36 | .icon-huiyuanxinxi2:before { content: "\e615"; } 37 | 38 | .icon-dingdan:before { content: "\e61f"; } 39 | 40 | .icon-erweima1:before { content: "\e603"; } 41 | 42 | .icon-huiyuanxinxi:before { content: "\e608"; } 43 | 44 | .icon-youhuiquan:before { content: "\e618"; } 45 | 46 | .icon-gerenzhongxin:before { content: "\e6ab"; } 47 | 48 | .icon-lanzi3:before { content: "\e674"; } 49 | 50 | .icon-huiyuanka2:before { content: "\e602"; } 51 | 52 | .icon-huiyuanxinxi3:before { content: "\e601"; } 53 | 54 | .icon-saoyisao:before { content: "\e7ad"; } 55 | 56 | .icon-left:before { content: "\e6ba"; } 57 | 58 | .icon-diancai:before { content: "\e607"; } 59 | 60 | .icon-xiasanjiao:before { content: "\e624"; } 61 | 62 | .icon-dingwei:before { content: "\e702"; } 63 | 64 | .icon-shouhuodizhi:before { content: "\e60a"; } 65 | 66 | .icon-sanjiaoxing-copy-copy:before { content: "\e611"; } 67 | 68 | .icon-yijianfankui:before { content: "\e62e"; } 69 | 70 | .icon-lanzi1:before { content: "\e684"; } 71 | 72 | .icon-fancai:before { content: "\e64d"; } 73 | 74 | .icon-gerenxinxi:before { content: "\e606"; } 75 | 76 | .icon-xiaofeimingxi:before { content: "\e612"; } 77 | 78 | .icon-tixi:before { content: "\e6a6"; } 79 | 80 | .icon-youhuiquan1:before { content: "\e792"; } 81 | 82 | .icon-kehuguanli:before { content: "\e73d"; } 83 | 84 | .icon-shangchuantupian:before { content: "\e852"; } 85 | 86 | .icon-gonggao:before { content: "\e61c"; } 87 | 88 | .icon-renwu:before { content: "\e6bb"; } -------------------------------------------------------------------------------- /mcm/static/css/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/css/iconfont.ttf -------------------------------------------------------------------------------- /mcm/static/css/media_query.css: -------------------------------------------------------------------------------- 1 | @media screen and ( min-width: 320px){html{font-size: 14px}} 2 | @media screen and ( min-width: 375px){html{font-size: 16px}} 3 | @media screen and ( min-width: 414px){html{font-size: 18px}} -------------------------------------------------------------------------------- /mcm/static/css/theme.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F9F9F9; 3 | margin: 0; 4 | } 5 | a{ 6 | text-decoration: none; 7 | color: #000; 8 | } 9 | input{ 10 | -webkit-appearance: none !important; 11 | outline:none !important; 12 | border-radius: 0; 13 | } 14 | .ellipsis{ 15 | text-overflow: ellipsis; 16 | white-space: nowrap; 17 | overflow: hidden; 18 | } 19 | .weui-grid{ 20 | padding: 10px 15px !important; 21 | } 22 | .weui-grid__label{ 23 | margin: 0 !important; 24 | } 25 | .weui-panel{ 26 | margin-top: 0 !important; 27 | } 28 | .weui-panel__hd{ 29 | font-size: 0.93rem !important; 30 | padding: 10px 15px 10px !important; 31 | } 32 | .weui-cell__bd{ 33 | font-size: 0.93rem !important; 34 | 35 | } 36 | .weui-media-box{ 37 | padding:10px !important; 38 | } 39 | .weui-media-box__title{ 40 | font-weight: bold !important; 41 | margin:0 !important; 42 | font-size: 1.1rem !important; 43 | } 44 | .weui-media-box__desc{ 45 | font-size: 0.75rem !important; 46 | margin:3px 0 !important; 47 | } 48 | .weui-media-box__desc p{ 49 | padding: 0 !important; 50 | margin: 0 !important; 51 | } 52 | .weui-media-box__price-btn{ 53 | line-height: 30px; 54 | } 55 | .weui-media-box__price{ 56 | color: red; 57 | font-size:1.1rem; 58 | float: left; 59 | line-height: 1.6rem; 60 | } 61 | .weui-media-box__vipPrice{ 62 | color: #AAAAAA; 63 | font-size:0.8rem; 64 | float: left; 65 | line-height: 1.6rem; 66 | margin-left: 10px; 67 | } 68 | .weui-media-box__btn{ 69 | font-size: 0.8rem; 70 | float: right; 71 | background-color: #ff563c; 72 | border: none; 73 | color: #fff; 74 | border-radius: 3px; 75 | height: 30px; 76 | width: 65px; 77 | } 78 | .clearfix{ 79 | clear: both; 80 | } 81 | .vux-swiper-desc{ 82 | font-size: 1rem !important; 83 | } 84 | .vux-header{ 85 | background-color: #ff563c !important; 86 | } 87 | .vux-header-title{ 88 | line-height: 2.5rem !important; 89 | height: 2.5rem !important; 90 | font-size: 1.07rem !important; 91 | } 92 | .left-arrow:{ 93 | height: 1.5rem !important; 94 | width: 1.5rem !important; 95 | } 96 | .vux-header .vux-header-left .left-arrow:before{ 97 | height: 0.71rem !important; 98 | width: 0.71rem !important; 99 | top:0.5rem !important; 100 | border: 2px solid #fff !important; 101 | border-width: 2px 0 0 2px !important; 102 | } 103 | .own-cart__bottom{ 104 | width: 100%; 105 | height: 3rem; 106 | background-color: rgba(0,0,0,0.8); 107 | position: fixed; 108 | bottom: 0; 109 | color: #fff; 110 | line-height: 3rem; 111 | padding: 0 10px; 112 | } 113 | .own-cart__sunfee{ 114 | font-style: normal; 115 | } 116 | .own-cart__btn{ 117 | font-size: 0.8rem; 118 | background-color: #ff563c; 119 | border: none; 120 | color: #fff; 121 | border-radius: 3px; 122 | height: 2rem; 123 | width: 4.5rem; 124 | position: absolute; 125 | right: 30px; 126 | top:0.5rem; 127 | } 128 | .own-header__search{ 129 | height: 2.5rem; 130 | background-color: #FF563C; 131 | } 132 | .own-header__search > .own-header__search__input{ 133 | height: 1.8rem; 134 | width: 65%; 135 | line-height: 1.8rem; 136 | font-size: 0.875rem; 137 | border: none; 138 | border-radius: 0.9rem; 139 | position: absolute; 140 | top: 0.33rem; 141 | left: 5%; 142 | padding: 0 10px; 143 | color: #999999; 144 | text-align: center; 145 | } 146 | .own-header__search > .iconfont{ 147 | color: #fff; 148 | font-size: 1.2rem; 149 | font-weight: bold; 150 | position: absolute; 151 | top: 0.65rem; 152 | } 153 | .own-header__search > .icon-saoyisao{ 154 | right: 20%; 155 | } 156 | .own-header__search > .icon-fancai{ 157 | font-size: 1.2rem; 158 | right: 3%; 159 | font-weight: 100; 160 | top: 0.65rem; 161 | } 162 | .own-header__search > .icon-gerenzhongxin{ 163 | font-size: 1.3rem; 164 | right: 11.5%; 165 | font-weight: 100; 166 | top: 0.6rem; 167 | } 168 | .own-header__search>.own-header__search__badge{ 169 | display:none; 170 | height: 0.9rem; 171 | width: 0.9rem; 172 | border-radius: 50%; 173 | background-color: rgb(60,197,31); 174 | position: absolute; 175 | top: 0.3rem; 176 | right: 2%; 177 | color: #fff; 178 | font-size:0.7rem; 179 | line-height:0.8rem; 180 | text-align: center; 181 | } 182 | .own-cart__dot{ 183 | width: 20px; 184 | height: 20px; 185 | border-radius: 50%; 186 | background-color: #FF563C; 187 | display:none; 188 | position: fixed; 189 | top: 0; 190 | left: 0; 191 | z-index: 99; 192 | } 193 | .own-pc__avatarbox{ 194 | height: 7rem; 195 | width: 100%; 196 | background-color: #FF563C; 197 | position: relative; 198 | } 199 | .own-pc__avatarbox > .own-pc__portrait{ 200 | width: 4rem; 201 | height: 4rem; 202 | border-radius: 50%; 203 | background-color: #fff; 204 | position: absolute; 205 | top:1.5rem; 206 | left: 1rem; 207 | text-align: center; 208 | line-height: 4rem; 209 | } 210 | .own-pc__avatarbox > .own-pc__portrait > .icon-gerenzhongxin{ 211 | font-size: 3.2rem; 212 | color: #E1E1E1; 213 | } 214 | .own-pc__avatarbox > .own-pc__name{ 215 | height: 2rem; 216 | width: 50%; 217 | position: absolute; 218 | left: 30%; 219 | top: 2.5rem; 220 | color: #fff; 221 | font-size: 1.1rem; 222 | line-height: 2rem; 223 | text-overflow: ellipsis; 224 | white-space: nowrap; 225 | overflow: hidden; 226 | } 227 | .vux-cell-primary > p{ 228 | margin: 0 !important; 229 | } 230 | .vux-cell-primary .vux-label{ 231 | font-size: 1rem; 232 | } 233 | .own-login__form{ 234 | width: 100%; 235 | margin-top: 10px; 236 | background-color: #fff; 237 | border-bottom: 1px solid #eee; 238 | position: relative; 239 | } 240 | .own-login__form > input{ 241 | height: 2.5rem; 242 | border:none; 243 | border-top: 1px solid #eee; 244 | width: 100%; 245 | text-align: left; 246 | padding: 0.6rem 10px; 247 | font-size: 1rem; 248 | line-height: 1.3rem; 249 | box-sizing: border-box; 250 | outline: none; 251 | } 252 | .own-login__form>button{ 253 | height: 1.8rem; 254 | width: auto; 255 | padding:0 10px; 256 | line-height: 1.8rem; 257 | font-size: 0.875rem; 258 | background-color: #ccc; 259 | color: #fff; 260 | border: none; 261 | position: absolute; 262 | right: 3%; 263 | top: 0.4rem; 264 | border-radius: 3px; 265 | } 266 | .own-login__form>img{ 267 | height: 1.8rem; 268 | width: auto; 269 | padding:0 10px; 270 | border: none; 271 | position: absolute; 272 | right: 3%; 273 | top: 10.4rem; 274 | border-radius: 3px; 275 | } 276 | .own-login__tip{ 277 | width: 100%; 278 | padding: 0 10px; 279 | font-size: 0.75rem; 280 | color: #999; 281 | margin-bottom: 0; 282 | box-sizing: border-box; 283 | } 284 | .own-login__btn{ 285 | width: 90%; 286 | margin-left: 5%; 287 | height: 2.5rem; 288 | text-align: center; 289 | background-color: #FF563C; 290 | border: none; 291 | border-radius: 3px; 292 | font-size: 1rem; 293 | color: #fff; 294 | margin-top: 20px; 295 | } 296 | .own-login__switch{ 297 | position: absolute; 298 | height: 2rem; 299 | line-height: 2rem; 300 | font-size: 0.8rem; 301 | border: none; 302 | color: #fff; 303 | top: 0.5rem; 304 | right: 3%; 305 | background-color: transparent; 306 | } 307 | .vux-x-input{ 308 | font-size: 0.875rem !important; 309 | } 310 | .own-checker__box{ 311 | position: relative; 312 | height: 40px; 313 | line-height: 40px; 314 | padding: 0 0 0 15px; 315 | border-bottom: 1px solid #e9e9e9; 316 | } 317 | .own-checker__box > .own-checker__inner{ 318 | border-top: 1px solid #e9e9e9; 319 | } 320 | .own-checker__box> .own-checker__inner>span{ 321 | font-size: 0.875rem; 322 | } 323 | .vux-checker-box{ 324 | width: 60% !important; 325 | position: absolute !important; 326 | height: 2rem; 327 | top: 0; 328 | right: 10%; 329 | } 330 | .vux-checker-item{ 331 | margin-right: 20px; 332 | } 333 | .weui-input{ 334 | color: #FF563C !important; 335 | } 336 | .weui-textarea{ 337 | color: #FF563C !important; 338 | } 339 | .vux-table{ 340 | line-height: 2rem !important; 341 | font-size: 0.875rem !important; 342 | } 343 | .demo2-item { 344 | width: 1.6rem; 345 | height: 1.6rem; 346 | border: 2px solid #ccc; 347 | display: inline-block; 348 | border-radius: 50%; 349 | line-height: 1.2rem; 350 | text-align: center; 351 | font-size: 0.75rem; 352 | box-sizing: border-box; 353 | } 354 | .demo2-item-selected { 355 | border-color: #FF563C; 356 | background-color: #FF563C; 357 | color: #fff; 358 | } 359 | .own-login__gestrue{ 360 | color: #FF563C; 361 | font-size: 12px; 362 | } 363 | .box{ 364 | position: relative; 365 | } 366 | .vux-checker-box{ 367 | position: relative !important; 368 | width: 100% !important; 369 | right: inherit !important; 370 | } 371 | .own-scan__dishCard{ 372 | width: 70%; 373 | height: auto; 374 | position: absolute; 375 | left: 15%; 376 | top: 15%; 377 | border-radius:5px; 378 | background-color: #fff; 379 | box-shadow: 1px 1px 10px 2px #aaaaaa; 380 | } 381 | .own-scan__dishCard>img{ 382 | width: 100%; 383 | } 384 | .own-scan__dishCard>.own-scan__desc{ 385 | padding: 0 10px; 386 | color: #999999; 387 | font-size: 0.75rem; 388 | line-height: 1.2; 389 | width: 100%; 390 | word-wrap: break-word; 391 | box-sizing: border-box; 392 | margin: 5px; 393 | } 394 | .own-scan__dishCard>.own-scan__desc>p{ 395 | padding: 0; 396 | margin: 0; 397 | } 398 | .own-pv__img{ 399 | width: 100%; 400 | } 401 | .own-pv__namediv{ 402 | width: 100%; 403 | padding: 0 10px 10px 10px; 404 | box-sizing: border-box; 405 | background-color: #fff; 406 | } 407 | .own-pv__namediv>.name{ 408 | font-size: 1rem; 409 | font-weight: bold; 410 | height: 2rem; 411 | line-height: 2rem; 412 | } 413 | .own-pv__namediv>.pricediv{ 414 | font-size: 0.875rem; 415 | height: 2rem; 416 | line-height: 2rem; 417 | box-sizing: border-box; 418 | } 419 | .own-pv__namediv>.pricediv>.price{ 420 | color: red; 421 | float: left; 422 | font-size: 1rem; 423 | } 424 | .own-pv__namediv>.pricediv>.btn{ 425 | float: right; 426 | } 427 | .own-pv__desc{ 428 | position: absolute; 429 | bottom: 3px; 430 | padding: 0 10px; 431 | box-sizing: border-box; 432 | font-size: 0.75rem; 433 | color: #fff; 434 | background-color: rgba(0,0,0,0.3); 435 | width: 100%; 436 | } 437 | .own-pv__evaluatediv{ 438 | margin-top: 10px; 439 | background-color: #fff; 440 | padding: 0 10px 10px 10px; 441 | } 442 | .own-pv__evaluatediv>.title{ 443 | height: 2.5rem; 444 | font-size: 1rem; 445 | font-weight: bold; 446 | line-height: 2.5rem; 447 | border-bottom: 1px solid #ECECEC; 448 | } 449 | .own-pv__evaluatediv>.evaluatediv{ 450 | padding: 10px 0; 451 | border-bottom: 1px solid #ECECEC; 452 | } 453 | .own-pv__evaluatediv>.evaluatediv>.namediv>.name{ 454 | font-size: 0.8rem; 455 | font-weight:bold; 456 | } 457 | .own-pv__evaluatediv>.evaluatediv>.namediv>.date{ 458 | font-size: 0.75rem; 459 | color: #888; 460 | margin-left: 10px; 461 | } 462 | .own-pv__evaluatediv>.evaluatediv>.contentdiv{ 463 | padding: 10px; 464 | font-size: 0.8rem; 465 | } 466 | .own-pv__imgdiv{ 467 | position: relative; 468 | } 469 | .own-pv__imgdiv .icon-fanhui{ 470 | color: rgba(0,0,0,0.6); 471 | font-size: 1.5rem; 472 | position: absolute; 473 | top: 0.5rem; 474 | left: 0.5rem; 475 | } 476 | .own-pv__imgdiv .icon-fancai{ 477 | color: rgba(0,0,0,0.6); 478 | font-size: 1.45rem; 479 | position: absolute; 480 | top: 0.5rem; 481 | right: 0.5rem; 482 | } 483 | .own-order__feediv{ 484 | background-color: #fff; 485 | height: 3rem; 486 | /*border-bottom: 1px solid #ECECEC;*/ 487 | } 488 | .own-order__feediv .logo{ 489 | width: 15%; 490 | float: left; 491 | text-align: center; 492 | } 493 | .own-order__feediv .logo img{ 494 | width: 2.2rem; 495 | height: 2.2rem; 496 | } 497 | .own-order__feediv .title{ 498 | width: 55%; 499 | font-size: 1rem; 500 | line-height: 1.4rem; 501 | float: left; 502 | height: 3rem; 503 | border-bottom: 1px solid #ECECEC; 504 | } 505 | .own-order__feediv .fee{ 506 | width: 30%; 507 | font-size: 1rem; 508 | text-align: right; 509 | line-height: 1.4rem; 510 | float: left; 511 | height: 3rem; 512 | border-bottom: 1px solid #ECECEC; 513 | } 514 | .own-order__content{ 515 | font-size: 0.875rem; 516 | padding: 10px; 517 | border-bottom: 1px solid #ECECEC; 518 | } 519 | .own-order__btn{ 520 | border-top: 1px solid #ECECEC; 521 | } 522 | .own-order__btns{ 523 | padding: 10px 0 0 0; 524 | } 525 | .own-order__btns .pay{ 526 | float: right; 527 | border: 1px solid #0077FF; 528 | border-radius: 3px; 529 | color: #0077FF; 530 | padding: 5px; 531 | font-size: 0.8rem; 532 | margin-left: 10px; 533 | } 534 | .own-order__btns .cancel{ 535 | float: right; 536 | border: 1px solid #FF563C; 537 | border-radius: 3px; 538 | color: #FF563C; 539 | padding: 5px; 540 | font-size: 0.8rem; 541 | margin-left: 10px; 542 | } 543 | .own-ev__title{ 544 | padding: 0 10px; 545 | background-color: #fff; 546 | height: 3rem; 547 | line-height: 3rem; 548 | font-size: 0.875rem; 549 | } 550 | .own-ev__evcard{ 551 | padding: 10px; 552 | background-color: #fff; 553 | } 554 | .own-ev__evcard>.name{ 555 | padding:0 0 10px 0; 556 | font-size: 0.875rem; 557 | font-weight: bold; 558 | } 559 | .own-recharge__input{ 560 | margin-top: 20px; 561 | border:none; 562 | border-bottom: 1px solid #FF563C; 563 | background-color: transparent; 564 | height: 2rem; 565 | line-height: 1rem; 566 | width: 84%; 567 | margin-left: 8%; 568 | text-align: center; 569 | font-size: 0.875rem; 570 | color: #FF563C; 571 | border-radius: 0; 572 | } 573 | .weui-toast.weui-toast_forbidden{ 574 | color: #fcfcfc !important; 575 | width: 10em !important; 576 | padding: 0 10px !important; 577 | } 578 | .weui-toast_forbidden .weui-icon_toast.weui-icon-success-no-circle:before{ 579 | color: #fcfcfc !important; 580 | } 581 | .weui-toast_success{ 582 | width: 10em !important; 583 | padding: 0 10px !important; 584 | } 585 | .own-cp__wrapper{ 586 | padding: 10px; 587 | width: 94%; 588 | margin-left: 3%; 589 | box-sizing: border-box; 590 | background-color: #fff; 591 | margin-top: 10px; 592 | box-shadow: 1px 1px 2px 1px #ccc;; 593 | } 594 | .own-cp__wrapper .fee{ 595 | width: 27%; 596 | float: left; 597 | height: 4.5rem; 598 | } 599 | .own-cp__wrapper .desc{ 600 | width: 73%; 601 | float: left; 602 | height: 4.5rem; 603 | padding-left: 10px; 604 | box-sizing: border-box; 605 | } 606 | .own-moneysmbol{ 607 | font-size: 0.8rem; 608 | font-style: normal; 609 | color: #FF563C; 610 | margin-right: 0px; 611 | } 612 | .own-moneysmbol:after{ 613 | content: '¥'; 614 | } 615 | .own-nosymbol{ 616 | font-size: 1rem; 617 | font-style: normal; 618 | color: #fff; 619 | margin-right: 10px; 620 | letter-spacing: normal; 621 | } 622 | .own-nosymbol:after{ 623 | content: 'No.'; 624 | } 625 | .own-vipcard__div{ 626 | width: 100%; 627 | background: #0077ff; 628 | margin-bottom: 10px; 629 | box-sizing: border-box; 630 | border-radius: 4px; 631 | box-shadow: 1px 1px 3px 1px #bbb; 632 | padding: 10px; 633 | } 634 | .own-vipcard__div .own-vipcard__com{ 635 | font-size: 0.875rem; 636 | color: #fff; 637 | box-sizing: border-box; 638 | line-height: 1.2rem; 639 | float: left; 640 | } 641 | .own-vipcard__div .own-vipcard__type{ 642 | font-size: 0.875rem; 643 | color: #fff; 644 | box-sizing: border-box; 645 | line-height: 1.2rem; 646 | float: right; 647 | } 648 | .own-vipcard__div .own-vipcard__no{ 649 | font-size: 1.8rem; 650 | line-height: 4rem; 651 | font-weight: bold; 652 | color: #fff; 653 | box-sizing: border-box; 654 | text-align: center; 655 | width: 100%; 656 | letter-spacing: 3px; 657 | } 658 | .own-vipcard__div .own-vipcard__fee{ 659 | font-size: 0.87rem; 660 | line-height: 1rem; 661 | color: #fff; 662 | box-sizing: border-box; 663 | width: 100%; 664 | border-top: 1px solid #fff; 665 | padding-top: 10px; 666 | } 667 | .own-data_none{ 668 | text-align: center; 669 | width: 100%; 670 | color: #aaa; 671 | font-size: 0.75rem; 672 | line-height: 2rem; 673 | } 674 | .own-yiye__top{ 675 | background-color: #FF563C; 676 | padding: 10px 677 | } 678 | .own-yiye__top-loctext{ 679 | color:#fff; 680 | width: 50%; 681 | display: inline-block; 682 | text-overflow: ellipsis; 683 | overflow: hidden; 684 | white-space: nowrap; 685 | } 686 | .own-yiye__top-loc{ 687 | line-height: 1.2rem; 688 | } 689 | .own-yiye__top-search{ 690 | border: none; 691 | border-radius: 0.9rem; 692 | width: 80%; 693 | height: 1.8rem; 694 | text-align: center; 695 | font-size: 0.875rem; 696 | padding:0 10px; 697 | } 698 | .own-ab__top{ 699 | background-color: #ff563c; 700 | width: 100%; 701 | padding-bottom: 10px; 702 | } 703 | .own-tabbar{ 704 | border-top: 1px solid #e9e9e9; 705 | position: fixed; 706 | bottom: 0; 707 | height: 3rem; 708 | width: 100%; 709 | } 710 | .own-tabbar__item{ 711 | float: left; 712 | width: 50%; 713 | height: 100%; 714 | text-align: center; 715 | font-size: 1rem; 716 | line-height: 3rem; 717 | box-sizing: border-box; 718 | border-left: 1px solid #e9e9e9; 719 | } 720 | .own-tabbar__item:first-child{ 721 | border-left: none; 722 | } 723 | .own-pc__tab{ 724 | width:100%;height:40px; 725 | } 726 | .own-pc__tab__item{ 727 | float:left;width:33.3%;text-align:center;line-height:40px;border-right:1px solid #ECECEC;box-sizing:border-box; 728 | font-size:0.875rem; 729 | } 730 | .own-pc__tab__item:last-child{ 731 | border-right: none; 732 | } -------------------------------------------------------------------------------- /mcm/static/images/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/404.jpg -------------------------------------------------------------------------------- /mcm/static/images/500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/500.jpg -------------------------------------------------------------------------------- /mcm/static/images/cy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/cy.jpg -------------------------------------------------------------------------------- /mcm/static/images/damixiansheng.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/damixiansheng.jpg -------------------------------------------------------------------------------- /mcm/static/images/maidanglao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/maidanglao.jpg -------------------------------------------------------------------------------- /mcm/static/images/mr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/mr.jpg -------------------------------------------------------------------------------- /mcm/static/images/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/p1.jpg -------------------------------------------------------------------------------- /mcm/static/images/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/p2.jpg -------------------------------------------------------------------------------- /mcm/static/images/p3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/p3.jpg -------------------------------------------------------------------------------- /mcm/static/images/p4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/p4.jpg -------------------------------------------------------------------------------- /mcm/static/images/s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/s1.jpg -------------------------------------------------------------------------------- /mcm/static/images/s2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/s2.jpg -------------------------------------------------------------------------------- /mcm/static/images/s3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/s3.jpg -------------------------------------------------------------------------------- /mcm/static/images/shangchuantupian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1vanLuo/vue-catering/e37fc9705f4768f236d5e0dcb46a3db944fadd4a/mcm/static/images/shangchuantupian.png -------------------------------------------------------------------------------- /mcm/static/js/H5lock.publish.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | window.H5lock = function(obj){ 3 | this.height = obj.height; 4 | this.width = obj.width; 5 | this.chooseType = obj.chooseType; 6 | this.container = obj.container; 7 | this.outer = obj.outer; 8 | this.inputEnd = obj.inputEnd; 9 | this.devicePixelRatio = window.devicePixelRatio || 1; 10 | }; 11 | 12 | 13 | H5lock.prototype.drawCle = function(x, y) { // 初始化解锁密码面板 14 | this.ctx.strokeStyle = '#FF563C'; 15 | this.ctx.lineWidth = 2; 16 | this.ctx.beginPath(); 17 | this.ctx.arc(x, y, this.r, 0, Math.PI * 2, true); 18 | this.ctx.closePath(); 19 | this.ctx.stroke(); 20 | } 21 | H5lock.prototype.drawPoint = function() { // 初始化圆心 22 | for (var i = 0 ; i < this.lastPoint.length ; i++) { 23 | this.ctx.fillStyle = '#FF563C'; 24 | this.ctx.beginPath(); 25 | this.ctx.arc(this.lastPoint[i].x, this.lastPoint[i].y, this.r / 2, 0, Math.PI * 2, true); 26 | this.ctx.closePath(); 27 | this.ctx.fill(); 28 | } 29 | } 30 | H5lock.prototype.drawStatusPoint = function(type, psw) { // 初始化状态线条 31 | var obj = { 32 | 'right': '#2CFF26', 33 | 'notright': 'red' 34 | }; 35 | type = obj[type]; 36 | 37 | 38 | for (var i = 0 ; i < this.prevPoint.length ; i++) { 39 | this.ctx.strokeStyle = type; 40 | this.ctx.beginPath(); 41 | this.ctx.arc(this.prevPoint[i].x, this.prevPoint[i].y, this.r, 0, Math.PI * 2, true); 42 | this.ctx.closePath(); 43 | this.ctx.stroke(); 44 | } 45 | } 46 | H5lock.prototype.drawLine = function(po, lastPoint) {// 解锁轨迹 47 | this.ctx.beginPath(); 48 | this.ctx.lineWidth = 3; 49 | this.ctx.moveTo(this.lastPoint[0].x, this.lastPoint[0].y); 50 | 51 | for (var i = 1 ; i < this.lastPoint.length ; i++) { 52 | this.ctx.lineTo(this.lastPoint[i].x, this.lastPoint[i].y); 53 | } 54 | this.ctx.lineTo(po.x, po.y); 55 | this.ctx.stroke(); 56 | this.ctx.closePath(); 57 | 58 | } 59 | H5lock.prototype.createCircle = function() {// 创建解锁点的坐标,根据canvas的大小来平均分配半径 60 | 61 | var n = this.chooseType; 62 | var count = 0; 63 | this.r = this.ctx.canvas.width / (2 + 4 * n);// 公式计算 64 | this.lastPoint = []; 65 | this.arr = []; 66 | this.restPoint = []; 67 | var r = this.r; 68 | for (var i = 0 ; i < n ; i++) { 69 | for (var j = 0 ; j < n ; j++) { 70 | count++; 71 | var obj = { 72 | x: j * 4 * r + 3 * r, 73 | y: i * 4 * r + 3 * r, 74 | index: count 75 | }; 76 | this.arr.push(obj); 77 | this.restPoint.push(obj); 78 | } 79 | } 80 | this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height); 81 | for (var i = 0 ; i < this.arr.length ; i++) { 82 | this.drawCle(this.arr[i].x, this.arr[i].y); 83 | } 84 | //return arr; 85 | } 86 | H5lock.prototype.getPosition = function(e) {// 获取touch点相对于canvas的坐标 87 | var rect = e.currentTarget.getBoundingClientRect(); 88 | var po = { 89 | x: (e.touches[0].clientX - rect.left)*this.devicePixelRatio, 90 | y: (e.touches[0].clientY - rect.top)*this.devicePixelRatio 91 | }; 92 | return po; 93 | } 94 | H5lock.prototype.update = function(po) {// 核心变换方法在touchmove时候调用 95 | this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height); 96 | 97 | for (var i = 0 ; i < this.arr.length ; i++) { // 每帧先把面板画出来 98 | this.drawCle(this.arr[i].x, this.arr[i].y); 99 | } 100 | 101 | this.drawPoint(this.lastPoint);// 每帧花轨迹 102 | this.drawLine(po , this.lastPoint);// 每帧画圆心 103 | 104 | for (var i = 0 ; i < this.restPoint.length ; i++) { 105 | if (Math.abs(po.x - this.restPoint[i].x) < this.r && Math.abs(po.y - this.restPoint[i].y) < this.r) { 106 | this.drawPoint(this.restPoint[i].x, this.restPoint[i].y); 107 | this.lastPoint.push(this.restPoint[i]); 108 | this.restPoint.splice(i, 1); 109 | break; 110 | } 111 | } 112 | 113 | } 114 | 115 | H5lock.prototype.storePass = function(psw) {// touchend结束之后对密码和状态的处理 116 | this.prevPoint = psw; 117 | var str = ''; 118 | for (var i = 0 ; i < psw.length ; i++) { 119 | str += psw[i].index; 120 | } 121 | 122 | this.inputEnd && this.inputEnd(str); 123 | 124 | } 125 | 126 | H5lock.prototype.setChooseType = function(type){ 127 | chooseType = type; 128 | init(); 129 | } 130 | H5lock.prototype.updatePassword = function(){ 131 | window.localStorage.removeItem('passwordxx'); 132 | window.localStorage.removeItem('chooseType'); 133 | this.pswObj = {}; 134 | document.getElementById('title').innerHTML = '绘制解锁图案'; 135 | this.reset(); 136 | } 137 | H5lock.prototype.initDom = function(){ 138 | var wrap = document.getElementById(this.container); 139 | var out = document.getElementById(this.outer); 140 | if(wrap && out) { 141 | var canvas = document.createElement('canvas'); 142 | canvas.setAttribute('id','canvas'); 143 | canvas.style.cssText = 'background-color: transparent;display: block;margin:30px auto'; 144 | 145 | wrap.appendChild(canvas); 146 | 147 | var width = this.width || 300; 148 | var height = this.height || 300; 149 | 150 | out.appendChild(wrap); 151 | 152 | // 高清屏锁放 153 | canvas.style.width = width + "px"; 154 | canvas.style.height = height + "px"; 155 | canvas.height = height * this.devicePixelRatio; 156 | canvas.width = width * this.devicePixelRatio; 157 | } 158 | 159 | 160 | 161 | } 162 | H5lock.prototype.init = function() { 163 | this.initDom(); 164 | this.pswObj = window.localStorage.getItem('passwordxx') ? { 165 | step: 2, 166 | spassword: JSON.parse(window.localStorage.getItem('passwordxx')) 167 | } : {}; 168 | this.lastPoint = []; 169 | this.prevPoint = []; 170 | this.touchFlag = false; 171 | this.canvas = document.getElementById('canvas'); 172 | this.ctx = this.canvas.getContext('2d'); 173 | this.createCircle(); 174 | this.bindEvent(); 175 | } 176 | H5lock.prototype.reset = function() { 177 | this.createCircle(); 178 | } 179 | H5lock.prototype.bindEvent = function() { 180 | var self = this; 181 | this.canvas.addEventListener("touchstart", function (e) { 182 | e.preventDefault();// 某些android 的 touchmove不宜触发 所以增加此行代码 183 | var po = self.getPosition(e); 184 | 185 | for (var i = 0 ; i < self.arr.length ; i++) { 186 | if (Math.abs(po.x - self.arr[i].x) < self.r && Math.abs(po.y - self.arr[i].y) < self.r) { 187 | 188 | self.touchFlag = true; 189 | self.drawPoint(self.arr[i].x,self.arr[i].y); 190 | self.lastPoint.push(self.arr[i]); 191 | self.restPoint.splice(i,1); 192 | break; 193 | } 194 | } 195 | }, false); 196 | this.canvas.addEventListener("touchmove", function (e) { 197 | if (self.touchFlag) { 198 | self.update(self.getPosition(e)); 199 | } 200 | }, false); 201 | this.canvas.addEventListener("touchend", function (e) { 202 | if (self.touchFlag) { 203 | self.touchFlag = false; 204 | self.storePass(self.lastPoint); 205 | 206 | } 207 | 208 | 209 | }, false); 210 | 211 | 212 | } 213 | })(); 214 | --------------------------------------------------------------------------------