index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="index-content" :style="{'--status-bar-': statusBarHeight}">
  3. <view class="index-content-info">
  4. <!-- 头部主要内容 开始 -->
  5. <view class="index-content-header">
  6. <customNavbar
  7. title="全名分享"
  8. bgColor="rgba(0,0,0,0)"
  9. :is-left="false"
  10. :customNavbarInfo='{}'></customNavbar>
  11. <u-search :showAction="true" bgColor="#fff" actionText="搜索"></u-search>
  12. </view>
  13. <!-- 头部主要内容 结束 -->
  14. <!-- 列表主要内容 开始 -->
  15. <view class="index-content-list">
  16. <customScrollList
  17. ref="customScrollList"
  18. @load="load"
  19. @paging="paging"
  20. >
  21. <view class="index-content-list-info">
  22. <text class="index-content-list-class">剧目</text>
  23. <view
  24. class="index-content-list-item"
  25. v-for="(item,index) in 10"
  26. :key="index">
  27. <view class="index-content-list-content">
  28. <image
  29. class="index-content-list-image"
  30. src="../../static/login/bgm.png" mode=""></image>
  31. <view class="index-content-list-tool">
  32. <text class="index-content-list-title">《伟大转折》</text>
  33. <text
  34. class="index-content-list-but"
  35. @click="navigateToFun('/pages/publicSharingDetails/index',item)"
  36. >查看</text>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </customScrollList>
  42. </view>
  43. <!-- 列表主要内容 结束 -->
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. navigateTo
  50. } from "@/utils/util.js"
  51. export default {
  52. data() {
  53. return {
  54. title: '全名分享',
  55. statusBarHeight: 0, // 状态栏安全距离
  56. }
  57. },
  58. onLoad() {
  59. },
  60. onShow() {
  61. this.statusBarHeight = getApp().globalData.statusBarHeight
  62. },
  63. methods: {
  64. load(){
  65. console.log("上拉 加载数据")
  66. this.$refs.customScrollList.showPullUp = false
  67. //this.$refs.customScrollList.showEmpty = true
  68. },
  69. paging(){
  70. console.log("下拉 加载数据")
  71. },
  72. /**
  73. * @author ygh
  74. * @data 2023-12-20
  75. */
  76. navigateToFun(url,data) {
  77. navigateTo(url)
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .index-content {
  84. display: flex;
  85. flex-direction: column;
  86. align-items: center;
  87. justify-content: center;
  88. box-sizing: border-box;
  89. --header-h: 170rpx;
  90. // background-color:
  91. .index-content-info {
  92. width: 100%;
  93. box-sizing: border-box;
  94. }
  95. }
  96. /** 头部主要内容 开始 */
  97. .index-content-header {
  98. width: 100%;
  99. height: var(--header-h);
  100. box-sizing: border-box;
  101. background-color: var(--gd-bgm-color);
  102. ::v-deep .u-search {
  103. padding: 0 30rpx !important;
  104. }
  105. ::v-deep .u-search__action {
  106. color: #fff !important;
  107. }
  108. }
  109. /** 头部主要内容 结束 **/
  110. /** 列表主要内容 开始 */
  111. .index-content-list {
  112. width: 100%;
  113. height: calc( 100% - var(--header-h) - var(--status-bar-h) );
  114. }
  115. .index-content-list-info {
  116. width: 100%;
  117. box-sizing: border-box;
  118. padding: 32rpx 32rpx 150rpx;
  119. .index-content-list-class {
  120. font-size: 32rpx;
  121. font-family: SourceHanSansCN, SourceHanSansCN;
  122. font-weight: bold;
  123. color: #2D2D2D;
  124. }
  125. .index-content-list-item {
  126. width: 100%;
  127. box-sizing: border-box;
  128. background: #FFFFFF;
  129. box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(200,200,200,0.5);
  130. border-radius: 24rpx;
  131. overflow: hidden;
  132. margin-top: 40rpx;
  133. .index-content-list-content {
  134. width: 100%;
  135. box-sizing: border-box;
  136. .index-content-list-image {
  137. width: 100%;
  138. height: 242rpx;
  139. }
  140. .index-content-list-tool {
  141. display: flex;
  142. width: 100%;
  143. justify-content: space-between;
  144. align-items: center;
  145. padding:42rpx 28rpx 46rpx;
  146. box-sizing: border-box;
  147. .index-content-list-title {
  148. font-size: 28rpx;
  149. font-family: SourceHanSansCN, SourceHanSansCN;
  150. font-weight: bold;
  151. color: #363636;
  152. }
  153. .index-content-list-but {
  154. width: 160rpx;
  155. height: 51rpx;
  156. background: #ED0000;
  157. border-radius: 24rpx;
  158. font-size: 20rpx;
  159. font-family: PingFangSC, PingFang SC;
  160. font-weight: 400;
  161. color: #FFFFFF;
  162. display: flex;
  163. justify-content: center;
  164. align-items: center;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. /** 列表主要内容 结束 **/
  171. </style>