global.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. [class*='g-image'] {
  2. position: relative;
  3. object-fit: cover;
  4. overflow: hidden;
  5. &:before {
  6. content: '';
  7. position: absolute;
  8. left: 0;
  9. top: 0;
  10. width: 100%;
  11. height: 100%;
  12. background: #fff url("../../images/avatar.png") no-repeat center;
  13. background-size: cover;
  14. }
  15. }
  16. .g-price {
  17. &-normal {
  18. color: #333333;
  19. }
  20. &-up {
  21. color: #ff3333;
  22. }
  23. &-down {
  24. color: #0baf1f;
  25. }
  26. }
  27. .g-risk {
  28. &-green {
  29. color: #0baf1f;
  30. }
  31. &-red {
  32. color: #ff3333;
  33. }
  34. &-orange {
  35. color: orange;
  36. }
  37. &-yellow {
  38. color: #ebce12;
  39. }
  40. }
  41. .g-form {
  42. &__container {
  43. display: flex;
  44. flex-direction: column;
  45. padding-bottom: 16px;
  46. /* 父元素的第一个子元素 */
  47. .van-cell-group--inset:first-of-type {
  48. margin-top: 16px;
  49. }
  50. /* 相邻兄弟元素 */
  51. .van-cell-group--inset+.van-cell-group--inset {
  52. margin-top: 12px;
  53. }
  54. .van-field {
  55. &__right-icon {
  56. align-self: normal;
  57. }
  58. .van-stepper {
  59. display: flex;
  60. align-items: center;
  61. width: 100%;
  62. &__input {
  63. flex: 1;
  64. }
  65. }
  66. }
  67. }
  68. &__footer {
  69. display: flex;
  70. align-items: center;
  71. &:empty {
  72. display: none;
  73. }
  74. &.inset {
  75. gap: 10px;
  76. padding: 10px 16px;
  77. }
  78. }
  79. }
  80. .g-flex {
  81. display: flex;
  82. flex-direction: column;
  83. height: 100%;
  84. &--row {
  85. flex-direction: row;
  86. }
  87. &__body {
  88. flex: 1;
  89. overflow-y: auto;
  90. -webkit-overflow-scrolling: touch;
  91. }
  92. &__footer {
  93. margin-top: auto;
  94. }
  95. }
  96. .g-color {
  97. &--up {
  98. color: var(--color-up);
  99. }
  100. &--down {
  101. color: var(--color-down);
  102. }
  103. }
  104. .g-block {
  105. &--bg {
  106. background: #fff url('../../images/block-bg.png') no-repeat center bottom;
  107. background-size: 100%;
  108. }
  109. }
  110. /* 导航列表 */
  111. .g-navmenu {
  112. .app-iconfont {
  113. height: 100%;
  114. .g-icon {
  115. width: 18px;
  116. height: 18px;
  117. font-size: 18px;
  118. }
  119. &__label {
  120. font-size: 13px;
  121. margin-left: 12px
  122. }
  123. }
  124. }
  125. /* 商品列表 */
  126. .g-goods-list {
  127. padding: 10px;
  128. .list {
  129. padding: 10px 10px 0 10px;
  130. &-item {
  131. display: flex;
  132. border-radius: 10px;
  133. height: 110px;
  134. overflow: hidden;
  135. background-color: #fff;
  136. padding: 10px;
  137. &:not(:last-child) {
  138. margin-bottom: 10px;
  139. }
  140. .img {
  141. position: relative;
  142. border-radius: 8px;
  143. overflow: hidden;
  144. &.mask::after {
  145. content: '已结束';
  146. position: absolute;
  147. top: 0;
  148. left: 0;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. width: 100%;
  153. height: 100%;
  154. font-size: 12px;
  155. color: #fff;
  156. background-color: rgba(0, 0, 0, .5);
  157. }
  158. img {
  159. width: 90px;
  160. height: 90px;
  161. object-fit: cover;
  162. }
  163. }
  164. .info {
  165. flex: 1;
  166. display: flex;
  167. flex-direction: column;
  168. margin-left: 15px;
  169. .title {
  170. color: #333;
  171. font-size: 15px;
  172. }
  173. .desc {
  174. display: flex;
  175. flex-direction: column;
  176. color: #666;
  177. font-size: 12px;
  178. margin-top: auto;
  179. }
  180. .price {
  181. color: var(--van-tag-danger-color);
  182. margin-top: 8px;
  183. .buyprice,
  184. .sellprice {
  185. padding-bottom: 1px;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. .g-goods-waterfall {
  193. padding: 10px;
  194. .goods {
  195. background-color: #fff;
  196. border-radius: 8px;
  197. overflow: hidden;
  198. &-image {
  199. position: relative;
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. min-height: 120px;
  204. font-size: 0;
  205. border-radius: 8px;
  206. overflow: hidden;
  207. &.mask::after {
  208. content: '已结束';
  209. position: absolute;
  210. top: 0;
  211. left: 0;
  212. display: flex;
  213. justify-content: center;
  214. align-items: center;
  215. width: 100%;
  216. height: 100%;
  217. font-size: 14px;
  218. color: #fff;
  219. background-color: rgba(0, 0, 0, .5);
  220. }
  221. }
  222. &-info {
  223. padding: 10px;
  224. &__title {
  225. font-size: 13px;
  226. margin-bottom: 5px;
  227. }
  228. &__desc {
  229. font-size: 12px;
  230. color: #999;
  231. margin-bottom: 5px;
  232. }
  233. &__price {
  234. color: #f2270c;
  235. .unit {
  236. font-size: 12px;
  237. }
  238. .integer {
  239. font-size: 15px;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. /* 订单列表 */
  246. .g-order-list {
  247. padding: 10px;
  248. padding-bottom: 0;
  249. &__box {
  250. &:not(:first-child) {
  251. margin-top: 10px;
  252. }
  253. background-color: #fff;
  254. border-radius: 8px;
  255. padding: 12px;
  256. }
  257. &__titlebar {
  258. display: flex;
  259. justify-content: space-between;
  260. margin-bottom: 10px;
  261. .left {
  262. h4 {
  263. font-weight: bold;
  264. }
  265. span {
  266. font-size: 12px;
  267. color: #999;
  268. }
  269. }
  270. .right {
  271. font-size: 12px;
  272. color: #999;
  273. }
  274. }
  275. &__content {
  276. font-size: 12px;
  277. ul {
  278. display: flex;
  279. flex-wrap: wrap;
  280. justify-content: space-between;
  281. li {
  282. display: flex;
  283. justify-content: space-between;
  284. line-height: 24px;
  285. width: calc(~"50% - 12px");
  286. span {
  287. &:first-child {
  288. color: #999;
  289. white-space: nowrap;
  290. padding-right: 12px;
  291. }
  292. }
  293. }
  294. }
  295. }
  296. &__btnbar {
  297. display: flex;
  298. justify-content: flex-end;
  299. gap: 8px;
  300. margin-top: 10px;
  301. .van-button {
  302. width: 80px;
  303. border-width: 1px;
  304. }
  305. }
  306. }
  307. .g-detail {
  308. &__buy {
  309. background-color: #fff;
  310. .topic {
  311. display: flex;
  312. justify-content: space-between;
  313. align-items: center;
  314. color: #fff;
  315. background-image: linear-gradient(to right, #ee0a24, #ff6034);
  316. padding: 10px 12px;
  317. &-left {
  318. .price-text {
  319. font-size: 12px;
  320. }
  321. .price-integer {
  322. font-size: 22px;
  323. }
  324. }
  325. &-right {
  326. display: flex;
  327. flex-direction: column;
  328. font-size: 12px;
  329. }
  330. }
  331. .title {
  332. font-size: 15px;
  333. font-weight: bold;
  334. line-height: 24px;
  335. padding: 12px;
  336. padding-bottom: 0;
  337. .van-tag {
  338. font-weight: normal;
  339. }
  340. span {
  341. margin-right: 5px;
  342. }
  343. }
  344. .desc {
  345. padding: 0 12px;
  346. }
  347. .qty {
  348. font-size: 12px;
  349. color: #999;
  350. padding: 5px 12px 0 12px;
  351. }
  352. .info {
  353. background-color: #fff;
  354. padding: 10px;
  355. ul {
  356. display: flex;
  357. flex-wrap: wrap;
  358. font-size: 13px;
  359. li {
  360. display: flex;
  361. justify-content: space-between;
  362. width: 50%;
  363. padding: 4px 12px;
  364. span {
  365. &:first-child {
  366. color: #999;
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. &__desc {
  374. background-color: #fff;
  375. margin-top: 12px;
  376. }
  377. &__footer {
  378. display: flex;
  379. justify-content: space-between;
  380. align-items: center;
  381. height: 44px;
  382. background-color: #fff;
  383. .price {
  384. padding-left: 16px;
  385. &-text,
  386. &-unit {
  387. font-size: 12px;
  388. }
  389. &-unit {
  390. color: #f2270c;
  391. }
  392. &-integer {
  393. font-size: 16px;
  394. color: #f2270c;
  395. }
  396. }
  397. .submit {
  398. align-self: stretch;
  399. display: flex;
  400. margin-left: auto;
  401. &-button {
  402. display: flex;
  403. justify-content: center;
  404. align-items: center;
  405. height: 100%;
  406. min-width: 100px;
  407. font-weight: bold;
  408. color: #fff;
  409. padding: 0 24px;
  410. &.warning {
  411. background-image: linear-gradient(to right, #ffd01e, #ff8917);
  412. background-color: #ff8a17;
  413. }
  414. &.danger {
  415. background-image: linear-gradient(to right, #ff6034, #ee0a24);
  416. background-color: #ee270a;
  417. }
  418. }
  419. }
  420. }
  421. }
  422. .g-qty-group {
  423. flex: 1;
  424. display: flex;
  425. flex-direction: column;
  426. align-items: center;
  427. &__stepper {
  428. display: flex;
  429. align-items: center;
  430. gap: 5px;
  431. width: 100%;
  432. .van-stepper {
  433. flex: 1;
  434. display: flex;
  435. &__input {
  436. flex: 1;
  437. }
  438. }
  439. }
  440. .van-radio-group {
  441. display: flex;
  442. flex-wrap: wrap;
  443. width: 100%;
  444. margin-top: 10px;
  445. }
  446. .van-radio {
  447. width: calc(~'100% / 3');
  448. padding: 2px;
  449. margin-right: 0;
  450. .van-radio__icon {
  451. display: none;
  452. }
  453. &__label {
  454. display: block;
  455. width: 100%;
  456. font-size: 12px;
  457. text-align: center;
  458. color: #666;
  459. border: 1px solid #e5e5e5;
  460. border-radius: 4px;
  461. padding: 2px;
  462. margin-left: 0;
  463. }
  464. &[aria-checked="true"] {
  465. .van-radio__label {
  466. color: var(--van-radio-checked-icon-color);
  467. border-color: var(--van-radio-checked-icon-color);
  468. }
  469. }
  470. }
  471. }
  472. .van {
  473. &-dialog {
  474. &__message {
  475. font-size: 14px;
  476. line-height: 22px;
  477. }
  478. }
  479. &-tabs {
  480. &--list {
  481. display: flex;
  482. flex-direction: column;
  483. height: 100%;
  484. }
  485. &--list &__content {
  486. flex: 1;
  487. overflow-y: auto;
  488. .van-tab__panel {
  489. height: 100%;
  490. }
  491. }
  492. }
  493. }