|
@@ -248,11 +248,15 @@
|
|
|
console.log('Received values of form: ', values);
|
|
|
let params = {};
|
|
|
if (this.uploadType == '1') {
|
|
|
- params.file = this.file;
|
|
|
+ if (this.file != '') {
|
|
|
+ params.file = this.file;
|
|
|
+ }
|
|
|
} else if (this.uploadType == '2') {
|
|
|
params.url = this.downloadUrl;
|
|
|
}
|
|
|
- params.imageUrl = this.imageUrl;
|
|
|
+ if (this.imageUrl != '') {
|
|
|
+ params.imageUrl = this.imageUrl;
|
|
|
+ }
|
|
|
params.platform = this.platform;
|
|
|
params.appType = this.appType;
|
|
|
params.packageName = this.packageName;
|
|
@@ -260,12 +264,14 @@
|
|
|
params.appVersion = this.appVersion;
|
|
|
params.loginId = this.userInfo().id;
|
|
|
console.log(params)
|
|
|
- postAction(this.url.insertTemplateUrl, params).then((res) => {
|
|
|
- console.log(res)
|
|
|
- if (res.success) {
|
|
|
- alert("创建应用成功");
|
|
|
- }
|
|
|
- });
|
|
|
+ postAction(this.url.insertTemplateUrl, params).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ alert("创建应用成功");
|
|
|
+ } else {
|
|
|
+ alert(res.message)
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -292,12 +298,14 @@
|
|
|
params.appVersion = this.appVersion;
|
|
|
params.loginId = this.userInfo().id;
|
|
|
console.log(params)
|
|
|
- postAction(this.url.insertTemplateUrl, params).then((res) => {
|
|
|
- console.log(res)
|
|
|
- if (res.success) {
|
|
|
- alert("广告组模板创建成功");
|
|
|
- }
|
|
|
- });
|
|
|
+ postAction(this.url.insertTemplateUrl, params).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ alert("广告组模板创建成功");
|
|
|
+ } else {
|
|
|
+ alert(res.message)
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
},
|