|
@@ -21,16 +21,15 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
- //this.getTabBar().monitor();开启socket监听
|
|
|
- this.refreshData(wx.getStorageSync('userMsg')) //更新权限等信息
|
|
|
+ this.refreshData() //更新权限等信息
|
|
|
this.setData({ //获取胶囊位置信息
|
|
|
capsule: wx.getMenuButtonBoundingClientRect()
|
|
|
})
|
|
|
},
|
|
|
/* 更新站点信息 */
|
|
|
- refreshData(item) {
|
|
|
+ refreshData() {
|
|
|
this.setData({
|
|
|
- user: item
|
|
|
+ user: wx.getStorageSync('userMsg')
|
|
|
})
|
|
|
/* 首页宫格授权查询 */
|
|
|
if (wx.getStorageSync('userauth').length != 0) {
|
|
@@ -138,10 +137,13 @@ Page({
|
|
|
/* 获取通告列表 */
|
|
|
queryNoticeList(i) {
|
|
|
if (i == 5) return;
|
|
|
+ let obj = this.data.gridList.find(v => v.name == '通告');
|
|
|
+ if (!obj || obj.apps.length == 0) return;
|
|
|
_Http.basic({
|
|
|
"classname": "saletool.notice.notice",
|
|
|
"method": "queryNoticeList",
|
|
|
"content": {
|
|
|
+ "nocache": true,
|
|
|
"pageNumber": 1,
|
|
|
"pageSize": 3
|
|
|
}
|
|
@@ -151,7 +153,7 @@ Page({
|
|
|
annunciateList: res.data,
|
|
|
unreadNum: res.total - res.tips.readNum
|
|
|
})
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
/* 获取最新信息 */
|
|
|
queryMessage(i = 0) {
|
|
@@ -231,6 +233,7 @@ Page({
|
|
|
if (this.data.msgList.length > 2) this.startDataCarousel();
|
|
|
this.getCount(); //更新徽标数据
|
|
|
this.queryMessage(0); //更新最新消息
|
|
|
+ this.queryNoticeList(0); //获取通告列表
|
|
|
},
|
|
|
onHide() {
|
|
|
clearInterval(DataCarousel);
|