Browse Source

Merge branch 'master' of qk:zhuishuyun/precise_delivery_distribution_front

xia 3 years ago
parent
commit
8e74388a44
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/views/put/landing/stepComp/step-two.vue

+ 4 - 5
src/views/put/landing/stepComp/step-two.vue

@@ -212,14 +212,13 @@ const StepTwo = defineComponent({
             head_img,
             head_img,
           } = (props as any).content;
           } = (props as any).content;
           try {
           try {
-            state.charptList = JSON.parse(content);
-            state.chooseImgUrl = head_img;
-            state.selectImg = true;
-
+            state.charptList = content ? JSON.parse(content) : [{ title: "", content: ""}];
+            state.chooseImgUrl = head_img ?? '';
+            state.selectImg = head_img ? true : false;
+            if(!body_template_id) return
             state.templateChecked = state.templateList.findIndex(
             state.templateChecked = state.templateList.findIndex(
               (item) => item.id == body_template_id
               (item) => item.id == body_template_id
             );
             );
-            console.log(state.templateChecked)
             state.templateItemChecked =
             state.templateItemChecked =
               state.templateList[state.templateChecked];
               state.templateList[state.templateChecked];
           } catch (e) {
           } catch (e) {