Bladeren bron

no message

linwenxin 5 maanden geleden
bovenliggende
commit
151375526b
1 gewijzigde bestanden met toevoegingen van 44 en 65 verwijderingen
  1. 44 65
      src/packageMine/pages/salesProfit/index.vue

+ 44 - 65
src/packageMine/pages/salesProfit/index.vue

@@ -1,5 +1,4 @@
 <template>
-  <!-- #ifdef H5 -->
   <zj-page-layout
     :isScroll="true"
     :refresherTriggered="refresherTriggered"
@@ -67,105 +66,99 @@
     </view>
     <Loading :loadStatus="loadStatus" :dataList="dataList" />
   </zj-page-layout>
-  <!-- #endif -->
-
-  <!-- #ifndef H5 -->
-  <web-view
-    :src="webViewHref(`/packageMine/pages/salesProfit/index`, pam, crossPagePam)"
-    @message="crossPage.$listener"
-  ></web-view>
-  <!-- #endif -->
 </template>
 
 <script>
-// #ifdef H5
 export default {
   filters: {
     statusFilter(val) {
       const MAP = {
         WAIT: '待结算',
-      //  WAIT_ING: '可提现',
-      //  ING: '提现中',
+        //  WAIT_ING: '可提现',
+        //  ING: '提现中',
         OVER: '已结算',
         YC: '异常结算',
-        OK : '已结算',
-        LINE: '线下结算',
+        OK: '已结算',
+        LINE: '线下结算'
       }
-      return MAP[val];
-    },
+      return MAP[val]
+    }
   },
 
   data() {
     return {
       refresherTriggered: false,
       count: {},
-		dataList: [], // 收益列表
-		pageNum: 1,
+      dataList: [], // 收益列表
+      pageNum: 1,
       loadStatus: 0,
-      refresherTriggered: false,
+      refresherTriggered: false
     }
   },
 
   onLoad() {
-    this.getCount();
-	this.getList();
+    this.getCount()
+    this.getList()
 
     this.crossPage.$on('refreshSalesProfitIndex', () => {
-      this.getCount();
-      this.refreshList();
-    });
+      this.getCount()
+      this.refreshList()
+    })
   },
 
   onUnload() {
-    this.crossPage.$off('refreshSalesProfitIndex');
+    this.crossPage.$off('refreshSalesProfitIndex')
   },
 
   methods: {
     getCount() {
-      this.$api.post('/withdrawal/amount/count')
-      .then(res => {
-        this.count = res.data || {};
+      this.$api.post('/withdrawal/amount/count').then(res => {
+        this.count = res.data || {}
       })
     },
 
     // 获取列表
     getList() {
-    	this.$api.post('/settlementOrder/list/pageV2', {
-        pageNum: this.pageNum,
-        pageSize: 10,
-    	}).then(res => {
-    		this.loadStatus = 0;
-    		let list = res.data.records;
-    		if (list.length < 10) {
-    		  this.loadStatus = 2;
-    		}
-    		this.dataList = this.dataList.concat(list);
-    	}).catch(() => {
-        this.loadStatus = 2;
-      }).finally(res => {
-        this.refresherTriggered = false;
-      })
+      this.$api
+        .post('/settlementOrder/list/pageV2', {
+          pageNum: this.pageNum,
+          pageSize: 10
+        })
+        .then(res => {
+          this.loadStatus = 0
+          let list = res.data.records
+          if (list.length < 10) {
+            this.loadStatus = 2
+          }
+          this.dataList = this.dataList.concat(list)
+        })
+        .catch(() => {
+          this.loadStatus = 2
+        })
+        .finally(res => {
+          this.refresherTriggered = false
+        })
     },
 
     // 滚动到底部
     scrolltolower(e) {
       if (this.loadStatus === 0) {
-        this.pageNum++;
-        this.getList();
+        this.pageNum++
+        this.getList()
       }
     },
 
     // 触发下拉刷新
     refresherrefresh(e) {
-      this.refresherTriggered = true;
-      this.getCount();
-      this.refreshList();
+      this.refresherTriggered = true
+      this.getCount()
+      this.refreshList()
     },
 
     refreshList() {
-      this.dataList = [];
-      this.pageNum = 1;
-      this.getList();
+      this.dataList = []
+      this.pageNum = 1
+      this.getList()
     },
 
     navToPage(url) {
@@ -184,23 +177,9 @@ export default {
           url: `/packageMaterial/pages/newSale/orderDetail?id=${item.orderId}`
         })
       }
-    },
-  },
-}
-
-// #endif
-// #ifndef H5
-export default {
-  data() {
-    return {
-      pam: {},
     }
-  },
-  onLoad(pam) {
-    this.pam = pam;
   }
 }
-// #endif
 </script>
 
 <style lang="scss" scoped>