urgeclassDetail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="column hb">
  3. <view class="headerUser">
  4. <view class="justify-start">
  5. <view class="mr20">A0204杨茗兰</view>
  6. <u-icon name="account-fill" color="#21994d" size="16"></u-icon>
  7. </view>
  8. </view>
  9. <view class="u-border-top p20">
  10. <view class="justify-between align-center">
  11. <view>可用积分:0</view>
  12. <view class="justify-start align-center">
  13. <view class="base-color-6 fs24">(0个活动进行中)</view>
  14. <view class="base-color">详情</view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="bgf p20">
  19. <view>会员资料</view>
  20. <view class="justify-start align-center fs24 mt20">
  21. <view class="base-color-6 mr40">昵称</view>
  22. <view>公众号用户d81c2d20</view>
  23. </view>
  24. <view class="justify-start align-center fs24 mt20">
  25. <view class="base-color-6 mr40">最近场次</view>
  26. <view>05.1007课:御医派治病养生效果最好的食疗方</view>
  27. </view>
  28. <view class="justify-start align-center fs24 mt20">
  29. <view class="base-color-6 mr40">最近访问时间</view>
  30. <view>05-10 11:25</view>
  31. </view>
  32. <view class="mtb20">关联直播间</view>
  33. <view class="justify-between align-center base-color-6 fs24 mtb20">
  34. <view>2.0五仙250504期(7+</view>
  35. <view>邀请人:03开心-伴学助</view>
  36. </view>
  37. <view class="justify-between align-center base-color-6 fs24">
  38. <view class="base-color-3">备注名:A0204杨茗兰</view>
  39. <view>2025-05-04 09:33:37</view>
  40. </view>
  41. </view>
  42. <view class="bgf pl20 pb20 base-color">观看数据</view>
  43. <view class="p20 bgf justify-between align-center base-color-6 fs24">
  44. <view @click="showtime=!showtime ">请选择时间</view>
  45. <view class="p10 u-border radius50 plr30">今天</view>
  46. </view>
  47. <view class="bgf">
  48. <u-tabs :list="list1" @click="clicktab" :activeStyle="{ color: '#3c9cff',fontWeight:'bold'}"></u-tabs>
  49. </view>
  50. <view class="column hb hidden " style="box-sizing: border-box;">
  51. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  52. :refresher-triggered="triggereds"
  53. refresher-background="rgba(0,0,0,0)" @refresherrefresh="pullDownRefreshs"
  54. @refresherrestore="triggereds = false" :upper-threshold="100" :lower-threshold="100"
  55. @refresherabort="triggereds = false" @scrolltolower="reachBottoms">
  56. <view class="list-box" v-for="(item,index) in 4" :key="index">
  57. <view class="justify-start align-center mtb10 fs28">
  58. <text class="w180 base-color-6">日期</text>
  59. <text class="fs24 base">2025-05-10</text>
  60. </view>
  61. <view class="justify-start align-center mtb10 fs28">
  62. <text class="w180 base-color-6">观看等级</text>
  63. <text class="fs24">已完播</text>
  64. </view>
  65. <view class="justify-start align-center mtb10 fs28">
  66. <text class="w180 base-color-6">频道</text>
  67. <text class="fs24">2.0五仙250504期(7+1)</text>
  68. </view>
  69. <view class="justify-start align-center mtb10 fs28">
  70. <text class="w180 base-color-6">邀请人</text>
  71. <text class="fs24">03开心一伴学助手</text>
  72. </view>
  73. <view class="justify-start align-center mtb10 fs28">
  74. <text class="w180 base-color-6">首播时长</text>
  75. <text class="fs24">0.39'35"</text>
  76. </view>
  77. <view class="justify-start align-center mtb10 fs28">
  78. <text class="w180 base-color-6">回放时长</text>
  79. <text class="fs24">0:00'00"</text>
  80. </view>
  81. <view class="justify-start align-center mtb10 fs28">
  82. <text class="w180 base-color-6">首次进入</text>
  83. <text class="fs24">2025-05-10 10:12:54</text>
  84. </view>
  85. <view class="justify-start align-center mtb10 fs28">
  86. <text class="w180 base-color-6">最近在线</text>
  87. <text class="fs24">2025-05-10 11:25:57</text>
  88. </view>
  89. <view class="justify-start align-center mtb10 fs28">
  90. <text class="w180 base-color-6">答题</text>
  91. <text class="fs24">1/1</text>
  92. </view>
  93. </view>
  94. <u-loadmore :status="statusA" />
  95. </scroll-view>
  96. </view>
  97. <u-calendar :show="showtime" :maxDate='maxDate' :minDate='minDate' @confirm="confirmData"
  98. :closeOnClickOverlay='true' @close="closedata" :selected="info.selected"></u-calendar>
  99. </view>
  100. </template>
  101. <script>
  102. import {
  103. getdetails
  104. } from "@/api/user.js";
  105. export default {
  106. data() {
  107. return {
  108. showtime:false,
  109. maxDate: '',
  110. minDate: '',
  111. info: {
  112. lunar: true,
  113. range: true,
  114. insert: false,
  115. selected: []
  116. },
  117. list1: [{
  118. name: '未参与',
  119. }, {
  120. name: '未观看',
  121. }, {
  122. name: '未完播'
  123. }, {
  124. name: '已完播'
  125. }],
  126. //分页
  127. triggereds: false,
  128. isEnableds: true,
  129. statusA: 'nomore',
  130. pageNum: 1,
  131. pageSize: 8,
  132. }
  133. },
  134. mounted() {
  135. this.gettimeDate()
  136. this.getdetaila()
  137. },
  138. onReady() {
  139. this.$nextTick(() => {
  140. this.showCalendar = true
  141. })
  142. // TODO 模拟请求异步同步数据
  143. setTimeout(() => {
  144. this.info.selected = [{
  145. date: getDate(new Date(),-3).fullDate,
  146. info: '打卡'
  147. },
  148. {
  149. date: getDate(new Date(),-2).fullDate,
  150. info: '签到',
  151. data: {
  152. custom: '自定义信息',
  153. name: '自定义消息头'
  154. }
  155. },
  156. {
  157. date: getDate(new Date(),-1).fullDate,
  158. info: '已打卡'
  159. }
  160. ]
  161. }, 2000)
  162. },
  163. methods: {
  164. getdetaila(){
  165. const data={
  166. qwExternalContactId:'50'
  167. }
  168. getdetails(data).then(res=>{
  169. if(res.code==200){
  170. console.log(200)
  171. }
  172. })
  173. },
  174. clicktab(item) {
  175. console.log('item', item);
  176. },
  177. reachBottoms() {
  178. // status这个是加载状态
  179. if (this.statusA === 'loadmore') {
  180. this.statusA = 'loading'
  181. uni.showNavigationBarLoading()
  182. setTimeout(() => {
  183. this.pageNum++
  184. // this.getCourselist() //触底 不穿执行else
  185. uni.hideNavigationBarLoading()
  186. }, 1000);
  187. }
  188. },
  189. //列表展示下拉
  190. pullDownRefreshs() {
  191. // 下拉
  192. this.triggereds = true; //下拉了状态为true
  193. setTimeout(() => {
  194. this.triggereds = false;
  195. uni.stopPullDownRefresh()
  196. this.pageNum = 1;
  197. // this.getCourselist('refresh') //触底 不穿执行else
  198. }, 1000)
  199. },
  200. closedata() {
  201. this.showtime = !this.showtime
  202. },
  203. confirmData(e) {
  204. this.showtime = !this.showtime
  205. this.date = e[0]
  206. this.pageNum = 1
  207. // this.getCourselist()
  208. },
  209. gettimeDate() {
  210. // 获取当前时间
  211. const currentDate = new Date();
  212. // 获取一个月前的时间
  213. const oneMonthAgo = new Date(currentDate);
  214. oneMonthAgo.setMonth(oneMonthAgo.getMonth() - 2);
  215. this.minDate = oneMonthAgo.getTime();
  216. // 获取一个月后的时间
  217. const oneMonthLater = new Date(currentDate);
  218. oneMonthLater.setMonth(oneMonthLater.getMonth() + 1);
  219. this.maxDate = oneMonthLater.getTime();
  220. },
  221. }
  222. }
  223. </script>
  224. <style scoped lang="scss">
  225. .headerUser{
  226. background-color: #fff;
  227. margin-top: 20rpx;
  228. padding: 20rpx;
  229. }
  230. .list-box {
  231. background-color: #fff;
  232. padding: 28rpx;
  233. margin-bottom: 12rpx;
  234. margin:18rpx 20rpx;
  235. border-radius: 12rpx;
  236. }
  237. </style>