修改首页选择园区,,商户,,电表
This commit is contained in:
@@ -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
21
utils/system.js
Normal 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,
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user