product-profit-boot-detail.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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-sticky>
  20. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="开机奖励明细" v-if="toptitleisshow" @click-left="goback">
  21. <template #left> <img src="./static/images/left.png" alt=""></template>
  22. </van-nav-bar>
  23. </van-sticky>
  24. <van-row class="mymerchant-transaction-list">
  25. <van-col class="bgcfff" span="24">
  26. <div class="ovh-x" ref="wrapper1">
  27. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;" :class="transactions.length === 0 ? 'isnodata':''">
  28. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
  29. <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
  30. <van-cell-group class="top_line boot-detail-list" v-for="item,index in transactions">
  31. <van-cell :border="false" :title="item.RewardType" :value="item.PrizeAmount+'元'" title-class="f12 c333" value-class="f12 c333"></van-cell>
  32. <van-cell :border="false" title="SN号:" :value="item.SnNo" title-class="f12 c333" value-class="f12 c333"></van-cell>
  33. <van-cell :border="false" title="机具所属创客:" :value="item.RealName" title-class="f12 c333" value-class="f12 c333"></van-cell>
  34. </van-cell-group>
  35. </van-list>
  36. </van-pull-refresh>
  37. </div>
  38. </van-col>
  39. </van-row>
  40. </div>
  41. <script src="./static/js/klm-vv.min.js"></script>
  42. <script src="./static/js/appfunc.min.js"></script>
  43. <script src="./static/js/klm-axios-config.js"></script>
  44. <script src="./static/js/publicfn.js"></script>
  45. <script>
  46. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  47. // 可以通过下面的方式手动注册
  48. Vue.use(vant.Lazyload);
  49. //- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  50. // 在 #app 标签下渲染一个按钮组件
  51. let app = new Vue({
  52. el: '#app',
  53. data() {
  54. return {
  55. isnodata:false,
  56. toptitleisshow:false,
  57. transactions: [
  58. ],
  59. loading: false,
  60. finished: false,
  61. refreshing: false,
  62. pageinfo:{
  63. PageSize:10,
  64. PageNum:1
  65. },
  66. };
  67. },
  68. created(){
  69. this.toptitleisshow = toptitleisshow;
  70. this.getbootdetail('refresh');
  71. },
  72. beforeUpdate() {
  73. this.$nextTick(() => {
  74. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight}px`;
  75. });
  76. },
  77. methods: {
  78. onLoad() {
  79. if (this.refreshing) {
  80. //- this.transactions = [];
  81. this.refreshing = false;
  82. this.pageinfo.PageNum = 0;
  83. };
  84. this.pageinfo.PageNum++;
  85. this.getbootdetail();
  86. },
  87. onRefresh() {
  88. // 清空列表数据
  89. this.finished = false;
  90. // 重新加载数据
  91. this.loading = true;
  92. this.pageinfo.PageNum = 1;
  93. this.getbootdetail('refresh');
  94. },
  95. async getbootdetail(type = 'onload'){
  96. //- PublicLib.ShowLoading({Message:''});
  97. const ProductType = PublicLib.getCookieInfo('productMachineId');
  98. const PrizeDate = PublicLib.getCookieInfo('bootDetailTime');
  99. const UserId = PublicLib.getCookieInfo('userId');
  100. const res = await getRequest('api/v1/pos/openreward/statdetail?t='+Math.random(6),JSON.stringify({...this.pageinfo,PrizeDate,UserId,ProductType}));
  101. if(res.status !== '1')return tips('激活奖励详情获取失败!');
  102. //- PublicLib.HideLoading();
  103. if(res.data.length < this.pageinfo.PageSize) {
  104. this.finished = true;
  105. };
  106. if(type === 'refresh'){
  107. this.transactions = res.data
  108. this.refreshing = false;
  109. }else{
  110. this.transactions.push(...res.data);
  111. }
  112. this.loading = false;
  113. if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
  114. },
  115. goback(){
  116. PublicLib.GoBack({Level:1});
  117. }
  118. }
  119. });
  120. </script>
  121. </body>
  122. </html>