提现模块对接接口处理
This commit is contained in:
97
apis/interfaces/withdraws.js
Normal file
97
apis/interfaces/withdraws.js
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/**
|
||||||
|
* zdx
|
||||||
|
* moduleName: 提现模块
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
request
|
||||||
|
} from '../index.js'
|
||||||
|
|
||||||
|
|
||||||
|
// 添加前置条件
|
||||||
|
const accountsCreate = () => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts/create'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加银行卡
|
||||||
|
const withdrawsAccounts = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 银行卡列表
|
||||||
|
const withdrawsAccountsList = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts',
|
||||||
|
method: 'get',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑银行卡前置
|
||||||
|
const accountsCreateEdit = (id) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts/'+id+'/edit'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑银行卡
|
||||||
|
const withdrawsAccountsEdits = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts/'+data.bank_account_id,
|
||||||
|
method: 'PUT',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除银行卡
|
||||||
|
const withdrawsAccountsDelete = (id) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/accounts/'+id,
|
||||||
|
method: 'DELETE'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现前置记录
|
||||||
|
const withdrawsIndexCreate = () => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/index/create'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现接口
|
||||||
|
const withdrawsIndex = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/index',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现记录
|
||||||
|
const withdrawsIndexLists = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'withdraws/index',
|
||||||
|
method: 'get',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
export {
|
||||||
|
accountsCreate,
|
||||||
|
withdrawsAccounts,
|
||||||
|
withdrawsAccountsList,
|
||||||
|
accountsCreateEdit,
|
||||||
|
withdrawsAccountsEdits,
|
||||||
|
withdrawsAccountsDelete,
|
||||||
|
withdrawsIndexCreate,
|
||||||
|
withdrawsIndex,
|
||||||
|
withdrawsIndexLists
|
||||||
|
}
|
||||||
@@ -256,23 +256,23 @@
|
|||||||
"name": "Fragment"
|
"name": "Fragment"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/wallet/addCard",
|
"path": "pages/wallet/addBank",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "添加银行卡",
|
"navigationBarTitleText": "添加银行卡",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#774ffd",
|
"navigationBarBackgroundColor": "#774ffd",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
},
|
},
|
||||||
"name": "addCard"
|
"name": "addBank"
|
||||||
},{
|
},{
|
||||||
"path": "pages/wallet/selectCard",
|
"path": "pages/wallet/bankList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "银行卡列表",
|
"navigationBarTitleText": "银行卡列表",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#774ffd",
|
"navigationBarBackgroundColor": "#774ffd",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
},
|
},
|
||||||
"name": "selectCard"
|
"name": "bankList"
|
||||||
},{
|
},{
|
||||||
"path": "pages/wallet/withdrawList",
|
"path": "pages/wallet/withdrawList",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
334
pages/wallet/addBank.vue
Normal file
334
pages/wallet/addBank.vue
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
<template>
|
||||||
|
<view class="WithdrawingCoin">
|
||||||
|
<view class="withdrawing-content">
|
||||||
|
<view class="item-name">{{bank_account_id===''?'添加':'编辑'}}提现银行</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">收款人姓名</view>
|
||||||
|
<input class="input_num" v-model="name" maxlength="16" placeholder="请输入收款人姓名"
|
||||||
|
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">收款人手机号</view>
|
||||||
|
<input class="input_num" v-model="mobile" maxlength="11" placeholder="请输入手机号"
|
||||||
|
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">开户行</view>
|
||||||
|
<u-select v-model="bankShow" value-name='id' :default-value='[0]' label-name='name'
|
||||||
|
@confirm='selectBank' :list="banks" />
|
||||||
|
<view class="input_num" @click="bankShow = true">
|
||||||
|
{{selectBankObj.label?selectBankObj.label:'请选择开户行'}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">收款人账号</view>
|
||||||
|
<input class="input_num" v-model="no" type="number" placeholder="请输入收款人账号"
|
||||||
|
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">支行名称</view>
|
||||||
|
<input class="input_num" v-model="branch_name" maxlength="30" placeholder="省-市-区-支行名称"
|
||||||
|
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn" @click="sureAdd">确认{{bank_account_id===''?'添加':'编辑'}}银行</view>
|
||||||
|
<view class="history" @click="$Router.push({name:'withdrawList'})">提现记录
|
||||||
|
<u-icon name="question-circle-fill" />
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
accountsCreate,
|
||||||
|
withdrawsAccounts,
|
||||||
|
accountsCreateEdit,
|
||||||
|
withdrawsAccountsEdits
|
||||||
|
} from '@/apis/interfaces/withdraws'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
no: '', // 银行卡号
|
||||||
|
name: '', // 用户姓名
|
||||||
|
branch_name: '', // 支行名称
|
||||||
|
mobile: '', // 手机号
|
||||||
|
bank_id: '', // 银行卡id
|
||||||
|
banks: [], // 开户行列表
|
||||||
|
bankShow: false, // 显示开户行列表
|
||||||
|
selectBankObj: {}, // 选择银行
|
||||||
|
bank_account_id:''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
// 有id 是编辑
|
||||||
|
if (e.id) {
|
||||||
|
this.bank_account_id = e.id
|
||||||
|
this.getAccountsCreateEdit()
|
||||||
|
} else {
|
||||||
|
this.getAccountsCreate()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取添加银行前置条件
|
||||||
|
getAccountsCreate() {
|
||||||
|
accountsCreate().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.banks = res.banks
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑前置
|
||||||
|
getAccountsCreateEdit() {
|
||||||
|
accountsCreateEdit(this.bank_account_id).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.banks = res.banks
|
||||||
|
this.no = res.info.no
|
||||||
|
this.name = res.info.name
|
||||||
|
this.mobile = res.info.mobile
|
||||||
|
this.branch_name = res.info.branch_name
|
||||||
|
this.selectBankObj.label = res.info.bank.name
|
||||||
|
this.bank_id = res.info.bank.id
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择银行
|
||||||
|
selectBank(e) {
|
||||||
|
console.log(e[0])
|
||||||
|
this.selectBankObj = e[0]
|
||||||
|
this.bank_id = e[0].value
|
||||||
|
},
|
||||||
|
sureAdd() {
|
||||||
|
let data = {
|
||||||
|
no: this.no, // 银行卡号
|
||||||
|
name: this.name, // 用户姓名
|
||||||
|
branch_name: this.branch_name, // 支行名称
|
||||||
|
mobile: this.mobile, // 手机号
|
||||||
|
bank_id: this.bank_id, // 银行卡id
|
||||||
|
}
|
||||||
|
if (data.name === '') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请核对收款人姓名',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.mobile.length !== 11) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请核对收款人手机号',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.bank_id === '') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请勾选开户行',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.no === '') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请核对收款账号',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.branch_name === '') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请核对省-市-区-支行名称',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.bank_account_id) {
|
||||||
|
data.bank_account_id = this.bank_account_id
|
||||||
|
console.log(data)
|
||||||
|
this.withdrawsAccountsEdits(data)
|
||||||
|
} else {
|
||||||
|
this.withdrawsAccounts(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 添加银行
|
||||||
|
withdrawsAccounts(data) {
|
||||||
|
withdrawsAccounts(data).then(res => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
setTimeout(res => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}, 3000)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑银行卡银行
|
||||||
|
withdrawsAccountsEdits(data) {
|
||||||
|
withdrawsAccountsEdits(data).then(res => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
uni.setStorageSync('refresh',true)
|
||||||
|
setTimeout(res => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}, 3000)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #cacaca;
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.withdrawing-content {
|
||||||
|
min-height: 300rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2);
|
||||||
|
margin: $margin;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: $padding;
|
||||||
|
font-size: $title-size-m;
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
text-align: center;
|
||||||
|
padding: $padding * .6;
|
||||||
|
color: #303030;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: $margin;
|
||||||
|
font-size: $title-size *1.2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
background-color: rgba($color: $text-price, $alpha: .4);
|
||||||
|
width: 200rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -100rpx;
|
||||||
|
bottom: 16rpx;
|
||||||
|
z-index: 1;
|
||||||
|
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
border-bottom: solid 1rpx #f8f8f8;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: $padding 0;
|
||||||
|
|
||||||
|
span:nth-child(1) {
|
||||||
|
color: #666;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 200rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '*';
|
||||||
|
color: red;
|
||||||
|
padding-right: 4rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_num {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #3a3a3a;
|
||||||
|
// font-weight: bolder;
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-total {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: $padding*1 0 0 0;
|
||||||
|
color: #3a3a3a;
|
||||||
|
|
||||||
|
.total {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.money {
|
||||||
|
padding-top: $padding *0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lists {
|
||||||
|
color: $text-price;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: $padding * .9;
|
||||||
|
margin: $margin*3 $margin * 2 $margin $margin*2;
|
||||||
|
font-size: $title-size;
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="WithdrawingCoin">
|
|
||||||
<view class="withdrawing-content">
|
|
||||||
<view class="item-name">添加提现银行</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="title">收款人姓名</view>
|
|
||||||
<input class="input_num" v-model="name" maxlength="16"
|
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
|
|
||||||
placeholder="请输入收款人姓名" />
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="title">收款人账号</view>
|
|
||||||
<input class="input_num" v-model="card" type="number"
|
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
|
|
||||||
placeholder="请输入收款人账号" />
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="title">开户行</view>
|
|
||||||
<input class="input_num" v-model="name" maxlength="30"
|
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
|
|
||||||
placeholder="请输入开户行" />
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="title">支行名称</view>
|
|
||||||
<input class="input_num" v-model="name" maxlength="30"
|
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
|
|
||||||
placeholder="省-市-区-支行名称" />
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="title">收款人手机号</view>
|
|
||||||
<input class="input_num" v-model="name" maxlength="11"
|
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;"
|
|
||||||
placeholder="请输入手机号" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="btn" @click="sureAdd">确认添加银行</view>
|
|
||||||
<view class="history" @click="$Router.push({name:'withdrawList'})">提现记录<u-icon name="question-circle-fill" /></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
card: '', // 银行卡号
|
|
||||||
name: '', // 姓名
|
|
||||||
withdraw_input: '' // 提现能量球数量
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad() {},
|
|
||||||
methods: {
|
|
||||||
sureAdd() {
|
|
||||||
uni.navigateBack({})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 100vh;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: #cacaca;
|
|
||||||
.u-icon{
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.withdrawing-content {
|
|
||||||
min-height: 300rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2);
|
|
||||||
margin: $margin;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
padding: $padding;
|
|
||||||
font-size: $title-size-m;
|
|
||||||
|
|
||||||
.item-name {
|
|
||||||
text-align: center;
|
|
||||||
padding: $padding * .6;
|
|
||||||
color: #303030;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: $margin;
|
|
||||||
font-size: $title-size *1.2;
|
|
||||||
position: relative;
|
|
||||||
&::after{
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
background-color: rgba($color: $text-price, $alpha: .4);
|
|
||||||
width: 200rpx;
|
|
||||||
height: 10rpx;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -100rpx;
|
|
||||||
bottom: 16rpx;
|
|
||||||
z-index: 1;
|
|
||||||
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
border-bottom: solid 1rpx #f8f8f8;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: $padding 0;
|
|
||||||
|
|
||||||
span:nth-child(1) {
|
|
||||||
color: #666;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
width: 200rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
&::before{
|
|
||||||
content: '*';
|
|
||||||
color: red;
|
|
||||||
padding-right: 4rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input_num {
|
|
||||||
font-size: $title-size*1;
|
|
||||||
color: #3a3a3a;
|
|
||||||
font-weight: bolder;
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-total {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: $padding*1 0 0 0;
|
|
||||||
color: #3a3a3a;
|
|
||||||
|
|
||||||
.total {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.money {
|
|
||||||
padding-top: $padding *0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.lists {
|
|
||||||
color: $text-price;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: $padding * .9;
|
|
||||||
margin:$margin*3 $margin * 2 $margin $margin*2;
|
|
||||||
font-size: $title-size;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: 2rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
221
pages/wallet/bankList.vue
Normal file
221
pages/wallet/bankList.vue
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<view class="selectCard">
|
||||||
|
<view class="bankInfo" v-for="(item,index) in lists" :key='index'
|
||||||
|
@longpress='delBank(item.bank_account_id,index)'>
|
||||||
|
<image class="bankLogin" @click="selectBank(item)" :src="item.bank.cover" mode="widthFix" />
|
||||||
|
<view class="right" @click="selectBank(item)">
|
||||||
|
<view class="left">
|
||||||
|
<view class="title">{{item.bank.name}}
|
||||||
|
<view class="tags">快捷支付</view>
|
||||||
|
</view>
|
||||||
|
<view class="des">储值卡</view>
|
||||||
|
<view class="no">{{item.no}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-icon name="edit-pen-fill" @click='editBank(item.bank_account_id)' color="rgba(255,255,255,0.6)"
|
||||||
|
size='60' />
|
||||||
|
</view>
|
||||||
|
<!-- <u-toast ref="uToast" /> -->
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
withdrawsAccountsList,
|
||||||
|
withdrawsAccountsDelete
|
||||||
|
} from '@/apis/interfaces/withdraws'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
lists: [],
|
||||||
|
page: 1,
|
||||||
|
has_more: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.withdrawsAccountsList()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
if (uni.getStorageSync('refresh')) {
|
||||||
|
this.lists = []
|
||||||
|
this.page = 1
|
||||||
|
this.has_more = true
|
||||||
|
this.withdrawsAccountsList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.has_more) {
|
||||||
|
this.page = this.page + 1
|
||||||
|
this.withdrawsAccountsList()
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '哎呦,没有更多了~',
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 添加银行
|
||||||
|
withdrawsAccountsList() {
|
||||||
|
let data = {
|
||||||
|
page: this.page
|
||||||
|
}
|
||||||
|
withdrawsAccountsList(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.lists = this.lists.concat(res.data)
|
||||||
|
this.has_more = res.page.has_more
|
||||||
|
uni.setStorageSync('refresh', false)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 跳转到编辑银行卡的页面
|
||||||
|
editBank(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/wallet/addBank?id=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除银行
|
||||||
|
delBank(id, index) {
|
||||||
|
let that = this
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '是否确认删除该银行',
|
||||||
|
cancelColor: '#cacaca',
|
||||||
|
cancelText: '我再想想',
|
||||||
|
confirmColor: '#7C52FC',
|
||||||
|
confirmText: '确认删除',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
withdrawsAccountsDelete(id).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
that.lists.splice(index, 1)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择银行返回上一页携带参数
|
||||||
|
selectBank(item) {
|
||||||
|
let bankInfo = {
|
||||||
|
name: item.bank.name + '-' + item.no.substring(item.no.length - 4),
|
||||||
|
bank_account_id: item.bank_account_id
|
||||||
|
}
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
let prevPage = pages[pages.length - 2]
|
||||||
|
console.log(bankInfo)
|
||||||
|
prevPage._data.bankInfo = bankInfo
|
||||||
|
uni.navigateBack() //返回上一页面
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.selectCard {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-bottom: 80rpx;
|
||||||
|
|
||||||
|
.bankInfo {
|
||||||
|
width: calc(100% - 60rpx);
|
||||||
|
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||||
|
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
|
||||||
|
margin: 20rpx 30rpx 0 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
padding: 40rpx 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
.bankLogin {
|
||||||
|
width: 80rpx;
|
||||||
|
opacity: .9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: rgba($color: #fff, $alpha: .9);
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
position: absolute;
|
||||||
|
background-color: pink;
|
||||||
|
z-index: 100;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
color: $text-price;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
padding: 4rpx 14rpx;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
color: #7C52FC;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background: rgba($color: #fff, $alpha: .8);
|
||||||
|
z-index: -1;
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
transform: skewX(-10deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.des {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
|
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
|
||||||
<view class="propery-content">
|
<view class="propery-content">
|
||||||
<view class="currency">能量球钱包
|
<view class="currency">能量球钱包
|
||||||
<!-- <span>(≈ {{ price || '0.00' }} CNY)</span> -->
|
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="balance">{{ balance.balance || '0.00' }}</view>
|
<view class="balance">{{ balance || '0.00' }}</view>
|
||||||
<view class="frozen" @click="withdrawDetail">提现记录</view>
|
<view class="frozen" @click="withdrawDetail">提现记录</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -14,98 +14,59 @@
|
|||||||
<view class="item-name">
|
<view class="item-name">
|
||||||
提现至银行卡
|
提现至银行卡
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="cardName" @click="addCard">添加银行卡</view>
|
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
|
||||||
<uni-icons type="arrowright" size="12" color="#fff" />
|
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="item-name">
|
|
||||||
选择银行卡
|
|
||||||
<view class="right">
|
|
||||||
<view class="cardName" @click="selectCard">选择银行卡</view>
|
|
||||||
<uni-icons type="arrowright" size="12" color="#fff" />
|
<uni-icons type="arrowright" size="12" color="#fff" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="withdrawing-content">
|
<view class="withdrawing-content">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view style="flex: 1;">
|
<view style="flex: 1;">
|
||||||
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
|
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:40rpx;"
|
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="提现数量" />
|
||||||
placeholder="能量球数量" />
|
|
||||||
<view v-if="total">≈ ¥{{total}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="all" @click="all">全部提现</view>
|
<view class="all" @click="all">全部提现</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="open">提现至银行卡</view>
|
<view class="total" v-if="total">≈ ¥{{total}} </view>
|
||||||
<view class="des">预计5- 10个工作日到账</view>
|
<view class="btn" @click="actions">提现至银行卡</view>
|
||||||
|
<view class="des">预计5- 10个工作日到账 手续费: {{tax}}%</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
withdraw,
|
withdrawsIndexCreate,
|
||||||
withdrawLogs,
|
withdrawsIndex
|
||||||
withdrawDo
|
} from '@/apis/interfaces/withdraws';
|
||||||
} from '@/apis/interfaces/wallet.js';
|
|
||||||
import numberJpan from "@/components/numberJpan/numberJpan.vue";
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
balance: 0, // 钱包能量球数量
|
balance: 0, // 钱包能量球数量
|
||||||
price: 0, // 当前能量球价格
|
tax: 0, // 当前手续费
|
||||||
|
cost:1,// 每个能量球的价格
|
||||||
|
total:0,// 约合人民币
|
||||||
card: '', // 银行卡号
|
card: '', // 银行卡号
|
||||||
name: '', // 姓名
|
|
||||||
password: '', //
|
|
||||||
withdraw_input: '', // 提现能量球数量
|
withdraw_input: '', // 提现能量球数量
|
||||||
total: '', // 提现能量球转化成的钱数
|
bank_accounts: 0,
|
||||||
page: 1,
|
bankInfo:{}
|
||||||
has_more: true,
|
|
||||||
withdrawLists: [],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
'number-jpan': numberJpan
|
|
||||||
},
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.reset()
|
this.getInfo()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.withdrawLists.length > 0) {
|
|
||||||
if (this.has_more) {
|
|
||||||
this.withdrawLogs()
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '没有更多~',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 提现基本信息
|
// 提现基本信息
|
||||||
withdraw() {
|
getInfo() {
|
||||||
withdraw().then(res => {
|
withdrawsIndexCreate().then(res => {
|
||||||
this.balance = Number(res.balance)
|
this.balance = res.balance
|
||||||
this.price = Number(res.price)
|
this.tax = res.tax
|
||||||
}).catch(err => {
|
this.cost = res.cost
|
||||||
uni.showToast({
|
this.bank_accounts = res.bank_accounts.length
|
||||||
title: err.message,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 提现记录
|
|
||||||
withdrawLogs() {
|
|
||||||
withdrawLogs({
|
|
||||||
page: this.page
|
|
||||||
}).then(res => {
|
|
||||||
this.withdrawLists = this.withdrawLists.concat(res.data)
|
|
||||||
if (res.page.has_more) {
|
|
||||||
this.page = this.page + 1
|
|
||||||
this.has_more = true
|
|
||||||
} else {
|
|
||||||
this.has_more = false
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -117,7 +78,7 @@
|
|||||||
inputNum(e) {
|
inputNum(e) {
|
||||||
let number = Number(e.detail.value)
|
let number = Number(e.detail.value)
|
||||||
if (number <= this.balance) {
|
if (number <= this.balance) {
|
||||||
this.total = Number(e.detail.value) * this.price
|
this.total = Number(e.detail.value) * this.cost
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '最大值能超过' + this.balance + '',
|
title: '最大值能超过' + this.balance + '',
|
||||||
@@ -133,7 +94,7 @@
|
|||||||
all() {
|
all() {
|
||||||
if (this.balance > 0) {
|
if (this.balance > 0) {
|
||||||
this.withdraw_input = this.balance
|
this.withdraw_input = this.balance
|
||||||
this.total = this.balance * this.price
|
this.total = this.balance * this.cost
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '啥也没有,我也做不到~',
|
title: '啥也没有,我也做不到~',
|
||||||
@@ -142,84 +103,63 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 打开密码 出发提现功能
|
// 提现
|
||||||
open() {
|
actions(){
|
||||||
if (this.total > 0) {
|
let data = {
|
||||||
let params = {
|
bank_account_id:this.bankInfo.bank_account_id,
|
||||||
name: this.name,
|
amount:Number(this.withdraw_input)
|
||||||
card: this.card,
|
|
||||||
total: this.withdraw_input
|
|
||||||
}
|
|
||||||
if (params.name === '' || params.card === '' || params.total === 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '重新确认提现信息',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$refs.numberPad.open()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '啥也没有,我也做不到~',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
if(data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === ''){
|
||||||
// 输入密码成功后,,,
|
uni.showToast({
|
||||||
closeChange(e) {
|
title:this.bank_accounts>0?'请选择银行卡':'请添加银行卡',
|
||||||
uni.showLoading({
|
icon:'none'
|
||||||
title: '提现中~'
|
})
|
||||||
})
|
return;
|
||||||
let params = {
|
|
||||||
name: this.name,
|
|
||||||
card: this.card,
|
|
||||||
total: this.withdraw_input,
|
|
||||||
code: e
|
|
||||||
}
|
}
|
||||||
withdrawDo(params).then(res => {
|
uni.showModal({
|
||||||
uni.showToast({
|
title:'温馨提示',
|
||||||
title: '申请提现成功,耐心等待打款',
|
content:'您是否确认提现,将会扣除' +this.tax+'%手续费' ,
|
||||||
icon: 'none',
|
confirmColor:'#7c52fc',
|
||||||
duration: 2000
|
cancelColor:'#cacaca',
|
||||||
})
|
cancelText:'我再想想',
|
||||||
this.reset()
|
confirmText:'确认提现',
|
||||||
}).catch(err => {
|
success: (res) => {
|
||||||
uni.showToast({
|
if(res.confirm){
|
||||||
title: err.message,
|
withdrawsIndex(data).then(res=>{
|
||||||
icon: 'none',
|
uni.showToast({
|
||||||
duration: 2000
|
title:res.message,
|
||||||
})
|
icon:'none'
|
||||||
|
})
|
||||||
|
this.withdraw_input = ''
|
||||||
|
this.total = ''
|
||||||
|
this.getInfo()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.name = ''
|
|
||||||
this.card = ''
|
|
||||||
this.page = 1
|
|
||||||
this.has_more = true
|
|
||||||
this.withdraw_input = ''
|
|
||||||
this.total = 0
|
|
||||||
this.withdrawLists = []
|
|
||||||
this.withdrawLogs();
|
|
||||||
this.withdraw();
|
|
||||||
},
|
},
|
||||||
// 添加银行卡
|
// 添加银行卡
|
||||||
addCard() {
|
addBanks() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/wallet/addCard'
|
url: '/pages/wallet/addBank'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择银行卡
|
// 选择银行卡
|
||||||
selectCard(){
|
bankLists() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/wallet/selectCard'
|
url: '/pages/wallet/bankList'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提现记录
|
// 提现记录
|
||||||
withdrawDetail(){
|
withdrawDetail() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/wallet/withdrawList'
|
url: '/pages/wallet/withdrawList'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,12 +172,14 @@
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.receiptCode {
|
.receiptCode {
|
||||||
color: #808080;
|
color: #808080;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
// margin: $margin 0;
|
// margin: $margin 0;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
}
|
}
|
||||||
|
|
||||||
.WithdrawingCoin {
|
.WithdrawingCoin {
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -262,6 +204,7 @@
|
|||||||
opacity: .5;
|
opacity: .5;
|
||||||
transform: rotate(-7deg);
|
transform: rotate(-7deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.propery-content {
|
.propery-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -292,11 +235,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.all {
|
.all {
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-name {
|
.item-name {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #303030;
|
color: #303030;
|
||||||
@@ -326,6 +271,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.withdrawing-content {
|
.withdrawing-content {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: $padding $padding $padding $padding * 2;
|
padding: $padding $padding $padding $padding * 2;
|
||||||
@@ -390,6 +336,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -400,9 +347,17 @@
|
|||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.des{
|
|
||||||
|
.des {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #cacaca;
|
color: #cacaca;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
color: $mian-color;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-left: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="selectCard">
|
|
||||||
<view class="bankInfo">
|
|
||||||
<image class="bankLogin" src="/static/imgs/bankLogo.png" mode="widthFix" />
|
|
||||||
<view class="right">
|
|
||||||
<view class="left">
|
|
||||||
<view class="title">浦发银行 <view class="tags">快捷支付</view>
|
|
||||||
</view>
|
|
||||||
<view class="des">储值卡</view>
|
|
||||||
<view class="no">622 8480530 382837819</view>
|
|
||||||
</view>
|
|
||||||
<u-icon name="calendar" color="rgba(255,255,255,0.6)" size='60' />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <u-toast ref="uToast" /> -->
|
|
||||||
<u-toast ref="uToast" />
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
chaineb
|
|
||||||
} from '@/apis/interfaces/mine';
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.selectCard {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 100vh;
|
|
||||||
padding-top: 30rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
|
|
||||||
.bankInfo {
|
|
||||||
width: calc(100% - 60rpx);
|
|
||||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
|
||||||
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
|
|
||||||
margin: 0 30rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
padding:40rpx 30rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
.bankLogin {
|
|
||||||
width: 80rpx;
|
|
||||||
opacity: .9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: rgba($color: #fff, $alpha: .9);
|
|
||||||
|
|
||||||
.left {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 38rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
|
|
||||||
.tags {
|
|
||||||
color: $text-price;
|
|
||||||
font-size: 24rpx;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
padding: 4rpx 14rpx;
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
color: #7C52FC;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
background: rgba($color: #fff, $alpha: .8);
|
|
||||||
z-index: -1;
|
|
||||||
position: absolute;
|
|
||||||
content: '';
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
transform: skewX(-10deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.des {
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 14rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -30,16 +30,23 @@
|
|||||||
<!-- 列表。。。 -->
|
<!-- 列表。。。 -->
|
||||||
<view class="ew_lists" v-if="lists.length>0">
|
<view class="ew_lists" v-if="lists.length>0">
|
||||||
<view style="padding-top: 30rpx;" v-for="(item,index) in lists " :key="index">
|
<view style="padding-top: 30rpx;" v-for="(item,index) in lists " :key="index">
|
||||||
<!-- <view class="receiptCode">回执单号:hash392J3K,390-9DKDKDIOKLK</view> -->
|
<view class="receiptCode">
|
||||||
|
<image class="logo" src="/static/imgs/record-icon.png" mode="widthFix" />
|
||||||
|
<view class="title">{{item.way}}</view>
|
||||||
|
<span class='status'> {{item.status.status_text}}</span>
|
||||||
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<span>能量球:150</span>
|
<span>
|
||||||
<span>金额≈¥300</span>
|
能量球:{{item.quantity}}
|
||||||
</view>
|
<span class='left-des'>金额≈¥{{item.take}} 手续费:{{item.tax}}</span>
|
||||||
<view class="right">
|
</span>
|
||||||
<span> {{item.created_at}} 提现</span>
|
<span>{{item.create_at}}</span>
|
||||||
<span> {{item.paid_at || index === 0 ? '2021-11-11 11:11:11到账':'努力打款中'}}</span>
|
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="right">
|
||||||
|
<span> {{item.create_at}}</span>
|
||||||
|
<span> -</span>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -53,16 +60,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
chaineb
|
withdrawsIndexLists
|
||||||
} from '@/apis/interfaces/mine';
|
} from '@/apis/interfaces/withdraws';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lists: [1, 1.1, 1, 1],
|
lists: [],
|
||||||
has_next_page: true,
|
has_next_page: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
type: 'year', // 统计类型day日,month月,year年
|
type: 'year', // 统计类型day日,month月,year年
|
||||||
cointype: 'in', // in 收入 out 支出
|
|
||||||
date: new Date().toISOString().slice(0, 4), // 日:Y-m-d,月Y-m,年Y
|
date: new Date().toISOString().slice(0, 4), // 日:Y-m-d,月Y-m,年Y
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
@@ -98,12 +104,12 @@
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
date: this.date,
|
date: this.date,
|
||||||
cointype: this.cointype
|
|
||||||
}
|
}
|
||||||
chaineb(data).then(res => {
|
withdrawsIndexLists(data).then(res => {
|
||||||
this.account = res.account
|
console.log(res)
|
||||||
this.lists = this.lists.concat(res.lists)
|
this.account = res.all
|
||||||
this.has_next_page = res.has_next_page
|
this.lists = this.lists.concat(res.lists.data)
|
||||||
|
this.has_next_page = res.lists.page.has_more
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
@@ -153,8 +159,8 @@
|
|||||||
this.type = type
|
this.type = type
|
||||||
this.params = {
|
this.params = {
|
||||||
year: true,
|
year: true,
|
||||||
month: false,
|
month: true,
|
||||||
day: false
|
day: true
|
||||||
}
|
}
|
||||||
this.date = this.currentDay
|
this.date = this.currentDay
|
||||||
this.reset()
|
this.reset()
|
||||||
@@ -335,7 +341,7 @@
|
|||||||
|
|
||||||
.record-money {
|
.record-money {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 60rpx;
|
font-size: 70rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@@ -359,7 +365,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: solid 1rpx #f8f8f8;
|
border-bottom: solid 1rpx #f8f8f8;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 0 $padding*0.8 0;
|
padding: 0 0 $padding*0.8 50rpx;
|
||||||
|
|
||||||
.left,
|
.left,
|
||||||
.right {
|
.right {
|
||||||
@@ -368,18 +374,22 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
font-size: $title-size-m;
|
font-size: 30rpx;
|
||||||
// font-weight: 600;
|
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
color: #808080;
|
color: $text-price;
|
||||||
|
.left-des{
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
span:nth-child(2) {
|
span:nth-child(2) {
|
||||||
color: #824F9A;
|
color: #C0C0C0;
|
||||||
font-size: $title-size-m;
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
font-size: 26rpx;
|
||||||
padding-top: $padding *0.5;
|
padding-top: $padding *0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -387,12 +397,34 @@
|
|||||||
.right {
|
.right {
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
color: #666;
|
color: #999;
|
||||||
|
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
padding-bottom: $padding*0.5;
|
padding-bottom: $padding*0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.receiptCode {
|
||||||
|
font-size: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 40rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user