diff --git a/apis/index.js b/apis/index.js index 0a6a8ca..ade7b3c 100644 --- a/apis/index.js +++ b/apis/index.js @@ -10,8 +10,8 @@ import router from '../router' // 基础配置 const config = { - apiUrl : 'https://douhuo.douhuofalv.com/api/', - // apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境 + // apiUrl : 'https://douhuo.douhuofalv.com/api/', + apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境 timeout : 60000 } @@ -47,6 +47,7 @@ const request = (parameter, hideLoding = true) => { data : parameter.data || {}, method : parameter.method || 'GET', success : res => { + console.log(res) if (res.header.Authorization){ updateToken('token', res.header.Authorization) } diff --git a/pages/account/bonus.vue b/pages/account/bonus.vue index 47f54cc..5466a75 100644 --- a/pages/account/bonus.vue +++ b/pages/account/bonus.vue @@ -2,11 +2,17 @@ - - {{total}} - {{ type === 'balance' ? '账户余额': '已提现总金额'}} + + + {{total}} + {{ type === 'balance' ? '账户余额': '已提现总金额'}} + + 提现 - 提现 + + 佣金(已发放) :¥{{sended}} + 佣金(待发放) :¥{{frozen}} + @@ -23,7 +29,10 @@ - {{item.remark || '-'}} + + {{item.remark || '-'}} + {{item.frozen.text}} + {{item.created_at}} {{item.amount}} @@ -64,6 +73,8 @@ { name: '提现记录', value: 'withdraws' }, ], total : '0.00', + sended : '0.00', + frozen : '0.00', list : [], page : { current : 1, @@ -90,6 +101,8 @@ } this.list = [] this.total = '0.00' + this.sended = '0.00' + this.frozen = '0.00' this.getList() }, // 获取账户余额 @@ -106,9 +119,11 @@ balance({ page: this.page.current }).then(res => { - let { balance, logs } = res; + let { balance, logs ,sended,frozen } = res; let atList = logs.page.current == 1 ? [] : this.list this.total = balance + this.sended = sended + this.frozen = frozen this.list = atList.concat(logs.data) this.page = logs.page this.pagesShow = false @@ -171,9 +186,31 @@ background-position: top center; padding: 50rpx 30rpx 170rpx; color: white; - display: flex; - justify-content: space-between; - align-items: center; + .total-item-1{ + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + } + .total-item-2{ + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + box-sizing: border-box; + // margin-top: $margin; + position: relative; + top: $margin ; + padding-bottom: 20rpx; + font-size: 30rpx; + view{ + opacity: 0.9; + font-size: 26rpx; + } + span{ + font-size:32rpx; + } + } .total-left{ width: calc( 100% - 200rpx ); } @@ -183,17 +220,17 @@ font-family: Arial, Helvetica, sans-serif; } .total-text{ - font-size: 30rpx; - opacity: .7; + font-size: 26rpx; + opacity: .9; line-height: 40rpx; padding-top: 20rpx; } .total-btn{ background: white; color: #8E6AFF; - line-height: 80rpx; + line-height: 70rpx; border-radius: 40rpx; - width: 170rpx; + width: 200rpx; font-weight: bold; text-align: center; } @@ -241,6 +278,20 @@ padding-right: 10rpx; color: $main-color; } + span{ + font-size: 22rpx; + font-weight: normal; + background-color: rgba(green, 0.4); + padding: 2rpx 20rpx; + border-radius: 40rpx; + color: #fff; + position: relative; + left: 20rpx; + top: -6rpx; + } + .active{ + background-color: rgba(red, 0.4); + } } .remark{ font-size: 28rpx;