收入支出显示修复
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
sumYearAmnt: 0,
|
||||
payList: []
|
||||
},
|
||||
onLoad: function (options) {
|
||||
@@ -21,8 +22,8 @@ Page({
|
||||
}
|
||||
item.money = money;
|
||||
})
|
||||
console.log(payList);
|
||||
this.setData({payList})
|
||||
let sumYearAmnt = result[-1];
|
||||
this.setData({payList,sumYearAmnt})
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view data-type="count" class="inline_box font_big">年度总支出</view>
|
||||
</view>
|
||||
<view class="pay_look">
|
||||
<text class="center_look font_big">{{ 7000.23 }}</text>
|
||||
<text class="center_look font_big">{{ sumYearAmnt ? sumYearAmnt : 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
sumYearAmnt: 0,
|
||||
incomeList: []
|
||||
},
|
||||
onShow() {
|
||||
@@ -18,8 +19,8 @@ Page({
|
||||
}
|
||||
item.money = money;
|
||||
})
|
||||
console.log(incomeList);
|
||||
this.setData({incomeList})
|
||||
let sumYearAmnt = result[-1];
|
||||
this.setData({incomeList,sumYearAmnt})
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view data-type="count" class="inline_box font_big">年度总收入</view>
|
||||
</view>
|
||||
<view class="pay_look">
|
||||
<text class="center_look font_big">{{ 89310.23 }}</text>
|
||||
<text class="center_look font_big">{{ sumYearAmnt ? sumYearAmnt : 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user