fix
This commit is contained in:
parent
83dee1a811
commit
c72f75730e
@ -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");
|
||||
|
@ -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();
|
||||
|
@ -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")
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user