后台服务对接
This commit is contained in:
parent
8afda7d17c
commit
8e12de58b1
|
|
@ -245,5 +245,13 @@ export default {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
|
},
|
||||||
|
async bindBankCard(params) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/customer/bankcard/bind',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,17 +25,21 @@
|
||||||
<view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
<view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
||||||
<view>
|
<view>
|
||||||
<view class="margin-bottom-sm">开户人姓名</view>
|
<view class="margin-bottom-sm">开户人姓名</view>
|
||||||
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
<input type="text" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top">
|
<view class="margin-top">
|
||||||
<view class="margin-bottom-sm">银行名称</view>
|
<view class="margin-bottom-sm">身份证号</view>
|
||||||
<input type="digit" placeholder="请输入银行名称" placeholder-style="color:#989898" v-model="formData.bankName">
|
<input type="text" placeholder="请输入身份证号" placeholder-style="color:#989898" v-model="formData.certId">
|
||||||
|
</view>
|
||||||
|
<view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">手机号</view>
|
||||||
|
<input type="text" placeholder="请输入手机号" placeholder-style="color:#989898" v-model="formData.phone">
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top">
|
<view class="margin-top">
|
||||||
<view class="margin-bottom-sm">银行卡号</view>
|
<view class="margin-bottom-sm">银行卡号</view>
|
||||||
<input type="digit" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankCardNum">
|
<input type="text" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankNum">
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top">
|
<!-- <view class="margin-top">
|
||||||
<view class="margin-bottom-sm">银行卡号开户城市</view>
|
<view class="margin-bottom-sm">银行卡号开户城市</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="provinceList"
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="provinceList"
|
||||||
|
|
@ -44,7 +48,7 @@
|
||||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="cityList"
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="cityList"
|
||||||
:showField="'areaName'" placeholder="选择城市" v-model="formData.cityObj"></my-uni-combox>
|
:showField="'areaName'" placeholder="选择城市" v-model="formData.cityObj"></my-uni-combox>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
|
|
@ -69,7 +73,8 @@
|
||||||
formData: {
|
formData: {
|
||||||
provinceObj: {},
|
provinceObj: {},
|
||||||
cityObj: {}
|
cityObj: {}
|
||||||
}
|
},
|
||||||
|
curUserInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -77,8 +82,9 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
let res = await this.$request.areaListByStep();
|
// let res = await this.$request.areaListByStep();
|
||||||
this.provinceList = res.data;
|
// this.provinceList = res.data;
|
||||||
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
},
|
},
|
||||||
async chooseRegion(e) {
|
async chooseRegion(e) {
|
||||||
let res = await this.$request.areaListByStep({
|
let res = await this.$request.areaListByStep({
|
||||||
|
|
@ -90,8 +96,19 @@
|
||||||
changAccountType(e) {
|
changAccountType(e) {
|
||||||
this.curAccountType = e.currentTarget.dataset.type;
|
this.curAccountType = e.currentTarget.dataset.type;
|
||||||
},
|
},
|
||||||
submit() {
|
async submit() {
|
||||||
console.log(this.formData)
|
if (this.curAccountType === '1') {
|
||||||
|
let params = {
|
||||||
|
...this.formData,
|
||||||
|
customerId: this.curUserInfo.workerId
|
||||||
|
}
|
||||||
|
let res = await this.$request.bindBankCard(params);
|
||||||
|
if (res.code === 0) {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: -1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue