diff --git a/pages/process/index/index.js b/pages/process/index/index.js
index 5c584e8..12e79f5 100644
--- a/pages/process/index/index.js
+++ b/pages/process/index/index.js
@@ -1,6 +1,7 @@
// pages/index/index.js
import Dialog from '../../../components/dialog/dialog'
-import { getStatisticsInfo, getUserInfo } from "../../../api/saas"
+import { getStatisticsInfo } from "../../../api/saas"
+import util from '../../../utils/util'
const event = require('../../../utils/event')
const app = getApp()
@@ -38,6 +39,8 @@ Component({
totalInfo: {
totalMoney: 0,
totalWeight: 0,
+ availableCreditLine: 0,
+ usedCreditLine: 0
}
},
lifetimes: {
@@ -103,16 +106,16 @@ Component({
} else {
this.data.tabList[2].badge = ''
}
+ if(util.isEmpty(result.data.availableCreditLine)){
+ result.data.availableCreditLine = app.userInfo.availableCreditLine
+ }
+ if(util.isEmpty(result.data.usedCreditLine)){
+ result.data.usedCreditLine = app.userInfo.usedCreditLine
+ }
this.setData({ tabList: this.data.tabList, totalInfo: result.data })
}).catch(err => {
console.log(err)
})
- getUserInfo().then(result => {
- app.userInfo = result.data
- this.setData({ userInfo: app.userInfo })
- }).catch(err => {
- console.log(err)
- })
},
showSheet: function(){
// this.setData({ show: true })
diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml
index 3ed2bda..56a8ca2 100644
--- a/pages/process/index/index.wxml
+++ b/pages/process/index/index.wxml
@@ -112,7 +112,7 @@
剩余代付额度
- {{userInfo.availableCreditLine}}
+ {{totalInfo.availableCreditLine || 0}}
查看代付详情
@@ -120,7 +120,7 @@
待付款金额
- {{userInfo.usedCreditLine}}
+ {{totalInfo.usedCreditLine || 0}}