category.wxss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. flex: 1;
  300. display: flex;
  301. flex-direction: column;
  302. justify-content: space-between;
  303. border-bottom: 1rpx solid #F0F0F0;
  304. padding: 20rpx 0 20rpx 20rpx;
  305. }
  306. .rightcontent .product-item .info .title{
  307. font-weight: bold;
  308. font-size: 28rpx;
  309. color: #222222;
  310. overflow: hidden;
  311. text-overflow: ellipsis;
  312. display: -webkit-box;
  313. -webkit-line-clamp: 2; /* 限制显示的行数 */
  314. -webkit-box-orient: vertical;
  315. }
  316. .rightcontent .product-item .info .price-box{
  317. display: flex;
  318. justify-content: space-between;
  319. align-items: center;
  320. }
  321. .rightcontent .product-item .info .price{
  322. font-weight: 800;
  323. font-size: 28rpx;
  324. color: #FF4D3A;
  325. }
  326. .rightcontent .product-item .info .salesVolume{
  327. font-size: 22rpx;
  328. color: #AAAAAA;
  329. }
  330. .rightcontent .adver-map {
  331. width: auto;
  332. box-sizing: border-box;
  333. overflow: hidden;
  334. position: relative;
  335. margin: 30rpx 20rpx 0;
  336. }
  337. .rightcontent .adver-map .item-a {
  338. display: block;
  339. font-size: 0;
  340. width: 100%;
  341. height: 160rpx;
  342. }
  343. .rightcontent .adver-map .item-a image {
  344. width: 100%;
  345. height: 100%;
  346. border-radius: 16rpx;
  347. }
  348. /* .rightcontent .sub-category {
  349. display: flex;
  350. flex-wrap: wrap;
  351. } */
  352. /* 二级分类 */
  353. .sub-category-con {
  354. margin: 20rpx;
  355. }
  356. .sub-cate-title {
  357. display: flex;
  358. align-items: center;
  359. font-weight: 800;
  360. }
  361. .view-all {
  362. color: #999;
  363. font-weight: normal;
  364. font-size: 24rpx;
  365. }
  366. .sub-cate-text {
  367. flex: 1;
  368. }
  369. .th-cate-con {
  370. display: flex;
  371. flex-wrap: wrap;
  372. }
  373. .sub-category-item {
  374. width: 33.33%;
  375. display: flex;
  376. flex-direction: column;
  377. padding: 30rpx;
  378. box-sizing: border-box;
  379. align-items: center;
  380. }
  381. .sub-category-item .sub-category-item-pic {
  382. width: 120rpx !important;
  383. height: 120rpx !important;
  384. border-radius: 16rpx;
  385. }
  386. .sub-category-item text {
  387. margin-top: 10rpx;
  388. font-size: 25rpx;
  389. }
  390. .not-category-data{
  391. padding: 20rpx;
  392. }
  393. .not-data-list{
  394. width: 100%;
  395. }
  396. .reset-localization{
  397. text-align: center;
  398. font-size: 26rpx;
  399. color: #AAAAAA;
  400. }
  401. /* 购物车 */
  402. .car-box{
  403. padding: 28rpx 24rpx 123rpx;
  404. max-height: 700rpx;
  405. overflow: auto;
  406. }
  407. .car-box .item{
  408. display: flex;
  409. align-items: center;
  410. padding-bottom: 30rpx;
  411. /* border-bottom: 2rpx solid #F0F0F0; */
  412. }
  413. .car-box .item .img{
  414. width: 200rpx;
  415. height: 200rpx;
  416. border-radius: 16rpx;
  417. background: chartreuse;
  418. }
  419. .car-box .item .info{
  420. flex: 1;
  421. padding-left: 20rpx;
  422. display: flex;
  423. flex-direction: column;
  424. justify-content: space-between;
  425. height: 200rpx;
  426. }
  427. .car-box .item .info .title{
  428. font-weight: 800;
  429. font-size: 32rpx;
  430. color: #222222;
  431. }
  432. .car-box .item .info .desc{
  433. font-size: 24rpx;
  434. color: #AAAAAA;
  435. }
  436. .car-box .item .info .price-box{
  437. display: flex;
  438. justify-content: space-between;
  439. align-items: center;
  440. }
  441. .car-box .item .info .price-box .price{
  442. display: flex;
  443. align-items: flex-end;
  444. color: #FF4D3A;
  445. }
  446. .car-box .item .info .price-box .price .unit{
  447. font-size: 20rpx;
  448. }
  449. .car-box .item .info .price-box .price .num{
  450. font-size: 48rpx;
  451. }
  452. /* .car-box .item .info .price-box .num-box{ */
  453. .num-box{
  454. display: flex;
  455. align-items: center;
  456. }
  457. /* .car-box .item .info .price-box .num-box .btn{ */
  458. .num-box .btn{
  459. color: #AAAAAA;
  460. font-size: 20rpx;
  461. width: 40rpx;
  462. height: 40rpx;
  463. text-align: center;
  464. line-height: 40rpx;
  465. background: #F0F0F0;
  466. }
  467. /* .car-box .item .info .price-box .num-box .num{ */
  468. .num-box .num{
  469. width: 80rpx;
  470. height: 40rpx;
  471. background: #F0F0F0;
  472. text-align: center;
  473. line-height: 40rpx;
  474. margin: 0 4rpx;
  475. font-size: 24rpx ;
  476. color: #222222;
  477. }
  478. .bottom-box{
  479. position: fixed;
  480. bottom: 0;
  481. left: 0;
  482. z-index: 999999;
  483. box-sizing: border-box;
  484. width: 100%;
  485. display: flex;
  486. justify-content: space-between;
  487. padding: 20rpx 24rpx;
  488. background: #FFFFFF;
  489. box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.05);
  490. border-radius: 32rpx 32rpx 0rpx 0rpx;
  491. }
  492. .bottom-box .num{
  493. position: absolute;
  494. top: 20rpx;
  495. left: 80rpx;
  496. border-radius: 30rpx;
  497. font-size: 24rpx;
  498. color: #fff;
  499. background: #FF4D3A;
  500. padding: 2rpx 6rpx;
  501. }
  502. .bottom-box .left{
  503. display: flex;
  504. }
  505. .bottom-box .icon{
  506. width: 80rpx;
  507. height: 80rpx;
  508. margin-right: 20rpx;
  509. }
  510. .bottom-box .price-box .top{
  511. display: flex;
  512. align-items: center;
  513. }
  514. .bottom-box .price-box .top .price{
  515. font-weight: 800;
  516. font-size: 32rpx;
  517. color: #FF4D3A;
  518. }
  519. .bottom-box .price-box .top .reduce-price{
  520. font-size: 24rpx;
  521. color: #AAAAAA
  522. }
  523. .bottom-box .price-box .shipping-fee{
  524. font-size: 24rpx;
  525. color: #AAAAAA;
  526. }
  527. .bottom-box .btn{
  528. width: 342rpx;
  529. height: 80rpx;
  530. background: #FF941A;
  531. border-radius: 40rpx;
  532. text-align: center;
  533. line-height: 80rpx;
  534. font-weight: bold;
  535. font-size: 28rpx;
  536. color: #FFFFFF;
  537. }
  538. /* 购物车为空 */
  539. .empty {
  540. margin-top: 100rpx;
  541. text-align: cneter;
  542. }
  543. .empty-icon {
  544. display: block;
  545. width: 100rpx;
  546. height: 100rpx;
  547. margin: 0 auto;
  548. margin-bottom: 20rpx;
  549. }
  550. .empty-icon > image {
  551. width: 100%;
  552. height: 100%;
  553. }
  554. .empty-text {
  555. font-size: 28rpx;
  556. text-align: center;
  557. color: #999;
  558. line-height: 2em;
  559. }