global.scss 13 KB

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