修改首页选择园区,,商户,,电表

This commit is contained in:
2024-04-03 14:46:34 +08:00
parent db6d253898
commit f5ddb92449
17 changed files with 188 additions and 68 deletions

View File

@@ -1,3 +1,5 @@
/** 每次系统加载的时候判断是否有发版 */
export function checkUpgrade() {
if (wx.canIUse('getUpdateManager')) {
@@ -216,4 +218,5 @@ export const wxModal = (data) => {
}
})
})
}
}

21
utils/system.js Normal file
View File

@@ -0,0 +1,21 @@
import { getUnReadApproveNumber } from "../service/user";
import request from '../utils/request'
const { OK } = request
export const getDot = async () => {
const user = wx.getStorageSync('user')
if (!user || !user.id) {
return;
}
const { code, message, data } = await getUnReadApproveNumber();
if (data > 0) {
wx.showTabBarRedDot({
index: 1,
})
} else {
wx.hideTabBarRedDot({
index: 1,
})
}
}