├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── logo.png ├── 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 ├── src ├── App.vue ├── components │ ├── detail │ │ └── detail.vue │ ├── goods │ │ └── goods.vue │ ├── header │ │ └── header.vue │ ├── ratings │ │ └── ratings.vue │ └── seller │ │ └── seller.vue ├── main.js ├── router │ └── index.js └── store │ ├── actions.js │ ├── getters.js │ ├── index.js │ ├── modules │ ├── goods.js │ ├── ratings.js │ └── sellers.js │ ├── mutations.js │ └── types.js └── static ├── .gitkeep ├── images └── bgheader.jpg └── style └── reset.css /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # fBStudy_vue2.0 3 | Vue2.0+vuex+node构建的全家桶Demo 4 | ======= 5 | # 6 | 7 | > 8 | 9 | ## Build Setup 10 | 11 | ``` bash 12 | # install dependencies 13 | npm install 14 | 15 | # serve with hot reload at localhost:8080 16 | npm run dev 17 | 18 | # build for production with minification 19 | npm run build 20 | 21 | # build for production and view the bundle analyzer report 22 | npm run build --report 23 | ``` 24 | 25 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 26 | >>>>>>> vue2.0全家桶demo 27 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /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 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | 25 | // // 使用express框架启动一个服务器 26 | // // 1、读取数据 27 | // var appData = require('../data.json'); //读取文件(数据) 28 | // var seller = appData.seller; 29 | // var goods = appData.goods; 30 | // var ratings = appData.ratings; 31 | 32 | // // 2、使用express配置路由,指定接口请求 33 | // var apiRoutes = express.Router(); //定义一个路由 34 | // //配置请求路由和相应 35 | // apiRoutes.get('/seller',function(req,res){ 36 | // res.json({ 37 | // error:0, //错误码 38 | // data:seller 39 | // }); 40 | // }); 41 | 42 | // apiRoutes.get('/goods',function(req,res){ 43 | // res.json({ 44 | // error:0, 45 | // data:goods 46 | // }); 47 | // }); 48 | 49 | // apiRoutes.get('ratings',function(req,res){ 50 | // res.json({ 51 | // error:0, 52 | // data:ratings 53 | // }); 54 | // }); 55 | // app.use('/api',apiRoutes); //暴露api接口 56 | 57 | 58 | var compiler = webpack(webpackConfig) 59 | 60 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 61 | publicPath: webpackConfig.output.publicPath, 62 | quiet: true 63 | }) 64 | 65 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 66 | log: () => {} 67 | }) 68 | // force page reload when html-webpack-plugin template changes 69 | compiler.plugin('compilation', function (compilation) { 70 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 71 | hotMiddleware.publish({ action: 'reload' }) 72 | cb() 73 | }) 74 | }) 75 | 76 | // proxy api requests 77 | Object.keys(proxyTable).forEach(function (context) { 78 | var options = proxyTable[context] 79 | if (typeof options === 'string') { 80 | options = { target: options } 81 | } 82 | app.use(proxyMiddleware(options.filter || context, options)) 83 | }) 84 | 85 | // handle fallback for HTML5 history API 86 | app.use(require('connect-history-api-fallback')()) 87 | 88 | // serve webpack bundle output 89 | app.use(devMiddleware) 90 | 91 | // enable hot-reload and state-preserving 92 | // compilation error display 93 | app.use(hotMiddleware) 94 | 95 | // serve pure static assets 96 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 97 | app.use(staticPath, express.static('./static')) 98 | 99 | var uri = 'http://localhost:' + port 100 | 101 | var _resolve 102 | var readyPromise = new Promise(resolve => { 103 | _resolve = resolve 104 | }) 105 | 106 | console.log('> Starting dev server...') 107 | devMiddleware.waitUntilValid(() => { 108 | console.log('> Listening at ' + uri + '\n') 109 | // when env is testing, don't need open it 110 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 111 | opn(uri) 112 | } 113 | _resolve() 114 | }) 115 | 116 | var server = app.listen(port) 117 | 118 | module.exports = { 119 | ready: readyPromise, 120 | close: () => { 121 | server.close() 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NaNamiss/fBStudy_vue2/3fc8aa678343b5087479cafc0bdfdf1b494e6b79/build/logo.png -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 66 | } 67 | } 68 | ] 69 | }, 70 | node: { 71 | // prevent webpack from injecting useless setImmediate polyfill because Vue 72 | // source contains it (although only uses it if it's native). 73 | setImmediate: false, 74 | // prevent webpack from injecting mocks to Node native modules 75 | // that does not make sense for the client 76 | dgram: 'empty', 77 | fs: 'empty', 78 | net: 'empty', 79 | tls: 'empty', 80 | child_process: 'empty' 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | var express = require('express') 13 | var app = express() 14 | 15 | // 使用express框架启动一个服务器 16 | // 1、读取数据 17 | var appData = require('../data.json'); //读取文件(数据) 18 | var seller = appData.seller; 19 | var goods = appData.goods; 20 | var ratings = appData.ratings; 21 | 22 | // 2、使用express配置路由,指定接口请求 23 | var apiRoutes = express.Router(); //定义一个路由 24 | //配置请求路由和相应 25 | apiRoutes.get('/seller',function(req,res){ 26 | res.json({ 27 | error:0, //错误码 28 | data:seller 29 | }); 30 | }); 31 | 32 | apiRoutes.get('/goods',function(req,res){ 33 | res.json({ 34 | error:0, 35 | data:goods 36 | }); 37 | }); 38 | 39 | apiRoutes.get('ratings',function(req,res){ 40 | res.json({ 41 | error:0, 42 | data:ratings 43 | }); 44 | }); 45 | app.use('/api',apiRoutes); //暴露api接口 46 | 47 | const HOST = process.env.HOST 48 | const PORT = process.env.PORT && Number(process.env.PORT) 49 | 50 | const devWebpackConfig = merge(baseWebpackConfig, { 51 | module: { 52 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 53 | }, 54 | // cheap-module-eval-source-map is faster for development 55 | devtool: config.dev.devtool, 56 | 57 | // these devServer options should be customized in /config/index.js 58 | devServer: { 59 | before(app){ 60 | app.get('/api/goods',(req,res)=>{ 61 | res.json({ 62 | error:0, 63 | data:goods 64 | }) 65 | 66 | }), 67 | app.get('/api/ratings',(req,res)=>{ 68 | res.json({ 69 | error:0, 70 | data:ratings 71 | }) 72 | }), 73 | app.get('/api/seller',(req,res)=>{ 74 | res.json({ 75 | error:0, 76 | data:seller 77 | }) 78 | }) 79 | }, 80 | clientLogLevel: 'warning', 81 | historyApiFallback: { 82 | rewrites: [ 83 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 84 | ], 85 | }, 86 | hot: true, 87 | contentBase: false, // since we use CopyWebpackPlugin. 88 | compress: true, 89 | host: HOST || config.dev.host, 90 | port: PORT || config.dev.port, 91 | open: config.dev.autoOpenBrowser, 92 | overlay: config.dev.errorOverlay 93 | ? { warnings: false, errors: true } 94 | : false, 95 | publicPath: config.dev.assetsPublicPath, 96 | proxy: config.dev.proxyTable, 97 | quiet: true, // necessary for FriendlyErrorsPlugin 98 | watchOptions: { 99 | poll: config.dev.poll, 100 | } 101 | }, 102 | plugins: [ 103 | new webpack.DefinePlugin({ 104 | 'process.env': require('../config/dev.env') 105 | }), 106 | new webpack.HotModuleReplacementPlugin(), 107 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 108 | new webpack.NoEmitOnErrorsPlugin(), 109 | // https://github.com/ampedandwired/html-webpack-plugin 110 | new HtmlWebpackPlugin({ 111 | filename: 'index.html', 112 | template: 'index.html', 113 | inject: true 114 | }), 115 | // copy custom static assets 116 | new CopyWebpackPlugin([ 117 | { 118 | from: path.resolve(__dirname, '../static'), 119 | to: config.dev.assetsSubDirectory, 120 | ignore: ['.*'] 121 | } 122 | ]) 123 | ] 124 | }) 125 | 126 | module.exports = new Promise((resolve, reject) => { 127 | portfinder.basePort = process.env.PORT || config.dev.port 128 | portfinder.getPort((err, port) => { 129 | if (err) { 130 | reject(err) 131 | } else { 132 | // publish the new Port, necessary for e2e tests 133 | process.env.PORT = port 134 | // add port to devServer config 135 | devWebpackConfig.devServer.port = port 136 | 137 | // Add FriendlyErrorsPlugin 138 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 139 | compilationSuccessInfo: { 140 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 141 | }, 142 | onErrors: config.dev.notifyOnErrors 143 | ? utils.createNotifierCallback() 144 | : undefined 145 | })) 146 | 147 | resolve(devWebpackConfig) 148 | } 149 | }) 150 | }) 151 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }) 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig 146 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /data.json: -------------------------------------------------------------------------------- 1 | { 2 | "seller": { 3 | "name": "小厨娘淮扬菜(七里街店)", 4 | "description": "蜂鸟专送", 5 | "deliveryTime": 38, 6 | "score": 4.6, 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": "小厨娘品牌创立于1997年,是一家专业、专注餐饮及管理的餐饮企业。截至2013年小厨娘旗下正餐店11家,商超店12家,团队员工2000多名。作为江苏省服务业名牌企业,小厨娘近年来一直保持快速发展势头,并不断向国内一流餐饮同行学习和交流。", 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": "https://fuss10.elemecdn.com/0/51/66f76d37f15c96a41379a695b0acejpeg.jpeg", 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 | "江苏省南京市秦淮区龙蟠中路451号2-3楼", 48 | "营业时间:10:00-23: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://bbs.itany.com/uc_server/data/avatar/000/00/00/36_avatar_small.jpg" 71 | }, 72 | { 73 | "username": "2******3", 74 | "rateTime": 1469271264000, 75 | "rateType": 0, 76 | "text": "", 77 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 78 | }, 79 | { 80 | "username": "3******b", 81 | "rateTime": 1469261964000, 82 | "rateType": 1, 83 | "text": "", 84 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 104 | }, 105 | { 106 | "username": "2******3", 107 | "rateTime": 1469271264000, 108 | "rateType": 0, 109 | "text": "", 110 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 111 | }, 112 | { 113 | "username": "3******b", 114 | "rateTime": 1469261964000, 115 | "rateType": 1, 116 | "text": "", 117 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 139 | }, 140 | { 141 | "username": "2******3", 142 | "rateTime": 1469271264000, 143 | "rateType": 1, 144 | "text": "很一般啊", 145 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 146 | }, 147 | { 148 | "username": "3******b", 149 | "rateTime": 1469261964000, 150 | "rateType": 0, 151 | "text": "", 152 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 173 | }, 174 | { 175 | "username": "2******3", 176 | "rateTime": 1469271264000, 177 | "rateType": 0, 178 | "text": "", 179 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 180 | }, 181 | { 182 | "username": "3******b", 183 | "rateTime": 1469261964000, 184 | "rateType": 0, 185 | "text": "", 186 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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": "招牌猪肉白菜锅贴", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 207 | }, 208 | { 209 | "username": "2******3", 210 | "rateTime": 1469271264000, 211 | "rateType": 0, 212 | "text": "", 213 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 214 | }, 215 | { 216 | "username": "3******b", 217 | "rateTime": 1469261964000, 218 | "rateType": 0, 219 | "text": "", 220 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 240 | }, 241 | { 242 | "username": "2******3", 243 | "rateTime": 1469271264000, 244 | "rateType": 0, 245 | "text": "", 246 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 247 | }, 248 | { 249 | "username": "3******b", 250 | "rateTime": 1469261964000, 251 | "rateType": 0, 252 | "text": "", 253 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 274 | }, 275 | { 276 | "username": "2******3", 277 | "rateTime": 1469271264000, 278 | "rateType": 0, 279 | "text": "", 280 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 281 | }, 282 | { 283 | "username": "3******b", 284 | "rateTime": 1469261964000, 285 | "rateType": 0, 286 | "text": "", 287 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 308 | }, 309 | { 310 | "username": "2******3", 311 | "rateTime": 1469271264000, 312 | "rateType": 0, 313 | "text": "", 314 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 315 | }, 316 | { 317 | "username": "3******b", 318 | "rateTime": 1469261964000, 319 | "rateType": 0, 320 | "text": "", 321 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 342 | }, 343 | { 344 | "username": "2******3", 345 | "rateTime": 1469271264000, 346 | "rateType": 0, 347 | "text": "", 348 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 349 | }, 350 | { 351 | "username": "3******b", 352 | "rateTime": 1469261964000, 353 | "rateType": 0, 354 | "text": "", 355 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 376 | }, 377 | { 378 | "username": "2******3", 379 | "rateTime": 1469271264000, 380 | "rateType": 0, 381 | "text": "", 382 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 383 | }, 384 | { 385 | "username": "3******b", 386 | "rateTime": 1469261964000, 387 | "rateType": 0, 388 | "text": "", 389 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 442 | }, 443 | { 444 | "username": "2******3", 445 | "rateTime": 1469271264000, 446 | "rateType": 0, 447 | "text": "", 448 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 475 | }, 476 | { 477 | "username": "2******3", 478 | "rateTime": 1469271264000, 479 | "rateType": 0, 480 | "text": "", 481 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 502 | }, 503 | { 504 | "username": "2******3", 505 | "rateTime": 1469271264000, 506 | "rateType": 0, 507 | "text": "", 508 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 529 | }, 530 | { 531 | "username": "2******3", 532 | "rateTime": 1469271264000, 533 | "rateType": 0, 534 | "text": "", 535 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 562 | }, 563 | { 564 | "username": "2******3", 565 | "rateTime": 1469271264000, 566 | "rateType": 0, 567 | "text": "", 568 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 569 | }, 570 | { 571 | "username": "3******b", 572 | "rateTime": 1469261964000, 573 | "rateType": 0, 574 | "text": "", 575 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 596 | }, 597 | { 598 | "username": "2******3", 599 | "rateTime": 1469271264000, 600 | "rateType": 0, 601 | "text": "", 602 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 603 | }, 604 | { 605 | "username": "3******b", 606 | "rateTime": 1469261964000, 607 | "rateType": 0, 608 | "text": "", 609 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 694 | }, 695 | { 696 | "username": "2******3", 697 | "rateTime": 1469271264000, 698 | "rateType": 0, 699 | "text": "", 700 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 701 | }, 702 | { 703 | "username": "3******b", 704 | "rateTime": 1469261964000, 705 | "rateType": 0, 706 | "text": "", 707 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 728 | }, 729 | { 730 | "username": "2******3", 731 | "rateTime": 1469271264000, 732 | "rateType": 0, 733 | "text": "", 734 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 761 | }, 762 | { 763 | "username": "2******3", 764 | "rateTime": 1469271264000, 765 | "rateType": 0, 766 | "text": "", 767 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 768 | }, 769 | { 770 | "username": "3******b", 771 | "rateTime": 1469261964000, 772 | "rateType": 1, 773 | "text": "", 774 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 795 | }, 796 | { 797 | "username": "2******3", 798 | "rateTime": 1469271264000, 799 | "rateType": 1, 800 | "text": "很一般啊", 801 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 802 | }, 803 | { 804 | "username": "3******b", 805 | "rateTime": 1469261964000, 806 | "rateType": 0, 807 | "text": "", 808 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 829 | }, 830 | { 831 | "username": "2******3", 832 | "rateTime": 1469271264000, 833 | "rateType": 0, 834 | "text": "", 835 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 836 | }, 837 | { 838 | "username": "3******b", 839 | "rateTime": 1469261964000, 840 | "rateType": 0, 841 | "text": "", 842 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 863 | }, 864 | { 865 | "username": "2******3", 866 | "rateTime": 1469271264000, 867 | "rateType": 0, 868 | "text": "", 869 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 870 | }, 871 | { 872 | "username": "3******b", 873 | "rateTime": 1469261964000, 874 | "rateType": 0, 875 | "text": "", 876 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 897 | }, 898 | { 899 | "username": "2******3", 900 | "rateTime": 1469271264000, 901 | "rateType": 0, 902 | "text": "", 903 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 904 | }, 905 | { 906 | "username": "3******b", 907 | "rateTime": 1469261964000, 908 | "rateType": 0, 909 | "text": "", 910 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 936 | }, 937 | { 938 | "username": "2******3", 939 | "rateTime": 1469271264000, 940 | "rateType": 0, 941 | "text": "", 942 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 943 | }, 944 | { 945 | "username": "3******b", 946 | "rateTime": 1469261964000, 947 | "rateType": 1, 948 | "text": "", 949 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 970 | }, 971 | { 972 | "username": "2******3", 973 | "rateTime": 1469271264000, 974 | "rateType": 0, 975 | "text": "", 976 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 977 | }, 978 | { 979 | "username": "3******b", 980 | "rateTime": 1469261964000, 981 | "rateType": 0, 982 | "text": "", 983 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1004 | }, 1005 | { 1006 | "username": "2******3", 1007 | "rateTime": 1469271264000, 1008 | "rateType": 0, 1009 | "text": "", 1010 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1011 | }, 1012 | { 1013 | "username": "3******b", 1014 | "rateTime": 1469261964000, 1015 | "rateType": 0, 1016 | "text": "", 1017 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1038 | }, 1039 | { 1040 | "username": "2******3", 1041 | "rateTime": 1469271264000, 1042 | "rateType": 0, 1043 | "text": "", 1044 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1045 | }, 1046 | { 1047 | "username": "3******b", 1048 | "rateTime": 1469261964000, 1049 | "rateType": 0, 1050 | "text": "", 1051 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1105 | }, 1106 | { 1107 | "username": "2******3", 1108 | "rateTime": 1469271264000, 1109 | "rateType": 0, 1110 | "text": "", 1111 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 1112 | }, 1113 | { 1114 | "username": "3******b", 1115 | "rateTime": 1469261964000, 1116 | "rateType": 0, 1117 | "text": "", 1118 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small" 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1153 | "recommend": [ 1154 | "扁豆焖面" 1155 | ] 1156 | }, 1157 | { 1158 | "username": "3******b", 1159 | "rateTime": 1469261964000, 1160 | "score": 3, 1161 | "rateType": 1, 1162 | "text": "", 1163 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1204 | "recommend": [] 1205 | }, 1206 | { 1207 | "username": "2******3", 1208 | "rateTime": 1469221264000, 1209 | "deliveryTime": "", 1210 | "score": 4, 1211 | "rateType": 0, 1212 | "text": "量给的还可以", 1213 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1214 | "recommend": [] 1215 | }, 1216 | { 1217 | "username": "3******8", 1218 | "rateTime": 1469211964000, 1219 | "deliveryTime": "", 1220 | "score": 3, 1221 | "rateType": 1, 1222 | "text": "", 1223 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1224 | "recommend": [] 1225 | }, 1226 | { 1227 | "username": "a******a", 1228 | "rateTime": 1469201964000, 1229 | "deliveryTime": "", 1230 | "score": 4, 1231 | "rateType": 0, 1232 | "text": "孩子喜欢吃这家", 1233 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1246 | "recommend": [] 1247 | }, 1248 | { 1249 | "username": "t******b", 1250 | "rateTime": 1469181964000, 1251 | "deliveryTime": "", 1252 | "score": 3, 1253 | "rateType": 1, 1254 | "text": "", 1255 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1266 | "recommend": [] 1267 | }, 1268 | { 1269 | "username": "k******3", 1270 | "rateTime": 1469161264000, 1271 | "deliveryTime": "", 1272 | "score": 4, 1273 | "rateType": 0, 1274 | "text": "", 1275 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1276 | "recommend": [] 1277 | }, 1278 | { 1279 | "username": "u******b", 1280 | "rateTime": 1469151964000, 1281 | "deliveryTime": "", 1282 | "score": 4, 1283 | "rateType": 0, 1284 | "text": "下雨天给快递小哥点个赞", 1285 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1286 | "recommend": [] 1287 | }, 1288 | { 1289 | "username": "s******c", 1290 | "rateTime": 1469141964000, 1291 | "deliveryTime": "", 1292 | "score": 4, 1293 | "rateType": 0, 1294 | "text": "好", 1295 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1296 | "recommend": [] 1297 | }, 1298 | { 1299 | "username": "z******3", 1300 | "rateTime": 1469131264000, 1301 | "deliveryTime": "", 1302 | "score": 5, 1303 | "rateType": 0, 1304 | "text": "吃了还想再吃", 1305 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1306 | "recommend": [] 1307 | }, 1308 | { 1309 | "username": "n******b", 1310 | "rateTime": 1469121964000, 1311 | "deliveryTime": "", 1312 | "score": 3, 1313 | "rateType": 1, 1314 | "text": "发票开的不对", 1315 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 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://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1336 | "recommend": [] 1337 | }, 1338 | { 1339 | "username": "3******o", 1340 | "rateTime": 1469091964000, 1341 | "deliveryTime": "", 1342 | "score": 2, 1343 | "rateType": 1, 1344 | "text": "", 1345 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1346 | "recommend": [] 1347 | }, 1348 | { 1349 | "username": "3******p", 1350 | "rateTime": 1469081964000, 1351 | "deliveryTime": "", 1352 | "score": 4, 1353 | "rateType": 0, 1354 | "text": "很喜欢的粥", 1355 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1356 | "recommend": [] 1357 | }, 1358 | { 1359 | "username": "o******k", 1360 | "rateTime": 1469071264000, 1361 | "deliveryTime": "", 1362 | "score": 5, 1363 | "rateType": 0, 1364 | "text": "", 1365 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1366 | "recommend": [] 1367 | }, 1368 | { 1369 | "username": "k******b", 1370 | "rateTime": 1469061964000, 1371 | "deliveryTime": "", 1372 | "score": 4, 1373 | "rateType": 0, 1374 | "text": "", 1375 | "avatar": "http://bbs.itany.com/uc_server/avatar.php?uid=12&size=small", 1376 | "recommend": [] 1377 | } 1378 | ] 1379 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue项目 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fBStudy_vue2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "author": "wangnana", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "animate.css": "^3.5.2", 14 | "axios": "^0.17.1", 15 | "vue": "^2.5.2", 16 | "vue-router": "^3.0.1", 17 | "vuex": "^3.0.1" 18 | }, 19 | "devDependencies": { 20 | "autoprefixer": "^7.1.2", 21 | "babel-core": "^6.22.1", 22 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 23 | "babel-loader": "^7.1.1", 24 | "babel-plugin-syntax-jsx": "^6.18.0", 25 | "babel-plugin-transform-runtime": "^6.22.0", 26 | "babel-plugin-transform-vue-jsx": "^3.5.0", 27 | "babel-preset-env": "^1.3.2", 28 | "babel-preset-stage-2": "^6.22.0", 29 | "chalk": "^2.0.1", 30 | "copy-webpack-plugin": "^4.0.1", 31 | "css-loader": "^0.28.0", 32 | "extract-text-webpack-plugin": "^3.0.0", 33 | "file-loader": "^1.1.4", 34 | "friendly-errors-webpack-plugin": "^1.6.1", 35 | "html-webpack-plugin": "^2.30.1", 36 | "less": "^2.7.3", 37 | "less-loader": "^4.0.5", 38 | "node-notifier": "^5.1.2", 39 | "optimize-css-assets-webpack-plugin": "^3.2.0", 40 | "ora": "^1.2.0", 41 | "portfinder": "^1.0.13", 42 | "postcss-import": "^11.0.0", 43 | "postcss-loader": "^2.0.8", 44 | "postcss-url": "^7.2.1", 45 | "rimraf": "^2.6.0", 46 | "semver": "^5.3.0", 47 | "shelljs": "^0.7.6", 48 | "uglifyjs-webpack-plugin": "^1.1.1", 49 | "url-loader": "^0.5.8", 50 | "vue-loader": "^13.3.0", 51 | "vue-style-loader": "^3.0.1", 52 | "vue-template-compiler": "^2.5.2", 53 | "webpack": "^3.6.0", 54 | "webpack-bundle-analyzer": "^2.9.0", 55 | "webpack-dev-server": "^2.9.1", 56 | "webpack-merge": "^4.1.0" 57 | }, 58 | "engines": { 59 | "node": ">= 6.0.0", 60 | "npm": ">= 3.0.0" 61 | }, 62 | "browserslist": [ 63 | "> 1%", 64 | "last 2 versions", 65 | "not ie <= 8" 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 31 | 32 | -------------------------------------------------------------------------------- /src/components/detail/detail.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 33 | 34 | 74 | -------------------------------------------------------------------------------- /src/components/goods/goods.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 43 | 44 | 116 | -------------------------------------------------------------------------------- /src/components/header/header.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /src/components/ratings/ratings.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /src/components/seller/seller.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | import store from './store/index.js' 4 | import router from './router/index.js' 5 | 6 | Vue.config.productionTip = false; //阻止 vue 在启动时生成生产提示 7 | 8 | /* eslint-disable no-new */ 9 | new Vue({ 10 | store, 11 | router, 12 | el: '#app', 13 | template:'', 14 | components:{App}, 15 | data :{ 16 | 17 | }, 18 | methods:{ 19 | 20 | } 21 | }) 22 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import goods from '../components/goods/goods.vue' 4 | import ratings from '../components/ratings/ratings.vue' 5 | import seller from '../components/seller/seller.vue' 6 | 7 | Vue.use(VueRouter); 8 | 9 | export default new VueRouter({ 10 | routes: [ 11 | { 12 | path: '/goods', 13 | component: goods 14 | }, 15 | { 16 | path: '/ratings', 17 | component: ratings 18 | }, 19 | { 20 | path: '/seller', 21 | component: seller 22 | }, 23 | { 24 | path: '*', 25 | redirect: '/goods' 26 | }, 27 | ], 28 | linkActiveClass: 'active' 29 | }) -------------------------------------------------------------------------------- /src/store/actions.js: -------------------------------------------------------------------------------- 1 | 2 | // 3 | const actions = { 4 | 5 | } 6 | 7 | export default actions; -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | 2 | const getters = { 3 | 4 | } 5 | 6 | export default getters; -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue' 3 | import Vuex from 'vuex' 4 | import getters from './getters' 5 | import actions from './actions' 6 | import goods from './modules/goods' 7 | import ratings from './modules/ratings' 8 | import sellers from './modules/sellers' 9 | // import mutations from './mutations' //并没有导入这个模块 10 | 11 | Vue.use(Vuex) 12 | 13 | export default new Vuex.Store({ 14 | getters, 15 | actions, 16 | modules:{ 17 | goods, 18 | ratings, 19 | sellers 20 | } 21 | }) 22 | 23 | -------------------------------------------------------------------------------- /src/store/modules/goods.js: -------------------------------------------------------------------------------- 1 | 2 | import types from '../types' 3 | import axios from 'axios' 4 | 5 | const state = { 6 | goods :[] 7 | } 8 | 9 | const getters = { 10 | goods(state){ 11 | return state.goods 12 | } 13 | } 14 | 15 | const actions = { 16 | getGoods({commit,state}){ 17 | axios.get('/api/goods').then(resp=>{ 18 | if(resp.data.error == '0'){ 19 | commit('getGoods',resp.data.data) 20 | } 21 | }); 22 | } 23 | } 24 | 25 | const mutations = { 26 | getGoods(state,data){ 27 | state.goods = data; 28 | } 29 | } 30 | 31 | export default { 32 | state, 33 | getters, 34 | actions, 35 | mutations 36 | } -------------------------------------------------------------------------------- /src/store/modules/ratings.js: -------------------------------------------------------------------------------- 1 | 2 | import types from '../types' 3 | 4 | const state = { 5 | 6 | } 7 | 8 | const getters = { 9 | 10 | } 11 | 12 | const actions = { 13 | 14 | } 15 | 16 | const mutations = { 17 | 18 | } 19 | 20 | export default { 21 | state, 22 | getters, 23 | actions, 24 | mutations 25 | } -------------------------------------------------------------------------------- /src/store/modules/sellers.js: -------------------------------------------------------------------------------- 1 | 2 | import types from '../types' 3 | import axios from 'axios' 4 | 5 | // 定义一个变量,用来存储数据 6 | const state = { 7 | seller: {}, 8 | detailShow:false, 9 | // detailShow:true 10 | } 11 | 12 | // 获取数据 13 | const getters = { 14 | seller(state){ 15 | return state.seller 16 | }, 17 | detailShow(state){ 18 | return state.detailShow 19 | } 20 | } 21 | 22 | // 发起一个行为,(接口请求) 23 | const actions = { 24 | getSeller({ commit, state }) { 25 | axios.get('/api/seller').then(resp => { 26 | // state.seller = resp.data.data;//数据不应该在这里改,需要提交 27 | if(resp.data.error == 0){ 28 | commit(types.GET_SELLER,resp.data.data); //提交一个处理数据的指示 29 | } 30 | }) 31 | }, 32 | showDetail({commit,state}){ 33 | commit('abc') 34 | }, 35 | hideDetail({commit,state}){ 36 | commit(types.HIDE_DETAIL) 37 | } 38 | } 39 | 40 | // 处理数据 41 | const mutations = { 42 | [types.GET_SELLER](state,data){ 43 | state.seller = data; 44 | }, 45 | abc(state){ 46 | state.detailShow = true; 47 | }, 48 | [types.HIDE_DETAIL](state){ 49 | state.detailShow = false; 50 | } 51 | } 52 | 53 | // 导出 54 | export default { 55 | state, 56 | getters, 57 | actions, 58 | mutations 59 | } -------------------------------------------------------------------------------- /src/store/mutations.js: -------------------------------------------------------------------------------- 1 | 2 | const mutations = { 3 | 4 | } 5 | export default mutations; -------------------------------------------------------------------------------- /src/store/types.js: -------------------------------------------------------------------------------- 1 | 2 | // 定义变量 3 | const GET_SELLER = "GET_SELLER" 4 | const SHOW_DETAIL = 'SHOW_DETAIL' 5 | const HIDE_DETAIL = 'HIDE_DETAIL' 6 | 7 | export default { 8 | GET_SELLER, 9 | SHOW_DETAIL, 10 | HIDE_DETAIL 11 | } 12 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NaNamiss/fBStudy_vue2/3fc8aa678343b5087479cafc0bdfdf1b494e6b79/static/.gitkeep -------------------------------------------------------------------------------- /static/images/bgheader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NaNamiss/fBStudy_vue2/3fc8aa678343b5087479cafc0bdfdf1b494e6b79/static/images/bgheader.jpg -------------------------------------------------------------------------------- /static/style/reset.css: -------------------------------------------------------------------------------- 1 | /* 2 | html5doctor.com Reset Stylesheet 3 | v1.4.1 4 | 2010-03-01 5 | Author: Richard Clark - http://richclarkdesign.com 6 | */ 7 | 8 | html, body, div, span, object, iframe, 9 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 10 | abbr, address, cite, code, 11 | del, dfn, em, img, ins, kbd, q, samp, 12 | small, strong, sub, sup, var, 13 | b, i, 14 | dl, dt, dd, ol, ul, li, 15 | fieldset, form, label, legend, 16 | table, caption, tbody, tfoot, thead, tr, th, td, 17 | article, aside, canvas, details, figcaption, figure, 18 | footer, header, hgroup, menu, nav, section, summary, 19 | time, mark, audio, video { 20 | margin:0; 21 | padding:0; 22 | border:0; 23 | outline:0; 24 | font-size:100%; 25 | vertical-align:baseline; 26 | background:transparent; 27 | } 28 | 29 | body { 30 | line-height:1; 31 | } 32 | 33 | :focus { 34 | outline: 1; 35 | } 36 | 37 | article,aside,canvas,details,figcaption,figure, 38 | footer,header,hgroup,menu,nav,section,summary { 39 | display:block; 40 | } 41 | 42 | nav ul { 43 | list-style:none; 44 | } 45 | 46 | blockquote, q { 47 | quotes:none; 48 | } 49 | 50 | blockquote:before, blockquote:after, 51 | q:before, q:after { 52 | content:''; 53 | content:none; 54 | } 55 | 56 | a { 57 | margin:0; 58 | padding:0; 59 | border:0; 60 | color:#000; 61 | font-size:100%; 62 | vertical-align:baseline; 63 | background:transparent; 64 | } 65 | 66 | ins { 67 | background-color:#ff9; 68 | color:#000; 69 | text-decoration:none; 70 | } 71 | 72 | mark { 73 | background-color:#ff9; 74 | color:#000; 75 | font-style:italic; 76 | font-weight:bold; 77 | } 78 | 79 | del { 80 | text-decoration: line-through; 81 | } 82 | 83 | abbr[title], dfn[title] { 84 | border-bottom:1px dotted #000; 85 | cursor:help; 86 | } 87 | 88 | table { 89 | border-collapse:collapse; 90 | border-spacing:0; 91 | } 92 | 93 | hr { 94 | display:block; 95 | height:1px; 96 | border:0; 97 | border-top:1px solid #cccccc; 98 | margin:1em 0; 99 | padding:0; 100 | } 101 | 102 | input, select { 103 | vertical-align:middle; 104 | } --------------------------------------------------------------------------------