1.0
@@ -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
|
||||||
@@ -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'
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
NODE_ENV = production
|
||||||
|
|
||||||
|
# just a flag
|
||||||
|
ENV = 'staging'
|
||||||
|
|
||||||
|
# base api
|
||||||
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
build/*.js
|
||||||
|
src/assets
|
||||||
|
public
|
||||||
|
dist
|
||||||
@@ -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']
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"eslintIntegration": true,
|
||||||
|
"stylelintIntegration": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"semi": false
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js: 10
|
||||||
|
script: npm run test
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/app'
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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}`)
|
||||||
|
}
|
||||||
@@ -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/'
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
@@ -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>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
created () {
|
||||||
|
// TODO 每次刷新页面会加载这个方法?是否能在这里判断 必须要缓存的Token ,用户信息等
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 || {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 841 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.2 KiB |