帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

282 lines
5.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="title">
  5. <view class="">
  6. 首页
  7. </view>
  8. </view>
  9. <view class="search">
  10. <view class="icon">
  11. <uv-icon
  12. size="40rpx"
  13. name="search"></uv-icon>
  14. </view>
  15. <input type="text" placeholder="请输入搜索关键字..."/>
  16. <view class="text">
  17. 搜索
  18. </view>
  19. </view>
  20. <view class="swipe">
  21. <uv-swiper
  22. :list="banner"
  23. @click="bannerClick"
  24. keyName="image"
  25. height="320rpx"></uv-swiper>
  26. </view>
  27. </view>
  28. <view class="box">
  29. <view class="box-line">
  30. <view class="title">
  31. 认证演员
  32. </view>
  33. <view class="more"
  34. @click="$utils.navigateTo('/publish/actorList')">
  35. 查看全部
  36. <uv-icon
  37. size="26rpx"
  38. name="arrow-right"></uv-icon>
  39. </view>
  40. </view>
  41. <view class="ACTORS">
  42. <swiper class="swiper-box"
  43. :autoplay="true"
  44. :duration="500">
  45. <swiper-item v-for="(item, index) in actorList" :key="index">
  46. <view class="swiper-item">
  47. <image
  48. class="logo"
  49. :src="item.logo"
  50. mode="aspectFill" />
  51. <view class="swiper-item-content">
  52. <view class="left">
  53. <view class="title">
  54. {{ item.name }}
  55. </view>
  56. <view class="info-from">
  57. <text>{{ item.userId }}</text>
  58. <text style="margin-left: 30rpx;">{{ item.createTime }}</text>
  59. </view>
  60. </view>
  61. <view class="right">
  62. 查看
  63. </view>
  64. </view>
  65. </view>
  66. </swiper-item>
  67. </swiper>
  68. </view>
  69. </view>
  70. <view class="box">
  71. <view class="box-line">
  72. <view class="title">
  73. 动态帖子
  74. </view>
  75. <view class="more"
  76. @click="$utils.navigateTo('/publish/postList')">
  77. 查看全部
  78. <uv-icon
  79. size="26rpx"
  80. name="arrow-right"></uv-icon>
  81. </view>
  82. </view>
  83. <postList :list="trends"/>
  84. </view>
  85. <tabber :select="0"/>
  86. <showPrivacyAgreement
  87. ref="showPrivacy">
  88. </showPrivacyAgreement>
  89. </view>
  90. </template>
  91. <script>
  92. import tabber from '@/components/base/tabbar.vue'
  93. import postList from '@/components/post/postList.vue'
  94. import showPrivacyAgreement from '@/components/config/showPrivacyAgreement.vue'
  95. export default {
  96. components : {
  97. tabber,
  98. postList,
  99. showPrivacyAgreement,
  100. },
  101. data() {
  102. return {
  103. banner : [],
  104. actorList : [],
  105. postList : [],
  106. trends : [],
  107. queryParams: {
  108. pageNo: 1,
  109. pageSize: 10
  110. },
  111. total : 0,
  112. }
  113. },
  114. computed : {
  115. },
  116. //滚动到屏幕底部
  117. onReachBottom() {
  118. console.log("======首页滑动到底部触发====")
  119. if(this.queryParams.pageSize < this.total){
  120. this.queryParams.pageSize += 10
  121. this.indexGetTrendsPage()
  122. }
  123. },
  124. onShow() {
  125. this.getData()
  126. this.indexGetTrendsPage()
  127. },
  128. methods: {
  129. getData(){
  130. this.$api('indexGetBanner', res => {
  131. if(res.code == 200){
  132. this.banner = res.result
  133. }
  134. })
  135. this.$api('indexGetActorList', res => {
  136. if(res.code == 200){
  137. this.actorList = res.result
  138. }
  139. })
  140. },
  141. indexGetTrendsPage(){
  142. this.$api('indexGetTrendsPage',
  143. this.queryParams, res => {
  144. if(res.code == 200){
  145. this.trends = res.result.records
  146. this.total = res.result.total
  147. }
  148. })
  149. },
  150. bannerClick(index){
  151. console.log(index);
  152. uni.navigateTo({
  153. url: '/pages/publish/competition'
  154. })
  155. }
  156. }
  157. }
  158. </script>
  159. <style scoped lang="scss">
  160. .content{
  161. padding-bottom: 150rpx;
  162. .top{
  163. background-image: $uni-linear-gradient-bg-color;
  164. padding: 0 20rpx;
  165. padding-top: calc(var(--status-bar-height) + 20rpx);
  166. .title{
  167. display: flex;
  168. color: #fff;
  169. justify-content: space-between;
  170. margin-bottom: 30rpx;
  171. margin-top: 30rpx;
  172. font-size: 30rpx;
  173. &>view{
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. }
  178. }
  179. .search{
  180. background-color: #fff;
  181. height: 70rpx;
  182. width: 100%;
  183. margin: 20rpx 0;
  184. display: flex;
  185. justify-content: center;
  186. align-items: center;
  187. font-size: 28rpx;
  188. border-radius: 10rpx;
  189. .icon{
  190. margin: 0 20rpx;
  191. }
  192. input{
  193. }
  194. .text{
  195. margin-left: auto;
  196. margin-right: 20rpx;
  197. }
  198. }
  199. }
  200. .box{
  201. padding: 20rpx;
  202. .box-line{
  203. display: flex;
  204. justify-content: space-between;
  205. align-items: center;
  206. margin-bottom: 20rpx;
  207. .title{
  208. position: relative;
  209. &::after{
  210. content: '';
  211. position: absolute;
  212. display: block;
  213. bottom: 0;
  214. left: 20rpx;
  215. width: 20rpx;
  216. height: 12rpx;
  217. background-color: $uni-linear-gradient-color;
  218. }
  219. }
  220. .more{
  221. display: flex;
  222. font-size: 24rpx;
  223. color: #777;
  224. }
  225. }
  226. .ACTORS{
  227. .swiper-item{
  228. display: flex;
  229. justify-content: center;
  230. align-items: center;
  231. flex-direction: column;
  232. width: 100%;
  233. image{
  234. width: 450rpx;
  235. height: 180rpx;
  236. }
  237. .swiper-item-content{
  238. margin-top: 15rpx;
  239. display: flex;
  240. width: 80%;
  241. .left{
  242. .title{
  243. font-weight: 900;
  244. font-size: 30rpx;
  245. }
  246. .info-from{
  247. font-size: 26rpx;
  248. color: #777;
  249. }
  250. }
  251. .right{
  252. background: $uni-linear-gradient-color;
  253. color: #fff;
  254. padding: 0 40rpx;
  255. font-size: 28rpx;
  256. margin-left: auto;
  257. border-radius: 15rpx;
  258. height: 60rpx;
  259. display: flex;
  260. justify-content: center;
  261. align-items: center;
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. </style>