Commit a6a4a69d by 前端

优化

1 parent 305f8095
...@@ -206,7 +206,9 @@ ...@@ -206,7 +206,9 @@
<el-form-item <el-form-item
label="文章素材:" label="文章素材:"
:prop="'missionList.' + index1 + '.textContent'" :prop="'missionList.' + index1 + '.textContent'"
v-show="itm.showArticle" v-show="
itm.showArticle && itm.textType && itm.textType == 1
"
> >
<!-- <textBox <!-- <textBox
@change="writeChange" @change="writeChange"
...@@ -1106,7 +1108,7 @@ export default { ...@@ -1106,7 +1108,7 @@ export default {
this.endTime = endTime this.endTime = endTime
this.activityStatus = activityStatus this.activityStatus = activityStatus
this.taskEditList = res.data this.taskEditList = res.data
// 处理空素材数据 // 处理返回数据
this.taskEditList.missionDateList.map((item) => { this.taskEditList.missionDateList.map((item) => {
item.missionList.map((itm) => { item.missionList.map((itm) => {
if ( if (
...@@ -1118,6 +1120,7 @@ export default { ...@@ -1118,6 +1120,7 @@ export default {
} else { } else {
itm.linkStatus = false itm.linkStatus = false
} }
// 处理空素材数据
if (!itm.missionMaterialList) { if (!itm.missionMaterialList) {
delete itm.missionMaterialList delete itm.missionMaterialList
} }
...@@ -1133,8 +1136,16 @@ export default { ...@@ -1133,8 +1136,16 @@ export default {
itm.sharingMethod = [] itm.sharingMethod = []
} }
// 处理软文 // 处理软文
if (itm.textType == 1) { if (itm.missionMaterialList) {
itm.showArticle = true let hasLink = itm.missionMaterialList.findIndex(
(list) => list.type == 4
)
console.log(hasLink, 'hasLink')
if (hasLink == -1) {
itm.showArticle = true
} else {
itm.showArticle = false
}
} }
}) })
}) })
...@@ -1240,10 +1251,6 @@ export default { ...@@ -1240,10 +1251,6 @@ export default {
) { ) {
itm.minTriggerValue = 1 itm.minTriggerValue = 1
} }
// 分享模式处理
// if (itm.sharingMethod) {
// itm.sharingMethod = itm.sharingMethod.toString()
// }
// 页面风格处理 // 页面风格处理
if (!itm.showArticle) { if (!itm.showArticle) {
itm.textType = 2 itm.textType = 2
...@@ -1276,28 +1283,10 @@ export default { ...@@ -1276,28 +1283,10 @@ export default {
this.taskFormEmptyValidate() this.taskFormEmptyValidate()
this.taskList.map((item) => { this.taskList.map((item) => {
item.missionList.map((itm) => { item.missionList.map((itm) => {
// 重复次数处理
// if (itm.repeatCount || itm.repeatFlag) {
// itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
// }
// 最低指标处理
// if (
// itm.rewardType == 1 &&
// itm.rewardCount == 2 &&
// !itm.minTriggerValue
// ) {
// itm.minTriggerValue = 1
// }
// 分享模式处理 // 分享模式处理
if (itm.sharingMethod) { if (itm.sharingMethod) {
itm.sharingMethod = itm.sharingMethod.toString() itm.sharingMethod = itm.sharingMethod.toString()
} }
// 页面风格处理
// if (!itm.showArticle) {
// itm.textType = 2
// }
// 自定义uuid删除
// delete itm.taskid
}) })
}) })
let params = JSON.parse(JSON.stringify(this.basicForm)) let params = JSON.parse(JSON.stringify(this.basicForm))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!