popup.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /* 弹窗背景 */
  2. .popup {
  3. position: fixed;
  4. bottom: 0;
  5. left: 0;
  6. right: 0;
  7. max-width: 750rpx;
  8. margin: auto;
  9. z-index: 210;
  10. .popup-mask {
  11. width: 100%;
  12. height: 100%;
  13. background-color: rgba(0,0,0,.5);
  14. }
  15. .popup-con-bottom {
  16. position: absolute;
  17. bottom: 0;
  18. width: 100%;
  19. transform: translateY(100%);
  20. transition: all .3s;
  21. background: #fff;
  22. border-radius: 20rpx 20rpx 0 0;
  23. max-height: 80%;
  24. min-height: 40%;
  25. }
  26. .popup-tit {
  27. position: relative;
  28. padding: 30rpx;
  29. text-align: center;
  30. height: 38rpx;
  31. line-height: 38rpx;
  32. z-index: 1;
  33. .tit-text {
  34. font-size: 28rpx;
  35. font-weight: 600;
  36. }
  37. .close {
  38. width: 34rpx;
  39. height: 34rpx;
  40. position: absolute;
  41. top: 32rpx;
  42. right: 30rpx;
  43. border-radius: 50%;
  44. background: #f5f5f5;
  45. font-size: 0;
  46. image {
  47. width: 14rpx;
  48. height: 14rpx;
  49. margin: 10rpx auto;
  50. }
  51. }
  52. }
  53. .con-box {
  54. position: absolute;
  55. top: 98rpx;
  56. bottom: env(safe-area-inset-bottom);
  57. bottom: constant(safe-area-inset-bottom);
  58. left: 30rpx;
  59. right: 30rpx;
  60. overflow-y: scroll;
  61. -webkit-overflow-scrolling: touch;
  62. &::after {
  63. min-height: calc(100% + 2rpx);
  64. }
  65. }
  66. .con-box-min {
  67. position: absolute;
  68. top: 98rpx;
  69. bottom: env(safe-area-inset-bottom);
  70. bottom: constant(safe-area-inset-bottom);
  71. left: 30rpx;
  72. right: 30rpx;
  73. overflow-y: scroll;
  74. -webkit-overflow-scrolling: touch;
  75. bottom: calc(110rpx + env(safe-area-inset-bottom));
  76. bottom: calc(110rpx + constant(safe-area-inset-bottom));
  77. &::after {
  78. min-height: calc(100% + 2rpx);
  79. }
  80. }
  81. .btn-box {
  82. position: absolute;
  83. bottom: 0;
  84. left: 0;
  85. right: 0;
  86. height: 110rpx;
  87. box-sizing: border-box;
  88. padding: 20rpx 30rpx;
  89. justify-content: space-between;
  90. display: none;
  91. margin-bottom: env(safe-area-inset-bottom);
  92. margin-bottom: constant(safe-area-inset-bottom);
  93. .btn {
  94. flex: 1;
  95. height: 70rpx;
  96. line-height: 70rpx;
  97. background: var(--mall4j-color-primary);
  98. color: #fff;
  99. text-align: center;
  100. border-radius: 70rpx;
  101. font-size: 26rpx;
  102. font-weight: 600;
  103. }
  104. .gray {
  105. background: #dddddd;
  106. }
  107. }
  108. .btn-box.btn-box-gray {
  109. .btn {
  110. background: #dddddd;
  111. }
  112. }
  113. .check-coupon {
  114. height: 80%;
  115. .con-box {
  116. left: 0;
  117. right: 0;
  118. background: #f2f3f7;
  119. width: 100%;
  120. box-sizing: border-box;
  121. padding: 0 30rpx;
  122. height: 100%;
  123. padding-bottom: 200rpx;
  124. .coupon-tit {
  125. margin-top: 40rpx;
  126. .tit-text {
  127. font-weight: 600;
  128. }
  129. .tit-des {
  130. color: #999;
  131. font-size: 20rpx;
  132. margin-left: -6rpx;
  133. }
  134. }
  135. }
  136. }
  137. .check-discount {
  138. height: 50%;
  139. min-height: 35vh;
  140. .discount-item {
  141. display: flex;
  142. align-self: center;
  143. padding-bottom: 30rpx;
  144. &:first-child {
  145. padding-top: 20rpx;
  146. }
  147. .discount-icon {
  148. padding: 6rpx;
  149. background: var(--mall4j-color-primary);
  150. border-radius: 4rpx;
  151. color: #fff;
  152. font-size: 18rpx;
  153. display: inline-block;
  154. margin-right: 12rpx;
  155. height: 24rpx;
  156. line-height: 24rpx;
  157. }
  158. .text {
  159. flex: 1;
  160. margin-left: 20rpx;
  161. line-height: 36rpx;
  162. word-break: break-word;
  163. margin-left: auto;
  164. }
  165. }
  166. .discount-item.cart-discount-pop {
  167. .text {
  168. margin-left: 20rpx;
  169. }
  170. }
  171. }
  172. .check-sku {
  173. height: 60%;
  174. .goods-box {
  175. padding: 30rpx;
  176. display: flex;
  177. .img {
  178. width: 160rpx;
  179. height: 160rpx;
  180. font-size: 0;
  181. }
  182. .info {
  183. flex: 1;
  184. margin: 0 30rpx 0 20rpx;
  185. .name {
  186. height: 80rpx;
  187. line-height: 40rpx;
  188. display: -webkit-box;
  189. -webkit-box-orient: vertical;
  190. -webkit-line-clamp: 2;
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. word-break: break-word;
  194. line-break: anywhere;
  195. }
  196. .price {
  197. margin-top: 20rpx;
  198. }
  199. }
  200. .close {
  201. width: 34rpx;
  202. height: 34rpx;
  203. border-radius: 50%;
  204. background: #f5f5f5;
  205. font-size: 0;
  206. image {
  207. display: block;
  208. width: 14rpx;
  209. height: 14rpx;
  210. margin: 10rpx auto;
  211. }
  212. }
  213. }
  214. .con-box {
  215. top: 220rpx;
  216. bottom: calc(110rpx + env(safe-area-inset-bottom));
  217. bottom: calc(110rpx + constant(safe-area-inset-bottom));
  218. .prod-number {
  219. width: 100%;
  220. display: flex;
  221. align-items: center;
  222. justify-content: space-between;
  223. .number-box {
  224. display: flex;
  225. align-items: center;
  226. font-family: PingFangSC-Medium, tahoma;
  227. font-weight: 600;
  228. text-align: center;
  229. }
  230. }
  231. .item-tit {
  232. margin-top: 10px;
  233. font-weight: 600;
  234. }
  235. .number-box {
  236. .minus {
  237. background: #f2f2f2;
  238. width: 40rpx;
  239. height: 40rpx;
  240. line-height: 40rpx;
  241. border-radius: 50%;
  242. position: relative;
  243. &::after {
  244. position: absolute;
  245. left: 50%;
  246. top: 45%;
  247. display: block;
  248. transform: translate(-50%,-50%);
  249. font-size: 26rpx;
  250. content: "-";
  251. }
  252. }
  253. .plus {
  254. background: #f2f2f2;
  255. width: 40rpx;
  256. height: 40rpx;
  257. line-height: 40rpx;
  258. border-radius: 50%;
  259. position: relative;
  260. &::after {
  261. position: absolute;
  262. left: 50%;
  263. top: 45%;
  264. display: block;
  265. transform: translate(-50%,-50%);
  266. font-size: 28rpx;
  267. content: "+";
  268. }
  269. }
  270. .limit {
  271. opacity: 0.7;
  272. &::after {
  273. color: #ccc;
  274. }
  275. }
  276. .number {
  277. width: 70rpx;
  278. padding: 0 10rpx;
  279. }
  280. }
  281. }
  282. .sku-item {
  283. margin-top: 30rpx;
  284. &:first-child {
  285. margin-top: 20rpx;
  286. }
  287. .item-tit {
  288. font-size: 12px;
  289. color: #999;
  290. margin: 0 10px;
  291. height: 30px;
  292. line-height: 20px;
  293. }
  294. .item-box {
  295. display: flex;
  296. flex-wrap: wrap;
  297. .item-item {
  298. padding: 8rpx 30rpx;
  299. line-height: 32rpx;
  300. background: #f3f3f3;
  301. margin-bottom: 20rpx;
  302. margin-right: 10rpx;
  303. box-sizing: border-box;
  304. border-radius: 60rpx;
  305. border: 2rpx solid #f3f3f3;
  306. &:last-child {
  307. margin-right: 0;
  308. }
  309. }
  310. .sku-choose-item {
  311. display: inline-block;
  312. min-width: 100rpx;
  313. max-width: 540rpx;
  314. padding: 0 10rpx;
  315. overflow: hidden;
  316. height: 50rpx;
  317. line-height: 50rpx;
  318. text-align: center;
  319. margin-left: 10px;
  320. margin-bottom: 10px;
  321. border-radius: 30rpx;
  322. color: #333;
  323. background-color: #f7f7f7;
  324. font-size: 14px;
  325. border: 1px solid #aaa;
  326. &.active {
  327. background-color: var(--mall4j-color-primary);
  328. color: #fff;
  329. border: 1px solid var(--mall4j-color-primary) !important;
  330. }
  331. &.gray {
  332. background-color: #f9f9f9;
  333. color: #ddd;
  334. }
  335. &.dashed {
  336. border: 1px dashed #ccc;
  337. }
  338. }
  339. .item-item.active {
  340. border: 2rpx solid var(--mall4j-color-primary);
  341. color: #fff ;
  342. background: var(--mall4j-color-primary);
  343. }
  344. .item-item.cannot {
  345. border: 2rpx dashed #ddd;
  346. background: #fff;
  347. }
  348. .item-item.active.cannot {
  349. border: 2rpx dashed var(--mall4j-color-primary);
  350. }
  351. }
  352. }
  353. }
  354. }
  355. .popup.show {
  356. top: 0;
  357. .popup-con-bottom {
  358. transform: translateY(0);
  359. }
  360. .btn-box {
  361. display: flex;
  362. z-index: 9999;
  363. background-color: #ffffff;
  364. .add-cart-btn {
  365. background-color: #ffbb0d;
  366. margin-right: 24rpx;
  367. }
  368. &.btn-box-gray{
  369. .add-cart-btn{
  370. background-color: #dddddd;
  371. }
  372. }
  373. }
  374. }
  375. .popup-min {
  376. position: fixed;
  377. top: 0;
  378. bottom: 0;
  379. left: 100%;
  380. right: 0;
  381. max-width: 750rpx;
  382. margin: auto;
  383. z-index: 210;
  384. .popup-mask {
  385. width: 100%;
  386. height: 100%;
  387. background-color: rgba(0,0,0,.5);
  388. }
  389. .popup-con-middle {
  390. position: absolute;
  391. top: 50%;
  392. left: 50rpx;
  393. right: 50rpx;
  394. transform: translateY(-50%) scale(0);
  395. transition: all .3s;
  396. background: #fff;
  397. border-radius: 20rpx;
  398. padding: 30rpx;
  399. text-align: center;
  400. .big-text {
  401. font-size: 28rpx;
  402. font-weight: 600;
  403. margin-top: 20rpx;
  404. }
  405. .small-text {
  406. margin-top: 30rpx;
  407. }
  408. .btns {
  409. margin-top: 50rpx;
  410. margin-bottom: 10rpx;
  411. display: flex;
  412. justify-content: center;
  413. align-items: center;
  414. .btn {
  415. padding: 0 70rpx;
  416. height: 56rpx;
  417. line-height: 56rpx;
  418. text-align: center;
  419. color: var(--mall4j-color-primary);
  420. border-radius: 56rpx;
  421. border: 2rpx solid var(--mall4j-color-primary);
  422. box-sizing: border-box;
  423. }
  424. .btn.btn-r {
  425. background: var(--mall4j-color-primary);
  426. color: #fff;
  427. margin-left: 30rpx;
  428. }
  429. }
  430. }
  431. }
  432. .popup-min.show {
  433. left: 0;
  434. .popup-con-middle {
  435. transform: translateY(-50%) scale(1);
  436. }
  437. }
  438. // 优惠劵样式
  439. .coupon-item {
  440. margin: 30rpx 0;
  441. display: flex;
  442. position: relative;
  443. &::before {
  444. position: absolute;
  445. left: 212rpx;
  446. display: block;
  447. width: 20rpx;
  448. height: 20rpx;
  449. border-radius: 50%;
  450. background: #f2f3f7;
  451. content: " ";
  452. font-size: 0;
  453. z-index: 5;
  454. top: -10rpx;
  455. box-shadow: 0 -2rpx 2rpx rgba(0,0,0,.06) inset;
  456. }
  457. &::after {
  458. position: absolute;
  459. left: 212rpx;
  460. display: block;
  461. width: 20rpx;
  462. height: 20rpx;
  463. border-radius: 50%;
  464. background: #f2f3f7;
  465. content: " ";
  466. font-size: 0;
  467. z-index: 5;
  468. bottom: -10rpx;
  469. box-shadow: 0 2rpx 2rpx rgba(0,0,0,.06) inset;
  470. }
  471. .c-price {
  472. padding: 20rpx;
  473. color: #fff;
  474. width: 184rpx;
  475. border-radius: 10rpx 0 0 10rpx;
  476. box-shadow: 0 0 6rpx rgba(0,0,0,.05);
  477. background: linear-gradient(to right, #5695d6, #6779da);
  478. display: flex;
  479. align-items: center;
  480. justify-content: center;
  481. .price-box {
  482. width: 100%;
  483. }
  484. .price {
  485. justify-content: center;
  486. font-weight: 600;
  487. color: #fff;
  488. .big {
  489. font-size: 48rpx;
  490. }
  491. .small {
  492. font-size: 24rpx;
  493. margin-right: 6rpx;
  494. }
  495. }
  496. .c-condition {
  497. margin-top: 4rpx;
  498. text-align: center;
  499. word-break: break-word;
  500. }
  501. }
  502. .text-box {
  503. flex: 1;
  504. padding: 20rpx;
  505. background: #fff;
  506. box-shadow: 0 0 6rpx rgba(0,0,0,.05);
  507. border-left: 2rpx dashed #6779da;
  508. border-radius: 0 10rpx 10rpx 0;
  509. .c-des {
  510. height: 72rpx;
  511. line-height: 36rpx;
  512. overflow: hidden;
  513. text-overflow: ellipsis;
  514. display: -webkit-box;
  515. -webkit-line-clamp: 2;
  516. -webkit-box-orient: vertical;
  517. .c-style {
  518. display: inline-block;
  519. vertical-align: top;
  520. margin-top: 4rpx;
  521. background: #6779da;
  522. color: #fff;
  523. height: 28rpx;
  524. line-height: 28rpx;
  525. padding: 0 10rpx;
  526. font-size: 18rpx;
  527. border-radius: 28rpx;
  528. }
  529. .text {
  530. margin-left: 10rpx;
  531. font-weight: 600;
  532. }
  533. }
  534. .c-time {
  535. display: flex;
  536. align-items: center;
  537. margin-top: 16rpx;
  538. margin-bottom: 4rpx;
  539. .time {
  540. flex: 1;
  541. font-size: 20rpx;
  542. color: #999;
  543. display: -webkit-box;
  544. -webkit-box-orient: vertical;
  545. -webkit-line-clamp: 1;
  546. overflow: hidden;
  547. text-overflow: ellipsis;
  548. }
  549. .btn {
  550. padding: 4rpx 14rpx;
  551. font-size: 20rpx;
  552. border: 2rpx solid #6779da;
  553. background: #6779da;
  554. color: #fff;
  555. border-radius: 40rpx;
  556. box-sizing: border-box;
  557. }
  558. .btn.get {
  559. background: #fff;
  560. color: #6779da;
  561. }
  562. }
  563. }
  564. }
  565. .coupon-item.general {
  566. .c-price {
  567. background: linear-gradient(to right,var(--mall4j-color-primary-light-1), var(--mall4j-color-primary));
  568. }
  569. .text-box {
  570. border-left: 2rpx dashed var(--mall4j-color-primary);
  571. .c-des {
  572. .c-style {
  573. background: var(--mall4j-color-primary);
  574. }
  575. }
  576. .c-time {
  577. .btn {
  578. border: 2rpx solid var(--mall4j-color-primary);
  579. background: var(--mall4j-color-primary);
  580. }
  581. .btn.get {
  582. background: #fff;
  583. color: var(--mall4j-color-primary);
  584. }
  585. }
  586. }
  587. }
  588. .coupon-item.unavailable {
  589. .c-price {
  590. background: #ccc;
  591. }
  592. .text-box {
  593. border-left: 2rpx dashed #ccc;
  594. .c-des {
  595. .c-style {
  596. background: #ccc;
  597. }
  598. }
  599. }
  600. }