|
@@ -156,10 +156,13 @@ import * as jwx from "@/utils/jssdk.js"; //引入js sdk的封装
|
|
|
|
|
|
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
|
|
|
import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
|
|
|
+import { getToken, setToken, removeToken } from "@/utils/auth";
|
|
|
+import useStores from "@/store/modules/user.js";
|
|
|
import publicStore from "@/store/modules/public";
|
|
|
|
|
|
import { scan_push, getHomePageData, getFunctionalModuleStatistics, getAppRouters } from "@/api/index";
|
|
|
|
|
|
+const useStore = useStores();
|
|
|
const publicStores = publicStore(); //全局公共Store
|
|
|
const BASE_URL = inject("$BASE_URL");
|
|
|
|
|
@@ -194,8 +197,8 @@ onLoad((option) => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- if (uni.getStorageSync("recentlyUsed")) {
|
|
|
- arrayList.recentlyUsed = uni.getStorageSync("recentlyUsed");
|
|
|
+ if (uni.getStorageSync(useStore.$state.name)) {
|
|
|
+ arrayList.recentlyUsed = uni.getStorageSync(useStore.$state.name);
|
|
|
}
|
|
|
|
|
|
// var res = uni.getStorageSync("selectedCode");
|
|
@@ -306,7 +309,7 @@ function navItemClick(item) {
|
|
|
|
|
|
arrayList.recentlyUsed = publicStores.sortEvent(arrayList.recentlyUsed, 1);
|
|
|
|
|
|
- uni.setStorageSync("recentlyUsed", arrayList.recentlyUsed);
|
|
|
+ uni.setStorageSync(useStore.$state.name, arrayList.recentlyUsed);
|
|
|
|
|
|
uni.navigateTo({
|
|
|
url: item.path,
|