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

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