|
@@ -29,9 +29,7 @@
|
|
|
<el-form-item
|
|
|
label="网址"
|
|
|
prop="url">
|
|
|
- <el-radio-group
|
|
|
- v-model="domainType"
|
|
|
- @change="onDomainChange">
|
|
|
+ <el-radio-group v-model="domainType">
|
|
|
<el-radio :label="1">catalogue域名</el-radio>
|
|
|
<el-radio :label="2">第三方域名</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -218,16 +216,6 @@ export default {
|
|
|
// },
|
|
|
},
|
|
|
methods: {
|
|
|
- onDomainChange(type) {
|
|
|
- switch (type) {
|
|
|
- case 1:
|
|
|
- this.formData.url = this.formData.pre + '.promocatalogue.com.au'
|
|
|
- break
|
|
|
- case 2:
|
|
|
- this.formData.url = this.formData.other.trim()
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
transData() {
|
|
|
this.loading = true
|
|
|
const temp = this.form
|
|
@@ -248,13 +236,13 @@ export default {
|
|
|
if (temp.url) {
|
|
|
const regexp = /\.promocatalogue\.com\.au/
|
|
|
if (regexp.test(temp.url)) {
|
|
|
+ this.domainType = 1
|
|
|
if (!temp.pre) {
|
|
|
- this.domainType = 1
|
|
|
temp.pre = temp.url.replace(regexp, '')
|
|
|
}
|
|
|
} else {
|
|
|
+ this.domainType = 2
|
|
|
if (!temp.other) {
|
|
|
- this.domainType = 2
|
|
|
temp.other = temp.url.trim()
|
|
|
}
|
|
|
}
|