This commit is contained in:
Aiden 2024-10-22 14:57:05 +08:00
parent 768c425921
commit 7bbab6d9b3

View File

@ -2,11 +2,7 @@ import Request from "./request/index.js";
import useToast from "@/hooks/toast/useToast.js"; import useToast from "@/hooks/toast/useToast.js";
import { OAorMc } from "../index.js"; import { OAorMc } from "../index.js";
const { showMessage } = useToast(); const { showMessage } = useToast();
console.log(
"tokenServer",
uni.getStorageSync("token")
);
console.log("webview", window?.plus?.webview.getWebviewById("wv").tokenScan); console.log("webview", window?.plus?.webview.getWebviewById("wv").tokenScan);
const request = new Request({ const request = new Request({
baseURL: baseURL:
@ -28,6 +24,13 @@ const request = new Request({
window?.plus?.webview.getWebviewById("wv").tokenScan || window?.plus?.webview.getWebviewById("wv").tokenScan ||
uni.getStorageSync("store-token") || uni.getStorageSync("store-token") ||
""; "";
console.log(
"tokenServer",
uni.getStorageSync("token"),
"realtoken",
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;