From 08bce5224fa0174bbd9975f97d4f7ba7ab30fea8 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 18 Dec 2023 12:19:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=99=BB=E5=BD=95=E5=90=8E=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0uName=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/login.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/login.js b/src/utils/login.js index 0286df90d..1579643fb 100644 --- a/src/utils/login.js +++ b/src/utils/login.js @@ -140,6 +140,7 @@ function loginNew (res) { const userInfoJSON = decodeURIComponent(userInfoStr) const userInfo = JSON.parse(userInfoJSON) userInfo.userId = userInfo.usid + userInfo.uName = userInfo.uName || userInfo.uname store.commit('setToken', userInfo.token) store.commit('setUserInfo', JSON.stringify(userInfo)) getMenu({ userId: store.getters.userInfo.userId }) From 0072aa90e417d55b11cc455611098e23b5d4f9e0 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 18 Dec 2023 12:20:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feature:=20=E9=85=8D=E7=BD=AEeslint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5266a0221..97b94c4b2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,8 +28,8 @@ module.exports = { 'no-mixed-spaces-and-tabs': 'error', // 禁止混用空格和 tab缩进 'quotes': ['error', 'single'], // 强制使用单引号 "spaced-comment": ["error", "always"], // 注释后面需要有空格 - "prefer-template": "error", // 字符串拼接使用模版字符串 'hello' + world => `hello${world}` - "template-curly-spacing": ["error", "always"], // 模版字符串中{}前后内有一个或多个空格 `hello${ world }` => `hello${ world }` + "prefer-template": "off", // 字符串拼接使用模版字符串 'hello' + world => `hello${world}` + "template-curly-spacing": ["error", "never"], // 模版字符串中{}前后没有空格 `hello${ world }` => `hello${world}` always 有一个或多个空格,never 没有空格 "key-spacing": ["error", { mode: "strict" }], // 对象字面量中冒号的前后空格 { "foo" : 42 } => { "foo": 42 } "comma-spacing": ["error", { "before": false, "after": true }], // 逗号前面不能有空格,后面需要有空格 [1, 2 , 3 ,4] => [1, 2, 4, 4] "array-bracket-spacing": ["error","always"], // 数组前后需要有空格 [ 1,2 ] => [ 1,2 ]