index.scss 9.6 KB

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