fix
This commit is contained in:
parent
83dee1a811
commit
c72f75730e
@ -2,9 +2,9 @@
|
|||||||
export default {
|
export default {
|
||||||
onLaunch: function () {},
|
onLaunch: function () {},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log("App Show");
|
|
||||||
const token = window?.plus?.storage.getItem("token");
|
const token = window?.plus?.storage.getItem("token");
|
||||||
uni.setStorageSync("token", token);
|
uni.setStorageSync("token", token);
|
||||||
|
console.log("App Show", uni.getStorageSync("token"));
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
|
@ -121,9 +121,10 @@ onLoad((options) => {
|
|||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
const token = window?.plus?.storage.getItem("token");
|
const token = window?.plus?.storage.getItem("token");
|
||||||
if (!uni.setStorageSync("token", token)) {
|
if (!uni.getStorageSync("token")) {
|
||||||
uni.setStorageSync("token", token);
|
uni.setStorageSync("token", token);
|
||||||
}
|
}
|
||||||
|
console.log("token", uni.getStorageSync("token"));
|
||||||
// 已经登录了
|
// 已经登录了
|
||||||
if (uni.getStorageSync("token") || uni.getStorageSync("store-token")) {
|
if (uni.getStorageSync("token") || uni.getStorageSync("store-token")) {
|
||||||
paintingDetail();
|
paintingDetail();
|
||||||
|
@ -3,7 +3,7 @@ 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(
|
console.log(
|
||||||
"token",
|
"tokenServer",
|
||||||
window?.plus?.storage.getItem("token"),
|
window?.plus?.storage.getItem("token"),
|
||||||
uni.getStorageSync("token")
|
uni.getStorageSync("token")
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user