minNanyu.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="body2">
  3. <u-navbar :autoBack="true" title="闽南语" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="jz_swiper">
  5. <u-swiper
  6. :list="list1"
  7. indicatorStyle="bottom: 10rpx"
  8. indicatorMode="dot"
  9. height="335rpx"
  10. :indicator="true"
  11. :autoplay="true"
  12. :circular="true"
  13. keyName="image"
  14. ></u-swiper>
  15. </view>
  16. <!--闽南语歌曲 -->
  17. <view class="" v-for="(item, index) in mnGeQu" :key="item.id">
  18. <view class="text-wrapper_7">
  19. <text lines="1" class="text_4">{{ item.name }}</text>
  20. <text lines="1" class="text_5" @click="yinPinLieBiao">查看更多》</text>
  21. </view>
  22. <view class="banxin">
  23. <view class="content">
  24. <scroll-view scroll-x style="display: flex; white-space: nowrap">
  25. <view @click="videoBtn(index, index1)" class="mn_container" v-for="(item2, index1) in mnGeQu[index].content_list" :key="item">
  26. <view class="mn_box">
  27. <image :src="item2.thumbnail" style="border-radius: 10rpx 10rpx 10rpx 0rpx; width: 100%; height: 100%"></image>
  28. </view>
  29. <text class="mn_text">{{ item2.title }}</text>
  30. </view>
  31. </scroll-view>
  32. </view>
  33. </view>
  34. </view>
  35. <!--闽南语歌曲end -->
  36. </view>
  37. </template>
  38. <script>
  39. let that;
  40. export default {
  41. data() {
  42. return {
  43. main_body_id: '',
  44. list1: [
  45. {
  46. image: 'https://speech.xmu.edu.cn/_upload/article/images/c0/fa/3ff524314ed9992200a0db99bb7b/824d7b82-5e07-4857-9c35-5d1219bc710f.jpg',
  47. title: '昨夜星辰昨夜风,画楼西畔桂堂东'
  48. },
  49. {
  50. image: 'https://img0.baidu.com/it/u=1455151824,1249683265&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500',
  51. title: '身无彩凤双飞翼,心有灵犀一点通'
  52. },
  53. {
  54. image: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fci.xiaohongshu.com%2F20292d28-c439-2758-a2a7-c954170fde70%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fci.xiaohongshu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1697881437&t=db418f32a3826bfaf554feb7ae6f4ba8',
  55. title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
  56. }
  57. ],
  58. // 闽南歌曲
  59. mnGeQu: []
  60. };
  61. },
  62. onLoad(o) {
  63. that = this;
  64. this.main_body_id = this.$db.get('main_body_id');
  65. this.getColumnList(o.id);
  66. this.getContentList(o.id);
  67. this.getMainBodyColumnContentList(o.id);
  68. },
  69. methods: {
  70. yinPinLieBiao() {
  71. uni.navigateTo({
  72. url: '/index_fenbao/minNanyu/yinPinLieBiao'
  73. });
  74. },
  75. getColumnList(id) {
  76. this.$api.getColumnList(
  77. {
  78. model_id: id,
  79. main_body_id: this.main_body_id
  80. },
  81. function (res) {
  82. // console.log(res, 'res');
  83. }
  84. );
  85. },
  86. // 栏目内容列表查看更多
  87. getContentList(id) {
  88. this.$api.getContentList(
  89. {
  90. model_id: id,
  91. main_body_id: this.main_body_id,
  92. flag: 'recommend',
  93. page: '1',
  94. pageSize: '10'
  95. },
  96. function (res) {
  97. // console.log(res, '内容列表');
  98. // that.projectList = res.data;
  99. }
  100. );
  101. },
  102. // 主体栏目内容列表
  103. getMainBodyColumnContentList(id) {
  104. this.$api.getMainBodyColumnContentList(
  105. {
  106. model_id: id,
  107. main_body_id: 5
  108. },
  109. function (res) {
  110. that.mnGeQu = res.data;
  111. // console.log(that.mnGeQu, '内容列表默认');
  112. }
  113. );
  114. },
  115. // 视频
  116. videoBtn(i, is) {
  117. // console.log(i, '55555555555');
  118. // console.log(is, '6666666666');
  119. // console.log(this.mnGeQu[i].content_list[is].id, '75555558');
  120. uni.navigateTo({
  121. url: '/index_fenbao/minNanyu/videoPage?id=' + this.mnGeQu[i].content_list[is].id
  122. });
  123. }
  124. }
  125. };
  126. </script>
  127. <style>
  128. .body2 {
  129. background-size: 100% 100%;
  130. background-attachment: fixed;
  131. background-repeat: repeat-y;
  132. background-color: #efefef;
  133. padding-bottom: 60rpx;
  134. }
  135. /deep/.u-swiper-indicator__wrapper__dot--active {
  136. width: 5px !important;
  137. }
  138. /* 去除轮播图标题遮罩背景色 */
  139. .u-swiper__wrapper__item__wrapper__title {
  140. background-color: transparent !important;
  141. }
  142. .banxin {
  143. margin: 0 32rpx 0 32rpx;
  144. }
  145. .text-wrapper_7 {
  146. width: 651rpx;
  147. height: 45rpx;
  148. flex-direction: row;
  149. display: flex;
  150. align-items: center;
  151. justify-content: space-between;
  152. margin: 33rpx 0 25rpx 48rpx;
  153. }
  154. .text_4 {
  155. width: 112rpx;
  156. height: 27rpx;
  157. color: rgba(49, 37, 32, 1);
  158. font-size: 28rpx;
  159. font-weight: 700;
  160. white-space: nowrap;
  161. line-height: 28rpx;
  162. }
  163. .text_5 {
  164. width: 89rpx;
  165. height: 20rpx;
  166. color: rgba(18, 18, 18, 1);
  167. font-size: 22rpx;
  168. white-space: nowrap;
  169. line-height: 20rpx;
  170. margin-top: 3rpx;
  171. }
  172. .mn_container {
  173. display: inline-block;
  174. margin-right: 20rpx;
  175. text-align: center;
  176. }
  177. .mn_box {
  178. width: 261rpx;
  179. height: 349rpx;
  180. background: #ca5642;
  181. margin-bottom: 10rpx;
  182. border-radius: 10rpx 10rpx 10rpx 0rpx;
  183. }
  184. .mn_text {
  185. font-size: 28rpx;
  186. color: #333;
  187. }
  188. </style>