From 7cbca0ee872422f631cb744c48cfc88487f63c70 Mon Sep 17 00:00:00 2001 From: zhj Date: Thu, 2 Jan 2025 11:15:39 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B8=85=E7=90=86=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 6 +++--- src/utils/auth.ts | 4 ++-- src/views/auth/backendUser/index.vue | 3 +-- src/views/auth/company/index.vue | 1 - src/views/auth/frontendUser/index.vue | 4 +--- src/views/auth/role/index.vue | 1 - src/views/biz/purchaseSpend/index.vue | 1 - 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index fa65f96..d0c2b1d 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -67,14 +67,14 @@ export const useUserStore = defineStore({ /** 登入 */ async loginByUsername(data) { console.info("```````````````````````````````````````````````"); - console.info(data); + // console.info(data); return new Promise((resolve, reject) => { getLogin(data) .then(data => { - console.log("loginByUsername"); + /* console.log("loginByUsername"); console.log(data.data); console.log(data.status); - console.log(data); + console.log(data); */ //if (data?.success) setToken(data.data); // if(data?.status==200) setToken(data.data); if (data && data.status == 200) { diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 285d880..6bcb08b 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -124,8 +124,8 @@ export function removeToken() { /** 格式化token(jwt格式) */ export const formatToken = (token: string): string => { - console.log("token", token); - console.info("Bearer " + token); + /* console.log("token", token); + console.info("Bearer " + token); */ return "Bearer " + token; }; diff --git a/src/views/auth/backendUser/index.vue b/src/views/auth/backendUser/index.vue index c066295..12c8751 100644 --- a/src/views/auth/backendUser/index.vue +++ b/src/views/auth/backendUser/index.vue @@ -40,7 +40,7 @@ const getRoleList = async () => { const res = await request(authApi("getRoles"), { method: "post" }); - console.info(res); + // console.info(res); if (res.status === 200) { roleOptions.value = res.data.map(item => ({ value: item.id, @@ -62,7 +62,6 @@ const getUserList = async () => { method: "post", body: JSON.stringify(params) }); - console.log(data); if (data.status === 200) { tableData.value = data.data.rows; diff --git a/src/views/auth/company/index.vue b/src/views/auth/company/index.vue index cba40c9..4c9113d 100644 --- a/src/views/auth/company/index.vue +++ b/src/views/auth/company/index.vue @@ -46,7 +46,6 @@ const getCompanyList = async () => { method: "POST", body: JSON.stringify(params) }); - console.log(data); /* tableData.value = data.data.records; total.value = data.data.total; */ diff --git a/src/views/auth/frontendUser/index.vue b/src/views/auth/frontendUser/index.vue index 6e60744..983d181 100644 --- a/src/views/auth/frontendUser/index.vue +++ b/src/views/auth/frontendUser/index.vue @@ -46,7 +46,6 @@ const getCompanyList = async () => { const res = await request(authApi("getCompanyPrimaryInfo"), { method: "post" }); - console.info(res); if (res.status === 200) { companyOptions.value = res.data.map(item => ({ value: item.id, @@ -66,7 +65,7 @@ const getRoleList = async () => { const res = await request(authApi("getRoles"), { method: "post" }); - console.info(res); + // console.info(res); if (res.status === 200) { roleOptions.value = res.data.map(item => ({ value: item.id, @@ -87,7 +86,6 @@ const getUserList = async () => { method: "post", body: JSON.stringify(params) }); - console.log(data); if (data.status === 200) { tableData.value = data.data.rows; diff --git a/src/views/auth/role/index.vue b/src/views/auth/role/index.vue index d52c610..12d9792 100644 --- a/src/views/auth/role/index.vue +++ b/src/views/auth/role/index.vue @@ -44,7 +44,6 @@ const getRoleList = async () => { method: "POST", body: JSON.stringify(params) }); - console.log(data); /* tableData.value = data.data.records; total.value = data.data.total; */ diff --git a/src/views/biz/purchaseSpend/index.vue b/src/views/biz/purchaseSpend/index.vue index 5aff82b..f2fd581 100644 --- a/src/views/biz/purchaseSpend/index.vue +++ b/src/views/biz/purchaseSpend/index.vue @@ -83,7 +83,6 @@ const getPurchaseSpendList = async () => { body: JSON.stringify(params) }); - console.log(data); if (data.status === 200 && data.data != null) { tableData.value = data.data.rows; total.value = data.data.records;