global.scss 11 KB

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