index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <template>
  2. <view class="content">
  3. <view class="loading" v-if="loading">
  4. <cu-custom bgColor="bg-bluev-head">
  5. <block slot="content">达人任务平台</block>
  6. </cu-custom>
  7. <view class="home-search-loading">
  8. <view class="skeleton-line animate"></view>
  9. </view>
  10. <view class="home-content">
  11. <view class="banner-loading"><view class="skeleton-line animate"></view></view>
  12. <view class="quick-nav">
  13. <view class="nav-item" v-for="(item,index) in 3" :key="index">
  14. <view class="icon-loading"><view class="skeleton-line animate"></view></view>
  15. <view class="name margin-top-xs"><view class="skeleton-line animate"></view></view>
  16. </view>
  17. </view>
  18. <view class="new-star">
  19. <view class="title">
  20. <view class="name-loading"><view class="skeleton-line animate"></view></view>
  21. <view class="more-loading"><view class="skeleton-line animate"></view></view>
  22. </view>
  23. <view class="star-list">
  24. <view class="star-item" v-for="(item,index) in 4" :key="index">
  25. <view class="icon"><view class="skeleton-line animate"></view></view>
  26. <view class="name margin-top-xs"><view class="skeleton-line animate"></view></view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="quick-nav">
  31. <view class="nav-item w50" v-for="(item,index) in 2" :key="index">
  32. <view class="icon-loading"><view class="skeleton-line animate"></view></view>
  33. </view>
  34. </view>
  35. <view class="quick-nav">
  36. <view class="nav-item" v-for="(item,index) in 3" :key="index">
  37. <view class="icon-loading"><view class="skeleton-line animate"></view></view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <block v-else>
  43. <scroll-view scroll-y="true" class="scroll-content" :enhanced="true" :bounces="false" :show-scrollbar="false" @scroll="pageScroll">
  44. <view class="home-header bg-bluev-head">
  45. <cu-custom :bgColor="scrollHeight>20?'bg-bluev-head':'none'">
  46. <block slot="content">达人任务平台</block>
  47. </cu-custom>
  48. <view class="home-search">
  49. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/search-icon.png" mode="widthFix"></image>
  50. <input type="text" class="search-input" placeholder="请输入" />
  51. </view>
  52. </view>
  53. <view class="home-content">
  54. <view class="quick-nav">
  55. <view class="nav-item" @click="jumpUri('/pages/plugin/rank')">
  56. <view class="icon"><image src="/static/quick-nav/star-rank.png" mode="widthFix"></image></view>
  57. <view class="name">星耀榜</view>
  58. </view>
  59. <view class="nav-item" @click="jumpUri('/pages/school/school','sw')">
  60. <view class="icon"><image src="/static/quick-nav/business-school.png" mode="widthFix"></image></view>
  61. <view class="name">商学院</view>
  62. </view>
  63. <view class="nav-item" @click="jumpUri('/pages/plugin/star')">
  64. <view class="icon"><image src="/static/quick-nav/influencer-home.png" mode="widthFix"></image></view>
  65. <view class="name">达人之家</view>
  66. </view>
  67. </view>
  68. <view class="banner" @click="test">
  69. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/banner.png" mode="widthFix"></image>
  70. </view>
  71. <view class="new-star">
  72. <view class="title">
  73. <view class="name">最新入驻达人</view>
  74. <view class="more" @click="jumpUri('/pages/plugin/star')">查看全部 <text class="cuIcon-right"></text></view>
  75. </view>
  76. <view class="star-swiper">
  77. <swiper class="swiper" circular :autoplay="false" :interval="2000" :duration="200">
  78. <swiper-item class="swiper-item" v-for="(item,idex) in starData" :key="idex">
  79. <view class="first-body" hover-class="none">
  80. <view class="avatar"><image :src="item.avatar" mode="widthFix"></image></view>
  81. <view class="name">{{item.name}}</view>
  82. <view class="platform"><image :src="'/static/image/'+item.platform+'.svg'"></image></view>
  83. </view>
  84. </swiper-item>
  85. </swiper>
  86. </view>
  87. </view>
  88. <view class="quick-nav">
  89. <view class="nav-item w50" @click="jumpUri('/pages/task/detail?id=0')">
  90. <image class="w100" src="/static/entry/join-now.png" mode="widthFix"></image>
  91. </view>
  92. <view class="nav-item w50">
  93. <image class="w100" @click="jumpUri('/pages/task/task','sw')" src="/static/entry/task-square.png" mode="widthFix"></image>
  94. <view class="new-task">
  95. <image class="task-img-1" src="https://p9-dy.byteimg.com/obj/ecom-shop-material/jpeg_m_e3fa80e91300b16e0df15e2bcbd8c003_sx_426270_www800-800" @click="jumpUri('/pages/task/detail?id=0')"></image>
  96. <image class="task-img-2" src="https://p9-dy.byteimg.com/obj/ecom-shop-material/jpeg_m_e3fa80e91300b16e0df15e2bcbd8c003_sx_426270_www800-800" @click="jumpUri('/pages/task/detail?id=0')"></image>
  97. <image class="task-img-3" src="https://p9-dy.byteimg.com/obj/ecom-shop-material/jpeg_m_e3fa80e91300b16e0df15e2bcbd8c003_sx_426270_www800-800" @click="jumpUri('/pages/task/detail?id=0')"></image>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="rank-data">
  102. <view class="title">
  103. <view class="name">收益排行榜</view>
  104. <view class="more" @click="jumpUri('/pages/plugin/rank')">查看全部 <text class="cuIcon-right"></text></view>
  105. </view>
  106. <view class="rank-top">
  107. <view class="top-item rank-2">
  108. <image src="/static/rank/podium-rank2-bg.png" class="bg" mode="scaleToFill"></image>
  109. <view class="top-info">
  110. <view class="avatar">
  111. <image src="/static/rank/avatar.jpeg"></image>
  112. <view class="top-num"><image src="/static/rank/top-rank2.png"></image></view>
  113. </view>
  114. <view class="name">浅**浅</view>
  115. <view class="num"><text>¥</text>0.87w</view>
  116. </view>
  117. </view>
  118. <view class="top-item rank-1">
  119. <image src="/static/rank/podium-rank1-bg.png" class="bg" mode="scaleToFill"></image>
  120. <view class="top-info">
  121. <view class="avatar">
  122. <image src="/static/rank/avatar.jpeg"></image>
  123. <view class="top-num"><image src="/static/rank/top-rank1.png"></image></view>
  124. </view>
  125. <view class="name">浅**浅</view>
  126. <view class="num"><text>¥</text>0.87w</view>
  127. </view>
  128. </view>
  129. <view class="top-item rank-3">
  130. <image src="/static/rank/podium-rank3-bg.png" class="bg" mode="scaleToFill"></image>
  131. <view class="top-info">
  132. <view class="avatar">
  133. <image src="/static/rank/avatar.jpeg"></image>
  134. <view class="top-num"><image src="/static/rank/top-rank3.png"></image></view>
  135. </view>
  136. <view class="name">浅**浅</view>
  137. <view class="num"><text>¥</text>0.87w</view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="rank-list">
  142. <view class="rank-item">
  143. <view class="num">4</view>
  144. <view class="avatar"><image src="/static/rank/avatar.jpeg"></image></view>
  145. <view class="name">我是庄小周</view>
  146. <view class="money"><text>¥</text>0.23w</view>
  147. </view>
  148. <view class="rank-item">
  149. <view class="num">5</view>
  150. <view class="avatar"><image src="/static/rank/avatar.jpeg"></image></view>
  151. <view class="name">我是庄小周</view>
  152. <view class="money"><text>¥</text>0.23w</view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="home-task">
  157. <view class="title">
  158. <view class="name">最新任务</view>
  159. <view class="more" @click="jumpUri('/pages/task/task','sw')">查看全部 <text class="cuIcon-right"></text></view>
  160. </view>
  161. <view class="star-task-list">
  162. <view class="task-item" v-for="(item,indx) in 10" :key="indx" @click="jumpUri('/pages/task/detail?id='+indx)">
  163. <view class="item-body">
  164. <view class="item-img">
  165. <image src="https://p9-dy.byteimg.com/obj/ecom-shop-material/jpeg_m_e3fa80e91300b16e0df15e2bcbd8c003_sx_426270_www800-800" mode="aspectFill"></image>
  166. </view>
  167. <view class="item-info">
  168. <view class="title">【官方正品】金纺柔顺剂宝宝衣物适用0漂白剂抗静电蓬松不僵硬CW-星川任务-202</view>
  169. <view class="item-tags">
  170. <view class="tag-item">抖音</view>
  171. <view class="tag-item">手拍</view>
  172. <view class="tag-item">真人出境</view>
  173. </view>
  174. <view class="item-price">
  175. <view class="item-platform">抖音L1</view>
  176. <view class="price-txt"><text>¥</text>20.0w</view>
  177. </view>
  178. </view>
  179. </view>
  180. <view class="item-foot">
  181. <view class="item-join">
  182. <view class="cu-avatar-group">
  183. <view class="cu-avatar round sm" v-for="(item,index) in avatar" :key="index" :style="[{ backgroundImage:'url(' + avatar[index] + ')' }]"></view>
  184. </view>
  185. <view class="join-text"><text>180</text>/200人已参加</view>
  186. </view>
  187. <view class="foot-btn">
  188. <button class="btn disabled" :disabled="true">立即参加</button>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. <view class="star-task-more"></view>
  194. </view>
  195. </view>
  196. </scroll-view>
  197. </block>
  198. <halfLogin ref="loginCom"></halfLogin>
  199. </view>
  200. </template>
  201. <script>
  202. var app;
  203. export default {
  204. data() {
  205. return {
  206. loginState:true,
  207. loading:false,
  208. scrollHeight:0,
  209. starData:[
  210. {
  211. "avatar":"/static/rank/avatar.jpeg",
  212. "name":"我是庄小周",
  213. "platform":"douyin"
  214. },
  215. {
  216. "avatar":"/static/rank/avatar.jpeg",
  217. "name":"我是庄小周2",
  218. "platform":"kuaishou"
  219. },
  220. {
  221. "avatar":"/static/rank/avatar.jpeg",
  222. "name":"我是庄小周3",
  223. "platform":"txvideo"
  224. },
  225. {
  226. "avatar":"/static/rank/avatar.jpeg",
  227. "name":"我是庄小周4",
  228. "platform":"xiaohongshu"
  229. },
  230. {
  231. "avatar":"/static/rank/avatar.jpeg",
  232. "name":"我是庄小周5",
  233. "platform":"douyin"
  234. }
  235. ],
  236. avatar: [
  237. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
  238. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big81005.jpg',
  239. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg',
  240. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big91012.jpg'
  241. ],
  242. }
  243. },
  244. onLoad() {
  245. app = this;
  246. },
  247. methods: {
  248. jumpUri(uri,type = 'nv')
  249. {
  250. // 判断是否登录
  251. switch (type){
  252. case "sw":
  253. uni.switchTab({
  254. url:uri
  255. })
  256. break;
  257. case "nv":
  258. default:
  259. uni.navigateTo({
  260. url:uri
  261. })
  262. break;
  263. }
  264. },
  265. pageScroll(event) {
  266. var scrollHeight = event.detail.scrollTop;
  267. app.scrollHeight = scrollHeight;
  268. },
  269. test(){
  270. this.$refs.loginCom.open();
  271. this.loginState = true;
  272. }
  273. }
  274. }
  275. </script>
  276. <style lang="scss">
  277. page{background-color: #f8f8f8;}
  278. .banner-loading{height: 220rpx;}
  279. .rank-data .rank-top{padding: 20rpx;display: flex;align-items: flex-end;}
  280. .rank-data .rank-top .top-item{flex: 1;position: relative;min-height: 200rpx;}
  281. .rank-data .rank-top .top-item.rank-1{height: 260rpx;}
  282. .rank-data .rank-top .top-item.rank-2{height: 220rpx;}
  283. .rank-data .rank-top .top-item.rank-3{height: 220rpx;}
  284. .rank-data .rank-top .top-item .bg{width: 100%;position: absolute;left: 0;right: 0;bottom: 0;height: 86%;}
  285. .rank-data .rank-top .top-info {position: relative;z-index: 99;display: flex;flex-direction: column;align-items: center;justify-content: center;}
  286. .rank-data .rank-top .top-info .avatar{position: relative;width: 80rpx;height: 80rpx;margin-bottom: 40rpx;}
  287. .rank-data .rank-top .top-info .avatar image{width: 80rpx;height: 80rpx;border-radius: 100%;border: 4rpx solid #fff;}
  288. .rank-data .rank-top .top-info .avatar .top-num {position: absolute;right: -60rpx;top: 0;}
  289. .rank-data .rank-top .top-info .avatar .top-num image{width: 80rpx;height: 40rpx;border-radius: 0;border: 0;}
  290. .rank-data .rank-top .top-info .name{color: #666;font-size: 24rpx;margin-bottom: 10rpx;}
  291. .rank-data .rank-top .top-info .num{display: flex;align-items: baseline;font-weight: 800;color: #000;font-size: 28rpx;}
  292. .rank-data .rank-top .top-info .num text{font-weight: normal;color: #666;font-size: 24rpx;}
  293. .rank-data .rank-list{padding: 0 20rpx;}
  294. .rank-data .rank-list .rank-item{display: flex;align-items: center;padding: 10rpx 0;font-size: 24rpx;color: #000;}
  295. .rank-data .rank-list .rank-item .num{color: rgba(141, 141, 141, 1);}
  296. .rank-data .rank-list .rank-item .avatar {margin: 0 20rpx;}
  297. .rank-data .rank-list .rank-item .avatar image{width: 50rpx;height: 50rpx;border-radius: 100%;}
  298. .rank-data .rank-list .rank-item .money{
  299. display: flex;
  300. align-items: baseline;
  301. flex-shrink: 0;
  302. font-weight: 800;
  303. font-size: 28rpx;
  304. color: #000;
  305. margin-left: auto;
  306. margin-right: 0;
  307. }
  308. .rank-data .rank-list .rank-item .money text{
  309. font-weight: normal;
  310. color: #666;
  311. font-size: 24rpx;
  312. }
  313. .home-search-loading{margin: 20rpx;height: 68rpx;}
  314. .home-search{display: flex;align-items: center;background-color: #fff;border-radius: 66rpx;margin: 20rpx;height: 68rpx;padding: 0 20rpx;gap: 20rpx;}
  315. .home-search image{width: 32rpx;height: 32rpx;}
  316. .home-search .search-input{font-size: 24rpx;width: 100%;border: 0;height: 100%;box-sizing: none;box-shadow: none;}
  317. .home-content {margin: 20rpx;}
  318. .home-content .banner{margin: 20rpx 0;}
  319. .home-content .banner image{width: 100%;}
  320. .quick-nav{display: flex;align-items: center;margin: 20rpx 0;gap: 20rpx;}
  321. .quick-nav .nav-item{width: 33%;text-align: center;font-family: "bluevBold";font-size: 24rpx;position: relative;}
  322. .quick-nav .nav-item .icon image{width: 60%;}
  323. .quick-nav .nav-item.w50{width: 50%;}
  324. .quick-nav .nav-item .icon-loading{height: 180rpx;}
  325. .quick-nav .nav-item .new-task{position: absolute;bottom: 35rpx;display: flex;align-items: center;left: 30rpx;}
  326. .quick-nav .nav-item .new-task image{width: 60rpx;height: 60rpx;border-radius: 10rpx;border: 2rpx solid #fff;}
  327. .quick-nav .nav-item .new-task .task-img-1{transform: rotate(0deg);animation: entry-task-wobble-0 5.5s ease-in-out infinite both;}
  328. .quick-nav .nav-item .new-task .task-img-2{transform: rotate(17deg);margin-left: -10rpx;animation: entry-task-wobble-1 5.5s ease-in-out infinite both;}
  329. .quick-nav .nav-item .new-task .task-img-3{transform: rotate(0deg);margin-left: -10rpx;animation: entry-task-wobble-2 5.5s ease-in-out infinite both;}
  330. .new-star .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  331. .new-star .title .name{font-family: "bluevBold";font-size: 32rpx;}
  332. .new-star .title .more{font-size: 24rpx;color: #666;}
  333. .new-star .title .more-loading{width: 15%;}
  334. .new-star .title .name-loading{width: 30%;}
  335. .star-list{display: flex;align-items: center;gap: 20rpx;}
  336. .star-list .star-item{width: 25%;margin: 20rpx 0;}
  337. .star-list .star-item .icon{height: 120rpx;}
  338. .rank-data{background-color: #fff;border-radius: 20rpx;padding: 20rpx;margin: 20rpx 0;}
  339. .rank-data .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  340. .rank-data .title .name{font-family: "bluevBold";font-size: 32rpx;}
  341. .rank-data .title .more{font-size: 24rpx;color: #666;}
  342. .home-task .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  343. .home-task .title .name{font-family: "bluevBold";font-size: 32rpx;}
  344. .home-task .title .more{font-size: 24rpx;color: #666;}
  345. .star-swiper{
  346. margin-top: 20upx;
  347. display: flex;
  348. overflow-x: auto;
  349. gap: 20upx;
  350. flex-shrink:0;
  351. flex-direction: row;
  352. flex-wrap: nowrap;
  353. }
  354. .star-swiper .swiper{
  355. width: 100%;
  356. display: flex;
  357. gap: 20rpx;
  358. height: 180rpx;
  359. }
  360. .star-swiper .swiper .swiper-item{
  361. width: calc(100vw / 5) !important;
  362. position: relative;
  363. }
  364. .star-swiper .first-body .platform{position: absolute;top: 0;right: 20rpx;background-color: #fff;width: 40rpx;height: 40rpx;border-radius: 100%;}
  365. .star-swiper .first-body .platform image{width: 40rpx;height: 40rpx;}
  366. .star-swiper .first-body{
  367. width: 90%;
  368. border-radius: 10rpx;
  369. text-align: center;
  370. }
  371. .star-swiper .first-body .name{
  372. font-size: 24rpx;
  373. color: #333;
  374. margin-top: 10rpx;
  375. font-weight: 800;
  376. }
  377. .star-swiper .first-body .avatar{
  378. display: flex;
  379. align-items: center;
  380. justify-content: center;
  381. }
  382. .star-swiper .first-body .avatar image{
  383. width: 100%;
  384. max-height: 200rpx;
  385. border-radius: 100%;
  386. }
  387. @keyframes entry-task-wobble-0 {
  388. 0%,
  389. 82%,
  390. 100% {
  391. transform: rotate(0deg) translateY(0);
  392. }
  393. 86% {
  394. transform: rotate(5deg) translateY(-2rpx);
  395. }
  396. 90% {
  397. transform: rotate(-4deg) translateY(0);
  398. }
  399. 94% {
  400. transform: rotate(3deg) translateY(-1rpx);
  401. }
  402. 97% {
  403. transform: rotate(-2deg) translateY(0);
  404. }
  405. }
  406. @keyframes entry-task-wobble-1 {
  407. 0%,
  408. 82%,
  409. 100% {
  410. transform: rotate(17deg) translateY(0);
  411. }
  412. 86% {
  413. transform: rotate(22deg) translateY(-2rpx);
  414. }
  415. 90% {
  416. transform: rotate(13deg) translateY(0);
  417. }
  418. 94% {
  419. transform: rotate(20deg) translateY(-1rpx);
  420. }
  421. 97% {
  422. transform: rotate(15deg) translateY(0);
  423. }
  424. }
  425. @keyframes entry-task-wobble-2 {
  426. 0%,
  427. 82%,
  428. 100% {
  429. transform: rotate(0deg) translateY(0);
  430. }
  431. 86% {
  432. transform: rotate(-5deg) translateY(-2rpx);
  433. }
  434. 90% {
  435. transform: rotate(4deg) translateY(0);
  436. }
  437. 94% {
  438. transform: rotate(-3deg) translateY(-1rpx);
  439. }
  440. 97% {
  441. transform: rotate(2deg) translateY(0);
  442. }
  443. }
  444. </style>