|
|
@ -1,6 +1,7 @@ |
|
|
// pages/index/index.js
|
|
|
// pages/index/index.js
|
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
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 event = require('../../../utils/event') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
|
|
|
@ -38,6 +39,8 @@ Component({ |
|
|
totalInfo: { |
|
|
totalInfo: { |
|
|
totalMoney: 0, |
|
|
totalMoney: 0, |
|
|
totalWeight: 0, |
|
|
totalWeight: 0, |
|
|
|
|
|
availableCreditLine: 0, |
|
|
|
|
|
usedCreditLine: 0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
lifetimes: { |
|
|
lifetimes: { |
|
|
@ -103,16 +106,16 @@ Component({ |
|
|
} else { |
|
|
} else { |
|
|
this.data.tabList[2].badge = '' |
|
|
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 }) |
|
|
this.setData({ tabList: this.data.tabList, totalInfo: result.data }) |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
getUserInfo().then(result => { |
|
|
|
|
|
app.userInfo = result.data |
|
|
|
|
|
this.setData({ userInfo: app.userInfo }) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
showSheet: function(){ |
|
|
showSheet: function(){ |
|
|
// this.setData({ show: true })
|
|
|
// this.setData({ show: true })
|
|
|
|