diff --git a/pages/center/consumer/index.vue b/pages/center/consumer/index.vue index 2a87c77..1547ca0 100644 --- a/pages/center/consumer/index.vue +++ b/pages/center/consumer/index.vue @@ -578,6 +578,9 @@ onLoad(options) { this.LOADING = true; this.isnorefresh = options.refresh; + if (options.dataType) this.activeTotal = options.dataType + if (options.staTime) this.screen.staTime = options.staTime + if (options.endTime) this.screen.endTime = options.endTime }, onShow() { // dataCode: 身份标识 2:项目总、3:客服、4:策划、5:经理、6:置业顾问 @@ -1266,6 +1269,7 @@ .content-last { display: flex; + .content-last-tab { width: 33.4%; height: 78rpx; diff --git a/pages/index/customer.vue b/pages/index/customer.vue index 429d888..c446c9a 100644 --- a/pages/index/customer.vue +++ b/pages/index/customer.vue @@ -131,8 +131,35 @@ this.init() this.updateInit() this.queryHaveDept() + this.initrealTimeStatistics() }, methods: { + + //实时统计 + initrealTimeStatistics() { + uni.request({ + url: config.service.realTimeStatistics, + method: "POST", + header: { + 'content-type': 'application/json', + 'Access-Token': uni.getStorageSync('weapp_session_login_data').token + }, + data: { + houseId: this.buildingID + }, + success: (data) => { + if (data.data.data == null) { + return + } else { + this.tabbarList[1].count = data.data.data.receivingCustomer || 0 + this.$forceUpdate() + } + }, + fail: () => { + } + }) + }, + // 删除接待 deleteReception(data) { uni.showModal({ @@ -176,6 +203,7 @@ }, reshCustom() { this.init() + this.initrealTimeStatistics() }, tapThevisiting(item) { uni.showLoading({ @@ -277,6 +305,7 @@ title: "操作成功" }) this.init(); + this.initrealTimeStatistics() }).catch(() => { uni.hideLoading() }); diff --git a/pages/index/index.vue b/pages/index/index.vue index 4596c64..b05c20a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -86,14 +86,16 @@ 已用小时 - {{paraphraseObj.surplusSum || 0}} + + {{paraphraseObj.surplusSum || 0}} + 剩余小时