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

284 lines
5.4 KiB

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