diff --git a/ssyx-admin/mock/index.js b/ssyx-admin/mock/index.js index 7d5eb31..c514c13 100644 --- a/ssyx-admin/mock/index.js +++ b/ssyx-admin/mock/index.js @@ -1,5 +1,5 @@ const Mock = require('mockjs') -const {param2Obj} = require('./utils') +const { param2Obj } = require('./utils') const user = require('./user') const table = require('./table') @@ -16,7 +16,7 @@ function mockXHR() { // mock patch // https://github.com/nuysoft/Mock/issues/300 Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send - Mock.XHR.prototype.send = function () { + Mock.XHR.prototype.send = function() { if (this.custom.xhr) { this.custom.xhr.withCredentials = this.withCredentials || false @@ -28,10 +28,10 @@ function mockXHR() { } function XHR2ExpressReqWrap(respond) { - return function (options) { + return function(options) { let result = null if (respond instanceof Function) { - const {body, type, url} = options + const { body, type, url } = options // https://expressjs.com/en/4x/api.html#req result = respond({ method: type, diff --git a/ssyx-admin/mock/mock-server.js b/ssyx-admin/mock/mock-server.js index 8a4d435..8941ec0 100644 --- a/ssyx-admin/mock/mock-server.js +++ b/ssyx-admin/mock/mock-server.js @@ -8,7 +8,7 @@ const mockDir = path.join(process.cwd(), 'mock') function registerRoutes(app) { let mockLastIndex - const {mocks} = require('./index.js') + const { mocks } = require('./index.js') const mocksForServer = mocks.map(route => { return responseFake(route.url, route.type, route.response) }) diff --git a/ssyx-admin/mock/user.js b/ssyx-admin/mock/user.js index f0e60f9..5310f7b 100644 --- a/ssyx-admin/mock/user.js +++ b/ssyx-admin/mock/user.js @@ -28,7 +28,7 @@ module.exports = [ url: '/vue-admin-template/user/login', type: 'post', response: config => { - const {username} = config.body + const { username } = config.body const token = tokens[username] // mock error @@ -51,7 +51,7 @@ module.exports = [ url: '/vue-admin-template/user/info\.*', type: 'get', response: config => { - const {token} = config.query + const { token } = config.query const info = users[token] // mock error diff --git a/ssyx-admin/public/index.html b/ssyx-admin/public/index.html index 8c9f022..9505e2d 100644 --- a/ssyx-admin/public/index.html +++ b/ssyx-admin/public/index.html @@ -13,6 +13,5 @@ to continue.
-