product-profit-activation-detail.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 pb0" style="padding-top:0;">
  18. <div id="app">
  19. <van-nav-bar class="user_rank_explan_title user_title_normal titlef16" left-arrow 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 activationlist" ref="wrapper1">
  24. <van-cell :title="time" title-class="f12 c333" value-class="f12" center></van-cell>
  25. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:calc(100% - 44px);" :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 v-for="item,index in transactions" :title="item.MerchantName" :value="item.RewardAmount+'元'" title-class="f12 c333" value-class="f12" center></van-cell>
  29. </van-list>
  30. </van-pull-refresh>
  31. </div>
  32. </div>
  33. </div>
  34. <script src="./static/js/klm-vv.min.js"></script>
  35. <script src="./static/js/appfunc.min.js"></script>
  36. <script src="./static/js/klm-axios-config.js"></script>
  37. <script src="./static/js/publicfn.js"></script>
  38. <script>
  39. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  40. // 可以通过下面的方式手动注册
  41. Vue.use(vant.Lazyload);
  42. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  43. // 在 #app 标签下渲染一个按钮组件
  44. let app = new Vue({
  45. el: '#app',
  46. data() {
  47. return {
  48. isnodata:false,
  49. toptitleisshow:false,
  50. transactions: [
  51. ],
  52. loading: false,
  53. finished: false,
  54. refreshing: false,
  55. pageinfo:{
  56. PageSize:20,
  57. PageNum:1
  58. },
  59. time:'',
  60. };
  61. },
  62. created() {
  63. this.toptitleisshow = toptitleisshow;
  64. this.time = PublicLib.getCookieInfo('activeTime');
  65. this.getactivedetail('refresh');
  66. },
  67. beforeUpdate(){
  68. this.$nextTick(() => {
  69. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight}px`;
  70. });
  71. },
  72. methods: {
  73. onLoad() {
  74. if (this.refreshing) {
  75. //- this.transactions = [];
  76. this.refreshing = false;
  77. this.pageinfo.PageNum = 0;
  78. };
  79. this.pageinfo.PageNum++;
  80. this.getactivedetail();
  81. },
  82. onRefresh() {
  83. // 清空列表数据
  84. this.finished = false;
  85. // 重新加载数据
  86. this.loading = true;
  87. this.pageinfo.PageNum = 1;
  88. this.getactivedetail('refresh');
  89. },
  90. async getactivedetail(type = 'onload'){
  91. //- PublicLib.ShowLoading({Message:''});
  92. const ProductType = PublicLib.getCookieInfo('productMachineId');
  93. const ActDate = PublicLib.getCookieInfo('activeDetailTime');
  94. const UserId = PublicLib.getCookieInfo('userId');
  95. const res = await getRequest('api/v1/pos/activereward/statdetail?t='+Math.random(6),JSON.stringify({...this.pageinfo,ActDate,UserId,ProductType}));
  96. if(res.status !== '1')return tips('激活奖励详情获取失败!');
  97. //- PublicLib.HideLoading();
  98. if(res.data.length < this.pageinfo.PageSize) {
  99. this.finished = true;
  100. };
  101. if(type === 'refresh'){
  102. this.transactions = res.data
  103. this.refreshing = false;
  104. }else{
  105. this.transactions.push(...res.data);
  106. }
  107. this.loading = false;
  108. if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
  109. },
  110. goback(){
  111. PublicLib.GoBack({Level:1});
  112. }
  113. }
  114. });
  115. </script>
  116. </body>
  117. </html>