global.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. @use 'sass:math';
  2. @function px2rpx($px) {
  3. @return $px * 1rpx;
  4. }
  5. :root {
  6. --primary-color: #ea002a;
  7. --success-color: #4CD964;
  8. --warning-color: #F0AD4E;
  9. --error-color: #DD524D;
  10. --main-bg: #fff;
  11. --card-bg: #222;
  12. --action-bg: #fff;
  13. --main-yellow: #ea002a;
  14. --lable: #454745;
  15. --main-yellow-dark: rgb(15 120 71);
  16. --white: #000;
  17. --gray: #aaa;
  18. --border: #868685;
  19. --black: #fff;
  20. --black1: #343434;
  21. --font-size-10: px2rpx(10);
  22. --font-size-12: px2rpx(12);
  23. --font-size-13: px2rpx(13);
  24. --font-size-14: px2rpx(14);
  25. --font-size-15: px2rpx(15);
  26. --font-size-16: px2rpx(16);
  27. --font-size-18: px2rpx(18);
  28. --font-size-20: px2rpx(20);
  29. --font-size-22: px2rpx(22);
  30. --font-size-24: px2rpx(24);
  31. --font-size-26: px2rpx(26);
  32. --font-size-28: px2rpx(28);
  33. --font-size-32: px2rpx(32);
  34. --font-size-36: px2rpx(36);
  35. --font-size-40: px2rpx(40);
  36. }
  37. .dark {
  38. --primary-color: #1a1a1a;
  39. --success-color: #4CD964;
  40. --warning-color: #F0AD4E;
  41. --error-color: #DD524D;
  42. --main-bg: #181a1b;
  43. --card-bg: #222;
  44. --action-bg: #232323;
  45. --main-yellow: #ea002a;
  46. --main-yellow-dark: rgb(15 120 71);
  47. --white: #fff;
  48. --lable: #aaa;
  49. --gray: #aaa;
  50. --border: #333;
  51. --black: #000;
  52. --font-size-10: 10px;
  53. --font-size-12: 12px;
  54. --font-size-13: 13px;
  55. --font-size-14: 14px;
  56. --font-size-15: 15px;
  57. --font-size-16: 16px;
  58. --font-size-18: 18px;
  59. --font-size-20: 20px;
  60. --font-size-22: 22px;
  61. --font-size-24: 24px;
  62. --font-size-26: 26px;
  63. --font-size-28: 28px;
  64. --font-size-32: 32px;
  65. --font-size-36: 36px;
  66. --font-size-40: 40px;
  67. }
  68. body {
  69. min-height: 100vh;
  70. margin: 0 auto !important;
  71. font-size: px2rpx(12);
  72. line-height: 1;
  73. color: #000;
  74. background: #fff;
  75. }
  76. .body {
  77. position: absolute;
  78. box-sizing: border-box;
  79. width: 100%;
  80. // height: 100vh;
  81. // padding-bottom: var(--tabbar-height);
  82. height: 100vh;
  83. overflow-y: scroll;
  84. transition: all 0.4s;
  85. -webkit-overflow-scrolling: touch;
  86. &.is-tab {
  87. // height: calc(100vh - var(--tabbar-height));
  88. }
  89. }
  90. .wrap {
  91. position: relative;
  92. width: 100%;
  93. height: 100vh;
  94. overflow: hidden;
  95. }
  96. .global-loading {
  97. position: fixed;
  98. top: 0;
  99. left: 0;
  100. z-index: 999;
  101. display: flex;
  102. align-items: center;
  103. justify-content: center;
  104. width: 100vw;
  105. height: 100vh;
  106. background: var(--main-bg);
  107. }
  108. .router-loading {
  109. position: fixed;
  110. top: 0;
  111. left: 0;
  112. z-index: 1000;
  113. display: flex;
  114. align-items: center;
  115. justify-content: center;
  116. width: 100vw;
  117. height: 100vh;
  118. background: var(--main-bg);
  119. }
  120. .full-screen-loading {
  121. position: fixed;
  122. top: 0;
  123. left: 0;
  124. z-index: 1001;
  125. display: flex;
  126. align-items: center;
  127. justify-content: center;
  128. width: 100vw;
  129. height: 100vh;
  130. background: var(--main-bg);
  131. }
  132. .request-loading,
  133. .full-screen-loading {
  134. position: fixed;
  135. top: 50%;
  136. left: 50%;
  137. z-index: 1001;
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. justify-content: center;
  142. padding: px2rpx(16) px2rpx(24);
  143. background: rgb(0, 0, 0, 0.88);
  144. backdrop-filter: blur(4px);
  145. box-shadow: 0 4px 12px rgb(0, 0, 0, 0.15);
  146. transform: translate(-50%, -50%);
  147. animation: fadeIn 0.2s ease-in-out;
  148. .van-loading {
  149. margin-bottom: px2rpx(8);
  150. }
  151. .loading-text {
  152. font-size: px2rpx(14);
  153. font-weight: 500;
  154. color: #fff;
  155. text-shadow: 0 px2rpx(1) px2rpx(2) rgb(0, 0, 0, 0.1);
  156. letter-spacing: px2rpx(0.5);
  157. }
  158. &::after {
  159. position: absolute;
  160. inset: px2rpx(-1);
  161. z-index: -1;
  162. content: '';
  163. background: linear-gradient(45deg, rgb(255, 255, 255, 0.1), rgb(255, 255, 255, 0.05));
  164. border-radius: px2rpx(12);
  165. }
  166. }
  167. .full-screen-loading {
  168. width: 100vw;
  169. height: 100vh;
  170. }
  171. @keyframes fadeIn {
  172. from {
  173. opacity: 0;
  174. transform: translate(-50%, -48%);
  175. }
  176. to {
  177. opacity: 1;
  178. transform: translate(-50%, -50%);
  179. }
  180. }
  181. .load-more {
  182. margin: px2rpx(10) 0;
  183. }
  184. /* 通用样式 */
  185. .slide-left-enter,
  186. .slide-right-leave-active {
  187. opacity: 0;
  188. transform: translate(100%, 0);
  189. }
  190. .slide-left-leave-active,
  191. .slide-right-enter {
  192. opacity: 0;
  193. transform: translate(-100%, 0);
  194. }
  195. /* .fade-leave-active below version 2.1.8 */
  196. .fade-enter-active,
  197. .fade-leave-active {
  198. transition: opacity 0.5s;
  199. }
  200. .fade-enter,
  201. .fade-leave-to {
  202. opacity: 0;
  203. }
  204. /* start--文本行数限制--start */
  205. .u-line-1 {
  206. overflow: hidden;
  207. text-overflow: ellipsis;
  208. white-space: nowrap;
  209. }
  210. .u-line-2 {
  211. -webkit-line-clamp: 2;
  212. }
  213. .u-line-3 {
  214. -webkit-line-clamp: 3;
  215. }
  216. .u-line-4 {
  217. -webkit-line-clamp: 4;
  218. }
  219. .u-line-5 {
  220. -webkit-line-clamp: 5;
  221. }
  222. .u-line-2,
  223. .u-line-3,
  224. .u-line-4,
  225. .u-line-5 {
  226. display: flex;
  227. overflow: hidden;
  228. text-overflow: ellipsis;
  229. word-break: break-all;
  230. -webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式
  231. }
  232. /* end--文本行数限制--end */
  233. /* start--Retina 屏幕下的 1px 边框--start */
  234. .u-border,
  235. .u-border-bottom,
  236. .u-border-left,
  237. .u-border-right,
  238. .u-border-top,
  239. .u-border-top-bottom {
  240. position: relative;
  241. }
  242. .u-border-bottom::after,
  243. .u-border-left::after,
  244. .u-border-right::after,
  245. .u-border-top-bottom::after,
  246. .u-border-top::after,
  247. .u-border::after {
  248. position: absolute;
  249. top: 0;
  250. left: 0;
  251. z-index: 2;
  252. box-sizing: border-box;
  253. // 多加0.1%,能解决有时候边框缺失的问题
  254. width: 199.8%;
  255. height: 199.7%;
  256. pointer-events: none;
  257. content: ' ';
  258. border: 0 solid #e4e7ed;
  259. transform: scale(0.5, 0.5);
  260. transform-origin: 0 0;
  261. }
  262. .u-border-top::after {
  263. border-top-width: 1PX;
  264. }
  265. .u-border-left::after {
  266. border-left-width: 1PX;
  267. }
  268. .u-border-right::after {
  269. border-right-width: 1PX;
  270. }
  271. .u-border-bottom::after {
  272. border-bottom-width: 1PX;
  273. }
  274. .u-border-top-bottom::after {
  275. border-width: 1PX 0;
  276. }
  277. .u-border::after {
  278. border-width: 1PX;
  279. }
  280. .cwg-button {
  281. width: 100%;
  282. .u-button {
  283. height: px2rpx(44) !important;
  284. font-size: var(--font-size-16);
  285. font-weight: bold;
  286. color: var(--black);
  287. background: var(--main-yellow) !important;
  288. border: none !important;
  289. border-radius: px2rpx(100) !important;
  290. &:active {
  291. opacity: 0.9;
  292. }
  293. }
  294. }
  295. .fixed-btn {
  296. position: fixed;
  297. bottom: 0;
  298. left: 0;
  299. z-index: 1100;
  300. display: flex;
  301. flex-direction: column;
  302. align-items: center;
  303. justify-content: center;
  304. width: 100%;
  305. height: px2rpx(90);
  306. padding: px2rpx(21) px2rpx(30);
  307. color: var(--black);
  308. background-color: var(--black);
  309. box-shadow: 0 -1px 2px rgb(134, 134, 133, 0.25);
  310. box-sizing: border-box;
  311. }
  312. .cwg-upload {
  313. box-sizing: border-box;
  314. display: flex;
  315. flex-direction: column;
  316. align-items: center;
  317. justify-content: center;
  318. width: 100%;
  319. height: px2rpx(160);
  320. padding: px2rpx(16);
  321. border: 1px dashed #beb6b6;
  322. border-radius: px2rpx(4);
  323. .name {
  324. display: flex;
  325. align-items: center;
  326. font-size: px2rpx(16);
  327. font-weight: 600;
  328. line-height: px2rpx(44);
  329. color: #1a1a1a;
  330. text-align: center;
  331. }
  332. .back {
  333. display: flex;
  334. align-items: center;
  335. font-size: px2rpx(16);
  336. line-height: px2rpx(24);
  337. color: #474747;
  338. text-align: center;
  339. letter-spacing: 0.005em;
  340. }
  341. }
  342. .g {
  343. display: flex;
  344. img {
  345. height: px2rpx(50);
  346. }
  347. .g-l {
  348. flex: 1;
  349. margin-left: px2rpx(16);
  350. .g-item {
  351. display: flex;
  352. justify-content: space-between;
  353. margin-bottom: px2rpx(16);
  354. }
  355. .label {
  356. font-family: Roboto;
  357. font-size: px2rpx(14);
  358. font-style: normal;
  359. font-weight: 600;
  360. line-height: px2rpx(20);
  361. color: #1a1a1a;
  362. text-align: left;
  363. }
  364. .v {
  365. font-family: Roboto;
  366. font-size: px2rpx(14);
  367. font-style: normal;
  368. font-weight: 600;
  369. line-height: px2rpx(20);
  370. color: #1a1a1a;
  371. text-align: center;
  372. }
  373. }
  374. }
  375. .fixed-right {
  376. position: fixed;
  377. top: px2rpx(4);
  378. right: px2rpx(10);
  379. z-index: 100;
  380. display: flex;
  381. align-items: center;
  382. justify-content: center;
  383. width: px2rpx(40);
  384. height: px2rpx(40);
  385. color: var(--main-yellow);
  386. cursor: pointer;
  387. i {
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. width: px2rpx(20);
  392. height: px2rpx(20);
  393. font-size: px2rpx(14);
  394. color: var(--main-yellow);
  395. }
  396. &:hover {
  397. opacity: 0.8;
  398. }
  399. }
  400. .status-default {
  401. display: flex;
  402. gap: px2rpx(10);
  403. align-items: center;
  404. justify-content: center;
  405. padding: px2rpx(4) px2rpx(8);
  406. font-family: Roboto;
  407. font-size: px2rpx(12);
  408. font-style: normal;
  409. font-weight: 600;
  410. line-height: px2rpx(16);
  411. color: #009deb;
  412. letter-spacing: px2rpx(0.06);
  413. background: rgb(0, 157, 235, 0.2);
  414. border: 0 solid #f4f4f4;
  415. border-radius: px2rpx(9999);
  416. }
  417. .status-success {
  418. color: #4caf50;
  419. background: rgb(76, 175, 80, 0.2);
  420. }
  421. .status-error {
  422. color: #d32f2f;
  423. background: rgb(211, 47, 47, 0.21);
  424. }
  425. .status-views {
  426. display: flex;
  427. align-items: center;
  428. justify-content: center;
  429. width: px2rpx(65.063);
  430. // height: 36px;
  431. padding: px2rpx(8) px2rpx(16);
  432. font-family: Roboto;
  433. font-size: px2rpx(14);
  434. font-style: normal;
  435. font-weight: 600;
  436. line-height: px2rpx(20);
  437. color: #fff;
  438. text-align: center;
  439. letter-spacing: px2rpx(0.07);
  440. background: #ea002a;
  441. border-radius: px2rpx(10);
  442. }
  443. .ellipsis {
  444. width: 100%;
  445. overflow: hidden;
  446. text-overflow: ellipsis;
  447. white-space: nowrap;
  448. }
  449. .custom-toast {
  450. top: 40%;
  451. display: flex;
  452. flex-direction: column;
  453. gap: px2rpx(16);
  454. align-items: center;
  455. width: px2rpx(348);
  456. padding: px2rpx(32) px2rpx(24);
  457. background: #fff;
  458. border-radius: px2rpx(20);
  459. box-shadow: 0 4px 12px rgb(0, 0, 0, 0.1);
  460. .van-icon__image {
  461. width: px2rpx(88);
  462. height: px2rpx(88);
  463. }
  464. .van-toast__text {
  465. font-family: Roboto;
  466. font-size: px2rpx(14);
  467. font-style: normal;
  468. font-weight: 400;
  469. line-height: px2rpx(20);
  470. color: #474747;
  471. text-align: center;
  472. letter-spacing: px2rpx(0.07);
  473. }
  474. }
  475. .page-header {
  476. position: fixed;
  477. top: calc(var(--secure-height, 0px) + env(safe-area-inset-top));
  478. left: 0;
  479. z-index: 13;
  480. display: flex;
  481. align-items: center;
  482. width: 100%;
  483. height: px2rpx(60);
  484. font-size: var(--font-size-22);
  485. font-weight: 700;
  486. color: var(--white);
  487. text-align: left;
  488. background: #fff;
  489. }
  490. .u-form-item__body {
  491. padding: 0 !important;
  492. }
  493. .u-form-item__body__right__message {
  494. margin-left: 10px !important;
  495. }
  496. .filter-picker {
  497. background-color: #ffffff;
  498. border: 1px solid #e5e7eb;
  499. border-radius: px2rpx(8);
  500. padding: px2rpx(6);
  501. display: flex;
  502. align-items: center;
  503. min-width: px2rpx(60);
  504. max-width: px2rpx(120);
  505. flex-shrink: 1;
  506. overflow: hidden;
  507. div {
  508. width: 100% !important;
  509. }
  510. }
  511. .picker-value {
  512. display: flex;
  513. align-items: center;
  514. gap: px2rpx(4);
  515. width: 100%;
  516. }
  517. .picker-text {
  518. min-width: px2rpx(60);
  519. max-width: px2rpx(100);
  520. font-size: px2rpx(12);
  521. color: #111827;
  522. overflow: hidden;
  523. text-overflow: ellipsis;
  524. white-space: nowrap;
  525. }
  526. .picker-icon {
  527. flex-shrink: 0;
  528. width: px2rpx(14);
  529. height: px2rpx(14);
  530. }
  531. .status-badge {
  532. display: flex;
  533. align-items: center;
  534. gap: px2rpx(4);
  535. padding: px2rpx(3) px2rpx(8) px2rpx(3) px2rpx(3);
  536. border-radius: px2rpx(12);
  537. }
  538. .filter-select {
  539. background-color: #ffffff;
  540. border: 1px solid #e5e7eb;
  541. border-radius: px2rpx(8);
  542. padding: px2rpx(6);
  543. display: flex;
  544. align-items: center;
  545. min-width: px2rpx(90);
  546. max-width: px2rpx(120);
  547. flex-shrink: 1;
  548. // overflow: hidden;
  549. div {
  550. // width: 100% !important;
  551. }
  552. .uni-select {
  553. width: 100% !important;
  554. padding: 0 !important;
  555. border: none !important;
  556. min-height: px2rpx(14) !important;
  557. }
  558. .uni-select__selector {
  559. min-width: 100px !important;
  560. max-width: 300px !important;
  561. width: max-content !important;
  562. }
  563. .uni-select__selector-item {
  564. white-space: nowrap !important;
  565. padding: 0 12px !important;
  566. }
  567. .uni-select__input-text {
  568. color: #6a6a6a;
  569. font-size: 12px;
  570. margin: 1px 0;
  571. padding: 0 !important;
  572. }
  573. .padding-top-bottom {
  574. padding: 0 !important;
  575. }
  576. }