Procházet zdrojové kódy

fix(SCRM-4202): Incident - 手机小程序开不了6月17日之前的发票

john před 2 roky
rodič
revize
791b6dbcd6

+ 13 - 0
src/pages/parkingFee/mixins/parkingReceipt/parkingReceipt.js

@@ -94,6 +94,10 @@ export default {
       'previousUrl',
       '/pages/parkingFee/parkingReceipt/parkingReceipt.vue'
     );
+    window.addEventListener('scroll', this.choice_card_scroll)
+  },
+  destroyed() {
+    window.removeEventListener('scroll', this.choice_card_scroll)
   },
   mounted() {
     // const member = uni.getStorageSync('member')
@@ -222,6 +226,15 @@ export default {
         this.getInvoiceList();
       }
     },
+    choice_card_scroll(e) {
+      const scrollable = e.srcElement.scrollingElement;
+      const isAtBottom = scrollable.scrollHeight - scrollable.scrollTop <= scrollable.clientHeight;
+      if (isAtBottom) {
+        // 已经滑动到底部
+        // console.log('滑动到底部');
+        this.scrollLower()
+      }
+    },
     getInvoiceList: async function (){
       const self = this;
       // const openId = MemberCacheTool.getOpenId(app)

+ 4 - 2
src/pages/parkingFee/parkingReceipt/parkingReceipt.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="['scroll-Y', theme]" @scrolltolower="scrollLower">
+  <div :class="['scroll-Y', theme]">
     <!-- <authorize ref="authorize"></authorize> -->
     <div class="choice">
       <!-- <LoginDom></LoginDom> -->
@@ -133,6 +133,7 @@
         </van-checkbox-group>
         
       </div>
+      <div style="height:100px;background-color: transparent;width: 100%;"></div>
     </div>
     <div v-show="isLoadMore" :class="{ noData: !list.length }">
       <img :src="noData" v-if="!list.length" alt=""/>
@@ -173,7 +174,8 @@ export default {
   width: 100%;
   display: flex;
   flex-direction: column;
-  height: 100vh;
+  height: 100%;
+  min-height: 100vh;
   // padding-bottom: 100px;
   background: #F4F7FF;
   .uni-list-cell {