|
|
@@ -74,13 +74,14 @@ Page({
|
|
|
})
|
|
|
break;
|
|
|
case "销售线索":
|
|
|
- console.log(v.apps)
|
|
|
gridList.push({
|
|
|
name: "销售线索",
|
|
|
path: "/pages/threadedTree/index",
|
|
|
icon: "icon-xiaoshouxiansuo",
|
|
|
apps: v.apps
|
|
|
})
|
|
|
+ //获取销售线索待办数量
|
|
|
+ setTimeout(this.getCount, 100);
|
|
|
break;
|
|
|
};
|
|
|
});
|
|
|
@@ -100,6 +101,26 @@ Page({
|
|
|
this.queryNoticeList(0); //获取通告列表
|
|
|
this.queryMessage(0)
|
|
|
},
|
|
|
+ /* 销售线索待办 */
|
|
|
+ getCount() {
|
|
|
+ const index = this.data.gridList.findIndex(v => v.name == '销售线索');
|
|
|
+ if (!index) return;
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "saletool.orderclue.web.orderclue",
|
|
|
+ "method": "getCount",
|
|
|
+ "content": {
|
|
|
+ "nocache": true,
|
|
|
+ "status": "待跟进"
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.count == 0) return;
|
|
|
+ if (res.data.count > 99) res.data.count = '99+';
|
|
|
+ this.data.gridList[index].count = res.data.count;
|
|
|
+ this.setData({
|
|
|
+ gridList: this.data.gridList
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
/* 查看通告详情 */
|
|
|
toAnnunciateDetails(e) {
|
|
|
const {
|
|
|
@@ -206,6 +227,7 @@ Page({
|
|
|
onShow() {
|
|
|
this.getTabBar().init();
|
|
|
this.startDataCarousel();
|
|
|
+ this.getCount(); //更新徽标数据
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|