107 lines
3.5 KiB
Vue
107 lines
3.5 KiB
Vue
<template>
|
|
<view>
|
|
<!-- 顶部操作条 -->
|
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
|
<block slot="backText">返回</block>
|
|
<block slot="content">帐号绑定/修改</block>
|
|
</cu-custom>
|
|
<view class="margin-lr-sm margin-tb-lg shadow-warp">
|
|
<view class="bg-gray flex justify-start align-center text-xl padding-lr padding-top-xs">
|
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '0' ? 'curTab' : ''" data-type="0" @click="changAccountType">支付宝</view>
|
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '1' ? 'curTab' : ''" data-type="1" @click="changAccountType">银行卡</view>
|
|
</view>
|
|
<!-- 支付宝 -->
|
|
<view v-if="curAccountType == '0'" class="bg-white padding text-lg">
|
|
<view>
|
|
<view class="margin-bottom-sm">开户人姓名</view>
|
|
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
|
</view>
|
|
<view class="margin-top">
|
|
<view class="margin-bottom-sm">支付宝账户</view>
|
|
<input type="digit" placeholder="请输入支付宝账户" placeholder-style="color:#989898" v-model="formData.account">
|
|
</view>
|
|
</view>
|
|
<!-- 银行卡 -->
|
|
<view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
|
<view>
|
|
<view class="margin-bottom-sm">开户人姓名</view>
|
|
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
|
</view>
|
|
<view class="margin-top">
|
|
<view class="margin-bottom-sm">银行名称</view>
|
|
<input type="digit" placeholder="请输入银行名称" placeholder-style="color:#989898" v-model="formData.bankName">
|
|
</view>
|
|
<view class="margin-top">
|
|
<view class="margin-bottom-sm">银行卡号</view>
|
|
<input type="digit" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankCardNum">
|
|
</view>
|
|
<view class="margin-top">
|
|
<view class="margin-bottom-sm">银行卡号开户城市</view>
|
|
<view class="flex">
|
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="provinceList"
|
|
:showField="'areaName'" placeholder="选择省份" v-model="formData.provinceObj"
|
|
@input="chooseRegion($event)"></my-uni-combox>
|
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="cityList"
|
|
:showField="'areaName'" placeholder="选择城市" v-model="formData.cityObj"></my-uni-combox>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 操作按钮 -->
|
|
<view class="cu-bar tabbar border shop">
|
|
<button class="bg-main-color long-btn margin-lr" @click="submit">提交</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
|
|
|
export default {
|
|
components: {
|
|
myUniCombox
|
|
},
|
|
data() {
|
|
return {
|
|
curAccountType: '0',
|
|
provinceList: [],
|
|
cityList: [],
|
|
formData: {
|
|
provinceObj: {},
|
|
cityObj: {}
|
|
}
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.loadData();
|
|
},
|
|
methods: {
|
|
async loadData() {
|
|
let res = await this.$request.areaListByStep();
|
|
this.provinceList = res.data;
|
|
},
|
|
async chooseRegion(e) {
|
|
let res = await this.$request.areaListByStep({
|
|
parentCode: e.areaCode
|
|
});
|
|
this.cityList = res.data;
|
|
this.formData.cityObj = {}
|
|
},
|
|
changAccountType(e) {
|
|
this.curAccountType = e.currentTarget.dataset.type;
|
|
},
|
|
submit() {
|
|
console.log(this.formData)
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.curTab {
|
|
background-color: #ffffff;
|
|
color: #0081ff;
|
|
border-radius: 15rpx 15rpx 0 0;
|
|
}
|
|
</style>
|