├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
├── build.js
├── check-versions.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
├── index.html
├── package.json
├── src
├── .gitrepo
├── App.vue
├── assets
│ ├── 1.jpeg
│ ├── 2.jpeg
│ ├── KFOlCnqEu92Fr1MmEU9fBBc4.woff2
│ ├── avatar.jpg
│ ├── baby.png
│ ├── flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
│ ├── logo.png
│ └── material.css
├── components
│ ├── MyComponent.js
│ ├── cascader
│ │ └── Cascader.vue
│ ├── form
│ │ ├── Editor.vue
│ │ └── Upload.vue
│ ├── messages
│ │ └── index.js
│ └── tree
│ │ ├── Tree.vue
│ │ └── TreeItem.vue
├── config.js
├── http.js
├── main.js
├── menu.js
├── mockDB.js
├── pages
│ ├── Dashboard.vue
│ ├── Layout.vue
│ ├── Login.vue
│ ├── item
│ │ ├── Category.vue
│ │ ├── MyBrand.vue
│ │ ├── MyBrandForm.vue
│ │ ├── MyGoods.vue
│ │ ├── MyGoodsForm.vue
│ │ ├── MySeckillForm.vue
│ │ └── Specification.vue
│ ├── trade
│ │ └── Promotion.vue
│ └── user
│ │ └── Statistics.vue
├── router
│ └── index.js
└── verify.js
└── static
└── .gitkeep
/.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",["import", {
12 | "libraryName": "iview",
13 | "libraryDirectory": "src/components"
14 | }]]
15 | }
16 |
--------------------------------------------------------------------------------
/.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 | package-lock.json
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 | # leyou-manage-web
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 |
22 |
23 | ## 新增登录功能,用户名和密码都是admin
24 |
25 | 手动添加管理员账户
26 |
27 | 在`leyou-user`服务中:
28 |
29 | ```java
30 | /**
31 | * 添加后台管理人员
32 | */
33 | @Test
34 | public void addAdmin(){
35 | User user = new User();
36 | user.setCreated(new Date());
37 | user.setPhone("88888888");
38 | user.setUsername("admin");
39 | user.setPassword("admin");
40 | String encodePassword = CodecUtils.passwordBcryptEncode(user.getUsername().trim(),user.getPassword().trim());
41 | user.setPassword(encodePassword);
42 | this.userMapper.insertSelective(user);
43 | }
44 | ```
45 |
46 |
--------------------------------------------------------------------------------
/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/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/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 |
13 | const HOST = process.env.HOST
14 | const PORT = process.env.PORT && Number(process.env.PORT)
15 |
16 | const devWebpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
19 | },
20 | // cheap-module-eval-source-map is faster for development
21 | devtool: config.dev.devtool,
22 |
23 | // these devServer options should be customized in /config/index.js
24 | devServer: {
25 | clientLogLevel: 'warning',
26 | historyApiFallback: {
27 | rewrites: [
28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
29 | ],
30 | },
31 | hot: true,
32 | contentBase: false, // since we use CopyWebpackPlugin.
33 | compress: true,
34 | host: HOST || config.dev.host,
35 | port: PORT || config.dev.port,
36 | open: config.dev.autoOpenBrowser,
37 | overlay: config.dev.errorOverlay
38 | ? { warnings: false, errors: true }
39 | : false,
40 | publicPath: config.dev.assetsPublicPath,
41 | proxy: config.dev.proxyTable,
42 | quiet: true, // necessary for FriendlyErrorsPlugin
43 | watchOptions: {
44 | poll: config.dev.poll,
45 | }
46 | },
47 | plugins: [
48 | new webpack.DefinePlugin({
49 | 'process.env': require('../config/dev.env')
50 | }),
51 | new webpack.HotModuleReplacementPlugin(),
52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
53 | new webpack.NoEmitOnErrorsPlugin(),
54 | // https://github.com/ampedandwired/html-webpack-plugin
55 | new HtmlWebpackPlugin({
56 | filename: 'index.html',
57 | template: 'index.html',
58 | inject: true
59 | }),
60 | // copy custom static assets
61 | new CopyWebpackPlugin([
62 | {
63 | from: path.resolve(__dirname, '../static'),
64 | to: config.dev.assetsSubDirectory,
65 | ignore: ['.*']
66 | }
67 | ])
68 | ]
69 | })
70 |
71 | module.exports = new Promise((resolve, reject) => {
72 | portfinder.basePort = process.env.PORT || config.dev.port
73 | portfinder.getPort((err, port) => {
74 | if (err) {
75 | reject(err)
76 | } else {
77 | // publish the new Port, necessary for e2e tests
78 | process.env.PORT = port
79 | // add port to devServer config
80 | devWebpackConfig.devServer.port = port
81 |
82 | // Add FriendlyErrorsPlugin
83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
84 | compilationSuccessInfo: {
85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
86 | },
87 | onErrors: config.dev.notifyOnErrors
88 | ? utils.createNotifierCallback()
89 | : undefined
90 | }))
91 |
92 | resolve(devWebpackConfig)
93 | }
94 | })
95 | })
96 |
--------------------------------------------------------------------------------
/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.2.8
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: 9001, // 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 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 乐优商城--后台管理
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "leyou-manage-web",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "huge0612 ",
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 | "axios": "^0.18.0",
14 | "echarts": "^4.1.0",
15 | "element-ui": "^2.3.2",
16 | "iview": "^2.11.0",
17 | "qs": "^6.5.1",
18 | "query-string": "^6.2.0",
19 | "vue": "^2.5.2",
20 | "vue-quill-editor": "^3.0.6",
21 | "vue-router": "^3.0.1",
22 | "vuetify": "^1.0.11"
23 | },
24 | "devDependencies": {
25 | "autoprefixer": "^7.1.2",
26 | "babel-core": "^6.22.1",
27 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
28 | "babel-loader": "^7.1.1",
29 | "babel-plugin-import": "^1.6.7",
30 | "babel-plugin-syntax-jsx": "^6.18.0",
31 | "babel-plugin-transform-runtime": "^6.22.0",
32 | "babel-plugin-transform-vue-jsx": "^3.5.0",
33 | "babel-preset-env": "^1.3.2",
34 | "babel-preset-stage-2": "^6.22.0",
35 | "chalk": "^2.0.1",
36 | "copy-webpack-plugin": "^4.0.1",
37 | "css-loader": "^0.28.0",
38 | "extract-text-webpack-plugin": "^3.0.0",
39 | "file-loader": "^1.1.4",
40 | "friendly-errors-webpack-plugin": "^1.6.1",
41 | "html-webpack-plugin": "^2.30.1",
42 | "node-notifier": "^5.1.2",
43 | "optimize-css-assets-webpack-plugin": "^3.2.0",
44 | "ora": "^1.2.0",
45 | "portfinder": "^1.0.13",
46 | "postcss-import": "^11.0.0",
47 | "postcss-loader": "^2.0.8",
48 | "postcss-url": "^7.2.1",
49 | "rimraf": "^2.6.0",
50 | "semver": "^5.3.0",
51 | "shelljs": "^0.7.6",
52 | "uglifyjs-webpack-plugin": "^1.1.1",
53 | "url-loader": "^0.5.8",
54 | "vue-loader": "^13.3.0",
55 | "vue-style-loader": "^3.0.1",
56 | "vue-template-compiler": "^2.5.2",
57 | "webpack": "^3.6.0",
58 | "webpack-bundle-analyzer": "^2.9.0",
59 | "webpack-dev-server": "^2.9.1",
60 | "webpack-merge": "^4.1.0"
61 | },
62 | "engines": {
63 | "node": ">= 6.0.0",
64 | "npm": ">= 3.0.0"
65 | },
66 | "browserslist": [
67 | "> 1%",
68 | "last 2 versions",
69 | "not ie <= 8"
70 | ]
71 | }
72 |
--------------------------------------------------------------------------------
/src/.gitrepo:
--------------------------------------------------------------------------------
1 | ; DO NOT EDIT (unless you know what you are doing)
2 | ;
3 | ; This subdirectory is a git "subrepo", and this file is maintained by the
4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
5 | ;
6 | [subrepo]
7 | remote = https://github.com/vuetifyjs/templates-common.git
8 | branch = subrepo/webpack-src
9 | commit = 090741fa8ba4da0c6f85db64eff64550704123e1
10 | parent = e05204fc0583a8c99f1963ce873eba1266838215
11 | method = merge
12 | cmdver = 0.4.0
13 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/src/assets/1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/1.jpeg
--------------------------------------------------------------------------------
/src/assets/2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/2.jpeg
--------------------------------------------------------------------------------
/src/assets/KFOlCnqEu92Fr1MmEU9fBBc4.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/KFOlCnqEu92Fr1MmEU9fBBc4.woff2
--------------------------------------------------------------------------------
/src/assets/avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/avatar.jpg
--------------------------------------------------------------------------------
/src/assets/baby.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/baby.png
--------------------------------------------------------------------------------
/src/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/src/assets/logo.png
--------------------------------------------------------------------------------
/src/assets/material.css:
--------------------------------------------------------------------------------
1 | /* fallback */
2 | @font-face {
3 | font-family: 'Material Icons';
4 | font-style: normal;
5 | font-weight: 400;
6 | src: url(./flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
7 | }
8 | /* cyrillic-ext */
9 | @font-face {
10 | font-family: 'Roboto';
11 | font-style: normal;
12 | font-weight: 300;
13 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2) format('woff2');
14 | unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
15 | }
16 | /* cyrillic */
17 | @font-face {
18 | font-family: 'Roboto';
19 | font-style: normal;
20 | font-weight: 300;
21 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2) format('woff2');
22 | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
23 | }
24 | /* greek-ext */
25 | @font-face {
26 | font-family: 'Roboto';
27 | font-style: normal;
28 | font-weight: 300;
29 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2) format('woff2');
30 | unicode-range: U+1F00-1FFF;
31 | }
32 | /* greek */
33 | @font-face {
34 | font-family: 'Roboto';
35 | font-style: normal;
36 | font-weight: 300;
37 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2) format('woff2');
38 | unicode-range: U+0370-03FF;
39 | }
40 | /* vietnamese */
41 | @font-face {
42 | font-family: 'Roboto';
43 | font-style: normal;
44 | font-weight: 300;
45 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2) format('woff2');
46 | unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
47 | }
48 | /* latin-ext */
49 | @font-face {
50 | font-family: 'Roboto';
51 | font-style: normal;
52 | font-weight: 300;
53 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2) format('woff2');
54 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
55 | }
56 | /* latin */
57 | @font-face {
58 | font-family: 'Roboto';
59 | font-style: normal;
60 | font-weight: 300;
61 | src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc4.woff2) format('woff2');
62 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
63 | }
64 | /* cyrillic-ext */
65 | @font-face {
66 | font-family: 'Roboto';
67 | font-style: normal;
68 | font-weight: 400;
69 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
70 | unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
71 | }
72 | /* cyrillic */
73 | @font-face {
74 | font-family: 'Roboto';
75 | font-style: normal;
76 | font-weight: 400;
77 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
78 | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
79 | }
80 | /* greek-ext */
81 | @font-face {
82 | font-family: 'Roboto';
83 | font-style: normal;
84 | font-weight: 400;
85 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
86 | unicode-range: U+1F00-1FFF;
87 | }
88 | /* greek */
89 | @font-face {
90 | font-family: 'Roboto';
91 | font-style: normal;
92 | font-weight: 400;
93 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
94 | unicode-range: U+0370-03FF;
95 | }
96 | /* vietnamese */
97 | @font-face {
98 | font-family: 'Roboto';
99 | font-style: normal;
100 | font-weight: 400;
101 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
102 | unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
103 | }
104 | /* latin-ext */
105 | @font-face {
106 | font-family: 'Roboto';
107 | font-style: normal;
108 | font-weight: 400;
109 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
110 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
111 | }
112 | /* latin */
113 | @font-face {
114 | font-family: 'Roboto';
115 | font-style: normal;
116 | font-weight: 400;
117 | src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
118 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
119 | }
120 | /* cyrillic-ext */
121 | @font-face {
122 | font-family: 'Roboto';
123 | font-style: normal;
124 | font-weight: 500;
125 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2) format('woff2');
126 | unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
127 | }
128 | /* cyrillic */
129 | @font-face {
130 | font-family: 'Roboto';
131 | font-style: normal;
132 | font-weight: 500;
133 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2) format('woff2');
134 | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
135 | }
136 | /* greek-ext */
137 | @font-face {
138 | font-family: 'Roboto';
139 | font-style: normal;
140 | font-weight: 500;
141 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2) format('woff2');
142 | unicode-range: U+1F00-1FFF;
143 | }
144 | /* greek */
145 | @font-face {
146 | font-family: 'Roboto';
147 | font-style: normal;
148 | font-weight: 500;
149 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2) format('woff2');
150 | unicode-range: U+0370-03FF;
151 | }
152 | /* vietnamese */
153 | @font-face {
154 | font-family: 'Roboto';
155 | font-style: normal;
156 | font-weight: 500;
157 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCxc4EsA.woff2) format('woff2');
158 | unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
159 | }
160 | /* latin-ext */
161 | @font-face {
162 | font-family: 'Roboto';
163 | font-style: normal;
164 | font-weight: 500;
165 | src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fChc4EsA.woff2) format('woff2');
166 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
167 | }
168 | /* latin */
169 | @font-face {
170 | font-family: 'Roboto';
171 | font-style: normal;
172 | font-weight: 500;
173 | src: local('Roboto Medium'), local('Roboto-Medium'), url(./KFOlCnqEu92Fr1MmEU9fBBc4.woff2) format('woff2');
174 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
175 | }
176 | /* cyrillic-ext */
177 | @font-face {
178 | font-family: 'Roboto';
179 | font-style: normal;
180 | font-weight: 700;
181 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2) format('woff2');
182 | unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
183 | }
184 | /* cyrillic */
185 | @font-face {
186 | font-family: 'Roboto';
187 | font-style: normal;
188 | font-weight: 700;
189 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2) format('woff2');
190 | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
191 | }
192 | /* greek-ext */
193 | @font-face {
194 | font-family: 'Roboto';
195 | font-style: normal;
196 | font-weight: 700;
197 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2) format('woff2');
198 | unicode-range: U+1F00-1FFF;
199 | }
200 | /* greek */
201 | @font-face {
202 | font-family: 'Roboto';
203 | font-style: normal;
204 | font-weight: 700;
205 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2) format('woff2');
206 | unicode-range: U+0370-03FF;
207 | }
208 | /* vietnamese */
209 | @font-face {
210 | font-family: 'Roboto';
211 | font-style: normal;
212 | font-weight: 700;
213 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2) format('woff2');
214 | unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
215 | }
216 | /* latin-ext */
217 | @font-face {
218 | font-family: 'Roboto';
219 | font-style: normal;
220 | font-weight: 700;
221 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2) format('woff2');
222 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
223 | }
224 | /* latin */
225 | @font-face {
226 | font-family: 'Roboto';
227 | font-style: normal;
228 | font-weight: 700;
229 | src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2');
230 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
231 | }
232 |
233 | .material-icons {
234 | font-family: 'Material Icons';
235 | font-weight: normal;
236 | font-style: normal;
237 | font-size: 24px;
238 | line-height: 1;
239 | letter-spacing: normal;
240 | text-transform: none;
241 | display: inline-block;
242 | white-space: nowrap;
243 | word-wrap: normal;
244 | direction: ltr;
245 | -webkit-font-feature-settings: 'liga';
246 | -webkit-font-smoothing: antialiased;
247 | }
248 |
--------------------------------------------------------------------------------
/src/components/MyComponent.js:
--------------------------------------------------------------------------------
1 | import m from './messages'
2 |
3 | const MyComponent = {};
4 |
5 | MyComponent.install = function (Vue) {
6 | Vue.component("vTree", () => import('./tree/Tree'));
7 | Vue.component("vCascader", () => import('./cascader/Cascader'));
8 | Vue.component("vUpload", () => import('./form/Upload'));
9 | Vue.component("vEditor", () => import('./form/Editor'));
10 | Vue.prototype.$message = m;
11 | Vue.prototype.$format = function (val) {
12 | if(typeof val === 'string'){
13 | if(isNaN(val)){
14 | return null;
15 | }
16 | // 价格转为整数
17 | const index = val.lastIndexOf(".");
18 | let p = "";
19 | if(index < 0){
20 | // 无小数
21 | p = val + "00";
22 | }else if(index === p.length - 2){
23 | // 1位小数
24 | p = val.replace("\.","") + "0";
25 | }else{
26 | // 2位小数
27 | p = val.replace("\.","")
28 | }
29 | return parseInt(p);
30 | }else if(typeof val === 'number'){
31 | if(val == null){
32 | return null;
33 | }
34 | const s = val + '';
35 | if(s.length === 0){
36 | return 0;
37 | }
38 | if(s.length === 1){
39 | return "0.0" + val;
40 | }
41 | if(s.length === 2){
42 | return "0." + val;
43 | }
44 | const i = s.indexOf(".");
45 | if(i < 0){
46 | return s.substring(0, s.length - 2) + "." + s.substring(s.length-2)
47 | }
48 | const num = s.substring(0,i) + s.substring(i+1);
49 | if(i === 1){
50 | // 1位整数
51 | return "0.0" + num;
52 | }
53 | if(i === 2){
54 | return "0." + num;
55 | }
56 | if( i > 2){
57 | return num.substring(0,i-2) + "." + num.substring(i-2)
58 | }
59 | }
60 | }
61 | }
62 |
63 |
64 | Object.deepCopy = function (src) {
65 | // for(let key in src){
66 | // if(!src[key]){
67 | // continue;
68 | // }
69 | // if(src[key].constructor === Array){
70 | // dest[key] = [];
71 | // Object.deepCopy(src[key],dest[key])
72 | // }else if(typeof src[key] === 'object'){
73 | // dest[key] = {};
74 | // Object.deepCopy(src[key],dest[key])
75 | // }
76 | // dest[key] = src[key];
77 | // }
78 | return JSON.parse(JSON.stringify(src));
79 | }
80 |
81 | export default MyComponent;
82 |
--------------------------------------------------------------------------------
/src/components/cascader/Cascader.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 | {{ data.item.label}}
8 |
9 | {{ data.item}}
10 |
11 |
12 |
13 |
14 |
15 |
178 |
179 |
185 |
--------------------------------------------------------------------------------
/src/components/form/Editor.vue:
--------------------------------------------------------------------------------
1 |
2 |
36 |
37 |
140 |
--------------------------------------------------------------------------------
/src/components/form/Upload.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
20 |
21 |
22 |
![]()
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
127 |
128 |
158 |
--------------------------------------------------------------------------------
/src/components/messages/index.js:
--------------------------------------------------------------------------------
1 | import {Message, MessageBox} from 'element-ui';
2 |
3 | const m = {
4 | info(msg) {
5 | Message({
6 | showClose: true,
7 | message: msg,
8 | type: 'info'
9 | });
10 | },
11 | error(msg) {
12 | Message({
13 | showClose: true,
14 | message: msg,
15 | type: 'error'
16 | });
17 | },
18 | success(msg) {
19 | Message({
20 | showClose: true,
21 | message: msg,
22 | type: 'success'
23 | });
24 | },
25 | warning(msg) {
26 | Message({
27 | showClose: true,
28 | message: msg,
29 | type: 'warning'
30 | });
31 | },
32 | confirm(msg) {
33 | return new Promise((resolve, reject) => {
34 | MessageBox.confirm(msg, '提示', {
35 | confirmButtonText: '确定',
36 | cancelButtonText: '取消',
37 | type: 'warning'
38 | }).then(() => {
39 | resolve()
40 | })
41 | .catch(() => {
42 | reject()
43 | });
44 | })
45 | },
46 | prompt(msg) {
47 | return new Promise((resolve, reject) => {
48 | MessageBox.prompt(msg, '提示', {
49 | confirmButtonText: '确定',
50 | cancelButtonText: '取消'
51 | }).then(({value}) => {
52 | resolve(value)
53 | }).catch(() => {
54 | reject()
55 | });
56 | })
57 | }
58 | }
59 |
60 | export default m;
61 |
--------------------------------------------------------------------------------
/src/components/tree/Tree.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
16 |
100 |
101 |
106 |
--------------------------------------------------------------------------------
/src/components/tree/TreeItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | {{open ? 'folder_open' : 'folder'}}
7 | insert_drive_file
8 |
9 |
10 |
11 | {{model.name}}
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
48 |
49 |
50 |
51 |
52 |
53 |
206 |
207 |
216 |
--------------------------------------------------------------------------------
/src/config.js:
--------------------------------------------------------------------------------
1 | const baseUrl = 'http://api.leyou.com';
2 | const config = {
3 | locale: 'zh-CN', // en-US, zh-CN
4 | url: baseUrl,
5 | debug: {
6 | http: false // http request log
7 | },
8 | api: `${baseUrl}/api`,
9 | theme:{
10 | primary: "#2196F3",
11 | secondary: "#455A64",
12 | accent: "#9c27b0",
13 | error: "#f44336",
14 | warning: "#FFC107",
15 | info: "#64B5F6",
16 | success: "#4caf50"
17 | },
18 | isDark:true,
19 | unitOption:[
20 | { header: '长度' },
21 | { value: 'mm'},
22 | { value: 'cm'},
23 | { value: 'dm'},
24 | { value: 'm'},
25 | { value: '寸'},
26 | { value: '英寸'},
27 | { value: '尺'},
28 | { divider: true },
29 | { header: '重量' },
30 | { value: 'mg'},
31 | { value: 'g'},
32 | { value: 'kg'},
33 | { value: 't'},
34 | { divider: true },
35 | { header: '像素' },
36 | { value: '万像素'},
37 | { divider: true },
38 | { header: '频率' },
39 | { value: 'Hz'},
40 | { value: 'mHz'},
41 | { value: 'gHz'},
42 | { divider: true },
43 | { header: '存储' },
44 | { value: 'KB'},
45 | { value: 'MB'},
46 | { value: 'GB'},
47 | { divider: true },
48 | { header: '电压' },
49 | { value: 'V'},
50 | { value: 'KV'},
51 | { divider: true },
52 | { header: '电池容量' },
53 | { value: 'mAh'},
54 | { divider: true },
55 | { header: '功率' },
56 | { value: 'w'},
57 | { value: 'Kw'},
58 | { divider: true },
59 | { header: '电流' },
60 | { value: 'μA'},
61 | { value: 'mA'},
62 | { value: 'A'},
63 | { divider: true },
64 | { header: '电阻' },
65 | { value: 'Ω'},
66 | { value: 'KΩ'},
67 | { value: 'A'},
68 | { divider: true },
69 | ]
70 | }
71 |
72 | export default config
73 |
--------------------------------------------------------------------------------
/src/http.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import axios from 'axios'
3 | import config from './config'
4 |
5 | axios.defaults.baseURL = config.api;
6 | axios.defaults.timeout = 3000;
7 | axios.defaults.withCredentials = true;
8 |
9 |
10 | Vue.prototype.$http = axios;
11 |
12 |
--------------------------------------------------------------------------------
/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 router from './router/index'
6 | import Vuetify from 'vuetify'
7 | import config from './config'
8 | import MyComponent from './components/MyComponent'
9 | import './http';
10 | import 'vuetify/dist/vuetify.min.css'
11 | import qs from 'qs'
12 | import 'element-ui/lib/theme-chalk/index.css';
13 | import './assets/material.css'
14 |
15 | Vue.use(Vuetify, { theme: config.theme})
16 | Vue.use(MyComponent)
17 | Vue.prototype.$qs = qs;
18 |
19 | Vue.config.productionTip = false;
20 |
21 | Vue.prototype.verify = function () {
22 | return this.$http.get("/auth/verify")
23 | };
24 |
25 | /* eslint-disable no-new */
26 | new Vue({
27 | el: '#app',
28 | router,
29 | components: { App },
30 | template: ''
31 | })
32 |
--------------------------------------------------------------------------------
/src/menu.js:
--------------------------------------------------------------------------------
1 | var menus = [
2 | {
3 | action: "home",
4 | title: "首页",
5 | path:"/index",
6 | items: [{ title: "统计", path: "/dashboard" }]
7 | },
8 | {
9 | action: "apps",
10 | title: "商品管理",
11 | path:"/item",
12 | items: [
13 | { title: "分类管理", path: "/category" },
14 | { title: "品牌管理",path: "/myBrand"},
15 | { title: "商品列表", path: "/myGoods" },
16 | { title: "规格参数", path: "/specification" }
17 | ]
18 | },
19 | {
20 | action: "people",
21 | title: "会员管理",
22 | path:"/user",
23 | items: [
24 | { title: "会员统计", path: "/statistics" },
25 | { title: "会员管理", path: "/list" }
26 | ]
27 | },
28 | {
29 | action: "attach_money",
30 | title: "销售管理",
31 | path:"/trade",
32 | items: [
33 | { title: "交易统计", path: "/statistics" },
34 | { title: "订单管理", path: "/order" },
35 | { title: "物流管理", path: "/logistics" },
36 | { title: "促销管理", path: "/promotion" }
37 | ]
38 | },
39 | {
40 | action: "settings",
41 | title: "权限管理",
42 | path:"/authority",
43 | items: [
44 | { title: "权限管理", path: "/list" },
45 | { title: "角色管理", path: "/role" },
46 | { title: "人员管理", path: "/member" }
47 | ]
48 | }
49 | ]
50 |
51 | export default menus;
52 |
--------------------------------------------------------------------------------
/src/mockDB.js:
--------------------------------------------------------------------------------
1 |
2 | // 分类
3 | const treeData = [{
4 | "id": 74,
5 | "name": "手机",
6 | "parentId": 0,
7 | "isParent": true,
8 | "sort": 2,
9 | "path": ["手机"],
10 | "children": [{
11 | "id": 75,
12 | "name": "手机通讯",
13 | "parentId": 74,
14 | "isParent": true,
15 | "sort": 1,
16 | "path": ["手机", "手机通讯"],
17 | "children": [{
18 | "id": 76,
19 | "name": "手机",
20 | "parentId": 75,
21 | "isParent": false,
22 | "sort": 1,
23 | "path": ["手机", "手机通讯", "手机"]
24 | }, {"id": 77, "name": "对讲机", "parentId": 75, "isParent": false, "sort": 2, "path": ["手机", "手机通讯", "对讲机"]}]
25 | }, {
26 | "id": 78,
27 | "name": "运营商",
28 | "parentId": 74,
29 | "isParent": true,
30 | "sort": 2,
31 | "path": ["手机", "运营商"],
32 | "children": [{
33 | "id": 79,
34 | "name": "合约机",
35 | "parentId": 78,
36 | "isParent": false,
37 | "sort": 1,
38 | "path": ["手机", "运营商", "合约机"]
39 | }, {
40 | "id": 80,
41 | "name": "选号中心",
42 | "parentId": 78,
43 | "isParent": false,
44 | "sort": 2,
45 | "path": ["手机", "运营商", "选号中心"]
46 | }, {"id": 81, "name": "装宽带", "parentId": 78, "isParent": false, "sort": 3, "path": ["手机", "运营商", "装宽带"]}, {
47 | "id": 82,
48 | "name": "办套餐",
49 | "parentId": 78,
50 | "isParent": false,
51 | "sort": 4,
52 | "path": ["手机", "运营商", "办套餐"]
53 | }]
54 | }, {
55 | "id": 83,
56 | "name": "手机配件",
57 | "parentId": 74,
58 | "isParent": true,
59 | "sort": 3,
60 | "path": ["手机", "手机配件"],
61 | "children": [{
62 | "id": 84,
63 | "name": "移动电源",
64 | "parentId": 83,
65 | "isParent": false,
66 | "sort": 1,
67 | "path": ["手机", "手机配件", "移动电源"]
68 | }, {
69 | "id": 85,
70 | "name": "电池/移动电源",
71 | "parentId": 83,
72 | "isParent": false,
73 | "sort": 2,
74 | "path": ["手机", "手机配件", "电池/移动电源"]
75 | }, {
76 | "id": 86,
77 | "name": "蓝牙耳机",
78 | "parentId": 83,
79 | "isParent": false,
80 | "sort": 3,
81 | "path": ["手机", "手机配件", "蓝牙耳机"]
82 | }, {
83 | "id": 87,
84 | "name": "充电器/数据线",
85 | "parentId": 83,
86 | "isParent": false,
87 | "sort": 4,
88 | "path": ["手机", "手机配件", "充电器/数据线"]
89 | }, {
90 | "id": 88,
91 | "name": "苹果周边",
92 | "parentId": 83,
93 | "isParent": false,
94 | "sort": 5,
95 | "path": ["手机", "手机配件", "苹果周边"]
96 | }, {
97 | "id": 89,
98 | "name": "手机耳机",
99 | "parentId": 83,
100 | "isParent": false,
101 | "sort": 6,
102 | "path": ["手机", "手机配件", "手机耳机"]
103 | }, {
104 | "id": 90,
105 | "name": "手机贴膜",
106 | "parentId": 83,
107 | "isParent": false,
108 | "sort": 7,
109 | "path": ["手机", "手机配件", "手机贴膜"]
110 | }, {
111 | "id": 91,
112 | "name": "手机存储卡",
113 | "parentId": 83,
114 | "isParent": false,
115 | "sort": 8,
116 | "path": ["手机", "手机配件", "手机存储卡"]
117 | }, {
118 | "id": 92,
119 | "name": "充电器",
120 | "parentId": 83,
121 | "isParent": false,
122 | "sort": 9,
123 | "path": ["手机", "手机配件", "充电器"]
124 | }, {
125 | "id": 93,
126 | "name": "数据线",
127 | "parentId": 83,
128 | "isParent": false,
129 | "sort": 10,
130 | "path": ["手机", "手机配件", "数据线"]
131 | }, {
132 | "id": 94,
133 | "name": "手机保护套",
134 | "parentId": 83,
135 | "isParent": false,
136 | "sort": 11,
137 | "path": ["手机", "手机配件", "手机保护套"]
138 | }, {
139 | "id": 95,
140 | "name": "车载配件",
141 | "parentId": 83,
142 | "isParent": false,
143 | "sort": 12,
144 | "path": ["手机", "手机配件", "车载配件"]
145 | }, {
146 | "id": 96,
147 | "name": "iPhone 配件",
148 | "parentId": 83,
149 | "isParent": false,
150 | "sort": 13,
151 | "path": ["手机", "手机配件", "iPhone 配件"]
152 | }, {
153 | "id": 97,
154 | "name": "手机电池",
155 | "parentId": 83,
156 | "isParent": false,
157 | "sort": 14,
158 | "path": ["手机", "手机配件", "手机电池"]
159 | }, {
160 | "id": 98,
161 | "name": "创意配件",
162 | "parentId": 83,
163 | "isParent": false,
164 | "sort": 15,
165 | "path": ["手机", "手机配件", "创意配件"]
166 | }, {
167 | "id": 99,
168 | "name": "便携/无线音响",
169 | "parentId": 83,
170 | "isParent": false,
171 | "sort": 16,
172 | "path": ["手机", "手机配件", "便携/无线音响"]
173 | }, {
174 | "id": 100,
175 | "name": "手机饰品",
176 | "parentId": 83,
177 | "isParent": false,
178 | "sort": 17,
179 | "path": ["手机", "手机配件", "手机饰品"]
180 | }, {
181 | "id": 101,
182 | "name": "拍照配件",
183 | "parentId": 83,
184 | "isParent": false,
185 | "sort": 18,
186 | "path": ["手机", "手机配件", "拍照配件"]
187 | }, {"id": 102, "name": "手机支架", "parentId": 83, "isParent": false, "sort": 19, "path": ["手机", "手机配件", "手机支架"]}]
188 | }]
189 | }, {
190 | "id": 103,
191 | "name": "家用电器",
192 | "parentId": 0,
193 | "isParent": true,
194 | "sort": 3,
195 | "path": ["家用电器"],
196 | "children": [{
197 | "id": 104,
198 | "name": "大 家 电",
199 | "parentId": 103,
200 | "isParent": true,
201 | "sort": 1,
202 | "path": ["家用电器", "大 家 电"],
203 | "children": [{
204 | "id": 105,
205 | "name": "平板电视",
206 | "parentId": 104,
207 | "isParent": false,
208 | "sort": 1,
209 | "path": ["家用电器", "大 家 电", "平板电视"]
210 | }, {
211 | "id": 106,
212 | "name": "空调",
213 | "parentId": 104,
214 | "isParent": false,
215 | "sort": 2,
216 | "path": ["家用电器", "大 家 电", "空调"]
217 | }, {
218 | "id": 107,
219 | "name": "冰箱",
220 | "parentId": 104,
221 | "isParent": false,
222 | "sort": 3,
223 | "path": ["家用电器", "大 家 电", "冰箱"]
224 | }, {
225 | "id": 108,
226 | "name": "洗衣机",
227 | "parentId": 104,
228 | "isParent": false,
229 | "sort": 4,
230 | "path": ["家用电器", "大 家 电", "洗衣机"]
231 | }, {
232 | "id": 109,
233 | "name": "家庭影院",
234 | "parentId": 104,
235 | "isParent": false,
236 | "sort": 5,
237 | "path": ["家用电器", "大 家 电", "家庭影院"]
238 | }, {
239 | "id": 110,
240 | "name": "DVD/电视盒子",
241 | "parentId": 104,
242 | "isParent": false,
243 | "sort": 6,
244 | "path": ["家用电器", "大 家 电", "DVD/电视盒子"]
245 | }, {
246 | "id": 111,
247 | "name": "迷你音响",
248 | "parentId": 104,
249 | "isParent": false,
250 | "sort": 7,
251 | "path": ["家用电器", "大 家 电", "迷你音响"]
252 | }, {
253 | "id": 112,
254 | "name": "冷柜/冰吧",
255 | "parentId": 104,
256 | "isParent": false,
257 | "sort": 8,
258 | "path": ["家用电器", "大 家 电", "冷柜/冰吧"]
259 | }, {
260 | "id": 113,
261 | "name": "家电配件",
262 | "parentId": 104,
263 | "isParent": false,
264 | "sort": 9,
265 | "path": ["家用电器", "大 家 电", "家电配件"]
266 | }, {
267 | "id": 114,
268 | "name": "功放",
269 | "parentId": 104,
270 | "isParent": false,
271 | "sort": 10,
272 | "path": ["家用电器", "大 家 电", "功放"]
273 | }, {
274 | "id": 115,
275 | "name": "回音壁/Soundbar",
276 | "parentId": 104,
277 | "isParent": false,
278 | "sort": 11,
279 | "path": ["家用电器", "大 家 电", "回音壁/Soundbar"]
280 | }, {
281 | "id": 116,
282 | "name": "Hi-Fi专区",
283 | "parentId": 104,
284 | "isParent": false,
285 | "sort": 12,
286 | "path": ["家用电器", "大 家 电", "Hi-Fi专区"]
287 | }, {
288 | "id": 117,
289 | "name": "电视盒子",
290 | "parentId": 104,
291 | "isParent": false,
292 | "sort": 13,
293 | "path": ["家用电器", "大 家 电", "电视盒子"]
294 | }, {"id": 118, "name": "酒柜", "parentId": 104, "isParent": false, "sort": 14, "path": ["家用电器", "大 家 电", "酒柜"]}]
295 | }, {
296 | "id": 119,
297 | "name": "厨卫大电",
298 | "parentId": 103,
299 | "isParent": true,
300 | "sort": 2,
301 | "path": ["家用电器", "厨卫大电"],
302 | "children": [{
303 | "id": 120,
304 | "name": "燃气灶",
305 | "parentId": 119,
306 | "isParent": false,
307 | "sort": 1,
308 | "path": ["家用电器", "厨卫大电", "燃气灶"]
309 | }, {
310 | "id": 121,
311 | "name": "油烟机",
312 | "parentId": 119,
313 | "isParent": false,
314 | "sort": 2,
315 | "path": ["家用电器", "厨卫大电", "油烟机"]
316 | }, {
317 | "id": 122,
318 | "name": "热水器",
319 | "parentId": 119,
320 | "isParent": false,
321 | "sort": 3,
322 | "path": ["家用电器", "厨卫大电", "热水器"]
323 | }, {
324 | "id": 123,
325 | "name": "消毒柜",
326 | "parentId": 119,
327 | "isParent": false,
328 | "sort": 4,
329 | "path": ["家用电器", "厨卫大电", "消毒柜"]
330 | }, {"id": 124, "name": "洗碗机", "parentId": 119, "isParent": false, "sort": 5, "path": ["家用电器", "厨卫大电", "洗碗机"]}]
331 | }, {
332 | "id": 125,
333 | "name": "厨房小电",
334 | "parentId": 103,
335 | "isParent": true,
336 | "sort": 3,
337 | "path": ["家用电器", "厨房小电"],
338 | "children": [{
339 | "id": 126,
340 | "name": "料理机",
341 | "parentId": 125,
342 | "isParent": false,
343 | "sort": 1,
344 | "path": ["家用电器", "厨房小电", "料理机"]
345 | }, {
346 | "id": 127,
347 | "name": "榨汁机",
348 | "parentId": 125,
349 | "isParent": false,
350 | "sort": 2,
351 | "path": ["家用电器", "厨房小电", "榨汁机"]
352 | }, {
353 | "id": 128,
354 | "name": "电饭煲",
355 | "parentId": 125,
356 | "isParent": false,
357 | "sort": 3,
358 | "path": ["家用电器", "厨房小电", "电饭煲"]
359 | }, {
360 | "id": 129,
361 | "name": "电压力锅",
362 | "parentId": 125,
363 | "isParent": false,
364 | "sort": 4,
365 | "path": ["家用电器", "厨房小电", "电压力锅"]
366 | }, {
367 | "id": 130,
368 | "name": "豆浆机",
369 | "parentId": 125,
370 | "isParent": false,
371 | "sort": 5,
372 | "path": ["家用电器", "厨房小电", "豆浆机"]
373 | }, {
374 | "id": 131,
375 | "name": "咖啡机",
376 | "parentId": 125,
377 | "isParent": false,
378 | "sort": 6,
379 | "path": ["家用电器", "厨房小电", "咖啡机"]
380 | }, {
381 | "id": 132,
382 | "name": "微波炉",
383 | "parentId": 125,
384 | "isParent": false,
385 | "sort": 7,
386 | "path": ["家用电器", "厨房小电", "微波炉"]
387 | }, {
388 | "id": 133,
389 | "name": "电烤箱",
390 | "parentId": 125,
391 | "isParent": false,
392 | "sort": 8,
393 | "path": ["家用电器", "厨房小电", "电烤箱"]
394 | }, {
395 | "id": 134,
396 | "name": "电磁炉",
397 | "parentId": 125,
398 | "isParent": false,
399 | "sort": 9,
400 | "path": ["家用电器", "厨房小电", "电磁炉"]
401 | }, {
402 | "id": 135,
403 | "name": "面包机",
404 | "parentId": 125,
405 | "isParent": false,
406 | "sort": 10,
407 | "path": ["家用电器", "厨房小电", "面包机"]
408 | }, {
409 | "id": 136,
410 | "name": "煮蛋器",
411 | "parentId": 125,
412 | "isParent": false,
413 | "sort": 11,
414 | "path": ["家用电器", "厨房小电", "煮蛋器"]
415 | }, {
416 | "id": 137,
417 | "name": "酸奶机",
418 | "parentId": 125,
419 | "isParent": false,
420 | "sort": 12,
421 | "path": ["家用电器", "厨房小电", "酸奶机"]
422 | }, {
423 | "id": 138,
424 | "name": "电炖锅",
425 | "parentId": 125,
426 | "isParent": false,
427 | "sort": 13,
428 | "path": ["家用电器", "厨房小电", "电炖锅"]
429 | }, {
430 | "id": 139,
431 | "name": "电水壶/热水瓶",
432 | "parentId": 125,
433 | "isParent": false,
434 | "sort": 14,
435 | "path": ["家用电器", "厨房小电", "电水壶/热水瓶"]
436 | }, {
437 | "id": 140,
438 | "name": "电饼铛",
439 | "parentId": 125,
440 | "isParent": false,
441 | "sort": 15,
442 | "path": ["家用电器", "厨房小电", "电饼铛"]
443 | }, {
444 | "id": 141,
445 | "name": "多用途锅",
446 | "parentId": 125,
447 | "isParent": false,
448 | "sort": 16,
449 | "path": ["家用电器", "厨房小电", "多用途锅"]
450 | }, {
451 | "id": 142,
452 | "name": "电烧烤炉",
453 | "parentId": 125,
454 | "isParent": false,
455 | "sort": 17,
456 | "path": ["家用电器", "厨房小电", "电烧烤炉"]
457 | }, {
458 | "id": 143,
459 | "name": "果蔬解毒机",
460 | "parentId": 125,
461 | "isParent": false,
462 | "sort": 18,
463 | "path": ["家用电器", "厨房小电", "果蔬解毒机"]
464 | }, {
465 | "id": 144,
466 | "name": "其它厨房电器",
467 | "parentId": 125,
468 | "isParent": false,
469 | "sort": 19,
470 | "path": ["家用电器", "厨房小电", "其它厨房电器"]
471 | }, {
472 | "id": 145,
473 | "name": "养生壶/煎药壶",
474 | "parentId": 125,
475 | "isParent": false,
476 | "sort": 20,
477 | "path": ["家用电器", "厨房小电", "养生壶/煎药壶"]
478 | }, {"id": 146, "name": "电热饭盒", "parentId": 125, "isParent": false, "sort": 21, "path": ["家用电器", "厨房小电", "电热饭盒"]}]
479 | }, {
480 | "id": 147,
481 | "name": "生活电器",
482 | "parentId": 103,
483 | "isParent": true,
484 | "sort": 4,
485 | "path": ["家用电器", "生活电器"],
486 | "children": [{
487 | "id": 148,
488 | "name": "取暖电器",
489 | "parentId": 147,
490 | "isParent": false,
491 | "sort": 1,
492 | "path": ["家用电器", "生活电器", "取暖电器"]
493 | }, {
494 | "id": 149,
495 | "name": "净化器",
496 | "parentId": 147,
497 | "isParent": false,
498 | "sort": 2,
499 | "path": ["家用电器", "生活电器", "净化器"]
500 | }, {
501 | "id": 150,
502 | "name": "加湿器",
503 | "parentId": 147,
504 | "isParent": false,
505 | "sort": 3,
506 | "path": ["家用电器", "生活电器", "加湿器"]
507 | }, {
508 | "id": 151,
509 | "name": "扫地机器人",
510 | "parentId": 147,
511 | "isParent": false,
512 | "sort": 4,
513 | "path": ["家用电器", "生活电器", "扫地机器人"]
514 | }, {
515 | "id": 152,
516 | "name": "吸尘器",
517 | "parentId": 147,
518 | "isParent": false,
519 | "sort": 5,
520 | "path": ["家用电器", "生活电器", "吸尘器"]
521 | }, {
522 | "id": 153,
523 | "name": "挂烫机/熨斗",
524 | "parentId": 147,
525 | "isParent": false,
526 | "sort": 6,
527 | "path": ["家用电器", "生活电器", "挂烫机/熨斗"]
528 | }, {
529 | "id": 154,
530 | "name": "插座",
531 | "parentId": 147,
532 | "isParent": false,
533 | "sort": 7,
534 | "path": ["家用电器", "生活电器", "插座"]
535 | }, {
536 | "id": 155,
537 | "name": "电话机",
538 | "parentId": 147,
539 | "isParent": false,
540 | "sort": 8,
541 | "path": ["家用电器", "生活电器", "电话机"]
542 | }, {
543 | "id": 156,
544 | "name": "清洁机",
545 | "parentId": 147,
546 | "isParent": false,
547 | "sort": 9,
548 | "path": ["家用电器", "生活电器", "清洁机"]
549 | }, {
550 | "id": 157,
551 | "name": "除湿机",
552 | "parentId": 147,
553 | "isParent": false,
554 | "sort": 10,
555 | "path": ["家用电器", "生活电器", "除湿机"]
556 | }, {
557 | "id": 158,
558 | "name": "干衣机",
559 | "parentId": 147,
560 | "isParent": false,
561 | "sort": 11,
562 | "path": ["家用电器", "生活电器", "干衣机"]
563 | }, {
564 | "id": 159,
565 | "name": "收录/音机",
566 | "parentId": 147,
567 | "isParent": false,
568 | "sort": 12,
569 | "path": ["家用电器", "生活电器", "收录/音机"]
570 | }, {
571 | "id": 160,
572 | "name": "电风扇",
573 | "parentId": 147,
574 | "isParent": false,
575 | "sort": 13,
576 | "path": ["家用电器", "生活电器", "电风扇"]
577 | }, {
578 | "id": 161,
579 | "name": "冷风扇",
580 | "parentId": 147,
581 | "isParent": false,
582 | "sort": 14,
583 | "path": ["家用电器", "生活电器", "冷风扇"]
584 | }, {
585 | "id": 162,
586 | "name": "其它生活电器",
587 | "parentId": 147,
588 | "isParent": false,
589 | "sort": 15,
590 | "path": ["家用电器", "生活电器", "其它生活电器"]
591 | }, {
592 | "id": 163,
593 | "name": "生活电器配件",
594 | "parentId": 147,
595 | "isParent": false,
596 | "sort": 16,
597 | "path": ["家用电器", "生活电器", "生活电器配件"]
598 | }, {
599 | "id": 164,
600 | "name": "净水器",
601 | "parentId": 147,
602 | "isParent": false,
603 | "sort": 17,
604 | "path": ["家用电器", "生活电器", "净水器"]
605 | }, {"id": 165, "name": "饮水机", "parentId": 147, "isParent": false, "sort": 18, "path": ["家用电器", "生活电器", "饮水机"]}]
606 | }, {
607 | "id": 166,
608 | "name": "个护健康",
609 | "parentId": 103,
610 | "isParent": true,
611 | "sort": 5,
612 | "path": ["家用电器", "个护健康"],
613 | "children": [{
614 | "id": 167,
615 | "name": "剃须刀",
616 | "parentId": 166,
617 | "isParent": false,
618 | "sort": 1,
619 | "path": ["家用电器", "个护健康", "剃须刀"]
620 | }, {
621 | "id": 168,
622 | "name": "剃/脱毛器",
623 | "parentId": 166,
624 | "isParent": false,
625 | "sort": 2,
626 | "path": ["家用电器", "个护健康", "剃/脱毛器"]
627 | }, {
628 | "id": 169,
629 | "name": "口腔护理",
630 | "parentId": 166,
631 | "isParent": false,
632 | "sort": 3,
633 | "path": ["家用电器", "个护健康", "口腔护理"]
634 | }, {
635 | "id": 170,
636 | "name": "电吹风",
637 | "parentId": 166,
638 | "isParent": false,
639 | "sort": 4,
640 | "path": ["家用电器", "个护健康", "电吹风"]
641 | }, {
642 | "id": 171,
643 | "name": "美容器",
644 | "parentId": 166,
645 | "isParent": false,
646 | "sort": 5,
647 | "path": ["家用电器", "个护健康", "美容器"]
648 | }, {
649 | "id": 172,
650 | "name": "理发器",
651 | "parentId": 166,
652 | "isParent": false,
653 | "sort": 6,
654 | "path": ["家用电器", "个护健康", "理发器"]
655 | }, {
656 | "id": 173,
657 | "name": "卷/直发器",
658 | "parentId": 166,
659 | "isParent": false,
660 | "sort": 7,
661 | "path": ["家用电器", "个护健康", "卷/直发器"]
662 | }, {
663 | "id": 174,
664 | "name": "按摩椅",
665 | "parentId": 166,
666 | "isParent": false,
667 | "sort": 8,
668 | "path": ["家用电器", "个护健康", "按摩椅"]
669 | }, {
670 | "id": 175,
671 | "name": "按摩器",
672 | "parentId": 166,
673 | "isParent": false,
674 | "sort": 9,
675 | "path": ["家用电器", "个护健康", "按摩器"]
676 | }, {
677 | "id": 176,
678 | "name": "足浴盆",
679 | "parentId": 166,
680 | "isParent": false,
681 | "sort": 10,
682 | "path": ["家用电器", "个护健康", "足浴盆"]
683 | }, {
684 | "id": 177,
685 | "name": "血压计",
686 | "parentId": 166,
687 | "isParent": false,
688 | "sort": 11,
689 | "path": ["家用电器", "个护健康", "血压计"]
690 | }, {
691 | "id": 178,
692 | "name": "电子秤/厨房秤",
693 | "parentId": 166,
694 | "isParent": false,
695 | "sort": 12,
696 | "path": ["家用电器", "个护健康", "电子秤/厨房秤"]
697 | }, {
698 | "id": 179,
699 | "name": "血糖仪",
700 | "parentId": 166,
701 | "isParent": false,
702 | "sort": 13,
703 | "path": ["家用电器", "个护健康", "血糖仪"]
704 | }, {
705 | "id": 180,
706 | "name": "体温计",
707 | "parentId": 166,
708 | "isParent": false,
709 | "sort": 14,
710 | "path": ["家用电器", "个护健康", "体温计"]
711 | }, {
712 | "id": 181,
713 | "name": "其它健康电器",
714 | "parentId": 166,
715 | "isParent": false,
716 | "sort": 15,
717 | "path": ["家用电器", "个护健康", "其它健康电器"]
718 | }, {
719 | "id": 182,
720 | "name": "计步器/脂肪检测仪",
721 | "parentId": 166,
722 | "isParent": false,
723 | "sort": 16,
724 | "path": ["家用电器", "个护健康", "计步器/脂肪检测仪"]
725 | }]
726 | }, {
727 | "id": 183,
728 | "name": "五金家装",
729 | "parentId": 103,
730 | "isParent": true,
731 | "sort": 6,
732 | "path": ["家用电器", "五金家装"],
733 | "children": [{
734 | "id": 184,
735 | "name": "电动工具",
736 | "parentId": 183,
737 | "isParent": false,
738 | "sort": 1,
739 | "path": ["家用电器", "五金家装", "电动工具"]
740 | }, {
741 | "id": 185,
742 | "name": "手动工具",
743 | "parentId": 183,
744 | "isParent": false,
745 | "sort": 2,
746 | "path": ["家用电器", "五金家装", "手动工具"]
747 | }, {
748 | "id": 186,
749 | "name": "仪器仪表",
750 | "parentId": 183,
751 | "isParent": false,
752 | "sort": 3,
753 | "path": ["家用电器", "五金家装", "仪器仪表"]
754 | }, {
755 | "id": 187,
756 | "name": "浴霸/排气扇",
757 | "parentId": 183,
758 | "isParent": false,
759 | "sort": 4,
760 | "path": ["家用电器", "五金家装", "浴霸/排气扇"]
761 | }, {
762 | "id": 188,
763 | "name": "灯具",
764 | "parentId": 183,
765 | "isParent": false,
766 | "sort": 5,
767 | "path": ["家用电器", "五金家装", "灯具"]
768 | }, {
769 | "id": 189,
770 | "name": "LED灯",
771 | "parentId": 183,
772 | "isParent": false,
773 | "sort": 6,
774 | "path": ["家用电器", "五金家装", "LED灯"]
775 | }, {
776 | "id": 190,
777 | "name": "洁身器",
778 | "parentId": 183,
779 | "isParent": false,
780 | "sort": 7,
781 | "path": ["家用电器", "五金家装", "洁身器"]
782 | }, {
783 | "id": 191,
784 | "name": "水槽",
785 | "parentId": 183,
786 | "isParent": false,
787 | "sort": 8,
788 | "path": ["家用电器", "五金家装", "水槽"]
789 | }, {
790 | "id": 192,
791 | "name": "龙头",
792 | "parentId": 183,
793 | "isParent": false,
794 | "sort": 9,
795 | "path": ["家用电器", "五金家装", "龙头"]
796 | }, {
797 | "id": 193,
798 | "name": "淋浴花洒",
799 | "parentId": 183,
800 | "isParent": false,
801 | "sort": 10,
802 | "path": ["家用电器", "五金家装", "淋浴花洒"]
803 | }, {
804 | "id": 194,
805 | "name": "厨卫五金",
806 | "parentId": 183,
807 | "isParent": false,
808 | "sort": 11,
809 | "path": ["家用电器", "五金家装", "厨卫五金"]
810 | }, {
811 | "id": 195,
812 | "name": "家具五金",
813 | "parentId": 183,
814 | "isParent": false,
815 | "sort": 12,
816 | "path": ["家用电器", "五金家装", "家具五金"]
817 | }, {
818 | "id": 196,
819 | "name": "门铃",
820 | "parentId": 183,
821 | "isParent": false,
822 | "sort": 13,
823 | "path": ["家用电器", "五金家装", "门铃"]
824 | }, {
825 | "id": 197,
826 | "name": "电气开关",
827 | "parentId": 183,
828 | "isParent": false,
829 | "sort": 14,
830 | "path": ["家用电器", "五金家装", "电气开关"]
831 | }, {
832 | "id": 198,
833 | "name": "插座",
834 | "parentId": 183,
835 | "isParent": false,
836 | "sort": 15,
837 | "path": ["家用电器", "五金家装", "插座"]
838 | }, {
839 | "id": 199,
840 | "name": "电工电料",
841 | "parentId": 183,
842 | "isParent": false,
843 | "sort": 16,
844 | "path": ["家用电器", "五金家装", "电工电料"]
845 | }, {
846 | "id": 200,
847 | "name": "监控安防",
848 | "parentId": 183,
849 | "isParent": false,
850 | "sort": 17,
851 | "path": ["家用电器", "五金家装", "监控安防"]
852 | }, {
853 | "id": 201,
854 | "name": "电线/线缆",
855 | "parentId": 183,
856 | "isParent": false,
857 | "sort": 18,
858 | "path": ["家用电器", "五金家装", "电线/线缆"]
859 | }]
860 | }]
861 | }];
862 | const brandData = [{"id": 1115, "name": "HTC", "image": "", "letter": "H", "categories": null}, {
863 | "id": 1528,
864 | "name": "LG",
865 | "image": "",
866 | "letter": "L",
867 | "categories": null
868 | }, {"id": 1912, "name": "NEC", "image": "", "letter": "N", "categories": null}, {
869 | "id": 2032,
870 | "name": "OPPO",
871 | "image": "http://img10.360buyimg.com/popshop/jfs/t2119/133/2264148064/4303/b8ab3755/56b2f385N8e4eb051.jpg",
872 | "letter": "O",
873 | "categories": null
874 | }, {"id": 2505, "name": "TCL", "image": "", "letter": "T", "categories": null}, {
875 | "id": 3177,
876 | "name": "爱贝多",
877 | "image": "",
878 | "letter": "A",
879 | "categories": null
880 | }, {"id": 3539, "name": "安桥(ONKYO)", "image": "", "letter": "A", "categories": null}, {
881 | "id": 3941,
882 | "name": "白金(PLATINUM)",
883 | "image": "",
884 | "letter": "B",
885 | "categories": null
886 | }, {"id": 4986, "name": "波导(BiRD)", "image": "", "letter": "B", "categories": null}, {
887 | "id": 6522,
888 | "name": "朵唯(DOOV)",
889 | "image": "",
890 | "letter": "D",
891 | "categories": null
892 | }];
893 | // 商品
894 | const goodsData = [{
895 | "id": 145,
896 | "brandId": 91515,
897 | "cid1": 74,
898 | "cid2": 75,
899 | "cid3": 76,
900 | "title": "锤子(smartisan) 坚果32 手机 ",
901 | "subTitle": "【新品开售享壕礼】下单即送智能手环、蓝牙耳机、自拍杆~ 点击购买坚果 Pro2 !",
902 | "saleable": true,
903 | "valid": true,
904 | "createTime": "2018-04-21T08:00:09.000+0000",
905 | "lastUpdateTime": "2018-04-29T03:26:43.000+0000",
906 | "spuDetail": null,
907 | "skus": null,
908 | "categoryName": "手机/手机通讯/手机",
909 | "brandName": "锤子(smartisan)"
910 | }, {
911 | "id": 207,
912 | "brandId": 2032,
913 | "cid1": 74,
914 | "cid2": 75,
915 | "cid3": 76,
916 | "title": "oopp2",
917 | "subTitle": "ppoo",
918 | "saleable": true,
919 | "valid": true,
920 | "createTime": "2018-04-29T01:46:15.000+0000",
921 | "lastUpdateTime": "2018-04-29T02:04:15.000+0000",
922 | "spuDetail": null,
923 | "skus": null,
924 | "categoryName": "手机/手机通讯/手机",
925 | "brandName": "OPPO"
926 | }, {
927 | "id": 206,
928 | "brandId": 7817,
929 | "cid1": 103,
930 | "cid2": 104,
931 | "cid3": 105,
932 | "title": "海尔模卡(MOOKA)U55H3 ",
933 | "subTitle": "【预约,4月23日2099限量抢】海尔匠心打造,互联网定制,55英寸客厅尊贵机皇,高颜值外观!55吋曲面性价比甄选戳这里",
934 | "saleable": true,
935 | "valid": true,
936 | "createTime": "2018-04-22T01:57:44.000+0000",
937 | "lastUpdateTime": "2018-04-29T01:38:48.000+0000",
938 | "spuDetail": null,
939 | "skus": null,
940 | "categoryName": "家用电器/大 家 电/平板电视",
941 | "brandName": "海尔(Haier)"
942 | }, {
943 | "id": 204,
944 | "brandId": 18374,
945 | "cid1": 103,
946 | "cid2": 104,
947 | "cid3": 105,
948 | "title": "小米(MI)电视",
949 | "subTitle": "电视新品上新 !",
950 | "saleable": true,
951 | "valid": true,
952 | "createTime": "2018-04-22T01:36:08.000+0000",
953 | "lastUpdateTime": "2018-04-22T01:36:08.000+0000",
954 | "spuDetail": null,
955 | "skus": null,
956 | "categoryName": "家用电器/大 家 电/平板电视",
957 | "brandName": "小米(MI)"
958 | }, {
959 | "id": 203,
960 | "brandId": 325399,
961 | "cid1": 74,
962 | "cid2": 83,
963 | "cid3": 90,
964 | "title": "亿色(ESR) 苹果8/7/6s/6钢化膜",
965 | "subTitle": "配件大焕新~亿色自营官方旗舰店优质好货,低至5.9元!手机保护充电线材任君挑选,凑单还能省运费点我进店抢购(此商品不参加上述活动)",
966 | "saleable": true,
967 | "valid": true,
968 | "createTime": "2018-04-21T16:30:24.000+0000",
969 | "lastUpdateTime": "2018-04-21T16:30:24.000+0000",
970 | "spuDetail": null,
971 | "skus": null,
972 | "categoryName": "手机/手机配件/手机贴膜",
973 | "brandName": "亿色(ESR)"
974 | }, {
975 | "id": 202,
976 | "brandId": 325398,
977 | "cid1": 74,
978 | "cid2": 83,
979 | "cid3": 90,
980 | "title": "ESK Plus抗蓝光钢化膜",
981 | "subTitle": "苹果8plus钢化膜 苹果7plus钢化膜 苹果6plus钢化膜 苹果6s plus钢化膜 iPhone8 plus钢化膜 iPhone7 plus钢化膜 iphone6 plus钢化膜",
982 | "saleable": true,
983 | "valid": true,
984 | "createTime": "2018-04-21T16:27:26.000+0000",
985 | "lastUpdateTime": "2018-04-21T16:27:26.000+0000",
986 | "spuDetail": null,
987 | "skus": null,
988 | "categoryName": "手机/手机配件/手机贴膜",
989 | "brandName": "比亚兹(ESK)"
990 | }, {
991 | "id": 182,
992 | "brandId": 18374,
993 | "cid1": 74,
994 | "cid2": 75,
995 | "cid3": 76,
996 | "title": "小米(MI) 小米5X 全网通4G智能手机 ",
997 | "subTitle": "骁龙 八核CPU处理器 5.5英寸屏幕【小米新品】~红米note5 AI智能双摄",
998 | "saleable": true,
999 | "valid": true,
1000 | "createTime": "2018-04-21T08:01:27.000+0000",
1001 | "lastUpdateTime": "2018-04-21T08:01:27.000+0000",
1002 | "spuDetail": null,
1003 | "skus": null,
1004 | "categoryName": "手机/手机通讯/手机",
1005 | "brandName": "小米(MI)"
1006 | }, {
1007 | "id": 181,
1008 | "brandId": 25591,
1009 | "cid1": 74,
1010 | "cid2": 75,
1011 | "cid3": 76,
1012 | "title": "vivo Y75 全面屏手机 4GB+32GB 移动联通电信4G手机 双卡双待 ",
1013 | "subTitle": "vivo X21新一代全面屏·6+128G大内存·AI智慧拍照·照亮你的美·现货抢购中",
1014 | "saleable": true,
1015 | "valid": true,
1016 | "createTime": "2018-04-21T08:01:24.000+0000",
1017 | "lastUpdateTime": "2018-04-21T08:01:24.000+0000",
1018 | "spuDetail": null,
1019 | "skus": null,
1020 | "categoryName": "手机/手机通讯/手机",
1021 | "brandName": "vivo"
1022 | }, {
1023 | "id": 180,
1024 | "brandId": 12669,
1025 | "cid1": 74,
1026 | "cid2": 75,
1027 | "cid3": 76,
1028 | "title": "魅族(MEIZU) pro 6 plus手机 移动联通版 ",
1029 | "subTitle": "【现货 劲爆价促销】魅蓝6 低至649元 评价更有好礼送",
1030 | "saleable": true,
1031 | "valid": true,
1032 | "createTime": "2018-04-21T08:01:21.000+0000",
1033 | "lastUpdateTime": "2018-04-21T08:01:21.000+0000",
1034 | "spuDetail": null,
1035 | "skus": null,
1036 | "categoryName": "手机/手机通讯/手机",
1037 | "brandName": "魅族(MEIZU)"
1038 | }, {
1039 | "id": 179,
1040 | "brandId": 8557,
1041 | "cid1": 74,
1042 | "cid2": 75,
1043 | "cid3": 76,
1044 | "title": "华为(HUAWEI) 荣耀7C 畅玩7C手机 全网通4G 全面屏 ",
1045 | "subTitle": "【官方正品 全国联保】人脸识别 双摄美拍!高配拍送荣耀耳机@64G优惠购",
1046 | "saleable": true,
1047 | "valid": true,
1048 | "createTime": "2018-04-21T08:01:19.000+0000",
1049 | "lastUpdateTime": "2018-04-21T08:01:19.000+0000",
1050 | "spuDetail": null,
1051 | "skus": null,
1052 | "categoryName": "手机/手机通讯/手机",
1053 | "brandName": "华为(HUAWEI)"
1054 | }, {
1055 | "id": 178,
1056 | "brandId": 8557,
1057 | "cid1": 74,
1058 | "cid2": 75,
1059 | "cid3": 76,
1060 | "title": "华为(HUAWEI) 荣耀 畅玩6 手机 ",
1061 | "subTitle": "【京仓直发】柔光自拍,舒适握感,长续航!【荣耀",
1062 | "saleable": true,
1063 | "valid": true,
1064 | "createTime": "2018-04-21T08:01:17.000+0000",
1065 | "lastUpdateTime": "2018-04-21T08:01:17.000+0000",
1066 | "spuDetail": null,
1067 | "skus": null,
1068 | "categoryName": "手机/手机通讯/手机",
1069 | "brandName": "华为(HUAWEI)"
1070 | }, {
1071 | "id": 177,
1072 | "brandId": 18374,
1073 | "cid1": 74,
1074 | "cid2": 75,
1075 | "cid3": 76,
1076 | "title": "小米(MI) 小米Max2 手机 双卡双待 ",
1077 | "subTitle": "【小米大屏手机】6.44英寸屏,5300毫安电池。大屏玩王者荣耀更爽!变焦双摄小米5X",
1078 | "saleable": true,
1079 | "valid": true,
1080 | "createTime": "2018-04-21T08:01:16.000+0000",
1081 | "lastUpdateTime": "2018-04-21T08:01:16.000+0000",
1082 | "spuDetail": null,
1083 | "skus": null,
1084 | "categoryName": "手机/手机通讯/手机",
1085 | "brandName": "小米(MI)"
1086 | }, {
1087 | "id": 176,
1088 | "brandId": 25591,
1089 | "cid1": 74,
1090 | "cid2": 75,
1091 | "cid3": 76,
1092 | "title": "vivo X21 屏幕指纹 双摄拍照手机 6GB+128GB 移动联通电信4G 双卡双待 ",
1093 | "subTitle": "【稀缺货品】屏幕指纹识别·3D曲面背部玻璃·AI智慧拍照·照亮你的美·更多精彩点击",
1094 | "saleable": true,
1095 | "valid": true,
1096 | "createTime": "2018-04-21T08:01:14.000+0000",
1097 | "lastUpdateTime": "2018-04-21T08:01:14.000+0000",
1098 | "spuDetail": null,
1099 | "skus": null,
1100 | "categoryName": "手机/手机通讯/手机",
1101 | "brandName": "vivo"
1102 | }, {
1103 | "id": 175,
1104 | "brandId": 8557,
1105 | "cid1": 74,
1106 | "cid2": 75,
1107 | "cid3": 76,
1108 | "title": "华为(HUAWEI) nova 3e 手机 ",
1109 | "subTitle": "【现货,送五重好礼】前置2400万自然美妆,送华为原装耳机等!华为nova2s热销中~",
1110 | "saleable": true,
1111 | "valid": true,
1112 | "createTime": "2018-04-21T08:01:13.000+0000",
1113 | "lastUpdateTime": "2018-04-21T08:01:13.000+0000",
1114 | "spuDetail": null,
1115 | "skus": null,
1116 | "categoryName": "手机/手机通讯/手机",
1117 | "brandName": "华为(HUAWEI)"
1118 | }, {
1119 | "id": 174,
1120 | "brandId": 18374,
1121 | "cid1": 74,
1122 | "cid2": 75,
1123 | "cid3": 76,
1124 | "title": "小米(MI) 红米5 Plus 4+64G 全面屏手机 双卡双待 ",
1125 | "subTitle": "下单送好礼 自营配送 18:9千元全面屏 前置柔光自拍 4000毫安大电池 骁龙八核处理器",
1126 | "saleable": true,
1127 | "valid": true,
1128 | "createTime": "2018-04-21T08:01:10.000+0000",
1129 | "lastUpdateTime": "2018-04-21T08:01:10.000+0000",
1130 | "spuDetail": null,
1131 | "skus": null,
1132 | "categoryName": "手机/手机通讯/手机",
1133 | "brandName": "小米(MI)"
1134 | }, {
1135 | "id": 173,
1136 | "brandId": 8557,
1137 | "cid1": 74,
1138 | "cid2": 75,
1139 | "cid3": 76,
1140 | "title": "华为(HUAWEI) 荣耀 畅玩6 全网通4G智能手机 双卡双待 2G+16G ",
1141 | "subTitle": "【京东仓发货 正品保证】柔光自拍,舒适握感,长续航!新品荣耀畅玩7C!",
1142 | "saleable": true,
1143 | "valid": true,
1144 | "createTime": "2018-04-21T08:01:08.000+0000",
1145 | "lastUpdateTime": "2018-04-21T08:01:08.000+0000",
1146 | "spuDetail": null,
1147 | "skus": null,
1148 | "categoryName": "手机/手机通讯/手机",
1149 | "brandName": "华为(HUAWEI)"
1150 | }, {
1151 | "id": 172,
1152 | "brandId": 8557,
1153 | "cid1": 74,
1154 | "cid2": 75,
1155 | "cid3": 76,
1156 | "title": "华为(HUAWEI) 华为 畅享6S 手机 ",
1157 | "subTitle": "京东配送! 骁龙芯片!金属机身! 【新品畅享7s】",
1158 | "saleable": true,
1159 | "valid": true,
1160 | "createTime": "2018-04-21T08:01:07.000+0000",
1161 | "lastUpdateTime": "2018-04-21T08:01:07.000+0000",
1162 | "spuDetail": null,
1163 | "skus": null,
1164 | "categoryName": "手机/手机通讯/手机",
1165 | "brandName": "华为(HUAWEI)"
1166 | }, {
1167 | "id": 171,
1168 | "brandId": 8557,
1169 | "cid1": 74,
1170 | "cid2": 75,
1171 | "cid3": 76,
1172 | "title": "华为(HUAWEI) 华为P20 Pro 全面屏 手机 ",
1173 | "subTitle": "【全国多仓发货】送价值158元原装礼盒(自拍杆+数据线+指环扣)+原装耳机!抢华为P20",
1174 | "saleable": true,
1175 | "valid": true,
1176 | "createTime": "2018-04-21T08:01:05.000+0000",
1177 | "lastUpdateTime": "2018-04-21T08:01:05.000+0000",
1178 | "spuDetail": null,
1179 | "skus": null,
1180 | "categoryName": "手机/手机通讯/手机",
1181 | "brandName": "华为(HUAWEI)"
1182 | }, {
1183 | "id": 170,
1184 | "brandId": 12669,
1185 | "cid1": 74,
1186 | "cid2": 75,
1187 | "cid3": 76,
1188 | "title": "魅族(MEIZU) 魅族 魅蓝A5 4G手机 双卡双待 ",
1189 | "subTitle": "魅族新品千元机",
1190 | "saleable": true,
1191 | "valid": true,
1192 | "createTime": "2018-04-21T08:01:03.000+0000",
1193 | "lastUpdateTime": "2018-04-21T08:01:03.000+0000",
1194 | "spuDetail": null,
1195 | "skus": null,
1196 | "categoryName": "手机/手机通讯/手机",
1197 | "brandName": "魅族(MEIZU)"
1198 | }, {
1199 | "id": 169,
1200 | "brandId": 8557,
1201 | "cid1": 74,
1202 | "cid2": 75,
1203 | "cid3": 76,
1204 | "title": "华为(HUAWEI) 荣耀V10手机 ",
1205 | "subTitle": "【下单立减】送荣耀自拍杆+荣耀2合1数据线+荣耀手机支架+壳膜套装!荣耀畅玩7X",
1206 | "saleable": true,
1207 | "valid": true,
1208 | "createTime": "2018-04-21T08:01:02.000+0000",
1209 | "lastUpdateTime": "2018-04-21T08:01:02.000+0000",
1210 | "spuDetail": null,
1211 | "skus": null,
1212 | "categoryName": "手机/手机通讯/手机",
1213 | "brandName": "华为(HUAWEI)"
1214 | }, {
1215 | "id": 168,
1216 | "brandId": 18374,
1217 | "cid1": 74,
1218 | "cid2": 75,
1219 | "cid3": 76,
1220 | "title": "小米(MI) 小米5X 手机 ",
1221 | "subTitle": "【爆款低价 移动/公开全网通不做混发,请放心购买!】5.5”屏幕,变焦双摄!戳戳小米6~",
1222 | "saleable": true,
1223 | "valid": true,
1224 | "createTime": "2018-04-21T08:00:59.000+0000",
1225 | "lastUpdateTime": "2018-04-21T08:00:59.000+0000",
1226 | "spuDetail": null,
1227 | "skus": null,
1228 | "categoryName": "手机/手机通讯/手机",
1229 | "brandName": "小米(MI)"
1230 | }, {
1231 | "id": 167,
1232 | "brandId": 8557,
1233 | "cid1": 74,
1234 | "cid2": 75,
1235 | "cid3": 76,
1236 | "title": "华为(HUAWEI) 畅享6S 移动联通电信4G手机 ",
1237 | "subTitle": "【正品国行,全新原封】骁龙芯片!金属机身!享看又享玩!荣耀8青春热卖中!",
1238 | "saleable": true,
1239 | "valid": true,
1240 | "createTime": "2018-04-21T08:00:57.000+0000",
1241 | "lastUpdateTime": "2018-04-21T08:00:57.000+0000",
1242 | "spuDetail": null,
1243 | "skus": null,
1244 | "categoryName": "手机/手机通讯/手机",
1245 | "brandName": "华为(HUAWEI)"
1246 | }, {
1247 | "id": 166,
1248 | "brandId": 8557,
1249 | "cid1": 74,
1250 | "cid2": 75,
1251 | "cid3": 76,
1252 | "title": "华为(HUAWEI) Mate10 手机 ",
1253 | "subTitle": "送华为原装视窗保护套+华为原装蓝牙耳机+乐心运动手环+钢化膜等!mate10pro",
1254 | "saleable": true,
1255 | "valid": true,
1256 | "createTime": "2018-04-21T08:00:56.000+0000",
1257 | "lastUpdateTime": "2018-04-21T08:00:56.000+0000",
1258 | "spuDetail": null,
1259 | "skus": null,
1260 | "categoryName": "手机/手机通讯/手机",
1261 | "brandName": "华为(HUAWEI)"
1262 | }, {
1263 | "id": 165,
1264 | "brandId": 18374,
1265 | "cid1": 74,
1266 | "cid2": 75,
1267 | "cid3": 76,
1268 | "title": "小米(MI) 小米note3 手机 ",
1269 | "subTitle": "赠壳膜全国联保京东配送/屏四曲面陶瓷机身骁龙835小米MIX2点击购买",
1270 | "saleable": true,
1271 | "valid": true,
1272 | "createTime": "2018-04-21T08:00:54.000+0000",
1273 | "lastUpdateTime": "2018-04-21T08:00:54.000+0000",
1274 | "spuDetail": null,
1275 | "skus": null,
1276 | "categoryName": "手机/手机通讯/手机",
1277 | "brandName": "小米(MI)"
1278 | }, {
1279 | "id": 164,
1280 | "brandId": 8557,
1281 | "cid1": 74,
1282 | "cid2": 75,
1283 | "cid3": 76,
1284 | "title": "华为(HUAWEI) 荣耀8 手机 ",
1285 | "subTitle": "【店长推荐】美得与众不同!【荣耀新款全面屏手机→荣耀畅玩7C】",
1286 | "saleable": true,
1287 | "valid": true,
1288 | "createTime": "2018-04-21T08:00:51.000+0000",
1289 | "lastUpdateTime": "2018-04-21T08:00:51.000+0000",
1290 | "spuDetail": null,
1291 | "skus": null,
1292 | "categoryName": "手机/手机通讯/手机",
1293 | "brandName": "华为(HUAWEI)"
1294 | }];
1295 | // 规格参数
1296 | const phoneSpec = [{
1297 | "group": "主体",
1298 | "params": [{"k": "品牌", "searchable": false, "global": true, "options": []}, {
1299 | "k": "型号",
1300 | "searchable": false,
1301 | "global": true,
1302 | "options": []
1303 | }, {"k": "上市年份", "searchable": false, "global": true, "options": [], "numerical": true, "unit": "年"}]
1304 | }, {
1305 | "group": "基本信息",
1306 | "params": [{"k": "机身颜色", "searchable": false, "global": false, "options": []}, {
1307 | "k": "机身重量(g)",
1308 | "searchable": false,
1309 | "global": true,
1310 | "options": [],
1311 | "numerical": true,
1312 | "unit": "g"
1313 | }, {"k": "机身材质工艺", "searchable": false, "global": true, "options": []}]
1314 | }, {
1315 | "group": "操作系统",
1316 | "params": [{"k": "操作系统", "searchable": true, "global": true, "options": ["安卓", "IOS", "Windows", "功能机"]}]
1317 | }, {
1318 | "group": "主芯片",
1319 | "params": [{"k": "CPU品牌", "searchable": true, "global": true, "options": ["骁龙(Snapdragon)", "麒麟"]}, {
1320 | "k": "CPU型号",
1321 | "searchable": false,
1322 | "global": true,
1323 | "options": []
1324 | }, {"k": "CPU核数", "searchable": true, "global": true, "options": ["一核", "二核", "四核", "六核", "八核", "十核"]}, {
1325 | "k": "CPU频率",
1326 | "searchable": true,
1327 | "global": true,
1328 | "options": [],
1329 | "numerical": true,
1330 | "unit": "GHz"
1331 | }]
1332 | }, {
1333 | "group": "存储",
1334 | "params": [{
1335 | "k": "内存",
1336 | "searchable": true,
1337 | "global": false,
1338 | "options": ["1GB及以下", "2GB", "3GB", "4GB", "6GB", "8GB"],
1339 | "numerical": false,
1340 | "unit": "GB"
1341 | }, {
1342 | "k": "机身存储",
1343 | "searchable": true,
1344 | "global": false,
1345 | "options": ["8GB及以下", "16GB", "32GB", "64GB", "128GB", "256GB"],
1346 | "numerical": false,
1347 | "unit": "GB"
1348 | }]
1349 | }, {
1350 | "group": "屏幕",
1351 | "params": [{
1352 | "k": "主屏幕尺寸(英寸)",
1353 | "searchable": true,
1354 | "global": true,
1355 | "options": [],
1356 | "numerical": true,
1357 | "unit": "英寸"
1358 | }, {"k": "分辨率", "searchable": false, "global": true, "options": []}]
1359 | }, {
1360 | "group": "摄像头",
1361 | "params": [{
1362 | "k": "前置摄像头",
1363 | "searchable": true,
1364 | "global": true,
1365 | "options": [],
1366 | "numerical": true,
1367 | "unit": "万"
1368 | }, {"k": "后置摄像头", "searchable": true, "global": true, "options": [], "numerical": true, "unit": "万"}]
1369 | }, {
1370 | "group": "电池信息",
1371 | "params": [{"k": "电池容量(mAh)", "searchable": true, "global": true, "options": [], "numerical": true, "unit": "mAh"}]
1372 | }];
1373 |
1374 | export {treeData, phoneSpec, brandData, goodsData}
1375 |
--------------------------------------------------------------------------------
/src/pages/Dashboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
108 |
109 |
112 |
--------------------------------------------------------------------------------
/src/pages/Layout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{ username }}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
35 |
36 |
37 |
38 | {{ item.title }}
39 |
40 |
41 |
42 |
43 |
44 | {{ subItem.title }}
45 |
46 |
47 | {{ subItem.action }}
48 |
49 |
50 |
51 |
52 |
53 |
54 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | invert_colors
82 |
83 |
84 |
85 | account_box
86 |
87 |
88 |
89 |
90 |
91 | chevron_right
92 | {{item1}}
93 | {{item2}}
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
149 |
150 |
155 |
--------------------------------------------------------------------------------
/src/pages/Login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 乐优商城后台管理
10 |
11 |
12 |
13 |
14 |
15 |
24 |
25 |
26 |
27 |
28 | 登录
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 用户名和密码不能为空
38 |
39 |
40 |
41 |
42 |
43 |
86 |
--------------------------------------------------------------------------------
/src/pages/item/Category.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
83 |
84 |
87 |
--------------------------------------------------------------------------------
/src/pages/item/MyBrand.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | add
6 |
7 |
8 | delete
9 |
10 |
11 |
12 |
13 |
14 |
24 |
25 |
26 |
27 |
28 |
29 | |
30 | {{ props.item.id }} |
31 | {{ props.item.name }} |
32 | ![]() |
33 | {{ props.item.letter }} |
34 |
35 |
36 |
37 | edit
38 |
39 |
40 |
41 | delete
42 |
43 |
44 | |
45 |
46 |
47 |
48 |
49 |
50 | {{isEdit?'修改':'新增'}}品牌
51 |
52 |
53 | close
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
219 |
220 |
223 |
--------------------------------------------------------------------------------
/src/pages/item/MyBrandForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 | LOGO
15 |
16 |
17 |
24 |
25 |
26 |
27 |
28 | 清空
29 | 保存
30 |
31 |
32 |
33 |
34 |
108 |
109 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/src/pages/item/MyGoods.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 新增商品
5 | 全部删除
6 | 全部上架
7 | 全部下架
8 |
9 |
10 | 状态:
11 |
12 |
13 |
14 |
15 |
16 | 上架
17 |
18 |
19 | 下架
20 |
21 |
22 |
23 |
24 |
25 |
26 |
36 |
37 |
38 |
39 |
40 |
41 | |
42 | {{ props.item.id }} |
43 | {{ props.item.title }} |
44 | {{ props.item.cname}} |
45 | {{ props.item.bname }} |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | 下架
54 | 上架
55 | 秒杀
56 | |
57 |
58 |
59 |
60 | 对不起,没有查询到任何数据 :(
61 |
62 |
63 |
64 | 共{{props.itemsLength}}条,当前:{{ props.pageStart }} - {{ props.pageStop }}
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | {{isEdit ? '修改' : '新增'}}商品
73 |
74 |
75 | close
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | 上一步
85 |
86 |
87 | 下一步
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 商品秒杀
99 |
100 |
101 | close
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
369 |
370 |
373 |
--------------------------------------------------------------------------------
/src/pages/item/MyGoodsForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 基本信息
5 |
6 |
7 |
8 | 商品描述
9 |
10 |
11 |
12 | 规格参数
13 |
14 |
15 |
16 | SKU属性
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
35 |
36 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | {{spec.group}}
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | {{spec.k}}
83 |
84 |
92 |
93 | add
94 |
95 |
96 |
97 | {{spec.k}}
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | delete
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | SKU列表
121 |
122 |
123 |
124 |
125 |
126 | {{v}}
129 | |
130 |
131 |
133 | |
134 |
135 |
137 | |
138 |
141 |
142 |
143 | |
144 |
145 |
146 |
147 |
148 |
149 | 上传图片
150 |
151 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | 请选择商品属性
166 |
167 |
168 |
169 |
170 |
171 |
179 | 保存商品信息
180 | cloud_upload
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
590 |
591 |
625 |
--------------------------------------------------------------------------------
/src/pages/item/MySeckillForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
21 |
28 |
35 |
36 |
37 |
38 |
50 |
59 |
60 |
61 |
70 |
77 |
82 |
83 | Cancel
84 | OK
85 |
86 |
87 |
88 |
89 |
100 |
109 |
110 |
111 |
120 |
127 |
132 |
133 | Cancel
134 | OK
135 |
136 |
137 |
138 |
139 |
140 |
141 |
147 |
148 | {{ props.item.spec }} |
149 | {{ props.item.price }} |
150 | {{ props.item.stock }} |
151 |
152 | |
158 |
159 |
163 | |
164 |
165 |
166 | |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 | 清空
175 | 保存
176 |
177 |
178 |
179 |
180 |
362 |
363 |
366 |
--------------------------------------------------------------------------------
/src/pages/item/Specification.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 选择分类,查看规格参数模板:
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | chevron_right
16 | {{p}}
17 |
18 |
19 |
20 |
21 | clear
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
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 | add
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | 添加新属性
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | 保存规格模板
95 |
96 |
97 |
98 | 添加新分组
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
238 |
239 |
249 |
--------------------------------------------------------------------------------
/src/pages/trade/Promotion.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 促销管理
4 |
5 |
6 |
7 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/src/pages/user/Statistics.vue:
--------------------------------------------------------------------------------
1 |
2 | statistics
3 |
4 |
5 |
10 |
11 |
14 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 |
5 | Vue.use(Router)
6 |
7 | function route (path, file, name, children) {
8 | return {
9 | exact: true,
10 | path,
11 | name,
12 | children,
13 | component: () => import('../pages' + file)
14 | }
15 | }
16 |
17 | export default new Router({
18 | routes: [
19 | route("/login",'/Login',"Login"),
20 | {
21 | path:"/",
22 | component: () => import('../pages/Layout'), //异步加载
23 | redirect:"/login",
24 | children:[
25 | route("/login","/Login","Login"),
26 | route("/index/dashboard","/Dashboard","Dashboard"),
27 | route("/item/category",'/item/Category',"Category"),
28 | route("/item/myBrand",'/item/MyBrand',"MyBrand"),
29 | route("/item/myGoods",'/item/MyGoods','MyGoods'),
30 | route("/item/specification",'/item/Specification',"Specification"),
31 | route("/user/statistics",'/item/Statistics',"Statistics"),
32 | route("/trade/promotion",'/trade/Promotion',"Promotion")
33 | ]
34 | }
35 | ]
36 | })
37 |
--------------------------------------------------------------------------------
/src/verify.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | Vue.prototype.verify = function () {
4 | return this.$http.get("/auth/verify")
5 | };
6 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lyj8330328/leyou-manage-web/06065811541904518c40e4abc9ff620756f214b2/static/.gitkeep
--------------------------------------------------------------------------------