This commit is contained in:
Aiden 2024-10-22 13:50:20 +08:00
parent 2a1f3f6876
commit 67ad9f7b45
2 changed files with 3 additions and 2 deletions

View File

@ -120,7 +120,7 @@ onLoad((options) => {
console.log("options", options);
state.id = options.id;
state.pid = options.pid;
const token = window?.plus?.storage.getItem("token");
const token = window?.plus?.storage.getItemAsync("token");
if (!uni.getStorageSync("token")) {
uni.setStorageSync("token", token);
}

View File

@ -4,7 +4,7 @@ import { OAorMc } from "../index.js";
const { showMessage } = useToast();
console.log(
"tokenServer",
window?.plus?.storage.getItem("token"),
window?.plus?.storage.getItemAsync("token"),
uni.getStorageSync("token")
);
console.log("webview", window?.plus?.webview.getWebviewById("wv").tokenScan);
@ -24,6 +24,7 @@ const request = new Request({
const token =
uni.getStorageSync("token") ||
window?.plus?.storage.getItemAsync("token") ||
window?.plus?.webview.getWebviewById("wv").tokenScan ||
uni.getStorageSync("store-token") ||
"";