|
@@ -4,10 +4,10 @@
|
|
|
<view class="balance">
|
|
|
<view class="balanceHead">
|
|
|
<view class="payPrice">
|
|
|
- <span>¥</span><font>15.00</font>
|
|
|
+ <span>¥</span><font>{{account.totalAmount}}</font>
|
|
|
</view>
|
|
|
<view class="tips">
|
|
|
- <p>可退费金额(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32"></u-icon>
|
|
|
+ <p>可退费金额(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip = true"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="balanceMain">
|
|
@@ -22,16 +22,17 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="refundList">
|
|
|
- <view class="refundList-item">
|
|
|
+ <view class="refundList-item" v-for="(item,index) in items" :key="index">
|
|
|
<view class="refundList-row">
|
|
|
- <font>退至 微信</font>
|
|
|
- <span class="state1">退款中</span>
|
|
|
+ <font>退至 {{item.refundChannelText}}</font>
|
|
|
+ <span :class="item.status == '0'? 'state1':'state2' ">{{item.statusText}}</span>
|
|
|
</view>
|
|
|
<view class="refundList-row">
|
|
|
- <p>2021-12-31 09:00</p>
|
|
|
- <p>¥15.00</p>
|
|
|
+ <p>{{item.applicationTime}}</p>
|
|
|
+ <p>¥{{item.refundAmount.toFixed(2)}}</p>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!--
|
|
|
<view class="refundList-item">
|
|
|
<view class="refundList-row">
|
|
|
<font>退至 微信</font>
|
|
@@ -41,26 +42,45 @@
|
|
|
<p>2021-12-31 09:00</p>
|
|
|
<p>¥15.00</p>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view>-->
|
|
|
+
|
|
|
<!-- <view class="refundList-none">
|
|
|
<u-image width="200px" height="200px" src="/static/img/none.svg"></u-image>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view>
|
|
|
+ <u-modal v-model="show" :title="title" :content='content' :show-confirm-button="true" :show-cancel-button='true' @confirm="confirm"></u-modal>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <u-modal v-model="showtip" :title="title" :content='content1' :show-confirm-button="true" confirm-text="知道了" ></u-modal>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view style="bottom:0rpx;position:absolute;background-color: green;width: 100%;">
|
|
|
+ <u-button style="background-color: green;color:white" @click="show=true">申请退款</u-button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ let _self;
|
|
|
import * as api from "@/apis/refund.js"
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ content1:'本平台仅支持可支持金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费. 退费成功后,您可以在退费记录查看退费信息和审核进度.',
|
|
|
+ title:'提示',
|
|
|
+ content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
|
|
|
+ show:false,
|
|
|
+ showtip:false,
|
|
|
userId:'',
|
|
|
+ account:{},
|
|
|
+ items:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
|
-
|
|
|
+ _self = this;
|
|
|
},
|
|
|
onReady(){
|
|
|
if (this.carhelp.getPersonInfo()) {
|
|
@@ -69,13 +89,62 @@
|
|
|
}
|
|
|
|
|
|
api.personAccount().then(function(res){
|
|
|
+ if(res.result)
|
|
|
+ {
|
|
|
+ _self.account = res.data;
|
|
|
+
|
|
|
+ }
|
|
|
console.log('个人余额信息'+JSON.stringify(res));
|
|
|
},function(err){
|
|
|
console.log('个人信息余额错误'+JSON.stringify(err));
|
|
|
});
|
|
|
+ let data = {pageIndex:1,pageSize:10};
|
|
|
+ api.personAccountRefundList(data).then(function(res){
|
|
|
+ if(res.result){
|
|
|
+ console.log('res'+JSON.stringify(res));
|
|
|
+ _self.items = res.data.data;
|
|
|
+ for(let i = 0;i< _self.items.length;i++){
|
|
|
+ if(_self.items[i].refundChannel == 'wechat')
|
|
|
+ _self.items[i].refundChannelText = "微信"
|
|
|
+ else if (_self.items[i].refundChannel == 'alipay')
|
|
|
+ _self.items[i].refundChannelText = "支付宝"
|
|
|
+
|
|
|
+ if(_self.items[i].status == '0')
|
|
|
+ _self.items[i].statusText = "退款中"
|
|
|
+ else if (_self.items[i].status == '1')
|
|
|
+ _self.items[i].statusText = "退款成功"
|
|
|
+ else if (_self.items[i].status == '2')
|
|
|
+ _self.items[i].statusText = "退款拒绝"
|
|
|
+ else if (_self.items[i].status == '3')
|
|
|
+ _self.items[i].statusText = "退款失败"
|
|
|
+
|
|
|
+ }
|
|
|
+ console.log('res'+JSON.stringify(_self.items));
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ confirm(){
|
|
|
+ let data = {amount:_self.account.availableAmount,refundChannel:'wechat'}
|
|
|
+ api.personAccountRefundApplication(data).then(function(res){
|
|
|
+ if(res.result){
|
|
|
+
|
|
|
+ console.log('personAccountRefundApplication'+JSON.stringify(res));
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'refundApp'
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },function(err){
|
|
|
+
|
|
|
+ }
|
|
|
+ );
|
|
|
+ //console.log('confirm')
|
|
|
+ },
|
|
|
+ showTips(){
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|