list.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. .skill-page-main {
  2. display: flex;
  3. width: 100%;
  4. width: 100vw;
  5. // .skill-side {
  6. // padding-left: 15px;
  7. // }
  8. // .section {
  9. // padding: 15px;
  10. // margin-bottom: 15px;
  11. // min-height: 100px;
  12. // background-color: white;
  13. // width: 260px;
  14. // }
  15. }
  16. .skill-wrapper {
  17. flex: 1;
  18. .skill-top {
  19. width: 100%;
  20. max-width: 1200px;
  21. margin: 0 auto;
  22. height: auto;
  23. padding: 15px 0;
  24. .tabs {
  25. position: relative;
  26. width: 100%;
  27. height: 50px;
  28. display: flex;
  29. align-items: center;
  30. border-bottom: 1px solid #f1f1f1;
  31. .add-btn {
  32. position: absolute;
  33. right: 20px;
  34. width: 96px;
  35. height: 32px;
  36. padding: 0;
  37. border: none;
  38. background: #308eff;
  39. border-radius: 5px;
  40. font-size: 11px;
  41. font-family: PingFangSC, PingFangSC-Medium;
  42. font-weight: 500;
  43. text-align: center;
  44. color: #ffffff;
  45. }
  46. .tabs-item {
  47. position: relative;
  48. width: 108px;
  49. height: 50px;
  50. line-height: 50px;
  51. font-size: 16px;
  52. font-family: PingFangSC, PingFangSC-Regular;
  53. font-weight: 400;
  54. text-align: center;
  55. color: #666666;
  56. &.active {
  57. font-size: 15px;
  58. font-family: PingFangSC, PingFangSC-Semibold;
  59. font-weight: 600;
  60. color: #222222;
  61. &:after {
  62. position: absolute;
  63. content: " ";
  64. width: 15px;
  65. height: 3px;
  66. bottom: 1px;
  67. left: calc(50% - 7.5px);
  68. background: #308eff;
  69. border-radius: 2px;
  70. }
  71. }
  72. }
  73. }
  74. }
  75. .skill-category-wrapper {
  76. padding: 15px 0;
  77. width: 100%;
  78. height: auto;
  79. background-color: #f3f5f6;
  80. .skill-category-wrapper-title {
  81. padding-bottom: 30px;
  82. display: flex;
  83. align-items: center;
  84. .title {
  85. font-size: 20px;
  86. font-weight: bold;
  87. color: black;
  88. margin-right: 10px;
  89. }
  90. .desc {
  91. font-size: 12px;
  92. color: gray;
  93. }
  94. .icon {
  95. width: 44px;
  96. margin-right: 10px;
  97. }
  98. .expand {
  99. flex: 1;
  100. }
  101. .add-btn {
  102. width: 96px;
  103. height: 32px;
  104. padding: 0;
  105. border: none;
  106. background: #308eff;
  107. border-radius: 5px;
  108. font-size: 11px;
  109. font-family: PingFangSC, PingFangSC-Medium;
  110. font-weight: 500;
  111. text-align: center;
  112. color: #ffffff;
  113. }
  114. }
  115. .category-title {
  116. width: 100%;
  117. line-height: 21px;
  118. padding-bottom: 7px;
  119. font-size: 15px;
  120. font-family: PingFangSC, PingFangSC-Semibold;
  121. font-weight: 600;
  122. color: #222222;
  123. }
  124. .category-one-wrapper {
  125. position: relative;
  126. height: 40px;
  127. width: 100%;
  128. padding-right: 60px;
  129. overflow: hidden;
  130. display: flex;
  131. flex-wrap: wrap;
  132. transition: all 0.3s;
  133. &::before {
  134. content: "方向:";
  135. font-size: 14px;
  136. font-weight: bold;
  137. color: black;
  138. line-height: 30px;
  139. }
  140. .category-more {
  141. position: absolute;
  142. height: 30px;
  143. line-height: 30px;
  144. margin-top: 10px;
  145. padding: 0 15px;
  146. right: 0;
  147. top: 0;
  148. font-size: 13px;
  149. color: #999999;
  150. cursor: pointer;
  151. }
  152. &.expand {
  153. height: auto !important;
  154. }
  155. .category-one-item {
  156. height: 30px;
  157. line-height: 30px;
  158. padding: 0 15px;
  159. // margin-top: 10px;
  160. border-radius: 4px;
  161. font-size: 14px;
  162. font-family: PingFangSC, PingFangSC-Regular;
  163. font-weight: 400;
  164. text-align: center;
  165. color: #555555;
  166. cursor: pointer;
  167. &.active {
  168. line-height: 28px;
  169. font-family: PingFangSC, PingFangSC-Medium;
  170. font-weight: 500;
  171. color: #308eff;
  172. // border: 1px solid #308eff;
  173. background-color: #dcecff;
  174. font-weight: bold;
  175. }
  176. &:hover {
  177. color: #308eff;
  178. }
  179. }
  180. }
  181. .category-two-wrapper {
  182. position: relative;
  183. margin-top: 16px;
  184. .category-two-content {
  185. position: relative;
  186. width: 100%;
  187. height: auto;
  188. border-radius: 8px;
  189. display: flex;
  190. flex-wrap: wrap;
  191. &::before {
  192. content: "分类:";
  193. font-size: 14px;
  194. font-weight: bold;
  195. color: black;
  196. line-height: 30px;
  197. }
  198. .category-two-item {
  199. height: 30px;
  200. line-height: 30px;
  201. padding: 0 15px;
  202. color: #555555;
  203. border-radius: 4px;
  204. font-size: 14px;
  205. cursor: pointer;
  206. &.active {
  207. color: #308eff;
  208. background: #dcefff;
  209. }
  210. &:hover {
  211. color: #308eff;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. .skill-content {
  218. padding: 30px 0;
  219. width: 100%;
  220. width: 100vw;
  221. background-color: white;
  222. margin-top: 15px;
  223. // padding: 12px 20px 36px;
  224. // background: #ffffff;
  225. // border-radius: 10px;
  226. .skill-list-wrapper {
  227. position: relative;
  228. width: 100%;
  229. max-width: 1200px;
  230. margin: 0 auto;
  231. display: flex;
  232. flex-wrap: wrap;
  233. justify-content: space-between;
  234. .skill-item {
  235. // width: 310px;
  236. width: 23.5%;
  237. height: 310px;
  238. // margin-right: 15px;
  239. margin-bottom: 30px;
  240. background: #ffffff;
  241. border-radius: 10px;
  242. overflow: hidden;
  243. // box-shadow: 0 6px 10px 0 rgba(192, 192, 192, 0.15);
  244. display: flex;
  245. flex-direction: column;
  246. // cursor: pointer;
  247. border: 1px solid #e4f0ff;
  248. transition: 0.2s;
  249. &:hover {
  250. transform: translateY(-2px);
  251. box-shadow: 0 6px 10px 0 rgba(192, 192, 192, 0.15);
  252. }
  253. &:nth-of-type(3n) {
  254. margin-right: 0;
  255. }
  256. /* 如果最后一行是3个元素 */
  257. &:last-child:nth-child(4n - 1) {
  258. margin-right: calc(24% + 4% / 3);
  259. }
  260. /* 如果最后一行是2个元素 */
  261. &:last-child:nth-child(4n - 2) {
  262. margin-right: calc(48% + 8% / 3);
  263. }
  264. .cover {
  265. width: 100%;
  266. height: 175px;
  267. overflow: hidden;
  268. object-fit: scale-down;
  269. background-size: cover;
  270. background-position: center;
  271. }
  272. .owner-wrapper {
  273. width: 100%;
  274. height: 22px;
  275. margin-top: 10px;
  276. padding: 0 10px;
  277. display: flex;
  278. align-items: center;
  279. .avatar {
  280. flex-shrink: 0;
  281. width: 22px;
  282. height: 22px;
  283. overflow: hidden;
  284. border-radius: 50%;
  285. }
  286. .nickname {
  287. flex: 1;
  288. line-height: 22px;
  289. margin-left: 6px;
  290. font-size: 14px;
  291. font-family: PingFangSC, PingFangSC-Regular;
  292. font-weight: 400;
  293. color: #666666;
  294. overflow: hidden;
  295. text-overflow: ellipsis;
  296. white-space: nowrap;
  297. }
  298. }
  299. .title {
  300. width: 100%;
  301. height: 42px;
  302. margin-top: 12px;
  303. padding: 0 12px;
  304. line-height: 21px;
  305. font-size: 15px;
  306. font-family: PingFangSC, PingFangSC-Medium;
  307. font-weight: 500;
  308. color: #333333;
  309. overflow: hidden;
  310. text-overflow: ellipsis;
  311. display: -webkit-box;
  312. white-space: normal;
  313. -webkit-box-orient: vertical;
  314. -webkit-line-clamp: 2;
  315. word-break: break-all;
  316. &:hover {
  317. color: #308eff;
  318. }
  319. }
  320. .price-wrapper {
  321. width: 100%;
  322. height: 20px;
  323. margin-top: 12px;
  324. padding: 0 12px;
  325. display: flex;
  326. align-items: center;
  327. justify-content: space-between;
  328. .price-text {
  329. line-height: 20px;
  330. font-size: 19px;
  331. font-family: DINAlternate, DINAlternate-Bold;
  332. font-weight: 700;
  333. color: #ff6600;
  334. }
  335. .buy-num {
  336. font-size: 14px;
  337. font-family: PingFangSC, PingFangSC-Regular;
  338. font-weight: 400;
  339. color: #999999;
  340. }
  341. }
  342. }
  343. }
  344. .pagination-wrapper {
  345. width: 100%;
  346. height: 30px;
  347. margin-top: 25px;
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. }
  352. }
  353. }
  354. .mobileMain {
  355. width: 100%;
  356. margin: 0;
  357. }
  358. .skill-wrapper-mobile {
  359. position: relative;
  360. width: 100%;
  361. // min-height: 100vh;
  362. display: flex;
  363. flex-direction: column;
  364. .skill-category {
  365. position: fixed;
  366. width: 100%;
  367. height: 87px;
  368. z-index: 11;
  369. .skill-category-one {
  370. position: relative;
  371. width: 100%;
  372. height: 45px;
  373. background: #ffffff;
  374. overflow: hidden;
  375. .category-scroller {
  376. width: calc(100% - 64px);
  377. overflow-x: scroll;
  378. overflow-y: hidden;
  379. -webkit-overflow-scrolling: touch;
  380. display: flex;
  381. &::-webkit-scrollbar {
  382. display: none;
  383. }
  384. }
  385. .skill-category-one-item {
  386. position: relative;
  387. flex-shrink: 0;
  388. width: 76px;
  389. height: 45px;
  390. line-height: 45px;
  391. font-size: 16px;
  392. font-family: PingFangSC, PingFangSC-Regular;
  393. font-weight: 400;
  394. color: #666666;
  395. font-size: 15px;
  396. text-align: center;
  397. &.active {
  398. font-family: PingFangSC, PingFangSC-Semibold;
  399. font-weight: 600;
  400. color: #222222;
  401. &:after {
  402. position: absolute;
  403. content: " ";
  404. bottom: 0;
  405. left: calc(50% - 7.5px);
  406. width: 15px;
  407. height: 3px;
  408. background: #308eff;
  409. border-radius: 2px;
  410. }
  411. }
  412. }
  413. .filter-wrapper {
  414. position: absolute;
  415. top: 0;
  416. right: 0;
  417. width: 64px;
  418. height: 45px;
  419. display: flex;
  420. align-items: center;
  421. justify-content: center;
  422. z-index: 12;
  423. background: #ffffff;
  424. img {
  425. width: 24px;
  426. height: 24px;
  427. }
  428. }
  429. .filter-bg {
  430. position: absolute;
  431. width: 11px;
  432. height: 29px;
  433. right: 59px;
  434. top: 8px;
  435. opacity: 0.1;
  436. background: #000000;
  437. border-radius: 6px;
  438. filter: blur(4px);
  439. z-index: 11;
  440. }
  441. }
  442. .skill-category-two {
  443. position: relative;
  444. width: 100%;
  445. height: 42px;
  446. background: #ffffff;
  447. .skill-category-two-wrapper {
  448. position: relative;
  449. width: 100%;
  450. height: 42px;
  451. padding: 0 20px;
  452. overflow-x: scroll;
  453. overflow-y: hidden;
  454. -webkit-overflow-scrolling: touch;
  455. display: flex;
  456. &::-webkit-scrollbar {
  457. display: none;
  458. }
  459. .skill-category-two-item {
  460. position: relative;
  461. flex-shrink: 0;
  462. height: 42px;
  463. line-height: 42px;
  464. margin-right: 20px;
  465. font-size: 14px;
  466. font-family: PingFangSC, PingFangSC-Regular;
  467. font-weight: 400;
  468. color: #666666;
  469. &:last-child {
  470. margin-right: 0;
  471. }
  472. &.active {
  473. color: #308eff;
  474. }
  475. }
  476. }
  477. }
  478. }
  479. .skill-list {
  480. width: 100%;
  481. height: 100vh;
  482. padding-top: 87px;
  483. padding-bottom: 34px;
  484. overflow-x: hidden;
  485. overflow-y: auto;
  486. -webkit-overflow-scrolling: touch;
  487. display: flex;
  488. flex-direction: column;
  489. align-items: center;
  490. .skill-list-wrapper {
  491. width: 100%;
  492. height: auto;
  493. overflow: visible;
  494. .skill-item {
  495. width: calc(100% - 20px);
  496. height: auto;
  497. margin: 10px auto 0;
  498. padding-bottom: 16px;
  499. background: #ffffff;
  500. overflow: hidden;
  501. border-radius: 10px;
  502. box-shadow: 0px 6px 16px 0px rgba(6, 10, 28, 0.06);
  503. display: flex;
  504. flex-direction: column;
  505. .cover {
  506. width: 100%;
  507. height: calc((100vw - 20px) * 9 / 16);
  508. overflow: hidden;
  509. object-fit: cover;
  510. }
  511. .owner-wrapper {
  512. width: 100%;
  513. height: 22px;
  514. margin-top: 10px;
  515. padding: 0 10px;
  516. display: flex;
  517. align-items: center;
  518. .avatar {
  519. flex-shrink: 0;
  520. width: 22px;
  521. height: 22px;
  522. overflow: hidden;
  523. border-radius: 50%;
  524. }
  525. .nickname {
  526. flex: 1;
  527. line-height: 22px;
  528. margin-left: 6px;
  529. font-size: 14px;
  530. font-family: PingFangSC, PingFangSC-Regular;
  531. font-weight: 400;
  532. color: #666666;
  533. overflow: hidden;
  534. text-overflow: ellipsis;
  535. white-space: nowrap;
  536. }
  537. }
  538. .title {
  539. width: 100%;
  540. height: 20px;
  541. margin-top: 12px;
  542. padding: 0 12px;
  543. line-height: 20px;
  544. font-size: 15px;
  545. font-family: PingFangSC, PingFangSC-Medium;
  546. font-weight: 500;
  547. color: #333333;
  548. overflow: hidden;
  549. text-overflow: ellipsis;
  550. white-space: nowrap;
  551. }
  552. .price-wrapper {
  553. width: 100%;
  554. height: 20px;
  555. margin-top: 16px;
  556. padding: 0 12px;
  557. display: flex;
  558. align-items: center;
  559. justify-content: space-between;
  560. .price-text {
  561. line-height: 20px;
  562. font-size: 19px;
  563. font-family: DINAlternate, DINAlternate-Bold;
  564. font-weight: 700;
  565. color: #ff6600;
  566. }
  567. .right-info {
  568. font-size: 14px;
  569. font-family: PingFangSC, PingFangSC-Regular;
  570. font-weight: 400;
  571. color: #999999;
  572. }
  573. }
  574. }
  575. }
  576. .skill-list-tips {
  577. margin-top: 16px;
  578. width: 100%;
  579. text-align: center;
  580. }
  581. }
  582. .skill-list__showWxHeader {
  583. height: calc(100vh - 64px);
  584. }
  585. }