Bladeren bron

首页滑动

xuqiang 4 jaren geleden
bovenliggende
commit
a0fa76fb14
5 gewijzigde bestanden met toevoegingen van 71 en 53 verwijderingen
  1. 2 2
      src/components/NavHeader.vue
  2. 65 43
      src/pages/Home.vue
  3. 1 1
      src/pages/allorder.vue
  4. 3 0
      src/pages/confirmorder.vue
  5. 0 7
      src/pages/merchantorders.vue

+ 2 - 2
src/components/NavHeader.vue

@@ -35,13 +35,13 @@ export default {
     left: 0;
     right: 0;
     position: fixed;
-    z-index: 999;
+    z-index: 100;
     transition: all ease-in-out 0.3s;
     padding: 0 15px;
     .flex();
     ._van-icon {
         position: relative;
-        z-index: 999;
+        z-index: 100;
     }
 }
 </style>

+ 65 - 43
src/pages/Home.vue

@@ -6,27 +6,34 @@
 </config>
 <template>
     <div class="container">
-        <van-sticky>
-            <img
-                class="mytest"
-                src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-01-17-33-55YcQJEaXa.png"
-                alt=""
-            />
-            <div class="top">
+        <div class="top">
+            <van-sticky>
                 <div class="address">
+                    <img
+                        class="mytest"
+                        src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-15-18-12-24gMHNYyeC.png"
+                        alt=""
+                    />
                     <img class="avatar" v-if="userInfo" :src="userInfo.avatar" />
                     <div @click.stop="navigateTo('/pages/schoolsearch')">
                         <div class="text1">南京***大学</div>
                         <div class="text1">江宁校区</div>
                     </div>
                     <van-image
-                        style="margin:25px 0 0 -13px"
+                        style="margin: 25px 0 0 -13px;"
                         width="16"
                         height="16"
                         lazy-load
                         src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-10-33-11pcsYuQkQ.png"
                     />
                 </div>
+            </van-sticky>
+            <div class="con">
+                <img
+                    class="mytest2"
+                    src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-01-17-33-55YcQJEaXa.png"
+                    alt=""
+                />
                 <div class="search">
                     <van-field
                         :value="searchVal"
@@ -43,6 +50,8 @@
                     </swiper-item>
                 </swiper>
             </div>
+        </div>
+        <van-sticky :offset-top="118">
             <div class="tab">
                 <img
                     class="imges"
@@ -92,10 +101,11 @@
 import { mapState } from 'vuex';
 export default {
     computed: {
-        ...mapState(['userInfo'])
+        ...mapState(['userInfo', 'systemInfo'])
     },
     data() {
         return {
+            scrollTop: 0,
             banners: ['https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-10-17-40-54wLiqaRNi.png'],
             merchantorLists: [
                 {
@@ -117,20 +127,14 @@ export default {
 </script>
 <style lang="less" scoped>
 .container {
-    .mytest {
-        .mytest();
-        height: 288px;
-        img {
-            width: 100vw;
-            display: block;
-        }
-    }
+    padding-bottom: 460px;
     .top {
-        padding: 60px 16px 0 16px;
+        padding: 0 16px;
         .address {
+            padding-top: 60px;
             .flex();
             .avatar {
-                margin-right: 6px;
+                margin: 0 6px 0 16px;
                 width: 48px;
                 height: 48px;
                 border-radius: 8px !important;
@@ -141,33 +145,51 @@ export default {
                 color: #ffffff;
                 line-height: 20px;
             }
-        }
-        .search {
-            margin: 15px 0 20px 0;
-            /deep/ .van-cell {
-                --cell-vertical-padding: 4px;
-                width: 100%;
-                height: 32px;
-                background: rgb(99, 184, 252);
-                border-radius: 21px;
-            }
-            ::after {
-                border-bottom: 0;
+            .mytest {
+                .mytest();
+                height: 118px;
+                img {
+                    width: 100vw;
+                    display: block;
+                }
             }
-            /deep/ .van-cell__left-icon-wrap {
-                margin-left: 44%;
-                color: #fff;
+        }
+        .con {
+            .mytest2 {
+                .mytest();
+                height: 288px;
+                img {
+                    width: 100vw;
+                    display: block;
+                }
             }
-            /deep/ .van-field__placeholder {
-                color: #fff;
+            .search {
+                margin: 15px 0 20px;
+                /deep/ .van-cell {
+                    --cell-vertical-padding: 4px;
+                    width: 100%;
+                    height: 32px;
+                    background: rgb(99, 184, 252);
+                    border-radius: 21px;
+                }
+                ::after {
+                    border-bottom: 0;
+                }
+                /deep/ .van-cell__left-icon-wrap {
+                    margin-left: 44%;
+                    color: #fff;
+                }
+                /deep/ .van-field__placeholder {
+                    color: #fff;
+                }
             }
-        }
-        .swiper {
-            width: 100%;
-            height: 160px;
-            img {
+            .swiper {
                 width: 100%;
-                height: 100%;
+                height: 160px;
+                img {
+                    width: 100%;
+                    height: 100%;
+                }
             }
         }
     }
@@ -182,7 +204,7 @@ export default {
             line-height: 22px;
             z-index: 999;
             margin: 26px 34px 0 0;
-            padding-bottom: 11px;
+            padding-bottom: 10px;
             &.active {
                 font-size: 18px;
                 color: @prim;

+ 1 - 1
src/pages/allorder.vue

@@ -95,7 +95,7 @@ export default {
         justify-content: space-between;
         position: fixed;
         top: 0;
-        width: 92%;
+        width: 91%;
         padding: 18px 16px 10px 16px;
         .tab-item {
             font-size: 14px;

+ 3 - 0
src/pages/confirmorder.vue

@@ -338,6 +338,9 @@ export default {
     /deep/ .van-button {
         .button();
     }
+    /deep/ .van-popup {
+        margin-bottom: 0;
+    }
     /deep/ .van-action-sheet__description {
         color: #000;
     }

+ 0 - 7
src/pages/merchantorders.vue

@@ -293,13 +293,6 @@ export default {
     },
     computed: {
         ...mapState(['userInfo'])
-        // canSubmit() {
-        //     if (this.tal) {
-        //         return true;
-        //     } else {
-        //         return false;
-        //     }
-        // }
     },
     methods: {
         tab(item) {