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

315 lines
5.7 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="competition">
  3. <navbar
  4. leftClick
  5. bgColor="#cfd4ff"
  6. @leftClick="$utils.navigateBack"
  7. title="比赛评选"/>
  8. <view class="top">
  9. <view class="left">
  10. <view class="title">
  11. 比赛评选排行
  12. </view>
  13. <view class="">
  14. 参与活动 领取奖励
  15. </view>
  16. </view>
  17. <view class="right">
  18. <image src="/static/image/competition/1.png" mode=""></image>
  19. </view>
  20. </view>
  21. <view class="box">
  22. <view class="head">
  23. <view class="ranking">
  24. 排行
  25. </view>
  26. <view class="content">
  27. 作品
  28. </view>
  29. <view class="give-like">
  30. 点赞
  31. </view>
  32. </view>
  33. <view class="empty"
  34. v-if="!list.length">
  35. <image src="/static/image/competition/k.png" mode=""></image>
  36. <view class="">
  37. 暂无作品发布第一个作品吧 ~
  38. </view>
  39. </view>
  40. <view class="list"
  41. v-else>
  42. <view class="item"
  43. v-for="(item, index) in list"
  44. :key="index">
  45. <view class="ranking">
  46. {{ index + 1 }}
  47. </view>
  48. <view class="content">
  49. <view class="image">
  50. <image :src="item.image" mode=""></image>
  51. </view>
  52. <view class="text">
  53. <view class="title">
  54. {{ item.title }}
  55. </view>
  56. <view class="actor">
  57. <view class="headImage">
  58. <image src="" mode=""></image>
  59. </view>
  60. <view class="username">
  61. 发布人{{ item.createBy }}
  62. </view>
  63. </view>
  64. <view class="createTime">
  65. 发布时间{{ item.createTime }}
  66. </view>
  67. </view>
  68. </view>
  69. <view class="give-like">
  70. <view class="num">
  71. <uv-icon
  72. size="30rpx"
  73. name="thumb-up"></uv-icon>
  74. 240
  75. </view>
  76. <view :class="{btn : true, a : index == 3}">
  77. 投票
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="submit">
  84. 发布作品
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. data() {
  91. return {
  92. list : [],
  93. total : 0,
  94. queryParams: {
  95. pageNo: 1,
  96. pageSize: 10
  97. },
  98. }
  99. },
  100. onLoad() {
  101. // this.$route.query的参数
  102. this.getList()
  103. },
  104. //滚动到屏幕底部
  105. onReachBottom() {
  106. if(this.queryParams.pageSize < this.total){
  107. this.queryParams.pageSize += 10
  108. this.getList()
  109. }
  110. },
  111. methods: {
  112. getList(){
  113. this.$api('indexGetGetWorkPage', {
  114. token : uni.getStorageSync('token'),
  115. ...this.queryParams
  116. }, res => {
  117. if(res.code == 200){
  118. this.list = res.result.records
  119. this.total = res.result.total
  120. }
  121. })
  122. }
  123. }
  124. }
  125. </script>
  126. <style scoped lang="scss">
  127. .competition{
  128. .top{
  129. background: linear-gradient(#cfd4ff, #f7f7f7);
  130. width: 100%;
  131. height: 400rpx;
  132. display: flex;
  133. box-sizing: border-box;
  134. padding: 0 30rpx;
  135. justify-content: space-between;
  136. .left{
  137. padding-top: 40rpx;
  138. font-size: 28rpx;
  139. .title{
  140. font-size: 50rpx;
  141. font-weight: 900;
  142. color: #5a24f3;
  143. padding-bottom: 20rpx;
  144. }
  145. }
  146. .right{
  147. image{
  148. width: 300rpx;
  149. height: 300rpx;
  150. margin-top: -50rpx;
  151. }
  152. }
  153. }
  154. .box{
  155. background-color: #fff;
  156. min-height: 100rpx;
  157. margin: 0 30rpx;
  158. margin-top: -150rpx;
  159. border-radius: 20rpx;
  160. .head,
  161. .item{
  162. display: flex;
  163. padding: 20rpx 10rpx;
  164. .content{
  165. flex: 1;
  166. }
  167. .give-like,
  168. .ranking{
  169. width: 120rpx;
  170. display: flex;
  171. justify-content: center;
  172. align-items: center;
  173. flex-direction: column;
  174. }
  175. }
  176. .head{
  177. font-size: 28rpx;
  178. color: #999;
  179. }
  180. .empty{
  181. display: flex;
  182. flex-direction: column;
  183. justify-content: center;
  184. align-items: center;
  185. padding: 100rpx 0;
  186. color: #999;
  187. }
  188. .list{
  189. .item{
  190. font-size: 20rpx;
  191. &:nth-child(2){
  192. .ranking{
  193. color: red;
  194. }
  195. }
  196. &:nth-child(3){
  197. .ranking{
  198. color: #FFA200;
  199. }
  200. }
  201. &:nth-child(4){
  202. .ranking{
  203. color: #4739EA;
  204. }
  205. }
  206. .ranking{
  207. font-size: 40rpx;
  208. font-weight: 900;
  209. font-style: italic;
  210. }
  211. .content{
  212. display: flex;
  213. image{
  214. width: 100%;
  215. height: 100%;
  216. }
  217. .image{
  218. width: 200rpx;
  219. height: 150rpx;
  220. background-color: #999;
  221. overflow: hidden;
  222. margin-right: 20rpx;
  223. border-radius: 20rpx;
  224. flex-shrink: 0;
  225. }
  226. .text{
  227. .title{
  228. font-size: 30rpx;
  229. font-weight: 900;
  230. display: -webkit-box;
  231. -webkit-box-orient:
  232. vertical; -webkit-line-clamp: 2;
  233. overflow: hidden;
  234. height: 80rpx;
  235. }
  236. .actor{
  237. display: flex;
  238. .headImage{
  239. width: 30rpx;
  240. height: 30rpx;
  241. overflow: hidden;
  242. border-radius: 20rpx;
  243. background-color: #999;
  244. margin-right: 5rpx;
  245. }
  246. .username{
  247. overflow: hidden;
  248. text-overflow:ellipsis;
  249. white-space: nowrap;
  250. width: 180rpx;
  251. }
  252. }
  253. .createTime{
  254. overflow: hidden;
  255. text-overflow:ellipsis;
  256. white-space: nowrap;
  257. width: 220rpx;
  258. margin-top: 10rpx;
  259. }
  260. }
  261. }
  262. .give-like{
  263. display: flex;
  264. flex-direction: column;
  265. justify-content: center;
  266. align-items: center;
  267. .num{
  268. display: flex;
  269. }
  270. .btn{
  271. border: 1px solid #4739EA;
  272. margin-top: 10rpx;
  273. padding: 8rpx 16rpx;
  274. border-radius: 15rpx;
  275. color: #4739EA;
  276. &.a{
  277. color: #999;
  278. border: 1px solid #999;
  279. }
  280. }
  281. }
  282. }
  283. }
  284. }
  285. .submit{
  286. position: fixed;
  287. bottom: 0;
  288. left: 0;
  289. margin: 0 50rpx;
  290. margin-bottom: 50rpx;
  291. background: $uni-linear-gradient-btn-color;
  292. color: #fff;
  293. width: 650rpx;
  294. height: 80rpx;
  295. display: flex;
  296. justify-content: center;
  297. align-items: center;
  298. font-size: 28rpx;
  299. border-radius: 20rpx;
  300. }
  301. }
  302. </style>