与牧同行-小程序用户端
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.

719 lines
12 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. .message-label {
  223. font-size: 26rpx;
  224. color: #475569;
  225. font-weight: 500;
  226. }
  227. .divider {
  228. width: 1rpx;
  229. height: 60rpx;
  230. background: #e2e8f0;
  231. margin: 0 40rpx;
  232. }
  233. /* 功能列表 */
  234. .function-list {
  235. padding: 0 30rpx 20rpx;
  236. }
  237. .function-item {
  238. display: flex;
  239. align-items: center;
  240. justify-content: space-between;
  241. padding: 30rpx 0;
  242. border-bottom: 1rpx solid #f1f5f9;
  243. transition: all 0.3s ease;
  244. }
  245. .function-item:last-child {
  246. border-bottom: none;
  247. }
  248. .function-item:active {
  249. background: #f8fafc;
  250. border-radius: 12rpx;
  251. }
  252. .item-left {
  253. display: flex;
  254. align-items: center;
  255. }
  256. .item-icon {
  257. width: 40rpx;
  258. height: 40rpx;
  259. margin-right: 20rpx;
  260. }
  261. .item-title {
  262. font-size: 30rpx;
  263. color: #1e293b;
  264. font-weight: 500;
  265. }
  266. .logout-title {
  267. color: #ef4444;
  268. }
  269. .item-status {
  270. font-size: 26rpx;
  271. color: #f59e0b;
  272. font-weight: 500;
  273. }
  274. .item-status.verified {
  275. color: #10b981;
  276. }
  277. /* 反馈弹窗 */
  278. .feedback-modal {
  279. position: fixed;
  280. top: 0;
  281. left: 0;
  282. width: 100%;
  283. height: 100%;
  284. z-index: 1000;
  285. display: flex;
  286. align-items: center;
  287. justify-content: center;
  288. opacity: 0;
  289. visibility: hidden;
  290. transition: all 0.3s ease;
  291. }
  292. .feedback-modal.show {
  293. opacity: 1;
  294. visibility: visible;
  295. }
  296. .modal-mask {
  297. position: absolute;
  298. top: 0;
  299. left: 0;
  300. width: 100%;
  301. height: 100%;
  302. background: rgba(0, 0, 0, 0.5);
  303. backdrop-filter: blur(4rpx);
  304. }
  305. .modal-content {
  306. position: relative;
  307. width: 90%;
  308. max-width: 660rpx;
  309. background: white;
  310. border-radius: 24rpx;
  311. overflow: hidden;
  312. box-shadow: 0 30rpx 80rpx rgba(0, 0, 0, 0.2);
  313. transform: translateY(100rpx);
  314. transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  315. }
  316. .feedback-modal.show .modal-content {
  317. transform: translateY(0);
  318. }
  319. .modal-header {
  320. padding: 40rpx 40rpx 20rpx;
  321. border-bottom: 1rpx solid #f1f5f9;
  322. display: flex;
  323. justify-content: space-between;
  324. align-items: center;
  325. }
  326. .modal-title {
  327. font-size: 36rpx;
  328. font-weight: 700;
  329. color: #1e293b;
  330. }
  331. .modal-close {
  332. width: 40rpx;
  333. height: 40rpx;
  334. display: flex;
  335. align-items: center;
  336. justify-content: center;
  337. border-radius: 50%;
  338. transition: all 0.3s ease;
  339. }
  340. .modal-close:active {
  341. background: #e2e8f0;
  342. transform: scale(0.9);
  343. }
  344. .modal-close image {
  345. width: 36rpx;
  346. height: 36rpx;
  347. filter: brightness(0%);
  348. }
  349. /* 反馈输入框 */
  350. .modal-body {
  351. padding: 40rpx;
  352. }
  353. .feedback-input {
  354. width: 100%;
  355. min-height: 240rpx;
  356. padding: 24rpx;
  357. box-sizing: border-box;
  358. background: #f8fafc;
  359. border: 2rpx solid #e2e8f0;
  360. border-radius: 16rpx;
  361. font-size: 28rpx;
  362. line-height: 1.5;
  363. color: #1e293b;
  364. transition: all 0.3s ease;
  365. }
  366. .feedback-input:focus {
  367. border-color: #667eea;
  368. background: white;
  369. box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
  370. }
  371. .placeholder {
  372. color: #94a3b8;
  373. }
  374. .char-count {
  375. text-align: right;
  376. margin-top: 12rpx;
  377. font-size: 24rpx;
  378. display: flex;
  379. justify-content: flex-end;
  380. align-items: baseline;
  381. gap: 4rpx;
  382. }
  383. .char-count .current {
  384. color: #1e293b;
  385. font-weight: 500;
  386. }
  387. .char-count .total {
  388. color: #94a3b8;
  389. }
  390. .modal-footer {
  391. padding: 0 40rpx 40rpx;
  392. }
  393. .submit-btn {
  394. width: 100%;
  395. padding: 5rpx 0;
  396. background: #e2e8f0;
  397. border-radius: 44rpx;
  398. font-size: 32rpx;
  399. font-weight: 600;
  400. color: #94a3b8;
  401. border: none;
  402. transition: all 0.3s ease;
  403. }
  404. .submit-btn.active {
  405. background: linear-gradient(135deg, #667eea, #764ba2);
  406. color: white;
  407. box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.3);
  408. }
  409. .submit-btn.active:active {
  410. transform: scale(0.98);
  411. opacity: 0.9;
  412. }
  413. .submit-btn[disabled] {
  414. opacity: 0.6;
  415. }
  416. /* 昵称修改弹窗 */
  417. .nickname-modal {
  418. position: fixed;
  419. top: 0;
  420. left: 0;
  421. width: 100%;
  422. height: 100%;
  423. z-index: 1000;
  424. display: flex;
  425. align-items: center;
  426. justify-content: center;
  427. opacity: 0;
  428. visibility: hidden;
  429. transition: all 0.3s ease;
  430. }
  431. .nickname-modal.show {
  432. opacity: 1;
  433. visibility: visible;
  434. }
  435. .nickname-modal .modal-content {
  436. width: 600rpx;
  437. background: white;
  438. border-radius: 20rpx;
  439. overflow: hidden;
  440. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  441. transform: scale(0.8);
  442. transition: all 0.3s ease;
  443. }
  444. .nickname-modal.show .modal-content {
  445. transform: scale(1);
  446. }
  447. .nickname-modal .modal-header {
  448. padding: 40rpx 40rpx 20rpx;
  449. border-bottom: 1rpx solid #f1f5f9;
  450. }
  451. .nickname-modal .modal-body {
  452. padding: 40rpx;
  453. }
  454. .nickname-input {
  455. width: 100%;
  456. height: 80rpx;
  457. background: #f8fafc;
  458. border: 2rpx solid #e2e8f0;
  459. border-radius: 12rpx;
  460. font-size: 28rpx;
  461. color: #1e293b;
  462. text-align: center;
  463. transition: all 0.3s ease;
  464. }
  465. .nickname-input:focus {
  466. border-color: #667eea;
  467. background: white;
  468. box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
  469. }
  470. .input-tip {
  471. display: block;
  472. font-size: 24rpx;
  473. color: #94a3b8;
  474. text-align: center;
  475. margin-top: 16rpx;
  476. }
  477. .nickname-modal .modal-footer {
  478. padding: 0 40rpx 40rpx;
  479. display: flex;
  480. gap: 20rpx;
  481. }
  482. .cancel-btn,
  483. .confirm-btn {
  484. flex: 1;
  485. padding: 5rpx 0;
  486. border-radius: 40rpx;
  487. font-size: 28rpx;
  488. font-weight: 500;
  489. transition: all 0.3s ease;
  490. border: none;
  491. }
  492. .cancel-btn {
  493. background: #f1f5f9;
  494. color: #64748b;
  495. }
  496. .cancel-btn::after{
  497. border: none;
  498. }
  499. .cancel-btn:active {
  500. background: #e2e8f0;
  501. }
  502. .confirm-btn {
  503. background: linear-gradient(135deg, #667eea, #764ba2);
  504. color: white;
  505. box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
  506. }
  507. .confirm-btn:active {
  508. transform: scale(0.98);
  509. opacity: 0.9;
  510. }
  511. /* 退出登录确认弹窗 */
  512. .logout-modal {
  513. position: fixed;
  514. top: 0;
  515. left: 0;
  516. width: 100%;
  517. height: 100%;
  518. z-index: 1000;
  519. display: flex;
  520. align-items: center;
  521. justify-content: center;
  522. opacity: 0;
  523. visibility: hidden;
  524. transition: all 0.3s ease;
  525. }
  526. .logout-modal.show {
  527. opacity: 1;
  528. visibility: visible;
  529. }
  530. .logout-modal .modal-content {
  531. width: 600rpx;
  532. background: white;
  533. border-radius: 24rpx;
  534. overflow: hidden;
  535. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  536. transform: scale(0.8);
  537. transition: all 0.3s ease;
  538. }
  539. .logout-modal.show .modal-content {
  540. transform: scale(1);
  541. }
  542. .logout-modal-body {
  543. padding: 60rpx 40rpx 40rpx;
  544. text-align: center;
  545. }
  546. .logout-title {
  547. font-weight: 700;
  548. color: #1e293b;
  549. display: block;
  550. }
  551. .logout-desc {
  552. font-size: 28rpx;
  553. color: #64748b;
  554. line-height: 1.5;
  555. }
  556. .logout-modal-footer {
  557. padding: 0 40rpx 40rpx;
  558. display: flex;
  559. gap: 20rpx;
  560. }
  561. .logout-cancel-btn,
  562. .logout-confirm-btn {
  563. flex: 1;
  564. border-radius: 44rpx;
  565. font-size: 30rpx;
  566. font-weight: 600;
  567. transition: all 0.3s ease;
  568. border: none;
  569. }
  570. .logout-cancel-btn::after{
  571. border: none;
  572. }
  573. .logout-cancel-btn {
  574. background: #f1f5f9;
  575. color: #64748b;
  576. }
  577. .logout-cancel-btn:active {
  578. background: #e2e8f0;
  579. transform: scale(0.98);
  580. }
  581. .logout-confirm-btn {
  582. background: linear-gradient(135deg, #ef4444, #dc2626);
  583. color: white;
  584. box-shadow: 0 8rpx 24rpx rgba(239, 68, 68, 0.3);
  585. }
  586. .logout-confirm-btn:active {
  587. transform: scale(0.98);
  588. opacity: 0.9;
  589. }
  590. /* 提示信息 */
  591. .toast {
  592. position: fixed;
  593. top: 150rpx;
  594. left: 50%;
  595. transform: translateX(-50%) translateY(-100rpx);
  596. background: rgba(30, 41, 59, 0.95);
  597. backdrop-filter: blur(20rpx);
  598. color: white;
  599. padding: 24rpx 48rpx;
  600. border-radius: 16rpx;
  601. font-size: 28rpx;
  602. font-weight: 500;
  603. opacity: 0;
  604. visibility: hidden;
  605. transition: all 0.3s ease;
  606. z-index: 1001;
  607. box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.2);
  608. max-width: 80%;
  609. text-align: center;
  610. white-space: nowrap;
  611. }
  612. .toast.show {
  613. opacity: 1;
  614. visibility: visible;
  615. transform: translateX(-50%) translateY(0);
  616. }