index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  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. import * as Api from "@/api/auth.js";
  204. export default {
  205. data() {
  206. return {
  207. loginState:true,
  208. loading:false,
  209. scrollHeight:0,
  210. starData:[
  211. {
  212. "avatar":"/static/rank/avatar.jpeg",
  213. "name":"我是庄小周",
  214. "platform":"douyin"
  215. },
  216. {
  217. "avatar":"/static/rank/avatar.jpeg",
  218. "name":"我是庄小周2",
  219. "platform":"kuaishou"
  220. },
  221. {
  222. "avatar":"/static/rank/avatar.jpeg",
  223. "name":"我是庄小周3",
  224. "platform":"txvideo"
  225. },
  226. {
  227. "avatar":"/static/rank/avatar.jpeg",
  228. "name":"我是庄小周4",
  229. "platform":"xiaohongshu"
  230. },
  231. {
  232. "avatar":"/static/rank/avatar.jpeg",
  233. "name":"我是庄小周5",
  234. "platform":"douyin"
  235. }
  236. ],
  237. avatar: [
  238. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
  239. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big81005.jpg',
  240. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg',
  241. 'https://ossweb-img.qq.com/images/lol/web201310/skin/big91012.jpg'
  242. ],
  243. }
  244. },
  245. onLoad() {
  246. app = this;
  247. // app.toLogin()
  248. },
  249. methods: {
  250. toLogin(){
  251. uni.login({
  252. success(resp) {
  253. Api.quick({"code":resp.code}).then((res)=>{
  254. })
  255. }
  256. })
  257. },
  258. jumpUri(uri,type = 'nv')
  259. {
  260. // 判断是否登录
  261. switch (type){
  262. case "sw":
  263. uni.switchTab({
  264. url:uri
  265. })
  266. break;
  267. case "nv":
  268. default:
  269. uni.navigateTo({
  270. url:uri
  271. })
  272. break;
  273. }
  274. },
  275. pageScroll(event) {
  276. var scrollHeight = event.detail.scrollTop;
  277. app.scrollHeight = scrollHeight;
  278. },
  279. test(){
  280. this.$refs.loginCom.open();
  281. this.loginState = true;
  282. }
  283. }
  284. }
  285. </script>
  286. <style lang="scss">
  287. page{background-color: #f8f8f8;}
  288. .banner-loading{height: 220rpx;}
  289. .rank-data .rank-top{padding: 20rpx;display: flex;align-items: flex-end;}
  290. .rank-data .rank-top .top-item{flex: 1;position: relative;min-height: 200rpx;}
  291. .rank-data .rank-top .top-item.rank-1{height: 260rpx;}
  292. .rank-data .rank-top .top-item.rank-2{height: 220rpx;}
  293. .rank-data .rank-top .top-item.rank-3{height: 220rpx;}
  294. .rank-data .rank-top .top-item .bg{width: 100%;position: absolute;left: 0;right: 0;bottom: 0;height: 86%;}
  295. .rank-data .rank-top .top-info {position: relative;z-index: 99;display: flex;flex-direction: column;align-items: center;justify-content: center;}
  296. .rank-data .rank-top .top-info .avatar{position: relative;width: 80rpx;height: 80rpx;margin-bottom: 40rpx;}
  297. .rank-data .rank-top .top-info .avatar image{width: 80rpx;height: 80rpx;border-radius: 100%;border: 4rpx solid #fff;}
  298. .rank-data .rank-top .top-info .avatar .top-num {position: absolute;right: -60rpx;top: 0;}
  299. .rank-data .rank-top .top-info .avatar .top-num image{width: 80rpx;height: 40rpx;border-radius: 0;border: 0;}
  300. .rank-data .rank-top .top-info .name{color: #666;font-size: 24rpx;margin-bottom: 10rpx;}
  301. .rank-data .rank-top .top-info .num{display: flex;align-items: baseline;font-weight: 800;color: #000;font-size: 28rpx;}
  302. .rank-data .rank-top .top-info .num text{font-weight: normal;color: #666;font-size: 24rpx;}
  303. .rank-data .rank-list{padding: 0 20rpx;}
  304. .rank-data .rank-list .rank-item{display: flex;align-items: center;padding: 10rpx 0;font-size: 24rpx;color: #000;}
  305. .rank-data .rank-list .rank-item .num{color: rgba(141, 141, 141, 1);}
  306. .rank-data .rank-list .rank-item .avatar {margin: 0 20rpx;}
  307. .rank-data .rank-list .rank-item .avatar image{width: 50rpx;height: 50rpx;border-radius: 100%;}
  308. .rank-data .rank-list .rank-item .money{
  309. display: flex;
  310. align-items: baseline;
  311. flex-shrink: 0;
  312. font-weight: 800;
  313. font-size: 28rpx;
  314. color: #000;
  315. margin-left: auto;
  316. margin-right: 0;
  317. }
  318. .rank-data .rank-list .rank-item .money text{
  319. font-weight: normal;
  320. color: #666;
  321. font-size: 24rpx;
  322. }
  323. .home-search-loading{margin: 20rpx;height: 68rpx;}
  324. .home-search{display: flex;align-items: center;background-color: #fff;border-radius: 66rpx;margin: 20rpx;height: 68rpx;padding: 0 20rpx;gap: 20rpx;}
  325. .home-search image{width: 32rpx;height: 32rpx;}
  326. .home-search .search-input{font-size: 24rpx;width: 100%;border: 0;height: 100%;box-sizing: none;box-shadow: none;}
  327. .home-content {margin: 20rpx;}
  328. .home-content .banner{margin: 20rpx 0;}
  329. .home-content .banner image{width: 100%;}
  330. .quick-nav{display: flex;align-items: center;margin: 20rpx 0;gap: 20rpx;}
  331. .quick-nav .nav-item{width: 33%;text-align: center;font-family: "bluevBold";font-size: 24rpx;position: relative;}
  332. .quick-nav .nav-item .icon image{width: 60%;}
  333. .quick-nav .nav-item.w50{width: 50%;}
  334. .quick-nav .nav-item .icon-loading{height: 180rpx;}
  335. .quick-nav .nav-item .new-task{position: absolute;bottom: 35rpx;display: flex;align-items: center;left: 30rpx;}
  336. .quick-nav .nav-item .new-task image{width: 60rpx;height: 60rpx;border-radius: 10rpx;border: 2rpx solid #fff;}
  337. .quick-nav .nav-item .new-task .task-img-1{transform: rotate(0deg);animation: entry-task-wobble-0 5.5s ease-in-out infinite both;}
  338. .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;}
  339. .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;}
  340. .new-star .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  341. .new-star .title .name{font-family: "bluevBold";font-size: 32rpx;}
  342. .new-star .title .more{font-size: 24rpx;color: #666;}
  343. .new-star .title .more-loading{width: 15%;}
  344. .new-star .title .name-loading{width: 30%;}
  345. .star-list{display: flex;align-items: center;gap: 20rpx;}
  346. .star-list .star-item{width: 25%;margin: 20rpx 0;}
  347. .star-list .star-item .icon{height: 120rpx;}
  348. .rank-data{background-color: #fff;border-radius: 20rpx;padding: 20rpx;margin: 20rpx 0;}
  349. .rank-data .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  350. .rank-data .title .name{font-family: "bluevBold";font-size: 32rpx;}
  351. .rank-data .title .more{font-size: 24rpx;color: #666;}
  352. .home-task .title{display: flex;align-items: center;justify-content: space-between;line-height: 60rpx;}
  353. .home-task .title .name{font-family: "bluevBold";font-size: 32rpx;}
  354. .home-task .title .more{font-size: 24rpx;color: #666;}
  355. .star-swiper{
  356. margin-top: 20upx;
  357. display: flex;
  358. overflow-x: auto;
  359. gap: 20upx;
  360. flex-shrink:0;
  361. flex-direction: row;
  362. flex-wrap: nowrap;
  363. }
  364. .star-swiper .swiper{
  365. width: 100%;
  366. display: flex;
  367. gap: 20rpx;
  368. height: 180rpx;
  369. }
  370. .star-swiper .swiper .swiper-item{
  371. width: calc(100vw / 5) !important;
  372. position: relative;
  373. }
  374. .star-swiper .first-body .platform{position: absolute;top: 0;right: 20rpx;background-color: #fff;width: 40rpx;height: 40rpx;border-radius: 100%;}
  375. .star-swiper .first-body .platform image{width: 40rpx;height: 40rpx;}
  376. .star-swiper .first-body{
  377. width: 90%;
  378. border-radius: 10rpx;
  379. text-align: center;
  380. }
  381. .star-swiper .first-body .name{
  382. font-size: 24rpx;
  383. color: #333;
  384. margin-top: 10rpx;
  385. font-weight: 800;
  386. }
  387. .star-swiper .first-body .avatar{
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. }
  392. .star-swiper .first-body .avatar image{
  393. width: 100%;
  394. max-height: 200rpx;
  395. border-radius: 100%;
  396. }
  397. @keyframes entry-task-wobble-0 {
  398. 0%,
  399. 82%,
  400. 100% {
  401. transform: rotate(0deg) translateY(0);
  402. }
  403. 86% {
  404. transform: rotate(5deg) translateY(-2rpx);
  405. }
  406. 90% {
  407. transform: rotate(-4deg) translateY(0);
  408. }
  409. 94% {
  410. transform: rotate(3deg) translateY(-1rpx);
  411. }
  412. 97% {
  413. transform: rotate(-2deg) translateY(0);
  414. }
  415. }
  416. @keyframes entry-task-wobble-1 {
  417. 0%,
  418. 82%,
  419. 100% {
  420. transform: rotate(17deg) translateY(0);
  421. }
  422. 86% {
  423. transform: rotate(22deg) translateY(-2rpx);
  424. }
  425. 90% {
  426. transform: rotate(13deg) translateY(0);
  427. }
  428. 94% {
  429. transform: rotate(20deg) translateY(-1rpx);
  430. }
  431. 97% {
  432. transform: rotate(15deg) translateY(0);
  433. }
  434. }
  435. @keyframes entry-task-wobble-2 {
  436. 0%,
  437. 82%,
  438. 100% {
  439. transform: rotate(0deg) translateY(0);
  440. }
  441. 86% {
  442. transform: rotate(-5deg) translateY(-2rpx);
  443. }
  444. 90% {
  445. transform: rotate(4deg) translateY(0);
  446. }
  447. 94% {
  448. transform: rotate(-3deg) translateY(-1rpx);
  449. }
  450. 97% {
  451. transform: rotate(2deg) translateY(0);
  452. }
  453. }
  454. </style>