完善商家入驻逻辑,保存提交数据

This commit is contained in:
赵毅 2025-10-30 15:01:32 +08:00
parent a3443ff129
commit 6b229b8639
4 changed files with 66 additions and 17 deletions

View File

@ -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>

View File

@ -167,10 +167,44 @@ export default {
show3: false,
classify: [],
show4: false,
itemObj: {},
}
},
methods: {
// ad_code
parseAdCode(adCode) {
if (!adCode) return;
// ad_code2
const provinceCode = adCode.toString().substring(0, 2) + '0000';
// ad_code4
const cityCode = adCode.toString().substring(0, 4) + '00';
// ad_code6
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>

View File

@ -1,5 +1,5 @@
page {
background-color: #f6f7fb;
background-color: #ffffff;
min-height: 100vh;
padding-bottom: 0;
}

View File

@ -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>