fix
This commit is contained in:
parent
c72f75730e
commit
00da50d7ff
@ -126,7 +126,11 @@ onLoad((options) => {
|
|||||||
}
|
}
|
||||||
console.log("token", uni.getStorageSync("token"));
|
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();
|
paintingDetail();
|
||||||
getBtngetRules();
|
getBtngetRules();
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,5 @@ export const hasPermission = (userPermission) => {
|
|||||||
let permissionList = uni.getStorageSync("ruleBtn")
|
let permissionList = uni.getStorageSync("ruleBtn")
|
||||||
? uni.getStorageSync("ruleBtn")
|
? uni.getStorageSync("ruleBtn")
|
||||||
: [];
|
: [];
|
||||||
console.log(
|
|
||||||
"jjajaj",
|
|
||||||
userPermissionList.some((e) => permissionList.includes(e), userPermission)
|
|
||||||
);
|
|
||||||
return userPermissionList.some((e) => permissionList.includes(e));
|
return userPermissionList.some((e) => permissionList.includes(e));
|
||||||
};
|
};
|
||||||
|
@ -7,6 +7,7 @@ console.log(
|
|||||||
window?.plus?.storage.getItem("token"),
|
window?.plus?.storage.getItem("token"),
|
||||||
uni.getStorageSync("token")
|
uni.getStorageSync("token")
|
||||||
);
|
);
|
||||||
|
console.log("webview", plus.webview.getWebviewById("wv").tokenScan);
|
||||||
const request = new Request({
|
const request = new Request({
|
||||||
baseURL:
|
baseURL:
|
||||||
OAorMc() === "MC"
|
OAorMc() === "MC"
|
||||||
@ -22,7 +23,10 @@ const request = new Request({
|
|||||||
: "application/json";
|
: "application/json";
|
||||||
|
|
||||||
const token =
|
const token =
|
||||||
uni.getStorageSync("token") || uni.getStorageSync("store-token") || "";
|
uni.getStorageSync("token") ||
|
||||||
|
plus.webview.getWebviewById("wv").tokenScan ||
|
||||||
|
uni.getStorageSync("store-token") ||
|
||||||
|
"";
|
||||||
if (config.isFormData) {
|
if (config.isFormData) {
|
||||||
config.headers["Content-Type"] = "multipart/form-data";
|
config.headers["Content-Type"] = "multipart/form-data";
|
||||||
config.headers["Authorization"] = token;
|
config.headers["Authorization"] = token;
|
||||||
|
Loading…
Reference in New Issue
Block a user