This commit is contained in:
Aiden 2024-10-21 15:11:52 +08:00
parent 887c9087f1
commit 0266ad8e99
2 changed files with 4 additions and 3 deletions

View File

@ -121,7 +121,8 @@ onLoad((options) => {
state.id = options.id;
state.pid = options.pid;
const token =
window?.plus?.storage.getItem("token") || uni.getStorageSync("token");
window?.plus?.storage.getItem("token") ||
uni.getStorageSync("store-token");
console.log("token", token);
//
if (token) {
@ -236,7 +237,7 @@ const logining = async () => {
code: state.code ?? "",
});
if (res.status === 0) {
uni.setStorageSync("token", res.data.Token);
uni.setStorageSync("store-token", res.data.Token);
uni.setStorageSync("userInfo", res.data.AccountInfo);
await paintingDetail();
await getBtngetRules();

View File

@ -19,7 +19,7 @@ const request = new Request({
const token =
window?.plus?.storage.getItem("token") ||
uni.getStorageSync("token") ||
uni.getStorageSync("store-token") ||
"";
if (config.isFormData) {
config.headers["Content-Type"] = "multipart/form-data";