|
@@ -136,7 +136,7 @@
|
|
|
<view class="cu-list grid col-5 no-border">
|
|
|
<view class="cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in arrayList.cuIconList" :key="index">
|
|
|
<image :src="item.icon" style="width: 40px; height: 40px"></image>
|
|
|
- <!-- <view class="cu-tag badge" v-if="item.badge != 0">
|
|
|
+ <!-- <view class="cu-tag badge" v-if="item.badge != 0">
|
|
|
<block v-if="item.badge != 0">{{ item.badge > 99 ? "99+" : item.badge }}</block>
|
|
|
</view> -->
|
|
|
<text style="font-size: 13px">{{ item.menuName }}</text>
|
|
@@ -156,11 +156,11 @@ 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 useXunJianStore from "@/store/modules/xunJian.js";
|
|
|
+import publicStore from "@/store/modules/public";
|
|
|
|
|
|
-import { scan_push, getHomePageData, getFunctionalModuleStatistics,getAppRouters} from "@/api/index";
|
|
|
+import { scan_push, getHomePageData, getFunctionalModuleStatistics, getAppRouters } from "@/api/index";
|
|
|
|
|
|
-const settingsStore = useXunJianStore(); //全局变量值Store
|
|
|
+const publicStores = publicStore(); //全局公共Store
|
|
|
const BASE_URL = inject("$BASE_URL");
|
|
|
|
|
|
const arrayList = reactive({
|
|
@@ -183,10 +183,6 @@ const arrayList = reactive({
|
|
|
});
|
|
|
|
|
|
onLoad((option) => {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//获取首页标题
|
|
|
if (uni.getStorageSync("homeTitle")) {
|
|
|
uni.setNavigationBarTitle({
|
|
@@ -215,13 +211,8 @@ onLoad((option) => {
|
|
|
// nextTick(() => {
|
|
|
// hackReset.value = true;
|
|
|
// });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- getAppRoutersData()
|
|
|
|
|
|
+ getAppRoutersData();
|
|
|
});
|
|
|
|
|
|
async function init() {
|
|
@@ -313,7 +304,7 @@ function navItemClick(item) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- arrayList.recentlyUsed = settingsStore.sortEvent(arrayList.recentlyUsed, 1);
|
|
|
+ arrayList.recentlyUsed = publicStores.sortEvent(arrayList.recentlyUsed, 1);
|
|
|
|
|
|
uni.setStorageSync("recentlyUsed", arrayList.recentlyUsed);
|
|
|
|
|
@@ -369,28 +360,20 @@ function InputFocus(e) {
|
|
|
|
|
|
function InputBlur(e) {
|
|
|
arrayList.InputBottom = 0;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
function getAppRoutersData() {
|
|
|
getAppRouters({
|
|
|
-
|
|
|
- domain :window.location.host.indexOf('localhost') != -1
|
|
|
- ? 'localhost:81'
|
|
|
- : window.location.host,
|
|
|
- platformType:'MOB'
|
|
|
- // domain :'172.16.120.165:13201'
|
|
|
- // domain :'172.16.120.165:13203'
|
|
|
+ domain: window.location.host.indexOf("localhost") != -1 ? "localhost:81" : window.location.host,
|
|
|
+ platformType: "MOB",
|
|
|
+ // domain :'172.16.120.165:13201'
|
|
|
+ // domain :'172.16.120.165:13203'
|
|
|
}).then((res) => {
|
|
|
- console.log(res.data)
|
|
|
- arrayList.cuIconList=res.data
|
|
|
- console.log(window.location.host)
|
|
|
-
|
|
|
+ console.log(res.data);
|
|
|
+ arrayList.cuIconList = res.data;
|
|
|
+ console.log(window.location.host);
|
|
|
});
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+}
|
|
|
|
|
|
//echarts图表请求
|
|
|
async function getHomeData(param = {}) {
|
|
@@ -438,8 +421,6 @@ async function getHomeData(param = {}) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 未处理告警请求
|
|
|
async function getHandleData(param = {}) {
|
|
|
getFunctionalModuleStatistics(param).then((res) => {
|