product-profit-transaction.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>交易分润-产品中心-创业帮</title>
  6. <meta name="keywords" content="交易分润-产品中心-创业帮">
  7. <meta name="description" content="交易分润-产品中心-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="交易分润-产品中心-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <style>.van-cell__title{flex:2}</style>
  17. </head>
  18. <body class="bgc-back h100p ovh pt0" style="padding-top:0;">
  19. <div id="app">
  20. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow :title="'交易分润-'+title" v-if="toptitleisshow" @click-left="goback">
  21. <template #left> <img src="./static/images/left.png" alt=""></template>
  22. </van-nav-bar>
  23. <div class="bgcfff" v-cloak>
  24. <div class="ovh-x" ref="wrapper1">
  25. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;" :class="transactions.length === 0 ? 'isnodata':''">
  26. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  27. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  28. <van-cell-group :border="false">
  29. <van-cell v-for="item,index in transactions" :title="item.TradeMonth+'分润'" :value="item.TradeProfit + '元'" :label="'入账时间:' + item.CreateDate " title-class="f14 c333" value-class="f14 c333" center></van-cell>
  30. </van-cell-group>
  31. </van-list>
  32. </van-pull-refresh>
  33. </div>
  34. </div>
  35. </div>
  36. <script src="./static/js/klm-vv.min.js"></script>
  37. <script src="./static/js/appfunc.min.js"></script>
  38. <script src="./static/js/klm-axios-config.js"></script>
  39. <script src="./static/js/publicfn.js"></script>
  40. <script>
  41. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  42. // 可以通过下面的方式手动注册
  43. Vue.use(vant.Lazyload);
  44. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  45. // 在 #app 标签下渲染一个按钮组件
  46. let app = new Vue({
  47. el: '#app',
  48. data() {
  49. return {
  50. isnodata:false,
  51. toptitleisshow:false,
  52. title:'',
  53. transactions: [
  54. ],
  55. loading: false,
  56. finished: false,
  57. refreshing: false,
  58. pageinfo:{
  59. PageSize:10,
  60. PageNum:1
  61. },
  62. };
  63. },
  64. created(){
  65. this.toptitleisshow = toptitleisshow;
  66. this.title = PublicLib.getCookieInfo('productMachineType');
  67. PublicLib.SetTitle({Title:'交易分润-'+ PublicLib.getCookieInfo('productMachineType')});
  68. this.getprofitlist('refresh');
  69. },
  70. beforeUpdate() {
  71. this.$nextTick(() => {
  72. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight}px`;
  73. });
  74. },
  75. methods: {
  76. onLoad() {
  77. if (this.refreshing) {
  78. //- this.transactions = [];
  79. this.refreshing = false;
  80. this.pageinfo.PageNum = 0;
  81. };
  82. this.pageinfo.PageNum++;
  83. this.getprofitlist();
  84. },
  85. onRefresh() {
  86. this.finished = false;
  87. this.loading = true;
  88. this.pageinfo.PageNum = 1;
  89. this.getprofitlist('refresh');
  90. },
  91. goback(){
  92. PublicLib.GoBack({Level:1});
  93. },
  94. async getprofitlist(type = 'onload'){
  95. //- PublicLib.ShowLoading({Message:''});
  96. const ProductType = PublicLib.getCookieInfo('productMachineId');
  97. const UserId = PublicLib.getCookieInfo('userId');
  98. const res = await getRequest('api/v1/pos/profitrewardrecord/tradeprofitlist?t='+Math.random(6),JSON.stringify({...this.pageinfo,ProductType,UserId}));
  99. if(res.status !== '1')return tips('交易分润列表获取失败!');
  100. //- res.data = [{}];
  101. //- PublicLib.HideLoading();
  102. if(res.data.length < this.pageinfo.PageSize) {
  103. this.finished = true;
  104. };
  105. if(type === 'refresh'){
  106. this.transactions = res.data
  107. this.refreshing = false;
  108. }else{
  109. this.transactions.push(...res.data);
  110. }
  111. this.loading = false;
  112. if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
  113. }
  114. }
  115. });
  116. </script>
  117. </body>
  118. </html>