index.scss 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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: 8rpx 15rpx;
  100. height: 80rpx;
  101. padding-bottom: 20rpx;
  102. display: flex;
  103. justify-content: space-between;
  104. align-items: center;
  105. background-color: #fff;
  106. .search-input-wrap {
  107. height: 100%;
  108. --u-search-bg-color: #ffffff !important;
  109. --u-search-border-radius: 8rpx !important;
  110. --u-search-input-height: 80rpx !important;
  111. --u-search-padding: 0 30rpx !important;
  112. --u-search-input-font-size: 28rpx !important;
  113. --u-search-placeholder-color: #999 !important;
  114. border: none !important;
  115. box-shadow: none !important;
  116. }
  117. .search-filter-btn {
  118. margin-left: 20rpx;
  119. width: 60rpx;
  120. height: 60rpx;
  121. z-index: 10;
  122. display: flex;
  123. justify-content: center;
  124. align-items: center;
  125. background-color: #f9fafb;
  126. border: 40rpx;
  127. }
  128. }
  129. /* 分类标签 */
  130. .category-tabs-wrap {
  131. padding: 8rpx 15rpx;
  132. margin-bottom: 20rpx;
  133. background: #ffffff !important;
  134. .u-tabs-custom {
  135. --u-tabs-bg-color: #ffffff !important;
  136. background: #ffffff !important;
  137. --u-tabs-border-bottom: none !important;
  138. --u-tabs-item-padding: 10rpx 20rpx !important;
  139. --u-tabs-item-margin: 0 10rpx !important;
  140. .u-tabs__item--active {
  141. font-weight: bold;
  142. border-bottom: 2rpx solid #007aff !important;
  143. }
  144. .u-tabs__item-text {
  145. font-size: 28rpx !important;
  146. white-space: nowrap;
  147. }
  148. &::-webkit-scrollbar {
  149. display: none;
  150. }
  151. }
  152. }
  153. /* 筛选栏 */
  154. .filter-bar {
  155. padding: 8rpx 15rpx;
  156. background-color: #f9fafb;
  157. display: flex;
  158. align-items: center;
  159. justify-content: space-between;
  160. border-radius: 20rpx;
  161. .sort-btn {
  162. background: transparent;
  163. padding: 0;
  164. margin: 0;
  165. display: flex;
  166. align-items: center;
  167. gap: 6rpx;
  168. .sort-text {
  169. font-size: 24rpx;
  170. color: #686767;
  171. font-weight: 500;
  172. }
  173. .sort-icon {
  174. flex-shrink: 0;
  175. transition: transform 0.3s ease;
  176. &:active {
  177. transform: rotate(180deg);
  178. }
  179. }
  180. }
  181. .price-layout-btn {
  182. display: flex;
  183. justify-content: space-between;
  184. align-items: center;
  185. .price-btn {
  186. background: transparent;
  187. padding: 0;
  188. margin: 0;
  189. display: flex;
  190. align-items: center;
  191. gap: 8rpx;
  192. .price-icon {
  193. flex-shrink: 0;
  194. }
  195. .price-text {
  196. font-size: 22rpx;
  197. color: #1890ff;
  198. font-weight: 500;
  199. }
  200. }
  201. .layout-btn {
  202. background: transparent;
  203. font-size: 22rpx;
  204. color: #333;
  205. height: 60rpx;
  206. display: flex;
  207. align-items: center;
  208. gap: 6rpx;
  209. justify-content: center;
  210. flex-shrink: 0;
  211. margin-left: 10rpx;
  212. .filter-icon {
  213. width: 35rpx;
  214. height: 35rpx;
  215. }
  216. }
  217. .dept-btn {
  218. margin-left: 18rpx;
  219. display: flex;
  220. align-items: center;
  221. gap: 8rpx;
  222. image {
  223. width: 30rpx;
  224. height: 30rpx;
  225. }
  226. .dept-name{
  227. color: #333;
  228. font-size: 24rpx;
  229. }
  230. }
  231. }
  232. }
  233. /* 商品列表 */
  234. .goods-list {
  235. flex: 1;
  236. display: flex;
  237. flex-direction: column;
  238. gap: 10rpx;
  239. background-color: #f9fafb;
  240. overflow: hidden;
  241. height: 100%;
  242. ::v-deep .uni-scroll-view {
  243. height: 100%;
  244. }
  245. .goods-item {
  246. margin: 10rpx 15rpx;
  247. background-color: #fff;
  248. border-radius: 20rpx;
  249. padding: 20rpx;
  250. box-sizing: border-box;
  251. display: flex;
  252. align-items: stretch;
  253. gap: 20rpx;
  254. .u-swipe-action {
  255. flex: 1;
  256. display: flex;
  257. align-items: stretch;
  258. }
  259. .u-swipe-action-item {
  260. flex: 1;
  261. display: flex;
  262. align-items: stretch;
  263. }
  264. .goods-img-container {
  265. position: relative;
  266. flex-shrink: 0;
  267. }
  268. .goods-img {
  269. width: 160rpx;
  270. height: 160rpx;
  271. border-radius: 6rpx;
  272. object-fit: cover;
  273. }
  274. .stock-indicator {
  275. position: absolute;
  276. top: 140rpx;
  277. right: 0;
  278. width: 20rpx;
  279. height: 20rpx;
  280. border-radius: 50%;
  281. border: 2rpx solid #ffffff;
  282. }
  283. .up-indicator {
  284. background-color: #09bb07;
  285. }
  286. .down-indicator {
  287. background-color: #c7d5c7;
  288. }
  289. .goods-info {
  290. flex: 1;
  291. display: flex;
  292. align-items: stretch;
  293. gap: 20rpx;
  294. .info-content {
  295. flex: 1;
  296. line-height: 1.4;
  297. .goods-brand {
  298. font-size: 32rpx;
  299. font-weight: 700;
  300. color: #333333;
  301. display: block;
  302. line-height: 1.2;
  303. display: flex;
  304. align-items: center;
  305. gap: 8rpx;
  306. .code-icon {
  307. width: 28rpx;
  308. height: 22rpx;
  309. }
  310. }
  311. .goods-name {
  312. font-size: 26rpx;
  313. color: #666666;
  314. display: block;
  315. font-weight: 550;
  316. line-height: 1.4;
  317. word-break: break-all;
  318. }
  319. .price-group {
  320. display: grid;
  321. grid-template-columns: repeat(2, 1fr);
  322. .price-item {
  323. display: flex;
  324. flex-direction: column;
  325. justify-content: flex-start;
  326. .price-type {
  327. color: #d1d5db;
  328. font-size: 24rpx;
  329. }
  330. .price {
  331. font-weight: 700;
  332. }
  333. .sales {
  334. color: red;
  335. }
  336. }
  337. }
  338. .others {
  339. margin-top: 20rpx;
  340. display: flex;
  341. align-items: center;
  342. gap: 12rpx;
  343. .other-item {
  344. display: flex;
  345. align-items: center;
  346. justify-content: center;
  347. width: 26rpx;
  348. height: 26rpx;
  349. font-size: 20rpx;
  350. color: #c5c3c3;
  351. background-color: #f5f5f5;
  352. padding: 6rpx;
  353. border-radius: 50%;
  354. &.stock {
  355. background-color: #007aff;
  356. color: #fff;
  357. }
  358. }
  359. }
  360. }
  361. .more {
  362. display: flex;
  363. flex-direction: column;
  364. align-items: flex-end;
  365. justify-content: space-between;
  366. gap: 20rpx;
  367. .goods-stock {
  368. font-size: 24rpx;
  369. color: #666666;
  370. align-self: flex-end;
  371. flex-shrink: 0;
  372. padding-left: 10rpx;
  373. }
  374. }
  375. }
  376. /* 更多信息区域 */
  377. .more-info-container {
  378. margin-top: 20rpx;
  379. border-top: 1px solid #f0f0f0;
  380. padding-top: 20rpx;
  381. .more-info-header {
  382. display: flex;
  383. align-items: center;
  384. justify-content: center;
  385. cursor: pointer;
  386. .more-info-title {
  387. font-size: 28rpx;
  388. color: #666666;
  389. margin-right: 10rpx;
  390. }
  391. }
  392. .more-info-content {
  393. padding: 10rpx 0;
  394. display: grid;
  395. grid-template-columns: repeat(2, 1fr);
  396. gap: 20rpx;
  397. .info-row {
  398. display: flex;
  399. align-items: center;
  400. margin-bottom: 10rpx;
  401. .info-label {
  402. font-size: 26rpx;
  403. color: #999999;
  404. min-width: 140rpx;
  405. }
  406. .info-value {
  407. font-size: 26rpx;
  408. color: #333333;
  409. flex: 1;
  410. }
  411. }
  412. }
  413. }
  414. }
  415. }
  416. /* 更多信息展开收起动画 */
  417. .more-info-enter-active,
  418. .more-info-leave-active {
  419. transition: all 0.3s ease;
  420. max-height: 500rpx;
  421. opacity: 1;
  422. overflow: hidden;
  423. }
  424. .more-info-enter,
  425. .more-info-leave-to {
  426. max-height: 0;
  427. opacity: 0;
  428. padding: 0;
  429. }
  430. /* 添加按钮 */
  431. .add-button {
  432. position: fixed;
  433. bottom: 150rpx;
  434. right: 20rpx;
  435. width: 112rpx;
  436. height: 112rpx;
  437. background-color: #1f2937;
  438. border-radius: 50%;
  439. display: flex;
  440. align-items: center;
  441. justify-content: center;
  442. box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  443. z-index: 20;
  444. cursor: pointer;
  445. transition: all 0.3s ease;
  446. &:active {
  447. transform: scale(0.95);
  448. }
  449. }