完善商家入驻逻辑,保存提交数据
This commit is contained in:
parent
a3443ff129
commit
6b229b8639
@ -3,7 +3,7 @@
|
||||
<view class="auditStatusContainer" v-if="itemObj.status == 1">
|
||||
<view class="header">
|
||||
<view class="statusIcon">
|
||||
<image src="http://localhost:8080//enter_audit1.png" mode="aspectFill" class="auditStatus" />
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill" class="auditStatus" />
|
||||
</view>
|
||||
<view class="title">
|
||||
审核中
|
||||
@ -58,7 +58,7 @@
|
||||
<view class="auditStatusContainer" v-if="itemObj.status == 3">
|
||||
<view class="header">
|
||||
<view class="statusIcon">
|
||||
<image src="http://localhost:8080//enter_audit2.png" mode="aspectFill" class="auditStatus" />
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit2.png" mode="aspectFill" class="auditStatus" />
|
||||
</view>
|
||||
<view class="title">
|
||||
审核失败
|
||||
@ -85,7 +85,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<button class="btn" @click="resubmit">重新提交</button>
|
||||
<button class="btn" @click="resubmit">修改并重新提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -167,10 +167,44 @@ export default {
|
||||
show3: false,
|
||||
classify: [],
|
||||
show4: false,
|
||||
|
||||
itemObj: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 根据ad_code解析省市区信息
|
||||
parseAdCode(adCode) {
|
||||
if (!adCode) return;
|
||||
|
||||
// 提取省级ad_code(前2位)
|
||||
const provinceCode = adCode.toString().substring(0, 2) + '0000';
|
||||
// 提取市级ad_code(前4位)
|
||||
const cityCode = adCode.toString().substring(0, 4) + '00';
|
||||
// 区县级ad_code(完整6位)
|
||||
const districtCode = adCode.toString();
|
||||
|
||||
// 查找省份信息
|
||||
const province = this.pro.find(item => item.ad_code == provinceCode);
|
||||
if (province) {
|
||||
this.confirmProv = province;
|
||||
|
||||
// 获取对应城市列表并查找城市信息
|
||||
this.getCity(provinceCode).then(() => {
|
||||
const city = this.city.find(item => item.ad_code == cityCode);
|
||||
if (city) {
|
||||
this.confirmCity = city;
|
||||
|
||||
// 获取对应区县列表并查找区县信息
|
||||
this.getBuss(cityCode).then(() => {
|
||||
const district = this.buss.find(item => item.ad_code == districtCode);
|
||||
if (district) {
|
||||
this.confirmBusiness = district;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
cancelBuss() {
|
||||
this.show3 = false;
|
||||
@ -194,7 +228,6 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
clickPro(e) {
|
||||
console.log(e);
|
||||
this.show = false;
|
||||
this.getCity(e.value[0].ad_code)
|
||||
this.confirmProv = e.value[0]
|
||||
@ -221,7 +254,6 @@ export default {
|
||||
afterReadImg(e) {
|
||||
e.file.forEach(item => {
|
||||
upload(item.url, res => {
|
||||
console.log(res.data.path);
|
||||
this.imgList.push({ url: this.picUrl + res.data.path })
|
||||
this.imgList2.push(res.data.path)
|
||||
})
|
||||
@ -349,35 +381,52 @@ export default {
|
||||
|
||||
// 省市区
|
||||
getPro() {
|
||||
request(MapApi.getArea, "POST", {}).then(res => {
|
||||
console.log(res);
|
||||
return request(MapApi.getArea, "POST", {}).then(res => {
|
||||
this.pro = res.rows
|
||||
})
|
||||
},
|
||||
getCity(e) {
|
||||
request(MapApi.getArea, "POST", {
|
||||
return request(MapApi.getArea, "POST", {
|
||||
parent_ad_code: e
|
||||
}).then(res => {
|
||||
this.city = res.rows
|
||||
})
|
||||
},
|
||||
getBuss(e) {
|
||||
request(MapApi.getArea, "POST", {
|
||||
return request(MapApi.getArea, "POST", {
|
||||
parent_ad_code: e
|
||||
}).then(res => {
|
||||
this.buss = res.rows
|
||||
})
|
||||
},
|
||||
getClassify(e) {
|
||||
request(apiArr.getMerChantCateList, "POST", {}).then(res => {
|
||||
getClassify() {
|
||||
return request(apiArr.getMerChantCateList, "POST", {}).then(res => {
|
||||
this.classify = res.rows
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
this.getPro()
|
||||
this.getClassify()
|
||||
onLoad(options) {
|
||||
// 先执行数据获取方法
|
||||
Promise.all([this.getPro(), this.getClassify()]).then(() => {
|
||||
// 数据获取完成后再进行赋值操作
|
||||
if(options.itemObj){
|
||||
this.itemObj = JSON.parse(options.itemObj)
|
||||
this.store_name = this.itemObj.merchant_name
|
||||
this.address = this.itemObj.address
|
||||
this.contact_name = this.itemObj.contact_name
|
||||
this.contact_phone = this.itemObj.phone
|
||||
this.confirmClassify = this.classify.find(item => item.id == this.itemObj.merchant_cate_id)
|
||||
this.bank_card = this.itemObj.bank_card
|
||||
// 解析ad_code回显省市区
|
||||
if (this.itemObj.ad_code) {
|
||||
this.parseAdCode(this.itemObj.ad_code);
|
||||
}
|
||||
this.imgList = this.itemObj.facade_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||
this.imgList3 = this.itemObj.interior_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||
this.imgList5 = this.itemObj.license_photo.split(",").map(item => ({ url: this.picUrl + item }))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
background-color: #ffffff;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="sucessImg">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_sucess.png" mode="aspectFill"></image>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill"></image>
|
||||
</div>
|
||||
|
||||
<div class="Msg1">提交成功</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user