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

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