snow 1 year ago
parent
commit
84ab0d1de8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/views/goodStore/goodsCost/detail.vue

+ 3 - 2
src/views/goodStore/goodsCost/detail.vue

@@ -41,9 +41,9 @@
                       <div style="max-height: 24px; overflow: hidden">
                         <el-image
                           style="height: 24px; width: 24px; margin-right: 5px"
-                          v-for="(img, index) in sitem.good_img.split(',')"
+                          v-for="(img, index) in Array.isArray(sitem.good_img) ? sitem.good_img : sitem.good_img.split(',')"
                           :src="img"
-                          :preview-src-list="sitem.good_img.split(',')"
+                          :preview-src-list="Array.isArray(sitem.good_img) ? sitem.good_img : sitem.good_img.split(',')"
                           :key="index"
                         />
                       </div>
@@ -384,6 +384,7 @@ export default {
     },
     async getArea(prop = "delivery_place") {
       const chunks = this.sitem[prop].split(",");
+      if(chunks.length !== 3) return ""
       let { data: province } = await asyncRequest.province();
       province = province.find(
         ({ province_code }) => province_code === chunks[0]