index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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>
  55. <input class="zybt" v-if="item.isbuy == 1" value="开始学习" type="button"/>
  56. <input class="zybt" v-if="item.isbuy == 0" value="购买学习" type="button"/>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </li>
  62. </ul>
  63. <div v-if="!activityList.length && loadend" class="empty">
  64. <img src="{__WAP_PATH}zsff/images/empty.png" alt="暂无数据">
  65. <div>暂无数据</div>
  66. </div>
  67. </div>
  68. <quick-menu></quick-menu>
  69. </div>
  70. {/block}
  71. {block name="foot"}
  72. <script>
  73. require(['vue', 'store', 'helper', '{__WAP_PATH}zsff/js/quick.js'], function (Vue, store, $h) {
  74. var app = new Vue({
  75. el: '#app',
  76. data: {
  77. navs: ['全部', '待核销', '已核销'],
  78. navActive: 0,
  79. activityList: [],
  80. loading: false,
  81. loadend: false,
  82. page: 1,
  83. limit: 20,
  84. loadTitle:''
  85. },
  86. mounted: function () {
  87. this.geLogList();
  88. this.$nextTick(function () {
  89. this.init();
  90. });
  91. },
  92. methods: {
  93. init: function () {
  94. var that = this;
  95. window.addEventListener('scroll', function () {
  96. var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
  97. scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
  98. scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  99. if (clientHeight + scrollTop >= scrollHeight) {
  100. that.geLogList();
  101. }
  102. });
  103. },
  104. specialDetails: function (order_id) {
  105. return window.location.href=$h.U({ c: 'special', a: 'details', q: {id: order_id } });
  106. },
  107. // 获取历史列表
  108. geLogList: function () {
  109. var that = this;
  110. that.activityList.push(
  111. {"id":37,"isbuy":0,"title":"测试学习计划","subject_id":53,"admin_id":0,"lecturer_id":0,"type":3,"is_light":0,"light_type":0,"is_mer_visible":0,"abstract":"\u79c1\u8463\u4f1a\u8bfe\u7a0b\u79c1\u8463\u4f1a\u8bfe\u7a0b\u79c1\u8463\u4f1a\u8bfe\u7a0b","phrase":"","image":"http:\/\/dazaoip.oss-cn-chengdu.aliyuncs.com\/a5f24202208051419226268.png","label":"[\"\\u79c1\\u8463\\u4f1a\\u8bfe\\u7a0b\"]","banner":"[\"http:\\\/\\\/dazaoip.oss-cn-chengdu.aliyuncs.com\\\/8ba4920220805141935969.png\"]","poster_image":"http:\/\/dazaoip.oss-cn-chengdu.aliyuncs.com\/43607202208051419476167.png","service_code":"","is_live":0,"money":98,"pink_money":"0.00","is_pink":0,"pink_number":0,"pink_strar_time":0,"pink_end_time":0,"pink_time":0,"is_fake_pink":0,"fake_pink_number":0,"sort":0,"score":5,"sales":0,"fake_sales":0,"browse_count":55,"pay_type":1,"member_pay_type":0,"member_money":"0.00","link":"","is_show":1,"is_del":0,"add_time":1659680676,"validity":0,"is_alone":0,"brokerage_ratio":0,"brokerage_two":0,"mer_id":0,"quantity":1,"sum":3,"status":1,"success_time":0,"fail_message":"","fail_time":0,"sort_order":0,"log_time":1660357216,"subject_name":"这个学习计划可以快速提升","count":1}
  112. );
  113. that.activityList.push(
  114. {"id":38,"isbuy":1,"title":"测试学习计划1","subject_id":53,"admin_id":0,"lecturer_id":0,"type":3,"is_light":0,"light_type":0,"is_mer_visible":0,"abstract":"\u79c1\u8463\u4f1a\u8bfe\u7a0b\u79c1\u8463\u4f1a\u8bfe\u7a0b\u79c1\u8463\u4f1a\u8bfe\u7a0b","phrase":"","image":"http:\/\/dazaoip.oss-cn-chengdu.aliyuncs.com\/a5f24202208051419226268.png","label":"[\"\\u79c1\\u8463\\u4f1a\\u8bfe\\u7a0b\"]","banner":"[\"http:\\\/\\\/dazaoip.oss-cn-chengdu.aliyuncs.com\\\/8ba4920220805141935969.png\"]","poster_image":"http:\/\/dazaoip.oss-cn-chengdu.aliyuncs.com\/43607202208051419476167.png","service_code":"","is_live":0,"money":98,"pink_money":"0.00","is_pink":0,"pink_number":0,"pink_strar_time":0,"pink_end_time":0,"pink_time":0,"is_fake_pink":0,"fake_pink_number":0,"sort":0,"score":5,"sales":0,"fake_sales":0,"browse_count":55,"pay_type":1,"member_pay_type":0,"member_money":"0.00","link":"","is_show":1,"is_del":0,"add_time":1659680676,"validity":0,"is_alone":0,"brokerage_ratio":0,"brokerage_two":0,"mer_id":0,"quantity":1,"sum":3,"status":1,"success_time":0,"fail_message":"","fail_time":0,"sort_order":0,"log_time":1660357216,"subject_name":"这个学习计划可以快速提升","count":1}
  115. );
  116. // if (that.loading) return;
  117. // if (that.loadend) return;
  118. // that.loading = true;
  119. // store.baseGet($h.U({ c: 'my', a: 'special_log', p: { page: that.page, limit: that.limit, op:'list' } }), function (res) {
  120. // var list = res.data.data;
  121. // that.activityList.push.apply(that.activityList, list);
  122. // that.loadend = list.length < that.limit;
  123. // that.loadTitle = that.loadend ? '已全部加载完' : '上拉加载更多';
  124. // that.page = that.page + 1;
  125. // that.loading = false;
  126. // that.$set(this, 'activityList', that.activityList);
  127. // }, function (res) {
  128. // that.loadTitle = '上拉加载更多';
  129. // that.loading = false;
  130. // });
  131. }
  132. }
  133. });
  134. });
  135. </script>
  136. {/block}