|
@@ -14,9 +14,10 @@
|
|
|
style="width: 500px"
|
|
|
placeholder="" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="logo"
|
|
|
- prop="logo">
|
|
|
+ <el-form-item label="logo">
|
|
|
+ <template #label>
|
|
|
+ <span style="color: #f56c6c">*</span> logo
|
|
|
+ </template>
|
|
|
<input
|
|
|
style="display: none"
|
|
|
type="text"
|
|
@@ -28,22 +29,29 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="网址"
|
|
|
- prop="url">
|
|
|
+ prop="">
|
|
|
<el-radio-group v-model="domainType">
|
|
|
<el-radio :label="1">catalogue域名</el-radio>
|
|
|
<el-radio :label="2">第三方域名</el-radio>
|
|
|
</el-radio-group>
|
|
|
+ <el-form-item
|
|
|
+ prop="pre"
|
|
|
+ v-if="domainType === 1">
|
|
|
+ <el-input
|
|
|
+ @change="(e) => (formData.url = e + '.promocatalogue.com.au')"
|
|
|
+ v-model="formData.pre">
|
|
|
+ <template #append>.promocatalogue.com.au</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ prop="other"
|
|
|
+ v-if="domainType === 2">
|
|
|
+ <el-input
|
|
|
+ @change="(e) => (formData.url = e)"
|
|
|
+ v-model="formData.other"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-input
|
|
|
- @change="(e) => (formData.url = e + '.promocatalogue.com.au')"
|
|
|
- v-model="formData.pre"
|
|
|
- v-show="domainType === 1">
|
|
|
- <template #append>.promocatalogue.com.au</template>
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- @change="(e) => (formData.url = e)"
|
|
|
- v-model="formData.other"
|
|
|
- v-show="domainType === 2"></el-input>
|
|
|
- <el-input
|
|
|
+ v-show="false"
|
|
|
v-model="formData.url"
|
|
|
style="width: 500px"
|
|
|
placeholder="" />
|
|
@@ -168,7 +176,14 @@ export default {
|
|
|
trigger: 'change',
|
|
|
},
|
|
|
],
|
|
|
- url: [
|
|
|
+ pre: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('text_please_input'),
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ other: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: this.$t('text_please_input'),
|
|
@@ -246,6 +261,8 @@ export default {
|
|
|
temp.other = temp.url.trim()
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.domainType = 1
|
|
|
}
|
|
|
this.formData = temp
|
|
|
this.loading = false
|
|
@@ -265,6 +282,10 @@ export default {
|
|
|
if (!valid) {
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.imagesList.length) {
|
|
|
+ this.$message.error('请上传logo')
|
|
|
+ return
|
|
|
+ }
|
|
|
const f = cloneDeep(this.formData)
|
|
|
this.loading = true
|
|
|
f.logo = this.imagesList[0].url.replace(this.$mediaRegExp, '/')
|