user-info.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. <template>
  2. <view class="user-info flex-common-css">
  3. <Nav class="nav-class" :bgckgroundBox="!isScroll?'transparent':'#fff'" :titleColor="isScroll?'#000':'#fff'">
  4. </Nav>
  5. <scroll-view :scroll-y="true" class="list-scroll" @scroll="scroll" @scrolltolower="scrolltolower">
  6. <view class="swiper-box">
  7. <swiper class="swiper" :circular="true" :indicator-dots="false" :autoplay="true" :current="currentIndex">
  8. <swiper-item v-for="(item,index) in swiperData" :key="index">
  9. <image class="swiper-img" :src="item.img" mode=""></image>
  10. </swiper-item>
  11. </swiper>
  12. <scroll-view class="" scroll-x="true" scroll-left="120" :class="!isScroll?'scroll-view_H':'scroll-view_H-two'">
  13. <image class="swiper-img-two sys-radius-16" v-for="(itemTwo,indexTwo) in swiperData" :key="indexTwo"
  14. :src="itemTwo.img" mode="" @click="selectImg(indexTwo)"></image>
  15. </scroll-view>
  16. <view class="blank-box sys-background-gray-f"></view>
  17. </view>
  18. <view class="content-box sys-background-gray-f">
  19. <view class="info-title">
  20. <view class="info-title-name sys-weight-600 sys-size-40 sys-color-black">
  21. 最佳损友最佳损友最佳友最佳友最佳友最佳
  22. </view>
  23. <view class="like-but sys-background-F2F2F2 sys-radius-40">
  24. <uni-icons type="heart-filled" size="12" color="#FB4454"></uni-icons>
  25. <view class="like-but-text sys-size-24 sys-color-gray-6">
  26. 108喜欢
  27. </view>
  28. </view>
  29. </view>
  30. <view class="tag-box">
  31. <view class="tag-list sys-background-F2F2F2 sys-radius-8">
  32. <uni-icons type="checkbox-filled" size="12" color="#FB4454"></uni-icons>
  33. <view class="tag-text sys-size-24 sys-color-gray-6">
  34. 真实头像
  35. </view>
  36. </view>
  37. </view>
  38. <view class="introduce">
  39. <view class="distance sys-color-F47D12 sys-size-28 sys-weight-600">
  40. 17.16km
  41. </view>
  42. <view class="info-introduce sys-size-24 sys-color-gray-6">
  43. 重庆市 九龙坡 / 男/ 19岁
  44. </view>
  45. </view>
  46. <view class="hobby-box">
  47. <view class="hobby sys-radius-20">
  48. <view class="hobby-title sys-size-32 sys-color-black">
  49. 崇尚自由,热爱生活,足以!
  50. </view>
  51. <view class="hobby-list">
  52. <view class="hobby-tag sys-radius-200" v-for="(itemThree,indexThree) in hobbyList" :key="indexThree">
  53. <uni-icons class="hobby-tag-icon" :type="itemThree.icon" size="24" color="#000000"></uni-icons>
  54. <view class="hobby-tag-name sys-size-28 sys-color-gray-6">
  55. {{itemThree.name}}
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="hello-box">
  63. <view class="hello-box-left sys-radius-16 sys-color-white sys-weight-600 sys-size-32"
  64. :class="listStyle==0?'sys-background-black':'sys-background-BF'">
  65. {{listStyle==0?'喜欢':'以喜欢'}}
  66. </view>
  67. <view class="hello-box-left hello-box-right sys-radius-16 sys-background-black">
  68. <uni-icons type="checkbox-filled" size="19" color="pink"></uni-icons>
  69. <view class="sys-color-white sys-weight-600 sys-size-32">
  70. 打招呼
  71. </view>
  72. </view>
  73. </view>
  74. </scroll-view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. components: {},
  80. data() {
  81. return {
  82. isScroll: false,
  83. currentIndex: 0,
  84. listStyle: 0,
  85. swiperData: [{
  86. 'img': '/static/img/temporary/1.png',
  87. }, {
  88. 'img': '/static/img/login/2.jpg',
  89. }, {
  90. 'img': '/static/img/temporary/1.png',
  91. }, {
  92. 'img': '/static/img/login/2.jpg',
  93. }, {
  94. 'img': '/static/img/temporary/1.png',
  95. }, {
  96. 'img': '/static/img/login/2.jpg',
  97. }, {
  98. 'img': '/static/img/temporary/1.png',
  99. }, {
  100. 'img': '/static/img/login/2.jpg',
  101. }, {
  102. 'img': '/static/img/temporary/1.png',
  103. }, {
  104. 'img': '/static/img/login/2.jpg',
  105. }],
  106. hobbyList: [{
  107. 'icon': 'checkbox-filled',
  108. 'name': '认识朋友'
  109. }, {
  110. 'icon': 'color',
  111. 'name': '重庆科创职业学院'
  112. }, {
  113. 'icon': 'chatbubble',
  114. 'name': '音乐'
  115. }, {
  116. 'icon': 'headphones',
  117. 'name': '电影'
  118. }, {
  119. 'icon': 'cart',
  120. 'name': '购物'
  121. }, {
  122. 'icon': 'checkbox-filled',
  123. 'name': '认识朋友'
  124. }, {
  125. 'icon': 'color',
  126. 'name': '重庆科创职业学院'
  127. }, {
  128. 'icon': 'checkbox-filled',
  129. 'name': '认识朋友'
  130. }, {
  131. 'icon': 'color',
  132. 'name': '重庆科创职业学院'
  133. }, {
  134. 'icon': 'checkbox-filled',
  135. 'name': '认识朋友'
  136. }, {
  137. 'icon': 'color',
  138. 'name': '重庆科创职业学院'
  139. }, {
  140. 'icon': 'checkbox-filled',
  141. 'name': '认识朋友'
  142. }, {
  143. 'icon': 'color',
  144. 'name': '重庆科创职业学院'
  145. }, {
  146. 'icon': 'checkbox-filled',
  147. 'name': '认识朋友'
  148. }, {
  149. 'icon': 'color',
  150. 'name': '重庆科创职业学院'
  151. }, {
  152. 'icon': 'checkbox-filled',
  153. 'name': '认识朋友'
  154. }, {
  155. 'icon': 'color',
  156. 'name': '重庆科创职业学院'
  157. }, {
  158. 'icon': 'checkbox-filled',
  159. 'name': '认识朋友'
  160. }, {
  161. 'icon': 'color',
  162. 'name': '重庆科创职业学院'
  163. }, {
  164. 'icon': 'checkbox-filled',
  165. 'name': '认识朋友'
  166. }, {
  167. 'icon': 'color',
  168. 'name': '重庆科创职业学院'
  169. }, {
  170. 'icon': 'checkbox-filled',
  171. 'name': '认识朋友'
  172. }, {
  173. 'icon': 'color',
  174. 'name': '重庆科创职业学院'
  175. }, {
  176. 'icon': 'checkbox-filled',
  177. 'name': '认识朋友'
  178. }, {
  179. 'icon': 'color',
  180. 'name': '重庆科创职业学院'
  181. }, {
  182. 'icon': 'checkbox-filled',
  183. 'name': '认识朋友'
  184. }, {
  185. 'icon': 'color',
  186. 'name': '重庆科创职业学院'
  187. }, {
  188. 'icon': 'checkbox-filled',
  189. 'name': '认识朋友'
  190. }, {
  191. 'icon': 'color',
  192. 'name': '重庆科创职业学院'
  193. }, {
  194. 'icon': 'checkbox-filled',
  195. 'name': '认识朋友'
  196. }, {
  197. 'icon': 'color',
  198. 'name': '重庆科创职业学院'
  199. }, {
  200. 'icon': 'checkbox-filled',
  201. 'name': '认识朋友'
  202. }, {
  203. 'icon': 'color',
  204. 'name': '重庆科创职业学院'
  205. }, {
  206. 'icon': 'checkbox-filled',
  207. 'name': '认识朋友'
  208. }, {
  209. 'icon': 'color',
  210. 'name': '重庆科创职业学院'
  211. }, {
  212. 'icon': 'checkbox-filled',
  213. 'name': '认识朋友'
  214. }, {
  215. 'icon': 'color',
  216. 'name': '重庆科创职业学院'
  217. }, {
  218. 'icon': 'checkbox-filled',
  219. 'name': '认识朋友'
  220. }, {
  221. 'icon': 'color',
  222. 'name': '重庆科创职业学院'
  223. }, {
  224. 'icon': 'checkbox-filled',
  225. 'name': '认识朋友'
  226. }, {
  227. 'icon': 'color',
  228. 'name': '重庆科创职业学院'
  229. }, {
  230. 'icon': 'checkbox-filled',
  231. 'name': '认识朋友'
  232. }, {
  233. 'icon': 'color',
  234. 'name': '重庆科创职业学院'
  235. }, {
  236. 'icon': 'checkbox-filled',
  237. 'name': '认识朋友'
  238. }, {
  239. 'icon': 'color',
  240. 'name': '重庆科创职业学院'
  241. }, {
  242. 'icon': 'checkbox-filled',
  243. 'name': '认识朋友'
  244. }, {
  245. 'icon': 'color',
  246. 'name': '重庆科创职业学院'
  247. }, {
  248. 'icon': 'checkbox-filled',
  249. 'name': '认识朋友'
  250. }, {
  251. 'icon': 'color',
  252. 'name': '重庆科创职业学院'
  253. }, {
  254. 'icon': 'checkbox-filled',
  255. 'name': '认识朋友'
  256. }, {
  257. 'icon': 'color',
  258. 'name': '重庆科创职业学院'
  259. }, {
  260. 'icon': 'checkbox-filled',
  261. 'name': '认识朋友'
  262. }, {
  263. 'icon': 'color',
  264. 'name': '重庆科创职业学院'
  265. }, {
  266. 'icon': 'checkbox-filled',
  267. 'name': '认识朋友'
  268. }, {
  269. 'icon': 'color',
  270. 'name': '重庆科创职业学院'
  271. }, {
  272. 'icon': 'checkbox-filled',
  273. 'name': '认识朋友'
  274. }, {
  275. 'icon': 'color',
  276. 'name': '重庆科创职业学院'
  277. }, {
  278. 'icon': 'checkbox-filled',
  279. 'name': '认识朋友'
  280. }, {
  281. 'icon': 'color',
  282. 'name': '重庆科创职业学院'
  283. }, {
  284. 'icon': 'checkbox-filled',
  285. 'name': '认识朋友'
  286. }, {
  287. 'icon': 'color',
  288. 'name': '重庆科创职业学院'
  289. }, {
  290. 'icon': 'checkbox-filled',
  291. 'name': '认识朋友'
  292. }, {
  293. 'icon': 'color',
  294. 'name': '重庆科创职业学院'
  295. }, {
  296. 'icon': 'checkbox-filled',
  297. 'name': '认识朋友'
  298. }, {
  299. 'icon': 'color',
  300. 'name': '重庆科创职业学院'
  301. }, {
  302. 'icon': 'checkbox-filled',
  303. 'name': '认识朋友'
  304. }, {
  305. 'icon': 'color',
  306. 'name': '重庆科创职业学院'
  307. }, {
  308. 'icon': 'checkbox-filled',
  309. 'name': '认识朋友'
  310. }, {
  311. 'icon': 'color',
  312. 'name': '重庆科创职业学院'
  313. }, {
  314. 'icon': 'checkbox-filled',
  315. 'name': '认识朋友'
  316. }, {
  317. 'icon': 'color',
  318. 'name': '重庆科创职业学院'
  319. }, ]
  320. };
  321. },
  322. mounted() {},
  323. methods: {
  324. scroll(e) {
  325. if (e.detail.scrollTop > 250) {
  326. this.isScroll = true
  327. } else {
  328. this.isScroll = false
  329. }
  330. },
  331. scrolltolower() {
  332. console.log('触底');
  333. },
  334. selectImg(index) {
  335. this.currentIndex = index
  336. },
  337. },
  338. }
  339. </script>
  340. <style lang="scss" scoped>
  341. .user-info {
  342. .nav-class {
  343. position: absolute;
  344. left: 0;
  345. top: 0;
  346. }
  347. .list-scroll {
  348. width: 100%;
  349. flex: 1;
  350. overflow: auto;
  351. padding: 0 0 118rpx 0;
  352. box-sizing: border-box;
  353. display: flex;
  354. flex-direction: column;
  355. .swiper-box {
  356. width: 100%;
  357. height: 960rpx;
  358. position: relative;
  359. .swiper {
  360. width: 100%;
  361. height: 100%;
  362. .swiper-img {
  363. width: 100%;
  364. height: 100%;
  365. }
  366. }
  367. .scroll-view_H {
  368. white-space: nowrap;
  369. width: 100%;
  370. padding: 0 38rpx 0 0;
  371. position: absolute;
  372. left: 40rpx;
  373. bottom: 58rpx;
  374. box-sizing: border-box;
  375. opacity: 1;
  376. transition: opacity 500ms ease-out;
  377. .swiper-img-two {
  378. width: 100rpx;
  379. height: 100rpx;
  380. border: 2rpx solid #FAFAFA;
  381. margin: 0 12rpx 0 0;
  382. }
  383. }
  384. .scroll-view_H-two {
  385. white-space: nowrap;
  386. width: 100%;
  387. padding: 0 38rpx 0 0;
  388. position: absolute;
  389. left: 40rpx;
  390. bottom: 58rpx;
  391. box-sizing: border-box;
  392. opacity: 0;
  393. transition: opacity 500ms ease-out;
  394. .swiper-img-two {
  395. width: 100rpx;
  396. height: 100rpx;
  397. border: 2rpx solid #FAFAFA;
  398. margin: 0 12rpx 0 0;
  399. }
  400. }
  401. .blank-box {
  402. width: 100%;
  403. height: 34rpx;
  404. position: absolute;
  405. left: 0;
  406. bottom: 0;
  407. border-radius: 40rpx 40rpx 0 0;
  408. }
  409. }
  410. .content-box {
  411. width: 100%;
  412. height: auto;
  413. padding: 0 32rpx;
  414. box-sizing: border-box;
  415. .info-title {
  416. display: flex;
  417. align-items: center;
  418. justify-content: space-between;
  419. margin: 0 0 16rpx 0;
  420. .info-title-name {
  421. width: 434rpx;
  422. white-space: nowrap;
  423. text-overflow: ellipsis;
  424. overflow: hidden;
  425. word-break: break-all;
  426. }
  427. .like-but {
  428. display: flex;
  429. align-items: center;
  430. padding: 7rpx 20rpx;
  431. .like-but-text {
  432. margin: 0 0 0 6rpx;
  433. }
  434. }
  435. }
  436. .tag-box {
  437. display: flex;
  438. align-items: center;
  439. flex-wrap: wrap;
  440. margin: 0 0 16rpx 0;
  441. .tag-list {
  442. display: flex;
  443. align-items: center;
  444. padding: 7rpx 10rpx;
  445. }
  446. .tag-text {
  447. margin: 0 0 0 12rpx;
  448. }
  449. }
  450. .introduce {
  451. display: flex;
  452. align-items: center;
  453. margin: 0 0 36rpx 0;
  454. .distance {
  455. margin: 0 16rpx 0 0;
  456. }
  457. }
  458. .hobby-box {
  459. width: 100%;
  460. height: auto;
  461. padding: 0 0 12rpx 0;
  462. border-bottom: 2rpx solid #F9F9F9;
  463. .hobby {
  464. width: 100%;
  465. height: auto;
  466. padding: 36rpx 25rpx;
  467. box-sizing: border-box;
  468. background: linear-gradient(180deg, rgba(246, 246, 246, 0.75) 0%, #FFFFFF 100%);
  469. .hobby-title {
  470. margin: 0 0 36rpx 0;
  471. }
  472. .hobby-list {
  473. display: flex;
  474. align-items: center;
  475. flex-wrap: wrap;
  476. .hobby-tag {
  477. display: flex;
  478. align-items: center;
  479. padding: 6rpx 24rpx;
  480. border: 1rpx solid #E0E0E0;
  481. margin: 0 20rpx 20rpx 0;
  482. .hobby-tag-icon {
  483. margin: 0 8rpx 0 0;
  484. }
  485. .hobby-tag-name {}
  486. }
  487. }
  488. }
  489. }
  490. }
  491. .hello-box {
  492. width: 100%;
  493. height: auto;
  494. padding: 18rpx 0 12rpx;
  495. box-sizing: border-box;
  496. display: flex;
  497. align-items: center;
  498. justify-content: center;
  499. position: fixed;
  500. left: 0;
  501. bottom: 0;
  502. .hello-box-left {
  503. width: 332rpx;
  504. padding: 22rpx 0;
  505. text-align: center;
  506. }
  507. .hello-box-right {
  508. display: flex;
  509. align-items: center;
  510. justify-content: center;
  511. margin: 0 0 0 22rpx;
  512. }
  513. }
  514. }
  515. }
  516. </style>