Showing
1 changed file
with
8 additions
and
7 deletions
@@ -8,11 +8,7 @@ Page({ | @@ -8,11 +8,7 @@ Page({ | ||
8 | data: { | 8 | data: { |
9 | api: Object, | 9 | api: Object, |
10 | data: [], | 10 | data: [], |
11 | - summary: { | ||
12 | - totalIncome: '0.00', | ||
13 | - goodsIncome: '0.00', | ||
14 | - compensateIncome: '0.00' | ||
15 | - }, | 11 | + summary: {}, |
16 | currentPage:1, | 12 | currentPage:1, |
17 | page:0, | 13 | page:0, |
18 | pagetotal:0, | 14 | pagetotal:0, |
@@ -48,7 +44,7 @@ Page({ | @@ -48,7 +44,7 @@ Page({ | ||
48 | ctx.setLineWidth(10); | 44 | ctx.setLineWidth(10); |
49 | // 设置圆环的颜色 | 45 | // 设置圆环的颜色 |
50 | let strokeColor = '#E0E0E0' | 46 | let strokeColor = '#E0E0E0' |
51 | - if (summary && summary.totalIncome >= 0) { | 47 | + if (summary && summary.totalIncome > 0) { |
52 | strokeColor = '#65AB85'; | 48 | strokeColor = '#65AB85'; |
53 | } | 49 | } |
54 | ctx.setStrokeStyle(strokeColor); | 50 | ctx.setStrokeStyle(strokeColor); |
@@ -129,7 +125,12 @@ Page({ | @@ -129,7 +125,12 @@ Page({ | ||
129 | }).then(data => { | 125 | }).then(data => { |
130 | if(data){ | 126 | if(data){ |
131 | let detail = data.data; | 127 | let detail = data.data; |
132 | - let summary = data.summary ? data.summary : {}; | 128 | + let constSummary = { |
129 | + totalIncome: '0.00', | ||
130 | + goodsIncome: '0.00', | ||
131 | + compensateIncome: '0.00', | ||
132 | + } | ||
133 | + let summary = constSummary;//data.summary ? data.summary : constSummary; | ||
133 | if(detail){ | 134 | if(detail){ |
134 | detail = that.data.data.concat(detail); | 135 | detail = that.data.data.concat(detail); |
135 | } else { | 136 | } else { |
-
Please register or login to post a comment