This commit is contained in:
Aiden 2024-10-22 11:32:40 +08:00
parent 83dee1a811
commit c72f75730e
3 changed files with 4 additions and 3 deletions

View File

@ -2,9 +2,9 @@
export default {
onLaunch: function () {},
onShow: function () {
console.log("App Show");
const token = window?.plus?.storage.getItem("token");
uni.setStorageSync("token", token);
console.log("App Show", uni.getStorageSync("token"));
},
onHide: function () {
console.log("App Hide");

View File

@ -121,9 +121,10 @@ onLoad((options) => {
state.id = options.id;
state.pid = options.pid;
const token = window?.plus?.storage.getItem("token");
if (!uni.setStorageSync("token", token)) {
if (!uni.getStorageSync("token")) {
uni.setStorageSync("token", token);
}
console.log("token", uni.getStorageSync("token"));
//
if (uni.getStorageSync("token") || uni.getStorageSync("store-token")) {
paintingDetail();

View File

@ -3,7 +3,7 @@ import useToast from "@/hooks/toast/useToast.js";
import { OAorMc } from "../index.js";
const { showMessage } = useToast();
console.log(
"token",
"tokenServer",
window?.plus?.storage.getItem("token"),
uni.getStorageSync("token")
);