product-profit-shareoutbonus.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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" v-cloak>
  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" :title="item.TradeMonth" :value="item.TradeProfit + '元'" :label="'入账时间:' + item.CreateDate " title-class="f14 c333" value-class="f14 c333" center></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. loading: false,
  55. finished: false,
  56. refreshing: false,
  57. pageinfo:{
  58. PageSize:10,
  59. PageNum:1
  60. },
  61. };
  62. },
  63. created(){
  64. this.toptitleisshow = toptitleisshow;
  65. this.getprofitlist('refresh');
  66. this.title = PublicLib.getCookieInfo('productMachineType');
  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. onRefresh() {
  85. this.finished = false;
  86. this.loading = true;
  87. this.pageinfo.PageNum = 1;
  88. this.getprofitlist('refresh');
  89. },
  90. goback(){
  91. PublicLib.GoBack({Level:1});
  92. },
  93. async getprofitlist(type = 'onload'){
  94. //- PublicLib.ShowLoading({Message:''});
  95. const ProductType = PublicLib.getCookieInfo('productMachineId');
  96. const UserId = PublicLib.getCookieInfo('userId');
  97. const res = await getRequest('api/v1/pos/profitrewardrecord/dividendlist?t='+Math.random(6),JSON.stringify({...this.pageinfo,ProductType,UserId}));
  98. if(res.status !== '1')return tips('分红列表获取失败!');
  99. //- PublicLib.HideLoading();
  100. if(res.data.length < this.pageinfo.PageSize) {
  101. this.finished = true;
  102. };
  103. if(type === 'refresh'){
  104. this.transactions = res.data
  105. this.refreshing = false;
  106. }else{
  107. this.transactions.push(...res.data);
  108. }
  109. this.loading = false;
  110. if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
  111. }
  112. }
  113. });
  114. </script>
  115. </body>
  116. </html>