From 00da50d7ffdf58f66a052a9c1036693a38a55971 Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Tue, 22 Oct 2024 13:23:55 +0800 Subject: [PATCH] fix --- src/pages/login/index.vue | 6 +++++- utils/index.js | 4 ---- utils/service/index.js | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index ab4691d..1a6ba7a 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -126,7 +126,11 @@ onLoad((options) => { } console.log("token", uni.getStorageSync("token")); // 已经登录了 - if (uni.getStorageSync("token") || uni.getStorageSync("store-token")) { + if ( + uni.getStorageSync("token") || + plus.webview.getWebviewById("wv").tokenScan || + uni.getStorageSync("store-token") + ) { paintingDetail(); getBtngetRules(); } diff --git a/utils/index.js b/utils/index.js index ef4a5f8..fa56101 100644 --- a/utils/index.js +++ b/utils/index.js @@ -32,9 +32,5 @@ export const hasPermission = (userPermission) => { let permissionList = uni.getStorageSync("ruleBtn") ? uni.getStorageSync("ruleBtn") : []; - console.log( - "jjajaj", - userPermissionList.some((e) => permissionList.includes(e), userPermission) - ); return userPermissionList.some((e) => permissionList.includes(e)); }; diff --git a/utils/service/index.js b/utils/service/index.js index 5d63f44..757ce79 100644 --- a/utils/service/index.js +++ b/utils/service/index.js @@ -7,6 +7,7 @@ console.log( window?.plus?.storage.getItem("token"), uni.getStorageSync("token") ); +console.log("webview", plus.webview.getWebviewById("wv").tokenScan); const request = new Request({ baseURL: OAorMc() === "MC" @@ -22,7 +23,10 @@ const request = new Request({ : "application/json"; const token = - uni.getStorageSync("token") || uni.getStorageSync("store-token") || ""; + uni.getStorageSync("token") || + plus.webview.getWebviewById("wv").tokenScan || + uni.getStorageSync("store-token") || + ""; if (config.isFormData) { config.headers["Content-Type"] = "multipart/form-data"; config.headers["Authorization"] = token;