diff --git a/src/views/games/details/share/edit.vue b/src/views/games/details/share/edit.vue index e1d8b28..9cfc15d 100644 --- a/src/views/games/details/share/edit.vue +++ b/src/views/games/details/share/edit.vue @@ -134,7 +134,7 @@ 分享与广告交替规则,如分享2次后广告5次,填写: S-2,A-5 @@ -142,6 +142,7 @@ 分享首先的情况下, 分享n次后, 将切换成广告, 0代表不限次数。 @@ -160,7 +161,11 @@ >
- +
@@ -210,6 +215,7 @@ 广告首先的情况下, 最多播放广告n次后, 将切换成分享。 @@ -524,6 +530,7 @@ export default { token: '', onlyShare: false, onlyAd: false, + customize: false, curShareType: '', selectedShareType: [], platformsArr: [], @@ -537,7 +544,7 @@ export default { ad_count: 0, ad_cd: { iscapture: false, - reg: '' + reg: '', }, type: 0, game_id: '', @@ -580,7 +587,9 @@ export default { {required: true, message: '请至少添加一个分享组', trigger: 'blur'}, ], sex: [{required: true, message: '请选择性别', trigger: 'blur'}], - 'ad_cd.reg': [{required: true, message: '请填写分享规则', trigger: 'blur'}] + 'ad_cd.reg': [ + {required: true, message: '请填写分享规则', trigger: 'blur'}, + ], }, imageUrl: '', // modal - shareType @@ -732,7 +741,7 @@ export default { if (typeof this.shareForm.ad_cd !== 'object') { this.shareForm.ad_cd = { iscapture: false, - reg: '' + reg: '', } } @@ -740,6 +749,7 @@ export default { this.curShareType = this.shareForm.share_type if (this.shareForm.type === 2) this.onlyShare = true if (this.shareForm.type === 3) this.onlyAd = true + if (this.shareForm.type === 5) this.customize = true } }) .catch(err => { @@ -773,12 +783,19 @@ export default { if (val === 2) { this.onlyShare = true this.onlyAd = false + this.customize = false } else if (val === 3) { this.onlyShare = false this.onlyAd = true + this.customize = false + } else if (val === 5) { + this.onlyShare = false + this.onlyAd = false + this.customize = true } else { this.onlyShare = false this.onlyAd = false + this.customize = false } }, changeShareType(val) { @@ -872,10 +889,7 @@ export default { this.shareForm.share_words = [] this.shareForm.share_word = '' this.shareForm.share_image = '' - this.shareForm.ad_cd = { - iscapture: false, - reg: '' - } + this.shareForm.share_count = 0 } }, saveShare(data) { @@ -1163,7 +1177,9 @@ export default { this.openModalShareGroup() }, updateShareImgUrl() { - this.shareGroups[this.groupIndex].share_image = this.shareGroupForm.share_image + this.shareGroups[ + this.groupIndex + ].share_image = this.shareGroupForm.share_image this.closeModalShareGroup() }, uploadSuccess(res, file) {