linwenxin 5 dienas atpakaļ
vecāks
revīzija
84b456be0b
1 mainītis faili ar 14 papildinājumiem un 13 dzēšanām
  1. 14 13
      src/views/mallManagement/activityOrder/detail.vue

+ 14 - 13
src/views/mallManagement/activityOrder/detail.vue

@@ -348,21 +348,22 @@ export default {
         this.status = res.data.status
 
         this.activeItems = res.data.items.map(item => {
+          let answer = item.answer.map(it => {
+            if (item.type == 3) {
+              item.inputValue = it.option_value
+            } else if (item.type == 4 || item.type == 5) {
+              let img = []
+              it.option_value.forEach(t => {
+                img.push({ url: t })
+              })
+              console.log(it.option_value, img)
+              item.inputValue = img
+            }
+            return { ...it }
+          })
           return {
             ...item,
-            answer: item.answer.map(it => {
-              if (item.type == 3) {
-                item.inputValue = it.option_value
-              } else if (item.type == 4 || item.type == 5) {
-                let img = []
-                it.option_value.forEach(t => {
-                  img.push({ url: t })
-                })
-                console.log(it.option_value, img)
-                item.inputValue = img
-              }
-              return { ...it }
-            })
+            answer: answer
           }
         })
         console.log(this.activeItems)