index.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. /* 页面容器 */
  2. .page {
  3. width: 100%;
  4. height: 100vh;
  5. background-color: #fff;
  6. display: flex;
  7. flex-direction: column;
  8. }
  9. .page-container {
  10. flex: 1;
  11. display: flex;
  12. flex-direction: column;
  13. background-color: #f9fafb;
  14. padding-bottom: 20rpx;
  15. overflow: hidden;
  16. }
  17. .nav-bar {
  18. border-bottom: 1px solid #f7f6f6 !important;
  19. }
  20. /* 总资产区域 */
  21. .asset-header {
  22. width: 100%;
  23. background-color: #ffffff;
  24. border-radius: 20rpx;
  25. padding: 25rpx 20rpx;
  26. padding-bottom: 20rpx;
  27. display: flex;
  28. justify-content: space-between;
  29. align-items: flex-end;
  30. box-sizing: border-box;
  31. .asset-text-wrap {
  32. flex: 1;
  33. }
  34. .btn-group {
  35. display: flex;
  36. align-items: center;
  37. justify-content: flex-end;
  38. gap: 10rpx;
  39. }
  40. .asset-title-con {
  41. display: flex;
  42. align-items: center;
  43. justify-content: flex-start;
  44. margin-bottom: 12rpx;
  45. .asset-title {
  46. font-size: 26rpx;
  47. color: #999999;
  48. display: block;
  49. font-weight: 500;
  50. }
  51. }
  52. .asset-value {
  53. font-size: 44rpx;
  54. color: #333333;
  55. display: block;
  56. font-weight: 600;
  57. letter-spacing: 2rpx;
  58. }
  59. }
  60. /* 数据卡片 */
  61. .data-cards {
  62. display: flex;
  63. justify-content: space-between;
  64. padding-bottom: 20rpx;
  65. background-color: #fff;
  66. padding: 8rpx 15rpx;
  67. .card-item {
  68. flex: 1;
  69. text-align: center;
  70. background: #f9fafb;
  71. padding: 24rpx 0;
  72. margin: 0 10rpx;
  73. border-radius: 24rpx;
  74. .card-label {
  75. font-size: 26rpx;
  76. color: #666;
  77. display: block;
  78. margin-bottom: 8rpx;
  79. }
  80. .card-value {
  81. font-size: 36rpx;
  82. font-weight: 700;
  83. color: #333;
  84. display: block;
  85. &.green {
  86. color: #09bb07;
  87. }
  88. }
  89. &:nth-of-type(1) {
  90. margin-left: 0;
  91. }
  92. &:nth-last-of-type(1) {
  93. margin-right: 0;
  94. }
  95. }
  96. }
  97. /* 搜索框区域 */
  98. .search-wrapper {
  99. padding: 0 15rpx;
  100. height: 80rpx;
  101. display: flex;
  102. justify-content: space-between;
  103. align-items: center;
  104. background-color: #fff;
  105. .search-input-wrap {
  106. height: 100%;
  107. --u-search-bg-color: #ffffff !important;
  108. --u-search-border-radius: 8rpx !important;
  109. --u-search-input-height: 80rpx !important;
  110. --u-search-padding: 0 30rpx !important;
  111. --u-search-input-font-size: 28rpx !important;
  112. --u-search-placeholder-color: #999 !important;
  113. border: none !important;
  114. box-shadow: none !important;
  115. }
  116. .search-filter-btn {
  117. margin-left: 20rpx;
  118. width: 60rpx;
  119. height: 60rpx;
  120. z-index: 10;
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. background-color: #f9fafb;
  125. border: 40rpx;
  126. }
  127. }
  128. /* 分类标签 */
  129. .category-tabs-wrap {
  130. padding: 0 15rpx;
  131. background: #ffffff !important;
  132. .u-tabs-custom {
  133. --u-tabs-bg-color: #ffffff !important;
  134. background: #ffffff !important;
  135. --u-tabs-border-bottom: none !important;
  136. --u-tabs-item-padding: 10rpx 20rpx !important;
  137. --u-tabs-item-margin: 0 10rpx !important;
  138. .u-tabs__item--active {
  139. font-weight: bold;
  140. border-bottom: 2rpx solid #007aff !important;
  141. }
  142. .u-tabs__item-text {
  143. font-size: 28rpx !important;
  144. white-space: nowrap;
  145. }
  146. &::-webkit-scrollbar {
  147. display: none;
  148. }
  149. }
  150. ::v-deep .u-tabs__wrapper__nav__item{
  151. height: 70rpx !important;
  152. }
  153. }
  154. ::v-deep .u-notice-bar{
  155. flex:auto;
  156. }
  157. /* 筛选栏 */
  158. .filter-bar {
  159. padding: 8rpx 15rpx;
  160. background-color: #f9fafb;
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. border-radius: 20rpx;
  165. .sort-btn {
  166. background: transparent;
  167. padding: 0;
  168. margin: 0;
  169. display: flex;
  170. align-items: center;
  171. gap: 6rpx;
  172. .sort-text {
  173. font-size: 24rpx;
  174. color: #686767;
  175. font-weight: 500;
  176. }
  177. .sort-icon {
  178. flex-shrink: 0;
  179. transition: transform 0.3s ease;
  180. &:active {
  181. transform: rotate(180deg);
  182. }
  183. }
  184. }
  185. .price-layout-btn {
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. .price-btn {
  190. background: transparent;
  191. padding: 0;
  192. margin: 0;
  193. display: flex;
  194. align-items: center;
  195. gap: 8rpx;
  196. .price-icon {
  197. flex-shrink: 0;
  198. }
  199. .price-text {
  200. font-size: 22rpx;
  201. color: #1890ff;
  202. font-weight: 500;
  203. }
  204. }
  205. .layout-btn {
  206. background: transparent;
  207. font-size: 22rpx;
  208. color: #333;
  209. height: 60rpx;
  210. display: flex;
  211. align-items: center;
  212. gap: 6rpx;
  213. justify-content: center;
  214. flex-shrink: 0;
  215. margin-left: 10rpx;
  216. .filter-icon {
  217. width: 35rpx;
  218. height: 35rpx;
  219. }
  220. }
  221. .dept-btn {
  222. margin-left: 18rpx;
  223. display: flex;
  224. align-items: center;
  225. gap: 8rpx;
  226. image {
  227. width: 30rpx;
  228. height: 30rpx;
  229. }
  230. .dept-name{
  231. color: #333;
  232. font-size: 24rpx;
  233. }
  234. .sort-text {
  235. font-size: 22rpx;
  236. color: #333;
  237. }
  238. }
  239. }
  240. }
  241. /* 商品列表 */
  242. .goods-list {
  243. flex: 1;
  244. display: flex;
  245. flex-direction: column;
  246. gap: 10rpx;
  247. background-color: #f9fafb;
  248. overflow: hidden;
  249. height: 100%;
  250. ::v-deep .uni-scroll-view {
  251. height: 100%;
  252. }
  253. .goods-item {
  254. margin: 10rpx 15rpx;
  255. background-color: #fff;
  256. border-radius: 20rpx;
  257. padding: 20rpx;
  258. box-sizing: border-box;
  259. display: flex;
  260. align-items: stretch;
  261. gap: 20rpx;
  262. overflow: hidden;
  263. .u-swipe-action,
  264. .up-swipe-action {
  265. flex: 1;
  266. display: flex;
  267. align-items: stretch;
  268. overflow: hidden;
  269. min-width: 0;
  270. }
  271. .u-swipe-action-item,
  272. .up-swipe-action-item {
  273. flex: 1;
  274. display: flex;
  275. align-items: stretch;
  276. overflow: hidden;
  277. min-width: 0;
  278. }
  279. /* 左滑内容区必须铺满并盖住右侧按钮,默认只显示内容,左滑才露出删除 */
  280. ::v-deep .u-swipe-action-item__content {
  281. width: 100% !important;
  282. min-width: 100%;
  283. flex: 1 1 100%;
  284. background-color: #fff;
  285. box-sizing: border-box;
  286. position: relative;
  287. z-index: 10;
  288. transform: translateX(0);
  289. }
  290. .goods-img-container {
  291. position: relative;
  292. flex-shrink: 0;
  293. }
  294. .goods-img {
  295. width: 160rpx;
  296. height: 160rpx;
  297. border-radius: 6rpx;
  298. object-fit: cover;
  299. }
  300. .stock-indicator {
  301. position: absolute;
  302. top: 140rpx;
  303. right: 0;
  304. width: 20rpx;
  305. height: 20rpx;
  306. border-radius: 50%;
  307. border: 2rpx solid #ffffff;
  308. }
  309. .up-indicator {
  310. background-color: #09bb07;
  311. }
  312. .down-indicator {
  313. background-color: #c7d5c7;
  314. }
  315. .goods-info {
  316. flex: 1;
  317. display: flex;
  318. align-items: stretch;
  319. gap: 20rpx;
  320. .info-content {
  321. flex: 1;
  322. line-height: 1.4;
  323. .goods-brand {
  324. font-size: 32rpx;
  325. font-weight: 700;
  326. color: #333333;
  327. display: block;
  328. line-height: 1.2;
  329. display: flex;
  330. align-items: center;
  331. gap: 8rpx;
  332. .code-icon {
  333. width: 28rpx;
  334. height: 22rpx;
  335. }
  336. }
  337. .goods-name {
  338. font-size: 26rpx;
  339. color: #666666;
  340. display: block;
  341. font-weight: 550;
  342. line-height: 1.4;
  343. word-break: break-all;
  344. }
  345. .price-group {
  346. display: grid;
  347. grid-template-columns: repeat(2, 1fr);
  348. .price-item {
  349. display: flex;
  350. flex-direction: column;
  351. justify-content: flex-start;
  352. .price-type {
  353. color: #d1d5db;
  354. font-size: 24rpx;
  355. }
  356. .price {
  357. font-weight: 700;
  358. }
  359. .sales {
  360. color: red;
  361. }
  362. }
  363. }
  364. .others {
  365. margin-top: 20rpx;
  366. display: flex;
  367. align-items: center;
  368. gap: 12rpx;
  369. .other-item {
  370. display: flex;
  371. align-items: center;
  372. justify-content: center;
  373. width: 26rpx;
  374. height: 26rpx;
  375. font-size: 20rpx;
  376. color: #c5c3c3;
  377. background-color: #f5f5f5;
  378. padding: 6rpx;
  379. border-radius: 50%;
  380. &.stock {
  381. background-color: #007aff;
  382. color: #fff;
  383. }
  384. }
  385. }
  386. }
  387. .more {
  388. display: flex;
  389. flex-direction: column;
  390. align-items: flex-end;
  391. justify-content: space-between;
  392. gap: 20rpx;
  393. .goods-stock {
  394. font-size: 24rpx;
  395. color: #666666;
  396. align-self: flex-end;
  397. flex-shrink: 0;
  398. padding-left: 10rpx;
  399. }
  400. }
  401. }
  402. /* 更多信息区域 */
  403. .more-info-container {
  404. margin-top: 20rpx;
  405. border-top: 1px solid #f0f0f0;
  406. padding-top: 20rpx;
  407. .more-info-header {
  408. display: flex;
  409. align-items: center;
  410. justify-content: center;
  411. cursor: pointer;
  412. .more-info-title {
  413. font-size: 28rpx;
  414. color: #666666;
  415. margin-right: 10rpx;
  416. }
  417. }
  418. .more-info-content {
  419. padding: 10rpx 0;
  420. display: grid;
  421. grid-template-columns: repeat(2, 1fr);
  422. gap: 20rpx;
  423. .info-row {
  424. display: flex;
  425. align-items: center;
  426. margin-bottom: 10rpx;
  427. .info-label {
  428. font-size: 26rpx;
  429. color: #999999;
  430. min-width: 140rpx;
  431. }
  432. .info-value {
  433. font-size: 26rpx;
  434. color: #333333;
  435. flex: 1;
  436. }
  437. }
  438. }
  439. }
  440. }
  441. }
  442. /* 更多信息展开收起动画 */
  443. .more-info-enter-active,
  444. .more-info-leave-active {
  445. transition: all 0.3s ease;
  446. max-height: 500rpx;
  447. opacity: 1;
  448. overflow: hidden;
  449. }
  450. .more-info-enter,
  451. .more-info-leave-to {
  452. max-height: 0;
  453. opacity: 0;
  454. padding: 0;
  455. }
  456. /* 添加按钮 */
  457. .add-button {
  458. position: fixed;
  459. bottom: 150rpx;
  460. right: 20rpx;
  461. width: 112rpx;
  462. height: 112rpx;
  463. background-color: #1f2937;
  464. border-radius: 50%;
  465. display: flex;
  466. align-items: center;
  467. justify-content: center;
  468. box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  469. z-index: 20;
  470. cursor: pointer;
  471. transition: all 0.3s ease;
  472. &:active {
  473. transform: scale(0.95);
  474. }
  475. }
  476. .custom-notice-bar {
  477. flex: none;
  478. }