zkthink 5 years ago
commit
3571659e42
  1. 14
      .editorconfig
  2. 19
      .env.boot
  3. 33
      .env.development
  4. 16
      .env.production
  5. 8
      .env.staging
  6. 4
      .eslintignore
  7. 269
      .eslintrc.js
  8. 25
      .gitignore
  9. 6
      .prettierrc
  10. 5
      .travis.yml
  11. 5
      babel.config.js
  12. 35
      build/index.js
  13. 24
      jest.config.js
  14. 119
      package.json
  15. 7
      plopfile.js
  16. 5
      postcss.config.js
  17. BIN
      public/cereshop.ico
  18. BIN
      public/favicon.ico
  19. 15
      public/index.html
  20. 14
      src/App.vue
  21. 28
      src/api/Applet.js
  22. 140
      src/api/AxiosApi.js
  23. 32
      src/api/Cash.js
  24. 54
      src/api/Classification.js
  25. 19
      src/api/Common.js
  26. 37
      src/api/Custom.js
  27. 15
      src/api/Dashboard.js
  28. 88
      src/api/DictionaryItem.js
  29. 89
      src/api/GlobalUser.js
  30. 77
      src/api/Goods.js
  31. 34
      src/api/Login.js
  32. 30
      src/api/Management.js
  33. 105
      src/api/Tenant.js
  34. BIN
      src/assets/401_images/401.gif
  35. BIN
      src/assets/404_images/404.png
  36. BIN
      src/assets/404_images/404_cloud.png
  37. BIN
      src/assets/CreationCamp/category-default.png
  38. BIN
      src/assets/CreationCamp/commodityDefault.png
  39. BIN
      src/assets/CreationCamp/defaultBanner.png
  40. BIN
      src/assets/CreationCamp/defaultSingle.png
  41. BIN
      src/assets/CreationCamp/defaultVideo.png
  42. BIN
      src/assets/CreationCamp/delete.png
  43. BIN
      src/assets/CreationCamp/demo.mp4
  44. BIN
      src/assets/CreationCamp/graphicNavigationDefault.png
  45. BIN
      src/assets/CreationCamp/group-default.png
  46. BIN
      src/assets/CreationCamp/image-default-1.png
  47. BIN
      src/assets/CreationCamp/image-default-2.png
  48. BIN
      src/assets/CreationCamp/image-default-3.png
  49. BIN
      src/assets/CreationCamp/move.png
  50. BIN
      src/assets/CreationCamp/wx-top2.png
  51. BIN
      src/assets/avatar/17e420c250804efe904a09a33796d5a10.jpg
  52. BIN
      src/assets/avatar/17e420c250804efe904a09a33796d5a16.jpg
  53. BIN
      src/assets/avatar/19034103295190235.jpg
  54. BIN
      src/assets/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg
  55. BIN
      src/assets/avatar/20180414165754.jpg
  56. BIN
      src/assets/avatar/20180414165815.jpg
  57. BIN
      src/assets/avatar/20180414165821.jpg
  58. BIN
      src/assets/avatar/20180414165827.jpg
  59. BIN
      src/assets/avatar/20180414165834.jpg
  60. BIN
      src/assets/avatar/20180414165840.jpg
  61. BIN
      src/assets/avatar/20180414165846.jpg
  62. BIN
      src/assets/avatar/20180414165855.jpg
  63. BIN
      src/assets/avatar/20180414165909.jpg
  64. BIN
      src/assets/avatar/20180414165914.jpg
  65. BIN
      src/assets/avatar/20180414165920.jpg
  66. BIN
      src/assets/avatar/20180414165927.jpg
  67. BIN
      src/assets/avatar/20180414165936.jpg
  68. BIN
      src/assets/avatar/20180414165942.jpg
  69. BIN
      src/assets/avatar/20180414165947.jpg
  70. BIN
      src/assets/avatar/20180414165955.jpg
  71. BIN
      src/assets/avatar/20180414170003.jpg
  72. BIN
      src/assets/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg
  73. BIN
      src/assets/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg
  74. BIN
      src/assets/avatar/496b3ace787342f7954b7045b8b06804.jpeg
  75. BIN
      src/assets/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg
  76. BIN
      src/assets/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg
  77. BIN
      src/assets/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg
  78. BIN
      src/assets/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg
  79. BIN
      src/assets/avatar/8f5b60ef00714a399ee544d331231820.jpeg
  80. BIN
      src/assets/avatar/964e40b005724165b8cf772355796c8c.jpeg
  81. BIN
      src/assets/avatar/BiazfanxmamNRoxxVxka.png
  82. BIN
      src/assets/avatar/WhxKECPNujWoWEFNdnJE.png
  83. BIN
      src/assets/avatar/a3b10296862e40edb811418d64455d00.jpeg
  84. BIN
      src/assets/avatar/a43456282d684e0b9319cf332f8ac468.jpeg
  85. BIN
      src/assets/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg
  86. BIN
      src/assets/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg
  87. BIN
      src/assets/avatar/cnrhVkzwxjPwAaCfPbdc.png
  88. BIN
      src/assets/avatar/default.jpg
  89. BIN
      src/assets/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg
  90. BIN
      src/assets/avatar/gaOngJwsRYRaVAuXXcmB.png
  91. BIN
      src/assets/avatar/jZUIxmJycoymBprLOUbT.png
  92. BIN
      src/assets/avatar/ubnKSIfAJTxIgXOKlciN.png
  93. BIN
      src/assets/beijing.png
  94. BIN
      src/assets/custom-theme/fonts/element-icons.ttf
  95. BIN
      src/assets/custom-theme/fonts/element-icons.woff
  96. 1
      src/assets/custom-theme/index.css
  97. BIN
      src/assets/footer/default.png
  98. BIN
      src/assets/footer/fenlei1.png
  99. BIN
      src/assets/footer/fenlei2.png
  100. BIN
      src/assets/footer/gouwuche1.png
  101. Some files were not shown because too many files have changed in this diff Show More

14
.editorconfig

@ -0,0 +1,14 @@
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

19
.env.boot

@ -0,0 +1,19 @@
NODE_ENV = production
# just a flag
ENV = 'boot'
VUE_APP_PROJECT_NAME = 'cereshop'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
# base api
VUE_APP_BASE_API = '/api'

33
.env.development

@ -0,0 +1,33 @@
# just a flag
ENV = 'development'
VUE_APP_PROJECT_NAME = 'cereshop-admin-web'
# SpringCloud项目使用这个地址
#VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://127.0.0.1:8764'
# SpringBoot 项目使用这个地址
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://127.0.0.1:8764'
# 请求域名前缀, 该变量仅仅生产环境需要设置
VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = ''
# URI 前缀,用于根据URI前缀进行代理
VUE_APP_BASE_API = '/api'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true

16
.env.production

@ -0,0 +1,16 @@
# just a flag
ENV = 'production'
VUE_APP_PROJECT_NAME = 'admin-web'
# 请求域名前缀, 该变量仅仅生产环境需要设置
VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = 'http://127.0.0.1:8764'
# base api
VUE_APP_BASE_API = '/api'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web

8
.env.staging

@ -0,0 +1,8 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'

4
.eslintignore

@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

269
.eslintrc.js

@ -0,0 +1,269 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
'vue/max-attributes-per-line': [
2,
{
singleline: 10,
multiline: {
max: 1,
allowFirstLine: false
}
}
],
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/name-property-casing': ['error', 'PascalCase'],
'vue/no-v-html': 'off',
'accessor-pairs': 2,
'arrow-spacing': [
2,
{
before: true,
after: true
}
],
'block-spacing': [2, 'always'],
'brace-style': [
2,
'1tbs',
{
allowSingleLine: true
}
],
camelcase: [
0,
{
properties: 'always'
}
],
'comma-dangle': [2, 'never'],
'comma-spacing': [
2,
{
before: false,
after: true
}
],
'comma-style': [2, 'last'],
'constructor-super': 2,
curly: [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
eqeqeq: ['error', 'always', { null: 'ignore' }],
'generator-star-spacing': [
2,
{
before: true,
after: true
}
],
'handle-callback-err': [2, '^(err|error)$'],
indent: [
2,
2,
{
SwitchCase: 1
}
],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [
2,
{
beforeColon: false,
afterColon: true
}
],
'keyword-spacing': [
2,
{
before: true,
after: true
}
],
'new-cap': [
2,
{
newIsCap: true,
capIsNew: false
}
],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [
2,
{
allowLoop: false,
allowSwitch: false
}
],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [
2,
{
max: 1
}
],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [
2,
{
defaultAssignment: false
}
],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [
2,
{
vars: 'all',
args: 'none'
}
],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [
2,
{
initialized: 'never'
}
],
'operator-linebreak': [
2,
'after',
{
overrides: {
'?': 'before',
':': 'before'
}
}
],
'padded-blocks': [2, 'never'],
// 限制使用单引号,
quotes: 0,
semi: [2, 'never'],
'semi-spacing': [
2,
{
before: false,
after: true
}
],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': 0,
'space-infix-ops': 2,
'space-unary-ops': [
2,
{
words: true,
nonwords: false
}
],
'spaced-comment': [
2,
'always',
{
markers: [
'global',
'globals',
'eslint',
'eslint-disable',
'*package',
'!',
','
]
}
],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
yoda: [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [
2,
'always',
{
objectsInObjects: false
}
],
'array-bracket-spacing': [2, 'never']
}
}

25
.gitignore vendored

@ -0,0 +1,25 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
.history/
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
*.iml
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

6
.prettierrc

@ -0,0 +1,6 @@
{
"eslintIntegration": true,
"stylelintIntegration": true,
"singleQuote": true,
"semi": false
}

5
.travis.yml

@ -0,0 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

5
babel.config.js

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}

35
build/index.js

@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}

24
jest.config.js

@ -0,0 +1,24 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}

119
package.json

@ -0,0 +1,119 @@
{
"name": "cereshop",
"version": "1.0.0",
"description": "cereshop",
"author": "cereshop",
"license": "Apache 2.0",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:boot": "vue-cli-service build --mode boot",
"build:docker": "vue-cli-service build --mode docker",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"management-system"
],
"repository": {
"type": "git",
"url": ""
},
"bugs": {
"url": ""
},
"dependencies": {
"@riophae/vue-treeselect": "0.0.38",
"axios": "^0.19.0",
"chromedriver": "^79.0.0",
"clipboard": "2.0.4",
"codemirror": "5.45.0",
"core-js": "^2.6.11",
"css-loader": "^3.5.3",
"dragula": "^3.7.2",
"driver.js": "0.9.5",
"dropzone": "5.5.1",
"echarts": "4.2.1",
"element-ui": "2.12.0",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",
"jsonlint": "1.6.3",
"jszip": "3.2.1",
"less-loader": "^6.1.0",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "4.2.0",
"showdown": "1.9.0",
"sortablejs": "1.8.4",
"tui-editor": "1.3.3",
"vue": "2.6.10",
"vue-count-to": "^1.0.13",
"vue-i18n": "7.3.2",
"vue-loader": "^15.9.2",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"xlsx": "0.14.1"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.5.3",
"@vue/cli-plugin-eslint": "3.5.1",
"@vue/cli-plugin-unit-jest": "^3.9.0",
"@vue/cli-service": "3.5.3",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "8.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.13.1",
"plop": "2.3.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

7
plopfile.js

@ -0,0 +1,7 @@
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
}

5
postcss.config.js

@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

BIN
public/cereshop.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

15
public/index.html

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>cereshop.ico">
<title><%= webpackConfig.name %></title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

14
src/App.vue

@ -0,0 +1,14 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
created () {
// TODO Token
}
}
</script>

28
src/api/Applet.js

@ -0,0 +1,28 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformTemplate: `/authority/cmsTemplate/getPlatformTemplate`,
updateTemplate: '/authority/cmsTemplate/updateTemplate',
getCmsTemplate: '/authority/cmsTemplate/'
}
export default {
getCmsTemplate(id) {
return axiosApi({
method: 'GET',
url: apiList.getCmsTemplate + id
})
},
getPlatformTemplate() {
return axiosApi({
method: 'GET',
url: apiList.getPlatformTemplate
})
},
updateTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.updateTemplate,
data
})
}
}

140
src/api/AxiosApi.js

@ -0,0 +1,140 @@
import axios from 'axios'
import { Message, MessageBox } from 'element-ui'
import db from '@/utils/localstorage'
import { Base64 } from 'js-base64'
// 请求添加条件,如token
axios.interceptors.request.use(
config => {
const isToken =
config.headers['X-isToken'] === false ? config.headers['X-isToken'] : true
const token = db.get('TOKEN', '')
if (token && isToken) {
config.headers.token = 'Bearer ' + token
}
const clientId = process.env.VUE_APP_CLIENT_ID
const clientSecret = process.env.VUE_APP_CLIENT_SECRET
config.headers['Authorization'] = `Basic ${Base64.encode(
`${clientId}:${clientSecret}`
)}`
return config
},
error => {
return Promise.reject(error)
}
)
// 接口返回处理
axios.interceptors.response.use(
response => {
return response
},
error => {
return Promise.reject(error)
}
)
function handleError(error, reject) {
if (error.code === 'ECONNABORTED') {
debugger
Message({
message: '请求超时'
})
} else if (error.response && error.response.data) {
Message({
message: error.response.data
})
} else if (error.message) {
Message({
message: error.message
})
}
reject(error)
}
function handleSuccess(res, resolve) {
if (res.data.isError) {
// 未登录
if (
res.data.code === 40000 ||
res.data.code === 40001 ||
res.data.code === 40002 ||
res.data.code === 40003 ||
res.data.code === 40005 ||
res.data.code === 40006 ||
res.data.code === 40008
) {
MessageBox.alert(res.data.msg, '提醒', {
confirmButtonText: '确定',
callback: () => {
window.location.hash = '/login'
}
})
} else {
Message.error(res.data.msg)
}
}
resolve(res)
}
// http请求
const httpServer = opts => {
// 公共参数
const publicParams = {
ts: Date.now()
}
// http默认配置
const method = opts.method.toUpperCase()
// baseURL
// 开发环境: /api // 开发环境在 vue.config.js 中有 devServer.proxy 代理
// 生产环境: http://IP:PORT/api // 生产环境中 代理失效, 故需要配置绝对路径
const httpDefaultOpts = {
method,
baseURL:
process.env.VUE_APP_PROD_REQUEST_DOMAIN_PREFIX +
process.env.VUE_APP_BASE_API,
url: opts.url,
responseType: opts.responseType || '',
timeout: 20000
}
const dataRequest = ['PUT', 'POST', 'PATCH']
if (dataRequest.includes(method)) {
httpDefaultOpts.data = opts.data || {}
} else {
httpDefaultOpts.params = {
...publicParams,
...(opts.data || {})
}
}
// formData转换
if (opts.formData) {
httpDefaultOpts.transformRequest = [
data => {
const formData = new FormData()
if (data) {
Object.entries(data).forEach(item => {
formData.append(item[0], item[1])
})
}
return formData
}
]
}
const promise = new Promise((resolve, reject) => {
axios(httpDefaultOpts)
.then(response => {
handleSuccess(response, resolve)
})
.catch(error => {
handleError(error, reject)
})
})
return promise
}
export default httpServer

32
src/api/Cash.js

@ -0,0 +1,32 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getCashList: `/authority/cashOutDetail/page/audit`,
getDetail: '/authority/cashOutDetail/audit/',
audiCash: '/authority/cashOutDetail/audit'
}
export default {
// 提现审核列表
getCashList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCashList,
data
})
},
// 查询提现审核
getDetail(id) {
return axiosApi({
method: 'GET',
url: apiList.getDetail + id
})
},
// 提现审核
audiCash(data) {
return axiosApi({
method: 'POST',
url: apiList.audiCash,
data
})
}
}

54
src/api/Classification.js

@ -0,0 +1,54 @@
import axiosApi from './AxiosApi.js'
const apiList = {
productCategory: `/authority/productCategory/findPageCategory`,
addCategory: `/authority/productCategory/addCategory`,
uploadCategory: `/authority/productCategory/updateCategory`,
deletCategory: '/authority/productCategory/delCategory',
queryOneCategory: `/authority/productCategory/queryOneCategory`,
queryChildCategory: '/authority/productCategory/queryChildCategory'
}
export default {
deletCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.deletCategory,
data
})
},
queryChildCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryChildCategory,
data
})
},
queryOneCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryOneCategory,
data
})
},
getProductCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.productCategory,
data
})
},
addCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.addCategory,
data
})
},
uploadCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.uploadCategory,
data
})
}
}

19
src/api/Common.js

@ -0,0 +1,19 @@
import axiosApi from './AxiosApi.js'
const apiList = {
// 获取当前系统的所有枚举
enums: {
method: 'GET',
url: `/oauth/enums`
}
}
export default {
uploadFile: `${process.env.VUE_APP_PROD_REQUEST_DOMAIN_PREFIX}${process.env.VUE_APP_BASE_API}/file/attachment/upload`,
enums (data) {
return axiosApi({
...apiList.enums,
data
})
}
}

37
src/api/Custom.js

@ -0,0 +1,37 @@
import axiosApi from './AxiosApi.js'
const apiList = {
cmsTemplatePage: `/authority/cmsTemplate/page`,
addTemplate: '/authority/cmsTemplate',
deleteTemplate: '/authority/cmsTemplate'
}
export default {
cmsTemplatePage(data) {
return axiosApi({
method: 'POST',
url: apiList.cmsTemplatePage,
data
})
},
addTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.addTemplate,
data
})
},
deleteTemplate(data) {
return axiosApi({
method: 'DELETE',
url: apiList.deleteTemplate,
data
})
},
updateTemplate(data) {
return axiosApi({
method: 'PUT',
url: apiList.deleteTemplate,
data
})
}
}

15
src/api/Dashboard.js

@ -0,0 +1,15 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getVisitList: `/authority/dashboard/visit`
}
export default {
getVisitList (data) {
return axiosApi({
method: 'GET',
url: apiList.getVisitList,
data
})
}
}

88
src/api/DictionaryItem.js

@ -0,0 +1,88 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/authority/dictionaryItem/page`
},
update: {
method: 'PUT',
url: `/authority/dictionaryItem`
},
save: {
method: 'POST',
url: `/authority/dictionaryItem`
},
delete: {
method: 'DELETE',
url: `/authority/dictionaryItem`
},
list: {
method: 'GET',
url: `/oauth/dictionaryItem/codes`
},
preview: {
method: 'POST',
url: `/authority/dictionaryItem/preview`
},
export: {
method: 'POST',
url: `/authority/dictionaryItem/export`
},
import: {
method: 'POST',
url: `/authority/dictionaryItem/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}

89
src/api/GlobalUser.js

@ -0,0 +1,89 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/authority/globalUser/page`,
method: 'POST'
},
save: {
method: 'POST',
url: `/authority/globalUser`
},
update: {
method: 'PUT',
url: `/authority/globalUser`
},
remove: {
method: 'DELETE',
url: `/authority/globalUser/delete`
},
check: {
method: 'GET',
url: `/authority/globalUser/check`
},
preview: {
method: 'POST',
url: `/authority/globalUser/preview`
},
export: {
method: 'POST',
url: `/authority/globalUser/export`
},
import: {
method: 'POST',
url: `/authority/globalUser/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data: data || {}
})
},
update (data) {
return axiosApi({
...apiList.update,
data: data || {}
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data: data || {}
})
},
check (data) {
return axiosApi({
...apiList.check,
formData: true,
data: data || {}
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}

77
src/api/Goods.js

@ -0,0 +1,77 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getGroupList: `/authority/productGroup/page`,
productGroup: `/authority/productGroup`,
deleteGroup: `/authority/productGroup/delProductCategory`,
getProductList: `/authority/product/findAdminProductList`,
findCategoryList: '/authority/productCategory/findCategoryListByDepth/',
saveProduct: '/authority/product/save',
findAdminProductList: '/authority/platformProduct/findAdminProductList',
findGoods: '/authority/platformProduct/findProductListByCategoryOrProductIdList'
}
export default {
findGoods(data) {
return axiosApi({
method: 'POST',
url: apiList.findGoods,
data
})
},
findAdminProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.findAdminProductList,
data
})
},
saveProduct(data) {
return axiosApi({
method: 'POST',
url: apiList.saveProduct,
data
})
},
findCategoryList(depth) {
return axiosApi({
method: 'GET',
url: apiList.findCategoryList + depth
})
},
getProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.getProductList,
data
})
},
getGroupList(data) {
return axiosApi({
method: 'POST',
url: apiList.getGroupList,
data
})
},
addGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.productGroup,
data
})
},
eidtGroup(data) {
return axiosApi({
method: 'PUT',
url: apiList.productGroup,
data
})
},
deleteGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteGroup,
data
})
}
}

34
src/api/Login.js

@ -0,0 +1,34 @@
import axiosApi from './AxiosApi.js'
const apiList = {
captcha: `/oauth/anno/captcha`,
login: `/oauth/anno/admin/login`,
router: `/oauth/menu/admin/router`
}
export default {
getCaptcha (randomId) {
return axiosApi({
method: 'GET',
url: apiList.captcha + `?key=${randomId}`,
responseType: 'arraybuffer',
meta: {
"X-isToken": false
}
})
},
login (data) {
return axiosApi({
method: 'POST',
url: apiList.login,
data
})
},
getRouter (data) {
return axiosApi({
method: 'GET',
url: apiList.router,
data: data || {}
})
}
}

30
src/api/Management.js

@ -0,0 +1,30 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getTenants: `/authority/tenant/page`,
addTenant: `/authority/tenant`,
editTenant: `/authority/tenant`
}
export default {
getAllTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.getTenants,
data
})
},
addTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.addTenant,
data
})
},
editTenant(data) {
return axiosApi({
method: 'PUT',
url: apiList.editTenant,
data
})
}
}

105
src/api/Tenant.js

@ -0,0 +1,105 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/authority/tenant/page`
},
update: {
method: 'PUT',
url: `/authority/tenant`
},
save: {
method: 'POST',
url: `/authority/tenant`
},
saveInit: {
method: 'POST',
url: `/authority/tenant/init`
},
remove: {
method: 'DELETE',
url: `/authority/tenant`
},
list: {
method: 'POST',
url: `/authority/tenant/query`
},
preview: {
method: 'POST',
url: `/authority/tenant/preview`
},
export: {
method: 'POST',
url: `/authority/tenant/export`
},
import: {
method: 'POST',
url: `/authority/tenant/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
// 同步创建租户,防止在切换回默认数据源时,执行其他方法
async saveInit (data) {
return axiosApi({
...apiList.saveInit,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
check (code) {
return axiosApi({
method: 'GET',
url: `/authority/tenant/check/${code}`
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}

BIN
src/assets/401_images/401.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
src/assets/404_images/404.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
src/assets/404_images/404_cloud.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/assets/CreationCamp/category-default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
src/assets/CreationCamp/commodityDefault.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
src/assets/CreationCamp/defaultBanner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
src/assets/CreationCamp/defaultSingle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
src/assets/CreationCamp/defaultVideo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/assets/CreationCamp/delete.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
src/assets/CreationCamp/demo.mp4

Binary file not shown.

BIN
src/assets/CreationCamp/graphicNavigationDefault.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/assets/CreationCamp/group-default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/CreationCamp/image-default-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
src/assets/CreationCamp/image-default-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/assets/CreationCamp/image-default-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/CreationCamp/move.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
src/assets/CreationCamp/wx-top2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/avatar/17e420c250804efe904a09a33796d5a10.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
src/assets/avatar/17e420c250804efe904a09a33796d5a16.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
src/assets/avatar/19034103295190235.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
src/assets/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
src/assets/avatar/20180414165754.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/avatar/20180414165815.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/avatar/20180414165821.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
src/assets/avatar/20180414165827.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
src/assets/avatar/20180414165834.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/assets/avatar/20180414165840.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/avatar/20180414165846.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/assets/avatar/20180414165855.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
src/assets/avatar/20180414165909.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
src/assets/avatar/20180414165914.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/assets/avatar/20180414165920.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
src/assets/avatar/20180414165927.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
src/assets/avatar/20180414165936.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/avatar/20180414165942.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
src/assets/avatar/20180414165947.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/avatar/20180414165955.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
src/assets/avatar/20180414170003.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
src/assets/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
src/assets/avatar/496b3ace787342f7954b7045b8b06804.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/assets/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/assets/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
src/assets/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
src/assets/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/assets/avatar/8f5b60ef00714a399ee544d331231820.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
src/assets/avatar/964e40b005724165b8cf772355796c8c.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/assets/avatar/BiazfanxmamNRoxxVxka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
src/assets/avatar/WhxKECPNujWoWEFNdnJE.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/assets/avatar/a3b10296862e40edb811418d64455d00.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/avatar/a43456282d684e0b9319cf332f8ac468.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/assets/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
src/assets/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
src/assets/avatar/cnrhVkzwxjPwAaCfPbdc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
src/assets/avatar/default.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
src/assets/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/assets/avatar/gaOngJwsRYRaVAuXXcmB.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
src/assets/avatar/jZUIxmJycoymBprLOUbT.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
src/assets/avatar/ubnKSIfAJTxIgXOKlciN.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
src/assets/beijing.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 KiB

BIN
src/assets/custom-theme/fonts/element-icons.ttf

Binary file not shown.

BIN
src/assets/custom-theme/fonts/element-icons.woff

Binary file not shown.

1
src/assets/custom-theme/index.css

File diff suppressed because one or more lines are too long

BIN
src/assets/footer/default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
src/assets/footer/fenlei1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/footer/fenlei2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
src/assets/footer/gouwuche1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save