@@ -8,7 +8,8 @@ Page({
type: 'yesterday',
list: [],
provinceList: [],
- province: ''
+ province: '',
+ total: 0,
},
// 事件处理
// 选择省份
@@ -45,8 +46,13 @@ Page({
for (const key of keys) {
arr.push({ tc: `${key.includes('套餐') ? key : `${key}-套餐`}`, tzNum: data[key], jpNum: 0 })
}
+ if (arr.length <= 0) wx.showToast({
+ title: '未查到相关数据',
+ icon: "none"
+ })
this.setData({
- list: arr
+ list: arr,
+ total: arr.reduce((p, n) => p + (n.tzNum || 0) + (n.jpNum || 0), 0)
})
@@ -16,7 +16,7 @@
</view>
<view class="down">
<view class="downTxt">
- {{word}}(<text>0</text>)
+ {{word}}(<text>{{total}}</text>)
<view class="downTable">
<view class="th">