xuqiang-97 4 سال پیش
والد
کامیت
bc07694dd4

+ 1 - 1
project.config.json

@@ -148,7 +148,7 @@
                     "id": -1,
                     "name": "拼箱详情",
                     "pathName": "/pages/details",
-                    "query": "id=209"
+                    "query": "id=2353"
                 },
                 {
                     "id": -1,

+ 0 - 1
src/components/AllorderInfo.vue

@@ -195,7 +195,6 @@ export default {
                 })
                 .then(res => {
                     res.package = res.packageValue;
-                    // console.log(res);
                     wx.requestPayment({
                         ...res,
                         success: () => {

+ 19 - 6
src/components/CardCase.vue

@@ -93,9 +93,20 @@ export default {
             let list = [...this.allCards].filter(item => {
                 return [...choose].includes(item.id);
             });
-
             return list.reduce((prev, cur) => {
-                return prev + cur.money;
+                var r1, r2, m;
+                try {
+                    r1 = prev.toString().split('.')[1].length;
+                } catch (e) {
+                    r1 = 0;
+                }
+                try {
+                    r2 = cur.money.toString().split('.')[1].length;
+                } catch (e) {
+                    r2 = 0;
+                }
+                m = Math.pow(10, Math.max(r1, r2));
+                return (prev * m + cur.money * m) / m;
             }, 0);
         }
     },
@@ -144,10 +155,12 @@ export default {
                     let checkResult = false;
                     checkResult = res;
                     if (!checkResult) {
-                        wx.showToast({
-                            icon: 'none',
-                            title: '该卡箱需要两个卡包组选择数量一样'
-                        });
+                        // wx.showToast({
+                        //     icon: 'none',
+                        //     title: '该卡箱需要两个卡包组选择数量一样'
+                        // });
+                        this.toast('该卡箱需要两个卡包组选择数量一样');
+                        console.log('====');
                         return Promise.reject();
                     } else {
                         return Promise.resolve();

+ 1 - 0
src/components/SeriesSelect.vue

@@ -44,6 +44,7 @@ export default {
                         }
                     )
                     .then(res => {
+                        console.log(res);
                         this.columns = res.content;
                     });
             } else {

+ 137 - 2
src/pages/Applydetails.vue

@@ -14,6 +14,39 @@
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;渠道返回,请注意查收</span
             >
         </div>
+        <div class="bor"></div>
+        <div class="con">
+            <div class="price">
+                <p>退款总金额</p>
+                <span>¥970</span>
+            </div>
+            <div class="box-tit">
+                <div>
+                    <img src="/native/tabbar/icon_kapai_shangjia_da@3x.png" alt="" />
+                    <p>光之城卡牌</p>
+                </div>
+                <div class="box-tit-seller">联系卖家</div>
+            </div>
+            <div>
+                <div class="box-con">
+                    <div class="box-con-Cards">
+                        <img src="../native/imgs/marker.png" alt="" />
+                        <div class="box-con-right">
+                            <p class="box-con-tit">1105皇权破晓</p>
+                            <div class="box-con-today">
+                                <p>卡盒选号:卡包02—A</p>
+                            </div>
+                            <div class="box-con-money">
+                                <div class="box-con-num">
+                                    <p>¥320</p>
+                                </div>
+                                <p>×1</p>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
     </div>
 </template>
 <script>
@@ -23,9 +56,8 @@ export default {
 </script>
 <style lang="less" scoped>
 .apply {
-    margin: 0 20px;
     .top {
-        margin: 30px 40px 16px 40px;
+        margin: 30px 60px 16px;
         img {
             width: 60px;
             height: 60px;
@@ -46,5 +78,108 @@ export default {
             line-height: 24px;
         }
     }
+    .bor {
+        height: 5px;
+        background: #f5f7fa;
+        width: 100%;
+    }
+    .con {
+        padding: 0 20px;
+        .price {
+            .flex();
+            line-height: 70px;
+            color: #f42202;
+            justify-content: space-between;
+            p {
+                font-size: 14px;
+                font-weight: bold;
+            }
+            span {
+                font-size: 16px;
+                font-weight: bold;
+            }
+        }
+        .box-tit {
+            margin: 21px 0 16px 0;
+            .flex();
+            justify-content: space-between;
+            div {
+                .flex();
+                img {
+                    width: 17px;
+                    height: 17px;
+                }
+                p {
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #000000;
+                    margin-left: 2px;
+                }
+            }
+            .box-tit-seller {
+                font-size: 14px;
+                font-weight: 400;
+                color: #000;
+                line-height: 22px;
+            }
+        }
+        .box-con {
+            height: 160px;
+            background: #ffffff;
+            border-radius: 12px;
+            .box-con-Cards {
+                display: flex;
+                img {
+                    width: 62px;
+                    height: 90px;
+                    border-radius: 6px;
+                }
+                .box-con-right {
+                    width: 237px;
+                    margin-left: 8px;
+                    .box-con-tit {
+                        font-size: 16px;
+                        font-weight: bold;
+                        color: #000000;
+                        margin: 5px 0 10px 0;
+                    }
+                }
+                .box-con-today {
+                    .flex();
+                    height: 30px;
+                    background: #f5f7fa;
+                    border-radius: 6px;
+                    width: 142px;
+                    p {
+                        font-size: 14px;
+                        font-weight: 400;
+                        color: #303133;
+                    }
+                }
+                .box-con-money {
+                    .flex();
+                    justify-content: space-between;
+                    margin-top: 28px;
+                    .box-con-num {
+                        .flex();
+                        img {
+                            width: 16px;
+                            height: 16px;
+                        }
+                        p {
+                            font-size: 14px;
+                            font-weight: normal;
+                            color: #c8c9cc;
+                        }
+                    }
+                    p {
+                        font-size: 14px;
+                        font-weight: 400;
+                        color: #c8c9cc;
+                    }
+                }
+            }
+        }
+    }
 }
 </style>

+ 28 - 6
src/pages/Home.vue

@@ -12,11 +12,7 @@
         <van-sticky>
             <div class="container-bg">
                 <div class="mytest">
-                    <img
-                        class="mytest"
-                        src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/home_top_bg3x.jpg"
-                        alt=""
-                    />
+                    <img class="mytest" :src="bgImg" alt="" />
                 </div>
                 <span>{{ seriesName }}</span>
                 <div class="box-top">
@@ -99,9 +95,18 @@ export default {
             collectionId: 0,
             seriesId: 0,
             seriesName: '',
-            isSeries: true
+            isSeries: true,
+            columns: []
         };
     },
+    computed: {
+        bgImg() {
+            let info = [...this.columns].find(item => {
+                return item.id === this.seriesId;
+            });
+            return info ? info.image : '';
+        }
+    },
     methods: {
         getSeries() {
             return this.$http
@@ -162,6 +167,22 @@ export default {
                         this.toast(e.rror);
                     }
                 });
+            this.$http
+                .post(
+                    '/series/all',
+                    {
+                        page: 0,
+                        size: 100
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
+                .then(res => {
+                    this.columns = res.content;
+                });
         },
         searchData(e) {
             this.collectionId = 0;
@@ -232,6 +253,7 @@ export default {
     }
     .container-bg {
         padding-top: 54px;
+        background-color: rgba(0, 0, 0, 0.5);
 
         &::after {
             content: '';

+ 7 - 14
src/pages/orderdetails.vue

@@ -563,13 +563,11 @@ export default {
         background: #f5f7fa;
     }
     .box-tit {
-        display: flex;
-        align-items: center;
+        .flex();
         justify-content: space-between;
         margin: 20px 20px 0 20px;
         div {
-            display: flex;
-            align-items: center;
+            .flex();
             img {
                 width: 17px;
                 height: 17px;
@@ -616,12 +614,11 @@ export default {
                 }
             }
             .box-con-today {
-                display: flex;
+                .flex();
                 height: 30px;
                 background: #f5f7fa;
                 border-radius: 6px;
                 width: 142px;
-                align-items: center;
                 p {
                     height: 24px;
                     font-size: 14px;
@@ -631,13 +628,11 @@ export default {
                 }
             }
             .box-con-money {
-                display: flex;
-                align-items: center;
+                .flex();
                 justify-content: space-between;
                 margin-top: 28px;
                 .box-con-num {
-                    display: flex;
-                    align-items: center;
+                    .flex();
                     img {
                         width: 16px;
                         height: 16px;
@@ -663,8 +658,7 @@ export default {
     .box-buttom {
         margin: 35px 20px;
         .box-buttom-con {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             p {
                 height: 20px;
@@ -698,8 +692,7 @@ export default {
     .box-footer {
         margin: 15px 20px;
         .box-footer-con {
-            display: flex;
-            align-items: center;
+            .flex();
             justify-content: space-between;
             .box-footer-cr {
                 display: flex;