index.scss 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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. image {
  220. width: 30rpx;
  221. height: 30rpx;
  222. }
  223. }
  224. }
  225. }
  226. /* 商品列表 */
  227. .goods-list {
  228. flex: 1;
  229. display: flex;
  230. flex-direction: column;
  231. gap: 10rpx;
  232. background-color: #f9fafb;
  233. overflow: hidden;
  234. height: 100%;
  235. ::v-deep .uni-scroll-view {
  236. height: 100%;
  237. }
  238. .goods-item {
  239. margin: 10rpx 15rpx;
  240. background-color: #fff;
  241. border-radius: 20rpx;
  242. padding: 20rpx;
  243. box-sizing: border-box;
  244. display: flex;
  245. align-items: stretch;
  246. gap: 20rpx;
  247. .u-swipe-action {
  248. flex: 1;
  249. display: flex;
  250. align-items: stretch;
  251. }
  252. .u-swipe-action-item {
  253. flex: 1;
  254. display: flex;
  255. align-items: stretch;
  256. }
  257. .goods-img-container {
  258. position: relative;
  259. flex-shrink: 0;
  260. }
  261. .goods-img {
  262. width: 160rpx;
  263. height: 160rpx;
  264. border-radius: 6rpx;
  265. object-fit: cover;
  266. }
  267. .stock-indicator {
  268. position: absolute;
  269. top: 140rpx;
  270. right: 0;
  271. width: 20rpx;
  272. height: 20rpx;
  273. border-radius: 50%;
  274. border: 2rpx solid #ffffff;
  275. }
  276. .up-indicator {
  277. background-color: #09bb07;
  278. }
  279. .down-indicator {
  280. background-color: #c7d5c7;
  281. }
  282. .goods-info {
  283. flex: 1;
  284. display: flex;
  285. align-items: stretch;
  286. gap: 20rpx;
  287. .info-content {
  288. flex: 1;
  289. line-height: 1.4;
  290. .goods-brand {
  291. font-size: 32rpx;
  292. font-weight: 700;
  293. color: #333333;
  294. display: block;
  295. line-height: 1.2;
  296. display: flex;
  297. align-items: center;
  298. gap: 8rpx;
  299. .code-icon {
  300. width: 28rpx;
  301. height: 22rpx;
  302. }
  303. }
  304. .goods-name {
  305. font-size: 26rpx;
  306. color: #666666;
  307. display: block;
  308. font-weight: 550;
  309. line-height: 1.4;
  310. word-break: break-all;
  311. }
  312. .price-group {
  313. display: grid;
  314. grid-template-columns: repeat(2, 1fr);
  315. .price-item {
  316. display: flex;
  317. flex-direction: column;
  318. justify-content: flex-start;
  319. .price-type {
  320. color: #d1d5db;
  321. font-size: 24rpx;
  322. }
  323. .price {
  324. font-weight: 700;
  325. }
  326. .sales {
  327. color: red;
  328. }
  329. }
  330. }
  331. .others {
  332. margin-top: 20rpx;
  333. display: flex;
  334. align-items: center;
  335. gap: 12rpx;
  336. .other-item {
  337. display: flex;
  338. align-items: center;
  339. justify-content: center;
  340. width: 26rpx;
  341. height: 26rpx;
  342. font-size: 20rpx;
  343. color: #c5c3c3;
  344. background-color: #f5f5f5;
  345. padding: 6rpx;
  346. border-radius: 50%;
  347. &.stock {
  348. background-color: #007aff;
  349. color: #fff;
  350. }
  351. }
  352. }
  353. }
  354. .more {
  355. display: flex;
  356. flex-direction: column;
  357. align-items: flex-end;
  358. justify-content: space-between;
  359. gap: 20rpx;
  360. .goods-stock {
  361. font-size: 24rpx;
  362. color: #666666;
  363. align-self: flex-end;
  364. flex-shrink: 0;
  365. padding-left: 10rpx;
  366. }
  367. }
  368. }
  369. /* 更多信息区域 */
  370. .more-info-container {
  371. margin-top: 20rpx;
  372. border-top: 1px solid #f0f0f0;
  373. padding-top: 20rpx;
  374. .more-info-header {
  375. display: flex;
  376. align-items: center;
  377. justify-content: center;
  378. cursor: pointer;
  379. .more-info-title {
  380. font-size: 28rpx;
  381. color: #666666;
  382. margin-right: 10rpx;
  383. }
  384. }
  385. .more-info-content {
  386. padding: 10rpx 0;
  387. display: grid;
  388. grid-template-columns: repeat(2, 1fr);
  389. gap: 20rpx;
  390. .info-row {
  391. display: flex;
  392. align-items: center;
  393. margin-bottom: 10rpx;
  394. .info-label {
  395. font-size: 26rpx;
  396. color: #999999;
  397. min-width: 140rpx;
  398. }
  399. .info-value {
  400. font-size: 26rpx;
  401. color: #333333;
  402. flex: 1;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. }
  409. /* 更多信息展开收起动画 */
  410. .more-info-enter-active,
  411. .more-info-leave-active {
  412. transition: all 0.3s ease;
  413. max-height: 500rpx;
  414. opacity: 1;
  415. overflow: hidden;
  416. }
  417. .more-info-enter,
  418. .more-info-leave-to {
  419. max-height: 0;
  420. opacity: 0;
  421. padding: 0;
  422. }
  423. /* 添加按钮 */
  424. .add-button {
  425. position: fixed;
  426. bottom: 150rpx;
  427. right: 20rpx;
  428. width: 112rpx;
  429. height: 112rpx;
  430. background-color: #1f2937;
  431. border-radius: 50%;
  432. display: flex;
  433. align-items: center;
  434. justify-content: center;
  435. box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  436. z-index: 20;
  437. cursor: pointer;
  438. transition: all 0.3s ease;
  439. &:active {
  440. transform: scale(0.95);
  441. }
  442. }