This commit is contained in:
Aiden 2024-10-22 13:23:55 +08:00
parent c72f75730e
commit 00da50d7ff
3 changed files with 10 additions and 6 deletions

View File

@ -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();
}

View File

@ -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));
};

View File

@ -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;