Bladeren bron

竞拍前端代码管理后台代码

zhangyinghao 1 jaar geleden
commit
b265488839
47 gewijzigde bestanden met toevoegingen van 17013 en 0 verwijderingen
  1. 12 0
      .babelrc
  2. 9 0
      .editorconfig
  3. 14 0
      .gitignore
  4. 10 0
      .postcssrc.js
  5. 21 0
      README.md
  6. 41 0
      build/build.js
  7. 54 0
      build/check-versions.js
  8. BIN
      build/logo.png
  9. 101 0
      build/utils.js
  10. 22 0
      build/vue-loader.conf.js
  11. 86 0
      build/webpack.base.conf.js
  12. 181 0
      build/webpack.dev.conf.js
  13. 145 0
      build/webpack.prod.conf.js
  14. 7 0
      config/dev.env.js
  15. 78 0
      config/index.js
  16. 4 0
      config/prod.env.js
  17. 12 0
      index.html
  18. 12310 0
      package-lock.json
  19. 72 0
      package.json
  20. 41 0
      src/App.vue
  21. BIN
      src/assets/logo.png
  22. 232 0
      src/components/modifydialog/infomodify.vue
  23. 232 0
      src/components/modifydialog/previewmodify.vue
  24. 48 0
      src/main.js
  25. 125 0
      src/page/commodity/dealCommodity.vue
  26. 163 0
      src/page/commodity/dealMember.vue
  27. 117 0
      src/page/commodity/seeCommodity.vue
  28. 417 0
      src/page/commodity/seeCommodityType.vue
  29. 143 0
      src/page/index.vue
  30. 321 0
      src/page/info/manageinfo.vue
  31. 161 0
      src/page/knowledge/addknowledge.vue
  32. 233 0
      src/page/knowledge/mangeknowledge.vue
  33. 163 0
      src/page/law/addlaw.vue
  34. 231 0
      src/page/law/mangelaw.vue
  35. 208 0
      src/page/layout.vue
  36. 222 0
      src/page/login.vue
  37. 12 0
      src/page/my.vue
  38. 293 0
      src/page/preview/mangepreview.vue
  39. 12 0
      src/page/setting.vue
  40. 12 0
      src/page/user/adduser.vue
  41. 339 0
      src/page/user/mangeuser.vue
  42. 12 0
      src/page/visit.vue
  43. 97 0
      src/router/index.js
  44. 0 0
      static/.gitkeep
  45. BIN
      static/background.png
  46. BIN
      static/eye.png
  47. BIN
      static/user-icon/risatoar.jpg

+ 12 - 0
.babelrc

@@ -0,0 +1,12 @@
+{
+  "presets": [
+    ["env", {
+      "modules": false,
+      "targets": {
+        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
+      }
+    }],
+    "stage-2"
+  ],
+  "plugins": ["transform-vue-jsx", "transform-runtime"]
+}

+ 9 - 0
.editorconfig

@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+.DS_Store
+node_modules/
+/dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 10 - 0
.postcssrc.js

@@ -0,0 +1,10 @@
+// https://github.com/michael-ciniawsky/postcss-load-config
+
+module.exports = {
+  "plugins": {
+    "postcss-import": {},
+    "postcss-url": {},
+    // to edit target browsers: use "browserslist" field in package.json
+    "autoprefixer": {}
+  }
+}

+ 21 - 0
README.md

@@ -0,0 +1,21 @@
+# backstage
+
+> auctionweb backstage
+
+## Build Setup
+
+``` bash
+# install dependencies
+npm install
+
+# serve with hot reload at localhost:8080
+npm run dev
+
+# build for production with minification
+npm run build
+
+# build for production and view the bundle analyzer report
+npm run build --report
+```
+
+For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

+ 41 - 0
build/build.js

@@ -0,0 +1,41 @@
+'use strict'
+require('./check-versions')()
+
+process.env.NODE_ENV = 'production'
+
+const ora = require('ora')
+const rm = require('rimraf')
+const path = require('path')
+const chalk = require('chalk')
+const webpack = require('webpack')
+const config = require('../config')
+const webpackConfig = require('./webpack.prod.conf')
+
+const spinner = ora('building for production...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+  if (err) throw err
+  webpack(webpackConfig, (err, stats) => {
+    spinner.stop()
+    if (err) throw err
+    process.stdout.write(stats.toString({
+      colors: true,
+      modules: false,
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
+      chunks: false,
+      chunkModules: false
+    }) + '\n\n')
+
+    if (stats.hasErrors()) {
+      console.log(chalk.red('  Build failed with errors.\n'))
+      process.exit(1)
+    }
+
+    console.log(chalk.cyan('  Build complete.\n'))
+    console.log(chalk.yellow(
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
+      '  Opening index.html over file:// won\'t work.\n'
+    ))
+  })
+})

+ 54 - 0
build/check-versions.js

@@ -0,0 +1,54 @@
+'use strict'
+const chalk = require('chalk')
+const semver = require('semver')
+const packageConfig = require('../package.json')
+const shell = require('shelljs')
+
+function exec (cmd) {
+  return require('child_process').execSync(cmd).toString().trim()
+}
+
+const versionRequirements = [
+  {
+    name: 'node',
+    currentVersion: semver.clean(process.version),
+    versionRequirement: packageConfig.engines.node
+  }
+]
+
+if (shell.which('npm')) {
+  versionRequirements.push({
+    name: 'npm',
+    currentVersion: exec('npm --version'),
+    versionRequirement: packageConfig.engines.npm
+  })
+}
+
+module.exports = function () {
+  const warnings = []
+
+  for (let i = 0; i < versionRequirements.length; i++) {
+    const mod = versionRequirements[i]
+
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
+      warnings.push(mod.name + ': ' +
+        chalk.red(mod.currentVersion) + ' should be ' +
+        chalk.green(mod.versionRequirement)
+      )
+    }
+  }
+
+  if (warnings.length) {
+    console.log('')
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
+    console.log()
+
+    for (let i = 0; i < warnings.length; i++) {
+      const warning = warnings[i]
+      console.log('  ' + warning)
+    }
+
+    console.log()
+    process.exit(1)
+  }
+}

BIN
build/logo.png


+ 101 - 0
build/utils.js

@@ -0,0 +1,101 @@
+'use strict'
+const path = require('path')
+const config = require('../config')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
+const packageConfig = require('../package.json')
+
+exports.assetsPath = function (_path) {
+  const assetsSubDirectory = process.env.NODE_ENV === 'production'
+    ? config.build.assetsSubDirectory
+    : config.dev.assetsSubDirectory
+
+  return path.posix.join(assetsSubDirectory, _path)
+}
+
+exports.cssLoaders = function (options) {
+  options = options || {}
+
+  const cssLoader = {
+    loader: 'css-loader',
+    options: {
+      sourceMap: options.sourceMap
+    }
+  }
+
+  const postcssLoader = {
+    loader: 'postcss-loader',
+    options: {
+      sourceMap: options.sourceMap
+    }
+  }
+
+  // generate loader string to be used with extract text plugin
+  function generateLoaders (loader, loaderOptions) {
+    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
+
+    if (loader) {
+      loaders.push({
+        loader: loader + '-loader',
+        options: Object.assign({}, loaderOptions, {
+          sourceMap: options.sourceMap
+        })
+      })
+    }
+
+    // Extract CSS when that option is specified
+    // (which is the case during production build)
+    if (options.extract) {
+      return ExtractTextPlugin.extract({
+        use: loaders,
+        fallback: 'vue-style-loader'
+      })
+    } else {
+      return ['vue-style-loader'].concat(loaders)
+    }
+  }
+
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
+  return {
+    css: generateLoaders(),
+    postcss: generateLoaders(),
+    less: generateLoaders('less'),
+    sass: generateLoaders('sass', { indentedSyntax: true }),
+    scss: generateLoaders('sass'),
+    stylus: generateLoaders('stylus'),
+    styl: generateLoaders('stylus')
+  }
+}
+
+// Generate loaders for standalone style files (outside of .vue)
+exports.styleLoaders = function (options) {
+  const output = []
+  const loaders = exports.cssLoaders(options)
+
+  for (const extension in loaders) {
+    const loader = loaders[extension]
+    output.push({
+      test: new RegExp('\\.' + extension + '$'),
+      use: loader
+    })
+  }
+
+  return output
+}
+
+exports.createNotifierCallback = () => {
+  const notifier = require('node-notifier')
+
+  return (severity, errors) => {
+    if (severity !== 'error') return
+
+    const error = errors[0]
+    const filename = error.file && error.file.split('!').pop()
+
+    notifier.notify({
+      title: packageConfig.name,
+      message: severity + ': ' + error.name,
+      subtitle: filename || '',
+      icon: path.join(__dirname, 'logo.png')
+    })
+  }
+}

+ 22 - 0
build/vue-loader.conf.js

@@ -0,0 +1,22 @@
+'use strict'
+const utils = require('./utils')
+const config = require('../config')
+const isProduction = process.env.NODE_ENV === 'production'
+const sourceMapEnabled = isProduction
+  ? config.build.productionSourceMap
+  : config.dev.cssSourceMap
+
+module.exports = {
+  loaders: utils.cssLoaders({
+    sourceMap: sourceMapEnabled,
+    extract: isProduction
+  }),
+  cssSourceMap: sourceMapEnabled,
+  cacheBusting: config.dev.cacheBusting,
+  transformToRequire: {
+    video: ['src', 'poster'],
+    source: 'src',
+    img: 'src',
+    image: 'xlink:href'
+  }
+}

+ 86 - 0
build/webpack.base.conf.js

@@ -0,0 +1,86 @@
+'use strict'
+const path = require('path')
+const utils = require('./utils')
+const config = require('../config')
+const vueLoaderConfig = require('./vue-loader.conf')
+
+function resolve (dir) {
+  return path.join(__dirname, '..', dir)
+}
+
+
+
+module.exports = {
+  context: path.resolve(__dirname, '../'),
+  entry: {
+    app: './src/main.js'
+  },
+  output: {
+    path: config.build.assetsRoot,
+    filename: '[name].js',
+    publicPath: process.env.NODE_ENV === 'production'
+      ? config.build.assetsPublicPath
+      : config.dev.assetsPublicPath
+  },
+  resolve: {
+    extensions: ['.js', '.vue', '.json'],
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js',
+      '@': resolve('src'),
+    }
+  },
+  module: {
+    rules: [
+      {
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: vueLoaderConfig
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
+      },
+      {
+        test: /\.less$/,
+        loader: "style-loader!css-loader!less-loader",
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('media/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+        }
+      }
+    ]
+  },
+  node: {
+    // prevent webpack from injecting useless setImmediate polyfill because Vue
+    // source contains it (although only uses it if it's native).
+    setImmediate: false,
+    // prevent webpack from injecting mocks to Node native modules
+    // that does not make sense for the client
+    dgram: 'empty',
+    fs: 'empty',
+    net: 'empty',
+    tls: 'empty',
+    child_process: 'empty'
+  }
+}

+ 181 - 0
build/webpack.dev.conf.js

@@ -0,0 +1,181 @@
+'use strict'
+const utils = require('./utils')
+const webpack = require('webpack')
+const config = require('../config')
+const merge = require('webpack-merge')
+const path = require('path')
+const baseWebpackConfig = require('./webpack.base.conf')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+const portfinder = require('portfinder')
+
+const HOST = process.env.HOST
+const PORT = process.env.PORT && Number(process.env.PORT)
+
+const devWebpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: config.dev.devtool,
+
+  // these devServer options should be customized in /config/index.js
+  devServer: {
+    clientLogLevel: 'warning',
+    historyApiFallback: {
+      rewrites: [
+        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
+      ],
+    },
+    hot: true,
+    contentBase: false, // since we use CopyWebpackPlugin.
+    compress: true,
+    host: HOST || config.dev.host,
+    port: PORT || config.dev.port,
+    open: config.dev.autoOpenBrowser,
+    overlay: config.dev.errorOverlay
+      ? { warnings: false, errors: true }
+      : false,
+    publicPath: config.dev.assetsPublicPath,
+    proxy: config.dev.proxyTable,
+    quiet: true, // necessary for FriendlyErrorsPlugin
+    watchOptions: {
+      poll: config.dev.poll,
+    },
+    proxy: {
+        '/auction': {
+            target : 'http://localhost:4000'
+        },
+        '/information': {
+            target : 'http://localhost:4000'
+        },
+        '/users': {
+            target : 'http://localhost:4000'
+        },
+        '/register': {
+            target : 'http://localhost:4000'
+        },
+        '/login': {
+            target : 'http://localhost:4000'
+        },
+        '/logout': {
+            target : 'http://localhost:4000'
+        },
+        '/infos': {
+            target : 'http://localhost:4000'
+        },
+        '/laws': {
+            target : 'http://localhost:4000'
+        },
+        '/previews': {
+            target : 'http://localhost:4000'
+        },
+        '/knowledges': {
+            target : 'http://localhost:4000'
+        },
+        '/infodetail': {
+            target : 'http://localhost:4000'
+        },
+        '/userdetails': {
+            target : 'http://localhost:4000'
+        },
+        '/addinfo': {
+            target : 'http://localhost:4000'
+        },
+        '/addpreview': {
+            target : 'http://localhost:4000'
+        },
+        '/previewlist': {
+            target : 'http://localhost:4000'
+        },
+        '/previewdetail': {
+            target : 'http://localhost:4000'
+        },
+        '/previewCount': {
+            target : 'http://localhost:4000'
+        },
+        '/ChangePwd': {
+            target : 'http://localhost:4000'
+        },
+        '/edit': {
+            target : 'http://localhost:4000'
+        },
+        '/uploads': {
+            target : 'http://localhost:4000'
+        },
+        '/userinfo': {
+            target : 'http://localhost:4000'
+        },
+        '/userpreview': {
+            target : 'http://localhost:4000'
+        },
+        '/infodel': {
+            target : 'http://localhost:4000'
+        },
+        '/infomodify': {
+            target : 'http://localhost:4000'
+        },
+        '/searchfor': {
+            target : 'http://localhost:4000'
+        },
+        '/pv': {
+            target : 'http://localhost:4000'
+        },
+        '/knowledge': {
+            target : 'http://localhost:4000'
+        },
+        '/law': {
+            target : 'http://localhost:4000'
+        }
+    },
+  },
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': require('../config/dev.env')
+    }),
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: 'index.html',
+      template: 'index.html',
+      inject: true
+    }),
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.dev.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+module.exports = new Promise((resolve, reject) => {
+  portfinder.basePort = process.env.PORT || config.dev.port
+  portfinder.getPort((err, port) => {
+    if (err) {
+      reject(err)
+    } else {
+      // publish the new Port, necessary for e2e tests
+      process.env.PORT = port
+      // add port to devServer config
+      devWebpackConfig.devServer.port = port
+
+      // Add FriendlyErrorsPlugin
+      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
+        compilationSuccessInfo: {
+          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
+        },
+        onErrors: config.dev.notifyOnErrors
+        ? utils.createNotifierCallback()
+        : undefined
+      }))
+
+      resolve(devWebpackConfig)
+    }
+  })
+})

+ 145 - 0
build/webpack.prod.conf.js

@@ -0,0 +1,145 @@
+'use strict'
+const path = require('path')
+const utils = require('./utils')
+const webpack = require('webpack')
+const config = require('../config')
+const merge = require('webpack-merge')
+const baseWebpackConfig = require('./webpack.base.conf')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
+
+const env = require('../config/prod.env')
+
+const webpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({
+      sourceMap: config.build.productionSourceMap,
+      extract: true,
+      usePostCSS: true
+    })
+  },
+  devtool: config.build.productionSourceMap ? config.build.devtool : false,
+  output: {
+    path: config.build.assetsRoot,
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
+  },
+  plugins: [
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
+    new webpack.DefinePlugin({
+      'process.env': env
+    }),
+    new UglifyJsPlugin({
+      uglifyOptions: {
+        compress: {
+          warnings: false
+        }
+      },
+      sourceMap: config.build.productionSourceMap,
+      parallel: true
+    }),
+    // extract css into its own file
+    new ExtractTextPlugin({
+      filename: utils.assetsPath('css/[name].[contenthash].css'),
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
+      allChunks: true,
+    }),
+    // Compress extracted CSS. We are using this plugin so that possible
+    // duplicated CSS from different components can be deduped.
+    new OptimizeCSSPlugin({
+      cssProcessorOptions: config.build.productionSourceMap
+        ? { safe: true, map: { inline: false } }
+        : { safe: true }
+    }),
+    // generate dist index.html with correct asset hash for caching.
+    // you can customize output by editing /index.html
+    // see https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: config.build.index,
+      template: 'index.html',
+      inject: true,
+      minify: {
+        removeComments: true,
+        collapseWhitespace: true,
+        removeAttributeQuotes: true
+        // more options:
+        // https://github.com/kangax/html-minifier#options-quick-reference
+      },
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
+      chunksSortMode: 'dependency'
+    }),
+    // keep module.id stable when vendor modules does not change
+    new webpack.HashedModuleIdsPlugin(),
+    // enable scope hoisting
+    new webpack.optimize.ModuleConcatenationPlugin(),
+    // split vendor js into its own file
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'vendor',
+      minChunks (module) {
+        // any required modules inside node_modules are extracted to vendor
+        return (
+          module.resource &&
+          /\.js$/.test(module.resource) &&
+          module.resource.indexOf(
+            path.join(__dirname, '../node_modules')
+          ) === 0
+        )
+      }
+    }),
+    // extract webpack runtime and module manifest to its own file in order to
+    // prevent vendor hash from being updated whenever app bundle is updated
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'manifest',
+      minChunks: Infinity
+    }),
+    // This instance extracts shared chunks from code splitted chunks and bundles them
+    // in a separate chunk, similar to the vendor chunk
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'app',
+      async: 'vendor-async',
+      children: true,
+      minChunks: 3
+    }),
+
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.build.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+if (config.build.productionGzip) {
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
+
+  webpackConfig.plugins.push(
+    new CompressionWebpackPlugin({
+      asset: '[path].gz[query]',
+      algorithm: 'gzip',
+      test: new RegExp(
+        '\\.(' +
+        config.build.productionGzipExtensions.join('|') +
+        ')$'
+      ),
+      threshold: 10240,
+      minRatio: 0.8
+    })
+  )
+}
+
+if (config.build.bundleAnalyzerReport) {
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
+}
+
+module.exports = webpackConfig

+ 7 - 0
config/dev.env.js

@@ -0,0 +1,7 @@
+'use strict'
+const merge = require('webpack-merge')
+const prodEnv = require('./prod.env')
+
+module.exports = merge(prodEnv, {
+  NODE_ENV: '"development"'
+})

+ 78 - 0
config/index.js

@@ -0,0 +1,78 @@
+'use strict'
+// Template version: 1.3.1
+// see http://vuejs-templates.github.io/webpack for documentation.
+
+const path = require('path')
+
+module.exports = {
+  dev: {
+
+    // Paths
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+    proxyTable: {
+      '/api': {
+        target: 'http://localhost:8432',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/api': ''
+        }
+      }
+    },
+
+
+    // Various Dev Server settings
+    host: 'localhost', // can be overwritten by process.env.HOST
+    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+    autoOpenBrowser: false,
+    errorOverlay: true,
+    notifyOnErrors: true,
+    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
+
+
+    /**
+     * Source Maps
+     */
+
+    // https://webpack.js.org/configuration/devtool/#development
+    devtool: 'cheap-module-eval-source-map',
+
+    // If you have problems debugging vue-files in devtools,
+    // set this to false - it *may* help
+    // https://vue-loader.vuejs.org/en/options.html#cachebusting
+    cacheBusting: true,
+
+    cssSourceMap: true
+  },
+
+  build: {
+    // Template for index.html
+    index: path.resolve(__dirname, '../dist/index.html'),
+
+    // Paths
+    assetsRoot: path.resolve(__dirname, '../dist'),
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+
+    /**
+     * Source Maps
+     */
+
+    productionSourceMap: true,
+    // https://webpack.js.org/configuration/devtool/#production
+    devtool: '#source-map',
+
+    // Gzip off by default as many popular static hosts such as
+    // Surge or Netlify already gzip all static assets for you.
+    // Before setting to `true`, make sure to:
+    // npm install --save-dev compression-webpack-plugin
+    productionGzip: false,
+    productionGzipExtensions: ['js', 'css'],
+
+    // Run the build command with an extra argument to
+    // View the bundle analyzer report after build finishes:
+    // `npm run build --report`
+    // Set to `true` or `false` to always turn it on or off
+    bundleAnalyzerReport: process.env.npm_config_report
+  }
+}

+ 4 - 0
config/prod.env.js

@@ -0,0 +1,4 @@
+'use strict'
+module.exports = {
+  NODE_ENV: '"production"'
+}

+ 12 - 0
index.html

@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <title>backstage</title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

File diff suppressed because it is too large
+ 12310 - 0
package-lock.json


+ 72 - 0
package.json

@@ -0,0 +1,72 @@
+{
+  "name": "backstage",
+  "version": "1.0.0",
+  "description": "auctionweb backstage",
+  "author": "risatoar",
+  "private": true,
+  "scripts": {
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "start": "npm run dev",
+    "build": "node build/build.js"
+  },
+  "dependencies": {
+    "axios": "^0.18.1",
+    "element-ui": "^2.13.0",
+    "iview": "^2.11.0-rc.1",
+    "less": "^3.0.1",
+    "less-loader": "^4.1.0",
+    "smeditor": "^0.1.19",
+    "vue": "^2.5.2",
+    "vue-axios": "^2.1.5",
+    "vue-lazy-load": "^0.0.7",
+    "vue-router": "^3.0.1",
+    "vue2-editor": "^2.10.2",
+    "vuex": "^3.0.1"
+  },
+  "devDependencies": {
+    "autoprefixer": "^7.1.2",
+    "babel-core": "^6.22.1",
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
+    "babel-loader": "^7.1.1",
+    "babel-plugin-syntax-jsx": "^6.18.0",
+    "babel-plugin-transform-runtime": "^6.22.0",
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
+    "babel-preset-env": "^1.3.2",
+    "babel-preset-stage-2": "^6.22.0",
+    "chalk": "^2.0.1",
+    "copy-webpack-plugin": "^4.0.1",
+    "css-loader": "^0.28.0",
+    "extract-text-webpack-plugin": "^3.0.0",
+    "file-loader": "^1.1.4",
+    "friendly-errors-webpack-plugin": "^1.6.1",
+    "html-webpack-plugin": "^2.30.1",
+    "node-notifier": "^5.1.2",
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
+    "ora": "^1.2.0",
+    "portfinder": "^1.0.13",
+    "postcss-import": "^11.0.0",
+    "postcss-loader": "^2.0.8",
+    "postcss-url": "^7.2.1",
+    "rimraf": "^2.6.0",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.6",
+    "uglifyjs-webpack-plugin": "^1.1.1",
+    "url-loader": "^0.5.8",
+    "vue-loader": "^13.3.0",
+    "vue-style-loader": "^3.0.1",
+    "vue-template-compiler": "^2.5.2",
+    "webpack": "^3.6.0",
+    "webpack-bundle-analyzer": "^2.9.0",
+    "webpack-dev-server": "^2.9.1",
+    "webpack-merge": "^4.1.0"
+  },
+  "engines": {
+    "node": ">= 6.0.0",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 41 - 0
src/App.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="app">
+    <img src="./assets/logo.png">
+    <router-view/>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'App',
+  data () {
+    return {
+      isRouterAlive: true
+    }
+  },
+  provide: function () {
+    return {
+      reload: this.reload
+    };
+  },
+  methods: {
+    reload: function () {
+      this.isRouterAlive = false;
+      this.$nextTick(function () {
+        this.isRouterAlive = true;
+      });
+    }
+  },
+}
+</script>
+
+<style>
+#app {
+  font-family: 'Avenir', Helvetica, Arial, sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  text-align: center;
+  color: #2c3e50;
+  margin-top: 60px;
+}
+</style>

BIN
src/assets/logo.png


+ 232 - 0
src/components/modifydialog/infomodify.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <div class="dialog-wrap">
+      <div class="dialog-cover"  v-if="isShow" @click="closeMyself"></div>
+      <transition name="drop">
+        <div class="dialog-content"  v-if="isShow">
+          <p class="dialog-close" @click="closeMyself">x</p>
+          <!-- 拍卖信息修改弹出层 -->
+          <div class="modifyinfo">
+          	<!-- 拍卖信息修改弹出层背景层 -->
+          	<div class="modifyinfo-wrap">
+          		<!-- 拍卖信息修改弹出层内容层 -->
+          		<div class="modifyinfo-content">
+          			<!-- 拍卖信息修改弹出层头部 -->
+          			<div class="modifyinfo-content-head">
+          				<!-- 拍卖信息修改弹出层头部标题 -->
+          				<div class="modifyinfo-content-head-title">
+          					修改拍卖知识
+          				</div>
+          				<!-- 拍卖信息修改弹出层头部发布按钮 -->
+          				<button class="btn btn-info modifyinfo-btn" @click="modifyinfo">立即修改!</button>
+          			</div>
+          			<!-- 拍卖信息修改弹出层标题修改 -->
+          			<div class="modifyinfo-content-addtitle">
+          				<label>点击这里输入标题</label>
+          				<input type="text" class="form-control input-title" label="点击这里输入标题" v-model="modifydata.title"></input>
+          			</div>
+          			<!-- 拍卖信息修改弹出层简介修改 -->
+          			<div class="modifyinfo-content-adddescription">
+          				<label>请输入简介</label>
+          				<input type="text" class="form-control input-description" label="请输入简介" v-model="modifydata.description"></input>
+          			</div>
+          			<!-- 拍卖信息修改弹出层主要内容修改,富文本编辑器采用了vue-editor -->
+          			<div class="modifyinfo-content-body">
+          				<h3>请输入拍卖信息主要内容</h3>
+          				<vue-editor v-model="modifydata.maintext"></vue-editor>
+          				<!-- 主要内容信息预览区块,可以看到输入的内容在实际的样式 -->
+          				<h2>预览</h2>
+          				<div class="modifyinfo-content-preview">
+          					<p v-html="modifydata.maintext" class="modifyinfo-content-preview-maintext"></p>
+          				</div>
+          			</div>
+          		</div>
+          	</div>
+          </div>
+          <slot></slot>
+        </div>
+      </transition>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from 'axios'
+import { VueEditor } from 'vue2-editor'
+export default {
+  name: 'infomodifydialog',
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false
+    },
+    modifydata: {
+      type: Object,
+      default: []
+    }
+  },
+  components: {
+     VueEditor
+  },
+  data() {
+  	return {
+  		username: '',
+  		visible: false,
+  	}
+  },
+  mounted() {
+  	this.gotop()
+  },
+  methods: {
+    closeMyself () {
+      this.$emit('on-close')
+    },
+	gotop() {
+		window.scrollTo(0,0)
+	},
+	success () {
+    	this.$Message.success('发送成功');
+  },
+  // 通过axios封装的ajax操作来与后台进行异步post操作,修改拍卖公告
+	modifyinfo() {
+		axios.post("/knowledge/modify",this.modifydata).then((res)=> {
+			console.log(res);
+			if(res.status == '200'){
+				this.success()
+			}
+		}).catch((error)=> {
+			console.log(error);
+		});
+	}
+  }
+}
+</script>
+
+<style scoped>
+.drop-enter-active {
+  transition: all .5s ease;
+}
+.drop-leave-active {
+  transition: all .3s ease;
+}
+.drop-enter {
+  transform: translateY(-500px);
+}
+.drop-leave-active {
+  transform: translateY(-500px);
+}
+
+.dialog-wrap {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  z-index: 9999999;
+}
+.dialog-cover {
+  background: #000;
+  opacity: .3;
+  position: fixed;
+  z-index: 5;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+.dialog-content {
+  width: 50%;
+  position: fixed;
+  max-height: 90%;
+  overflow: auto;
+  background: #fff;
+  top: 5%;
+  left: 50%;
+  margin-left: -25%;
+  z-index: 10;
+  border: 2px solid #464068;
+  padding: 2%;
+  line-height: 1.6;
+}
+.dialog-close {
+  position: absolute;
+  right: 5px;
+  top: 5px;
+  width: 20px;
+  height: 20px;
+  text-align: center;
+  cursor: pointer;
+}
+.dialog-close:hover {
+  color: #4fc08d;
+}
+
+.modifyinfo {
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+}
+
+.modifyinfo .modifyinfo-wrap {
+  padding: 2em 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content {
+  position: relative;
+  border: 1px solid #c3cbd6;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-head-title {
+  font-family: Main Head;
+  font-size: 24px;
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-btn {
+  font-family: Main Head;
+  font-size: 16px;
+  position: absolute;
+  top: 10px;
+  right: 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-addtitle {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-addtitle .input-title {
+  width: 100%;
+  text-align: center;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-adddescription {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-adddescription .input-description {
+  width: 100%;
+  text-align: center;
+  text-indent: 25px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-body {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content h3 {
+  padding: 15px 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content h2 {
+  padding: 30px 0 15px 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-preview {
+  font-family: Text;
+  line-height: 2;
+  height: 100%;
+  min-height: 200px;
+  padding: 15px 10px;
+  text-indent: 25px;
+  color: #657180;
+  border: 1px solid #c3cbd6;
+}
+</style>

+ 232 - 0
src/components/modifydialog/previewmodify.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <div class="dialog-wrap">
+      <div class="dialog-cover"  v-if="isShow" @click="closeMyself"></div>
+      <transition name="drop">
+        <div class="dialog-content"  v-if="isShow">
+          <p class="dialog-close" @click="closeMyself">x</p>
+          <!-- 拍卖信息修改弹出层 -->
+          <div class="modifyinfo">
+            <!-- 拍卖信息修改弹出层背景层 -->
+            <div class="modifyinfo-wrap">
+              <!-- 拍卖信息修改弹出层内容层 -->
+              <div class="modifyinfo-content">
+                <!-- 拍卖信息修改弹出层头部 -->
+                <div class="modifyinfo-content-head">
+                  <!-- 拍卖信息修改弹出层头部标题 -->
+                  <div class="modifyinfo-content-head-title">
+                    修改拍卖知识
+                  </div>
+                  <!-- 拍卖信息修改弹出层头部发布按钮 -->
+                  <button class="btn btn-info modifyinfo-btn" @click="modifyinfo">立即修改!</button>
+                </div>
+                <!-- 拍卖信息修改弹出层标题修改 -->
+                <div class="modifyinfo-content-addtitle">
+                  <label>点击这里输入标题</label>
+                  <input type="text" class="form-control input-title" label="点击这里输入标题" v-model="modifydata.title"></input>
+                </div>
+                <!-- 拍卖信息修改弹出层简介修改 -->
+                <div class="modifyinfo-content-adddescription">
+                  <label>请输入简介</label>
+                  <input type="text" class="form-control input-description" label="请输入简介" v-model="modifydata.description"></input>
+                </div>
+                <!-- 拍卖信息修改弹出层主要内容修改,富文本编辑器采用了vue-editor -->
+                <div class="modifyinfo-content-body">
+                  <h3>请输入拍卖信息主要内容</h3>
+                  <vue-editor v-model="modifydata.maintext"></vue-editor>
+                  <!-- 主要内容信息预览区块,可以看到输入的内容在实际的样式 -->
+                  <h2>预览</h2>
+                  <div class="modifyinfo-content-preview">
+                    <p v-html="modifydata.maintext" class="modifyinfo-content-preview-maintext"></p>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <slot></slot>
+        </div>
+      </transition>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from 'axios'
+import { VueEditor } from 'vue2-editor'
+export default {
+  name: 'infomodifydialog',
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false
+    },
+    modifydata: {
+      type: Object,
+      default: []
+    }
+  },
+  components: {
+     VueEditor
+  },
+  data() {
+    return {
+      username: '',
+      visible: false,
+    }
+  },
+  mounted() {
+    this.gotop()
+  },
+  methods: {
+    closeMyself () {
+      this.$emit('on-close')
+    },
+  gotop() {
+    window.scrollTo(0,0)
+  },
+  success () {
+      this.$Message.success('发送成功');
+  },
+  // 通过axios封装的ajax操作来与后台进行异步post操作,修改拍卖公告
+  modifyinfo() {
+    axios.post("/law/modify",this.modifydata).then((res)=> {
+      console.log(res);
+      if(res.status == '200'){
+        this.success()
+      }
+    }).catch((error)=> {
+      console.log(error);
+    });
+  }
+  }
+}
+</script>
+
+<style scoped>
+.drop-enter-active {
+  transition: all .5s ease;
+}
+.drop-leave-active {
+  transition: all .3s ease;
+}
+.drop-enter {
+  transform: translateY(-500px);
+}
+.drop-leave-active {
+  transform: translateY(-500px);
+}
+
+.dialog-wrap {
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  z-index: 9999999;
+}
+.dialog-cover {
+  background: #000;
+  opacity: .3;
+  position: fixed;
+  z-index: 5;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+.dialog-content {
+  width: 50%;
+  position: fixed;
+  max-height: 90%;
+  overflow: auto;
+  background: #fff;
+  top: 5%;
+  left: 50%;
+  margin-left: -25%;
+  z-index: 10;
+  border: 2px solid #464068;
+  padding: 2%;
+  line-height: 1.6;
+}
+.dialog-close {
+  position: absolute;
+  right: 5px;
+  top: 5px;
+  width: 20px;
+  height: 20px;
+  text-align: center;
+  cursor: pointer;
+}
+.dialog-close:hover {
+  color: #4fc08d;
+}
+
+.modifyinfo {
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+}
+
+.modifyinfo .modifyinfo-wrap {
+  padding: 2em 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content {
+  position: relative;
+  border: 1px solid #c3cbd6;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-head-title {
+  font-family: Main Head;
+  font-size: 24px;
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-btn {
+  font-family: Main Head;
+  font-size: 16px;
+  position: absolute;
+  top: 10px;
+  right: 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-addtitle {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-addtitle .input-title {
+  width: 100%;
+  text-align: center;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-adddescription {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-adddescription .input-description {
+  width: 100%;
+  text-align: center;
+  text-indent: 25px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-body {
+  padding: 15px 10px;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content h3 {
+  padding: 15px 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content h2 {
+  padding: 30px 0 15px 0;
+}
+
+.modifyinfo .modifyinfo-wrap .modifyinfo-content .modifyinfo-content-preview {
+  font-family: Text;
+  line-height: 2;
+  height: 100%;
+  min-height: 200px;
+  padding: 15px 10px;
+  text-indent: 25px;
+  color: #657180;
+  border: 1px solid #c3cbd6;
+}
+</style>

+ 48 - 0
src/main.js

@@ -0,0 +1,48 @@
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+import Vue from 'vue'
+import App from './App'
+import router from './router'
+import layout from './page/layout.vue'
+import iView from 'iview';
+import SMEditor from 'smeditor'
+import 'iview/dist/styles/iview.css';
+import Vuex from 'vuex'
+import axios from 'axios';
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+
+axios.defaults.baseURL = 'http://localhost:8432/api';
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-from-urlencoded';
+// 全局注册,之后可在其他组件中通过 this.$axios 发送数据
+Vue.prototype.$axios = axios;
+Vue.config.productionTip = false;
+
+Vue.use(Vuex);
+Vue.use(iView);
+Vue.use(SMEditor);
+Vue.use(ElementUI);
+
+const store = new Vuex.Store({
+	state: {
+		active: '',
+		open: []
+	},
+	mutations: {
+		updateActive(state,active){
+			state.active = active;
+		},
+		updateOpen(state,open){
+			state.open[0] = open;
+		}
+	}
+});
+
+/* eslint-disable no-new */
+new Vue({
+  el: '#app',
+  router,
+  store,
+  components: { layout },
+  template: '<layout/>'
+})

+ 125 - 0
src/page/commodity/dealCommodity.vue

@@ -0,0 +1,125 @@
+<template>
+  <div>
+    <el-table
+      :data="commodityList"
+      style="width: 100%">
+      <!--拍卖物标题-->
+      <el-table-column
+      prop="cname"
+      label="拍卖物标题"
+      width="200"
+      align='center'>
+    </el-table-column>
+      <el-table-column
+        prop="uname"
+        label="拍卖用户"
+        width="100"
+        align='center'>
+      </el-table-column>
+      <!--价格-->
+      <el-table-column
+        prop="price"
+        label="初始价格"
+        width="80"
+        align='center'>
+      </el-table-column>
+      <!--每次加价-->
+      <el-table-column
+        prop="addprice"
+        label="每次加价"
+        width="80"
+        align='center'>
+      </el-table-column>
+      <el-table-column
+        label="创建时间"
+        width="160"
+        align='center'>
+        <template slot-scope="scope">
+          <!--<i class="el-icon-time"></i>-->
+          <span style="margin-left: 10px">{{ scope.row.createTime }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="开始时间"
+        width="160"
+        align='center'>
+        <template slot-scope="scope">
+          <!--<i class="el-icon-time"></i>-->
+          <span style="margin-left: 10px">{{ scope.row.beginTime }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结束时间"
+        width="160"
+        align='center'>
+        <template slot-scope="scope">
+          <!--<i class="el-icon-time"></i>-->
+          <span style="margin-left: 10px">{{ scope.row.endTime }}</span>
+        </template>
+      </el-table-column>
+      <!--类型-->
+      <el-table-column
+        prop="typeId"
+        label="类型"
+        width="150"
+        align='center'>
+      </el-table-column>
+      <el-table-column label="审核" width="200" align='center'>
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            @click="check(scope.$index, scope.row,0)">通过</el-button>
+          <el-button
+            size="mini"
+            type="danger"
+            @click="check(scope.$index, scope.row,-2)">不通过</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+<script>
+    export default {
+      name: "dealCommodity",
+      data() {
+        return {
+          commodityList: []
+        }
+      },
+      inject: ['reload'],
+      created() {
+        this.getNotDealCommodity();
+      },
+      methods: {
+        getNotDealCommodity(){
+          this.$axios({
+            url: 'commodity/notDeal',
+            methods: 'get',
+          }).then(res => {
+            if(res.data.code === 200) {
+              this.commodityList = res.data.data;
+            }
+          })
+        },
+        check(index, row, status) {
+          this.$axios({
+            url:'commodity/changeStatu',
+            methods: 'get',
+            params: {
+              cid: row.cid,
+              statu: status
+            }
+          }).then(res => {
+            if(res.data.code === 200) {
+              alert("审核成功");
+              this.$router.go(0);
+            }
+          })
+        }
+      }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 163 - 0
src/page/commodity/dealMember.vue

@@ -0,0 +1,163 @@
+<template>
+  <div>
+    <h1>会员处理</h1>
+    <el-button type="info" @click="openModel()">添加</el-button>
+    <div>
+      <el-table
+        :data="memberRule"
+        style="width: 100%">
+        <el-table-column prop="memberid" label="序号" width="200" align='center'></el-table-column>
+        <el-table-column prop="rank" label="会员等级" width="200" align='center'></el-table-column>
+        <el-table-column prop="cautionmoney" label="保证金" width="200" align='center'></el-table-column>
+        <el-table-column prop="amount" label="可投标件数" width="200" align='center'></el-table-column>
+        <el-table-column prop="pricepremiss" label="单次金额限制" width="200" align='center'></el-table-column>
+        <el-table-column prop="premiss" label="出价账号" width="200" align='center'></el-table-column>
+        <el-table-column label="审核" width="400" align='center'>
+          <template slot-scope="scope">
+            <el-button size="mini" @click="edit(scope.$index, scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" @click="delMember(scope.$index, scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <Modal v-model="model" width="640">
+      <p slot="header">
+        <span>添加会员规则</span>
+      </p>
+      <div>
+        <el-form :model="newMember">
+          <el-form-item prop="rank" label="会员等级">
+            <el-input type="text" v-model="newMember.rank"></el-input>
+          </el-form-item>
+          <el-form-item prop="cautionmoney" label="保证金">
+            <el-input-number size="medium" v-model="newMember.cautionmoney"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="amount" label="可投标件数">
+            <el-input-number size="medium" v-model="newMember.amount"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="pricepremiss" label="单次金额限制">
+            <el-input-number size="medium" v-model="newMember.pricepremiss"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="premiss" label="出价账号">
+            <el-input type="text" v-model="newMember.premiss"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer">
+        <Button type="primary" size="large" long @click="addMember()" style="width: 30%">确定</Button>
+        <Button type="Ghost" size="large" long @click="closeModel()" style="width: 30%">取消</Button>
+      </div>
+    </Modal>
+    <Modal v-model="model2" width="640">
+      <p slot="header">
+        <span>修改会员规则</span>
+      </p>
+      <div>
+        <el-form :model="newMember">
+          <el-form-item prop="rank" label="会员等级">
+            <el-input type="text" v-model="newMember.rank"></el-input>
+          </el-form-item>
+          <el-form-item prop="cautionmoney" label="保证金">
+            <el-input-number size="medium" v-model="newMember.cautionmoney"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="amount" label="可投标件数">
+            <el-input-number size="medium" v-model="newMember.amount"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="pricepremiss" label="单次金额限制">
+            <el-input-number size="medium" v-model="newMember.pricepremiss"></el-input-number>
+          </el-form-item>
+          <el-form-item prop="premiss" label="出价账号">
+            <el-input type="text" v-model="newMember.premiss"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer">
+        <Button type="primary" size="large" long @click="beSureAdd()" style="width: 30%">确定</Button>
+        <Button type="Ghost" size="large" long @click="closeModel()" style="width: 30%">取消</Button>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+    export default {
+      name: "",
+      data() {
+        return {
+          memberRule: [],
+          newMember: {},
+          editMember: {},
+          model: false,
+          model2: false
+
+        }
+      },
+      created() {
+        this.listMember();
+      },
+      methods: {
+        openModel() {
+          this.model = true;
+        },
+        openModel2() {
+          this.model2 = true;
+        },
+        closeModel() {
+          this.model = false;
+        },
+        closeModel2() {
+          this.model2 = false;
+        },
+        listMember() {
+          this.$axios({
+            url: '/list/member',
+            methods: 'get'
+          }).then(res=>{
+            if(res.data.code === 200) {
+              this.memberRule = res.data.data;
+            }
+          });
+        },
+        addMember() {
+          this.$axios({
+            url: '/add/member',
+            methods: 'post',
+            data: newMember
+          }).then(res => {
+            if(res.data.code === 200) {
+              alert('添加成功');
+            }
+          })
+        },
+        editMember() {
+          this.$axios({
+            url: '/edit/member',
+            methods: 'post',
+            data: editMember
+          }).then(res => {
+            if(res.data.code === 200) {
+              alert('修改成功');
+            }
+          })
+        },
+        delMember(index,row) {
+          this.$axios({
+            url: '/del/member',
+            methods: 'get',
+            params: {
+              memberid:row.memberid
+            }
+          }).then(res => {
+            if(res.data.code === 200) {
+              alert('删除成功');
+            }
+          })
+        }
+      }
+
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 117 - 0
src/page/commodity/seeCommodity.vue

@@ -0,0 +1,117 @@
+<!--<template>-->
+  <!--<div>-->
+    <!--<el-table-->
+      <!--:data="commodityList"-->
+      <!--style="width: 80%">-->
+      <!--&lt;!&ndash;拍卖物标题&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="cname"-->
+        <!--label="拍卖物标题"-->
+        <!--sortable-->
+        <!--width="200"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;图片&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--label="图片"-->
+        <!--width="100"-->
+        <!--align='center'>-->
+        <!--<template slot-scope="scope">-->
+          <!--<img :src="scope.row.image" min-width="60" height="60" />-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;价格&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="price"-->
+        <!--label="初始价格"-->
+        <!--width="80"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;每次加价&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="addprice"-->
+        <!--label="每次加价"-->
+        <!--width="80"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;当前价格&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="bidprice"-->
+        <!--label="当前价格"-->
+        <!--width="80"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column-->
+        <!--label="开始时间"-->
+        <!--width="160"-->
+        <!--align='center'>-->
+        <!--<template slot-scope="scope">-->
+          <!--&lt;!&ndash;<i class="el-icon-time"></i>&ndash;&gt;-->
+          <!--<span style="margin-left: 10px">{{ scope.row.beginTime }}</span>-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column-->
+        <!--label="结束时间"-->
+        <!--width="160"-->
+        <!--align='center'>-->
+        <!--<template slot-scope="scope">-->
+          <!--&lt;!&ndash;<i class="el-icon-time"></i>&ndash;&gt;-->
+          <!--<span style="margin-left: 10px">{{ scope.row.endTime }}</span>-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;类型&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="typeId"-->
+        <!--label="类型"-->
+        <!--width="150"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;当前状态&ndash;&gt;-->
+      <!--<el-table-column-->
+        <!--prop="statu"-->
+        <!--label="当前状态"-->
+        <!--width="80"-->
+        <!--align='center'>-->
+      <!--</el-table-column>-->
+      <!--&lt;!&ndash;品牌&ndash;&gt;-->
+      <!--&lt;!&ndash;<el-table-column&ndash;&gt;-->
+      <!--&lt;!&ndash;prop="brandName"&ndash;&gt;-->
+      <!--&lt;!&ndash;label="品牌"&ndash;&gt;-->
+      <!--&lt;!&ndash;width="100">&ndash;&gt;-->
+      <!--&lt;!&ndash;</el-table-column>&ndash;&gt;-->
+      <!--<el-table-column label="操作" width="150" align='center'>-->
+        <!--<template slot-scope="scope">-->
+          <!--<el-button-->
+            <!--size="mini"-->
+            <!--@click="handleEdit(scope.$index, scope.row)">编辑</el-button>-->
+          <!--<el-button-->
+            <!--size="mini"-->
+            <!--type="danger"-->
+            <!--@click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+    <!--</el-table>-->
+  <!--</div>-->
+<!--</template>-->
+<!--<script>-->
+    <!--export default {-->
+      <!--name: "seeCommodity",-->
+      <!--data() {-->
+        <!--return {-->
+          <!--commodityList: []-->
+        <!--}-->
+      <!--},-->
+      <!--created(){-->
+        <!--this.getCommodity();-->
+      <!--},-->
+      <!--method: {-->
+        <!--getCommodity(){-->
+
+        <!--}-->
+      <!--}-->
+    <!--}-->
+<!--</script>-->
+
+<!--<style scoped>-->
+
+<!--</style>-->

+ 417 - 0
src/page/commodity/seeCommodityType.vue

@@ -0,0 +1,417 @@
+<template>
+  <div>
+    <el-button type="info" @click="openModel1()">添加</el-button>
+    <el-table
+    :data="typeList.slice((currentPage-1)*PageSize,currentPage*PageSize)"
+    style="width: 100%">
+    <el-table-column label="序号" width="70px">
+      <template slot-scope="scope">{{scope.$index+1}}</template>
+    </el-table-column>
+    <el-table-column prop="name3" label="类型名" width="200" align='center'></el-table-column>
+    <!--价格-->
+    <el-table-column prop="name2" label="父类型" width="200" align='center'></el-table-column>
+    <!--每次加价-->
+    <el-table-column prop="name1" label="父父类型" width="200" align='center'></el-table-column>
+    <el-table-column label="审核" width="400" align='center'>
+      <template slot-scope="scope">
+        <el-button size="mini" @click="edit(scope.$index, scope.row)">编辑</el-button>
+        <el-button size="mini" type="danger" @click="addSun(scope.$index, scope.row)">添加子类</el-button>
+        <el-button size="mini" type="danger" @click="deleteCommodityType(scope.$index, scope.row)">删除</el-button>
+      </template>
+    </el-table-column>
+  </el-table>
+    <el-pagination @size-change="handleSizeChange"
+                   @current-change="handleCurrentChange"
+                   :current-page="currentPage"
+                   :page-sizes="pageSizes"
+                   :page-size="PageSize" layout="total, sizes, prev, pager, next, jumper"
+                   :total="totalCount">
+    </el-pagination>
+    <Modal v-model="model" width="640">
+      <p slot="header">
+        <span>添加类型</span>
+      </p>
+      <div>
+        <el-radio-group v-model="radio">
+          <Row :gutter="24">
+            <i-col span="6">
+            <el-radio v-model="radio" label="1" border>添加一级类型</el-radio>
+            </i-col>
+            <i-col span="6">
+              <el-input type="text" placeholder="请输入一级类型" v-model="text_1" maxlength="5" show-word-limit :disabled="radio==='1'?false:true"></el-input>
+            </i-col>
+          </Row>
+          <br/>
+            <Row :gutter="24">
+              <i-col span="6">
+                <el-radio v-model="radio" label="2" border>添加二级类型</el-radio>
+              </i-col>
+              <i-col span="6">
+                <i-select  size="large" style="width:120px" v-model="type_1_1" :disabled="radio==='2'?false:true">
+                  <i-option v-for="item in oneType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+                </i-select>
+              </i-col>
+              <i-col span="6">
+                <el-input type="text" placeholder="请输入二级类型" v-model="text_2" maxlength="5" show-word-limit :disabled="radio==='2'?false:true"></el-input>
+              </i-col>
+            </Row>
+          <br/>
+            <Row :gutter="24">
+              <i-col span="6">
+                <el-radio v-model="radio" label="3" border>添加三级类型</el-radio>
+              </i-col>
+              <i-col span="6">
+                <i-select  size="large" style="width:120px" v-model="type_2_1" :disabled="radio==='3'?false:true">
+                  <i-option v-for="item in oneType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+                </i-select>
+              </i-col>
+              <i-col span="6">
+                <i-select  size="large" style="width:120px" v-model="type_2_2" :disabled="radio==='3'?false:true">
+                  <i-option v-for="item in twoType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+                </i-select>
+              </i-col>
+              <i-col span="6">
+                <el-input type="text" placeholder="请输入三级类型" v-model="text_3" maxlength="5" show-word-limit :disabled="radio==='3'?false:true"></el-input>
+              </i-col>
+            </Row>
+        </el-radio-group>
+      </div>
+      <div slot="footer">
+        <Button type="primary" size="large" long @click="beSureAdd()" style="width: 30%">确定</Button>
+        <Button type="Ghost" size="large" long @click="closeModel()" style="width: 30%">取消</Button>
+      </div>
+    </Modal>
+  <Modal v-model="model2" width="400">
+    <p slot="header">
+      <span>编辑</span>
+    </p>
+    <div>
+      <div v-if="type_rank ===1">
+        一级类型名:<el-input type="text" v-model="type_name1" maxlength="5" show-word-limit></el-input>
+        二级类型名:<el-input type="text" v-model="type_name2" maxlength="5" show-word-limit disabled></el-input>
+        三级类型名:<el-input type="text" v-model="type_name3" maxlength="5" show-word-limit disabled></el-input>
+      </div>
+      <div v-else-if="type_rank ===2">
+        <Row :gutter="24">
+          <i-col span="6">一级类型名:</i-col>
+          <i-col span="12">
+            <i-select  size="large" style="width:120px" v-model="type_name1">
+              <i-option v-for="item in oneType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+            </i-select>
+          </i-col>
+        </Row>
+        二级类型名:<el-input type="text" v-model="type_name2" maxlength="5" show-word-limit></el-input>
+        三级类型名:<el-input type="text" v-model="type_name3" maxlength="5" show-word-limit disabled></el-input>
+      </div>
+      <div v-else>
+        <Row :gutter="24">
+          <i-col span="6">一级类型名:</i-col>
+          <i-col span="12">
+            <i-select  size="large" style="width:120px" v-model="type_name1">
+              <i-option v-for="item in oneType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+            </i-select>
+          </i-col>
+        </Row>
+        <Row :gutter="24">
+          <i-col span="6">二级类型名:</i-col>
+          <i-col span="12">
+            <i-select  size="large" style="width:120px" v-model="type_name2">
+              <i-option v-for="item in twoType" :key='item.typeid' :value="item.name" :label="item.name">{{ item.name }}</i-option>
+            </i-select>
+          </i-col>
+        </Row>
+        三级类型名:<el-input type="text" v-model="type_name3" maxlength="5" show-word-limit></el-input>
+      </div>
+    </div>
+    <div slot="footer">
+      <Button type="primary" size="large" long @click="beSureEdit2()" style="width: 30%">确定</Button>
+      <Button type="Ghost" size="large" long @click="closeModel2()" style="width: 30%">取消</Button>
+    </div>
+  </Modal>
+  <Modal v-model="model3" width="400">
+    <p slot="header">
+      <span>添加子类</span>
+    </p>
+    <div>
+        <div v-if="add_rank ===2">
+          一级类型名:<el-input type="text" v-model="add_name1" maxlength="5" show-word-limit disabled></el-input>
+          二级类型名:<el-input type="text" v-model="add_name2" maxlength="5" show-word-limit></el-input>
+        </div>
+        <div v-else-if="add_rank === 3">
+          一级类型名:<el-input type="text" v-model="add_name2" maxlength="5" show-word-limit disabled></el-input>
+          二级类型名:<el-input type="text" v-model="add_name1" maxlength="5" show-word-limit disabled></el-input>
+          三级类型名:<el-input type="text" v-model="add_name3" maxlength="5" show-word-limit></el-input>
+        </div>
+    </div>
+    <div slot="footer">
+      <Button type="primary" size="large" long @click="beSureAddSun()" style="width: 30%">确定</Button>
+      <Button type="Ghost" size="large" long @click="closeModel3()" style="width: 30%">取消</Button>
+    </div>
+  </Modal>
+  </div>
+</template>
+
+<script>
+    export default {
+      name: "seeCommodityType",
+      data() {
+        return {
+          typeList: [],
+          // 默认显示第几页
+          currentPage:1,
+          // 总条数,根据接口获取数据长度(注意:这里不能为空)
+          totalCount:1,
+          // 个数选择器(可修改)
+          pageSizes:[5,10,20,40],
+          // 默认每页显示的条数(可修改)
+          PageSize:10,
+          model: false,
+          model2: false,
+          model3: false,
+          text_1: '',
+          text_2: '',
+          text_3: '',
+          type_1_1: '',
+          type_2_1: '',
+          type_2_2: '',
+          radio: '1',
+          oneType: [],
+          twoType: [],
+          type_rank: 0,
+          type_name1: '',
+          type_name2: '',
+          type_name3: '',
+          now_type_id:'',
+          add_rank: '',
+          new_parent_id:'',
+          add_name1:'',
+          add_name2:'',
+          add_name3:''
+        }
+      },
+      created() {
+        this.getCommodityType();
+      },
+      methods: {
+        getCommodityType() {
+          this.$axios({
+            url: 'query/commodityType',
+            methods: 'get'
+          }).then(res =>{
+            if(res.data.code === 200) {
+              this.typeList = res.data.data;
+              this.typeList.forEach(item =>{
+                if(item.name2 === null || item.name2 === '') {
+                  item.name2 = '/';
+                }
+                if(item.name1 === null || item.name1 === '') {
+                  item.name1 = '/';
+                }
+              })
+              this.totalCount=res.data.data.length;
+            }
+          })
+        },
+        getOneTypeList(parentid) {
+          this.$axios({
+            url: 'query/oneCommodityType',
+            methods: 'get',
+            params: {
+              parentid:parentid
+            }
+          }).then(res =>{
+            if(res.data.code === 200) {
+              this.oneType = res.data.data;
+            }
+          })
+        },
+        getTwoTypeList(parentName){
+          this.type_2_2 = '';
+          this.$axios({
+            url: 'query/twoCommodityType',
+            methods: 'get',
+            params: {
+              parentName:parentName
+            }
+          }).then(res =>{
+            if(res.data.code === 200) {
+              this.twoType = res.data.data;
+            }
+          });
+        },
+        // 分页
+        // 每页显示的条数
+        handleSizeChange(val) {
+          // 改变每页显示的条数
+          this.PageSize=val
+          // 注意:在改变每页显示的条数时,要将页码显示到第一页
+          this.currentPage=1
+        },
+        // 显示第几页
+        handleCurrentChange(val) {
+          // 改变默认的页数
+          this.currentPage=val
+        },
+        openModel1(){
+          this.model = true;
+        },
+        edit(index, row){
+          this.type_name1=row.name3;
+          this.type_name2=row.name2;
+          this.type_name3=row.name1;
+          this.now_type_id = row.typeid3;
+          alert(this.type_name1+' '+this.type_name2+' '+this.type_name3+' '+this.now_type_id);
+          if(this.type_name2 ==='/' && this.type_name3 ==='/'){
+            this.type_rank = 1;
+          } else if(this.type_name3 === '/') {
+            this.type_rank = 2;
+            this.getOneTypeList(0);
+          } else {
+            this.type_rank = 3;
+            this.getOneTypeList(0);
+          }
+          this.model2 = true;
+        },
+        beSureEdit2() {
+          if(this.type_rank === 1) {
+            this.editCommodity(this.now_type_id, this.type_name1, '/');
+          } else if (this.type_rank === 2) {
+            this.editCommodity(this.now_type_id, this.type_name2, this.type_name1);
+          } else if (this.type_rank === 3){
+            this.editCommodity(this.now_type_id, this.type_name3, this.type_name2);
+          }
+        },
+        editCommodity(typeid,name1,name2) {
+          this.$axios({
+            url: 'edit/commodityType',
+            method: 'get',
+            params: {
+              typeid: typeid,
+              name1: name1,
+              name2:name2
+            }}).then(res =>{
+              if(res.data.code === 200) {
+                this.model2 = false;
+                alert("编辑成功");
+              }
+            });
+        },
+        deleteCommodityType(index, row) {
+
+          this.$axios({
+            url:'delete/commodityType',
+            methods:'get',
+            params:{
+              typeid:row.typeid3
+            }
+          }).then(res => {
+            if(res.data.code === 200) {
+              alert('删除成功');
+            }
+          })
+        },
+        beSureAdd(){
+          if(this.radio === '1'){
+            this.submit(this.text_1, '/');
+          }else if(this.radio === '2'){
+            this.submit(this.text_2, this.type_1_1);
+          }else if(this.radio ==='3'){
+            this.submit(this.text_3, this.type_2_2);
+          }
+        },
+        submit(type,parent){
+          this.$axios({
+            url: 'add/commodityType',
+            methods: 'get',
+            params:{
+              type: type,
+              parent:parent
+            }
+          }).then(res =>{
+            if(res.data.code === 200) {
+              this.model = false;
+              alert("提交成功");
+            }
+          });
+        },
+        addSun(index, row) {
+          this.add_name1=row.name3;
+          this.add_name2=row.name2;
+          this.add_name3=row.name1;
+          this.new_parent_id = row.typeid3;
+          if(this.add_name2==='/' && this.add_name3 === '/') {
+            this.add_rank = 2;
+            this.add_name2='';
+            this.model3 = true;
+          } else if(this.add_name2 !='/' && this.add_name3 ==='/') {
+            this.add_rank = 3;
+            this.add_name3='';
+            this.model3 = true;
+          }else{
+            alert("已是三级类型,不得添加子类");
+          }
+        },
+        beSureAddSun() {
+          var name;
+          if(this.add_rank === 2)
+            name = this.add_name2;
+          else if(this.add_rank === 3)
+            name = this.add_name3;
+          this.$axios({
+            url: 'add/sunCommodityType',
+            methods: 'get',
+            params: {
+              name: name,
+              parentid: this.new_parent_id,
+            }
+          }).then(res => {
+            if(res.data.code === 200) {
+              this.model3 = false;
+              alert("添加子类型成功");
+            }
+          })
+        },
+        closeModel(){
+          this.model = false;
+        },
+        closeModel2(){
+          this.model2 = false;
+        },
+        closeModel3(){
+          this.model3 = false;
+        }
+      },
+      watch: {
+        type_2_1() {
+          var name = this.type_2_1;
+          this.getTwoTypeList(name);
+        },
+        type_name1() {
+          var name = this.type_2_1;
+          this.getTwoTypeList(name);
+            this.type_name2 = '';
+            this.$axios({
+              url: 'query/twoCommodityType',
+              methods: 'get',
+              params: {
+                parentName:name
+              }
+            }).then(res =>{
+              if(res.data.code === 200) {
+                this.type_name2 = res.data.data;
+              }
+            });
+        },
+        radio(){
+          if(this.radio==='3' || this.radio ==='2'){
+            this.getOneTypeList(0);
+          }
+        }
+      }
+    }
+
+</script>
+
+<style scoped>
+
+</style>

+ 143 - 0
src/page/index.vue

@@ -0,0 +1,143 @@
+<template>
+	<section class="index">
+		<div class="visitor">
+			<div class="totle-visitor visitor-card">
+				<Card>
+            <p slot="title">总访问数</p>
+            <p>{{ vcount }}人</p>
+            <a href="#" slot="extra">
+                  <Icon type="person-stalker"></Icon>
+            </a>
+        </Card>
+			</div>
+			<div class="new-visitor visitor-card">
+				<Card>
+            <p slot="title">新访问数</p>
+            <p>{{ newvcount }}人</p>
+            <a href="#" slot="extra">
+                  <Icon type="person"></Icon>
+            </a>
+        </Card>
+			</div>
+			<div class="totle-info visitor-card">
+				<Card>
+        <p slot="title">发布拍卖物数</p>
+        <p>{{ count.commodityCount }}个</p>
+        <a href="#" slot="extra">
+              <Icon type="document-text"></Icon>
+        </a>
+    </Card>
+			</div>
+			<div class="not-deal visitor-card">
+				<Card>
+            <p slot="title">未处理拍卖物数</p>
+            <p>{{ count.notDealCount }}个</p>
+            <a href="#" slot="extra">
+                  <Icon type="document"></Icon>
+            </a>
+        </Card>
+			</div>
+		</div>
+    <br>
+    <div class="visitor">
+      <div class="totle-info visitor-card">
+        <Card>
+          <p slot="title">审核未通过商品数</p>
+          <p>{{ count.notPassCount }}个</p>
+          <a href="#" slot="extra">
+            <Icon type="document-text"></Icon>
+          </a>
+        </Card>
+      </div>
+      <div class="totle-info visitor-card">
+        <Card>
+          <p slot="title">未开始竞拍商品数</p>
+          <p>{{ count.notBeginCount}}个</p>
+          <a href="#" slot="extra">
+            <Icon type="document-text"></Icon>
+          </a>
+        </Card>
+      </div>
+      <div class="totle-info visitor-card">
+        <Card>
+          <p slot="title">正在竞拍商品数</p>
+          <p>{{ count.biddingCount }}个</p>
+          <a href="#" slot="extra">
+            <Icon type="document-text"></Icon>
+          </a>
+        </Card>
+      </div>
+      <div class="totle-info visitor-card">
+        <Card>
+          <p slot="title">结束竞拍商品数</p>
+          <p>{{ count.endCount }}个</p>
+          <a href="#" slot="extra">
+            <Icon type="document-text"></Icon>
+          </a>
+        </Card>
+      </div>
+    </div>
+	</section>
+</template>
+
+<script>
+	import axios from 'axios'
+	export default {
+		data() {
+			return {
+				username: 'risatoar',
+        count:{},
+				vcount: 59,
+				newvcount: 30
+				// icount: 66,
+				// pcount: 25
+			}
+		},
+    created() {
+		  this.islogin();
+		  this.getInfoCount();
+    },
+		mounted() {
+			this.getInfoCount(),
+			this.getPreviewCount()
+		},
+		methods: {
+		  islogin() {
+        let localStorage = window.localStorage;
+        let adminInfo = localStorage.getItem('adminInfo');
+        if(null === adminInfo) {
+          this.$router.push("/sign");
+        }
+      },
+			getInfoCount() {
+          axios.get("/info/Count")
+          .then(res=> {
+              if(res.data.code === 200) {
+                this.count = res.data.data;
+              }
+          })
+          .catch(err=> {
+              console.log(err)
+          })
+        }
+		}
+	}
+</script>
+
+<style scoped>
+	.index {
+		width: 100%;
+		position: relative;
+	}
+
+	.visitor {
+		display: flex;
+		flex-flow: row wrap;
+		justify-content: space-between;
+	}
+
+	.visitor-card {
+		width: 20%;
+	}
+
+</style>

+ 321 - 0
src/page/info/manageinfo.vue

@@ -0,0 +1,321 @@
+
+<template>
+	<section id="manageinfo">
+		<div class="minfo-inner">
+            <Modal
+                v-model="modal1"
+                title="拍卖公告审核"
+                @on-ok="onCheck">
+                <CheckboxGroup v-model="checkbox">
+                    <div class="checkitem">审核项(请打开对应项的查看按钮进行审查)</div>
+                    <span class="checkwarn">以下内容请在48小时内仔细审核,全部确认通过后审核才能通过</span><br>
+                    <Checkbox label="title">标题</Checkbox><br>
+                    <Checkbox label="dec">详细描述</Checkbox><br>
+                    <Checkbox label="img">封面</Checkbox><br>
+                    <Checkbox label="maintext">主要内容</Checkbox><br>
+                </CheckboxGroup>
+                <br>
+                <div class="banAuthor">
+                    <Collapse>
+                            <Panel name="1">
+                                拍卖公告审查注意事项
+                                <p slot="content">针对四个审查点进行审查,审查通过对对应审查项打钩,对内容轻微不合法的信息拨打电话通知对应用户通知修改,对内容严重违规的信息可直接删除,并封禁相应用户</p>
+                            </Panel>
+                            <Panel name="2">
+                                违规操作
+                                <div slot="content">
+                                    对用户违规操作进行相应操作。
+                                    <Collapse accordion>
+                                        <Panel name="1-1">
+                                            通知用户
+                                            <p slot="content">作者联系方式: 13905860879</p>
+                                        </Panel>
+                                        <Panel name="1-2">
+                                            封禁用户
+                                            <p slot="content">
+                                                <Button type="error" @click.native="banUser()">封禁</Button>
+                                                内容如果严重违规,可以封禁该用户
+                                            </p>
+                                        </Panel>
+                                    </Collapse>
+                                </div>
+                            </Panel>
+                        </Collapse>
+                </div>
+            </Modal>
+			<div class="title"><span>管理拍卖公告</span></div>
+            <div style="position: absolute; right: 16px;">
+                <Checkbox label="male" @click.native="showUnChecked()">只看未审核</Checkbox>
+            </div>
+			<div class="info-list">
+				<div>
+			        <Table border :columns="columns7" :data="data6"></Table>
+			        <Page
+                    :total="total"
+                    :page-size="16"
+                    simple
+                    :current.sync="pagecount"
+                    @on-change="showPageCount"
+                    ></Page>
+			    </div>
+			</div>
+		</div>
+	</section>
+</template>
+
+<script>
+    import axios from 'axios'
+    export default {
+        data () {
+            return {
+                total: 1,
+                pagecount: 1,
+                uncheck: false,
+                allcheck: [],
+                checkbox: [],
+                columns7: [
+                    {
+                        title: '作者',
+                        key: 'author',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Icon', {
+                                    props: {
+                                        type: 'person'
+                                    }
+                                }),
+                                h('strong', params.row.author)
+                            ]);
+                        }
+                    },
+                    {
+                        title: '标题',
+                        key: 'title'
+                    },
+                    {
+                        title: '审核(true-已审核,false-未审核)',
+                        key: 'isChecked'
+                    },
+                    {
+                        title: '发布日期',
+                        key: 'date'
+                    },
+                    {
+                        title: '操作',
+                        key: 'action',
+                        width: 180,
+                        align: 'center',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Button', {
+                                    props: {
+                                        type: 'primary',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.show(params.index)
+                                        }
+                                    }
+                                }, '查看'),
+                                h('Button', {
+                                    props: {
+                                        type: 'primary',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.showCheck(params.index)
+                                        }
+                                    }
+                                }, '审核'),
+                                h('Button', {
+                                    props: {
+                                        type: 'error',
+                                        size: 'small'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.remove(params.index)
+                                        }
+                                    }
+                                }, '删除')
+                            ]);
+                        }
+                    }
+                ],
+                data6: [],
+                data2: [],
+                modal1: false,
+                now: 0,
+                nowindex: 0,
+                postcheck: {
+                    _id: ''
+                }
+            }
+        },
+        mounted() {
+            this.getList()
+        },
+        methods: {
+            show (index) {
+                window.location.href = "http://localhost:81/detail/info/" + this.data6[index]._id
+            },
+            showCheck(index) {
+                let oldindex = this.nowindex
+                this.nowindex = this.data6[index]._id
+                this.modal1 = true
+                if(this.nowindex != oldindex) {
+                    this.checkbox = this.allcheck[index]
+                }
+                this.now = index
+            },
+            onCheck() {
+                if(this.checkbox == undefined || this.checkbox.length == 0) {
+                    this.$Message.warning('请再次确定审核项');
+                } else if(this.checkbox.length<4) {
+                    this.allcheck[this.now] = this.checkbox
+                    console.log(this.allcheck[this.now])
+                } else {
+                    this.postcheck._id = this.data6[this.now]._id
+                    axios.post("infos/check",this.postcheck).then(res => {
+                        console.log(res)
+                    })
+                }
+            },
+            banUser() {
+                let nowindex = this.now
+                let band = {
+                    username: this.data6[nowindex].author
+                }
+                console.log(band)
+                if(band.username != 'risatoar') {
+                    axios.post("/users/ban",band).then((res)=> {
+                        if(res.data.status == 1001){
+                            this.error(`用户:${this.data6[this.now].author} 已被封禁`)
+                        }
+                    }).catch((error)=> {
+                      console.log(error);
+                    });
+                } else {
+                    this.error("无法对管理员用户进行此操作")
+                }
+            },
+            success (msg) {
+                this.$Message.success(msg);
+            },
+            warning (msg) {
+                this.$Message.warning(msg);
+            },
+            error (msg) {
+                this.$Message.error(msg);
+            },
+            remove (index) {
+                let del = {
+                    delid: this.data6[index]._id
+                }
+                axios.post("/infos/del",del)
+                .then(res=> {
+                    this.data6.splice(index, 1);
+                })
+                .catch(err =>{
+                })
+            },
+             // 获取拍卖预告总条数
+            getPageCount() {
+                axios.get("/infos/Count")
+                .then(res=> {
+                    this.total = res.data.result.count
+                })
+                .catch(err=> {
+                    console.log(err)
+                })
+            },
+            showUnChecked() {
+                this.uncheck = !this.uncheck;
+                let data = this.data6.filter(function(index) {
+                    return index.isChecked == false;
+                });
+                this.data6 = this.uncheck == true ? data : this.data2
+            },
+            // 页码切换回调
+            showPageCount() {
+                this.getList();
+            },
+            getList() {
+                this.getPageCount()
+                let Post = {
+                    pagecount: this.pagecount
+                }
+                axios.post("/infos/list",Post)
+                .then(res=> {
+                    this.data6 = res.data.result.list
+                    this.data2 = res.data.result.list
+                })
+            },
+        }
+    }
+</script>
+
+<style>
+  .checkitem {
+    font-weight: bolder;
+    font-size: 16px;
+    margin-bottom: 6px;
+  }
+
+  .checkwarn {
+    margin-bottom: 6px;
+    color: red;
+  }
+</style>
+<style scoped>
+	#manageinfo {
+		width: 100%;
+		height: 100%;
+	}
+
+	.minfo-inner {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		font-size: 16px;
+		display: flex;
+		flex-flow: column wrap;
+		justify-content: flex-start;
+        position: relative;
+	}
+
+	.title {
+		font-weight: 550;
+		color: #000;
+		font-size: 20px;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.title::before {
+		content: ".";
+		width: 3px;
+		height: 20px;
+		background-color: #000;
+		margin-right: 10px;
+	}
+
+	.addinfo {
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 20px;
+		background-color: rgba(235,238,245,.9);
+	}
+
+
+</style>

+ 161 - 0
src/page/knowledge/addknowledge.vue

@@ -0,0 +1,161 @@
+<template>
+	<section id="addknowledge">
+		<div class="addknow-inner">
+			<div class="title"><span>添加拍卖知识</span>
+				<button class="addkonw-btn" @click="addInfo">立即发布!</button>
+			</div>
+			<div class="addinfo-content-addtitle">
+				<label>点击这里输入标题</label>
+				<input type="text" class="form-control input-title" label="点击这里输入标题" v-model="add.title"></input>
+			</div>
+			<!-- 拍卖信息添加界面简介添加 -->
+			<div class="addinfo-content-adddescription">
+				<label>请输入简介</label>
+				<input type="text" class="form-control input-description" label="请输入简介" v-model="add.description"></input>
+			</div>
+			<vue-editor v-model="add.maintext"></vue-editor>
+		</div>
+	</section>
+</template>
+
+<script>
+	import axios from 'axios'
+	import { VueEditor } from 'vue2-editor'
+	export default {
+		components: {
+		   VueEditor
+		},
+		data() {
+			return {
+				add: {
+					author: 'risatoar',
+					title: '',
+					description: '',
+					maintext: '',
+					covermap: '151515430396129900_a480x270.jpg',
+					watcher: ''
+				},
+				username: '',
+			}
+		},
+		mounted() {
+			this.gotop()
+		},
+		methods: {
+			gotop() {
+				window.scrollTo(0,0)
+			},
+			success () {
+	        	this.$Message.success('发送成功');
+	        },
+	        // 通过axios封装的ajax操作来与后台进行异步post操作,添加拍卖公告
+			addInfo() {
+				if(this.add.title == '') {
+					this.$Message.error('请添加标题');
+				}else if(this.add.maintext == '') {
+					this.$Message.error('请添加主要信息');
+				}else {
+					axios.post("/knowledge/add",this.add).then((res)=> {
+						console.log(res);
+						if(res.status == '200'){
+							this.success()
+						}
+					}).catch((error)=> {
+						console.log(error);
+					});
+				}
+			}
+		}
+	}
+</script>
+<style>
+  #addknowledge {
+    width: 100%;
+    height: 100%;
+    position: relative;
+  }
+
+  .addknow-inner {
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    font-size: 16px;
+    display: flex;
+    flex-flow: column wrap;
+    justify-content: flex-start;
+  }
+
+  .title {
+    font-weight: 500;
+    color: #000;
+    font-size: 20px;
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .title::before {
+    content: ".";
+    width: 3px;
+    height: 20px;
+    background-color: #000;
+    margin-right: 10px;
+  }
+
+  .addkonw-btn {
+    width: 100px;
+    height: 51px;
+    display: inline-block;
+    border-radius: 4px;
+    border: 1px solid #35495e;
+    color: #fff;
+    background-color: #0c328a;
+    text-decoration: none;
+    margin-bottom: 10px;
+    overflow: hidden;
+    font-family: Main Head;
+    font-size: 16px;
+    position: absolute;
+    top: 10px;
+    right: 10px;
+  }
+
+  .addkonw-btn:hover {
+    color: #fff;
+    background-color: #35495e;
+  }
+
+  .addkonw-btn:focus, .addkonw-btn:hover {
+    background: rgba(12, 50, 138, .8);
+    border-color: rgba(12, 50, 138, .8);
+    color: #fff
+  }
+
+  .addkonw-btn:active {
+    background: rgba(12, 50, 138, .8);
+    border-color: rgba(12, 50, 138, .8);
+    color: #fff
+  }
+
+  .addkonw-btn:active {
+    outline: 0
+  }
+
+  .addinfo-content-addtitle {
+    padding: 15px 10px;
+    font-weight: bolder;
+  }
+  .addinfo-content-addtitle .input-title {
+    width: 100%;
+    text-align: center;
+  }
+  .addinfo-content-adddescription {
+    padding: 15px 10px;
+    font-weight: bolder;
+  }
+  .addinfo-content-adddescription .input-description {
+    width: 100%;
+    text-align: center;
+    text-indent: 25px;
+  }
+</style>

+ 233 - 0
src/page/knowledge/mangeknowledge.vue

@@ -0,0 +1,233 @@
+<template>
+	<section id="mangeknowledge">
+		<div class="mknow-inner">
+			<div class="title"><span>管理拍卖知识</span></div>
+			<div class="addknowledge">
+				<router-link to="/addknowledge">
+				<Button type="info">添加拍卖公告</Button>
+				</router-link>
+			</div>
+			<div class="knowledge-list">
+				<div>
+			        <Table border :columns="columns" :data="data2"></Table>
+			        <Page
+                    :total="total"
+                    :page-size="16"
+                    simple
+                    :current.sync="pagecount"
+                    @on-change="showPageCount"
+                    ></Page>
+			    </div>
+			</div>
+		</div>
+        <infomodifydialog
+                    :is-show="isInfoMoDialog"
+                    :modifydata="selectModify"
+                    @on-close="closeDialog('isInfoMoDialog')">
+        </infomodifydialog>
+	</section>
+</template>
+
+<script>
+    import axios from 'axios'
+    import infomodifydialog from '../../components/modifydialog/infomodify.vue'
+    export default {
+        components: {
+            infomodifydialog,
+        },
+        data () {
+            return {
+                total: 1,
+                pagecount: 1,
+                isInfoMoDialog: false,
+                selectModify: {},
+                knowlist: [],
+                columns: [
+                    {
+                        title: '作者',
+                        key: 'author',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Icon', {
+                                    props: {
+                                        type: 'person'
+                                    }
+                                }),
+                                h('strong', params.row.author)
+                            ]);
+                        }
+                    },
+                    {
+                        title: '标题',
+                        key: 'title'
+                    },
+                    {
+                        title: '发布日期',
+                        key: 'date'
+                    },
+                    {
+                        title: '操作',
+                        key: 'action',
+                        width: 250,
+                        align: 'center',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Button', {
+                                    props: {
+                                        type: 'primary',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.show(params.index)
+                                        }
+                                    }
+                                }, '查看'),
+                                h('Button', {
+                                    props: {
+                                        type: 'primary',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.getUserInfo(params.index)
+                                        }
+                                    }
+                                }, '修改'),
+                                h('Button', {
+                                    props: {
+                                        type: 'error',
+                                        size: 'small'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.remove(params.index)
+                                        }
+                                    }
+                                }, '删除')
+                            ]);
+                        }
+                    }
+                ],
+                data2: []
+            }
+        },
+        mounted() {
+            this.getList()
+        },
+        methods: {
+            show (index) {
+                this.$Modal.info({
+                    title: '公告信息',
+                    content: `作者:${this.data2[index].author}<br>标题:${this.data2[index].title}<br>发布日期:${this.data2[index].date}`
+                })
+            },
+            // 显示修改弹出层
+            showInfoModify() {
+                this.isInfoMoDialog = true;
+            },
+            // 关闭弹出层
+            closeDialog(attr) {
+              console.log(attr)
+              this.isInfoMoDialog = false
+            },
+            getUserInfo(number) {
+                let userInfoPost = {
+                    knowledgeid: this.data2[number]._id
+                }
+                console.log(userInfoPost)
+                axios.post("/knowledge/detail",userInfoPost).then((res)=> {
+                    this.selectModify = res.data.result.list;
+                }).catch((error)=> {
+                  console.log(error);
+                });
+                this.showInfoModify()
+            },
+            remove (index) {
+                let del = {
+                    delid: this.data2[index]._id
+                }
+                axios.post("/knowledges/del",del)
+                .then(res=> {
+                    this.data2.splice(index, 1);
+                })
+                .catch(err =>{
+                })
+            },
+             // 获取拍卖预告总条数
+            getPageCount() {
+                axios.get("/knowledges/Count")
+                .then(res=> {
+                    this.total = res.data.result.count
+                })
+                .catch(err=> {
+                    console.log(err)
+                })
+            },
+            // 页码切换回调
+            showPageCount() {
+                this.getList();
+            },
+            getList() {
+                this.getPageCount()
+                let Post = {
+                    pagecount: this.pagecount
+                }
+                axios.post("/knowledges/list",Post)
+                .then(res=> {
+                    this.data2 = res.data.result.list
+                })
+            },
+        }
+    }
+</script>
+
+<style scoped>
+	#mangeknowledge {
+		width: 100%;
+		height: 100%;
+	}
+
+	.mknow-inner {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		font-size: 16px;
+		display: flex;
+		flex-flow: column wrap;
+		justify-content: flex-start;
+	}
+
+	.title {
+		font-weight: 550;
+		color: #000;
+		font-size: 20px;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.title::before {
+		content: ".";
+		width: 3px;
+		height: 20px;
+		background-color: #000;
+		margin-right: 10px;
+	}
+
+	.addknowledge {
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 20px;
+		background-color: rgba(235,238,245,.9);
+	}
+
+
+</style>

+ 163 - 0
src/page/law/addlaw.vue

@@ -0,0 +1,163 @@
+
+
+<template>
+	<section id="addknowledge">
+		<div class="addknow-inner">
+			<div class="title"><span>添加法律法规</span>
+				<button class="addkonw-btn" @click="addInfo">立即发布!</button>
+			</div>
+			<div class="addinfo-content-addtitle">
+				<label>点击这里输入标题</label>
+				<input type="text" class="form-control input-title" label="点击这里输入标题" v-model="add.title"></input>
+			</div>
+			<!-- 拍卖信息添加界面简介添加 -->
+			<div class="addinfo-content-adddescription">
+				<label>请输入简介</label>
+				<input type="text" class="form-control input-description" label="请输入简介" v-model="add.description"></input>
+			</div>
+			<vue-editor v-model="add.maintext"></vue-editor>
+		</div>
+	</section>
+</template>
+
+<script>
+	import axios from 'axios'
+	import { VueEditor } from 'vue2-editor'
+	export default {
+		components: {
+		   VueEditor
+		},
+		data() {
+			return {
+				add: {
+					author: 'risatoar',
+					title: '',
+					description: '',
+					maintext: '',
+					covermap: '151515430396129900_a480x270.jpg',
+					watcher: ''
+				},
+				username: '',
+			}
+		},
+		mounted() {
+			this.gotop()
+		},
+		methods: {
+			gotop() {
+				window.scrollTo(0,0)
+			},
+			success () {
+	        	this.$Message.success('发送成功');
+	        },
+	        // 通过axios封装的ajax操作来与后台进行异步post操作,添加拍卖公告
+			addInfo() {
+				if(this.add.title == '') {
+					this.$Message.error('请添加标题');
+				}else if(this.add.maintext == '') {
+					this.$Message.error('请添加主要信息');
+				}else {
+					axios.post("/law/add",this.add).then((res)=> {
+						console.log(res);
+						if(res.status == '200'){
+							this.success()
+						}
+					}).catch((error)=> {
+						console.log(error);
+					});
+				}
+			}
+		}
+	}
+</script>
+<style>
+  #addknowledge {
+    width: 100%;
+    height: 100%;
+    position: relative;
+  }
+
+  .addknow-inner {
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    font-size: 16px;
+    display: flex;
+    flex-flow: column wrap;
+    justify-content: flex-start;
+  }
+
+  .title {
+    font-weight: 500;
+    color: #000;
+    font-size: 20px;
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+  }
+
+  .title::before {
+    content: ".";
+    width: 3px;
+    height: 20px;
+    background-color: #000;
+    margin-right: 10px;
+  }
+
+  .addkonw-btn {
+    width: 100px;
+    height: 51px;
+    display: inline-block;
+    border-radius: 4px;
+    border: 1px solid #35495e;
+    color: #fff;
+    background-color: #0c328a;
+    text-decoration: none;
+    margin-bottom: 10px;
+    overflow: hidden;
+    font-family: Main Head;
+    font-size: 16px;
+    position: absolute;
+    top: 10px;
+    right: 10px;
+  }
+
+  .addkonw-btn:hover {
+    color: #fff;
+    background-color: #35495e;
+  }
+
+  .addkonw-btn:focus, .addkonw-btn:hover {
+    background: rgba(12, 50, 138, .8);
+    border-color: rgba(12, 50, 138, .8);
+    color: #fff
+  }
+
+  .addkonw-btn:active {
+    background: rgba(12, 50, 138, .8);
+    border-color: rgba(12, 50, 138, .8);
+    color: #fff
+  }
+
+  .addkonw-btn:active {
+    outline: 0
+  }
+
+  .addinfo-content-addtitle {
+    padding: 15px 10px;
+    font-weight: bolder;
+  }
+  .addinfo-content-addtitle .input-title {
+    width: 100%;
+    text-align: center;
+  }
+  .addinfo-content-adddescription {
+    padding: 15px 10px;
+    font-weight: bolder;
+  }
+  .addinfo-content-adddescription .input-description {
+    width: 100%;
+    text-align: center;
+    text-indent: 25px;
+  }
+</style>

+ 231 - 0
src/page/law/mangelaw.vue

@@ -0,0 +1,231 @@
+<template>
+	<section id="mangelaw">
+		<div class="mlaw-inner">
+			<div class="title"><span>管理拍卖法规</span></div>
+			<div class="addlaw">
+				<router-link to="/addlaws">
+				<Button type="info">添加拍卖公告</Button>
+				</router-link>
+			</div>
+			<div class="law-list">
+				<div>
+			        <Table border :columns="columns" :data="data2"></Table>
+			        <Page
+                    :total="total"
+                    :page-size="16"
+                    simple
+                    :current.sync="pagecount"
+                    @on-change="showPageCount"
+                    ></Page>
+			    </div>
+			</div>
+		</div>
+        <previewmodifydialog
+                    :is-show="isPreviewMoDialog"
+                    :modifydata="selectModify"
+                    @on-close="closeDialog('isPreviewMoDialog')">
+        </previewmodifydialog>
+	</section>
+</template>
+
+<script>
+    import axios from 'axios'
+    import previewmodifydialog from '../../components/modifydialog/previewmodify.vue'
+    export default {
+      components: {
+        previewmodifydialog,
+      },
+      data () {
+        return {
+          total: 1,
+          pagecount: 1,
+          isPreviewMoDialog: false,
+          selectModify: {},
+          columns: [
+            {
+              title: '作者',
+              key: 'author',
+              render: (h, params) => {
+                return h('div', [
+                  h('Icon', {
+                    props: {
+                        type: 'person'
+                    }
+                  }),
+                  h('strong', params.row.author)
+                ]);
+              }
+            },
+            {
+              title: '标题',
+              key: 'title'
+            },
+            {
+              title: '发布日期',
+              key: 'date'
+            },
+            {
+              title: '操作',
+              key: 'action',
+              width: 200,
+              align: 'center',
+              render: (h, params) => {
+                return h('div', [
+                  h('Button', {
+                    props: {
+                      type: 'primary',
+                      size: 'small'
+                    },
+                    style: {
+                      marginRight: '5px'
+                    },
+                    on: {
+                      click: () => {
+                        this.show(params.index)
+                      }
+                    }
+                  }, '查看'),
+                  h('Button', {
+                    props: {
+                      type: 'primary',
+                      size: 'small'
+                    },
+                    style: {
+                      marginRight: '5px'
+                    },
+                    on: {
+                      click: () => {
+                        this.getUserInfo(params.index)
+                      }
+                    }
+                  }, '修改'),
+                  h('Button', {
+                    props: {
+                      type: 'error',
+                      size: 'small'
+                    },
+                    on: {
+                      click: () => {
+                        this.remove(params.index)
+                      }
+                    }
+                  }, '删除')
+                ]);
+                }
+              }
+            ],
+            data2: []
+        }
+      },
+      mounted() {
+        this.getList()
+      },
+      methods: {
+        show (index) {
+          this.$Modal.info({
+            title: '公告信息',
+            content: `作者:${this.data2[index].author}<br>标题:${this.data2[index].title}<br>发布日期:${this.data2[index].date}`
+          })
+        },
+        remove (index) {
+          let del = {
+            delid: this.data2[index]._id
+          }
+          axios.post("/laws/del",del)
+          .then(res=> {
+            this.data2.splice(index, 1);
+          })
+          .catch(err =>{
+          })
+        },
+        showInfoModify() {
+          this.isPreviewMoDialog = true;
+        },
+        // 关闭弹出层
+        closeDialog(attr) {
+          console.log(attr)
+          this.isPreviewMoDialog = false
+        },
+        getUserInfo(number) {
+          let userInfoPost = {
+            lawid: this.data2[number]._id
+          }
+          console.log(userInfoPost)
+          axios.post("/law/detail",userInfoPost).then((res)=> {
+            this.selectModify = res.data.result.list;
+          }).catch((error)=> {
+            console.log(error);
+          });
+          this.showInfoModify()
+        },
+         // 获取拍卖预告总条数
+        getPageCount() {
+          axios.get("/laws/Count")
+          .then(res=> {
+            this.total = res.data.result.count
+          })
+          .catch(err=> {
+            console.log(err)
+          })
+        },
+        // 页码切换回调
+        showPageCount() {
+          this.getList();
+        },
+        getList() {
+          this.getPageCount()
+          let Post = {
+              pagecount: this.pagecount
+          }
+          axios.post("/laws/list",Post)
+          .then(res=> {
+              this.data2 = res.data.result.list
+          })
+        },
+      }
+    }
+</script>
+
+<style scoped>
+	#mangelaw {
+		width: 100%;
+		height: 100%;
+	}
+
+	.mlaw-inner {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		font-size: 16px;
+		display: flex;
+		flex-flow: column wrap;
+		justify-content: flex-start;
+	}
+
+	.title {
+		font-weight: 550;
+		color: #000;
+		font-size: 20px;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.title::before {
+		content: ".";
+		width: 3px;
+		height: 20px;
+		background-color: #000;
+		margin-right: 10px;
+	}
+
+	.addlaw {
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 20px;
+		background-color: rgba(235,238,245,.9);
+	}
+
+
+</style>

+ 208 - 0
src/page/layout.vue

@@ -0,0 +1,208 @@
+<!--
+layout全局组件
+author:xifujiang
+-->
+<template>
+  <div class="layout">
+    <Layout>
+      <Header>
+        <Menu mode="horizontal" theme="dark" active-name="1">
+          <div class="layout-nav">
+            <MenuItem name="1">
+              <Icon type="ios-navigate"></Icon>
+              首页
+            </MenuItem>
+            <MenuItem name="2">
+              <Icon type="ios-keypad"></Icon>
+              基础设置
+            </MenuItem>
+            <MenuItem name="3">
+              <Avatar src="https://i.loli.net/2017/08/21/599a521472424.jpg" />
+              <span>risatoar</span>
+            </MenuItem>
+          </div>
+        </Menu>
+      </Header>
+      <Layout :style="{padding: '0 50px'}">
+        <Content :style="{padding: '24px 0', minHeight: '280px', background: '#fff'}">
+          <Layout>
+            <Sider hide-trigger :style="{background: '#fff'}">
+              <Menu :active-name="active" theme="light" width="auto" :open-names="open">
+                <Submenu name="1">
+                  <template slot="title">
+                    <Icon type="ios-navigate"></Icon>
+                    首页
+                  </template>
+                  <router-link to="/">
+                    <MenuItem name="1-1" @click.native="Open('1-1','1')">网站数据</MenuItem>
+                  </router-link>
+                </Submenu>
+                <Submenu name="2">
+                    <template slot="title">
+                      <Icon type="ios-analytics"></Icon>
+                      拍卖管理
+                    </template>
+                    <!--<router-link to="/seeCommodity">-->
+                      <!--<MenuItem name="2-1">查看商品</MenuItem>-->
+                    <!--</router-link>-->
+                    <router-link to="/dealCommodity">
+                      <MenuItem name="2-1">处理商品</MenuItem>
+                    </router-link>
+                    <router-link to="/seeCommodityType">
+                      <MenuItem name="2-2">查看商品类型</MenuItem>
+                    </router-link>
+                    <router-link to="/dealMember">
+                      <MenuItem name="2-3">会员管理</MenuItem>
+                    </router-link>
+                  </Submenu>
+                <Submenu name="3">
+                    <template slot="title">
+                        <Icon type="ios-analytics"></Icon>
+                        拍卖公告
+                    </template>
+                    <router-link :to="{path:'/manageinfo'}">
+                    <MenuItem name="3-1" @click.native="Open('3-1','3')">管理公告</MenuItem>
+                    </router-link>
+                </Submenu>
+                <Submenu name="4">
+                    <template slot="title">
+                        <Icon type="ios-analytics"></Icon>
+                        拍卖知识
+                    </template>
+                    <router-link to="/addknowledge">
+                    <MenuItem name="4-1" @click.native="Open('4-1','4')">添加知识</MenuItem>
+                    </router-link>
+                    <router-link to="/manageknowledge">
+                    <MenuItem name="4-2" @click.native="Open('4-2','4')">管理知识</MenuItem>
+                    </router-link>
+                </Submenu>
+                <Submenu name="5">
+                    <template slot="title">
+                        <Icon type="ios-analytics"></Icon>
+                        法律法规
+                    </template>
+                    <router-link to="/addlaws">
+                    <MenuItem name="5-1" @click.native="Open('5-1','5')">添加法规</MenuItem>
+                    </router-link>
+                    <router-link to="/managelaws">
+                    <MenuItem name="5-2" @click.native="Open('5-2','5')">管理法规</MenuItem>
+                    </router-link>
+                </Submenu>
+                <Submenu name="6">
+                    <template slot="title">
+                        <Icon type="ios-analytics"></Icon>
+                        用户管理
+                    </template>
+                    <router-link to="/adduser">
+                    <MenuItem name="6-1">添加用户</MenuItem>
+                    </router-link>
+                    <router-link to="/manageusers">
+                    <MenuItem name="6-2">管理用户</MenuItem>
+                    </router-link>
+                </Submenu>
+              </Menu>
+            </Sider>
+            <Content :style="{padding: '24px', minHeight: '80vh', background: '#fff'}">
+              <router-view/>
+            </Content>
+          </Layout>
+        </Content>
+      </Layout>
+      <Footer class="layout-footer-center">Proudly By xifujiang Copyright © 2019. All rights reserved.</Footer>
+    </Layout>
+  </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+export default{
+	name: 'layout',
+  data() {
+    return {
+    }
+  },
+	mounted() {
+	},
+  computed: {
+    // 利用mapState简化从vuex取值操作
+    ...mapState(['active','open'])
+    // username() {
+    //  return this.$store.state.username
+    // },
+    // isAdmin() {
+    //  return this.$store.state.isAdmin
+    // }
+  },
+	methods: {
+    Open(str1,str2) {
+      this.$store.commit("updateActive",str1)
+      this.$store.commit("updateOpen",str2)
+    }
+	}
+}
+</script>
+<style>
+  .layout{
+    border: 1px solid #d7dde4;
+    background: #f5f7f9;
+    position: relative;
+    border-radius: 4px;
+    overflow: hidden;
+  }
+  .layout-nav{
+    width: 420px;
+    margin: 0 auto;
+    margin-right: 20px;
+  }
+  .layout-footer-center{
+    text-align: center;
+  }
+  html {
+    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+    color: rgba(190 190 190,.8);
+    margin:0;padding:0;
+    word-spacing: 1px;
+    cursor: pointer;
+    -ms-text-size-adjust: 100%;
+    -webkit-text-size-adjust: 100%;
+    -moz-osx-font-smoothing: grayscale;
+    -webkit-font-smoothing: antialiased;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  *, *:before, *:after {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin: 0;
+  }
+
+  a {
+    color: inherit;
+    -webkit-text-decoration-line: none;
+    text-decoration-line: none;
+  }
+
+  a:link,a:visited,a:focus {
+    text-decoration: none;
+    outline: none;
+  }
+
+  p {
+    text-decoration: none;
+  }
+
+  input,button,select,textarea{
+    outline:none;
+  }
+
+  ul, li {
+    list-style: none;
+    margin:0;padding:0;
+  }
+
+  table {
+    border-spacing: 0;
+    border-collapse: collapse;
+  }
+</style>

+ 222 - 0
src/page/login.vue

@@ -0,0 +1,222 @@
+<template>
+	<section id="login">
+		<div class="login-wrap">
+			<div class="login-inner login-form">
+				<div class="login-title">
+					<span>管理员登录</span>
+				</div>
+				<div class="username-input">
+					<input type="text" placeholder="请输入用户名" class="sign-input" v-model="adminTb.name">
+				</div>
+				<div class="password-input">
+					<i class="eye" @click="changeShow"></i>
+					<input :type="pwdtype" placeholder="请输入密码" class="sign-input" v-model="adminTb.password">
+				</div>
+				<div class="sign-btn">
+					<button class="button-sign" @click="Signin">后台登录</button>
+				</div>
+			</div>
+		</div>
+	</section>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+        adminTb: {
+					name: '',
+					password: ''
+				},
+				// 密码的type类型
+				pwdtype: 'password',
+				// 密码显示隐藏状态
+				changepwd: true,
+			}
+		},
+		methods: {
+			// 切换输入密码框密码显示隐藏
+			changeShow() {
+				this.changepwd = !this.changepwd
+				this.pwdtype = this.changepwd == true?'password':'text'
+			},
+			// 输入错误延迟显示,并在初期隐藏错误提示
+			showError(str) {
+				setTimeout(()=>{
+					this[str] = true
+				},1000)
+			},
+			// 登录操作
+			Signin() {
+				this.$axios({
+          url: '/login',
+          method: 'post',
+          params: {
+            name : this.adminTb.name,
+            password: this.adminTb.password
+          }
+        }).then(res=> {
+					if(res.data.code === 200){
+						setTimeout(()=>{
+              localStorage.setItem('adminInfo', JSON.stringify(res.data.data), 60); // 设置半天的过期时间
+              this.$Notice.success({
+							    title: '登录成功'
+							});
+							this.$router.push("/")
+						},1000)
+					}else {
+						this.$Message.warning('请确认登录权限');
+					}
+				})
+				.catch(err=> {
+					console.log(err)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	#login {
+    top: 0;
+    left: 0;
+    position: fixed;
+    z-index: 1000;
+    width: 100%;
+    height: 100vh;
+    font-size: 16px;
+    background-color: #fff;
+  }
+  .login-wrap {
+    width: 100%;
+    height: 100%;
+    background-image: url("../../static/background.png");
+    background-size: cover;
+    position: relative;
+    display: flex;
+  }
+  .login-inner {
+    width: 400px;
+    height: 400px;
+    padding: 40px 20px;
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    margin: auto;
+    background-color: rgba(255, 255, 255, .8);
+  }
+  .login-title {
+    color: #000;
+    font-size: 24px;
+    font-weight: bolder;
+    margin-bottom: 20px;
+  }
+  .username-input {
+    width: 100%;
+    margin-bottom: 30px;
+  }
+  .password-input {
+    width: 100%;
+    margin-bottom: 30px;
+    position: relative;
+  }
+    .eye {
+      top: 18px;
+      bottom: 18px;
+      right: 10px;
+      position: absolute;
+      width: 25px;
+      height: 15px;
+      background-image: url("../../static/eye.png");
+      background-size: cover;
+    }
+
+  .sign-input {
+      cursor: pointer;
+      -webkit-appearance: none;
+      background-color: #fff;
+      background-image: none;
+      border-radius: 4px;
+      border: 1px solid #d0d0d0;
+      -webkit-box-sizing: border-box;
+      box-sizing: border-box;
+      color: #606266;
+      display: inline-block;
+      font-size: inherit;
+      height: 51px;
+      line-height: 1;
+      outline: 0;
+      padding: 0 15px;
+      -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+      -o-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+      transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+      width: 100%;
+    }
+    .sign-input:focus, .sign-input:hover {
+      border-color: #0c328a;
+    }
+    .sign-input:active {
+      border-color: #0c328a;
+    }
+    .sign-input:active {
+      outline: 0
+    }
+    input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+      font-weight: 500;
+      color: #999999;
+      font-size: 14px;
+      vertical-align: middle;
+    }
+    input:-moz-placeholder, textarea:-moz-placeholder {
+      font-weight: 500;
+      color: #999999;
+      font-size: 14px;
+      vertical-align: middle;
+    }
+    input::-moz-placeholder, textarea::-moz-placeholder {
+      font-weight: 500;
+      color: #999999;
+      font-size: 14px;
+      vertical-align: middle;
+    }
+    input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+      font-weight: 500;
+      color: #999999;
+      font-size: 14px;
+      vertical-align: middle;
+    }
+
+    .button-sign {
+      width: 100%;
+      height: 51px;
+      display: inline-block;
+      border-radius: 4px;
+      border: 1px solid #35495e;
+      color: #fff;
+      font-size: 18px;
+      background-color: #0c328a;
+      text-decoration: none;
+      padding: 10px 30px;
+    }
+
+    .button-sign:hover {
+      color: #fff;
+      background-color: #35495e;
+    }
+
+    .button-sign:focus, .button-sign:hover {
+      background: rgba(12, 50, 138, .8);
+      border-color: rgba(12, 50, 138, .8);
+      color: #fff
+    }
+
+    .button-sign:active {
+      background: rgba(12, 50, 138, .8);
+      border-color: rgba(12, 50, 138, .8);
+      color: #fff
+    }
+
+
+</style>

+ 12 - 0
src/page/my.vue

@@ -0,0 +1,12 @@
+<template>
+	<section id="my">
+	</section>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		}
+	}
+</script>

+ 293 - 0
src/page/preview/mangepreview.vue

@@ -0,0 +1,293 @@
+<template>
+	<section id="mangepreview">
+		<div class="mpreview-inner">
+			<div class="title"><span>管理拍卖预告</span></div>
+      <div style="position: absolute; right: 16px;">
+          <Checkbox label="male" @click.native="showUnChecked()">只看未审核</Checkbox>
+      </div>
+      <Modal
+          v-model="modal1"
+          title="拍卖公告审核"
+          @on-ok="onCheck">
+          <CheckboxGroup v-model="checkbox">
+              <div class="checkitem">审核项(请打开对应项的查看按钮进行审查)</div>
+              <span class="checkwarn">以下内容请在24小时内仔细审核,全部确认通过后审核才能通过</span><br>
+              <Checkbox label="title">标题</Checkbox><br>
+              <Checkbox label="dec">详细描述</Checkbox><br>
+              <Checkbox label="img">封面</Checkbox><br>
+              <Checkbox label="maintext">主要内容</Checkbox><br>
+          </CheckboxGroup>
+          <br>
+          <div class="banAuthor">
+              <Collapse>
+                      <Panel name="1">
+                          拍卖预告审查注意事项
+                          <p slot="content">针对四个审查点进行审查,审查通过对对应审查项打钩,对内容轻微不合法的信息拨打电话通知对应用户通知修改,对内容严重违规的信息可直接删除,并封禁相应用户</p>
+                      </Panel>
+                      <Panel name="2">
+                          违规操作
+                          <div slot="content">
+                              史蒂夫·乔布斯(Steve Jobs),1955年2月24日生于美国加利福尼亚州旧金山,美国发明家、企业家、美国苹果公司联合创办人。
+                              <Collapse accordion>
+                                  <Panel name="1-1">
+                                      通知用户
+                                      <p slot="content">作者联系方式: 13905860879</p>
+                                  </Panel>
+                                  <Panel name="1-2">
+                                      封禁用户
+                                      <p slot="content">
+                                          <Button type="error" @click.native="banUser()">封禁</Button>
+                                          内容如果严重违规,可以封禁该用户
+                                      </p>
+                                  </Panel>
+                              </Collapse>
+                          </div>
+                      </Panel>
+                  </Collapse>
+          </div>
+      </Modal>
+			<div class="preview-list">
+				<div>
+          <Table border :columns="columns" :data="data2"></Table>
+          <Page
+            :total="total"
+            :page-size="16"
+            simple
+            :current.sync="pagecount"
+            @on-change="showPageCount"
+            ></Page>
+			    </div>
+			</div>
+		</div>
+	</section>
+</template>
+
+<script>
+    import axios from 'axios'
+    export default {
+        data () {
+          return {
+            total: 1,
+            pagecount: 1,
+            allcheck: [],
+            checkbox: [],
+            columns: [
+              {
+                title: '作者',
+                key: 'author',
+                render: (h, params) => {
+                  return h('div', [
+                    h('Icon', {
+                        props: {
+                            type: 'person'
+                        }
+                    }),
+                    h('strong', params.row.author)
+                  ]);
+                }
+              },
+              {
+                title: '标题',
+                key: 'title'
+              },
+              {
+                title: '审核(true-已审核,false-未审核)',
+                key: 'isChecked'
+              },
+              {
+                title: '发布日期',
+                key: 'date'
+              },
+              {
+                title: '操作',
+                key: 'action',
+                width: 200,
+                align: 'center',
+                render: (h, params) => {
+                  return h('div', [
+                    h('Button', {
+                      props: {
+                        type: 'primary',
+                        size: 'small'
+                      },
+                      style: {
+                        marginRight: '5px'
+                      },
+                      on: {
+                        click: () => {
+                          this.show(params.index)
+                        }
+                      }
+                    }, '查看'),
+                    h('Button', {
+                      props: {
+                        type: 'primary',
+                        size: 'small'
+                      },
+                      style: {
+                        marginRight: '5px'
+                      },
+                      on: {
+                        click: () => {
+                          this.showCheck(params.index)
+                        }
+                      }
+                    }, '审核'),
+                    h('Button', {
+                      props: {
+                        type: 'error',
+                        size: 'small'
+                      },
+                      on: {
+                        click: () => {
+                          this.remove(params.index)
+                        }
+                      }
+                    }, '删除')
+                  ]);
+                  }
+                }
+                ],
+                uncheck: false,
+                data2: [],
+                data6: [],
+                modal1: false,
+                now: 0,
+                nowindex: '',
+                postcheck: {
+                  _id: ''
+                }
+            }
+        },
+        mounted() {
+          this.getList()
+        },
+        methods: {
+          show (index) {
+           window.location.href = "http://localhost:81/predetail/" + this.data6[index]._id
+          },
+          showCheck(index) {
+            let oldindex = this.nowindex
+            this.nowindex = this.data2[index]._id
+            this.modal1 = true
+            if(this.nowindex != oldindex) {
+              this.checkbox = this.allcheck[index]
+            }
+            this.now = index
+          },
+          onCheck() {
+            if(this.checkbox == undefined || this.checkbox.length == 0) {
+              this.$Message.warning('请再次确定审核项');
+            } else if(this.checkbox.length<4) {
+              this.allcheck[this.now] = this.checkbox
+              console.log(this.allcheck[this.now])
+            } else {
+              this.postcheck._id = this.data2[this.now]._id
+              axios.post("previews/check",this.postcheck).then(res => {
+                console.log(res)
+              })
+            }
+          },
+          remove (index) {
+              let del = {
+                  delid: this.data2[index]._id
+              }
+              axios.post("/previews/del",del)
+              .then(res=> {
+                  this.data2.splice(index, 1);
+              })
+              .catch(err =>{
+              })
+          },
+          // 获取拍卖预告总条数
+          getPageCount() {
+              axios.get("/previews/Count")
+              .then(res=> {
+                  this.total = res.data.result.count
+              })
+              .catch(err=> {
+                  console.log(err)
+              })
+          },
+          // 页码切换回调
+          showPageCount() {
+              this.getList();
+          },
+          showUnChecked() {
+              this.uncheck = !this.uncheck;
+              let data = this.data2.filter(function(index) {
+                  return index.isChecked == false;
+              });
+              this.data2 = this.uncheck == true ? data : this.data6
+          },
+          getList() {
+              this.getPageCount()
+              let Post = {
+                  pagecount: this.pagecount
+              }
+              axios.post("/previews/list",Post)
+              .then(res=> {
+                  this.data2 = res.data.result.list
+                  this.data6 = res.data.result.list
+              })
+          },
+        }
+    }
+</script>
+
+<style scoped>
+	#mangepreview {
+		width: 100%;
+		height: 100%;
+	}
+
+	.mpreview-inner {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		font-size: 16px;
+		display: flex;
+		flex-flow: column wrap;
+		justify-content: flex-start;
+        position: relative;
+	}
+
+	.title {
+		font-weight: 550;
+		color: #000;
+		font-size: 20px;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.title::before {
+		content: ".";
+		width: 3px;
+		height: 20px;
+		background-color: #000;
+		margin-right: 10px;
+	}
+
+	.addpreview {
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 20px;
+		background-color: rgba(235,238,245,.9);
+	}
+
+
+</style>
+<style>
+  .checkitem {
+    font-weight: bolder;
+    font-size: 16px;
+    margin-bottom: 6px;
+  }
+
+  .checkwarn {
+    margin-bottom: 6px;
+    color: red;
+  }
+</style>

+ 12 - 0
src/page/setting.vue

@@ -0,0 +1,12 @@
+<template>
+	<section id="setting">
+	</section>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		}
+	}
+</script>

+ 12 - 0
src/page/user/adduser.vue

@@ -0,0 +1,12 @@
+<template>
+	<section id="adduser">
+	</section>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		}
+	}
+</script>

+ 339 - 0
src/page/user/mangeuser.vue

@@ -0,0 +1,339 @@
+<template>
+	<section id="mangeuser">
+		<div class="muser-inner">
+			<div class="title"><span>管理用户</span></div>
+			<div class="adduser">
+				<router-link to="/adduser">
+				<Button type="info">添加用户</Button>
+				</router-link>
+			</div>
+			<div class="user-list">
+				<div>
+			        <Table border :columns="columns" :data="data2"></Table>
+			        <Page :current="1" :total="50" simple></Page>
+			    </div>
+			</div>
+		</div>
+        <Modal
+            v-model="modal6"
+            title= "实名认证"
+            :loading="loading"
+            @on-ok="asyncOK">
+            <div class="idCard">
+                <h1 style="color: orange;margin-bottom: 12px;text-align: center">显示该用户上传的身份证正反面</h1>
+                <h2 style="color: green; margin-bottom: 12px">身份证反面</h2>
+                <img :src="img1" style="width:500px; height:300px;" alt="">
+                <h2 style="color: green; margin-bottom: 12px; margin-top: 12px">身份证正面</h2>
+                <img :src="img1" style="width:500px; height:300px;" alt="">
+            </div>
+        </Modal>
+         <Modal
+             v-model="modal1">
+             <p slot="header" style="color:#f60;text-align:center">
+                <Icon type="information-circled"></Icon>
+                <span>申请解封</span>
+            </p>
+            <div style="text-align:center;font-size:16px">
+                解封理由
+                 <p>
+                    {{ nowuser.reason }}
+                </p>
+            </div>
+            <div slot="footer">
+                <Button type="success" size="large" long :loading="modal_loading" @click="onUnBan">解封</Button>
+            </div>
+         </Modal>
+	</section>
+</template>
+
+<script>
+    import axios from 'axios'
+    export default {
+        data () {
+            return {
+                modal6: false,
+                modal1: false,
+                modal_loading: false,
+                loading: true,
+                img1: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526740489&di=8eeceec6f3ee07b912b1f18b0425f565&imgtype=jpg&er=1&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimage%2Fc0%253Dpixel_huitu%252C0%252C0%252C294%252C40%2Fsign%3Db05d0b3c38fa828bc52e95a394672458%2Fd788d43f8794a4c2717d681205f41bd5ad6e39a8.jpg',
+                idcard1: '',
+                idcard2: '',
+                columns: [
+                    {
+                        title: '用户名',
+                        key: 'username',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Icon', {
+                                    props: {
+                                        type: 'person'
+                                    }
+                                }),
+                                h('strong', params.row.username)
+                            ]);
+                        }
+                    },
+                    {
+                        title: '创建日期',
+                        key: 'usercreatedate'
+                    },
+                    {
+                        title: '真实姓名',
+                        key: 'truename'
+                    },
+                    {
+                        title: '公司/个人',
+                        key: 'company'
+                    },
+                    {
+                        title: '实名认证(true-已认证,false-未认证)',
+                        key: 'isReal'
+                    },
+                    {
+                        title: '封禁状态(true-封禁,false-未封禁)',
+                        key: 'isBan'
+                    },
+                    {
+                        title: '操作',
+                        key: 'action',
+                        width: 300,
+                        align: 'center',
+                        render: (h, params) => {
+                            return h('div', [
+                                h('Button', {
+                                    props: {
+                                        type: 'primary',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.show(params.index)
+                                        }
+                                    }
+                                }, '查看'),
+                                h('Button', {
+                                    props: {
+                                        type: 'error',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.Ban(params.index)
+                                        }
+                                    }
+                                }, '封禁'),
+                                h('Button', {
+                                    props: {
+                                        type: 'success',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.unBan(params.index)
+                                        }
+                                    }
+                                }, '解封'),
+                                h('Button', {
+                                    props: {
+                                        type: 'success',
+                                        size: 'small'
+                                    },
+                                    style: {
+                                        marginRight: '5px'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.showCheck(params.index)
+                                        }
+                                    }
+                                }, '认证'),
+                                h('Button', {
+                                    props: {
+                                        type: 'error',
+                                        size: 'small'
+                                    },
+                                    on: {
+                                        click: () => {
+                                            this.remove(params.index)
+                                        }
+                                    }
+                                }, '删除')
+                            ]);
+                        }
+                    }
+                ],
+                data2: [],
+                nowuser: {},
+                nowindex: ''
+            }
+        },
+        mounted() {
+            this.getUserList()
+        },
+        methods: {
+            show (index) {
+                this.$Modal.info({
+                    title: '用户信息',
+                    content: `用户名:${this.data2[index].username}<br>创建日期:${this.data2[index].usercreatedate}<br>真实姓名:${this.data2[index].truename}<br>公司信息:${this.data2[index].company}<br>年龄:${this.data2[index].age}<br>电话号码:${this.data2[index].telephone}<br>邮箱:${this.data2[index].mail}`
+                })
+            },
+            Ban (index) {
+                let band = {
+                    username: this.data2[index].username,
+                    userid: this.data2[index]._id
+                }
+                if(this.data2[index].admin == false) {
+                    axios.post("/users/ban",band).then((res)=> {
+                        if(res.data.status == 1001){
+                            this.error(`用户:${this.data2[index].username} 已被封禁`)
+                        }
+                    }).catch((error)=> {
+                      console.log(error);
+                    });
+                } else this.error("无法对管理员用户进行此操作")
+            },
+            unBan (index) {
+                this.modal1 = true;
+                this.nowindex = index;
+                this.nowuser = this.data2[index]
+                // let band = {
+                //     username: this.data2[index].username,
+                //     userid: this.data2[index]._id
+                // }
+                // if(this.data2[index].admin == false) {
+                //     axios.post("/users/unban",band).then((res)=> {
+                //         if(res.data.status == 1001){
+                //             this.success('解封成功')
+                //         }
+                //     }).catch((error)=> {
+                //       console.log(error);
+                //     });
+                // } else this.error("无法对管理员用户进行此操作")
+            },
+            onUnBan() {
+                let band = {
+                    username: this.nowuser.username,
+                    userid: this.nowuser._id
+                }
+                if(this.nowuser.admin == false) {
+                    axios.post("/users/unban",band).then((res)=> {
+                        if(res.data.status == 1001){
+                            this.success('解封成功')
+                        }
+                    }).catch((error)=> {
+                      console.log(error);
+                    });
+                } else this.error("无法对管理员用户进行此操作")
+            },
+            remove (index) {
+                let del = {
+                    delid: this.data2[index]._id
+                }
+                if(this.data2[index].admin == false) {
+                    axios.post("/users/del",del)
+                    .then(res=> {
+                        this.data2.splice(index, 1);
+                    })
+                    .catch(err =>{
+                    })
+                } else this.error("无法对管理员用户进行此操作")
+            },
+            success (msg) {
+                this.$Message.success(msg);
+            },
+            warning (msg) {
+                this.$Message.warning(msg);
+            },
+            error (msg) {
+                this.$Message.error(msg);
+            },
+            showCheck(index) {
+                this.nowindex = index;
+                if(this.data2[index].admin == false) {
+                    this.modal6 = true;
+                    this.idcard1 = this.data2[index].idCard1;
+                    this.idcard2 = this.data2[index].idCard2;
+                    this.img1 = this.data2[index].idCard1 == ""? "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2432627180,1502188527&fm=27&gp=0.jpg" : "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526740489&di=8eeceec6f3ee07b912b1f18b0425f565&imgtype=jpg&er=1&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimage%2Fc0%253Dpixel_huitu%252C0%252C0%252C294%252C40%2Fsign%3Db05d0b3c38fa828bc52e95a394672458%2Fd788d43f8794a4c2717d681205f41bd5ad6e39a8.jpg"
+                } else this.error("无法对管理员用户进行此操作")
+            },
+            asyncOK () {
+                let band = {
+                    username: this.data2[this.nowindex].username,
+                    userid: this.data2[this.nowindex]._id
+                }
+                setTimeout(() => {
+                    axios.post("/users/check",band).then((res)=> {
+                        if(res.data.status == 1001){
+                            this.success(`用户:${this.data2[this.nowindex].username} 实名认证成功`)
+                        }
+                    }).catch((error)=> {
+                      console.log(error);
+                    });
+                    this.modal6 = false;
+                }, 2000);
+            },
+            getUserList() {
+                axios.get("/users")
+                .then(res=> {
+                    this.data2 = res.data.result.list
+                })
+                .catch(err=> {
+                    console.log(err)
+                })
+            }
+        }
+    }
+</script>
+
+<style scoped>
+	#mangeuser {
+		width: 100%;
+		height: 100%;
+	}
+
+	.muser-inner {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+		font-size: 16px;
+		display: flex;
+		flex-flow: column wrap;
+		justify-content: flex-start;
+	}
+
+	.title {
+		font-weight: 550;
+		color: #000;
+		font-size: 20px;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+	}
+
+	.title::before {
+		content: ".";
+		width: 3px;
+		height: 20px;
+		background-color: #000;
+		margin-right: 10px;
+	}
+
+	.adduser {
+		width: 100%;
+		height: 50px;
+		line-height: 50px;
+		padding: 0 20px;
+		background-color: rgba(235,238,245,.9);
+	}
+
+
+</style>

+ 12 - 0
src/page/visit.vue

@@ -0,0 +1,12 @@
+<template>
+	<section id="visit">
+	</section>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {}
+		}
+	}
+</script>

+ 97 - 0
src/router/index.js

@@ -0,0 +1,97 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+import IndexPage from '../page/index.vue'
+import LoginPage from '../page/login.vue'
+import MyPage from '../page/my.vue'
+import SettingPage from '../page/setting.vue'
+import VisitPage from '../page/visit.vue'
+import MangeInfoPage from '../page/info/manageinfo.vue'
+import AddKnowledgePage from '../page/knowledge/addknowledge.vue'
+import MangeKnowledgePage from '../page/knowledge/mangeknowledge.vue'
+import AddLawPage from '../page/law/addlaw.vue'
+import MangeLawPage from '../page/law/mangelaw.vue'
+import MangePreviewPage from '../page/preview/mangepreview.vue'
+import AddUserPage from '../page/user/adduser.vue'
+import MangeUserPage from '../page/user/mangeuser.vue'
+import DealCommodity from '../page/commodity/dealCommodity.vue'
+import SeeCommodity from '../page/commodity/seeCommodity.vue'
+import SeeCommodityType from '../page/commodity/seeCommodityType.vue'
+import DealMember from '../page/commodity/dealMember.vue'
+
+Vue.use(Router)
+
+export default new Router({
+  mode: 'history',
+  scrollBehavior: () => ({ y: 0 }),
+  routes: [
+    {
+      path: '/',
+      component: IndexPage
+    },
+    {
+      path: '/sign',
+      component: LoginPage
+    },
+    {
+      path: '/my',
+      component: MyPage
+    },
+    ,
+    {
+      path: '/setting',
+      component: SettingPage
+    },
+    {
+      path: '/visit',
+      component: VisitPage
+    },
+    {
+      path: '/manageinfo',
+      component: MangeInfoPage
+    },
+    {
+      path: '/addknowledge',
+      component: AddKnowledgePage
+    },
+    {
+      path: '/manageknowledge',
+      component: MangeKnowledgePage
+    },
+    {
+      path: '/addlaws',
+      component: AddLawPage
+    },
+    {
+      path: '/managelaws',
+      component: MangeLawPage
+    },
+    {
+      path: '/managepreview',
+      component: MangePreviewPage
+    },
+    {
+      path: '/adduser',
+      component: AddUserPage
+    },
+    {
+      path: '/manageusers',
+      component: MangeUserPage
+    },
+    {
+      path: '/dealCommodity',
+      component: DealCommodity
+    },
+    {
+      path: '/seeCommodity',
+      component: SeeCommodity
+    },
+    {
+      path: '/seeCommodityType',
+      component: SeeCommodityType
+    },
+    {
+      path: '/dealMember',
+      component: DealMember
+    }
+  ]
+})

+ 0 - 0
static/.gitkeep


BIN
static/background.png


BIN
static/eye.png


BIN
static/user-icon/risatoar.jpg