├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .idea ├── .name ├── codeStyleSettings.xml ├── encodings.xml ├── jsLibraryMappings.xml ├── misc.xml ├── modules.xml ├── vcs.xml ├── vue-app.iml ├── watcherTasks.xml └── workspace.xml ├── .postcssrc.js ├── .project ├── 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 ├── data.json ├── index.html ├── package.json ├── prod.server.js ├── src ├── App.vue ├── common │ ├── fonts │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── js │ │ ├── date.js │ │ ├── store.js │ │ └── util.js │ └── stylus │ │ ├── base.styl │ │ ├── icon.styl │ │ ├── index.css │ │ ├── index.styl │ │ └── mixin.styl ├── components │ ├── cartcontrol │ │ ├── cartcontrol.styl │ │ └── cartcontrol.vue │ ├── food │ │ ├── food.styl │ │ └── food.vue │ ├── goods │ │ ├── decrease_3@2x.png │ │ ├── decrease_3@3x.png │ │ ├── discount_3@2x.png │ │ ├── discount_3@3x.png │ │ ├── goods.styl │ │ ├── goods.vue │ │ ├── guarantee_3@2x.png │ │ ├── guarantee_3@3x.png │ │ ├── invoice_3@2x.png │ │ ├── invoice_3@3x.png │ │ ├── special_3@2x.png │ │ └── special_3@3x.png │ ├── header │ │ ├── brand@2x.png │ │ ├── brand@3x.png │ │ ├── bulletin@2x.png │ │ ├── bulletin@3x.png │ │ ├── decrease_1@2x.png │ │ ├── decrease_1@3x.png │ │ ├── decrease_2@2x.png │ │ ├── decrease_2@3x.png │ │ ├── discount_1@2x.png │ │ ├── discount_1@3x.png │ │ ├── discount_2@2x.png │ │ ├── discount_2@3x.png │ │ ├── guarantee_1@2x.png │ │ ├── guarantee_1@3x.png │ │ ├── guarantee_2@2x.png │ │ ├── guarantee_2@3x.png │ │ ├── header.styl │ │ ├── header.vue │ │ ├── invoice_1@2x.png │ │ ├── invoice_1@3x.png │ │ ├── invoice_2@2x.png │ │ ├── invoice_2@3x.png │ │ ├── special_1@2x.png │ │ ├── special_1@3x.png │ │ ├── special_2@2x.png │ │ └── special_2@3x.png │ ├── ratings │ │ ├── ratings.styl │ │ └── ratings.vue │ ├── ratingselect │ │ ├── ratingselect.styl │ │ └── ratingselect.vue │ ├── seller │ │ ├── decrease_4@2x.png │ │ ├── decrease_4@3x.png │ │ ├── discount_4@2x.png │ │ ├── discount_4@3x.png │ │ ├── guarantee_4@2x.png │ │ ├── guarantee_4@3x.png │ │ ├── invoice_4@2x.png │ │ ├── invoice_4@3x.png │ │ ├── seller.styl │ │ ├── seller.vue │ │ ├── special_4@2x.png │ │ └── special_4@3x.png │ ├── shopcart │ │ ├── shopcart.styl │ │ └── shopcart.vue │ ├── split │ │ └── split.vue │ └── star │ │ ├── star.styl │ │ ├── star.vue │ │ ├── star24_half@2x.png │ │ ├── star24_half@3x.png │ │ ├── star24_off@2x.png │ │ ├── star24_off@3x.png │ │ ├── star24_on@2x.png │ │ ├── star24_on@3x.png │ │ ├── star36_half@2x.png │ │ ├── star36_half@3x.png │ │ ├── star36_off@2x.png │ │ ├── star36_off@3x.png │ │ ├── star36_on@2x.png │ │ ├── star36_on@3x.png │ │ ├── star48_half@2x.png │ │ ├── star48_half@3x.png │ │ ├── star48_off@2x.png │ │ ├── star48_off@3x.png │ │ ├── star48_on@2x.png │ │ └── star48_on@3x.png ├── main.js └── router │ └── index.js └── static ├── .gitkeep └── css └── reset.css /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["latest", { 4 | "es2015": { "modules": false } 5 | }], 6 | "stage-2" 7 | ], 8 | "plugins": ["transform-runtime"], 9 | "comments": false, 10 | "env": { 11 | "test": { 12 | "presets": ["latest", "stage-2"], 13 | "plugins": [ "istanbul" ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 13 | extends: 'standard', 14 | // required to lint *.vue files 15 | plugins: [ 16 | 'html' 17 | ], 18 | // add your custom rules here 19 | 'rules': { 20 | // allow paren-less arrow functions 21 | 'arrow-parens': 0, 22 | // allow async-await 23 | 'generator-star-spacing': 0, 24 | // allow debugger during development 25 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 26 | 'semi': ['error','always'], 27 | 'space-before-function-paren': 0, 28 | 'spaced-comment':0, 29 | 'indent':0, 30 | 'no-tabs':0 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | yarn-error.log 6 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | vue-app -------------------------------------------------------------------------------- /.idea/codeStyleSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 13 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vue-app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/watcherTasks.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 | 91 | 92 | 132 | 133 | 134 | C:\Users\夏青\AppData\Roaming\npm\bower.cmd 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | true 143 | 144 | 145 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 184 | 185 | 186 | 187 | 190 | 191 | 194 | 195 | 196 | 197 | 200 | 201 | 204 | 205 | 208 | 209 | 210 | 211 | 214 | 215 | 218 | 219 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | $PROJECT_DIR$ 293 | true 294 | 295 | bdd 296 | 297 | DIRECTORY 298 | 299 | false 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 1488425590399 319 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 350 | 351 | 354 | 357 | 358 | 359 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | vue-app 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue2.0仿饿了么webapp单页应用 2 |
3 | 声明: 代码源于 黄毅老师在慕课网上的教学视频,我自己重现了vue2.0版本,喜欢的童鞋可以去支持老师的课程:http://coding.imooc.com/class/74.html 4 |
5 | 演示地址:http://vuejssellapp.t.imooc.io/#!/ 6 | 7 | ![演示.png](http://upload-images.jianshu.io/upload_images/4670483-9a21e2ae16ea6ac6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 8 | 9 |
10 | ##依赖工具: 11 | - vue-cli 12 | - express 13 | - vue-resource 14 | - vue-router 15 | - vue-infinite-scroll 16 | - stylus 17 | - webpack 18 | 19 |
20 | 21 | ##安装: 22 | 1、安装node:http://nodejs.cn/download/ 23 | git:https://git-scm.com/downloads 24 | 25 | 2、从我的仓库复制代码: 26 | > $ git clone https://github.com/RegToss/Vue-SPA.git 27 | 28 | 3、安装vue脚手架工具vue-cli: 29 | > $npm install vue-cli -g 30 | 31 | 4、进入代码根目录安装依赖: 32 | > $ npm install --save-dev 33 | 34 | 5、运行命令: 35 | > $ npm run dev 36 | 37 | 6、发布代码: 38 | > $ npm run build 39 | 40 | 41 | 42 | 发布完代码后会生成dist目录,保存着项目的所有可运行的代码。 43 | 44 | 注意不能直接打开index.html运行,需要开启http server运行代码。 45 | 直接运行我写好的配置文件就可以运行代码: 46 | > $ node prod.server.js 47 | 48 | 打开浏览器输入localhost:9000看效果。 49 | 50 |
51 | 也可以在本地服务器部署你的代码,以nginx为例: 52 | 53 | 下载地址:http://nginx.org/en/download.html 54 | 55 | 解压nginx到指定目录:f:/nginx。 56 | 在命令行进入f:/nginx目录下运行: 57 | > $ start nginx 58 | 59 | 开启nginx。 60 | 61 | 1、默认配置的端口号是80,打开浏览器输入:localhost:80,如果出现welcome to nginx则端口80可以使用。否则需要修改默认端口号。 62 | 63 | 打开nginx/conf下的nginx.conf配置文件,查看默认监听端口号并修改为: 64 | ``` 65 | server { 66 | listen 8088; 67 | } 68 | ``` 69 | 在浏览器输入localhost:8088即可正常访问。 70 | 71 | 2、修改默认路径为指定的地址,即可打开我们的页面,将server中的location修改为: 72 | > location / { 73 | root F:/Vue/vue-app/dist; //你的dist地址 74 | index index.html; 75 | } 76 | 77 | 刷新浏览器即可访问vueapp内容。 78 | 79 | 80 | 81 | (完) 82 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | //noinspection JSUnresolvedFunction 2 | require('./check-versions')() 3 | 4 | var config = require('../config') 5 | if (!process.env.NODE_ENV) { 6 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 7 | } 8 | 9 | var opn = require('opn') 10 | var path = require('path') 11 | var express = require('express') 12 | var webpack = require('webpack') 13 | var proxyMiddleware = require('http-proxy-middleware') 14 | var webpackConfig = require('./webpack.dev.conf') 15 | 16 | // default port where dev server listens for incoming traffic 17 | var port = process.env.PORT || config.dev.port 18 | // automatically open browser, if not set will be false 19 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 20 | // Define HTTP proxies to your custom API backend 21 | // https://github.com/chimurai/http-proxy-middleware 22 | var proxyTable = config.dev.proxyTable 23 | 24 | var app = express() 25 | 26 | var appData = require('../data.json') 27 | var seller = appData.seller; 28 | var goods = appData.goods; 29 | var ratings = appData.ratings; 30 | 31 | //**********加载mock数据********** 32 | var apiRoutes = express.Router(); 33 | 34 | apiRoutes.get('/seller', function (req,res) { 35 | res.json({ 36 | errno: 0, 37 | data: seller 38 | }); 39 | }); 40 | apiRoutes.get('/goods', function (req,res) { 41 | res.json({ 42 | errno: 0, 43 | data: goods 44 | }); 45 | }); 46 | apiRoutes.get('/ratings', function (req,res) { 47 | res.json({ 48 | errno: 0, 49 | data: ratings 50 | }); 51 | }); 52 | 53 | app.use('/api',apiRoutes);//创建api路由 54 | 55 | //*******数据加载完成******** 56 | 57 | var compiler = webpack(webpackConfig) 58 | 59 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 60 | publicPath: webpackConfig.output.publicPath, 61 | quiet: true 62 | }) 63 | 64 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 65 | log: () => {} 66 | }) 67 | // force page reload when html-webpack-plugin template changes 68 | compiler.plugin('compilation', function (compilation) { 69 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 70 | hotMiddleware.publish({ action: 'reload' }) 71 | cb() 72 | }) 73 | }) 74 | 75 | // proxy api requests 76 | Object.keys(proxyTable).forEach(function (context) { 77 | var options = proxyTable[context] 78 | if (typeof options === 'string') { 79 | options = { target: options } 80 | } 81 | app.use(proxyMiddleware(options.filter || context, options)) 82 | }) 83 | 84 | // handle fallback for HTML5 history API 85 | app.use(require('connect-history-api-fallback')()) 86 | 87 | // serve webpack bundle output 88 | app.use(devMiddleware) 89 | 90 | // enable hot-reload and state-preserving 91 | // compilation error display 92 | app.use(hotMiddleware) 93 | 94 | // serve pure static assets 95 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 96 | app.use(staticPath, express.static('./static')) 97 | 98 | var uri = 'http://localhost:' + port 99 | 100 | devMiddleware.waitUntilValid(function () { 101 | console.log('> Listening at ' + uri + '\n') 102 | }) 103 | 104 | module.exports = app.listen(port, function (err) { 105 | if (err) { 106 | console.log(err) 107 | return 108 | } 109 | 110 | // when env is testing, don't need open it 111 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 112 | opn(uri) 113 | } 114 | }) 115 | -------------------------------------------------------------------------------- /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 | // http://vuejs.github.io/vue-loader/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 | -------------------------------------------------------------------------------- /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 | } 13 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | module.exports = { 11 | entry: { 12 | app: './src/main.js' 13 | }, 14 | output: { 15 | path: config.build.assetsRoot, 16 | filename: '[name].js', 17 | publicPath: process.env.NODE_ENV === 'production' 18 | ? config.build.assetsPublicPath 19 | : config.dev.assetsPublicPath 20 | }, 21 | resolve: { 22 | extensions: ['.js', '.vue', '.json'], 23 | alias: { 24 | 'vue$': 'vue/dist/vue.esm.js', 25 | '@': resolve('src'), 26 | 'common': path.resolve(__dirname, '../src/common'), 27 | 'components': path.resolve(__dirname, '../src/components') 28 | } 29 | }, 30 | module: { 31 | rules: [ 32 | { 33 | test: /\.(js|vue)$/, 34 | loader: 'eslint-loader', 35 | enforce: "pre", 36 | include: [resolve('src'), resolve('test')], 37 | options: { 38 | formatter: require('eslint-friendly-formatter') 39 | } 40 | }, 41 | { 42 | test: /\.vue$/, 43 | loader: 'vue-loader', 44 | options: vueLoaderConfig 45 | }, 46 | { 47 | test: /\.js$/, 48 | loader: 'babel-loader', 49 | include: [resolve('src'), resolve('test')] 50 | }, 51 | { 52 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 53 | loader: 'url-loader', 54 | query: { 55 | limit: 10000, 56 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 57 | } 58 | }, 59 | { 60 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 61 | loader: 'url-loader', 62 | query: { 63 | limit: 10000, 64 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 65 | } 66 | } 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | // generate dist index.html with correct asset hash for caching. 46 | // you can customize output by editing /index.html 47 | // see https://github.com/ampedandwired/html-webpack-plugin 48 | new HtmlWebpackPlugin({ 49 | filename: config.build.index, 50 | template: 'index.html', 51 | inject: true, 52 | minify: { 53 | removeComments: true, 54 | collapseWhitespace: true, 55 | removeAttributeQuotes: true 56 | // more options: 57 | // https://github.com/kangax/html-minifier#options-quick-reference 58 | }, 59 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 60 | chunksSortMode: 'dependency' 61 | }), 62 | // split vendor js into its own file 63 | new webpack.optimize.CommonsChunkPlugin({ 64 | name: 'vendor', 65 | minChunks: function (module, count) { 66 | // any required modules inside node_modules are extracted to vendor 67 | return ( 68 | module.resource && 69 | /\.js$/.test(module.resource) && 70 | module.resource.indexOf( 71 | path.join(__dirname, '../node_modules') 72 | ) === 0 73 | ) 74 | } 75 | }), 76 | // extract webpack runtime and module manifest to its own file in order to 77 | // prevent vendor hash from being updated whenever app bundle is updated 78 | new webpack.optimize.CommonsChunkPlugin({ 79 | name: 'manifest', 80 | chunks: ['vendor'] 81 | }), 82 | // copy custom static assets 83 | new CopyWebpackPlugin([ 84 | { 85 | from: path.resolve(__dirname, '../static'), 86 | to: config.build.assetsSubDirectory, 87 | ignore: ['.*'] 88 | } 89 | ]) 90 | ] 91 | }) 92 | 93 | if (config.build.productionGzip) { 94 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 95 | 96 | webpackConfig.plugins.push( 97 | new CompressionWebpackPlugin({ 98 | asset: '[path].gz[query]', 99 | algorithm: 'gzip', 100 | test: new RegExp( 101 | '\\.(' + 102 | config.build.productionGzipExtensions.join('|') + 103 | ')$' 104 | ), 105 | threshold: 10240, 106 | minRatio: 0.8 107 | }) 108 | ) 109 | } 110 | 111 | if (config.build.bundleAnalyzerReport) { 112 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 113 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 114 | } 115 | 116 | module.exports = webpackConfig 117 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: false, 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 | port: 9000 24 | }, 25 | dev: { 26 | env: require('./dev.env'), 27 | port: 8080, 28 | autoOpenBrowser: true, 29 | assetsSubDirectory: 'static', 30 | assetsPublicPath: '/', 31 | proxyTable: {}, 32 | // CSS Sourcemaps off by default because relative paths are "buggy" 33 | // with this option, according to the CSS-Loader README 34 | // (https://github.com/webpack/css-loader#sourcemaps) 35 | // In our experience, they generally work as expected, 36 | // just be aware of this issue when enabling this option. 37 | cssSourceMap: false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /data.json: -------------------------------------------------------------------------------- 1 | { 2 | "seller": { 3 | "name": "粥品香坊(回龙观)", 4 | "description": "蜂鸟专送", 5 | "deliveryTime": 38, 6 | "score": 4.2, 7 | "serviceScore": 4.1, 8 | "foodScore": 4.3, 9 | "rankRate": 69.2, 10 | "minPrice": 20, 11 | "deliveryPrice": 4, 12 | "ratingCount": 24, 13 | "sellCount": 90, 14 | "bulletin": "粥品香坊其烹饪粥料的秘方源于中国千年古法,在融和现代制作工艺,由世界烹饪大师屈浩先生领衔研发。坚守纯天然、0添加的良心品质深得消费者青睐,发展至今成为粥类的引领品牌。是2008年奥运会和2013年园博会指定餐饮服务商。", 15 | "supports": [ 16 | { 17 | "type": 0, 18 | "description": "在线支付满28减5" 19 | }, 20 | { 21 | "type": 1, 22 | "description": "VC无限橙果汁全场8折" 23 | }, 24 | { 25 | "type": 2, 26 | "description": "单人精彩套餐" 27 | }, 28 | { 29 | "type": 3, 30 | "description": "该商家支持发票,请下单写好发票抬头" 31 | }, 32 | { 33 | "type": 4, 34 | "description": "已加入“外卖保”计划,食品安全保障" 35 | } 36 | ], 37 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/seller_avatar_256px.jpg", 38 | "pics": [ 39 | "http://fuss10.elemecdn.com/8/71/c5cf5715740998d5040dda6e66abfjpeg.jpeg?imageView2/1/w/180/h/180", 40 | "http://fuss10.elemecdn.com/b/6c/75bd250e5ba69868f3b1178afbda3jpeg.jpeg?imageView2/1/w/180/h/180", 41 | "http://fuss10.elemecdn.com/f/96/3d608c5811bc2d902fc9ab9a5baa7jpeg.jpeg?imageView2/1/w/180/h/180", 42 | "http://fuss10.elemecdn.com/6/ad/779f8620ff49f701cd4c58f6448b6jpeg.jpeg?imageView2/1/w/180/h/180" 43 | ], 44 | "infos": [ 45 | "该商家支持发票,请下单写好发票抬头", 46 | "品类:其他菜系,包子粥店", 47 | "北京市昌平区回龙观西大街龙观置业大厦底商B座102单元1340", 48 | "营业时间:10:00-20:30" 49 | ] 50 | }, 51 | "goods": [ 52 | { 53 | "name": "热销榜", 54 | "type": -1, 55 | "foods": [ 56 | { 57 | "name": "皮蛋瘦肉粥", 58 | "price": 10, 59 | "oldPrice": "", 60 | "description": "咸粥", 61 | "sellCount": 229, 62 | "rating": 100, 63 | "info": "一碗皮蛋瘦肉粥,总是我到粥店时的不二之选。香浓软滑,饱腹暖心,皮蛋的Q弹与瘦肉的滑嫩伴着粥香溢于满口,让人喝这样的一碗粥也觉得心满意足", 64 | "ratings": [ 65 | { 66 | "username": "3******c", 67 | "rateTime": 1469281964000, 68 | "rateType": 0, 69 | "text": "很喜欢的粥", 70 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 71 | }, 72 | { 73 | "username": "2******3", 74 | "rateTime": 1469271264000, 75 | "rateType": 0, 76 | "text": "", 77 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 78 | }, 79 | { 80 | "username": "3******b", 81 | "rateTime": 1469261964000, 82 | "rateType": 1, 83 | "text": "", 84 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 85 | } 86 | ], 87 | "icon": "http://fuss10.elemecdn.com/c/cd/c12745ed8a5171e13b427dbc39401jpeg.jpeg?imageView2/1/w/114/h/114", 88 | "image": "http://fuss10.elemecdn.com/c/cd/c12745ed8a5171e13b427dbc39401jpeg.jpeg?imageView2/1/w/750/h/750" 89 | }, 90 | { 91 | "name": "扁豆焖面", 92 | "price": 14, 93 | "oldPrice": "", 94 | "description": "", 95 | "sellCount": 188, 96 | "rating": 96, 97 | "ratings": [ 98 | { 99 | "username": "3******c", 100 | "rateTime": 1469281964000, 101 | "rateType": 0, 102 | "text": "", 103 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 104 | }, 105 | { 106 | "username": "2******3", 107 | "rateTime": 1469271264000, 108 | "rateType": 0, 109 | "text": "", 110 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 111 | }, 112 | { 113 | "username": "3******b", 114 | "rateTime": 1469261964000, 115 | "rateType": 1, 116 | "text": "", 117 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 118 | } 119 | ], 120 | "info": "", 121 | "icon": "http://fuss10.elemecdn.com/c/6b/29e3d29b0db63d36f7c500bca31d8jpeg.jpeg?imageView2/1/w/114/h/114", 122 | "image": "http://fuss10.elemecdn.com/c/6b/29e3d29b0db63d36f7c500bca31d8jpeg.jpeg?imageView2/1/w/750/h/750" 123 | }, 124 | { 125 | "name": "葱花饼", 126 | "price": 10, 127 | "oldPrice": "", 128 | "description": "", 129 | "sellCount": 124, 130 | "rating": 85, 131 | "info": "", 132 | "ratings": [ 133 | { 134 | "username": "3******c", 135 | "rateTime": 1469281964000, 136 | "rateType": 1, 137 | "text": "没啥味道", 138 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 139 | }, 140 | { 141 | "username": "2******3", 142 | "rateTime": 1469271264000, 143 | "rateType": 1, 144 | "text": "很一般啊", 145 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 146 | }, 147 | { 148 | "username": "3******b", 149 | "rateTime": 1469261964000, 150 | "rateType": 0, 151 | "text": "", 152 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 153 | } 154 | ], 155 | "icon": "http://fuss10.elemecdn.com/f/28/a51e7b18751bcdf871648a23fd3b4jpeg.jpeg?imageView2/1/w/114/h/114", 156 | "image": "http://fuss10.elemecdn.com/f/28/a51e7b18751bcdf871648a23fd3b4jpeg.jpeg?imageView2/1/w/750/h/750" 157 | }, 158 | { 159 | "name": "牛肉馅饼", 160 | "price": 14, 161 | "oldPrice": "", 162 | "description": "", 163 | "sellCount": 114, 164 | "rating": 91, 165 | "info": "", 166 | "ratings": [ 167 | { 168 | "username": "3******c", 169 | "rateTime": 1469281964000, 170 | "rateType": 1, 171 | "text": "难吃不推荐", 172 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 173 | }, 174 | { 175 | "username": "2******3", 176 | "rateTime": 1469271264000, 177 | "rateType": 0, 178 | "text": "", 179 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 180 | }, 181 | { 182 | "username": "3******b", 183 | "rateTime": 1469261964000, 184 | "rateType": 0, 185 | "text": "", 186 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 187 | } 188 | ], 189 | "icon": "http://fuss10.elemecdn.com/d/b9/bcab0e8ad97758e65ae5a62b2664ejpeg.jpeg?imageView2/1/w/114/h/114", 190 | "image": "http://fuss10.elemecdn.com/d/b9/bcab0e8ad97758e65ae5a62b2664ejpeg.jpeg?imageView2/1/w/750/h/750" 191 | }, 192 | { 193 | "name": "招牌猪肉白菜锅贴/10个", 194 | "price": 17, 195 | "oldPrice": "", 196 | "description": "", 197 | "sellCount": 101, 198 | "rating": 78, 199 | "info": "", 200 | "ratings": [ 201 | { 202 | "username": "3******c", 203 | "rateTime": 1469281964000, 204 | "rateType": 1, 205 | "text": "不脆,不好吃", 206 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 207 | }, 208 | { 209 | "username": "2******3", 210 | "rateTime": 1469271264000, 211 | "rateType": 0, 212 | "text": "", 213 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 214 | }, 215 | { 216 | "username": "3******b", 217 | "rateTime": 1469261964000, 218 | "rateType": 0, 219 | "text": "", 220 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 221 | } 222 | ], 223 | "icon": "http://fuss10.elemecdn.com/7/72/9a580c1462ca1e4d3c07e112bc035jpeg.jpeg?imageView2/1/w/114/h/114", 224 | "image": "http://fuss10.elemecdn.com/7/72/9a580c1462ca1e4d3c07e112bc035jpeg.jpeg?imageView2/1/w/750/h/750" 225 | }, 226 | { 227 | "name": "南瓜粥", 228 | "price": 9, 229 | "oldPrice": "", 230 | "description": "甜粥", 231 | "sellCount": 91, 232 | "rating": 100, 233 | "ratings": [ 234 | { 235 | "username": "3******c", 236 | "rateTime": 1469281964000, 237 | "rateType": 0, 238 | "text": "", 239 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 240 | }, 241 | { 242 | "username": "2******3", 243 | "rateTime": 1469271264000, 244 | "rateType": 0, 245 | "text": "", 246 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 247 | }, 248 | { 249 | "username": "3******b", 250 | "rateTime": 1469261964000, 251 | "rateType": 0, 252 | "text": "", 253 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 254 | } 255 | ], 256 | "icon": "http://fuss10.elemecdn.com/8/a6/453f65f16b1391942af11511b7a90jpeg.jpeg?imageView2/1/w/114/h/114", 257 | "image": "http://fuss10.elemecdn.com/8/a6/453f65f16b1391942af11511b7a90jpeg.jpeg?imageView2/1/w/750/h/750" 258 | }, 259 | { 260 | "name": "红豆薏米美肤粥", 261 | "price": 12, 262 | "oldPrice": "", 263 | "description": "甜粥", 264 | "sellCount": 86, 265 | "rating": 100, 266 | "info": "", 267 | "ratings": [ 268 | { 269 | "username": "3******c", 270 | "rateTime": 1469281964000, 271 | "rateType": 0, 272 | "text": "", 273 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 274 | }, 275 | { 276 | "username": "2******3", 277 | "rateTime": 1469271264000, 278 | "rateType": 0, 279 | "text": "", 280 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 281 | }, 282 | { 283 | "username": "3******b", 284 | "rateTime": 1469261964000, 285 | "rateType": 0, 286 | "text": "", 287 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 288 | } 289 | ], 290 | "icon": "http://fuss10.elemecdn.com/d/22/260bd78ee6ac6051136c5447fe307jpeg.jpeg?imageView2/1/w/114/h/114", 291 | "image": "http://fuss10.elemecdn.com/d/22/260bd78ee6ac6051136c5447fe307jpeg.jpeg?imageView2/1/w/750/h/750" 292 | }, 293 | { 294 | "name": "八宝酱菜", 295 | "price": 4, 296 | "oldPrice": "", 297 | "description": "", 298 | "sellCount": 84, 299 | "rating": 100, 300 | "info": "", 301 | "ratings": [ 302 | { 303 | "username": "3******c", 304 | "rateTime": 1469281964000, 305 | "rateType": 0, 306 | "text": "", 307 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 308 | }, 309 | { 310 | "username": "2******3", 311 | "rateTime": 1469271264000, 312 | "rateType": 0, 313 | "text": "", 314 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 315 | }, 316 | { 317 | "username": "3******b", 318 | "rateTime": 1469261964000, 319 | "rateType": 0, 320 | "text": "", 321 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 322 | } 323 | ], 324 | "icon": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/114/h/114", 325 | "image": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/750/h/750" 326 | }, 327 | { 328 | "name": "红枣山药糙米粥", 329 | "price": 10, 330 | "oldPrice": "", 331 | "description": "", 332 | "sellCount": 81, 333 | "rating": 91, 334 | "info": "", 335 | "ratings": [ 336 | { 337 | "username": "3******c", 338 | "rateTime": 1469281964000, 339 | "rateType": 0, 340 | "text": "", 341 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 342 | }, 343 | { 344 | "username": "2******3", 345 | "rateTime": 1469271264000, 346 | "rateType": 0, 347 | "text": "", 348 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 349 | }, 350 | { 351 | "username": "3******b", 352 | "rateTime": 1469261964000, 353 | "rateType": 0, 354 | "text": "", 355 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 356 | } 357 | ], 358 | "icon": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/114/h/114", 359 | "image": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/750/h/750" 360 | }, 361 | { 362 | "name": "糊塌子", 363 | "price": 10, 364 | "oldPrice": "", 365 | "description": "", 366 | "sellCount": 80, 367 | "rating": 93, 368 | "info": "", 369 | "ratings": [ 370 | { 371 | "username": "3******c", 372 | "rateTime": 1469281964000, 373 | "rateType": 0, 374 | "text": "", 375 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 376 | }, 377 | { 378 | "username": "2******3", 379 | "rateTime": 1469271264000, 380 | "rateType": 0, 381 | "text": "", 382 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 383 | }, 384 | { 385 | "username": "3******b", 386 | "rateTime": 1469261964000, 387 | "rateType": 0, 388 | "text": "", 389 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 390 | } 391 | ], 392 | "icon": "http://fuss10.elemecdn.com/0/05/097a2a59fd2a2292d08067e16380cjpeg.jpeg?imageView2/1/w/114/h/114", 393 | "image": "http://fuss10.elemecdn.com/0/05/097a2a59fd2a2292d08067e16380cjpeg.jpeg?imageView2/1/w/750/h/750" 394 | } 395 | ] 396 | }, 397 | { 398 | "name": "单人精彩套餐", 399 | "type": 2, 400 | "foods": [ 401 | { 402 | "name": "红枣山药粥套餐", 403 | "price": 29, 404 | "oldPrice": 36, 405 | "description": "红枣山药糙米粥,素材包,爽口莴笋丝,四川泡菜或八宝酱菜,配菜可备注", 406 | "sellCount": 17, 407 | "rating": 100, 408 | "info": "", 409 | "ratings": [ 410 | { 411 | "username": "2******3", 412 | "rateTime": 1469271264000, 413 | "rateType": 0, 414 | "text": "", 415 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 416 | } 417 | ], 418 | "icon": "http://fuss10.elemecdn.com/6/72/cb844f0bb60c502c6d5c05e0bddf5jpeg.jpeg?imageView2/1/w/114/h/114", 419 | "image": "http://fuss10.elemecdn.com/6/72/cb844f0bb60c502c6d5c05e0bddf5jpeg.jpeg?imageView2/1/w/750/h/750" 420 | } 421 | ] 422 | }, 423 | { 424 | "name": "冰爽饮品限时特惠", 425 | "type": 1, 426 | "foods": [ 427 | { 428 | "name": "VC无限橙果汁", 429 | "price": 8, 430 | "oldPrice": 10, 431 | "description": "", 432 | "sellCount": 15, 433 | "rating": 100, 434 | "info": "", 435 | "ratings": [ 436 | { 437 | "username": "3******c", 438 | "rateTime": 1469281964000, 439 | "rateType": 0, 440 | "text": "还可以", 441 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 442 | }, 443 | { 444 | "username": "2******3", 445 | "rateTime": 1469271264000, 446 | "rateType": 0, 447 | "text": "", 448 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 449 | } 450 | ], 451 | "icon": "http://fuss10.elemecdn.com/e/c6/f348e811772016ae24e968238bcbfjpeg.jpeg?imageView2/1/w/114/h/114", 452 | "image": "http://fuss10.elemecdn.com/e/c6/f348e811772016ae24e968238bcbfjpeg.jpeg?imageView2/1/w/750/h/750" 453 | } 454 | ] 455 | }, 456 | { 457 | "name": "精选热菜", 458 | "type": -1, 459 | "foods": [ 460 | { 461 | "name": "娃娃菜炖豆腐", 462 | "price": 17, 463 | "oldPrice": "", 464 | "description": "", 465 | "sellCount": 43, 466 | "rating": 92, 467 | "info": "", 468 | "ratings": [ 469 | { 470 | "username": "3******c", 471 | "rateTime": 1469281964000, 472 | "rateType": 0, 473 | "text": "菜量还可以,味道还可以", 474 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 475 | }, 476 | { 477 | "username": "2******3", 478 | "rateTime": 1469271264000, 479 | "rateType": 0, 480 | "text": "", 481 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 482 | } 483 | ], 484 | "icon": "http://fuss10.elemecdn.com/d/2d/b1eb45b305635d9dd04ddf157165fjpeg.jpeg?imageView2/1/w/114/h/114", 485 | "image": "http://fuss10.elemecdn.com/d/2d/b1eb45b305635d9dd04ddf157165fjpeg.jpeg?imageView2/1/w/750/h/750" 486 | }, 487 | { 488 | "name": "手撕包菜", 489 | "price": 16, 490 | "oldPrice": "", 491 | "description": "", 492 | "sellCount": 29, 493 | "rating": 100, 494 | "info": "", 495 | "ratings": [ 496 | { 497 | "username": "3******c", 498 | "rateTime": 1469281964000, 499 | "rateType": 0, 500 | "text": "", 501 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 502 | }, 503 | { 504 | "username": "2******3", 505 | "rateTime": 1469271264000, 506 | "rateType": 0, 507 | "text": "", 508 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 509 | } 510 | ], 511 | "icon": "http://fuss10.elemecdn.com/9/c6/f3bc84468820121112e79583c24efjpeg.jpeg?imageView2/1/w/114/h/114", 512 | "image": "http://fuss10.elemecdn.com/9/c6/f3bc84468820121112e79583c24efjpeg.jpeg?imageView2/1/w/750/h/750" 513 | }, 514 | { 515 | "name": "香酥黄金鱼/3条", 516 | "price": 11, 517 | "oldPrice": "", 518 | "description": "", 519 | "sellCount": 15, 520 | "rating": 100, 521 | "info": "", 522 | "ratings": [ 523 | { 524 | "username": "3******c", 525 | "rateTime": 1469281964000, 526 | "rateType": 0, 527 | "text": "", 528 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 529 | }, 530 | { 531 | "username": "2******3", 532 | "rateTime": 1469271264000, 533 | "rateType": 0, 534 | "text": "", 535 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 536 | } 537 | ], 538 | "icon": "http://fuss10.elemecdn.com/4/e7/8277a6a2ea0a2e97710290499fc41jpeg.jpeg?imageView2/1/w/114/h/114", 539 | "image": "http://fuss10.elemecdn.com/4/e7/8277a6a2ea0a2e97710290499fc41jpeg.jpeg?imageView2/1/w/750/h/750" 540 | } 541 | ] 542 | }, 543 | { 544 | "name": "爽口凉菜", 545 | "type": -1, 546 | "foods": [ 547 | { 548 | "name": "八宝酱菜", 549 | "price": 4, 550 | "oldPrice": "", 551 | "description": "", 552 | "sellCount": 84, 553 | "rating": 100, 554 | "info": "", 555 | "ratings": [ 556 | { 557 | "username": "3******c", 558 | "rateTime": 1469281964000, 559 | "rateType": 0, 560 | "text": "", 561 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 562 | }, 563 | { 564 | "username": "2******3", 565 | "rateTime": 1469271264000, 566 | "rateType": 0, 567 | "text": "", 568 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 569 | }, 570 | { 571 | "username": "3******b", 572 | "rateTime": 1469261964000, 573 | "rateType": 0, 574 | "text": "", 575 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 576 | } 577 | ], 578 | "icon": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/114/h/114", 579 | "image": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/750/h/750" 580 | }, 581 | { 582 | "name": "拍黄瓜", 583 | "price": 9, 584 | "oldPrice": "", 585 | "description": "", 586 | "sellCount": 28, 587 | "rating": 100, 588 | "info": "", 589 | "ratings": [ 590 | { 591 | "username": "3******c", 592 | "rateTime": 1469281964000, 593 | "rateType": 0, 594 | "text": "", 595 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 596 | }, 597 | { 598 | "username": "2******3", 599 | "rateTime": 1469271264000, 600 | "rateType": 0, 601 | "text": "", 602 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 603 | }, 604 | { 605 | "username": "3******b", 606 | "rateTime": 1469261964000, 607 | "rateType": 0, 608 | "text": "", 609 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 610 | } 611 | ], 612 | "icon": "http://fuss10.elemecdn.com/6/54/f654985b4e185f06eb07f8fa2b2e8jpeg.jpeg?imageView2/1/w/114/h/114", 613 | "image": "http://fuss10.elemecdn.com/6/54/f654985b4e185f06eb07f8fa2b2e8jpeg.jpeg?imageView2/1/w/750/h/750" 614 | } 615 | ] 616 | }, 617 | { 618 | "name": "精选套餐", 619 | "type": -1, 620 | "foods": [ 621 | { 622 | "name": "红豆薏米粥套餐", 623 | "price": 37, 624 | "oldPrice": "", 625 | "description": "红豆薏米粥,三鲜干蒸烧卖,拍黄瓜", 626 | "sellCount": 3, 627 | "rating": 100, 628 | "info": "", 629 | "ratings": [ 630 | { 631 | "username": "2******3", 632 | "rateTime": 1469271264000, 633 | "rateType": 0, 634 | "text": "", 635 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 636 | } 637 | ], 638 | "icon": "http://fuss10.elemecdn.com/f/49/27f26ed00c025b2200a9ccbb7e67ejpeg.jpeg?imageView2/1/w/114/h/114", 639 | "image": "http://fuss10.elemecdn.com/f/49/27f26ed00c025b2200a9ccbb7e67ejpeg.jpeg?imageView2/1/w/750/h/750" 640 | }, 641 | { 642 | "name": "皮蛋瘦肉粥套餐", 643 | "price": 31, 644 | "oldPrice": "", 645 | "description": "", 646 | "sellCount": 12, 647 | "rating": 100, 648 | "info": "", 649 | "ratings": [ 650 | { 651 | "username": "2******3", 652 | "rateTime": 1469271264000, 653 | "rateType": 0, 654 | "text": "", 655 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 656 | } 657 | ], 658 | "icon": "http://fuss10.elemecdn.com/8/96/f444a8087f0e940ef264617f9d98ajpeg.jpeg?imageView2/1/w/114/h/114", 659 | "image": "http://fuss10.elemecdn.com/8/96/f444a8087f0e940ef264617f9d98ajpeg.jpeg?imageView2/1/w/750/h/750" 660 | } 661 | ] 662 | }, 663 | { 664 | "name": "果拼果汁", 665 | "type": -1, 666 | "foods": [ 667 | { 668 | "name": "蜜瓜圣女萝莉杯", 669 | "price": 6, 670 | "oldPrice": "", 671 | "description": "", 672 | "sellCount": 1, 673 | "rating": "", 674 | "info": "", 675 | "ratings": [], 676 | "icon": "http://fuss10.elemecdn.com/b/5f/b3b04c259d5ec9fa52e1856ee50dajpeg.jpeg?imageView2/1/w/114/h/114", 677 | "image": "http://fuss10.elemecdn.com/b/5f/b3b04c259d5ec9fa52e1856ee50dajpeg.jpeg?imageView2/1/w/750/h/750" 678 | }, 679 | { 680 | "name": "加多宝", 681 | "price": 6, 682 | "oldPrice": "", 683 | "description": "", 684 | "sellCount": 7, 685 | "rating": 100, 686 | "info": "", 687 | "ratings": [ 688 | { 689 | "username": "3******c", 690 | "rateTime": 1469281964000, 691 | "rateType": 0, 692 | "text": "", 693 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 694 | }, 695 | { 696 | "username": "2******3", 697 | "rateTime": 1469271264000, 698 | "rateType": 0, 699 | "text": "", 700 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 701 | }, 702 | { 703 | "username": "3******b", 704 | "rateTime": 1469261964000, 705 | "rateType": 0, 706 | "text": "", 707 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 708 | } 709 | ], 710 | "icon": "http://fuss10.elemecdn.com/b/9f/5e6c99c593cf65229225c5661bcdejpeg.jpeg?imageView2/1/w/114/h/114", 711 | "image": "http://fuss10.elemecdn.com/b/9f/5e6c99c593cf65229225c5661bcdejpeg.jpeg?imageView2/1/w/750/h/750" 712 | }, 713 | { 714 | "name": "VC无限橙果汁", 715 | "price": 8, 716 | "oldPrice": 10, 717 | "description": "", 718 | "sellCount": 15, 719 | "rating": 100, 720 | "info": "", 721 | "ratings": [ 722 | { 723 | "username": "3******c", 724 | "rateTime": 1469281964000, 725 | "rateType": 0, 726 | "text": "还可以", 727 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 728 | }, 729 | { 730 | "username": "2******3", 731 | "rateTime": 1469271264000, 732 | "rateType": 0, 733 | "text": "", 734 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 735 | } 736 | ], 737 | "icon": "http://fuss10.elemecdn.com/e/c6/f348e811772016ae24e968238bcbfjpeg.jpeg?imageView2/1/w/114/h/114", 738 | "image": "http://fuss10.elemecdn.com/e/c6/f348e811772016ae24e968238bcbfjpeg.jpeg?imageView2/1/w/750/h/750" 739 | } 740 | ] 741 | }, 742 | { 743 | "name": "小吃主食", 744 | "type": -1, 745 | "foods": [ 746 | { 747 | "name": "扁豆焖面", 748 | "price": 14, 749 | "oldPrice": "", 750 | "description": "", 751 | "sellCount": 188, 752 | "rating": 96, 753 | "info": "", 754 | "ratings": [ 755 | { 756 | "username": "3******c", 757 | "rateTime": 1469281964000, 758 | "rateType": 0, 759 | "text": "", 760 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 761 | }, 762 | { 763 | "username": "2******3", 764 | "rateTime": 1469271264000, 765 | "rateType": 0, 766 | "text": "", 767 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 768 | }, 769 | { 770 | "username": "3******b", 771 | "rateTime": 1469261964000, 772 | "rateType": 1, 773 | "text": "", 774 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 775 | } 776 | ], 777 | "icon": "http://fuss10.elemecdn.com/c/6b/29e3d29b0db63d36f7c500bca31d8jpeg.jpeg?imageView2/1/w/114/h/114", 778 | "image": "http://fuss10.elemecdn.com/c/6b/29e3d29b0db63d36f7c500bca31d8jpeg.jpeg?imageView2/1/w/750/h/750" 779 | }, 780 | { 781 | "name": "葱花饼", 782 | "price": 10, 783 | "oldPrice": "", 784 | "description": "", 785 | "sellCount": 124, 786 | "rating": 85, 787 | "info": "", 788 | "ratings": [ 789 | { 790 | "username": "3******c", 791 | "rateTime": 1469281964000, 792 | "rateType": 1, 793 | "text": "没啥味道", 794 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 795 | }, 796 | { 797 | "username": "2******3", 798 | "rateTime": 1469271264000, 799 | "rateType": 1, 800 | "text": "很一般啊", 801 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 802 | }, 803 | { 804 | "username": "3******b", 805 | "rateTime": 1469261964000, 806 | "rateType": 0, 807 | "text": "", 808 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 809 | } 810 | ], 811 | "icon": "http://fuss10.elemecdn.com/f/28/a51e7b18751bcdf871648a23fd3b4jpeg.jpeg?imageView2/1/w/114/h/114", 812 | "image": "http://fuss10.elemecdn.com/f/28/a51e7b18751bcdf871648a23fd3b4jpeg.jpeg?imageView2/1/w/750/h/750" 813 | }, 814 | { 815 | "name": "牛肉馅饼", 816 | "price": 14, 817 | "oldPrice": "", 818 | "description": "", 819 | "sellCount": 114, 820 | "rating": 91, 821 | "info": "", 822 | "ratings": [ 823 | { 824 | "username": "3******c", 825 | "rateTime": 1469281964000, 826 | "rateType": 1, 827 | "text": "难吃不推荐", 828 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 829 | }, 830 | { 831 | "username": "2******3", 832 | "rateTime": 1469271264000, 833 | "rateType": 0, 834 | "text": "", 835 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 836 | }, 837 | { 838 | "username": "3******b", 839 | "rateTime": 1469261964000, 840 | "rateType": 0, 841 | "text": "", 842 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 843 | } 844 | ], 845 | "icon": "http://fuss10.elemecdn.com/d/b9/bcab0e8ad97758e65ae5a62b2664ejpeg.jpeg?imageView2/1/w/114/h/114", 846 | "image": "http://fuss10.elemecdn.com/d/b9/bcab0e8ad97758e65ae5a62b2664ejpeg.jpeg?imageView2/1/w/750/h/750" 847 | }, 848 | { 849 | "name": "招牌猪肉白菜锅贴/10个", 850 | "price": 17, 851 | "oldPrice": "", 852 | "description": "", 853 | "sellCount": 101, 854 | "rating": 78, 855 | "info": "", 856 | "ratings": [ 857 | { 858 | "username": "3******c", 859 | "rateTime": 1469281964000, 860 | "rateType": 1, 861 | "text": "不脆,不好吃", 862 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 863 | }, 864 | { 865 | "username": "2******3", 866 | "rateTime": 1469271264000, 867 | "rateType": 0, 868 | "text": "", 869 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 870 | }, 871 | { 872 | "username": "3******b", 873 | "rateTime": 1469261964000, 874 | "rateType": 0, 875 | "text": "", 876 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 877 | } 878 | ], 879 | "icon": "http://fuss10.elemecdn.com/7/72/9a580c1462ca1e4d3c07e112bc035jpeg.jpeg?imageView2/1/w/114/h/114", 880 | "image": "http://fuss10.elemecdn.com/7/72/9a580c1462ca1e4d3c07e112bc035jpeg.jpeg?imageView2/1/w/750/h/750" 881 | }, 882 | { 883 | "name": "糊塌子", 884 | "price": 10, 885 | "oldPrice": "", 886 | "description": "", 887 | "sellCount": 80, 888 | "rating": 93, 889 | "info": "", 890 | "ratings": [ 891 | { 892 | "username": "3******c", 893 | "rateTime": 1469281964000, 894 | "rateType": 0, 895 | "text": "", 896 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 897 | }, 898 | { 899 | "username": "2******3", 900 | "rateTime": 1469271264000, 901 | "rateType": 0, 902 | "text": "", 903 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 904 | }, 905 | { 906 | "username": "3******b", 907 | "rateTime": 1469261964000, 908 | "rateType": 0, 909 | "text": "", 910 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 911 | } 912 | ], 913 | "icon": "http://fuss10.elemecdn.com/0/05/097a2a59fd2a2292d08067e16380cjpeg.jpeg?imageView2/1/w/114/h/114", 914 | "image": "http://fuss10.elemecdn.com/0/05/097a2a59fd2a2292d08067e16380cjpeg.jpeg?imageView2/1/w/750/h/750" 915 | } 916 | ] 917 | }, 918 | { 919 | "name": "特色粥品", 920 | "type": -1, 921 | "foods": [ 922 | { 923 | "name": "皮蛋瘦肉粥", 924 | "price": 10, 925 | "oldPrice": "", 926 | "description": "咸粥", 927 | "sellCount": 229, 928 | "rating": 100, 929 | "ratings": [ 930 | { 931 | "username": "3******c", 932 | "rateTime": 1469281964000, 933 | "rateType": 0, 934 | "text": "很喜欢的粥", 935 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 936 | }, 937 | { 938 | "username": "2******3", 939 | "rateTime": 1469271264000, 940 | "rateType": 0, 941 | "text": "", 942 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 943 | }, 944 | { 945 | "username": "3******b", 946 | "rateTime": 1469261964000, 947 | "rateType": 1, 948 | "text": "", 949 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 950 | } 951 | ], 952 | "icon": "http://fuss10.elemecdn.com/c/cd/c12745ed8a5171e13b427dbc39401jpeg.jpeg?imageView2/1/w/114/h/114", 953 | "image": "http://fuss10.elemecdn.com/c/cd/c12745ed8a5171e13b427dbc39401jpeg.jpeg?imageView2/1/w/750/h/750" 954 | }, 955 | { 956 | "name": "南瓜粥", 957 | "price": 9, 958 | "oldPrice": "", 959 | "description": "甜粥", 960 | "sellCount": 91, 961 | "rating": 100, 962 | "info": "", 963 | "ratings": [ 964 | { 965 | "username": "3******c", 966 | "rateTime": 1469281964000, 967 | "rateType": 0, 968 | "text": "", 969 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 970 | }, 971 | { 972 | "username": "2******3", 973 | "rateTime": 1469271264000, 974 | "rateType": 0, 975 | "text": "", 976 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 977 | }, 978 | { 979 | "username": "3******b", 980 | "rateTime": 1469261964000, 981 | "rateType": 0, 982 | "text": "", 983 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 984 | } 985 | ], 986 | "icon": "http://fuss10.elemecdn.com/8/a6/453f65f16b1391942af11511b7a90jpeg.jpeg?imageView2/1/w/114/h/114", 987 | "image": "http://fuss10.elemecdn.com/8/a6/453f65f16b1391942af11511b7a90jpeg.jpeg?imageView2/1/w/750/h/750" 988 | }, 989 | { 990 | "name": "红豆薏米美肤粥", 991 | "price": 12, 992 | "oldPrice": "", 993 | "description": "甜粥", 994 | "sellCount": 86, 995 | "rating": 100, 996 | "info": "", 997 | "ratings": [ 998 | { 999 | "username": "3******c", 1000 | "rateTime": 1469281964000, 1001 | "rateType": 0, 1002 | "text": "", 1003 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1004 | }, 1005 | { 1006 | "username": "2******3", 1007 | "rateTime": 1469271264000, 1008 | "rateType": 0, 1009 | "text": "", 1010 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1011 | }, 1012 | { 1013 | "username": "3******b", 1014 | "rateTime": 1469261964000, 1015 | "rateType": 0, 1016 | "text": "", 1017 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1018 | } 1019 | ], 1020 | "icon": "http://fuss10.elemecdn.com/d/22/260bd78ee6ac6051136c5447fe307jpeg.jpeg?imageView2/1/w/114/h/114", 1021 | "image": "http://fuss10.elemecdn.com/d/22/260bd78ee6ac6051136c5447fe307jpeg.jpeg?imageView2/1/w/750/h/750" 1022 | }, 1023 | { 1024 | "name": "红枣山药糙米粥", 1025 | "price": 10, 1026 | "oldPrice": "", 1027 | "description": "", 1028 | "sellCount": 81, 1029 | "rating": 91, 1030 | "info": "", 1031 | "ratings": [ 1032 | { 1033 | "username": "3******c", 1034 | "rateTime": 1469281964000, 1035 | "rateType": 0, 1036 | "text": "", 1037 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1038 | }, 1039 | { 1040 | "username": "2******3", 1041 | "rateTime": 1469271264000, 1042 | "rateType": 0, 1043 | "text": "", 1044 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1045 | }, 1046 | { 1047 | "username": "3******b", 1048 | "rateTime": 1469261964000, 1049 | "rateType": 0, 1050 | "text": "", 1051 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1052 | } 1053 | ], 1054 | "icon": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/114/h/114", 1055 | "image": "http://fuss10.elemecdn.com/9/b5/469d8854f9a3a03797933fd01398bjpeg.jpeg?imageView2/1/w/750/h/750" 1056 | }, 1057 | { 1058 | "name": "鲜蔬菌菇粥", 1059 | "price": 11, 1060 | "oldPrice": "", 1061 | "description": "咸粥", 1062 | "sellCount": 56, 1063 | "rating": 100, 1064 | "info": "", 1065 | "ratings": [ 1066 | { 1067 | "username": "3******c", 1068 | "rateTime": 1469281964000, 1069 | "rateType": 0, 1070 | "text": "", 1071 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1072 | }, 1073 | { 1074 | "username": "2******3", 1075 | "rateTime": 1469271264000, 1076 | "rateType": 0, 1077 | "text": "" 1078 | }, 1079 | { 1080 | "username": "3******b", 1081 | "rateTime": 1469261964000, 1082 | "rateType": 0, 1083 | "text": "", 1084 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1085 | } 1086 | ], 1087 | "icon": "http://fuss10.elemecdn.com/e/a3/5317c68dd618929b6ac05804e429ajpeg.jpeg?imageView2/1/w/114/h/114", 1088 | "image": "http://fuss10.elemecdn.com/e/a3/5317c68dd618929b6ac05804e429ajpeg.jpeg?imageView2/1/w/750/h/750" 1089 | }, 1090 | { 1091 | "name": "田园蔬菜粥", 1092 | "price": 10, 1093 | "oldPrice": "", 1094 | "description": "咸粥", 1095 | "sellCount": 33, 1096 | "rating": 100, 1097 | "info": "", 1098 | "ratings": [ 1099 | { 1100 | "username": "3******c", 1101 | "rateTime": 1469281964000, 1102 | "rateType": 0, 1103 | "text": "", 1104 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1105 | }, 1106 | { 1107 | "username": "2******3", 1108 | "rateTime": 1469271264000, 1109 | "rateType": 0, 1110 | "text": "", 1111 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1112 | }, 1113 | { 1114 | "username": "3******b", 1115 | "rateTime": 1469261964000, 1116 | "rateType": 0, 1117 | "text": "", 1118 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png" 1119 | } 1120 | ], 1121 | "icon": "http://fuss10.elemecdn.com/a/94/7371083792c19df00e546b29e344cjpeg.jpeg?imageView2/1/w/114/h/114", 1122 | "image": "http://fuss10.elemecdn.com/a/94/7371083792c19df00e546b29e344cjpeg.jpeg?imageView2/1/w/750/h/750" 1123 | } 1124 | ] 1125 | } 1126 | ], 1127 | "ratings": [ 1128 | { 1129 | "username": "3******c", 1130 | "rateTime": 1469281964000, 1131 | "deliveryTime": 30, 1132 | "score": 5, 1133 | "rateType": 0, 1134 | "text": "不错,粥很好喝,我经常吃这一家,非常赞,以后也会常来吃,强烈推荐.", 1135 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1136 | "recommend": [ 1137 | "南瓜粥", 1138 | "皮蛋瘦肉粥", 1139 | "扁豆焖面", 1140 | "娃娃菜炖豆腐", 1141 | "牛肉馅饼" 1142 | ] 1143 | }, 1144 | { 1145 | "username": "2******3", 1146 | "rateTime": 1469271264000, 1147 | "deliveryTime": "", 1148 | "score": 4, 1149 | "rateType": 0, 1150 | "deliveryTime": "", 1151 | "text": "服务态度不错", 1152 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1153 | "recommend": [ 1154 | "扁豆焖面" 1155 | ] 1156 | }, 1157 | { 1158 | "username": "3******b", 1159 | "rateTime": 1469261964000, 1160 | "score": 3, 1161 | "rateType": 1, 1162 | "text": "", 1163 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1164 | "recommend": [] 1165 | }, 1166 | { 1167 | "username": "1******c", 1168 | "rateTime": 1469261864000, 1169 | "deliveryTime": 20, 1170 | "score": 5, 1171 | "rateType": 0, 1172 | "text": "良心店铺", 1173 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1174 | "recommend": [] 1175 | }, 1176 | { 1177 | "username": "2******d", 1178 | "rateTime": 1469251264000, 1179 | "deliveryTime": 10, 1180 | "score": 4, 1181 | "rateType": 0, 1182 | "text": "", 1183 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1184 | "recommend": [] 1185 | }, 1186 | { 1187 | "username": "9******0", 1188 | "rateTime": 1469241964000, 1189 | "deliveryTime": 70, 1190 | "score": 1, 1191 | "rateType": 1, 1192 | "text": "送货速度蜗牛一样", 1193 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1194 | "recommend": [] 1195 | }, 1196 | { 1197 | "username": "d******c", 1198 | "rateTime": 1469231964000, 1199 | "deliveryTime": 30, 1200 | "score": 5, 1201 | "rateType": 0, 1202 | "text": "很喜欢的粥店", 1203 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1204 | "recommend": [] 1205 | }, 1206 | { 1207 | "username": "2******3", 1208 | "rateTime": 1469221264000, 1209 | "deliveryTime": "", 1210 | "score": 4, 1211 | "rateType": 0, 1212 | "text": "量给的还可以", 1213 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1214 | "recommend": [] 1215 | }, 1216 | { 1217 | "username": "3******8", 1218 | "rateTime": 1469211964000, 1219 | "deliveryTime": "", 1220 | "score": 3, 1221 | "rateType": 1, 1222 | "text": "", 1223 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1224 | "recommend": [] 1225 | }, 1226 | { 1227 | "username": "a******a", 1228 | "rateTime": 1469201964000, 1229 | "deliveryTime": "", 1230 | "score": 4, 1231 | "rateType": 0, 1232 | "text": "孩子喜欢吃这家", 1233 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1234 | "recommend": [ 1235 | "南瓜粥" 1236 | ] 1237 | }, 1238 | { 1239 | "username": "3******3", 1240 | "rateTime": 1469191264000, 1241 | "deliveryTime": "", 1242 | "score": 4, 1243 | "rateType": 0, 1244 | "text": "粥挺好吃的", 1245 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1246 | "recommend": [] 1247 | }, 1248 | { 1249 | "username": "t******b", 1250 | "rateTime": 1469181964000, 1251 | "deliveryTime": "", 1252 | "score": 3, 1253 | "rateType": 1, 1254 | "text": "", 1255 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1256 | "recommend": [] 1257 | }, 1258 | { 1259 | "username": "f******c", 1260 | "rateTime": 1469171964000, 1261 | "deliveryTime": 15, 1262 | "score": 5, 1263 | "rateType": 0, 1264 | "text": "送货速度很快", 1265 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1266 | "recommend": [] 1267 | }, 1268 | { 1269 | "username": "k******3", 1270 | "rateTime": 1469161264000, 1271 | "deliveryTime": "", 1272 | "score": 4, 1273 | "rateType": 0, 1274 | "text": "", 1275 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1276 | "recommend": [] 1277 | }, 1278 | { 1279 | "username": "u******b", 1280 | "rateTime": 1469151964000, 1281 | "deliveryTime": "", 1282 | "score": 4, 1283 | "rateType": 0, 1284 | "text": "下雨天给快递小哥点个赞", 1285 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1286 | "recommend": [] 1287 | }, 1288 | { 1289 | "username": "s******c", 1290 | "rateTime": 1469141964000, 1291 | "deliveryTime": "", 1292 | "score": 4, 1293 | "rateType": 0, 1294 | "text": "好", 1295 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1296 | "recommend": [] 1297 | }, 1298 | { 1299 | "username": "z******3", 1300 | "rateTime": 1469131264000, 1301 | "deliveryTime": "", 1302 | "score": 5, 1303 | "rateType": 0, 1304 | "text": "吃了还想再吃", 1305 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1306 | "recommend": [] 1307 | }, 1308 | { 1309 | "username": "n******b", 1310 | "rateTime": 1469121964000, 1311 | "deliveryTime": "", 1312 | "score": 3, 1313 | "rateType": 1, 1314 | "text": "发票开的不对", 1315 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1316 | "recommend": [] 1317 | }, 1318 | { 1319 | "username": "m******c", 1320 | "rateTime": 1469111964000, 1321 | "deliveryTime": 30, 1322 | "score": 5, 1323 | "rateType": 0, 1324 | "text": "好吃", 1325 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1326 | "recommend": [] 1327 | }, 1328 | { 1329 | "username": "l******3", 1330 | "rateTime": 1469101264000, 1331 | "deliveryTime": 40, 1332 | "score": 5, 1333 | "rateType": 0, 1334 | "text": "还不错吧", 1335 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1336 | "recommend": [] 1337 | }, 1338 | { 1339 | "username": "3******o", 1340 | "rateTime": 1469091964000, 1341 | "deliveryTime": "", 1342 | "score": 2, 1343 | "rateType": 1, 1344 | "text": "", 1345 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1346 | "recommend": [] 1347 | }, 1348 | { 1349 | "username": "3******p", 1350 | "rateTime": 1469081964000, 1351 | "deliveryTime": "", 1352 | "score": 4, 1353 | "rateType": 0, 1354 | "text": "很喜欢的粥", 1355 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1356 | "recommend": [] 1357 | }, 1358 | { 1359 | "username": "o******k", 1360 | "rateTime": 1469071264000, 1361 | "deliveryTime": "", 1362 | "score": 5, 1363 | "rateType": 0, 1364 | "text": "", 1365 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1366 | "recommend": [] 1367 | }, 1368 | { 1369 | "username": "k******b", 1370 | "rateTime": 1469061964000, 1371 | "deliveryTime": "", 1372 | "score": 4, 1373 | "rateType": 0, 1374 | "text": "", 1375 | "avatar": "http://static.galileo.xiaojukeji.com/static/tms/default_header.png", 1376 | "recommend": [] 1377 | } 1378 | ] 1379 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | vue-app 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-app", 3 | "version": "1.0.0", 4 | "description": "sell", 5 | "author": "xiaqing ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js", 10 | "lint": "eslint --ext .js,.vue src" 11 | }, 12 | "dependencies": { 13 | "better-scroll": "^0.1.15", 14 | "vue": "^2.2.1", 15 | "vue-resource": "^1.2.1", 16 | "vue-router": "^2.2.0" 17 | }, 18 | "devDependencies": { 19 | "autoprefixer": "^6.7.2", 20 | "babel-core": "^6.22.1", 21 | "babel-eslint": "^7.1.1", 22 | "babel-loader": "^6.2.10", 23 | "babel-plugin-transform-runtime": "^6.22.0", 24 | "babel-preset-latest": "^6.22.0", 25 | "babel-preset-stage-2": "^6.22.0", 26 | "babel-register": "^6.22.0", 27 | "chalk": "^1.1.3", 28 | "connect-history-api-fallback": "^1.3.0", 29 | "copy-webpack-plugin": "^4.0.1", 30 | "css-loader": "^0.26.1", 31 | "eslint": "^3.14.1", 32 | "eslint-config-standard": "^6.2.1", 33 | "eslint-friendly-formatter": "^2.0.7", 34 | "eslint-loader": "^1.6.1", 35 | "eslint-plugin-html": "^2.0.0", 36 | "eslint-plugin-promise": "^3.4.0", 37 | "eslint-plugin-standard": "^2.0.1", 38 | "eventsource-polyfill": "^0.9.6", 39 | "express": "^4.14.1", 40 | "extract-text-webpack-plugin": "^2.0.0", 41 | "file-loader": "^0.10.0", 42 | "friendly-errors-webpack-plugin": "^1.1.3", 43 | "function-bind": "^1.1.0", 44 | "html-webpack-plugin": "^2.28.0", 45 | "http-proxy-middleware": "^0.17.3", 46 | "opn": "^4.0.2", 47 | "optimize-css-assets-webpack-plugin": "^1.3.0", 48 | "ora": "^1.1.0", 49 | "rimraf": "^2.6.0", 50 | "semver": "^5.3.0", 51 | "stylus": "0.52.4", 52 | "stylus-loader": "^2.5.0", 53 | "url-loader": "^0.5.7", 54 | "vue-bus": "^0.3.0", 55 | "vue-loader": "^11.0.0", 56 | "vue-style-loader": "^2.0.0", 57 | "vue-template-compiler": "^2.2.1", 58 | "webpack": "^2.2.1", 59 | "webpack-bundle-analyzer": "^2.2.1", 60 | "webpack-dev-middleware": "^1.10.0", 61 | "webpack-hot-middleware": "^2.16.1", 62 | "webpack-merge": "^2.6.1" 63 | }, 64 | "engines": { 65 | "node": ">= 4.0.0", 66 | "npm": ">= 3.0.0" 67 | }, 68 | "browserlist": [ 69 | "> 1%", 70 | "last 2 versions", 71 | "not ie <= 8" 72 | ] 73 | } 74 | -------------------------------------------------------------------------------- /prod.server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var config = require('./config/index'); 3 | 4 | var port = process.env.PORT || config.build.port; 5 | 6 | var app = express(); 7 | 8 | var router = express.Router(); 9 | 10 | router.get('/', function (req, res ,next) { 11 | req.url = 'index.html'; 12 | next(); 13 | }) 14 | 15 | app.use(router); 16 | 17 | var appData = require('./data.json') 18 | var seller = appData.seller; 19 | var goods = appData.goods; 20 | var ratings = appData.ratings; 21 | 22 | //**********加载mock数据********** 23 | var apiRoutes = express.Router(); 24 | 25 | apiRoutes.get('/seller', function (req,res) { 26 | res.json({ 27 | errno: 0, 28 | data: seller 29 | }); 30 | }); 31 | apiRoutes.get('/goods', function (req,res) { 32 | res.json({ 33 | errno: 0, 34 | data: goods 35 | }); 36 | }); 37 | apiRoutes.get('/ratings', function (req,res) { 38 | res.json({ 39 | errno: 0, 40 | data: ratings 41 | }); 42 | }); 43 | 44 | app.use('/api', apiRoutes); 45 | 46 | app.use(express.static('./dist')); 47 | 48 | module.exports = app.listen(port, function (err) { 49 | if (err) { 50 | console.log(err); 51 | return 52 | } 53 | console.log('Listening at http://localhost:' + port + '\n') 54 | }); 55 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 58 | 59 | 79 | -------------------------------------------------------------------------------- /src/common/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/common/fonts/icomoon.eot -------------------------------------------------------------------------------- /src/common/fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/common/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/common/fonts/icomoon.ttf -------------------------------------------------------------------------------- /src/common/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/common/fonts/icomoon.woff -------------------------------------------------------------------------------- /src/common/js/date.js: -------------------------------------------------------------------------------- 1 | export function formatDate(date, fmt) { 2 | if (/(y+)/.test(fmt)) { 3 | fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); 4 | } 5 | let o = { 6 | 'M+': date.getMonth() + 1, 7 | 'd+': date.getDate(), 8 | 'h+': date.getHours(), 9 | 'm+': date.getMinutes(), 10 | 's+': date.getSeconds() 11 | }; 12 | for (let k in o) { 13 | if (new RegExp(`(${k})`).test(fmt)) { 14 | let str = o[k] + ''; 15 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));//如果传入的格式是1位,则返回原始值,否则补零。 16 | } 17 | } 18 | return fmt; 19 | }; 20 | 21 | function padLeftZero(str) { 22 | return ('00' + str).substr(str.length); 23 | } 24 | -------------------------------------------------------------------------------- /src/common/js/store.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 存储数据 3 | * id为url参数,key是需要存储数据的键名,val为存储的值 4 | * */ 5 | export function saveToLocal(id, key, value) { 6 | //定义商家数据为_seller_ 7 | let seller = window.localStorage.__seller__; 8 | if (!seller) { 9 | seller = {}; 10 | seller[id] = {}; 11 | } else { 12 | seller = JSON.parse(seller); 13 | if (!seller[id]) { 14 | seller[id] = {}; 15 | } 16 | } 17 | seller[id][key] = value; 18 | window.localStorage.__seller__ = JSON.stringify(seller); 19 | }; 20 | 21 | /* 22 | * 读取localStorage数据 23 | * def为默认读取数据 24 | * */ 25 | export function loadFromLocal(id, key, def) { 26 | let seller = window.localStorage.__seller__; 27 | if (!seller) { 28 | return def; 29 | } 30 | seller = JSON.parse(seller)[id]; 31 | if (!seller) { 32 | return def; 33 | } 34 | let ret = seller[key]; 35 | return ret || def; 36 | }; 37 | -------------------------------------------------------------------------------- /src/common/js/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 解析url参数 3 | * @example ?id=12345&a=b 4 | * @return Object {id:12345,a:b} 5 | */ 6 | export function urlParse() { 7 | let url = window.location.search; 8 | let obj = {}; 9 | let reg = /[?&][^?&]+=[^?&]+/g; 10 | let arr = url.match(reg); 11 | // ['?id=12345', '&a=b'] 12 | if (arr) { 13 | arr.forEach((item) => { 14 | let tempArr = item.substring(1).split('='); 15 | let key = decodeURIComponent(tempArr[0]); 16 | let val = decodeURIComponent(tempArr[1]); 17 | obj[key] = val; 18 | }); 19 | } 20 | return obj; 21 | }; 22 | -------------------------------------------------------------------------------- /src/common/stylus/base.styl: -------------------------------------------------------------------------------- 1 | body, html 2 | line-height: 1 3 | font-weight: 200 4 | font-family: 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', arial, sans-serif 5 | 6 | .clearfix 7 | display: inline-block 8 | &:after 9 | display: block 10 | content: "." 11 | height: 0 12 | line-height: 0 13 | clear: both 14 | visibility: hidden 15 | 16 | @media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5) 17 | .border-1px 18 | &::after 19 | -webkit-transform: scaleY(0.7) 20 | transform: scaleY(0.7) 21 | 22 | @media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2) 23 | .border-1px 24 | &::after 25 | -webkit-transform: scaleY(0.5) 26 | transform: scaleY(0.5) 27 | -------------------------------------------------------------------------------- /src/common/stylus/icon.styl: -------------------------------------------------------------------------------- 1 | @font-face 2 | font-family: 'icomoon' 3 | src: url('../fonts/icomoon.eot?hrkgfy') 4 | src: url('../fonts/icomoon.eot?hrkgfy#iefix') format('embedded-opentype'), 5 | url('../fonts/icomoon.ttf?hrkgfy') format('truetype'), 6 | url('../fonts/icomoon.woff?hrkgfy') format('woff'), 7 | url('../fonts/icomoon.svg?hrkgfy#icomoon') format('svg') 8 | font-weight: normal 9 | font-style: normal 10 | 11 | 12 | [class^="icon-"], [class*=" icon-"] 13 | /* use !important to prevent issues with browser extensions that change fonts */ 14 | font-family: 'icomoon' !important 15 | speak: none 16 | font-style: normal 17 | font-weight: normal 18 | font-variant: normal 19 | text-transform: none 20 | line-height: 1; 21 | 22 | /* Better Font Rendering =========== */ 23 | -webkit-font-smoothing: antialiased 24 | -moz-osx-font-smoothing: grayscale 25 | 26 | 27 | .icon-add_circle:before 28 | content: "\e900"; 29 | 30 | .icon-arrow_lift:before 31 | content: "\e901"; 32 | 33 | .icon-check_circle:before 34 | content: "\e902"; 35 | 36 | .icon-close:before 37 | content: "\e903"; 38 | 39 | .icon-favorite:before 40 | content: "\e904"; 41 | 42 | .icon-keyboard_arrow_right:before 43 | content: "\e905"; 44 | 45 | .icon-remove_circle_outline:before 46 | content: "\e906"; 47 | 48 | .icon-shopping_cart:before 49 | content: "\e907"; 50 | 51 | .icon-thumb_down:before 52 | content: "\e908"; 53 | 54 | .icon-thumb_up:before 55 | content: "\e909"; 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/common/stylus/index.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src: url("../fonts/icomoon.eot?hrkgfy"); 4 | src: url("../fonts/icomoon.eot?hrkgfy#iefix") format('embedded-opentype'), url("../fonts/icomoon.ttf?hrkgfy") format('truetype'), url("../fonts/icomoon.woff?hrkgfy") format('woff'), url("../fonts/icomoon.svg?hrkgfy#icomoon") format('svg'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | [class^="icon-"], 9 | [class*=" icon-"] { 10 | /* use !important to prevent issues with browser extensions that change fonts */ 11 | font-family: 'icomoon' !important; 12 | speak: none; 13 | font-style: normal; 14 | font-weight: normal; 15 | font-variant: normal; 16 | text-transform: none; 17 | line-height: 1; 18 | /* Better Font Rendering =========== */ 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | } 22 | .icon-add_circle:before { 23 | content: "\e900"; 24 | } 25 | .icon-arrow_lift:before { 26 | content: "\e901"; 27 | } 28 | .icon-check_circle:before { 29 | content: "\e902"; 30 | } 31 | .icon-close:before { 32 | content: "\e903"; 33 | } 34 | .icon-favorite:before { 35 | content: "\e904"; 36 | } 37 | .icon-keyboard_arrow_right:before { 38 | content: "\e905"; 39 | } 40 | .icon-remove_circle_outline:before { 41 | content: "\e906"; 42 | } 43 | .icon-shopping_cart:before { 44 | content: "\e907"; 45 | } 46 | .icon-thumb_down:before { 47 | content: "\e908"; 48 | } 49 | .icon-thumb_up:before { 50 | content: "\e909"; 51 | } 52 | html, 53 | body { 54 | line-height: 1; 55 | font-weight: 200; 56 | font-family: 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', arial, sans-serif; 57 | } 58 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) { 59 | .border-1px::after { 60 | -webkit-transform: scaleY(0.7); 61 | transform: scaleY(0.7); 62 | } 63 | } 64 | @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) { 65 | .border-1px::after { 66 | -webkit-transform: scaleY(0.5); 67 | transform: scaleY(0.5); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/common/stylus/index.styl: -------------------------------------------------------------------------------- 1 | @import './mixin' 2 | @import './icon' 3 | @import './base' -------------------------------------------------------------------------------- /src/common/stylus/mixin.styl: -------------------------------------------------------------------------------- 1 | border-1px($color) 2 | position : relative 3 | &:after 4 | display: block 5 | position: absolute 6 | left: 0 7 | bottom: 0 8 | border-top 1px solid $color 9 | width: 100% 10 | content: '' 11 | 12 | border-none() 13 | &:after 14 | display: none 15 | 16 | bg-image($url) 17 | background-image url($url + "@2x.png") 18 | @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio) 19 | background-image url($url + "@3x.png") 20 | -------------------------------------------------------------------------------- /src/components/cartcontrol/cartcontrol.styl: -------------------------------------------------------------------------------- 1 | .cartcontrol 2 | font-size: 0 3 | .cart-decrease 4 | display: inline-block 5 | padding: 6px 6 | .inner 7 | display: inline-block 8 | line-height: 24px 9 | font-size: 24px 10 | color: rgb(0, 160, 220) 11 | transition: all 0.4s linear 12 | &.v-enter-active, &.v-leave-active 13 | transition: all 0.4s linear 14 | &.v-enter, &.v-leave-active //刚进入和离开后的状态 15 | opacity: 0 16 | transform: translateX(24px) 17 | .inner1 18 | transform: rotate(180deg) 19 | .cart-count 20 | display: inline-block 21 | vertical-align: top 22 | width: 12px 23 | padding-top: 6px 24 | line-height: 24px 25 | text-align: center 26 | font-size: 10px 27 | color: rgb(147, 153, 159) 28 | .cart-add 29 | display: inline-block 30 | padding: 6px 31 | line-height: 24px 32 | font-size: 24px 33 | color: rgb(0, 160, 220) 34 | -------------------------------------------------------------------------------- /src/components/cartcontrol/cartcontrol.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 47 | 48 | 51 | -------------------------------------------------------------------------------- /src/components/food/food.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl" 2 | 3 | .food 4 | position: fixed 5 | left: 0 6 | top: 0 7 | bottom: 48px 8 | z-index: 30 9 | width: 100% 10 | background: #fff 11 | &.move-enter-active, &.move-leave-active 12 | transition: all 0.2s linear 13 | &.move-enter, &.move-leave-active 14 | transform: translate3d(100%, 0, 0) 15 | .image-header 16 | position: relative 17 | width: 100% 18 | height: 0 19 | padding-top: 100% 20 | img 21 | position: absolute 22 | top: 0 23 | left: 0 24 | width: 100% 25 | height: 100% 26 | .back 27 | position: absolute 28 | top: 10px 29 | left: 0 30 | .icon-arrow_lift 31 | display: block 32 | padding: 10px 33 | font-size: 20px 34 | color: #fff 35 | 36 | .content 37 | position: relative 38 | padding: 18px 39 | .title 40 | line-height: 14px 41 | margin-bottom: 8px 42 | font-size: 14px 43 | font-weight: 700 44 | color: rgb(7, 17, 27) 45 | .detail 46 | margin-bottom: 18px 47 | line-height: 10px 48 | height: 10px 49 | font-size: 0 50 | .sell-count, .rating 51 | font-size: 10px 52 | color: rgb(147, 153, 159) 53 | .sell-count 54 | margin-right: 12px 55 | .price 56 | font-weight: 700 57 | line-height: 24px 58 | .now 59 | margin-right: 8px 60 | font-size: 14px 61 | color: rgb(240, 20, 20) 62 | .old 63 | text-decoration: line-through 64 | font-size: 10px 65 | color: rgb(147, 153, 159) 66 | .cartcontrol-wrapper 67 | position: absolute 68 | right: 12px 69 | bottom: 12px 70 | .buy 71 | position: absolute 72 | right: 18px 73 | bottom: 18px 74 | z-index: 10 75 | height: 24px 76 | line-height: 24px 77 | padding: 0 12px 78 | box-sizing: border-box 79 | border-radius: 12px 80 | font-size: 10px 81 | color: #fff 82 | background: rgb(0, 160, 220) 83 | &.fade-enter-active, &.fade-leave-active 84 | transition: all 0.2s 85 | &.fade-enter, &.fade-leave-active 86 | opacity: 0 87 | .info 88 | padding: 18px 89 | .title 90 | line-height: 14px 91 | margin-bottom: 6px 92 | font-size: 14px 93 | color: rgb(7, 17, 27) 94 | .text 95 | line-height: 24px 96 | padding: 0 8px 97 | font-size: 12px 98 | color: rgb(77, 85, 93) 99 | .rating 100 | padding-top: 18px 101 | .title 102 | line-height: 14px 103 | margin-left: 18px 104 | font-size: 14px 105 | color: rgb(7, 17, 27) 106 | .rating-wrapper 107 | padding: 0 18px 108 | height: auto 109 | .rating-item 110 | position: relative 111 | padding: 16px 0 112 | border-1px(rgba(7, 17, 27, 0.1)) 113 | .user 114 | position: absolute 115 | right: 0 116 | top: 16px 117 | line-height: 12px 118 | font-size: 0 119 | .name 120 | display: inline-block 121 | margin-right: 6px 122 | vertical-align: top 123 | font-size: 10px 124 | color: rgb(147, 153, 159) 125 | .avatar 126 | border-radius: 50% 127 | .time 128 | margin-bottom: 6px 129 | line-height: 12px 130 | font-size: 10px 131 | color: rgb(147, 153, 159) 132 | .text 133 | line-height: 16px 134 | font-size: 12px 135 | color: rgb(7, 17, 27) 136 | .icon-thumb_up, .icon-thumb_down 137 | margin-right: 4px 138 | line-height: 16px 139 | font-size: 12px 140 | .icon-thumb_up 141 | color: rgb(0, 160, 220) 142 | .icon-thumb_down 143 | color: rgb(147, 153, 159) 144 | 145 | .no-rating 146 | padding: 16px 0 147 | font-size: 12px 148 | color: rgb(147, 153, 159) 149 | -------------------------------------------------------------------------------- /src/components/food/food.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 154 | 155 | 158 | -------------------------------------------------------------------------------- /src/components/goods/decrease_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/decrease_3@2x.png -------------------------------------------------------------------------------- /src/components/goods/decrease_3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/decrease_3@3x.png -------------------------------------------------------------------------------- /src/components/goods/discount_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/discount_3@2x.png -------------------------------------------------------------------------------- /src/components/goods/discount_3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/discount_3@3x.png -------------------------------------------------------------------------------- /src/components/goods/goods.styl: -------------------------------------------------------------------------------- 1 | @import '../../common/stylus/mixin.styl'; 2 | 3 | .goods 4 | display: flex 5 | position: absolute 6 | top: 174px 7 | bottom: 46px 8 | width: 100% 9 | overflow: hidden 10 | .menu-wrapper 11 | flex: 0 0 80px 12 | width: 80px 13 | background: #f3f5f7 14 | .menu-item 15 | display: table 16 | height: 54px 17 | width: 56px 18 | padding: 0 12px 19 | line-height: 14px 20 | &.current 21 | position: relative 22 | z-index: 10 23 | margin-top: -1px 24 | background: #fff 25 | font-weight: 700 26 | .text 27 | border-none() 28 | .icon 29 | display: inline-block 30 | vertical-align: top 31 | width: 12px 32 | height: 12px 33 | margin-right: 2px 34 | background-size: 12px 12px 35 | background-repeat: no-repeat 36 | &.decrease 37 | bg-image('decrease_3') 38 | &.discount 39 | bg-image('discount_3') 40 | &.guarantee 41 | bg-image('guarantee_3') 42 | &.invoice 43 | bg-image('invoice_3') 44 | &.special 45 | bg-image('special_3') 46 | .text 47 | display: table-cell 48 | width: 56px 49 | vertical-align: middle 50 | border-1px(rgba(7, 17, 27, 0.1)) 51 | font-size: 12px 52 | .foods-wrapper 53 | flex: 1 54 | .title 55 | padding-left: 14px 56 | height: 26px 57 | line-height: 26px 58 | border-left: 2px solid #d9dde1 59 | font-size: 12px 60 | color: rgb(147, 153, 159) 61 | background: #f3f5f7 62 | .food-item 63 | display: flex 64 | margin: 18px 65 | padding-bottom: 18px 66 | border-1px(rgba(7, 17, 27, 0.1)) 67 | &:last-child 68 | border-none() 69 | margin-bottom: 0 70 | .icon 71 | flex: 0 0 57px 72 | margin-right: 10px 73 | .content 74 | flex: 1 75 | .name 76 | margin: 2px 0 8px 0 77 | height: 14px 78 | line-height: 14px 79 | font-size: 14px 80 | color: rgb(7, 17, 27) 81 | .desc, .extra 82 | line-height: 10px 83 | font-size: 10px 84 | color: rgb(147, 153, 159) 85 | .desc 86 | line-height: 12px 87 | margin-bottom: 8px 88 | .extra 89 | .count 90 | margin-right: 12px 91 | .price 92 | font-weight: 700 93 | line-height: 24px 94 | vertical-align: middle 95 | .now 96 | margin-right: 8px 97 | font-size: 14px 98 | color: rgb(240, 20, 20) 99 | .old 100 | text-decoration: line-through 101 | font-size: 10px 102 | color: rgb(147, 153, 159) 103 | .cartcontrol-wrapper 104 | position: absolute 105 | right: 0 106 | bottom: 12px 107 | -------------------------------------------------------------------------------- /src/components/goods/goods.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 174 | 175 | 178 | -------------------------------------------------------------------------------- /src/components/goods/guarantee_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/guarantee_3@2x.png -------------------------------------------------------------------------------- /src/components/goods/guarantee_3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/guarantee_3@3x.png -------------------------------------------------------------------------------- /src/components/goods/invoice_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/invoice_3@2x.png -------------------------------------------------------------------------------- /src/components/goods/invoice_3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/invoice_3@3x.png -------------------------------------------------------------------------------- /src/components/goods/special_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/special_3@2x.png -------------------------------------------------------------------------------- /src/components/goods/special_3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/goods/special_3@3x.png -------------------------------------------------------------------------------- /src/components/header/brand@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/brand@2x.png -------------------------------------------------------------------------------- /src/components/header/brand@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/brand@3x.png -------------------------------------------------------------------------------- /src/components/header/bulletin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/bulletin@2x.png -------------------------------------------------------------------------------- /src/components/header/bulletin@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/bulletin@3x.png -------------------------------------------------------------------------------- /src/components/header/decrease_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/decrease_1@2x.png -------------------------------------------------------------------------------- /src/components/header/decrease_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/decrease_1@3x.png -------------------------------------------------------------------------------- /src/components/header/decrease_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/decrease_2@2x.png -------------------------------------------------------------------------------- /src/components/header/decrease_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/decrease_2@3x.png -------------------------------------------------------------------------------- /src/components/header/discount_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/discount_1@2x.png -------------------------------------------------------------------------------- /src/components/header/discount_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/discount_1@3x.png -------------------------------------------------------------------------------- /src/components/header/discount_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/discount_2@2x.png -------------------------------------------------------------------------------- /src/components/header/discount_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/discount_2@3x.png -------------------------------------------------------------------------------- /src/components/header/guarantee_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/guarantee_1@2x.png -------------------------------------------------------------------------------- /src/components/header/guarantee_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/guarantee_1@3x.png -------------------------------------------------------------------------------- /src/components/header/guarantee_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/guarantee_2@2x.png -------------------------------------------------------------------------------- /src/components/header/guarantee_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/guarantee_2@3x.png -------------------------------------------------------------------------------- /src/components/header/header.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl"; 2 | 3 | .header 4 | position: relative 5 | background: rgba(7,17,27,0.5) 6 | color: #fff 7 | .content-wrapper 8 | position: relative 9 | padding: 24px 12px 18px 24px 10 | font-size: 0 11 | .avatar 12 | display: inline-block 13 | vertical-align: top 14 | img 15 | border-radius: 2px 16 | .content 17 | display: inline-block 18 | margin-left: 16px 19 | .title 20 | padding: 2px 0 8px 0 21 | .brand 22 | display: inline-block 23 | width: 30px 24 | height: 18px 25 | vertical-align: top 26 | bg-image('brand') 27 | background-size: 30px 18px 28 | background-repeat: no-repeat 29 | .name 30 | margin-left: 6px 31 | font-size: 16px 32 | line-height: 18px 33 | font-weight: bold 34 | .description 35 | margin-bottom: 10px 36 | line-height: 12px 37 | font-size: 12px 38 | .support 39 | .icon 40 | display: inline-block 41 | width: 12px 42 | height: 12px 43 | margin-right: 4px 44 | vertical-align: top 45 | background-size: 12px 12px 46 | background-repeat: no-repeat 47 | &.decrease 48 | bg-image('decrease_1') 49 | &.discount 50 | bg-image('discount_1') 51 | &.guarantee 52 | bg-image('guarantee_1') 53 | &.invoice 54 | bg-image('invoice_1') 55 | &.special 56 | bg-image('special_1') 57 | .text 58 | line-height: 12px 59 | font-size: 10px 60 | .support-count 61 | position: absolute 62 | right: 12px 63 | bottom: 14px 64 | padding: 0 8px 65 | height: 24px 66 | line-height: 24px 67 | border-radius: 14px 68 | background: rgba(0,0,0,0.2) 69 | text-align: center 70 | .count 71 | vertical-align: top 72 | font-size: 10px 73 | .icon-keyboard_arrow_right 74 | margin-left: 2px 75 | line-height: 24px 76 | font-size: 10px 77 | .bulletin-wrapper 78 | position: relative 79 | height: 28px 80 | line-height: 28px 81 | padding: 0 22px 0 12px 82 | white-space: nowrap 83 | overflow: hidden 84 | text-overflow: ellipsis 85 | background: rgba(7,17,27,0.2) 86 | .bulletin-title 87 | display: inline-block 88 | vertical-align: top 89 | margin-top: 8px 90 | width: 22px 91 | height: 12px 92 | bg-image('bulletin')//pic.027cgb.cn/20170311/2017336411290357780.png 93 | background-size: 22px 12px 94 | background-repeat: no-repeat 95 | .bulletin-text 96 | margin: 0 4px 97 | font-size: 10px 98 | .icon-keyboard_arrow_right 99 | position: absolute 100 | right: 12px 101 | font-size: 10px 102 | top: 9px 103 | .background 104 | position: absolute 105 | top: 0 106 | left:0 107 | width: 100% 108 | height: 100% 109 | overflow: hidden 110 | z-index: -1 111 | filter: blur(5px) 112 | img 113 | margin-top: -110px 114 | .detail 115 | position: fixed 116 | top: 0 117 | left: 0 118 | z-index: 100 119 | width: 100% 120 | height: 100% 121 | overflow: auto 122 | background-color: rgba(7,17,27,0.8) 123 | backdrop-filter: blur(10px) 124 | .fade-enter-active, .fade-leave-active 125 | transition: opacity 0.5s 126 | .fade-enter, .fade-leave-to 127 | opacity: 0 128 | .detail-wrapper 129 | width: 100% 130 | min-height: 100% 131 | .detail-main 132 | margin-top: 64px 133 | padding-bottom: 64px 134 | .name 135 | line-height: 16px 136 | text-align: center 137 | font-size: 16px 138 | font-weight: 700 139 | .star-wrapper 140 | margin-top: 18px 141 | padding: 2px 0 142 | text-align: center 143 | .title 144 | display: flex 145 | width: 80% 146 | margin: 28px auto 24px auto 147 | .line 148 | flex: 1 149 | position: relative 150 | top: -6px 151 | border-bottom: 1px solid rgba(255,255,255,0.2) 152 | .text 153 | padding: 0 12px 154 | font-size: 14px 155 | font-weight: 700 156 | .supports 157 | width: 80% 158 | margin: 0 auto 159 | .support-item 160 | padding: 0 12px 161 | margin-bottom: 12px 162 | font-size: 0 163 | &:last-child 164 | margin-bottom: 0 165 | .icon 166 | display: inline-block 167 | width: 16px 168 | height: 16px 169 | vertical-align: top 170 | margin-right: 6px 171 | background-size: 16px 16px 172 | background-repeat: no-repeat 173 | &.decrease 174 | bg-image('decrease_2') 175 | &.discount 176 | bg-image('discount_2') 177 | &.guarantee 178 | bg-image('guarantee_2') 179 | &.invoice 180 | bg-image('invoice_2') 181 | &.special 182 | bg-image('special_2') 183 | .text 184 | line-height: 16px 185 | font-size: 12px 186 | 187 | 188 | 189 | .bulletin 190 | width: 80% 191 | margin: 0 auto 192 | .content 193 | padding: 0 12px 194 | line-height: 24px 195 | font-size: 12px 196 | text-align: justify 197 | .detail-close 198 | position: relative 199 | width: 32px 200 | height: 32px 201 | margin: -64px auto 0 auto 202 | clear: both 203 | font-size: 32px 204 | -------------------------------------------------------------------------------- /src/components/header/header.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 97 | 98 | 101 | -------------------------------------------------------------------------------- /src/components/header/invoice_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/invoice_1@2x.png -------------------------------------------------------------------------------- /src/components/header/invoice_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/invoice_1@3x.png -------------------------------------------------------------------------------- /src/components/header/invoice_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/invoice_2@2x.png -------------------------------------------------------------------------------- /src/components/header/invoice_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/invoice_2@3x.png -------------------------------------------------------------------------------- /src/components/header/special_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/special_1@2x.png -------------------------------------------------------------------------------- /src/components/header/special_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/special_1@3x.png -------------------------------------------------------------------------------- /src/components/header/special_2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/special_2@2x.png -------------------------------------------------------------------------------- /src/components/header/special_2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/header/special_2@3x.png -------------------------------------------------------------------------------- /src/components/ratings/ratings.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl" 2 | 3 | .ratings 4 | position: absolute 5 | top: 174px 6 | bottom: 0 7 | left: 0 8 | width: 100% 9 | overflow: hidden 10 | .overview 11 | display: flex 12 | padding: 18px 0 13 | .overview-left 14 | flex: 0 0 137px 15 | padding: 6px 0 16 | width: 137px 17 | border-right: 1px solid rgba(7, 17, 27, 0.1) 18 | text-align: center 19 | @media only screen and (max-width: 320px) 20 | flex: 0 0 120px 21 | width: 120px 22 | .score 23 | margin-bottom: 6px 24 | line-height: 28px 25 | font-size: 24px 26 | color: rgb(255, 153, 0) 27 | .title 28 | margin-bottom: 8px 29 | line-height: 12px 30 | font-size: 12px 31 | color: rgb(7, 17, 27) 32 | .rank 33 | line-height: 10px 34 | font-size: 10px 35 | color: rgb(147, 153, 159) 36 | .overview-right 37 | flex: 1 38 | padding: 6px 0 6px 24px 39 | @media only screen and (max-width: 320px) 40 | padding-left: 6px 41 | .score-wrapper 42 | margin-bottom: 8px 43 | font-size: 0 44 | .title 45 | display: inline-block 46 | line-height: 18px 47 | vertical-align: top 48 | font-size: 12px 49 | color: rgb(7, 17, 27) 50 | .star 51 | display: inline-block 52 | margin: 0 12px 53 | vertical-align: top 54 | .score 55 | display: inline-block 56 | line-height: 18px 57 | vertical-align: top 58 | font-size: 12px 59 | color: rgb(255, 153, 0) 60 | .delivery-wrapper 61 | font-size: 0 62 | .title 63 | line-height: 18px 64 | font-size: 12px 65 | color: rgb(7, 17, 27) 66 | .delivery 67 | margin-left: 12px 68 | font-size: 12px 69 | color: rgb(147, 153, 159) 70 | .rating-wrapper 71 | padding: 0 18px 72 | .rating-item 73 | display: flex 74 | padding: 18px 0 75 | border-1px(rgba(7, 17, 27, 0.1)) 76 | .avatar 77 | flex: 0 0 28px 78 | width: 28px 79 | margin-right: 12px 80 | img 81 | border-radius: 50% 82 | .content 83 | position: relative 84 | flex: 1 85 | .name 86 | margin-bottom: 4px 87 | line-height: 12px 88 | font-size: 10px 89 | color: rgb(7, 17, 27) 90 | .star-wrapper 91 | margin-bottom: 6px 92 | font-size: 0 93 | .star 94 | display: inline-block 95 | margin-right: 6px 96 | vertical-align: top 97 | .delivery 98 | display: inline-block 99 | vertical-align: top 100 | line-height: 12px 101 | font-size: 10px 102 | color: rgb(147, 153, 159) 103 | .text 104 | margin-bottom: 8px 105 | line-height: 18px 106 | color: rgb(7, 17, 27) 107 | font-size: 12px 108 | .recommend 109 | line-height: 16px 110 | font-size: 0 111 | .icon-thumb_up, .item 112 | display: inline-block 113 | margin: 0 8px 4px 0 114 | font-size: 9px 115 | .icon-thumb_up 116 | color: rgb(0, 160, 220) 117 | .item 118 | padding: 0 6px 119 | border: 1px solid rgba(7, 17, 27, 0.1) 120 | border-radius: 1px 121 | color: rgb(147, 153, 159) 122 | background: #fff 123 | .time 124 | position: absolute 125 | top: 0 126 | right: 0 127 | line-height: 12px 128 | font-size: 10px 129 | color: rgb(147, 153, 159) 130 | -------------------------------------------------------------------------------- /src/components/ratings/ratings.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 131 | 132 | 135 | -------------------------------------------------------------------------------- /src/components/ratingselect/ratingselect.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl" 2 | 3 | .ratingselect 4 | .rating-type 5 | padding: 18px 0 6 | margin: 0 18px 7 | border-1px(rgba(7, 17, 27, 0.1)) 8 | font-size: 0 9 | .block 10 | display: inline-block 11 | padding: 8px 12px 12 | margin-right: 8px 13 | line-height: 16px 14 | border-radius: 1px 15 | font-size: 12px 16 | color: rgb(77, 85, 93) 17 | &.active 18 | color: #fff 19 | .count 20 | margin-left: 2px 21 | font-size: 8px 22 | &.positive 23 | background: rgba(0, 160, 220, 0.2) 24 | &.active 25 | background: rgb(0, 160, 220) 26 | &.negative 27 | background: rgba(77, 85, 93, 0.2) 28 | &.active 29 | background: rgb(77, 85, 93) 30 | .switch 31 | padding: 12px 18px 32 | line-height: 24px 33 | border-bottom: 1px solid rgba(7, 17, 27, 0.1) 34 | color: rgb(147, 153, 159) 35 | font-size: 0 36 | &.on 37 | .icon-check_circle 38 | color: #00c850 39 | .icon-check_circle 40 | display: inline-block 41 | vertical-align: top 42 | margin-right: 4px 43 | font-size: 24px 44 | .text 45 | display: inline-block 46 | vertical-align: top 47 | font-size: 12px 48 | -------------------------------------------------------------------------------- /src/components/ratingselect/ratingselect.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 78 | 79 | 82 | -------------------------------------------------------------------------------- /src/components/seller/decrease_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/decrease_4@2x.png -------------------------------------------------------------------------------- /src/components/seller/decrease_4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/decrease_4@3x.png -------------------------------------------------------------------------------- /src/components/seller/discount_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/discount_4@2x.png -------------------------------------------------------------------------------- /src/components/seller/discount_4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/discount_4@3x.png -------------------------------------------------------------------------------- /src/components/seller/guarantee_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/guarantee_4@2x.png -------------------------------------------------------------------------------- /src/components/seller/guarantee_4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/guarantee_4@3x.png -------------------------------------------------------------------------------- /src/components/seller/invoice_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/invoice_4@2x.png -------------------------------------------------------------------------------- /src/components/seller/invoice_4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/invoice_4@3x.png -------------------------------------------------------------------------------- /src/components/seller/seller.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl" 2 | 3 | .seller 4 | position: absolute 5 | top: 174px 6 | bottom: 0 7 | left: 0 8 | width: 100% 9 | overflow: hidden 10 | .overview 11 | position: relative 12 | padding: 18px 13 | .title 14 | margin-bottom: 8px 15 | line-height: 14px 16 | color: rgb(7, 17, 27) 17 | font-size: 14px 18 | .desc 19 | padding-bottom: 18px 20 | border-1px(rgba(7, 17, 27, 0.1)) 21 | font-size: 0 22 | .star 23 | display: inline-block 24 | margin-right: 8px 25 | vertical-align: top 26 | .text 27 | display: inline-block 28 | margin-right: 12px 29 | line-height: 18px 30 | vertical-align: top 31 | font-size: 10px 32 | color: rgb(77, 85, 93) 33 | .remark 34 | display: flex 35 | padding-top: 18px 36 | .block 37 | flex: 1 38 | text-align: center 39 | border-right: 1px solid rgba(7, 17, 27, 0.1) 40 | &:last-child 41 | border: none 42 | h2 43 | margin-bottom: 4px 44 | line-height: 10px 45 | font-size: 10px 46 | color: rgb(147, 153, 159) 47 | .content 48 | line-height: 24px 49 | font-size: 10px 50 | color: rgb(7, 17, 27) 51 | .stress 52 | font-size: 24px 53 | .favorite 54 | position: absolute 55 | width: 50px 56 | right: 11px 57 | top: 18px 58 | text-align: center 59 | .icon-favorite 60 | display: block 61 | margin-bottom: 4px 62 | line-height: 24px 63 | font-size: 24px 64 | color: #d4d6d9 65 | &.active 66 | color: rgb(240, 20, 20) 67 | .text 68 | line-height: 10px 69 | font-size: 10px 70 | color: rgb(77, 85, 93) 71 | .bulletin 72 | padding: 18px 18px 0 18px 73 | .title 74 | margin-bottom: 8px 75 | line-height: 14px 76 | color: rgb(7, 17, 27) 77 | font-size: 14px 78 | .content-wrapper 79 | padding: 0 12px 16px 12px 80 | border-1px(rgba(7, 17, 27, 0.1)) 81 | .content 82 | line-height: 24px 83 | font-size: 12px 84 | color: rgb(240, 20, 20) 85 | .supports 86 | .support-item 87 | padding: 16px 12px 88 | border-1px(rgba(7, 17, 27, 0.1)) 89 | font-size: 0 90 | &:last-child 91 | border-none() 92 | .icon 93 | display: inline-block 94 | width: 16px 95 | height: 16px 96 | vertical-align: top 97 | margin-right: 6px 98 | background-size: 16px 16px 99 | background-repeat: no-repeat 100 | &.decrease 101 | bg-image('decrease_4') 102 | &.discount 103 | bg-image('discount_4') 104 | &.guarantee 105 | bg-image('guarantee_4') 106 | &.invoice 107 | bg-image('invoice_4') 108 | &.special 109 | bg-image('special_4') 110 | .text 111 | line-height: 16px 112 | font-size: 12px 113 | color: rgb(7, 17, 27) 114 | .pics 115 | padding: 18px 116 | .title 117 | margin-bottom: 12px 118 | line-height: 14px 119 | color: rgb(7, 17, 27) 120 | font-size: 14px 121 | .pic-wrapper 122 | width: 100% 123 | overflow: hidden 124 | white-space: nowrap 125 | .pic-list 126 | font-size: 0 127 | .pic-item 128 | display: inline-block 129 | margin-right: 6px 130 | width: 120px 131 | height: 90px 132 | &:last-child 133 | margin: 0 134 | .info 135 | padding: 18px 18px 0 18px 136 | color: rgb(7, 17, 27) 137 | .title 138 | padding-bottom: 12px 139 | line-height: 14px 140 | border-1px(rgba(7, 17, 27, 0.1)) 141 | font-size: 14px 142 | .info-item 143 | padding: 16px 12px 144 | line-height: 16px 145 | border-1px(rgba(7, 17, 27, 0.1)) 146 | font-size: 12px 147 | &:last-child 148 | border-none() 149 | -------------------------------------------------------------------------------- /src/components/seller/seller.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 158 | 159 | 162 | -------------------------------------------------------------------------------- /src/components/seller/special_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/special_4@2x.png -------------------------------------------------------------------------------- /src/components/seller/special_4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/seller/special_4@3x.png -------------------------------------------------------------------------------- /src/components/shopcart/shopcart.styl: -------------------------------------------------------------------------------- 1 | @import "../../common/stylus/mixin.styl" 2 | 3 | .shopcart 4 | position: fixed 5 | left: 0 6 | bottom: 0 7 | z-index: 50 8 | width: 100% 9 | height: 48px 10 | .content 11 | display: flex 12 | background: #141d27 13 | font-size: 0 14 | color: rgba(255, 255, 255, 0.4) 15 | .content-left 16 | flex: 1 17 | .logo-wrapper 18 | display: inline-block 19 | vertical-align: top 20 | position: relative 21 | top: -10px 22 | margin: 0 12px 23 | padding: 6px 24 | width: 56px 25 | height: 56px 26 | box-sizing: border-box 27 | border-radius: 50% 28 | background: #141d27 29 | .logo 30 | width: 100% 31 | height: 100% 32 | border-radius: 50% 33 | text-align: center 34 | background: #2b343c 35 | &.highlight 36 | background: rgb(0, 160, 220) 37 | .icon-shopping_cart 38 | line-height: 44px 39 | font-size: 24px 40 | color: #80858a 41 | &.highlight 42 | color: #fff 43 | .num 44 | position: absolute 45 | top: 0 46 | right: 0 47 | width: 24px 48 | height: 16px 49 | line-height: 16px 50 | text-align: center 51 | border-radius: 16px 52 | font-size: 9px 53 | font-weight: 700 54 | color: #fff 55 | background: rgb(240, 20, 20) 56 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4) 57 | .price 58 | display: inline-block 59 | vertical-align: top 60 | margin-top: 12px 61 | line-height: 24px 62 | padding-right: 12px 63 | box-sizing: border-box 64 | border-right: 1px solid rgba(255, 255, 255, 0.1) 65 | font-size: 16px 66 | font-weight: 700 67 | &.highlight 68 | color: #fff 69 | .desc 70 | display: inline-block 71 | vertical-align: top 72 | margin: 12px 0 0 12px 73 | line-height: 24px 74 | font-size: 10px 75 | .content-right 76 | flex: 0 0 105px 77 | width: 105px 78 | .pay 79 | height: 48px 80 | line-height: 48px 81 | text-align: center 82 | font-size: 12px 83 | font-weight: 700 84 | &.not-enough 85 | background: #2b333b 86 | &.enough 87 | background: #00b43c 88 | color: #fff 89 | .ball-container 90 | .ball 91 | position: fixed 92 | left: 32px 93 | bottom: 22px 94 | z-index: 200 95 | &.drop-enter-active, &.drop-leave-active 96 | transition: all 0.4s cubic-bezier(0.49, -0.29, 0.75, 0.41) 97 | .inner 98 | width: 16px 99 | height: 16px 100 | border-radius: 50% 101 | background: rgb(0, 160, 220) 102 | transition: all 0.4s linear 103 | .shopcart-list 104 | position: absolute 105 | left: 0 106 | top: 0 107 | z-index: -1 108 | width: 100% 109 | transform: translate3d(0, -100%, 0) 110 | &.fold-enter-active, &.fold-leave-active 111 | transition: all 0.5s 112 | &.fold-enter, &.fold-leave-active 113 | transform: translate3d(0, 0, 0) 114 | .list-header 115 | height: 40px 116 | line-height: 40px 117 | padding: 0 18px 118 | background: #f3f5f7 119 | border-bottom: 1px solid rgba(7, 17, 27, 0.1) 120 | .title 121 | float: left 122 | font-size: 14px 123 | color: rgb(7, 17, 27) 124 | .empty 125 | float: right 126 | font-size: 12px 127 | color: rgb(0, 160, 220) 128 | 129 | .list-content 130 | padding: 0 18px 131 | max-height: 217px 132 | overflow: hidden 133 | background: #fff 134 | .food 135 | position: relative 136 | padding: 12px 0 137 | box-sizing: border-box 138 | border-1px(rgba(7, 17, 27, 0.1)) 139 | .name 140 | line-height: 24px 141 | font-size: 14px 142 | color: rgb(7, 17, 27) 143 | .price 144 | position: absolute 145 | right: 90px 146 | bottom: 12px 147 | line-height: 24px 148 | font-size: 14px 149 | font-weight: 700 150 | color: rgb(240, 20, 20) 151 | .cartcontrol-wrapper 152 | position: absolute 153 | right: 0 154 | bottom: 6px 155 | 156 | .list-mask 157 | position: fixed 158 | top: 0 159 | left: 0 160 | width: 100% 161 | height: 100% 162 | z-index: 40 163 | backdrop-filter: blur(10px) 164 | background: rgba(7, 17, 27, 0.6) 165 | &.fade-enter-active, &.fade-leave-active 166 | transition: all 0.5s 167 | &.fade-enter, &.fade-leave-active 168 | opacity: 0 169 | background: rgba(7, 17, 27, 0) 170 | -------------------------------------------------------------------------------- /src/components/shopcart/shopcart.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 234 | 235 | 238 | -------------------------------------------------------------------------------- /src/components/split/split.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /src/components/star/star.styl: -------------------------------------------------------------------------------- 1 | @import '../../common/stylus/mixin.styl'; 2 | 3 | .star 4 | font-size: 0 5 | .star-item 6 | display: inline-block 7 | background-repeat: no-repeat 8 | &.star-48 9 | .star-item 10 | width: 20px 11 | height: 20px 12 | margin-right: 22px 13 | background-size: 20px 20px 14 | &:last-child 15 | margin-right: 0 16 | &.on 17 | bg-image('star48_on') 18 | &.half 19 | bg-image('star48_half') 20 | &.off 21 | bg-image('star48_off') 22 | &.star-36 23 | .star-item 24 | width: 15px 25 | height: 15px 26 | margin-right: 6px 27 | background-size: 15px 15px 28 | &:last-child 29 | margin-right: 0 30 | &.on 31 | bg-image('star36_on') 32 | &.half 33 | bg-image('star36_half') 34 | &.off 35 | bg-image('star36_off') 36 | &.star-24 37 | .star-item 38 | width: 10px 39 | height: 10px 40 | margin-right: 3px 41 | background-size: 10px 10px 42 | &:last-child 43 | margin-right: 0 44 | &.on 45 | bg-image('star24_on') 46 | &.half 47 | bg-image('star24_half') 48 | &.off 49 | bg-image('star24_off') 50 | 51 | -------------------------------------------------------------------------------- /src/components/star/star.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 46 | 47 | 50 | -------------------------------------------------------------------------------- /src/components/star/star24_half@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_half@2x.png -------------------------------------------------------------------------------- /src/components/star/star24_half@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_half@3x.png -------------------------------------------------------------------------------- /src/components/star/star24_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_off@2x.png -------------------------------------------------------------------------------- /src/components/star/star24_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_off@3x.png -------------------------------------------------------------------------------- /src/components/star/star24_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_on@2x.png -------------------------------------------------------------------------------- /src/components/star/star24_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star24_on@3x.png -------------------------------------------------------------------------------- /src/components/star/star36_half@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_half@2x.png -------------------------------------------------------------------------------- /src/components/star/star36_half@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_half@3x.png -------------------------------------------------------------------------------- /src/components/star/star36_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_off@2x.png -------------------------------------------------------------------------------- /src/components/star/star36_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_off@3x.png -------------------------------------------------------------------------------- /src/components/star/star36_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_on@2x.png -------------------------------------------------------------------------------- /src/components/star/star36_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star36_on@3x.png -------------------------------------------------------------------------------- /src/components/star/star48_half@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_half@2x.png -------------------------------------------------------------------------------- /src/components/star/star48_half@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_half@3x.png -------------------------------------------------------------------------------- /src/components/star/star48_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_off@2x.png -------------------------------------------------------------------------------- /src/components/star/star48_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_off@3x.png -------------------------------------------------------------------------------- /src/components/star/star48_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_on@2x.png -------------------------------------------------------------------------------- /src/components/star/star48_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/src/components/star/star48_on@3x.png -------------------------------------------------------------------------------- /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 App from './App'; 5 | import VueRouter from 'vue-router'; 6 | import VueResource from 'vue-resource'; 7 | import VueBus from 'vue-bus'; 8 | import goods from './components/goods/goods.vue'; 9 | import ratings from './components/ratings/ratings.vue'; 10 | import seller from './components/seller/seller.vue'; 11 | 12 | //引入自定义的css样式 13 | import './common/stylus/index.styl'; 14 | 15 | Vue.config.productionTip = false; 16 | Vue.use(VueRouter); 17 | //全局注册VueResource 18 | Vue.use(VueResource); 19 | //vue-bus事件处理中心 20 | Vue.use(VueBus); 21 | const routes = [ 22 | { path: '/goods', component: goods }, 23 | { path: '/ratings', component: ratings }, 24 | { path: '/seller', component: seller } 25 | ]; 26 | 27 | const router = new VueRouter({ 28 | routes, // (缩写)相当于 routes: routes 29 | linkActiveClass: 'active' 30 | }); 31 | // 页面加载自动导航到goods页面 32 | router.push('/goods'); 33 | /* eslint-disable no-new */ 34 | new Vue({ 35 | el: '#app', 36 | router, 37 | template: '', 38 | components: { App } 39 | }); 40 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Hello from '@/components/Hello' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'Hello', 12 | component: Hello 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RegToss/Vue-SPA/4c24b4c2fe8d5e3bd3b1c1cd335ee589160498e6/static/.gitkeep -------------------------------------------------------------------------------- /static/css/reset.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) 3 | * http://cssreset.com 4 | */ 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, embed, 15 | figure, figcaption, footer, header, 16 | menu, nav, output, ruby, section, summary, 17 | time, mark, audio, video, input { 18 | margin: 0; 19 | padding: 0; 20 | border: 0; 21 | font-size: 100%; 22 | font-weight: normal; 23 | vertical-align: baseline; 24 | } 25 | 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, menu, nav, section { 29 | display: block; 30 | } 31 | 32 | body { 33 | line-height: 1; 34 | } 35 | 36 | blockquote, q { 37 | quotes: none; 38 | } 39 | 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: none; 43 | } 44 | 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } 49 | 50 | /* custom */ 51 | a { 52 | color: #7e8c8d; 53 | text-decoration: none; 54 | -webkit-backface-visibility: hidden; 55 | text-decoration: none; 56 | } 57 | 58 | li { 59 | list-style: none; 60 | } 61 | 62 | ::-webkit-scrollbar { 63 | width: 5px; 64 | height: 5px; 65 | } 66 | 67 | ::-webkit-scrollbar-track-piece { 68 | background-color: rgba(0, 0, 0, 0.2); 69 | -webkit-border-radius: 6px; 70 | } 71 | 72 | ::-webkit-scrollbar-thumb:vertical { 73 | height: 5px; 74 | background-color: rgba(125, 125, 125, 0.7); 75 | -webkit-border-radius: 6px; 76 | } 77 | 78 | ::-webkit-scrollbar-thumb:horizontal { 79 | width: 5px; 80 | background-color: rgba(125, 125, 125, 0.7); 81 | -webkit-border-radius: 6px; 82 | } 83 | 84 | html, body { 85 | width: 100%; 86 | } 87 | 88 | body { 89 | -webkit-text-size-adjust: none; 90 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 91 | } --------------------------------------------------------------------------------