xuqiang 5 жил өмнө
parent
commit
df075ff1d0

+ 2 - 2
project.private.config.json

@@ -181,8 +181,8 @@
           "scene": null
         },
         {
-          "name": "/pages/unpacking",
-          "pathName": "/pages/unpacking",
+          "name": "pages/unpacking",
+          "pathName": "pages/unpacking",
           "query": "null",
           "scene": null
         }

+ 1 - 1
src/pages/allselldetails.vue

@@ -9,11 +9,11 @@
     <div class="container">
         <div class="box-top">
             <p>{{ status.label }}</p>
-            <h3 v-if="status.orderStatus !== 'CREATED'">{{ status.name }}</h3>
             <h3 v-if="status.orderStatus == 'CREATED'">
                 未支付将在,<span v-if="minters < 10">0</span>{{ minters }}分<span v-if="seconds < 10">0</span
                 >{{ seconds }} 后自动取消订单
             </h3>
+            <h3 v-else>{{ status.name }}</h3>
         </div>
         <div class="box-adderss">
             <div

+ 45 - 50
src/pages/details.vue

@@ -57,12 +57,17 @@
             {{ cardCaseInfo.description }}
         </div>
         <h3>卡箱稀有卡</h3>
-        <div class="boxImg">
-            <div v-for="(item, index) in img" :key="index">
-                <img :src="item" alt="" />
+        <div class="cardBox">
+            <div class="cardList" v-for="(item, index) in cardList" :key="index">
+                <div class="boxImg">
+                    <img :src="item.image" alt="" />
+                </div>
+                <div class="name">
+                    <p>{{ item.cardName }}</p>
+                </div>
             </div>
         </div>
-        <h3>拼箱规则</h3>
+        <h2>拼箱规则</h2>
         <div class="box-details">
             1.拼箱是一种类似拼团的玩法,用户选号后支付,当箱中的全部号码都被购买完毕,才算拼箱成功。如果在有限时间内拼箱没有成团,系统会把钱退回给买家<br />
             2.带有“直播开箱”的拼箱商品,是指当拼箱成团后,店家会实时直播开箱,原箱开封,把所有卡包拆开确认卡片内容,买家可以在小程序上观看直播<br />
@@ -93,12 +98,10 @@
                     </div>
                 </div>
                 <div class="box-footer-right">
-                    <van-button v-if="cardCaseInfo.caseStatus !== 'FINISH'" type="warning" @click="purchase"
-                        >立即购买</van-button
-                    >
                     <van-button v-if="cardCaseInfo.caseStatus == 'FINISH'" type="warning" @click="result"
                         >查看结果</van-button
                     >
+                    <van-button v-else type="warning" @click="purchase">立即购买</van-button>
                 </div>
             </div>
         </div>
@@ -119,26 +122,13 @@ export default {
             show: false,
             name: '',
             list: [],
+            cardList: [],
             cardCaseInfo: {},
             chooseIds: [],
             banners: []
         };
     },
     computed: {
-        img() {
-            const imgs = [
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-04-40tPoNRlQq.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-07NiBLdSgT.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-04-40tPoNRlQq.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-07NiBLdSgT.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-04-40tPoNRlQq.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-07NiBLdSgT.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-04-40tPoNRlQq.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-07NiBLdSgT.jpg',
-                'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-28LCsyYvYX.jpg'
-            ];
-            return imgs;
-        },
         time() {
             if (this.cardCaseInfo.endTime) {
                 let date = dayjs(this.cardCaseInfo.endTime, 'YYYY-MM-DD HH:mm:ss');
@@ -167,16 +157,17 @@ export default {
                 .get('/cardCase/showInfoMA?caseId=' + this.$mp.options.id)
                 .then(res => {
                     this.hideLoading();
-                    console.log(res);
+                    // console.log(res);
+                    // console.log(res.cardCaseInfo.cardCaseId);
                     this.detailsList = res.groupBoxMap;
                     this.cardCaseInfo = res.cardCaseInfo || {};
+                    this.cardList = res.cardCaseInfo.cardDTOs;
                     this.banners = res.cardCaseInfo.images;
                     return this.$http.get('/store/get/' + res.cardCaseInfo.storeId);
                 })
                 .then(res => {
                     console.log(res);
                     this.storeInfo = res;
-                    // console.log(this.storeInfo.id);
                 })
                 .catch(e => {
                     this.hideLoading();
@@ -187,7 +178,6 @@ export default {
         },
         result() {
             this.navigateTo('/pages/unpacking?id=' + this.cardCaseInfo.cardCaseId);
-            // this.navigateTo('/pages/unpacking');
         },
         // 确认订单
         purchase() {
@@ -258,7 +248,6 @@ export default {
         border-radius: 8px;
     }
     .box-tit {
-        height: 24px;
         font-size: 20px;
         font-weight: bold;
         color: #000000;
@@ -267,7 +256,6 @@ export default {
     }
     .box-live {
         width: 88px;
-        height: 26px;
         background: #ff6c00;
         border-radius: 4px;
         .flex();
@@ -278,7 +266,6 @@ export default {
             padding-left: 4px;
         }
         p {
-            height: 22px;
             font-size: 12px;
             font-weight: 400;
             color: #ffffff;
@@ -296,7 +283,6 @@ export default {
         }
         p {
             font-family: 'OSP';
-            height: 22px;
             font-size: 30px;
             font-weight: normal;
             color: #f42202;
@@ -313,7 +299,6 @@ export default {
             background: #ff6c0020;
             border-radius: 8px;
             p {
-                height: 22px;
                 font-size: 13px;
                 font-weight: 400;
                 color: #00000040;
@@ -322,7 +307,6 @@ export default {
                 margin-top: 15px;
             }
             .val {
-                height: 26px;
                 font-size: 16px;
                 font-weight: bold;
                 color: @prim;
@@ -344,7 +328,6 @@ export default {
             background: #ff6c0020;
             border-radius: 8px;
             p {
-                height: 22px;
                 font-size: 13px;
                 font-weight: 400;
                 color: #00000040;
@@ -353,7 +336,6 @@ export default {
                 margin-top: 15px;
             }
             span {
-                height: 26px;
                 font-size: 16px;
                 font-weight: bold;
                 color: @prim;
@@ -382,14 +364,12 @@ export default {
                 }
                 .logo-shop {
                     p {
-                        height: 24px;
                         font-size: 15px;
                         font-weight: bold;
                         color: #000000;
                         line-height: 24px;
                     }
                     span {
-                        height: 22px;
                         font-size: 12px;
                         font-weight: 400;
                         color: rgba(0, 0, 0, 0.3);
@@ -399,7 +379,6 @@ export default {
             }
             .logo-btn {
                 width: 68px;
-                height: 34px;
                 background: #f5f7fa;
                 border-radius: 8px;
                 font-size: 13px;
@@ -410,6 +389,13 @@ export default {
             }
         }
     }
+    h2 {
+        font-size: 18px;
+        font-weight: bold;
+        color: #000000;
+        line-height: 28px;
+        margin-top: 17px;
+    }
     h3 {
         font-size: 18px;
         font-weight: bold;
@@ -424,21 +410,33 @@ export default {
         line-height: 28px;
         margin: 10px 0 15px 0;
     }
-    .boxImg {
-        // /deep/ ._swiper {
-        //     ._swiper-item {
-        //         width: 110px !important;
-        //     }
-        // }
+    .cardBox {
         .flex();
         overflow: hidden;
         overflow-x: auto;
-        margin-top: 15px;
-        img {
-            width: 110px;
-            height: 150px;
-            margin-right: 2px;
-            border-radius: 8px;
+        .cardList {
+            .boxImg {
+                .flex();
+                margin-top: 15px;
+                img {
+                    top: 0;
+                    width: 110px;
+                    height: 150px;
+                    margin-right: 2px;
+                    border-radius: 8px;
+                    display: inline-block;
+                }
+            }
+            .name {
+                .flex();
+                p {
+                    min-height: 50px;
+                    overflow: hidden;
+                    font-size: 12px;
+                    color: #303133;
+                    padding-left: 2px;
+                }
+            }
         }
     }
     .box-footer {
@@ -456,7 +454,6 @@ export default {
             justify-content: space-between;
             margin-right: 44px;
             div {
-                height: 28px;
                 font-size: 16px;
                 font-weight: bold;
                 color: #000000;
@@ -464,7 +461,6 @@ export default {
             }
         }
         p {
-            height: 28px;
             width: 20px;
             font-size: 16px;
             font-weight: 500;
@@ -481,7 +477,6 @@ export default {
                     height: 24px;
                 }
                 p {
-                    height: 14px;
                     font-size: 10px;
                     font-weight: 400;
                     color: #1a1a1a;

+ 1 - 1
src/pages/orderdetails.vue

@@ -9,11 +9,11 @@
     <div class="container">
         <div class="box-top">
             <p>{{ status.label }}</p>
-            <h3 v-if="status.orderStatus !== 'CREATED'">{{ status.name }}</h3>
             <h3 v-if="status.orderStatus == 'CREATED'">
                 请尽快支付,<span v-if="minters < 10">0</span>{{ minters }}分<span v-if="seconds < 10">0</span
                 >{{ seconds }} 后未支付将自动取消订单
             </h3>
+            <h3 v-else>{{ status.name }}</h3>
         </div>
         <div class="box-adderss">
             <div

+ 49 - 68
src/pages/unpacking.vue

@@ -6,11 +6,10 @@
 </config>
 <template>
     <div>
-        <div class="product-card" v-for="(item, index) in cardList" :key="index.id">
-            <van-image width="90" height="130" :src="item.avatar" fit="cover" radius="6" />
+        <div class="product-card" @click="detail">
+            <van-image width="90" height="130" :src="cardCaseInfo.images" fit="cover" radius="6" />
             <div class="product-content">
-                <!-- <div class="text1">{{ info.name }}</div> -->
-                <div class="text1">精灵三弹</div>
+                <div class="text1">{{ cardCaseInfo.caseName }}</div>
                 <div class="text2">
                     <span>已结束</span>
                 </div>
@@ -20,8 +19,7 @@
                 <div class="flex1"></div>
                 <div class="price">
                     <van-icon size="10" :color="$colors.red" name="jiage" class-prefix="iconfont" />
-                    <!-- <span>{{ info.price }}</span> -->
-                    <span>10</span>
+                    <span>{{ cardCaseInfo.price }}</span>
                 </div>
                 <div class="button">
                     <van-button type="info" size="small">已开箱</van-button>
@@ -29,23 +27,23 @@
             </div>
         </div>
         <div class="border"></div>
-        <h3>购买记录</h3>
-        <div class="box" v-for="(item, index) in list" :key="index">
+        <h3>开箱记录</h3>
+        <div class="box" v-for="(card, index) in cardList" :key="index">
             <div class="box-tit">
-                <van-image width="30" height="30" :src="item.avatar" fit="cover" radius="16" />
-                <p>{{ item.userNickName }}</p>
+                <van-image width="30" height="30" :src="card.avatar" fit="cover" radius="16" />
+                <p>{{ card.userName }}</p>
             </div>
             <div class="border"></div>
-            <div class="box-con-Cards">
+            <div class="box-con-Cards" v-for="item in card.details" :key="item">
                 <van-image width="60" height="90" :src="item.image" fit="cover" radius="6" />
                 <div class="box-con-right">
                     <p class="box-con-tit">{{ item.cardName }}</p>
                     <div class="box-con-today">
-                        <p>卡盒选号:{{ item.boxName }}</p>
+                        <p>卡盒选号:{{ card.boxName }}</p>
                     </div>
                     <div class="box-con-money">
                         <div class="box-con-num">
-                            <p>¥{{ item.money }}</p>
+                            <p>¥{{ item.value }}</p>
                         </div>
                         <p>×1</p>
                     </div>
@@ -58,64 +56,47 @@
 export default {
     data() {
         return {
-            list: [
-                {
-                    cardName: '精灵一弹',
-                    boxName: '1组1号',
-                    money: '1',
-                    image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-04-40tPoNRlQq.jpg',
-                    avatar:
-                        'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/avatar/2021-05-27-19-56-49LesdfsPu.jpg',
-                    userNickName: 'Augenstern'
-                },
-                {
-                    cardName: '精灵二弹',
-                    boxName: '6组6号',
-                    money: '10',
-                    image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-07NiBLdSgT.jpg',
-                    avatar:
-                        'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/avatar/2021-05-18-13-40-27QsoTBswx.jpg',
-                    userNickName: '群马'
-                },
-                {
-                    cardName: '精灵三弹',
-                    boxName: '8组8号',
-                    money: '100',
-                    image: 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-06-08-15-05-28LCsyYvYX.jpg',
-                    avatar:
-                        'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/avatar/2021-05-14-16-36-59ouaBmhON.jpg',
-                    userNickName: '奶盖'
-                }
-            ],
-            cardList: [
-                {
-                    avatar:
-                        'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/avatar/2021-05-27-19-56-49LesdfsPu.jpg'
-                }
-            ]
+            cardList: [],
+            cardCaseInfo: {}
         };
     },
     methods: {
-        // getFn() {
-        // this.showLoading();
-        // this.$http
-        //     .get('' + this.$mp.options.id)
-        //     .then(res => {
-        //         this.hideLoading();
-        //         this.list = res;
-        //         console.log(res);
-        //     })
-        //     .catch(e => {
-        //         this.hideLoading();
-        //         if (e.error) {
-        //             this.toast(e.error);
-        //         }
-        //     });
-        // }
+        getFn() {
+            this.showLoading();
+            this.$http
+                .get('/cardCase/showInfoMA?caseId=' + this.$mp.options.id)
+                .then(res => {
+                    this.hideLoading();
+                    this.cardCaseInfo = res.cardCaseInfo || {};
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.error);
+                    }
+                });
+            this.showLoading();
+            this.$http
+                .post('/caseResult/getResult', { caseId: this.$mp.options.id })
+                .then(res => {
+                    this.hideLoading();
+                    this.cardList = res;
+                })
+                .catch(e => {
+                    this.hideLoading();
+                    if (e.error) {
+                        this.toast(e.error);
+                    }
+                });
+        },
+        detail() {
+            console.log('1111');
+            this.navigateBack();
+        }
+    },
+    created() {
+        this.getFn();
     }
-    // created() {
-    //     this.getFn();
-    // }
 };
 </script>
 <style lang="less" scoped>
@@ -137,7 +118,6 @@ h3 {
 }
 .box {
     width: 335px;
-    height: 170px;
     background: #f5f7fa;
     border-radius: 6px;
     margin: 0 0 16px 20px;
@@ -168,6 +148,7 @@ h3 {
     .box-con-Cards {
         margin-left: 20px;
         display: flex;
+        padding-bottom: 10px;
         .box-con-right {
             width: 237px;
             margin-left: 8px;