帧视界壹通告,付费看视频的微信小程序
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.

292 lines
5.8 KiB

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