index.scss 9.7 KB

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