修改本地生活表单

This commit is contained in:
wangxiaowei 2024-06-28 11:47:05 +08:00
parent e63d4b609e
commit f2dd825b64

@ -82,21 +82,10 @@
<view class="apply-form-item">
<u-field label="手持身份证" label-width="160" placeholder="请上传手持身份证" :border-bottom="false"
required disabled />
<view class="apply-form-upload" @click="uploadHandCard" v-if="form.idBack">
<image :src="form.idBack" mode="aspectFit"></image>
</view>
<view class="apply-form-upload" @click="uploadHandCard" v-else>
<u-icon name="plus" color="#e2e2e2" size="48" top="28"></u-icon>
</view>
</view>
<view class="apply-form-item">
<u-field label="身份证正面" label-width="160" placeholder="请上传身份证正面" :border-bottom="false"
required disabled />
<view class="apply-form-upload" @click="uploadIdCardFronted" v-if="form.idCard">
<view class="apply-form-upload" @click="uploadHandCard" v-if="form.idCard">
<image :src="form.idCard" mode="aspectFit"></image>
</view>
<view class="apply-form-upload" @click="uploadIdCardFronted" v-else>
<view class="apply-form-upload" @click="uploadHandCard" v-else>
<u-icon name="plus" color="#e2e2e2" size="48" top="28"></u-icon>
</view>
</view>
@ -391,7 +380,7 @@
...mapMutations(['setCityInfo']),
async getLocalStore() {
getLocalStore().then((res) => {
await getLocalStore().then((res) => {
if (res.data.local) {
this.storeState = res.data.local.store_state
if (this.storeState == -1 || this.storeState == 2) {
@ -512,7 +501,7 @@
isAgree,
fileList
} = this
const submitObj = this.form;
const {businessLicense, crftNo1, idCard, name, empowerPhone, address} = this.form;
// let flag = true;
// Object.keys(submitObj).forEach((key) => {
@ -525,27 +514,27 @@
// }
// })
if (!submitObj.businessLicense) return this.$toast({
if (!businessLicense) return this.$toast({
title: '请先上传营业执照'
})
if (!submitObj.crftNo1) return this.$toast({
if (!crftNo1) return this.$toast({
title: '请填写社会信用代码'
})
if (!submitObj.idCard || !submitObj.idBack) return this.$toast({
title: '请上传身份证正反面'
if (!idCard) return this.$toast({
title: '请上传手持身份证'
})
if (!submitObj.name) return this.$toast({
if (!name) return this.$toast({
title: '请填写商户联系人'
})
if (!submitObj.empowerPhone) return this.$toast({
if (!empowerPhone) return this.$toast({
title: '请填写联系电话'
})
if (!submitObj.address) return this.$toast({
if (!address) return this.$toast({
title: '请填写地理位置'
})
@ -561,7 +550,7 @@
data,
code,
msg
} = await addLocalStore(submitObj)
} = await addLocalStore({businessLicense, crftNo1, idCard, name, empowerPhone, address})
if(code == 1) {
this.$toast({
title: msg