Commit fc5a2df7 authored by Facius's avatar Facius

fix: bug修复

parent 9ca9a097
Pipeline #3249 canceled with stages
......@@ -7,8 +7,8 @@
<swiper
class="swiper"
:indicator-dots="true"
indicator-color="rgba(252, 184, 42, 0.45)"
indicator-active-color="#FCB82A"
indicator-color="rgba(2, 160, 116, 0.45)"
indicator-active-color="rgba(2, 160, 116, 1)"
style="height: 420rpx"
>
<swiper-item>
......
......@@ -439,22 +439,18 @@ export default {
},
reloadData() {
this.getBookRecordPeriod()
this.getBookRecordChart()
if (this.infoIndex != 2) {
this.getBookRecordClassification()
this.getBookRecordPage()
}
},
handleClickInfo(index) {
this.infoIndex = index
this.otherRequest()
},
otherRequest() {
this.getBookRecordChart()
if (index != 2) {
if (this.infoIndex != 2) {
this.getBookRecordPage()
this.getBookRecordClassification()
}
},
// 收支
getBookRecordPeriod() {
this.loading = true
......@@ -492,6 +488,7 @@ export default {
}
})
this.loading = false
this.otherRequest()
})
.catch((err) => {
this.loading = false
......@@ -549,17 +546,14 @@ export default {
return Number(item2.amount) - Number(item1.amount)
})
var list = []
var all = Number(this.info[this.currentSetting.key])
for (var item of sortData) {
list.push({
name: item.name,
value: Number(item.amount || 0),
id: item.id,
icon: item.icon,
percent: (
(Number(item.amount || 0) /
Number(this.info[this.currentSetting.key])) *
100
).toFixed(2),
percent: all && item.amount ? (Number(item.amount || 0) / all * 100).toFixed(2) : 0,
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment