新增提现记录功能
This commit is contained in:
parent
cbdaca6a7e
commit
00b3f1a498
17
pages.json
17
pages.json
@ -243,6 +243,23 @@
|
|||||||
"navigationBarTitleText": "提现余额",
|
"navigationBarTitleText": "提现余额",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#3175f9",
|
"navigationBarBackgroundColor": "#3175f9",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"buttons": [{
|
||||||
|
"color": "#fff",
|
||||||
|
"text": "提现记录",
|
||||||
|
"fontSize": "15"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "withdrawList/withdrawList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "提现记录",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#3175f9",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ export default {
|
|||||||
let res = await accountLogLists({
|
let res = await accountLogLists({
|
||||||
type: 'um', //账户余额
|
type: 'um', //账户余额
|
||||||
page_no: this.loadConfig.page,
|
page_no: this.loadConfig.page,
|
||||||
page_size: this.loadConfig.page_size
|
page_size: this.loadConfig.limit
|
||||||
});
|
});
|
||||||
this.loadConfig.status="loadmore"
|
this.loadConfig.status="loadmore"
|
||||||
if(res.data.lists.length<this.loadConfig.limit){
|
if(res.data.lists.length<this.loadConfig.limit){
|
||||||
|
@ -20,12 +20,14 @@
|
|||||||
<view class="item" :class="index==changeMoney?'active':''" @click="changePrice(index)"
|
<view class="item" :class="index==changeMoney?'active':''" @click="changePrice(index)"
|
||||||
v-for="(item, index) in priceList" :key="index">{{item}}</view>
|
v-for="(item, index) in priceList" :key="index">{{item}}</view>
|
||||||
</view>
|
</view>
|
||||||
<input v-if="priceList[changeMoney]=='自定义'" class="input" type="digit" placeholder="输入充值金额(元)" v-model="payMoney.money" />
|
<input v-if="priceList[changeMoney]=='自定义'" class="input" type="digit" placeholder="输入充值金额(元)"
|
||||||
|
v-model="payMoney.money" />
|
||||||
<button class="btn" @click="pay">申请提现</button>
|
<button class="btn" @click="pay">申请提现</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">
|
<view class="tip">
|
||||||
<view class="title">备注</view>
|
<view class="title">备注</view>
|
||||||
<view class="text">提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待,如由疑问也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text></view>
|
<view class="text">提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待,如由疑问也可拨打商城客服热线<text
|
||||||
|
@click="copyPhone('4008888888')">4008888888</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -47,6 +49,14 @@
|
|||||||
timeCount: 5,
|
timeCount: 5,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 点击提现记录
|
||||||
|
onNavigationBarButtonTap(res){
|
||||||
|
if (res.index === 0) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/subpkg/withdrawList/withdrawList'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
@ -83,14 +93,18 @@
|
|||||||
this.timeCount = 5;
|
this.timeCount = 5;
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
} else Toast(this.timeCount + '秒后再提现!')
|
||||||
else Toast(this.timeCount+'秒后再提现!')
|
|
||||||
},
|
},
|
||||||
|
// 提现
|
||||||
async goApply() {
|
async goApply() {
|
||||||
let res = await userWithdraw({
|
let res = await userWithdraw({
|
||||||
amount: this.payMoney.money
|
amount: this.payMoney.money
|
||||||
});
|
});
|
||||||
Toast(res.msg)
|
Toast(res.msg);
|
||||||
|
// 重新显示余额
|
||||||
|
let info = this.$store.state.app.userInfo;
|
||||||
|
info.user_money -= this.payMoney.money;
|
||||||
|
this.$store.commit('setUserInfo', info);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
161
subpkg/withdrawList/withdrawList.vue
Normal file
161
subpkg/withdrawList/withdrawList.vue
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="list">
|
||||||
|
<view class="card" v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="top">
|
||||||
|
<view class="tips" :class="typeList[item.status].class">{{typeList[item.status].text}}</view>
|
||||||
|
<view>提现日期:{{item.create_time}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="left">
|
||||||
|
<view>提现金额(元)</view>
|
||||||
|
<view class="num">{{item.amount}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view>订单编号:</view>
|
||||||
|
<view>{{item.order_sn}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {userWithdrawList} from "@/api/pay.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list:[],
|
||||||
|
typeList:[
|
||||||
|
{
|
||||||
|
text: '审核中',
|
||||||
|
class: 'audit'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '已通过',
|
||||||
|
class: 'pass'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '已拒绝',
|
||||||
|
class: 'no_pass'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '已转账',
|
||||||
|
class: 'ok'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
loadConfig:{
|
||||||
|
page: 1,
|
||||||
|
limit: 15,
|
||||||
|
loadingText: '努力加载中',
|
||||||
|
loadmoreText: '轻轻上拉',
|
||||||
|
nomoreText: '没有更多记录了~~',
|
||||||
|
status: 'loadmore'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.loadList();
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
onReachBottom() {
|
||||||
|
this.loadList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async loadList(){
|
||||||
|
if(this.loadConfig.status=="nomore")return;
|
||||||
|
this.loadConfig.status="loading"
|
||||||
|
let res = await userWithdrawList({
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit
|
||||||
|
});
|
||||||
|
this.loadConfig.status="loadmore"
|
||||||
|
if(res.data.data.length<this.loadConfig.limit){
|
||||||
|
this.loadConfig.status="nomore"
|
||||||
|
}else {
|
||||||
|
this.loadConfig.page++;
|
||||||
|
}
|
||||||
|
this.list = [...this.list, ...res.data.data];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.list{
|
||||||
|
// background-color: #f5f5f5;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 28rpx;
|
||||||
|
.card{
|
||||||
|
padding: 28rpx;
|
||||||
|
width: 694rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-bottom: 21rpx;
|
||||||
|
.top{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333FF;
|
||||||
|
line-height: 39rpx;
|
||||||
|
.tips{
|
||||||
|
width: 137rpx;
|
||||||
|
height: 49rpx;
|
||||||
|
background: #3274F9;
|
||||||
|
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 39rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 28rpx;
|
||||||
|
}
|
||||||
|
.pass{
|
||||||
|
background-color: #FF8C1A;
|
||||||
|
}
|
||||||
|
.no_pass{
|
||||||
|
background-color: #F02828;
|
||||||
|
}
|
||||||
|
.ok{
|
||||||
|
background-color: #47B347;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 160rpx;
|
||||||
|
.left{
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 39rpx;
|
||||||
|
.num{
|
||||||
|
font-size: 39rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #F02828;
|
||||||
|
line-height: 39rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
flex: 1;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 39rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user