调整广告跳转参数
This commit is contained in:
parent
36d08b4924
commit
f95aef88ae
@ -199,7 +199,18 @@
|
||||
v-if="adForm.jump_status === 1"
|
||||
>
|
||||
<el-input
|
||||
v-model="adForm.jump_param"
|
||||
v-model="adForm.ad_property.jump_param"
|
||||
class="w100"
|
||||
:disabled="!writeable"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="APPID"
|
||||
prop="ad_property.appid"
|
||||
v-if="adForm.jump_status === 1"
|
||||
>
|
||||
<el-input
|
||||
v-model="adForm.ad_property.appid"
|
||||
class="w100"
|
||||
:disabled="!writeable"
|
||||
/>
|
||||
@ -280,7 +291,10 @@ export default {
|
||||
name: 'AdEdit',
|
||||
data() {
|
||||
const validateJumpParams = (rule, value, callback) => {
|
||||
if (this.adForm.jump_status === 1 && this.adForm.jump_param === '') {
|
||||
if (
|
||||
this.adForm.jump_status === 1 &&
|
||||
(this.adForm.jump_param === '' || this.adForm.ad_property.appid === '')
|
||||
) {
|
||||
callback(new Error('请填写跳转参数'))
|
||||
} else {
|
||||
callback()
|
||||
@ -321,7 +335,9 @@ export default {
|
||||
is_shake: 0,
|
||||
is_hot: 0,
|
||||
is_new: 0,
|
||||
is_recommend: 0
|
||||
is_recommend: 0,
|
||||
appid: '',
|
||||
jump_param: ''
|
||||
} //用于拓展属性
|
||||
},
|
||||
adFormRules: {
|
||||
@ -345,6 +361,12 @@ export default {
|
||||
ad_num: [
|
||||
{ type: 'number', message: '计划数必须是数值', trigger: 'blur' }
|
||||
],
|
||||
'ad_property.jump_param': [
|
||||
{ required: true, validator: validateJumpParams, trigger: 'blur' }
|
||||
],
|
||||
'ad_property.appid': [
|
||||
{ required: true, validator: validateJumpParams, trigger: 'blur' }
|
||||
],
|
||||
'ad_property.is_shake': [
|
||||
{ type: 'number', message: '是否抖动必须是数值', trigger: 'blur' }
|
||||
],
|
||||
@ -410,9 +432,19 @@ export default {
|
||||
is_shake: 0,
|
||||
is_hot: 0,
|
||||
is_new: 0,
|
||||
is_recommend: 0
|
||||
is_recommend: 0,
|
||||
appid: '',
|
||||
jump_param: ''
|
||||
}
|
||||
}
|
||||
|
||||
// 兼容跳转参数显示
|
||||
if (!this.adForm.ad_property.jump_param) {
|
||||
this.adForm.ad_property.jump_param = this.adForm.jump_param
|
||||
? this.adForm.jump_param
|
||||
: ''
|
||||
}
|
||||
|
||||
const gameid = this.adForm.gameid
|
||||
const locationid = this.adForm.locationid
|
||||
this.changePlatform(this.adForm.channelid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user