与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

776 lines
13 KiB

  1. .personal-center {
  2. min-height: 100vh;
  3. background: linear-gradient(180deg, #86D8D0 0%, #a9dfda 30%, #cfe9e7 60%, #ECF8F7 90%);
  4. padding-bottom: 40rpx;
  5. }
  6. /* 淡入动画 */
  7. .fade-in {
  8. animation: fadeIn 0.6s ease forwards;
  9. opacity: 0;
  10. transform: translateY(20rpx);
  11. }
  12. .fade-in-delay-1 {
  13. animation: fadeIn 0.6s 0.2s ease forwards;
  14. opacity: 0;
  15. transform: translateY(20rpx);
  16. }
  17. .fade-in-delay-2 {
  18. animation: fadeIn 0.6s 0.4s ease forwards;
  19. opacity: 0;
  20. transform: translateY(20rpx);
  21. }
  22. @keyframes fadeIn {
  23. to {
  24. opacity: 1;
  25. transform: translateY(0);
  26. }
  27. }
  28. /* 用户信息区域 */
  29. .user-section {
  30. padding: 40rpx 30rpx 30rpx;
  31. }
  32. .user-card {
  33. background: white;
  34. border-radius: 24rpx;
  35. padding: 40rpx 30rpx;
  36. box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.08);
  37. display: flex;
  38. align-items: center;
  39. transition: all 0.3s ease;
  40. }
  41. .user-card:active {
  42. transform: scale(0.99);
  43. box-shadow: 0 5rpx 20rpx rgba(0, 0, 0, 0.05);
  44. }
  45. .avatar-btn {
  46. position: relative;
  47. width: 140rpx;
  48. height: 140rpx;
  49. margin-right: 30rpx;
  50. flex-shrink: 0;
  51. padding: 0;
  52. background: transparent;
  53. border: none;
  54. border-radius: 50%;
  55. overflow: visible;
  56. }
  57. .avatar-btn::after {
  58. border: none;
  59. }
  60. .avatar {
  61. width: 100%;
  62. height: 100%;
  63. border-radius: 50%;
  64. border: 4rpx solid white;
  65. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
  66. transition: all 0.3s ease;
  67. }
  68. .avatar-btn:active .avatar {
  69. transform: scale(0.95);
  70. }
  71. .avatar-edit-tip {
  72. position: absolute;
  73. bottom: -10rpx;
  74. left: 50%;
  75. transform: translateX(-50%);
  76. background: rgba(0, 0, 0, 0.7);
  77. color: white;
  78. font-size: 20rpx;
  79. padding: 4rpx 12rpx;
  80. border-radius: 20rpx;
  81. white-space: nowrap;
  82. opacity: 0;
  83. transition: all 0.3s ease;
  84. }
  85. .avatar-btn:hover .avatar-edit-tip {
  86. opacity: 1;
  87. bottom: -20rpx;
  88. }
  89. .user-info {
  90. flex: 1;
  91. }
  92. .nickname-section {
  93. display: flex;
  94. align-items: center;
  95. margin-bottom: 16rpx;
  96. padding: 8rpx 0;
  97. border-radius: 8rpx;
  98. transition: all 0.3s ease;
  99. }
  100. .nickname-section:active {
  101. background: rgba(0, 0, 0, 0.05);
  102. }
  103. .nickname {
  104. font-size: 36rpx;
  105. font-weight: 700;
  106. color: #1e293b;
  107. margin-right: 20rpx;
  108. max-width: 300rpx;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. white-space: nowrap;
  112. }
  113. .nickname-section image {
  114. width: 26rpx;
  115. height: 26rpx;
  116. opacity: 0.6;
  117. transition: all 0.3s ease;
  118. }
  119. .nickname-section:active image {
  120. opacity: 0.8;
  121. transform: scale(1.1);
  122. }
  123. .user-meta {
  124. display: flex;
  125. align-items: center;
  126. flex-wrap: wrap;
  127. gap: 16rpx;
  128. }
  129. .auth-tag {
  130. display: flex;
  131. align-items: center;
  132. padding: 6rpx 16rpx;
  133. background: #fef3c7;
  134. border-radius: 20rpx;
  135. transition: all 0.3s ease;
  136. }
  137. .auth-tag.verified {
  138. background: #d1fae5;
  139. }
  140. .auth-tag:active {
  141. transform: scale(0.95);
  142. opacity: 0.8;
  143. }
  144. .auth-tag text {
  145. font-size: 24rpx;
  146. color: #92400e;
  147. font-weight: 500;
  148. }
  149. .auth-tag.verified text {
  150. color: #065f46;
  151. }
  152. /* 卡片样式 */
  153. .section-card {
  154. background: white;
  155. margin: 0 30rpx 30rpx;
  156. border-radius: 20rpx;
  157. overflow: hidden;
  158. box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
  159. }
  160. .section-header {
  161. padding: 30rpx 30rpx 20rpx;
  162. border-bottom: 1rpx solid #f1f5f9;
  163. display: flex;
  164. align-items: center;
  165. justify-content: space-between;
  166. }
  167. .section-title {
  168. font-size: 32rpx;
  169. font-weight: 600;
  170. color: #1e293b;
  171. position: relative;
  172. padding-left: 20rpx;
  173. }
  174. .section-title::before {
  175. content: '';
  176. position: absolute;
  177. left: 0;
  178. top: 50%;
  179. transform: translateY(-50%);
  180. width: 6rpx;
  181. height: 24rpx;
  182. background: linear-gradient(135deg, #667eea, #764ba2);
  183. border-radius: 3rpx;
  184. }
  185. /* 消息行 */
  186. .message-row {
  187. display: flex;
  188. align-items: center;
  189. padding: 30rpx;
  190. }
  191. .message-item {
  192. flex: 1;
  193. display: flex;
  194. flex-direction: column;
  195. align-items: center;
  196. transition: all 0.3s ease;
  197. }
  198. .message-item:active {
  199. transform: scale(0.95);
  200. opacity: 0.8;
  201. }
  202. .message-icon-wrapper {
  203. position: relative;
  204. width: 80rpx;
  205. height: 80rpx;
  206. margin-bottom: 16rpx;
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. background: #f8fafc;
  211. border-radius: 50%;
  212. border: 1rpx solid #e2e8f0;
  213. transition: all 0.3s ease;
  214. }
  215. .message-item:active .message-icon-wrapper {
  216. background: #e2e8f0;
  217. }
  218. .message-icon {
  219. width: 60rpx;
  220. height: 60rpx;
  221. }
  222. /* 数字气泡 - 定位在顶部 */
  223. .badge {
  224. position: absolute;
  225. top: -10rpx;
  226. right: -10rpx;
  227. display: flex;
  228. align-items: center;
  229. justify-content: center;
  230. z-index: 2;
  231. }
  232. .badge-num {
  233. background: linear-gradient(135deg, #ff6b6b, #ee5253);
  234. border-radius: 36rpx;
  235. color: white;
  236. font-size: 22rpx;
  237. font-weight: 600;
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. padding: 0 10rpx;
  242. box-shadow: 0 4rpx 8rpx rgba(238, 82, 83, 0.3);
  243. }
  244. /* 动画效果:跳动+呼吸 */
  245. .animation-badge {
  246. animation: badgeBounce 2.5s ease-in-out infinite;
  247. }
  248. @keyframes badgeBounce {
  249. 0%, 100% {
  250. transform: scale(1);
  251. }
  252. 30% {
  253. transform: scale(1.2);
  254. }
  255. 50% {
  256. transform: scale(1.1);
  257. }
  258. 70% {
  259. transform: scale(1.15);
  260. }
  261. }
  262. /* 可选的小红点效果(如果有需要可以保留,当前用的是数字) */
  263. .badge-dot {
  264. display: none; /* 隐藏,用数字替代 */
  265. }
  266. .message-label {
  267. font-size: 26rpx;
  268. color: #475569;
  269. font-weight: 500;
  270. }
  271. .divider {
  272. width: 1rpx;
  273. height: 60rpx;
  274. background: #e2e8f0;
  275. margin: 0 40rpx;
  276. }
  277. /* 功能列表 */
  278. .function-list {
  279. padding: 0 30rpx 20rpx;
  280. }
  281. .function-item {
  282. display: flex;
  283. align-items: center;
  284. justify-content: space-between;
  285. padding: 30rpx 0;
  286. border-bottom: 1rpx solid #f1f5f9;
  287. transition: all 0.3s ease;
  288. }
  289. .function-item:last-child {
  290. border-bottom: none;
  291. }
  292. .function-item:active {
  293. background: #f8fafc;
  294. border-radius: 12rpx;
  295. }
  296. .item-left {
  297. display: flex;
  298. align-items: center;
  299. }
  300. .item-icon {
  301. width: 40rpx;
  302. height: 40rpx;
  303. margin-right: 20rpx;
  304. }
  305. .item-title {
  306. font-size: 30rpx;
  307. color: #1e293b;
  308. font-weight: 500;
  309. }
  310. .logout-title {
  311. color: #ef4444;
  312. }
  313. .item-status {
  314. font-size: 26rpx;
  315. color: #f59e0b;
  316. font-weight: 500;
  317. }
  318. .item-status.verified {
  319. color: #10b981;
  320. }
  321. /* 反馈弹窗 */
  322. .feedback-modal {
  323. position: fixed;
  324. top: 0;
  325. left: 0;
  326. width: 100%;
  327. height: 100%;
  328. z-index: 1000;
  329. display: flex;
  330. align-items: center;
  331. justify-content: center;
  332. opacity: 0;
  333. visibility: hidden;
  334. transition: all 0.3s ease;
  335. pointer-events: none; /* 防止未显示时误触 */
  336. }
  337. .feedback-modal.show {
  338. opacity: 1;
  339. visibility: visible;
  340. pointer-events: auto;
  341. }
  342. .modal-mask {
  343. position: absolute;
  344. top: 0;
  345. left: 0;
  346. width: 100%;
  347. height: 100%;
  348. background: rgba(0, 0, 0, 0.5);
  349. backdrop-filter: blur(4rpx);
  350. }
  351. .modal-content {
  352. position: relative;
  353. width: 90%;
  354. max-width: 660rpx;
  355. background: white;
  356. border-radius: 24rpx;
  357. overflow: hidden;
  358. box-shadow: 0 30rpx 80rpx rgba(0, 0, 0, 0.2);
  359. transform: translateY(100rpx);
  360. transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  361. }
  362. .feedback-modal.show .modal-content {
  363. transform: translateY(0);
  364. }
  365. .modal-header {
  366. padding: 40rpx 40rpx 20rpx;
  367. border-bottom: 1rpx solid #f1f5f9;
  368. display: flex;
  369. justify-content: space-between;
  370. align-items: center;
  371. }
  372. .modal-title {
  373. font-size: 36rpx;
  374. font-weight: 700;
  375. color: #1e293b;
  376. }
  377. .modal-close {
  378. width: 40rpx;
  379. height: 40rpx;
  380. display: flex;
  381. align-items: center;
  382. justify-content: center;
  383. border-radius: 50%;
  384. transition: all 0.3s ease;
  385. }
  386. .modal-close:active {
  387. background: #e2e8f0;
  388. transform: scale(0.9);
  389. }
  390. .modal-close image {
  391. width: 36rpx;
  392. height: 36rpx;
  393. filter: brightness(0%);
  394. }
  395. /* 反馈输入框 - iOS修复 */
  396. .modal-body {
  397. padding: 40rpx;
  398. }
  399. .feedback-input {
  400. width: 100%;
  401. min-height: 240rpx;
  402. padding: 24rpx;
  403. box-sizing: border-box;
  404. background: #f8fafc;
  405. border: 2rpx solid #e2e8f0;
  406. border-radius: 16rpx;
  407. font-size: 28rpx;
  408. line-height: 1.5;
  409. color: #1e293b;
  410. transition: all 0.3s ease;
  411. -webkit-user-select: auto; /* iOS修复 */
  412. }
  413. .feedback-input:focus {
  414. border-color: #667eea;
  415. background: white;
  416. box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
  417. }
  418. .feedback-input[disabled] {
  419. opacity: 0.8; /* 禁用状态样式 */
  420. }
  421. .placeholder {
  422. color: #94a3b8;
  423. }
  424. .char-count {
  425. text-align: right;
  426. margin-top: 12rpx;
  427. font-size: 24rpx;
  428. display: flex;
  429. justify-content: flex-end;
  430. align-items: baseline;
  431. gap: 4rpx;
  432. }
  433. .char-count .current {
  434. color: #1e293b;
  435. font-weight: 500;
  436. }
  437. .char-count .total {
  438. color: #94a3b8;
  439. }
  440. .modal-footer {
  441. padding: 0 40rpx 40rpx;
  442. }
  443. .submit-btn {
  444. width: 100%;
  445. padding: 5rpx 0;
  446. background: #e2e8f0;
  447. border-radius: 44rpx;
  448. font-size: 32rpx;
  449. font-weight: 600;
  450. color: #94a3b8;
  451. border: none;
  452. transition: all 0.3s ease;
  453. }
  454. .submit-btn.active {
  455. background: linear-gradient(135deg, #667eea, #764ba2);
  456. color: white;
  457. box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.3);
  458. }
  459. .submit-btn.active:active {
  460. transform: scale(0.98);
  461. opacity: 0.9;
  462. }
  463. .submit-btn[disabled] {
  464. opacity: 0.6;
  465. }
  466. /* 昵称修改弹窗 */
  467. .nickname-modal {
  468. position: fixed;
  469. top: 0;
  470. left: 0;
  471. width: 100%;
  472. height: 100%;
  473. z-index: 1000;
  474. display: flex;
  475. align-items: center;
  476. justify-content: center;
  477. opacity: 0;
  478. visibility: hidden;
  479. transition: all 0.3s ease;
  480. pointer-events: none;
  481. }
  482. .nickname-modal.show {
  483. opacity: 1;
  484. visibility: visible;
  485. pointer-events: auto;
  486. }
  487. .nickname-modal .modal-content {
  488. width: 600rpx;
  489. background: white;
  490. border-radius: 20rpx;
  491. overflow: hidden;
  492. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  493. transform: scale(0.8);
  494. transition: all 0.3s ease;
  495. }
  496. .nickname-modal.show .modal-content {
  497. transform: scale(1);
  498. }
  499. .nickname-modal .modal-header {
  500. padding: 40rpx 40rpx 20rpx;
  501. border-bottom: 1rpx solid #f1f5f9;
  502. }
  503. .nickname-modal .modal-body {
  504. padding: 40rpx;
  505. }
  506. .nickname-input {
  507. width: 100%;
  508. height: 80rpx;
  509. background: #f8fafc;
  510. border: 2rpx solid #e2e8f0;
  511. border-radius: 12rpx;
  512. font-size: 28rpx;
  513. color: #1e293b;
  514. text-align: center;
  515. transition: all 0.3s ease;
  516. }
  517. .nickname-input:focus {
  518. border-color: #667eea;
  519. background: white;
  520. box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
  521. }
  522. .input-tip {
  523. display: block;
  524. font-size: 24rpx;
  525. color: #94a3b8;
  526. text-align: center;
  527. margin-top: 16rpx;
  528. }
  529. .nickname-modal .modal-footer {
  530. padding: 0 40rpx 40rpx;
  531. display: flex;
  532. gap: 20rpx;
  533. }
  534. .cancel-btn,
  535. .confirm-btn {
  536. flex: 1;
  537. padding: 5rpx 0;
  538. border-radius: 40rpx;
  539. font-size: 28rpx;
  540. font-weight: 500;
  541. transition: all 0.3s ease;
  542. border: none;
  543. }
  544. .cancel-btn {
  545. background: #f1f5f9;
  546. color: #64748b;
  547. }
  548. .cancel-btn::after{
  549. border: none;
  550. }
  551. .cancel-btn:active {
  552. background: #e2e8f0;
  553. }
  554. .confirm-btn {
  555. background: linear-gradient(135deg, #667eea, #764ba2);
  556. color: white;
  557. box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
  558. }
  559. .confirm-btn:active {
  560. transform: scale(0.98);
  561. opacity: 0.9;
  562. }
  563. /* 退出登录确认弹窗 */
  564. .logout-modal {
  565. position: fixed;
  566. top: 0;
  567. left: 0;
  568. width: 100%;
  569. height: 100%;
  570. z-index: 1000;
  571. display: flex;
  572. align-items: center;
  573. justify-content: center;
  574. opacity: 0;
  575. visibility: hidden;
  576. transition: all 0.3s ease;
  577. pointer-events: none;
  578. }
  579. .logout-modal.show {
  580. opacity: 1;
  581. visibility: visible;
  582. pointer-events: auto;
  583. }
  584. .logout-modal .modal-content {
  585. width: 600rpx;
  586. background: white;
  587. border-radius: 24rpx;
  588. overflow: hidden;
  589. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  590. transform: scale(0.8);
  591. transition: all 0.3s ease;
  592. }
  593. .logout-modal.show .modal-content {
  594. transform: scale(1);
  595. }
  596. .logout-modal-body {
  597. padding: 60rpx 40rpx 40rpx;
  598. text-align: center;
  599. }
  600. .logout-title {
  601. font-weight: 700;
  602. color: #1e293b;
  603. display: block;
  604. }
  605. .logout-desc {
  606. font-size: 28rpx;
  607. color: #64748b;
  608. line-height: 1.5;
  609. }
  610. .logout-modal-footer {
  611. padding: 0 40rpx 40rpx;
  612. display: flex;
  613. gap: 20rpx;
  614. }
  615. .logout-cancel-btn,
  616. .logout-confirm-btn {
  617. flex: 1;
  618. border-radius: 44rpx;
  619. font-size: 30rpx;
  620. font-weight: 600;
  621. transition: all 0.3s ease;
  622. border: none;
  623. }
  624. .logout-cancel-btn::after{
  625. border: none;
  626. }
  627. .logout-cancel-btn {
  628. background: #f1f5f9;
  629. color: #64748b;
  630. }
  631. .logout-cancel-btn:active {
  632. background: #e2e8f0;
  633. transform: scale(0.98);
  634. }
  635. .logout-confirm-btn {
  636. background: linear-gradient(135deg, #ef4444, #dc2626);
  637. color: white;
  638. box-shadow: 0 8rpx 24rpx rgba(239, 68, 68, 0.3);
  639. }
  640. .logout-confirm-btn:active {
  641. transform: scale(0.98);
  642. opacity: 0.9;
  643. }
  644. /* 提示信息 */
  645. .toast {
  646. position: fixed;
  647. top: 150rpx;
  648. left: 50%;
  649. transform: translateX(-50%) translateY(-100rpx);
  650. background: rgba(30, 41, 59, 0.95);
  651. backdrop-filter: blur(20rpx);
  652. color: white;
  653. padding: 24rpx 48rpx;
  654. border-radius: 16rpx;
  655. font-size: 28rpx;
  656. font-weight: 500;
  657. opacity: 0;
  658. visibility: hidden;
  659. transition: all 0.3s ease;
  660. z-index: 1001;
  661. box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.2);
  662. max-width: 80%;
  663. text-align: center;
  664. white-space: nowrap;
  665. }
  666. .toast.show {
  667. opacity: 1;
  668. visibility: visible;
  669. transform: translateX(-50%) translateY(0);
  670. }