联系方式二选一、商品详情部分样式修改
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
</view>
|
||||
|
||||
<view style="background-color: #fff;">
|
||||
<u-form-item label="联系方式" borderBottom>
|
||||
<u-form-item v-if="false" label="联系方式" borderBottom>
|
||||
<u-radio-group v-model="needsPublishForm.contactWay" placement="row">
|
||||
<u-radio :customStyle="{marginRight: '16px'}" label="手机" name="mobile" :disabled="btnDisabled">
|
||||
</u-radio>
|
||||
@@ -87,11 +87,11 @@
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="needsPublishForm.contactWay === 'mobile'" label="手机" borderBottom>
|
||||
<u-form-item label="手机" borderBottom>
|
||||
<u--input placeholder="请输入手机号" :border="false" v-model="needsPublishForm.mobile"
|
||||
placeholder-style="color:#CCCCCC" :disabled="btnDisabled" disabledColor="#ffffff"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="needsPublishForm.contactWay === 'email'" label="邮箱" borderBottom>
|
||||
<u-form-item label="邮箱" borderBottom>
|
||||
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email"
|
||||
:disabled="btnDisabled" placeholder-style="color:#CCCCCC"></u--input>
|
||||
</u-form-item>
|
||||
@@ -373,12 +373,18 @@
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm
|
||||
.mobile)) {
|
||||
if (!this.needsPublishForm.mobile && !this.needsPublishForm.email) {
|
||||
this.$toast.warn('请输入正确的手机号或者正确的邮箱地址')
|
||||
return false
|
||||
}
|
||||
if (this.tabCurrent === 1 && this.fileList1.length < 1) {
|
||||
this.$toast.warn('请至少上传一张图片')
|
||||
return false
|
||||
}
|
||||
if (this.needsPublishForm.mobile && !/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
||||
this.$toast.warn('请输入正确的手机号')
|
||||
return false
|
||||
} else if (this.needsPublishForm.contactWay === 'email' && !
|
||||
/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
||||
} else if (this.needsPublishForm.email && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
|
||||
this.$toast.warn('请输入正确的邮箱地址')
|
||||
return false
|
||||
}
|
||||
@@ -410,15 +416,19 @@
|
||||
...this.needsPublishForm
|
||||
}
|
||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||
this.$toast.success('提交成功')
|
||||
// if (this.needsPublishForm.id) {
|
||||
uni.navigateTo({
|
||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||
})
|
||||
// }
|
||||
this.tabCurrent = 0
|
||||
this.fileList1 = []
|
||||
this.needsPublishForm = {}
|
||||
if (res.data.code === 1) {
|
||||
this.$toast.success('提交成功')
|
||||
// if (this.needsPublishForm.id) {
|
||||
uni.navigateTo({
|
||||
url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1)
|
||||
})
|
||||
// }
|
||||
this.tabCurrent = 0
|
||||
this.fileList1 = []
|
||||
this.needsPublishForm = {}
|
||||
} else{
|
||||
this.$toast.warn(res.data.msg)
|
||||
}
|
||||
// this.$toast.success(res.data.msg)
|
||||
}).catch(error => {
|
||||
this.$toast.warn(error)
|
||||
|
||||
Reference in New Issue
Block a user