From 8db86081ebcb39654da317dfe4fb5a580431e748 Mon Sep 17 00:00:00 2001 From: yovinchen Date: Thu, 14 Sep 2023 17:20:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ESLint=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ssyx-admin/mock/index.js | 8 +- ssyx-admin/mock/mock-server.js | 2 +- ssyx-admin/mock/user.js | 4 +- ssyx-admin/public/index.html | 1 - ssyx-admin/src/App.vue | 2 +- ssyx-admin/src/api/acl/permission.js | 2 +- ssyx-admin/src/api/acl/user.js | 4 +- ssyx-admin/src/api/index.js | 4 +- ssyx-admin/src/api/user.js | 2 +- .../src/components/Breadcrumb/index.vue | 10 +- ssyx-admin/src/components/Hamburger/index.vue | 3 +- .../src/components/HintButton/index.vue | 2 +- ssyx-admin/src/components/SvgIcon/index.vue | 6 +- ssyx-admin/src/layout/components/AppMain.vue | 2 +- ssyx-admin/src/layout/components/Navbar.vue | 8 +- .../src/layout/components/Sidebar/Item.vue | 2 +- .../src/layout/components/Sidebar/Link.vue | 4 +- .../layout/components/Sidebar/SidebarItem.vue | 13 +-- .../src/layout/components/Sidebar/index.vue | 10 +- ssyx-admin/src/layout/components/index.js | 6 +- ssyx-admin/src/layout/index.vue | 12 +-- ssyx-admin/src/layout/mixin/ResizeHandler.js | 8 +- ssyx-admin/src/main.js | 4 +- ssyx-admin/src/permission.js | 10 +- ssyx-admin/src/router/index.js | 64 ++++++------ ssyx-admin/src/store/modules/app.js | 6 +- ssyx-admin/src/store/modules/settings.js | 6 +- ssyx-admin/src/store/modules/user.js | 24 ++--- ssyx-admin/src/utils/request.js | 4 +- ssyx-admin/src/views/acl/permission/list.vue | 48 +++++---- ssyx-admin/src/views/acl/role/list.vue | 33 ++++--- ssyx-admin/src/views/acl/role/roleAuth.vue | 2 +- ssyx-admin/src/views/acl/user/list.vue | 51 +++++----- .../src/views/activity/activityInfo/form.vue | 12 +-- .../src/views/activity/activityInfo/list.vue | 14 +-- .../src/views/activity/activityInfo/rule.vue | 62 ++++++------ .../src/views/activity/couponInfo/form.vue | 12 +-- .../src/views/activity/couponInfo/list.vue | 16 +-- .../src/views/activity/couponInfo/rule.vue | 62 ++++++------ .../src/views/activity/seckill/list.vue | 24 +++-- .../views/activity/seckill/seckillSkuList.vue | 30 +++--- .../views/activity/seckill/selectTimeList.vue | 10 +- .../src/views/activity/seckill/timeList.vue | 20 ++-- ssyx-admin/src/views/dashboard/index.vue | 2 +- ssyx-admin/src/views/login/index.vue | 34 ++++--- .../src/views/order/orderInfo/deliverList.vue | 22 ++--- ssyx-admin/src/views/order/orderInfo/list.vue | 20 ++-- ssyx-admin/src/views/order/orderInfo/show.vue | 98 +++++++++---------- ssyx-admin/src/views/product/attr/form.vue | 12 +-- ssyx-admin/src/views/product/attr/list.vue | 14 +-- .../src/views/product/attrGroup/form.vue | 14 +-- .../src/views/product/attrGroup/list.vue | 16 +-- .../src/views/product/category/form.vue | 18 ++-- .../src/views/product/category/list.vue | 14 +-- ssyx-admin/src/views/product/skuInfo/form.vue | 38 +++---- ssyx-admin/src/views/product/skuInfo/list.vue | 16 +-- ssyx-admin/src/views/sys/regionWare/list.vue | 10 +- .../src/views/user/leader/checkList.vue | 32 +++--- ssyx-admin/src/views/user/leader/list.vue | 14 +-- .../tests/unit/components/Breadcrumb.spec.js | 32 +++--- .../tests/unit/components/Hamburger.spec.js | 6 +- .../tests/unit/components/SvgIcon.spec.js | 4 +- .../tests/unit/utils/formatTime.spec.js | 2 +- ssyx-admin/tests/unit/utils/param2Obj.spec.js | 2 +- ssyx-admin/tests/unit/utils/parseTime.spec.js | 2 +- ssyx-admin/tests/unit/utils/validate.spec.js | 2 +- ssyx-admin/vue.config.js | 42 ++++---- 67 files changed, 571 insertions(+), 524 deletions(-) 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.
- diff --git a/ssyx-admin/src/App.vue b/ssyx-admin/src/App.vue index 721d3a3..ec9032c 100644 --- a/ssyx-admin/src/App.vue +++ b/ssyx-admin/src/App.vue @@ -1,6 +1,6 @@ diff --git a/ssyx-admin/src/api/acl/permission.js b/ssyx-admin/src/api/acl/permission.js index bff8bde..3ef63ce 100644 --- a/ssyx-admin/src/api/acl/permission.js +++ b/ssyx-admin/src/api/acl/permission.js @@ -66,7 +66,7 @@ export default { return request({ url: `${api_name}/doAssign`, method: 'post', - params: {roleId, permissionId} + params: { roleId, permissionId } }) } } diff --git a/ssyx-admin/src/api/acl/user.js b/ssyx-admin/src/api/acl/user.js index 5d8caf1..dacdb02 100644 --- a/ssyx-admin/src/api/acl/user.js +++ b/ssyx-admin/src/api/acl/user.js @@ -5,11 +5,11 @@ const api_name = '/admin/acl/user' /* 登陆 */ -export function login({username, password}) { +export function login({ username, password }) { return request({ url: '/admin/acl/index/login', method: 'post', - data: {username, password} + data: { username, password } }) } diff --git a/ssyx-admin/src/api/index.js b/ssyx-admin/src/api/index.js index 2338ef1..8151f27 100644 --- a/ssyx-admin/src/api/index.js +++ b/ssyx-admin/src/api/index.js @@ -1,3 +1,3 @@ export * as user from './acl/user' -export {default as role} from './acl/role' -export {default as permission} from './acl/permission' +export { default as role } from './acl/role' +export { default as permission } from './acl/permission' diff --git a/ssyx-admin/src/api/user.js b/ssyx-admin/src/api/user.js index c9d3dfc..a79327a 100644 --- a/ssyx-admin/src/api/user.js +++ b/ssyx-admin/src/api/user.js @@ -12,7 +12,7 @@ export function getInfo(token) { return request({ url: '/admin/acl/index/info', method: 'get', - params: {token} + params: { token } }) } diff --git a/ssyx-admin/src/components/Breadcrumb/index.vue b/ssyx-admin/src/components/Breadcrumb/index.vue index c465a2c..2a79302 100644 --- a/ssyx-admin/src/components/Breadcrumb/index.vue +++ b/ssyx-admin/src/components/Breadcrumb/index.vue @@ -3,8 +3,8 @@ {{ - item.meta.title - }} + item.meta.title + }} {{ item.meta.title }} @@ -35,7 +35,7 @@ export default { const first = matched[0] if (!this.isDashboard(first)) { - matched = [{path: '/dashboard', meta: {title: 'Dashboard'}}].concat(matched) + matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) @@ -49,12 +49,12 @@ export default { }, pathCompile(path) { // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 - const {params} = this.$route + const { params } = this.$route var toPath = pathToRegexp.compile(path) return toPath(params) }, handleLink(item) { - const {redirect, path} = item + const { redirect, path } = item if (redirect) { this.$router.push(redirect) return diff --git a/ssyx-admin/src/components/Hamburger/index.vue b/ssyx-admin/src/components/Hamburger/index.vue index c58c55b..27231c1 100644 --- a/ssyx-admin/src/components/Hamburger/index.vue +++ b/ssyx-admin/src/components/Hamburger/index.vue @@ -9,7 +9,8 @@ height="64" > + d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" + /> diff --git a/ssyx-admin/src/components/HintButton/index.vue b/ssyx-admin/src/components/HintButton/index.vue index f15d87a..67213c7 100644 --- a/ssyx-admin/src/components/HintButton/index.vue +++ b/ssyx-admin/src/components/HintButton/index.vue @@ -1,6 +1,6 @@ diff --git a/ssyx-admin/src/components/SvgIcon/index.vue b/ssyx-admin/src/components/SvgIcon/index.vue index 8b865bd..47f5a48 100644 --- a/ssyx-admin/src/components/SvgIcon/index.vue +++ b/ssyx-admin/src/components/SvgIcon/index.vue @@ -1,13 +1,13 @@