Compare commits
No commits in common. "83dee1a811d8edaab656e4f92365bfbd2e583112" and "e7ed00472dd029a168ba0df2d1d0015cb8631c77" have entirely different histories.
83dee1a811
...
e7ed00472d
@ -3,8 +3,6 @@ export default {
|
||||
onLaunch: function () {},
|
||||
onShow: function () {
|
||||
console.log("App Show");
|
||||
const token = window?.plus?.storage.getItem("token");
|
||||
uni.setStorageSync("token", token);
|
||||
},
|
||||
onHide: function () {
|
||||
console.log("App Hide");
|
||||
|
@ -120,12 +120,12 @@ onLoad((options) => {
|
||||
console.log("options", options);
|
||||
state.id = options.id;
|
||||
state.pid = options.pid;
|
||||
const token = window?.plus?.storage.getItem("token");
|
||||
if (!uni.setStorageSync("token", token)) {
|
||||
uni.setStorageSync("token", token);
|
||||
}
|
||||
const token =
|
||||
window?.plus?.storage.getItem("token") ||
|
||||
uni.getStorageSync("store-token");
|
||||
console.log("token", token);
|
||||
// 已经登录了
|
||||
if (uni.getStorageSync("token") || uni.getStorageSync("store-token")) {
|
||||
if (token) {
|
||||
paintingDetail();
|
||||
getBtngetRules();
|
||||
}
|
||||
|
@ -2,11 +2,7 @@ import Request from "./request/index.js";
|
||||
import useToast from "@/hooks/toast/useToast.js";
|
||||
import { OAorMc } from "../index.js";
|
||||
const { showMessage } = useToast();
|
||||
console.log(
|
||||
"token",
|
||||
window?.plus?.storage.getItem("token"),
|
||||
uni.getStorageSync("token")
|
||||
);
|
||||
console.log(window?.plus?.storage.getItem("token"));
|
||||
const request = new Request({
|
||||
baseURL:
|
||||
OAorMc() === "MC"
|
||||
@ -22,7 +18,9 @@ const request = new Request({
|
||||
: "application/json";
|
||||
|
||||
const token =
|
||||
uni.getStorageSync("token") || uni.getStorageSync("store-token") || "";
|
||||
window?.plus?.storage.getItem("token") ||
|
||||
uni.getStorageSync("store-token") ||
|
||||
"";
|
||||
if (config.isFormData) {
|
||||
config.headers["Content-Type"] = "multipart/form-data";
|
||||
config.headers["Authorization"] = token;
|
||||
|
Loading…
Reference in New Issue
Block a user