帧视界壹通告,付费看视频的微信小程序
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.5 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. @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. }
  114. },
  115. computed : {
  116. },
  117. onShow() {
  118. this.getData()
  119. if(wx.onNeedPrivacyAuthorization){
  120. console.log('onNeedPrivacyAuthorization');
  121. wx.onNeedPrivacyAuthorization(resolve => {
  122. console.log('onNeedPrivacyAuthorization');
  123. // 需要用户同意隐私授权时
  124. // 弹出开发者自定义的隐私授权弹窗
  125. this.resolvePrivacyAuthorization = resolve
  126. this.$refs.showPrivacy.init(resolve)
  127. })
  128. }
  129. },
  130. methods: {
  131. getData(){
  132. this.$api('indexGetBanner', res => {
  133. if(res.code == 200){
  134. this.banner = res.result
  135. }
  136. })
  137. this.$api('indexGetActorList', res => {
  138. if(res.code == 200){
  139. this.actorList = res.result
  140. }
  141. })
  142. this.$api('indexGetTrendsPage', {
  143. pageNo : 1,
  144. pageSize : 10,
  145. }, res => {
  146. if(res.code == 200){
  147. this.trends = res.result.records
  148. }
  149. })
  150. },
  151. bannerClick(index){
  152. console.log(index);
  153. uni.navigateTo({
  154. url: '/pages/publish/competition'
  155. })
  156. }
  157. }
  158. }
  159. </script>
  160. <style scoped lang="scss">
  161. .content{
  162. padding-bottom: 150rpx;
  163. .top{
  164. background-image: $uni-linear-gradient-bg-color;
  165. padding: 0 20rpx;
  166. padding-top: calc(var(--status-bar-height) + 20rpx);
  167. .title{
  168. display: flex;
  169. color: #fff;
  170. justify-content: space-between;
  171. &>view{
  172. display: flex;
  173. justify-content: center;
  174. align-items: center;
  175. }
  176. }
  177. .search{
  178. background-color: #fff;
  179. height: 70rpx;
  180. width: 100%;
  181. margin: 20rpx 0;
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. font-size: 28rpx;
  186. border-radius: 10rpx;
  187. .icon{
  188. margin: 0 20rpx;
  189. }
  190. input{
  191. }
  192. .text{
  193. margin-left: auto;
  194. margin-right: 20rpx;
  195. }
  196. }
  197. }
  198. .box{
  199. padding: 20rpx;
  200. .box-line{
  201. display: flex;
  202. justify-content: space-between;
  203. align-items: center;
  204. margin-bottom: 20rpx;
  205. .title{
  206. position: relative;
  207. &::after{
  208. content: '';
  209. position: absolute;
  210. display: block;
  211. bottom: 0;
  212. left: 20rpx;
  213. width: 20rpx;
  214. height: 12rpx;
  215. background-color: $uni-linear-gradient-color;
  216. }
  217. }
  218. .more{
  219. display: flex;
  220. font-size: 24rpx;
  221. color: #777;
  222. }
  223. }
  224. .ACTORS{
  225. .swiper-item{
  226. display: flex;
  227. justify-content: center;
  228. align-items: center;
  229. flex-direction: column;
  230. width: 100%;
  231. image{
  232. width: 450rpx;
  233. height: 180rpx;
  234. }
  235. .swiper-item-content{
  236. margin-top: 15rpx;
  237. display: flex;
  238. width: 80%;
  239. .left{
  240. .title{
  241. font-weight: 900;
  242. font-size: 30rpx;
  243. }
  244. .info-from{
  245. font-size: 26rpx;
  246. color: #777;
  247. }
  248. }
  249. .right{
  250. background: $uni-linear-gradient-color;
  251. color: #fff;
  252. padding: 0 40rpx;
  253. font-size: 28rpx;
  254. margin-left: auto;
  255. border-radius: 15rpx;
  256. height: 60rpx;
  257. display: flex;
  258. justify-content: center;
  259. align-items: center;
  260. }
  261. }
  262. }
  263. }
  264. }
  265. }
  266. </style>