Commit a6a4a69d by 前端

优化

1 parent 305f8095
......@@ -206,7 +206,9 @@
<el-form-item
label="文章素材:"
:prop="'missionList.' + index1 + '.textContent'"
v-show="itm.showArticle"
v-show="
itm.showArticle && itm.textType && itm.textType == 1
"
>
<!-- <textBox
@change="writeChange"
......@@ -1106,7 +1108,7 @@ export default {
this.endTime = endTime
this.activityStatus = activityStatus
this.taskEditList = res.data
// 处理空素材数据
// 处理返回数据
this.taskEditList.missionDateList.map((item) => {
item.missionList.map((itm) => {
if (
......@@ -1118,6 +1120,7 @@ export default {
} else {
itm.linkStatus = false
}
// 处理空素材数据
if (!itm.missionMaterialList) {
delete itm.missionMaterialList
}
......@@ -1133,8 +1136,16 @@ export default {
itm.sharingMethod = []
}
// 处理软文
if (itm.textType == 1) {
itm.showArticle = true
if (itm.missionMaterialList) {
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 {
) {
itm.minTriggerValue = 1
}
// 分享模式处理
// if (itm.sharingMethod) {
// itm.sharingMethod = itm.sharingMethod.toString()
// }
// 页面风格处理
if (!itm.showArticle) {
itm.textType = 2
......@@ -1276,28 +1283,10 @@ export default {
this.taskFormEmptyValidate()
this.taskList.map((item) => {
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) {
itm.sharingMethod = itm.sharingMethod.toString()
}
// 页面风格处理
// if (!itm.showArticle) {
// itm.textType = 2
// }
// 自定义uuid删除
// delete itm.taskid
})
})
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!