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

610 lines
9.9 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. .nickname-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. .nickname-modal.show {
  338. opacity: 1;
  339. visibility: visible;
  340. pointer-events: auto;
  341. }
  342. .nickname-modal .modal-content {
  343. width: 600rpx;
  344. background: white;
  345. border-radius: 20rpx;
  346. overflow: hidden;
  347. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  348. transform: scale(0.8);
  349. transition: all 0.3s ease;
  350. }
  351. .nickname-modal.show .modal-content {
  352. transform: scale(1);
  353. }
  354. .nickname-modal .modal-header {
  355. padding: 40rpx 40rpx 20rpx;
  356. border-bottom: 1rpx solid #f1f5f9;
  357. }
  358. .nickname-modal .modal-body {
  359. padding: 40rpx;
  360. }
  361. .nickname-input {
  362. width: 100%;
  363. height: 80rpx;
  364. background: #f8fafc;
  365. border: 2rpx solid #e2e8f0;
  366. border-radius: 12rpx;
  367. font-size: 28rpx;
  368. color: #1e293b;
  369. text-align: center;
  370. transition: all 0.3s ease;
  371. }
  372. .nickname-input:focus {
  373. border-color: #667eea;
  374. background: white;
  375. box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
  376. }
  377. .input-tip {
  378. display: block;
  379. font-size: 24rpx;
  380. color: #94a3b8;
  381. text-align: center;
  382. margin-top: 16rpx;
  383. }
  384. .nickname-modal .modal-footer {
  385. padding: 0 40rpx 40rpx;
  386. display: flex;
  387. gap: 20rpx;
  388. }
  389. .cancel-btn,
  390. .confirm-btn {
  391. flex: 1;
  392. padding: 5rpx 0;
  393. border-radius: 40rpx;
  394. font-size: 28rpx;
  395. font-weight: 500;
  396. transition: all 0.3s ease;
  397. border: none;
  398. }
  399. .cancel-btn {
  400. background: #f1f5f9;
  401. color: #64748b;
  402. }
  403. .cancel-btn::after{
  404. border: none;
  405. }
  406. .cancel-btn:active {
  407. background: #e2e8f0;
  408. }
  409. .confirm-btn {
  410. background: linear-gradient(135deg, #667eea, #764ba2);
  411. color: white;
  412. box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
  413. }
  414. .confirm-btn:active {
  415. transform: scale(0.98);
  416. opacity: 0.9;
  417. }
  418. /* 退出登录确认弹窗 */
  419. .logout-modal {
  420. position: fixed;
  421. top: 0;
  422. left: 0;
  423. width: 100%;
  424. height: 100%;
  425. z-index: 1000;
  426. display: flex;
  427. align-items: center;
  428. justify-content: center;
  429. opacity: 0;
  430. visibility: hidden;
  431. transition: all 0.3s ease;
  432. pointer-events: none;
  433. }
  434. .logout-modal.show {
  435. opacity: 1;
  436. visibility: visible;
  437. pointer-events: auto;
  438. }
  439. .logout-modal .modal-content {
  440. width: 600rpx;
  441. background: white;
  442. border-radius: 24rpx;
  443. overflow: hidden;
  444. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.2);
  445. transform: scale(0.8);
  446. transition: all 0.3s ease;
  447. }
  448. .logout-modal.show .modal-content {
  449. transform: scale(1);
  450. }
  451. .logout-modal-body {
  452. padding: 60rpx 40rpx 40rpx;
  453. text-align: center;
  454. }
  455. .logout-title {
  456. font-weight: 700;
  457. color: #1e293b;
  458. display: block;
  459. }
  460. .logout-desc {
  461. font-size: 28rpx;
  462. color: #64748b;
  463. line-height: 1.5;
  464. }
  465. .logout-modal-footer {
  466. padding: 0 40rpx 40rpx;
  467. display: flex;
  468. gap: 20rpx;
  469. }
  470. .logout-cancel-btn,
  471. .logout-confirm-btn {
  472. flex: 1;
  473. border-radius: 44rpx;
  474. font-size: 30rpx;
  475. font-weight: 600;
  476. transition: all 0.3s ease;
  477. border: none;
  478. }
  479. .logout-cancel-btn::after{
  480. border: none;
  481. }
  482. .logout-cancel-btn {
  483. background: #f1f5f9;
  484. color: #64748b;
  485. }
  486. .logout-cancel-btn:active {
  487. background: #e2e8f0;
  488. transform: scale(0.98);
  489. }
  490. .logout-confirm-btn {
  491. background: linear-gradient(135deg, #ef4444, #dc2626);
  492. color: white;
  493. box-shadow: 0 8rpx 24rpx rgba(239, 68, 68, 0.3);
  494. }
  495. .logout-confirm-btn:active {
  496. transform: scale(0.98);
  497. opacity: 0.9;
  498. }
  499. /* 提示信息 */
  500. .toast {
  501. position: fixed;
  502. top: 150rpx;
  503. left: 50%;
  504. transform: translateX(-50%) translateY(-100rpx);
  505. background: rgba(30, 41, 59, 0.95);
  506. backdrop-filter: blur(20rpx);
  507. color: white;
  508. padding: 24rpx 48rpx;
  509. border-radius: 16rpx;
  510. font-size: 28rpx;
  511. font-weight: 500;
  512. opacity: 0;
  513. visibility: hidden;
  514. transition: all 0.3s ease;
  515. z-index: 1001;
  516. box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.2);
  517. max-width: 80%;
  518. text-align: center;
  519. white-space: nowrap;
  520. }
  521. .toast.show {
  522. opacity: 1;
  523. visibility: visible;
  524. transform: translateX(-50%) translateY(0);
  525. }