征信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhengxinApplets/pages/user/withdrawal.vue

249 lines
5.4 KiB

3 months ago
<template>
<view class="site">
<view class="site-bd">
<view class="item">
<view class="a">提现至</view>
<view class="b">
<image src="@/static/icon-card.png"></image>
银行卡
</view>
</view>
</view>
<view class="site-bd">
<view class="item">
<view class="a">持卡人</view>
<view class="b">
<input v-model="userInfo.username" type="text" placeholder="请输入持卡人姓名" />
</view>
</view>
<view class="item">
<view class="a">卡号</view>
<view class="b">
<input v-model="userInfo.username" type="text" placeholder="请填写卡号" />
</view>
</view>
<view class="item">
<view class="a">支行信息</view>
<view class="b">
<input v-model="userInfo.username" type="text" placeholder="请输入支行信息" />
</view>
</view>
<view class="item">
<view class="a">提现</view>
<view class="b">
<input v-model="userInfo.username" type="text" placeholder="最低提现金额0" />
</view>
</view>
<view class="items">
当前可提现金额<text>0</text>
</view>
</view>
<view class="site-bd">
<view class="title">提现说明</view>
<view class="desc">
<text>1单次最低提现100元最高提现1000元\n2每日最多可提现次数不限每日最多提现金额()不限\n3每笔收取提现手续 3%\n4提现结果请查收对应渠道服务通知\n5如有疑问请及时联系客服</text>
</view>
</view>
<view class="btn">提现</view>
<view class="history" @click="openPage()">提现记录</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {}
};
},
onShow() {
this.userInfo = uni.getStorageSync("userInfo")
},
methods: {
openPage() {
uni.navigateTo({
url: "/pages/user/verificationList"
})
},
async toSubmit() {
if (!this.userInfo.username) {
uni.showToast({
title: '请输入用户名',
icon: 'none',
})
return
}
if (!this.userInfo.mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
})
return
}
if (!/^1[3456789]\d{9}$/.test(this.userInfo.mobile)) {
uni.showToast({
title: '请输入正确手机号',
icon: 'none',
})
return
}
const { code, data, message } = await this.$api.editMember({
avatar: this.userInfo.avatar,
username: this.userInfo.username,
mobile: this.userInfo.mobile,
wx_qr_code: "",
alipay_account: "",
wx_account: "",
});
if(code == 200){
uni.showToast({
title: "提交成功"
})
setTimeout(()=>{
uni.navigateBack({
delta: 1
})
},1000)
}
},
//上传图片
uploadImg() {
const that = this
uni.chooseImage({
count: 1,
sizeType: ["original"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"],
success: (res) => {
console.log(res.tempFilePaths[0])
uni.uploadFile({
name: 'file',
header: {
userToken: uni.getStorageSync('token')
},
url: this.$baseUrl+'api/user/upload',
filePath: res.tempFilePaths[0],
success: (upRes) => {
let end = JSON.parse(upRes.data)
that.userInfo.avatar = end.data.path
that.userInfo.avatar1 = end.data.url
},
fail: (err) => {
console.log("toUpload err",err)
console.log(err)
}
});
},
fail(err){
console.log("fail",err)
}
});
},
}
}
</script>
<style lang="scss" scoped>
.site{
padding: 0 25rpx 25rpx;
overflow: hidden;
.btn{
width: 702rpx;
line-height: 90rpx;
background: #00C6A9;
box-shadow: 0px 3rpx 10rpx 0px rgba(9,44,39,0.05);
border-radius: 90rpx;
text-align: center;
font-weight: 500;
font-size: 30rpx;
color: #FFFFFF;
margin: 0 auto;
margin-top: 120rpx;
}
.history{
text-align: center;
font-weight: 500;
font-size: 30rpx;
margin-top: 40rpx;
color: #00C6A9;
}
&-bd{
width: 100%;
background: #FFFFFF;
box-shadow: 0px 3rpx 10rpx 0px rgba(9,44,39,0.05);
border-radius: 20rpx;
margin: 0 auto;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
margin-top: 20rpx;
.title{
padding: 35rpx 0;
font-weight: 400;
font-size: 30rpx;
color: #09090B;
}
.desc{
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 42rpx;
padding-bottom: 30rpx;
}
.items{
display: flex;
align-items: center;
border-top: 1px solid #EAEAEA;
padding: 35rpx 0;
overflow: hidden;
position: relative;
font-weight: 500;
font-size: 30rpx;
color: #999999;
text{
color: #D80C0C;
}
}
.item{
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1px solid #EAEAEA;
padding: 35rpx 0;
overflow: hidden;
position: relative;
&:first-child{
border-color: #FFFFFF;
}
.a{
width: 160rpx;
display: flex;
align-items: center;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.b{
flex: 1;
display: flex;
align-items: center;
font-weight: 500;
font-size: 30rpx;
color: #333333;
input{
flex: 1;
font-weight: 500;
font-size: 30rpx;
color: #999999;
}
image{
width: 42rpx;
height: 28rpx;
margin-right: 20rpx;
}
}
}
}
}
</style>