xuqiang-97 4 yıl önce
ebeveyn
işleme
4a0ed7f7ee

+ 1 - 0
project.config.json

@@ -160,6 +160,7 @@
                     "id": -1,
                     "id": -1,
                     "name": "确认订单",
                     "name": "确认订单",
                     "pathName": "/pages/confirmorder",
                     "pathName": "/pages/confirmorder",
+                    "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
                     "scene": null
                     "scene": null
                 },
                 },
                 {
                 {

+ 43 - 22
src/components/CardCase.vue

@@ -26,17 +26,17 @@
 
 
                 <div class="content">
                 <div class="content">
                     <div class="card" v-for="(card, index) in cardList" :key="index">
                     <div class="card" v-for="(card, index) in cardList" :key="index">
-                        <div class="card-title">第{{ getNumStr(index + 1) }}组</div>
+                        <div class="card-title">第{{ index + 1 }}组</div>
                         <div class="card-list">
                         <div class="card-list">
                             <div
                             <div
                                 v-for="(item, itemIndex) in card"
                                 v-for="(item, itemIndex) in card"
                                 :key="item.id"
                                 :key="item.id"
                                 class="card-item"
                                 class="card-item"
                                 :class="{
                                 :class="{
-                                    used: item.caseStatus !== 'WAIT' || item.userId,
+                                    used: item.caseStatus !== ('WAIT' || 'PROGRESS') || item.userId,
                                     active: nowChoose.includes(item.id)
                                     active: nowChoose.includes(item.id)
                                 }"
                                 }"
-                                @click="choose(item.id, item.caseStatus !== 'WAIT' || item.userId)"
+                                @click="choose(item.id, item.caseStatus !== ('WAIT' || 'PROGRESS') || item.userId)"
                             >
                             >
                                 {{ itemIndex + 1 }}
                                 {{ itemIndex + 1 }}
                             </div>
                             </div>
@@ -116,14 +116,11 @@ export default {
             if (used) {
             if (used) {
                 return;
                 return;
             }
             }
-            console.log(id);
             let list = [...this.nowChoose];
             let list = [...this.nowChoose];
             if (list.includes(id)) {
             if (list.includes(id)) {
                 list.splice(list.indexOf(id), 1);
                 list.splice(list.indexOf(id), 1);
-            } else if (list.length < 6) {
-                list.push(id);
             } else {
             } else {
-                this.toast('最多选择六张');
+                list.push(id);
             }
             }
             this.nowChoose = list;
             this.nowChoose = list;
         },
         },
@@ -132,16 +129,40 @@ export default {
                 this.toast('请选择卡牌');
                 this.toast('请选择卡牌');
                 return;
                 return;
             }
             }
-            this.$emit('update:chooseIds', this.nowChoose);
-            this.show = false;
-            if (this.buy) {
-                this.$emit('buy');
-            }
+            let caseId = this.cardCaseInfo.cardCaseId;
+            let boxIds = this.nowChoose.join(',');
+            this.$http
+                .get('/orderInfo/checkBox', {
+                    caseId,
+                    boxIds
+                })
+                .then(res => {
+                    let checkResult = false;
+                    checkResult = res;
+                    if (!checkResult) {
+                        this.toast('该卡箱需要两个卡包组选择数量一样.');
+                        return Promise.reject();
+                    } else {
+                        return Promise.resolve();
+                    }
+                })
+                .then(res => {
+                    this.$emit('update:chooseIds', this.nowChoose);
+                    this.show = false;
+                    if (this.buy) {
+                        this.$emit('buy');
+                    }
+                })
+                .catch(e => {
+                    wx.hideLoading();
+                    if (e.error) {
+                        wx.showToast({
+                            icon: 'none',
+                            title: e.error
+                        });
+                    }
+                });
         }
         }
-        // getChart(index) {
-        //     const list = ['1', '2', '3', '4', '5', '6'];
-        //     return list[index];
-        // }
     }
     }
 };
 };
 </script>
 </script>
@@ -227,17 +248,13 @@ export default {
     color: #939599;
     color: #939599;
     line-height: 24px;
     line-height: 24px;
 }
 }
-.card-list {
-    margin: 5px;
-}
 .card {
 .card {
     background-color: @bg;
     background-color: @bg;
     padding: 12px 16px;
     padding: 12px 16px;
     border-radius: 8px;
     border-radius: 8px;
-    min-height: 80px;
     .card-list {
     .card-list {
         .flex();
         .flex();
-
+        flex-wrap: wrap;
         .card-item {
         .card-item {
             width: 42px;
             width: 42px;
             height: 42px;
             height: 42px;
@@ -248,7 +265,7 @@ export default {
             text-align: center;
             text-align: center;
             color: #000000;
             color: #000000;
             line-height: 42px;
             line-height: 42px;
-
+            margin-top: 10px;
             &.used {
             &.used {
                 background-color: #939599;
                 background-color: #939599;
                 color: #ffffff;
                 color: #ffffff;
@@ -262,6 +279,10 @@ export default {
             &:active {
             &:active {
                 opacity: 0.8;
                 opacity: 0.8;
             }
             }
+
+            &:nth-child(6n + 1) {
+                margin-left: 0 !important;
+            }
         }
         }
 
 
         .card-item + .card-item {
         .card-item + .card-item {

+ 1 - 0
src/components/ProductInfo.vue

@@ -112,6 +112,7 @@ export default {
     align-self: stretch;
     align-self: stretch;
     .flex-col();
     .flex-col();
     position: relative;
     position: relative;
+    overflow: hidden;
     .text1 {
     .text1 {
         font-size: 16px;
         font-size: 16px;
         font-weight: bold;
         font-weight: bold;

+ 4 - 2
src/pages/Applydetails.vue

@@ -9,7 +9,10 @@
         <div class="top">
         <div class="top">
             <img src="../native/imgs/icon_tuikuan_chenggong@3x.png" alt="" />
             <img src="../native/imgs/icon_tuikuan_chenggong@3x.png" alt="" />
             <p>退款成功</p>
             <p>退款成功</p>
-            <span>申请成功,退款将在72小时内按照原支付渠道返回,请注意查收</span>
+            <span
+                >申请成功,退款将在72小时内按照原支付
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
+            >
         </div>
         </div>
     </div>
     </div>
 </template>
 </template>
@@ -37,7 +40,6 @@ export default {
         }
         }
         span {
         span {
             width: 255px;
             width: 255px;
-            height: 48px;
             font-size: 14px;
             font-size: 14px;
             font-weight: 400;
             font-weight: 400;
             color: #939599;
             color: #939599;

+ 8 - 11
src/pages/confirmorder.vue

@@ -150,9 +150,11 @@ export default {
                 });
                 });
         },
         },
         getFn() {
         getFn() {
+            console.log(this.$mp.query.boxIds);
             this.showLoading();
             this.showLoading();
             let caseId = this.$mp.query.caseId;
             let caseId = this.$mp.query.caseId;
-            let boxIds = this.$mp.query.boxIds;
+            let boxIds = this.$mp.query.boxIds.replace(/%2C/g, ',');
+            console.log(boxIds);
             this.$http
             this.$http
                 .get('/orderInfo/showPreview', {
                 .get('/orderInfo/showPreview', {
                     caseId,
                     caseId,
@@ -231,8 +233,7 @@ export default {
     }
     }
     .box-address {
     .box-address {
         .box-lr {
         .box-lr {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             justify-content: space-between;
             margin: 0 23px;
             margin: 0 23px;
             height: 120px;
             height: 120px;
@@ -291,8 +292,7 @@ export default {
         background: #ffffff;
         background: #ffffff;
     }
     }
     .box-tit {
     .box-tit {
-        display: flex;
-        align-items: center;
+        .flex();
         margin: 20px 0 0 20px;
         margin: 20px 0 0 20px;
         img {
         img {
             width: 17px;
             width: 17px;
@@ -332,12 +332,11 @@ export default {
                 }
                 }
             }
             }
             .box-con-today {
             .box-con-today {
-                display: flex;
+                .flex();
                 height: 30px;
                 height: 30px;
                 background: #f5f7fa;
                 background: #f5f7fa;
                 border-radius: 6px;
                 border-radius: 6px;
                 width: 142px;
                 width: 142px;
-                align-items: center;
                 p {
                 p {
                     height: 24px;
                     height: 24px;
                     font-size: 14px;
                     font-size: 14px;
@@ -347,8 +346,7 @@ export default {
                 }
                 }
             }
             }
             .box-con-money {
             .box-con-money {
-                display: flex;
-                align-items: center;
+                .flex();
                 justify-content: space-between;
                 justify-content: space-between;
                 margin-top: 28px;
                 margin-top: 28px;
                 .box-con-num {
                 .box-con-num {
@@ -379,8 +377,7 @@ export default {
     .box-buttom {
     .box-buttom {
         margin: 35px 20px;
         margin: 35px 20px;
         .box-buttom-con {
         .box-buttom-con {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             justify-content: space-between;
             p {
             p {
                 height: 20px;
                 height: 20px;