|
@@ -208,7 +208,12 @@ export default {
|
|
|
methods: {
|
|
|
getChangeAll(type, form, field) {
|
|
|
var node = document.getElementById(field)
|
|
|
- var v = '-{{' + type + '}}-'
|
|
|
+ var v = ''
|
|
|
+ if (field == 'url') {
|
|
|
+ v = '{{' + type + '}}'
|
|
|
+ }else{
|
|
|
+ v = '-{{' + type + '}}-'
|
|
|
+ }
|
|
|
if (document.selection) {
|
|
|
//IE
|
|
|
node.focus()
|
|
@@ -473,13 +478,26 @@ export default {
|
|
|
if (this.fileUrl) {
|
|
|
this.confirmLoading = true
|
|
|
let params = {}
|
|
|
+ var reg = RegExp(/{{渠道号}}/)
|
|
|
+ if(reg.test(values.url)&®.test(values.appVersion)){
|
|
|
+ this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|
|
|
+ params = { ...values }
|
|
|
+ params.appIconUrl = this.fileUrl
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.$emit('getDataList', params)
|
|
|
+ this.handleCancel()
|
|
|
+ }else if(!reg.test(values.url)&&!reg.test(values.appVersion)){
|
|
|
+ this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|
|
|
+ params = { ...values }
|
|
|
+ params.appIconUrl = this.fileUrl
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.$emit('getDataList', params)
|
|
|
+ this.handleCancel()
|
|
|
+ }else{
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.$message.error('下载链接必须和应用标记的通配符保持一致')
|
|
|
+ }
|
|
|
|
|
|
- this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|
|
|
- params = { ...values }
|
|
|
- params.appIconUrl = this.fileUrl
|
|
|
- this.confirmLoading = false
|
|
|
- this.$emit('getDataList', params)
|
|
|
- this.handleCancel()
|
|
|
// postAction(this.url.insertTemplateUrl, params).then(res => {
|
|
|
// this.confirmLoading = false
|
|
|
// if (res.success) {
|