special_log.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!-- +---------------------------------------------------------------------- -->
  2. <!-- | CRMEB [ CRMEB赋能开发者,助力企业发展 ] -->
  3. <!-- +---------------------------------------------------------------------- -->
  4. <!-- | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. -->
  5. <!-- +---------------------------------------------------------------------- -->
  6. <!-- | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 -->
  7. <!-- +---------------------------------------------------------------------- -->
  8. <!-- | Author: CRMEB Team <admin@crmeb.com> -->
  9. <!-- +---------------------------------------------------------------------- -->
  10. {extend name="public/container"}
  11. {block name="title"}浏览记录{/block}
  12. {block name="head"}
  13. <style>
  14. body {
  15. background: #F5F5F5;
  16. }
  17. .price-wrap {
  18. display: flex;
  19. align-items: center;
  20. font-size: .24rem;
  21. line-height: .33rem;
  22. color: #DC9845;
  23. }
  24. .price-wrap .price {
  25. flex: 1;
  26. font-weight: bold;
  27. font-size: .24rem;
  28. line-height: .45rem;
  29. color: #DC9845;
  30. }
  31. .price-wrap .price span {
  32. font-size: .32rem;
  33. }
  34. .activity-list li > div > div > div:last-child {
  35. font-weight: normal;
  36. }
  37. .activity-list .tab div{text-align: left; padding-left: 10px;}
  38. </style>
  39. {/block}
  40. {block name="content"}
  41. <div class="activity-list" v-cloak id="app">
  42. <div class="content">
  43. <ul v-if="activityList.length">
  44. <li v-for="(item, index) in activityList" :key="index" @click="specialDetails(item.id)">
  45. <div>
  46. <div>
  47. <img :src="item.image" alt="">
  48. </div>
  49. <div>
  50. <div>{{ item.title }}</div>
  51. <div>{{ item.subject_name }}</div>
  52. <div class="price-wrap">
  53. <div class="price">¥<span>{{ item.money }}</span></div>
  54. <div>共{{ item.count }}节</div>
  55. </div>
  56. </div>
  57. </div>
  58. </li>
  59. </ul>
  60. <div v-if="!activityList.length && loadend" class="empty">
  61. <img src="{__WAP_PATH}zsff/images/empty.png" alt="暂无数据">
  62. <div>暂无数据</div>
  63. </div>
  64. </div>
  65. <quick-menu></quick-menu>
  66. </div>
  67. {/block}
  68. {block name="foot"}
  69. <script>
  70. require(['vue', 'store', 'helper', '{__WAP_PATH}zsff/js/quick.js'], function (Vue, store, $h) {
  71. var app = new Vue({
  72. el: '#app',
  73. data: {
  74. navs: ['全部', '待核销', '已核销'],
  75. navActive: 0,
  76. activityList: [],
  77. loading: false,
  78. loadend: false,
  79. page: 1,
  80. limit: 20,
  81. loadTitle:''
  82. },
  83. mounted: function () {
  84. this.geLogList();
  85. this.$nextTick(function () {
  86. this.init();
  87. });
  88. },
  89. methods: {
  90. init: function () {
  91. var that = this;
  92. window.addEventListener('scroll', function () {
  93. var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
  94. scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
  95. scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  96. if (clientHeight + scrollTop >= scrollHeight) {
  97. that.geLogList();
  98. }
  99. });
  100. },
  101. specialDetails: function (order_id) {
  102. return window.location.href=$h.U({ c: 'special', a: 'details', q: {id: order_id } });
  103. },
  104. // 获取历史列表
  105. geLogList: function () {
  106. var that = this;
  107. if (that.loading) return;
  108. if (that.loadend) return;
  109. that.loading = true;
  110. store.baseGet($h.U({ c: 'my', a: 'special_log', p: { page: that.page, limit: that.limit, op:'list' } }), function (res) {
  111. var list = res.data.data;
  112. that.activityList.push.apply(that.activityList, list);
  113. that.loadend = list.length < that.limit;
  114. that.loadTitle = that.loadend ? '已全部加载完' : '上拉加载更多';
  115. that.page = that.page + 1;
  116. that.loading = false;
  117. that.$set(this, 'activityList', that.activityList);
  118. }, function (res) {
  119. that.loadTitle = '上拉加载更多';
  120. that.loading = false;
  121. });
  122. }
  123. }
  124. });
  125. });
  126. </script>
  127. {/block}