Browse Source

no message

feature/v1.1
xpz2018 5 years ago
parent
commit
530b50e562
2 changed files with 12 additions and 9 deletions
  1. 17
      pages/process/index/index.js
  2. 4
      pages/process/index/index.wxml

17
pages/process/index/index.js

@ -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 })

4
pages/process/index/index.wxml

@ -112,7 +112,7 @@
<view style="height:24rpx;width:6rpx;background:#007AFF"></view> <view style="height:24rpx;width:6rpx;background:#007AFF"></view>
<view class="text-black text-sm" style="margin-left: 12rpx">剩余代付额度</view> <view class="text-black text-sm" style="margin-left: 12rpx">剩余代付额度</view>
</view> </view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{userInfo.availableCreditLine}}</view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{totalInfo.availableCreditLine || 0}}</view>
<view class="text-gray text-sm">查看代付详情</view> <view class="text-gray text-sm">查看代付详情</view>
</view> </view>
<view style="flex:1;padding:0rpx 32rpx;margin-left:12rpx"> <view style="flex:1;padding:0rpx 32rpx;margin-left:12rpx">
@ -120,7 +120,7 @@
<view style="height:24rpx;width:6rpx;background:#FF8413"></view> <view style="height:24rpx;width:6rpx;background:#FF8413"></view>
<view class="text-black text-sm" style="margin-left: 12rpx">待付款金额</view> <view class="text-black text-sm" style="margin-left: 12rpx">待付款金额</view>
</view> </view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{userInfo.usedCreditLine}}</view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{totalInfo.usedCreditLine || 0}}</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save