sh, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
@@ -0,0 +1,5 @@ |
||
1 |
+module.exports = { |
|
2 |
+ presets: [ |
|
3 |
+ '@vue/app' |
|
4 |
+ ] |
|
5 |
+} |
@@ -0,0 +1,35 @@ |
||
1 |
+const { run } = require('runjs') |
|
2 |
+const chalk = require('chalk') |
|
3 |
+const config = require('../vue.config.js') |
|
4 |
+const rawArgv = process.argv.slice(2) |
|
5 |
+const args = rawArgv.join(' ') |
|
6 |
+ |
|
7 |
+if (process.env.npm_config_preview || rawArgv.includes('--preview')) { |
|
8 |
+ const report = rawArgv.includes('--report') |
|
9 |
+ |
|
10 |
+ run(`vue-cli-service build ${args}`) |
|
11 |
+ |
|
12 |
+ const port = 9526 |
|
13 |
+ const publicPath = config.publicPath |
|
14 |
+ |
|
15 |
+ var connect = require('connect') |
|
16 |
+ var serveStatic = require('serve-static') |
|
17 |
+ const app = connect() |
|
18 |
+ |
|
19 |
+ app.use( |
|
20 |
+ publicPath, |
|
21 |
+ serveStatic('./dist', { |
|
22 |
+ index: ['index.html', '/'] |
|
23 |
+ }) |
|
24 |
+ ) |
|
25 |
+ |
|
26 |
+ app.listen(port, function () { |
|
27 |
+ console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) |
|
28 |
+ if (report) { |
|
29 |
+ console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) |
|
30 |
+ } |
|
31 |
+ |
|
32 |
+ }) |
|
33 |
+} else { |
|
34 |
+ run(`vue-cli-service build ${args}`) |
|
35 |
+} |
@@ -0,0 +1,24 @@ |
||
1 |
+module.exports = { |
|
2 |
+ moduleFileExtensions: ['js', 'jsx', 'json', 'vue'], |
|
3 |
+ transform: { |
|
4 |
+ '^.+\\.vue$': 'vue-jest', |
|
5 |
+ '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': |
|
6 |
+ 'jest-transform-stub', |
|
7 |
+ '^.+\\.jsx?$': 'babel-jest' |
|
8 |
+ }, |
|
9 |
+ moduleNameMapper: { |
|
10 |
+ '^@/(.*)$': '<rootDir>/src/$1' |
|
11 |
+ }, |
|
12 |
+ snapshotSerializers: ['jest-serializer-vue'], |
|
13 |
+ testMatch: [ |
|
14 |
+ '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' |
|
15 |
+ ], |
|
16 |
+ collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'], |
|
17 |
+ coverageDirectory: '<rootDir>/tests/unit/coverage', |
|
18 |
+ // 'collectCoverage': true, |
|
19 |
+ 'coverageReporters': [ |
|
20 |
+ 'lcov', |
|
21 |
+ 'text-summary' |
|
22 |
+ ], |
|
23 |
+ testURL: 'http://kodo.xfoto.com.cn/api' |
|
24 |
+} |
@@ -0,0 +1,9 @@ |
||
1 |
+{ |
|
2 |
+ "compilerOptions": { |
|
3 |
+ "baseUrl": "./", |
|
4 |
+ "paths": { |
|
5 |
+ "@/*": ["src/*"] |
|
6 |
+ } |
|
7 |
+ }, |
|
8 |
+ "exclude": ["node_modules", "dist"] |
|
9 |
+} |
@@ -0,0 +1,114 @@ |
||
1 |
+{ |
|
2 |
+ "name": "vue-element-admin", |
|
3 |
+ "version": "4.2.1", |
|
4 |
+ "description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features", |
|
5 |
+ "author": "Pan <panfree23@gmail.com>", |
|
6 |
+ "license": "MIT", |
|
7 |
+ "scripts": { |
|
8 |
+ "dev": "vue-cli-service serve", |
|
9 |
+ "build:prod": "vue-cli-service build", |
|
10 |
+ "build:stage": "vue-cli-service build --mode staging", |
|
11 |
+ "preview": "node build/index.js --preview", |
|
12 |
+ "lint": "eslint --ext .js,.vue src", |
|
13 |
+ "test:unit": "jest --clearCache && vue-cli-service test:unit", |
|
14 |
+ "test:ci": "npm run lint && npm run test:unit", |
|
15 |
+ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", |
|
16 |
+ "new": "plop" |
|
17 |
+ }, |
|
18 |
+ "husky": { |
|
19 |
+ "hooks": { |
|
20 |
+ "pre-commit": "lint-staged" |
|
21 |
+ } |
|
22 |
+ }, |
|
23 |
+ "lint-staged": { |
|
24 |
+ "src/**/*.{js,vue}": [ |
|
25 |
+ "eslint --fix", |
|
26 |
+ "git add" |
|
27 |
+ ] |
|
28 |
+ }, |
|
29 |
+ "keywords": [ |
|
30 |
+ "vue", |
|
31 |
+ "admin", |
|
32 |
+ "dashboard", |
|
33 |
+ "element-ui", |
|
34 |
+ "boilerplate", |
|
35 |
+ "admin-template", |
|
36 |
+ "management-system" |
|
37 |
+ ], |
|
38 |
+ "repository": { |
|
39 |
+ "type": "git", |
|
40 |
+ "url": "git+https://github.com/PanJiaChen/vue-element-admin.git" |
|
41 |
+ }, |
|
42 |
+ "bugs": { |
|
43 |
+ "url": "https://github.com/PanJiaChen/vue-element-admin/issues" |
|
44 |
+ }, |
|
45 |
+ "dependencies": { |
|
46 |
+ "axios": "0.18.1", |
|
47 |
+ "clipboard": "2.0.4", |
|
48 |
+ "codemirror": "5.45.0", |
|
49 |
+ "driver.js": "0.9.5", |
|
50 |
+ "dropzone": "5.5.1", |
|
51 |
+ "echarts": "4.2.1", |
|
52 |
+ "element-ui": "2.13.0", |
|
53 |
+ "file-saver": "2.0.1", |
|
54 |
+ "fuse.js": "3.4.4", |
|
55 |
+ "js-cookie": "2.2.0", |
|
56 |
+ "jsonlint": "1.6.3", |
|
57 |
+ "jszip": "3.2.1", |
|
58 |
+ "normalize.css": "7.0.0", |
|
59 |
+ "nprogress": "0.2.0", |
|
60 |
+ "path-to-regexp": "2.4.0", |
|
61 |
+ "qs": "^6.9.3", |
|
62 |
+ "screenfull": "4.2.0", |
|
63 |
+ "script-loader": "0.7.2", |
|
64 |
+ "showdown": "1.9.0", |
|
65 |
+ "sortablejs": "1.8.4", |
|
66 |
+ "tui-editor": "1.3.3", |
|
67 |
+ "vue": "2.6.10", |
|
68 |
+ "vue-count-to": "1.0.13", |
|
69 |
+ "vue-router": "3.0.2", |
|
70 |
+ "vue-splitpane": "1.0.4", |
|
71 |
+ "vuedraggable": "2.20.0", |
|
72 |
+ "vuex": "3.1.0", |
|
73 |
+ "xlsx": "0.14.1" |
|
74 |
+ }, |
|
75 |
+ "devDependencies": { |
|
76 |
+ "@babel/core": "7.0.0", |
|
77 |
+ "@babel/register": "7.0.0", |
|
78 |
+ "@vue/cli-plugin-babel": "3.5.3", |
|
79 |
+ "@vue/cli-plugin-eslint": "^3.9.1", |
|
80 |
+ "@vue/cli-plugin-unit-jest": "3.5.3", |
|
81 |
+ "@vue/cli-service": "3.5.3", |
|
82 |
+ "@vue/test-utils": "1.0.0-beta.29", |
|
83 |
+ "autoprefixer": "^9.5.1", |
|
84 |
+ "babel-core": "7.0.0-bridge.0", |
|
85 |
+ "babel-eslint": "10.0.1", |
|
86 |
+ "babel-jest": "23.6.0", |
|
87 |
+ "chalk": "2.4.2", |
|
88 |
+ "chokidar": "2.1.5", |
|
89 |
+ "connect": "3.6.6", |
|
90 |
+ "eslint": "5.15.3", |
|
91 |
+ "eslint-plugin-vue": "5.2.2", |
|
92 |
+ "html-webpack-plugin": "3.2.0", |
|
93 |
+ "husky": "1.3.1", |
|
94 |
+ "lint-staged": "8.1.5", |
|
95 |
+ "mockjs": "1.0.1-beta3", |
|
96 |
+ "node-sass": "^4.9.0", |
|
97 |
+ "plop": "2.3.0", |
|
98 |
+ "runjs": "^4.3.2", |
|
99 |
+ "sass-loader": "^7.1.0", |
|
100 |
+ "script-ext-html-webpack-plugin": "2.1.3", |
|
101 |
+ "serve-static": "^1.13.2", |
|
102 |
+ "svg-sprite-loader": "4.1.3", |
|
103 |
+ "svgo": "1.2.0", |
|
104 |
+ "vue-template-compiler": "2.6.10" |
|
105 |
+ }, |
|
106 |
+ "engines": { |
|
107 |
+ "node": ">=8.9", |
|
108 |
+ "npm": ">= 3.0.0" |
|
109 |
+ }, |
|
110 |
+ "browserslist": [ |
|
111 |
+ "> 1%", |
|
112 |
+ "last 2 versions" |
|
113 |
+ ] |
|
114 |
+} |
@@ -0,0 +1,26 @@ |
||
1 |
+{{#if template}} |
|
2 |
+<template> |
|
3 |
+ <div /> |
|
4 |
+</template> |
|
5 |
+{{/if}} |
|
6 |
+ |
|
7 |
+{{#if script}} |
|
8 |
+<script> |
|
9 |
+export default { |
|
10 |
+ name: '{{ properCase name }}', |
|
11 |
+ props: {}, |
|
12 |
+ data() { |
|
13 |
+ return {} |
|
14 |
+ }, |
|
15 |
+ created() {}, |
|
16 |
+ mounted() {}, |
|
17 |
+ methods: {} |
|
18 |
+} |
|
19 |
+</script> |
|
20 |
+{{/if}} |
|
21 |
+ |
|
22 |
+{{#if style}} |
|
23 |
+<style lang="scss" scoped> |
|
24 |
+ |
|
25 |
+</style> |
|
26 |
+{{/if}} |
@@ -0,0 +1,55 @@ |
||
1 |
+const { notEmpty } = require('../utils.js') |
|
2 |
+ |
|
3 |
+module.exports = { |
|
4 |
+ description: 'generate vue component', |
|
5 |
+ prompts: [{ |
|
6 |
+ type: 'input', |
|
7 |
+ name: 'name', |
|
8 |
+ message: 'component name please', |
|
9 |
+ validate: notEmpty('name') |
|
10 |
+ }, |
|
11 |
+ { |
|
12 |
+ type: 'checkbox', |
|
13 |
+ name: 'blocks', |
|
14 |
+ message: 'Blocks:', |
|
15 |
+ choices: [{ |
|
16 |
+ name: '<template>', |
|
17 |
+ value: 'template', |
|
18 |
+ checked: true |
|
19 |
+ }, |
|
20 |
+ { |
|
21 |
+ name: '<script>', |
|
22 |
+ value: 'script', |
|
23 |
+ checked: true |
|
24 |
+ }, |
|
25 |
+ { |
|
26 |
+ name: 'style', |
|
27 |
+ value: 'style', |
|
28 |
+ checked: true |
|
29 |
+ } |
|
30 |
+ ], |
|
31 |
+ validate(value) { |
|
32 |
+ if (value.indexOf('script') === -1 && value.indexOf('template') === -1) { |
|
33 |
+ return 'Components require at least a <script> or <template> tag.' |
|
34 |
+ } |
|
35 |
+ return true |
|
36 |
+ } |
|
37 |
+ } |
|
38 |
+ ], |
|
39 |
+ actions: data => { |
|
40 |
+ const name = '{{properCase name}}' |
|
41 |
+ const actions = [{ |
|
42 |
+ type: 'add', |
|
43 |
+ path: `src/components/${name}/index.vue`, |
|
44 |
+ templateFile: 'plop-templates/component/index.hbs', |
|
45 |
+ data: { |
|
46 |
+ name: name, |
|
47 |
+ template: data.blocks.includes('template'), |
|
48 |
+ script: data.blocks.includes('script'), |
|
49 |
+ style: data.blocks.includes('style') |
|
50 |
+ } |
|
51 |
+ }] |
|
52 |
+ |
|
53 |
+ return actions |
|
54 |
+ } |
|
55 |
+} |
@@ -0,0 +1,16 @@ |
||
1 |
+{{#if state}} |
|
2 |
+const state = {} |
|
3 |
+{{/if}} |
|
4 |
+ |
|
5 |
+{{#if mutations}} |
|
6 |
+const mutations = {} |
|
7 |
+{{/if}} |
|
8 |
+ |
|
9 |
+{{#if actions}} |
|
10 |
+const actions = {} |
|
11 |
+{{/if}} |
|
12 |
+ |
|
13 |
+export default { |
|
14 |
+ namespaced: true, |
|
15 |
+ {{options}} |
|
16 |
+} |
@@ -0,0 +1,62 @@ |
||
1 |
+const { notEmpty } = require('../utils.js') |
|
2 |
+ |
|
3 |
+module.exports = { |
|
4 |
+ description: 'generate store', |
|
5 |
+ prompts: [{ |
|
6 |
+ type: 'input', |
|
7 |
+ name: 'name', |
|
8 |
+ message: 'store name please', |
|
9 |
+ validate: notEmpty('name') |
|
10 |
+ }, |
|
11 |
+ { |
|
12 |
+ type: 'checkbox', |
|
13 |
+ name: 'blocks', |
|
14 |
+ message: 'Blocks:', |
|
15 |
+ choices: [{ |
|
16 |
+ name: 'state', |
|
17 |
+ value: 'state', |
|
18 |
+ checked: true |
|
19 |
+ }, |
|
20 |
+ { |
|
21 |
+ name: 'mutations', |
|
22 |
+ value: 'mutations', |
|
23 |
+ checked: true |
|
24 |
+ }, |
|
25 |
+ { |
|
26 |
+ name: 'actions', |
|
27 |
+ value: 'actions', |
|
28 |
+ checked: true |
|
29 |
+ } |
|
30 |
+ ], |
|
31 |
+ validate(value) { |
|
32 |
+ if (!value.includes('state') || !value.includes('mutations')) { |
|
33 |
+ return 'store require at least state and mutations' |
|
34 |
+ } |
|
35 |
+ return true |
|
36 |
+ } |
|
37 |
+ } |
|
38 |
+ ], |
|
39 |
+ actions(data) { |
|
40 |
+ const name = '{{name}}' |
|
41 |
+ const { blocks } = data |
|
42 |
+ const options = ['state', 'mutations'] |
|
43 |
+ const joinFlag = `, |
|
44 |
+ ` |
|
45 |
+ if (blocks.length === 3) { |
|
46 |
+ options.push('actions') |
|
47 |
+ } |
|
48 |
+ |
|
49 |
+ const actions = [{ |
|
50 |
+ type: 'add', |
|
51 |
+ path: `src/store/modules/${name}.js`, |
|
52 |
+ templateFile: 'plop-templates/store/index.hbs', |
|
53 |
+ data: { |
|
54 |
+ options: options.join(joinFlag), |
|
55 |
+ state: blocks.includes('state'), |
|
56 |
+ mutations: blocks.includes('mutations'), |
|
57 |
+ actions: blocks.includes('actions') |
|
58 |
+ } |
|
59 |
+ }] |
|
60 |
+ return actions |
|
61 |
+ } |
|
62 |
+} |
@@ -0,0 +1,9 @@ |
||
1 |
+exports.notEmpty = name => { |
|
2 |
+ return v => { |
|
3 |
+ if (!v || v.trim === '') { |
|
4 |
+ return `${name} is required` |
|
5 |
+ } else { |
|
6 |
+ return true |
|
7 |
+ } |
|
8 |
+ } |
|
9 |
+} |
@@ -0,0 +1,26 @@ |
||
1 |
+{{#if template}} |
|
2 |
+<template> |
|
3 |
+ <div /> |
|
4 |
+</template> |
|
5 |
+{{/if}} |
|
6 |
+ |
|
7 |
+{{#if script}} |
|
8 |
+<script> |
|
9 |
+export default { |
|
10 |
+ name: '{{ properCase name }}', |
|
11 |
+ props: {}, |
|
12 |
+ data() { |
|
13 |
+ return {} |
|
14 |
+ }, |
|
15 |
+ created() {}, |
|
16 |
+ mounted() {}, |
|
17 |
+ methods: {} |
|
18 |
+} |
|
19 |
+</script> |
|
20 |
+{{/if}} |
|
21 |
+ |
|
22 |
+{{#if style}} |
|
23 |
+<style lang="scss" scoped> |
|
24 |
+ |
|
25 |
+</style> |
|
26 |
+{{/if}} |
@@ -0,0 +1,55 @@ |
||
1 |
+const { notEmpty } = require('../utils.js') |
|
2 |
+ |
|
3 |
+module.exports = { |
|
4 |
+ description: 'generate a view', |
|
5 |
+ prompts: [{ |
|
6 |
+ type: 'input', |
|
7 |
+ name: 'name', |
|
8 |
+ message: 'view name please', |
|
9 |
+ validate: notEmpty('name') |
|
10 |
+ }, |
|
11 |
+ { |
|
12 |
+ type: 'checkbox', |
|
13 |
+ name: 'blocks', |
|
14 |
+ message: 'Blocks:', |
|
15 |
+ choices: [{ |
|
16 |
+ name: '<template>', |
|
17 |
+ value: 'template', |
|
18 |
+ checked: true |
|
19 |
+ }, |
|
20 |
+ { |
|
21 |
+ name: '<script>', |
|
22 |
+ value: 'script', |
|
23 |
+ checked: true |
|
24 |
+ }, |
|
25 |
+ { |
|
26 |
+ name: 'style', |
|
27 |
+ value: 'style', |
|
28 |
+ checked: true |
|
29 |
+ } |
|
30 |
+ ], |
|
31 |
+ validate(value) { |
|
32 |
+ if (value.indexOf('script') === -1 && value.indexOf('template') === -1) { |
|
33 |
+ return 'View require at least a <script> or <template> tag.' |
|
34 |
+ } |
|
35 |
+ return true |
|
36 |
+ } |
|
37 |
+ } |
|
38 |
+ ], |
|
39 |
+ actions: data => { |
|
40 |
+ const name = '{{name}}' |
|
41 |
+ const actions = [{ |
|
42 |
+ type: 'add', |
|
43 |
+ path: `src/views/${name}/index.vue`, |
|
44 |
+ templateFile: 'plop-templates/view/index.hbs', |
|
45 |
+ data: { |
|
46 |
+ name: name, |
|
47 |
+ template: data.blocks.includes('template'), |
|
48 |
+ script: data.blocks.includes('script'), |
|
49 |
+ style: data.blocks.includes('style') |
|
50 |
+ } |
|
51 |
+ }] |
|
52 |
+ |
|
53 |
+ return actions |
|
54 |
+ } |
|
55 |
+} |
@@ -0,0 +1,9 @@ |
||
1 |
+const viewGenerator = require('./plop-templates/view/prompt') |
|
2 |
+const componentGenerator = require('./plop-templates/component/prompt') |
|
3 |
+const storeGenerator = require('./plop-templates/store/prompt.js') |
|
4 |
+ |
|
5 |
+module.exports = function(plop) { |
|
6 |
+ plop.setGenerator('view', viewGenerator) |
|
7 |
+ plop.setGenerator('component', componentGenerator) |
|
8 |
+ plop.setGenerator('store', storeGenerator) |
|
9 |
+} |
@@ -0,0 +1,5 @@ |
||
1 |
+module.exports = { |
|
2 |
+ plugins: { |
|
3 |
+ autoprefixer: {} |
|
4 |
+ } |
|
5 |
+} |
@@ -0,0 +1,15 @@ |
||
1 |
+<!DOCTYPE html> |
|
2 |
+<html> |
|
3 |
+ <head> |
|
4 |
+ <meta charset="utf-8"> |
|
5 |
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
6 |
+ <meta name="renderer" content="webkit"> |
|
7 |
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
|
8 |
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
|
9 |
+ <title><%= webpackConfig.name %></title> |
|
10 |
+ </head> |
|
11 |
+ <body> |
|
12 |
+ <div id="app"></div> |
|
13 |
+ <!-- built files will be auto injected --> |
|
14 |
+ </body> |
|
15 |
+</html> |
@@ -0,0 +1,11 @@ |
||
1 |
+<template> |
|
2 |
+ <div id="app"> |
|
3 |
+ <router-view /> |
|
4 |
+ </div> |
|
5 |
+</template> |
|
6 |
+ |
|
7 |
+<script> |
|
8 |
+export default { |
|
9 |
+ name: 'App' |
|
10 |
+} |
|
11 |
+</script> |
@@ -0,0 +1,13 @@ |
||
1 |
+import request from '@/utils/request' |
|
2 |
+import store from '@/store' |
|
3 |
+import qs from 'qs' |
|
4 |
+ |
|
5 |
+export function fetchDashboard(data) { |
|
6 |
+ data['brand_id'] = 'ywkRTh5vtswRvhh8uLvTTQ' |
|
7 |
+ data['admin_id'] = store.getters.token |
|
8 |
+ return request({ |
|
9 |
+ url: '/admin/dashboard', |
|
10 |
+ method: 'post', |
|
11 |
+ data: qs.stringify(data) |
|
12 |
+ }) |
|
13 |
+} |
@@ -0,0 +1,21 @@ |
||
1 |
+import request from '@/utils/request' |
|
2 |
+import store from '@/store' |
|
3 |
+import qs from 'qs' |
|
4 |
+ |
|
5 |
+export function fetchList(data) { |
|
6 |
+ data['admin_id'] = store.getters.token |
|
7 |
+ return request({ |
|
8 |
+ url: '/admin/order/list', |
|
9 |
+ method: 'post', |
|
10 |
+ data: qs.stringify(data) |
|
11 |
+ }) |
|
12 |
+} |
|
13 |
+ |
|
14 |
+export function updateOrder(data) { |
|
15 |
+ data['admin_id'] = store.getters.token |
|
16 |
+ return request({ |
|
17 |
+ url: '/admin/order/update', |
|
18 |
+ method: 'post', |
|
19 |
+ data: qs.stringify(data) |
|
20 |
+ }) |
|
21 |
+} |
@@ -0,0 +1,25 @@ |
||
1 |
+import request from '@/utils/request' |
|
2 |
+import qs from 'qs' |
|
3 |
+ |
|
4 |
+export function login(data) { |
|
5 |
+ return request({ |
|
6 |
+ url: '/admin/login', |
|
7 |
+ method: 'post', |
|
8 |
+ data: qs.stringify(data) |
|
9 |
+ }) |
|
10 |
+} |
|
11 |
+ |
|
12 |
+export function getInfo(token) { |
|
13 |
+ return request({ |
|
14 |
+ url: '/vue-element-admin/user/info', |
|
15 |
+ method: 'get', |
|
16 |
+ params: { token } |
|
17 |
+ }) |
|
18 |
+} |
|
19 |
+ |
|
20 |
+export function logout() { |
|
21 |
+ return request({ |
|
22 |
+ url: '/vue-element-admin/user/logout', |
|
23 |
+ method: 'post' |
|
24 |
+ }) |
|
25 |
+} |
@@ -0,0 +1 @@ |