kcxq-t.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="">
  3. <u-navbar :border-bottom="false" back-icon-size="35" :title="title" title-size="32" :background="background"
  4. :back-text-style="hhyanm" title-color="#000000" back-icon-color="#000000"></u-navbar>
  5. <!-- 视频列表 -->
  6. <view class="rmknuy">
  7. <view class="zyhttry" style="padding: 20rpx 30rpx;">
  8. <view class="rmknuy-title">{{title}}</view>
  9. </view>
  10. <view style="padding: 20rpx 30rpx;">
  11. <view class="zytlidde" @click="toDetail(item)"
  12. v-for="(item,index) in dkhkList" :key="index">
  13. <view class="zytyyrimg" style="overflow: hidden;">
  14. <image :src="item.cover" mode="aspectFill" style="width: 100%; height: 100%;"></image>
  15. </view>
  16. <view class="zytyyopf">
  17. <view class="zytyotxta"><text>{{item.title}}</text></view>
  18. <view class="flztoa zytyotxtb">
  19. <text>{{item.lecturer_name}}</text>
  20. </view>
  21. <view class="flztoa zytyotxtc" style="margin-top: 6rpx;">
  22. <text>
  23. <text style="padding-right: 10rpx;">折扣价格: {{item.current_price}}</text>
  24. <text>原价格: {{item.original_price}}</text>
  25. </text>
  26. <image src="/static/zy/zyb3.png" style="width: 48rpx;height: 48rpx;" mode=""></image>
  27. </view>
  28. <view class="flztoa">
  29. <view class="fzctob zytyotxtc">
  30. <text>{{item.play_count}}播放量 - 共{{item.chapter_num}}课时</text>
  31. <!-- <image v-show="xqaxuye" @click="xqaxuye = false" src="/static/zy/zyb1.png" style="width: 36rpx;height: 36rpx;margin-left: 20rpx;" mode=""></image>
  32. <image v-show="!xqaxuye" @click="xqaxuye = true" src="/static/zy/zyb2.png" style="width: 36rpx;height: 36rpx;margin-left: 20rpx;" mode=""></image> -->
  33. </view>
  34. <!-- 分钟 -->
  35. <text class="zytyotxtd">{{item.time}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="zyhxyyer"></view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <style>
  45. page {
  46. background: #FAFAFA;
  47. }
  48. </style>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. xqaxuye: false,
  54. xqaxuyea: true,
  55. xqaxuyeb: true,
  56. background: {
  57. backgroundColor: '#ffffff',
  58. },
  59. hhyanm: {
  60. color: '#FFFFFF',
  61. },
  62. timestamp: 86400,
  63. list: [],
  64. identity: 0, // 0普通用户 1 讲师
  65. dkhkList:[],
  66. courseList: [
  67. {
  68. id:1,
  69. cover:'',//封面
  70. title:'标题',
  71. original_price:0,
  72. current_price:0,
  73. pay_count:0,//领取数量
  74. one_level_label:0,
  75. tow_level_label:0,
  76. type:0,//类型
  77. },
  78. ],
  79. id: '',
  80. title: ''
  81. }
  82. },
  83. onLoad(option) {
  84. this.id = option.id;
  85. this.title = option.title;
  86. this.getCourseListByLabel();
  87. this.identity = uni.getStorageSync('userinfo').identity || 0
  88. },
  89. methods: {
  90. // 课程筛选
  91. getCourseListByLabel() {
  92. let that = this;
  93. this.$request.getCourseListByLabel({
  94. tow_label:that.id,
  95. }).then(res => {
  96. console.log(res)
  97. this.dkhkList = res.data;
  98. }).catch(err => {
  99. console.log(err)
  100. })
  101. },
  102. toDetail(i) {
  103. let item = JSON.stringify(i);
  104. uni.navigateTo({
  105. url: './kcxq-x?item=' + item
  106. })
  107. },
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .rmknuy{
  113. padding-bottom: 100rpx;
  114. }
  115. .rmknuy-title{
  116. font-size: 40rpx;
  117. font-weight: bold;
  118. }
  119. .nav{width: 80rpx;height: 80rpx !important;margin: 0 auto;}
  120. .nav-box{
  121. display: flex;
  122. width: 100%;
  123. flex-wrap: wrap; padding: 0 0 40rpx 0;margin-bottom: 15rpx;}
  124. .grid-item{
  125. width: 25%;
  126. display: flex;
  127. flex-direction: column;
  128. align-items: center;
  129. justify-content: center;
  130. text-align: center;
  131. margin-top: 20rpx;
  132. }
  133. .nav-box .text{margin-top: 8rpx;}
  134. .bgfff{background-color: #fff;}
  135. </style>