panhui 5 лет назад
Родитель
Сommit
2392ea8d4d
1 измененных файлов с 12 добавлено и 3 удалено
  1. 12 3
      src/pages/confirmorder.vue

+ 12 - 3
src/pages/confirmorder.vue

@@ -36,7 +36,7 @@
         <div v-for="(item, index) in Boxes" :key="index.id">
             <div class="box-con">
                 <div class="box-con-Cards">
-                    <img :src="cardCaseInfo.images" alt="" />
+                    <img :src="img" alt="" />
                     <div class="box-con-right">
                         <p class="box-con-tit">{{ cardCaseInfo.name }}</p>
                         <div class="box-con-today">
@@ -106,6 +106,15 @@ export default {
             message: ''
         };
     },
+    computed: {
+        img() {
+            if (this.cardCaseInfo.images) {
+                return this.cardCaseInfo.images[0];
+            } else {
+                return '';
+            }
+        }
+    },
     methods: {
         address() {
             this.navigateTo('/pages/chooseAddress?type=order');
@@ -118,7 +127,7 @@ export default {
                 });
                 return;
             }
-            // this.showLoading();
+            this.showLoading();
             this.$http
                 .post('/orderInfo/createOrderInfo', {
                     caseId: this.caseId,
@@ -172,7 +181,7 @@ export default {
                     }
                 })
                 .then(res => {
-                    this.showLoading();
+                    this.hideLoading();
                     if (!res.empty) {
                         this.userAddressId = res.content[0].id;
                         this.addressList = res.content[0];