完成商家模块小程序部分的修改

This commit is contained in:
赵毅 2025-10-22 10:55:11 +08:00
parent 7d6cff8a62
commit fad29dd656

View File

@ -46,6 +46,13 @@
<input type="text" v-model="contact_phone" placeholder="请输入联系方式"> <input type="text" v-model="contact_phone" placeholder="请输入联系方式">
</view> </view>
</view> </view>
<view class="row">
<view class="row_label">商家分类</view>
<view class="row_con" @click="chooseClassify">
<input type="text" disabled v-model="confirmClassify.short_name" placeholder="请选择商家分类">
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
</view>
</view>
<view class="row"> <view class="row">
<view class="row_label">银行卡号</view> <view class="row_label">银行卡号</view>
<view class="row_con nonebor"> <view class="row_con nonebor">
@ -61,7 +68,9 @@
<u-upload :fileList="imgList" @afterRead="afterReadImg" @delete="deletePic" name="1" multiple <u-upload :fileList="imgList" @afterRead="afterReadImg" @delete="deletePic" name="1" multiple
:maxCount="10"> :maxCount="10">
<view class="imgCon"> <view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
mode="widthFix"></image>
上传图片 上传图片
</view> </view>
</u-upload> </u-upload>
@ -74,7 +83,9 @@
<u-upload :fileList="imgList3" @afterRead="afterReadImg2" @delete="deletePic2" name="1" multiple <u-upload :fileList="imgList3" @afterRead="afterReadImg2" @delete="deletePic2" name="1" multiple
:maxCount="10"> :maxCount="10">
<view class="imgCon"> <view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
mode="widthFix"></image>
上传图片 上传图片
</view> </view>
</u-upload> </u-upload>
@ -87,7 +98,9 @@
<u-upload :fileList="imgList5" @afterRead="afterReadImg3" @delete="deletePic3" name="1" multiple <u-upload :fileList="imgList5" @afterRead="afterReadImg3" @delete="deletePic3" name="1" multiple
:maxCount="1"> :maxCount="1">
<view class="imgCon"> <view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image> <image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
mode="widthFix"></image>
上传图片 上传图片
</view> </view>
</u-upload> </u-upload>
@ -102,6 +115,8 @@
@cancel="cancelCity"></u-picker> @cancel="cancelCity"></u-picker>
<u-picker :show="show3" :columns="[buss]" keyName="short_name" @confirm="clickBuss" <u-picker :show="show3" :columns="[buss]" keyName="short_name" @confirm="clickBuss"
@cancel="cancelBuss"></u-picker> @cancel="cancelBuss"></u-picker>
<u-picker :show="show4" :columns="[classify]" keyName="short_name" @confirm="clickClassify"
@cancel="cancelClassify"></u-picker>
</view> </view>
</template> </template>
@ -143,12 +158,15 @@ export default {
confirmProv: "", confirmProv: "",
confirmCity: "", confirmCity: "",
confirmBusiness: "", confirmBusiness: "",
confirmClassify: "",
pro: [], pro: [],
show: false, show: false,
city: [], city: [],
show2: false, show2: false,
buss: [], buss: [],
show3: false, show3: false,
classify: [],
show4: false,
} }
}, },
methods: { methods: {
@ -181,6 +199,14 @@ export default {
this.getCity(e.value[0].ad_code) this.getCity(e.value[0].ad_code)
this.confirmProv = e.value[0] this.confirmProv = e.value[0]
}, },
cancelClassify() {
this.show4 = false;
},
clickClassify(e) {
this.show4 = false;
this.confirmClassify = e.value[0]
console.log("🚀 ~ this.confirmClassify:", this.confirmClassify)
},
chooseCity() { chooseCity() {
this.show = true; this.show = true;
}, },
@ -190,6 +216,9 @@ export default {
chooseCity3() { chooseCity3() {
this.show3 = true; this.show3 = true;
}, },
chooseClassify() {
this.show4 = true;
},
afterReadImg(e) { afterReadImg(e) {
e.file.forEach(item => { e.file.forEach(item => {
upload(item.url, res => { upload(item.url, res => {
@ -272,6 +301,12 @@ export default {
duration: 2000 duration: 2000
}); });
} }
if (!that.confirmClassify.ad_code) {
return uni.showToast({
title: '请选择商家分类',
duration: 2000
});
}
if (!that.imgList6.length) { if (!that.imgList6.length) {
return uni.showToast({ return uni.showToast({
title: '请上传营业执照', title: '请上传营业执照',
@ -292,6 +327,7 @@ export default {
facade_photo, facade_photo,
interior_photo, interior_photo,
license_photo, license_photo,
classify_code: that.confirmClassify.ad_code,
}).then(res => { }).then(res => {
that.contact_name = '' that.contact_name = ''
that.contact_phone = '' that.contact_phone = ''
@ -307,6 +343,7 @@ export default {
that.imgList4 = [] that.imgList4 = []
that.imgList5 = [] that.imgList5 = []
that.imgList6 = [] that.imgList6 = []
that.confirmClassify = ''
NavgateTo("../sucess/index") NavgateTo("../sucess/index")
}) })
}, },
@ -332,10 +369,27 @@ export default {
this.buss = res.rows this.buss = res.rows
}) })
}, },
getClassify(e) {
this.classify = [
{
ad_code: "1",
short_name: "111"
},
{
ad_code: "2",
short_name: "222"
},
{
ad_code: "3",
short_name: "333"
},
]
},
}, },
onLoad() { onLoad() {
this.getPro() this.getPro()
this.getClassify()
} }
} }
</script> </script>