category.wxss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. /* pages/category/category.wxss */
  2. page {
  3. height: 100%;
  4. }
  5. .container {
  6. /* display: flex; */
  7. flex-direction: row;
  8. height: 100%;
  9. }
  10. .main {
  11. /* position: fixed; */
  12. display: flex;
  13. overflow: hidden;
  14. /* margin-top: 78rpx; */
  15. height: calc(100% - 270rpx);
  16. }
  17. /* 搜索栏 */
  18. .top-search-input {
  19. margin-left: 20rpx;
  20. margin-top: -10rpx;
  21. display: flex;
  22. align-items: center;
  23. width: 500rpx;
  24. border: 2rpx solid #FF941A;
  25. border-radius: 40rpx;
  26. height: 60rpx;
  27. }
  28. .top-search-swiper {
  29. width: 440rpx;
  30. height: 60rpx;
  31. line-height: 60rpx;
  32. margin-top: 0;
  33. font-weight: normal;
  34. font-size: 24rpx;
  35. color: #AAAAAA;
  36. margin-left: 28rpx;
  37. }
  38. .top-search-line {
  39. color: #DEDEDE;
  40. margin-right: 16rpx;
  41. }
  42. .top-search-text {
  43. width: 100rpx;
  44. font-weight: bold;
  45. font-size: 28rpx;
  46. color: #FF941A;
  47. }
  48. /* 顶部分类 */
  49. .top-content{
  50. position: relative;
  51. }
  52. .top-box{
  53. white-space: nowrap;
  54. align-items: center;
  55. margin-top: 100rpx;
  56. width: 100%;
  57. padding-left: 24rpx;
  58. box-sizing: border-box;
  59. }
  60. .top-content .all{
  61. position: absolute;
  62. top: 0;
  63. right: 0;
  64. width: 64rpx;
  65. height: 144rpx;
  66. display: flex;
  67. justify-content: center;
  68. align-items: center;
  69. letter-spacing: 10rpx;
  70. background: linear-gradient( 180deg, #FFFFFF 0%, #F8F8F8 100%);
  71. writing-mode: vertical-rl;
  72. font-weight: bold;
  73. font-size: 24rpx;
  74. color: #222222;
  75. }
  76. .top-content .all .icon{
  77. width: 20rpx;
  78. height: 20rpx;
  79. margin-left: 2rpx;
  80. }
  81. .top-all-box {
  82. display: flex;
  83. flex-wrap: wrap;
  84. justify-content: space-between;
  85. align-items: flex-start;
  86. padding: 0 32rpx 150rpx;
  87. box-sizing: border-box;
  88. max-height: 750rpx;
  89. overflow-y: auto;
  90. overflow-x: hidden;
  91. }
  92. .top-all-box .type-item{
  93. margin-bottom: 24rpx;
  94. }
  95. .top-box .type-item{
  96. display: inline-block;
  97. }
  98. .top-box .type-item .icon{
  99. width: 100rpx;
  100. height: 100rpx;
  101. background: #F6F6F6;
  102. margin-left: 8rpx;
  103. border-radius: 50%;
  104. }
  105. .top-box .type-item .name{
  106. font-size: 24rpx;
  107. color: #222222;
  108. width: 116rpx;
  109. height: 36rpx;
  110. line-height: 36rpx;
  111. text-align: center;
  112. margin-top: 12rpx;
  113. white-space: nowrap;
  114. text-overflow: ellipsis;
  115. overflow: hidden;
  116. }
  117. .top-box .type-item .name.active{
  118. background: #FFDF00;
  119. border-radius: 18rpx 18rpx 18rpx 18rpx;
  120. }
  121. .popup-box{
  122. position: relative;
  123. }
  124. .close-box{
  125. position: absolute;
  126. bottom: 0;
  127. left: 0;
  128. z-index: 999;
  129. font-size: 24rpx;
  130. color: #AAAAAA;
  131. width: 100%;
  132. text-align: center;
  133. line-height: 82rpx;
  134. border-top: 1rpx solid #F0F0F0;
  135. background: #fff;
  136. }
  137. .close-box .icon{
  138. width: 20rpx;
  139. height: 20rpx;
  140. transform: rotateZ(180deg);
  141. }
  142. /* 左侧菜单栏 */
  143. .leftmenu {
  144. width: 200rpx;
  145. height: 100%;
  146. box-sizing: border-box;
  147. background-color: #f5f6f7;
  148. overflow: scroll;
  149. z-index: 2;
  150. }
  151. scroll-view ::-webkit-scrollbar {
  152. width: 0;
  153. height: 0;
  154. color: transparent;
  155. display: none;
  156. }
  157. .menu-item {
  158. line-height: 94rpx;
  159. height: 94rpx;
  160. text-align: center;
  161. border-bottom: 2rpx silid #e3e3e3;
  162. position: relative;
  163. color: #666;
  164. font-size: 24rpx;
  165. overflow: hidden;
  166. white-space: nowrap;
  167. text-overflow: ellipsis;
  168. }
  169. .menu-item.active {
  170. color: #333;
  171. font-size: 28rpx;
  172. font-weight: bold;
  173. position: relative;
  174. background: #fff;
  175. }
  176. .menu-item.active:before {
  177. position: absolute;
  178. left: 0;
  179. content: "";
  180. width: 8rpx;
  181. height: 60rpx;
  182. top: 20rpx;
  183. background: #FF941A;
  184. }
  185. .menu-item text.tips-num {
  186. position: absolute;
  187. top: 20rpx;
  188. right: 15rpx;
  189. border-radius: 15rpx;
  190. width: 30rpx;
  191. height: 30rpx;
  192. background: red;
  193. color: #fff;
  194. font-size: 25rpx;
  195. line-height: 30rpx;
  196. }
  197. /* 右侧商品栏 */
  198. .loading{
  199. width: 550rpx;
  200. height: 70vh;
  201. display: flex;
  202. justify-content: center;
  203. align-items: center;
  204. flex-shrink: 0;
  205. position: fixed;
  206. z-index: 99999;
  207. background: #fff;
  208. }
  209. @keyframes rotato{
  210. from { transform: rotate(0deg); }
  211. to { transform: rotate(360deg); }
  212. }
  213. .loading .icon{
  214. animation: rotato .5s linear infinite;
  215. width: 48rpx;
  216. height: 48rpx;
  217. }
  218. .rightcontent {
  219. width: 550rpx;
  220. height: 100%;
  221. box-sizing: border-box;
  222. background-color: #fff;
  223. z-index: 1;
  224. position: relative;
  225. }
  226. .rightcontent .right-top-box{
  227. position: fixed;
  228. z-index: 9999;
  229. background-color: #fff;
  230. }
  231. .rightcontent .filter-box{
  232. display: flex;
  233. justify-content: flex-end;
  234. width: 550rpx;
  235. }
  236. .rightcontent .filter-box .filter-item{
  237. font-size: 24rpx;
  238. color: #222222;
  239. margin-left: 40rpx;
  240. display: flex;
  241. }
  242. .rightcontent .filter-box .filter-item.active{
  243. color: #FF941A;
  244. }
  245. .rightcontent .filter-box .filter-item .icon-box{
  246. display: flex;
  247. flex-direction: column;
  248. }
  249. .rightcontent .filter-box .filter-item .icon-box .down{
  250. transform: rotateZ(270deg);
  251. margin-bottom: -6rpx;
  252. }
  253. .rightcontent .filter-box .filter-item .icon-box .up{
  254. transform: rotateZ(90deg);
  255. margin-left: -4rpx;
  256. }
  257. .rightcontent .thrid-type-box{
  258. display: flex;
  259. flex-wrap: nowrap;
  260. padding: 10rpx 20rpx 10rpx 0;
  261. width: 530rpx;
  262. overflow: auto;
  263. margin-left: 20rpx;
  264. background: #fff;
  265. }
  266. .rightcontent .thrid-type-box .thrid-type-item{
  267. height: 36rpx;
  268. line-height: 36rpx;
  269. background: #F0F0F0;
  270. padding: 2rpx 16rpx;
  271. border-radius: 22rpx;
  272. font-size: 24rpx;
  273. color: #222222;
  274. flex-shrink: 0;
  275. margin-right: 20rpx;
  276. }
  277. .rightcontent .thrid-type-box .thrid-type-item.active{
  278. background: #FF941A;
  279. color: #FFFFFF;
  280. }
  281. .rightcontent .right-box{
  282. /* padding-bottom: 300rpx; */
  283. /* padding-bottom: 500rpx; */
  284. padding-top: 98rpx;
  285. }
  286. .rightcontent .product-item{
  287. display: flex;
  288. padding: 0 20rpx;
  289. }
  290. .rightcontent .product-item .pic{
  291. width: 200rpx;
  292. height: 200rpx;
  293. background: #F6F6F6;
  294. border-radius: 16rpx;
  295. flex-shrink: 0;
  296. margin: 20rpx 0;
  297. }
  298. .rightcontent .product-item .info{
  299. display: flex;
  300. flex-direction: column;
  301. justify-content: space-between;
  302. border-bottom: 1rpx solid #F0F0F0;
  303. padding: 20rpx 0 20rpx 20rpx;
  304. }
  305. .rightcontent .product-item .info .title{
  306. font-weight: bold;
  307. font-size: 28rpx;
  308. color: #222222;
  309. overflow: hidden;
  310. text-overflow: ellipsis;
  311. display: -webkit-box;
  312. -webkit-line-clamp: 2; /* 限制显示的行数 */
  313. -webkit-box-orient: vertical;
  314. }
  315. .rightcontent .product-item .info .price-box{
  316. display: flex;
  317. justify-content: space-between;
  318. align-items: center;
  319. }
  320. .rightcontent .product-item .info .price{
  321. font-weight: 800;
  322. font-size: 28rpx;
  323. color: #FF4D3A;
  324. }
  325. .rightcontent .product-item .info .salesVolume{
  326. font-size: 22rpx;
  327. color: #AAAAAA;
  328. }
  329. .rightcontent .adver-map {
  330. width: auto;
  331. box-sizing: border-box;
  332. overflow: hidden;
  333. position: relative;
  334. margin: 30rpx 20rpx 0;
  335. }
  336. .rightcontent .adver-map .item-a {
  337. display: block;
  338. font-size: 0;
  339. width: 100%;
  340. height: 160rpx;
  341. }
  342. .rightcontent .adver-map .item-a image {
  343. width: 100%;
  344. height: 100%;
  345. border-radius: 16rpx;
  346. }
  347. /* .rightcontent .sub-category {
  348. display: flex;
  349. flex-wrap: wrap;
  350. } */
  351. /* 二级分类 */
  352. .sub-category-con {
  353. margin: 20rpx;
  354. }
  355. .sub-cate-title {
  356. display: flex;
  357. align-items: center;
  358. font-weight: 800;
  359. }
  360. .view-all {
  361. color: #999;
  362. font-weight: normal;
  363. font-size: 24rpx;
  364. }
  365. .sub-cate-text {
  366. flex: 1;
  367. }
  368. .th-cate-con {
  369. display: flex;
  370. flex-wrap: wrap;
  371. }
  372. .sub-category-item {
  373. width: 33.33%;
  374. display: flex;
  375. flex-direction: column;
  376. padding: 30rpx;
  377. box-sizing: border-box;
  378. align-items: center;
  379. }
  380. .sub-category-item .sub-category-item-pic {
  381. width: 120rpx !important;
  382. height: 120rpx !important;
  383. border-radius: 16rpx;
  384. }
  385. .sub-category-item text {
  386. margin-top: 10rpx;
  387. font-size: 25rpx;
  388. }
  389. .not-category-data{
  390. padding: 20rpx;
  391. }
  392. .not-data-list{
  393. width: 100%;
  394. }
  395. .reset-localization{
  396. text-align: center;
  397. font-size: 26rpx;
  398. color: #AAAAAA;
  399. }
  400. /* 购物车 */
  401. .car-box{
  402. padding: 28rpx 24rpx 123rpx;
  403. max-height: 700rpx;
  404. overflow: auto;
  405. }
  406. .car-box .item{
  407. display: flex;
  408. align-items: center;
  409. padding-bottom: 30rpx;
  410. /* border-bottom: 2rpx solid #F0F0F0; */
  411. }
  412. .car-box .item .img{
  413. width: 200rpx;
  414. height: 200rpx;
  415. border-radius: 16rpx;
  416. background: chartreuse;
  417. }
  418. .car-box .item .info{
  419. flex: 1;
  420. padding-left: 20rpx;
  421. display: flex;
  422. flex-direction: column;
  423. justify-content: space-between;
  424. height: 200rpx;
  425. }
  426. .car-box .item .info .title{
  427. font-weight: 800;
  428. font-size: 32rpx;
  429. color: #222222;
  430. }
  431. .car-box .item .info .desc{
  432. font-size: 24rpx;
  433. color: #AAAAAA;
  434. }
  435. .car-box .item .info .price-box{
  436. display: flex;
  437. justify-content: space-between;
  438. align-items: center;
  439. }
  440. .car-box .item .info .price-box .price{
  441. display: flex;
  442. align-items: flex-end;
  443. color: #FF4D3A;
  444. }
  445. .car-box .item .info .price-box .price .unit{
  446. font-size: 20rpx;
  447. }
  448. .car-box .item .info .price-box .price .num{
  449. font-size: 48rpx;
  450. }
  451. /* .car-box .item .info .price-box .num-box{ */
  452. .num-box{
  453. display: flex;
  454. align-items: center;
  455. }
  456. /* .car-box .item .info .price-box .num-box .btn{ */
  457. .num-box .btn{
  458. color: #AAAAAA;
  459. font-size: 20rpx;
  460. width: 40rpx;
  461. height: 40rpx;
  462. text-align: center;
  463. line-height: 40rpx;
  464. background: #F0F0F0;
  465. }
  466. /* .car-box .item .info .price-box .num-box .num{ */
  467. .num-box .num{
  468. width: 80rpx;
  469. height: 40rpx;
  470. background: #F0F0F0;
  471. text-align: center;
  472. line-height: 40rpx;
  473. margin: 0 4rpx;
  474. font-size: 24rpx ;
  475. color: #222222;
  476. }
  477. .bottom-box{
  478. position: fixed;
  479. bottom: 0;
  480. left: 0;
  481. z-index: 999999;
  482. box-sizing: border-box;
  483. width: 100%;
  484. display: flex;
  485. justify-content: space-between;
  486. padding: 20rpx 24rpx;
  487. background: #FFFFFF;
  488. box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.05);
  489. border-radius: 32rpx 32rpx 0rpx 0rpx;
  490. }
  491. .bottom-box .num{
  492. position: absolute;
  493. top: 20rpx;
  494. left: 80rpx;
  495. border-radius: 30rpx;
  496. font-size: 24rpx;
  497. color: #fff;
  498. background: #FF4D3A;
  499. padding: 2rpx 6rpx;
  500. }
  501. .bottom-box .left{
  502. display: flex;
  503. }
  504. .bottom-box .icon{
  505. width: 80rpx;
  506. height: 80rpx;
  507. margin-right: 20rpx;
  508. }
  509. .bottom-box .price-box .top{
  510. display: flex;
  511. align-items: center;
  512. }
  513. .bottom-box .price-box .top .price{
  514. font-weight: 800;
  515. font-size: 32rpx;
  516. color: #FF4D3A;
  517. }
  518. .bottom-box .price-box .top .reduce-price{
  519. font-size: 24rpx;
  520. color: #AAAAAA
  521. }
  522. .bottom-box .price-box .shipping-fee{
  523. font-size: 24rpx;
  524. color: #AAAAAA;
  525. }
  526. .bottom-box .btn{
  527. width: 342rpx;
  528. height: 80rpx;
  529. background: #FF941A;
  530. border-radius: 40rpx;
  531. text-align: center;
  532. line-height: 80rpx;
  533. font-weight: bold;
  534. font-size: 28rpx;
  535. color: #FFFFFF;
  536. }
  537. /* 购物车为空 */
  538. .empty {
  539. margin-top: 100rpx;
  540. text-align: cneter;
  541. }
  542. .empty-icon {
  543. display: block;
  544. width: 100rpx;
  545. height: 100rpx;
  546. margin: 0 auto;
  547. margin-bottom: 20rpx;
  548. }
  549. .empty-icon > image {
  550. width: 100%;
  551. height: 100%;
  552. }
  553. .empty-text {
  554. font-size: 28rpx;
  555. text-align: center;
  556. color: #999;
  557. line-height: 2em;
  558. }