product-profit-flow.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. </head>
  17. <body class="bgc-back h100p ovh pt0" style="padding-top:0;">
  18. <div id="app">
  19. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow :title="'流量卡分佣-'+title" v-if="toptitleisshow" @click-left="goback">
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <div class="bgcfff">
  23. <div class="ovh-x" ref="wrapper1">
  24. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;" :class="transactions.length === 0 ? 'isnodata':''">
  25. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  26. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  27. <van-cell-group :border="false">
  28. <van-cell v-for="item,index in transactions" @click="bootdetail(item.TradeMonth,item.TradeMonthValue)" :title="item.TradeMonth" :value="item.FluxProfitAmt + '元'" title-class="f12 c333" value-class="f12 c333" center is-link></van-cell>
  29. </van-cell-group>
  30. </van-list>
  31. </van-pull-refresh>
  32. </div>
  33. </div>
  34. </div>
  35. <script src="./static/js/klm-vv.min.js"></script>
  36. <script src="./static/js/appfunc.min.js"></script>
  37. <script src="./static/js/klm-axios-config.js"></script>
  38. <script src="./static/js/publicfn.js"></script>
  39. <script>
  40. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  41. // 可以通过下面的方式手动注册
  42. Vue.use(vant.Lazyload);
  43. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  44. // 在 #app 标签下渲染一个按钮组件
  45. let app = new Vue({
  46. el: '#app',
  47. data() {
  48. return {
  49. isnodata:false,
  50. toptitleisshow:false,
  51. title:'',
  52. transactions: [
  53. ],
  54. pageinfo:{
  55. PageSize:10,
  56. PageNum:1
  57. },
  58. loading: false,
  59. finished: false,
  60. refreshing: false,
  61. };
  62. },
  63. created(){
  64. this.toptitleisshow = toptitleisshow;
  65. this.title = PublicLib.getCookieInfo('productMachineType');
  66. this.getprofitlist('refresh');
  67. PublicLib.SetTitle({Title:'流量卡分佣-'+ PublicLib.getCookieInfo('productMachineType')});
  68. },
  69. beforeUpdate() {
  70. this.$nextTick(() => {
  71. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight}px`;
  72. });
  73. },
  74. methods: {
  75. onLoad() {
  76. if (this.refreshing) {
  77. //- this.transactions = [];
  78. this.refreshing = false;
  79. this.pageinfo.PageNum = 0;
  80. };
  81. this.pageinfo.PageNum++;
  82. this.getprofitlist();
  83. },
  84. bootdetail(time,time2){
  85. PublicLib.putCookieInfo('profitDetailTimeshow', time);
  86. PublicLib.putCookieInfo('profitDetailTime', time2);
  87. PublicLib.Goto({Url:'product-profit-flow-detail'});
  88. },
  89. onRefresh() {
  90. this.finished = false;
  91. this.loading = true;
  92. this.pageinfo.PageNum = 1;
  93. this.getprofitlist('refresh');
  94. },
  95. goback(){
  96. PublicLib.GoBack({Level:1});
  97. },
  98. async getprofitlist(type = 'onload'){
  99. //- PublicLib.ShowLoading({Message:''});
  100. const ProductType = PublicLib.getCookieInfo('productMachineId');
  101. const UserId = PublicLib.getCookieInfo('userId');
  102. const res = await getRequest('api/v1/pos/fluxprofitsummary/list?t='+Math.random(6),JSON.stringify({...this.pageinfo,ProductType,UserId}));
  103. if(res.status !== '1')return tips('分佣列表获取失败!');
  104. //- PublicLib.HideLoading();
  105. if(res.data.length < this.pageinfo.PageSize) {
  106. this.finished = true;
  107. };
  108. if(type === 'refresh'){
  109. this.transactions = res.data
  110. this.refreshing = false;
  111. }else{
  112. this.transactions.push(...res.data);
  113. }
  114. this.loading = false;
  115. if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
  116. },
  117. }
  118. });
  119. </script>
  120. </body>
  121. </html>