smartmeter-app/page_user/bdAlipay.vue

185 lines
3.8 KiB
Vue
Raw Normal View History

2024-03-13 10:54:22 +08:00
<template>
<view>
2024-04-27 17:20:50 +08:00
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
2024-03-13 10:54:22 +08:00
height='36'></u-navbar>
2024-04-27 17:20:50 +08:00
<view class="cont" v-if="stause">
2024-03-13 10:54:22 +08:00
2024-04-27 17:20:50 +08:00
<view class="tip">注意绑定账号需为本人账号发生绑定错误可能会出现转账错误的情况</view>
2024-03-13 10:54:22 +08:00
<view class="input_box">
2024-04-27 17:20:50 +08:00
<view class="text">真实姓名</view>
2024-03-13 10:54:22 +08:00
<view class="ipt">
<u-input v-model="name" placeholder='请输入持卡人姓名' placeholder-style='font-size: 24rpx;'/>
</view>
</view>
<view class="input_box">
<view class="text">身份证号码</view>
<view class="ipt">
<u-input v-model="idnum" placeholder='请输入身份证号码' placeholder-style='font-size: 24rpx;'/>
</view>
</view>
<view class="input_box">
2024-04-27 17:20:50 +08:00
<view class="text" >支付宝账号</view>
2024-03-13 10:54:22 +08:00
<view class="ipt">
2024-04-27 17:20:50 +08:00
<u-input v-model="cardnum" placeholder='请输入支付宝账号' placeholder-style='font-size: 24rpx;'/>
2024-03-13 10:54:22 +08:00
</view>
</view>
2024-04-27 17:20:50 +08:00
<!-- <view class="input_box">
2024-03-13 10:54:22 +08:00
<view class="text" style="margin-right: 150rpx;">验证码</view>
<view class="ipt" style="width: 170rpx;">
<u-input v-model="name" placeholder='请输入验证码' placeholder-style='font-size: 20rpx;color: red;'/>
</view>
<view class="yzmbtn">
获取验证码
</view>
2024-04-27 17:20:50 +08:00
</view> -->
<view class="btn" @click="band()">
确认绑定
2024-03-13 10:54:22 +08:00
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#F7FAFE",
},
name:'',
idnum:'',
2024-04-27 17:20:50 +08:00
cardnum:'',
tit:'test',
stause:false,
2024-03-13 10:54:22 +08:00
}
},
2024-04-27 17:20:50 +08:00
onLoad() {
this.getstause()
},
2024-03-13 10:54:22 +08:00
methods: {
tobd(){
uni.navigateTo({
url:''
})
2024-04-27 17:20:50 +08:00
},
getstause(){
this.$u.get('/app/config/wa' ).then((res) => {
if (res.code == 200) {
console.log(res)
this.stause=res.data
if(this.stause==true){
this.tit='支付宝账号绑定'
}
}
})
},
band(){
let data ={
accountType:3,
name:this.name,
idCard:this.idnum,
accountNo:this.cardnum
}
this.$u.post('/app/account',data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
uni.navigateBack({
delta: 1 // 返回上级页面
});
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
2024-03-13 10:54:22 +08:00
}
2024-04-27 17:20:50 +08:00
2024-03-13 10:54:22 +08:00
}
}
</script>
<style lang="scss" >
page{
background: #F7FAFE;
}
.cont{
display: flex;
// justify-content: center;
flex-wrap: wrap;
margin: 0 auto;
width: 594rpx;
.tip{
margin-top: 62rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 24rpx;
color: #FF8D1A;
line-height: 36rpx;
}
.input_box{
margin-top: 66rpx;
width: 594rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.text{
2024-04-27 17:20:50 +08:00
width: 30%;
// margin-right: 102rpx;
2024-03-13 10:54:22 +08:00
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 24rpx;
color: #262B37;
}
.ipt{
2024-04-27 17:20:50 +08:00
width: 70%;
2024-03-13 10:54:22 +08:00
.u-input::placeholder {
font-size: 20px;
color: red;
}
}
.yzmbtn{
margin-left: 50rpx;
display: flex;
align-items: center;
justify-content: center;
width: 150rpx;
height: 50rpx;
background: #8EA9E4;
border-radius: 10rpx 10rpx 10rpx 10rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 20rpx;
color: #FFFFFF;
}
}
.btn{
display: flex;
align-items: center;
justify-content: center;
margin-top: 218rpx;
width: 590rpx;
height: 84rpx;
background: #2A82E4;
border-radius: 40rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
}
}
</style>