|
@@ -800,6 +800,13 @@
|
|
|
this.$bus.$emit('remove', '/account/stepForm')
|
|
|
} else {
|
|
|
this.addCreative(0)
|
|
|
+ getAction('/kuaishou/batch/checkCreativeCount', {
|
|
|
+ unitId: this.pansKey,
|
|
|
+ accountId: localStorage.getItem('accountId')
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.content = res.result
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
handleOk() {
|
|
@@ -824,6 +831,7 @@
|
|
|
this.visible = false
|
|
|
this.remove(this.pansKey)
|
|
|
},
|
|
|
+
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault()
|
|
|
var index = this.pans.findIndex(item => item.key === this.pansKey)
|
|
@@ -872,7 +880,7 @@
|
|
|
...values,
|
|
|
unitId: this.pansKey,
|
|
|
accountId: localStorage.getItem('accountId'),
|
|
|
- content: this.content
|
|
|
+ content: this.content
|
|
|
}
|
|
|
postAction('/kuaishou/batch/createCreative', params).then(res => {
|
|
|
if (res.success) {
|
|
@@ -1403,64 +1411,66 @@
|
|
|
}
|
|
|
},
|
|
|
mounted: function () {
|
|
|
- if (localStorage.getItem('pans')) {
|
|
|
- this.pans = JSON.parse(localStorage.getItem('pans')).map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- list: []
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- this.pansKey = this.pans[0].key
|
|
|
- this.$nextTick(() => {
|
|
|
- this.addCreative(0)
|
|
|
- })
|
|
|
- getAction('/kuaishou/batch/checkCreativeCount', {
|
|
|
- unitId: this.pansKey,
|
|
|
- accountId: localStorage.getItem('accountId')
|
|
|
- }).then(res => {
|
|
|
- console.log(res)
|
|
|
- this.content = res.result
|
|
|
- })
|
|
|
- getAction('/kuaishou/batch/getActionBarText', {
|
|
|
- campaignId: localStorage.getItem('campaignId') ? localStorage.getItem('campaignId') : localStorage
|
|
|
- .getItem('advertisingGroupKey')
|
|
|
- }).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.appList = res.result
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (localStorage.getItem('pans')) {
|
|
|
+ this.pans = JSON.parse(localStorage.getItem('pans')).map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ list: []
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- if (localStorage.getItem('appId')) {
|
|
|
- this.showSite = true
|
|
|
- this.getAppList(localStorage.getItem('appId'))
|
|
|
- } else {
|
|
|
+ this.pansKey = this.pans[0].key
|
|
|
|
|
|
- getAction('/kuaishou/batch/getAppId', {
|
|
|
- accountId: localStorage.getItem('accountId'),
|
|
|
- unitId: this.pansKey
|
|
|
+ this.addCreative(0)
|
|
|
+ getAction('/kuaishou/batch/checkCreativeCount', {
|
|
|
+ unitId: this.pansKey,
|
|
|
+ accountId: localStorage.getItem('accountId')
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.content = res.result
|
|
|
+ })
|
|
|
+ getAction('/kuaishou/batch/getActionBarText', {
|
|
|
+ campaignId: localStorage.getItem('campaignId') ? localStorage.getItem('campaignId') : localStorage
|
|
|
+ .getItem('advertisingGroupKey')
|
|
|
}).then(res => {
|
|
|
if (res.success) {
|
|
|
- if (res.result) {
|
|
|
- this.showSite = true
|
|
|
- this.getAppList(res.result)
|
|
|
- } else {
|
|
|
- this.showSite = false
|
|
|
- }
|
|
|
-
|
|
|
+ this.appList = res.result
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+
|
|
|
+ if (localStorage.getItem('appId')) {
|
|
|
+ this.showSite = true
|
|
|
+ this.getAppList(localStorage.getItem('appId'))
|
|
|
+ } else {
|
|
|
+
|
|
|
+ getAction('/kuaishou/batch/getAppId', {
|
|
|
+ accountId: localStorage.getItem('accountId'),
|
|
|
+ unitId: this.pansKey
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result) {
|
|
|
+ this.showSite = true
|
|
|
+ this.getAppList(res.result)
|
|
|
+ } else {
|
|
|
+ this.showSite = false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- }
|
|
|
- getAction('/kuaishou/batch/creativeWord', {
|
|
|
- accountId: localStorage.getItem('accountId')
|
|
|
- }).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.tags = res.result
|
|
|
}
|
|
|
+ getAction('/kuaishou/batch/creativeWord', {
|
|
|
+ accountId: localStorage.getItem('accountId')
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.tags = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|