index.vue 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243
  1. <template>
  2. <view class="mine-page">
  3. <!-- 用户信息区域 -->
  4. <view class="user-section">
  5. <view class="user-info">
  6. <image class="avatar" :src="userInfo.avatar" mode="aspectFill"></image>
  7. <view class="user-details">
  8. <view class="nickname-row">
  9. <text class="nickname">{{ userInfo.nickname }}</text>
  10. <!-- VIP标志 -->
  11. <view class="vip-badge" v-if="userInfo.isVip">
  12. <text class="vip-badge-text">VIP</text>
  13. </view>
  14. <view class="verify-badge" @click="goVerify" v-if="!userInfo.isVerified">
  15. <text class="verify-text">未实名,立即认证</text>
  16. </view>
  17. </view>
  18. <!-- 基本信息展示 -->
  19. <view class="user-basic-info">
  20. <view class="info-item" v-if="userInfo.gender">
  21. <text class="info-icon">{{ userInfo.gender === 1 ? '👨' : '👩' }}</text>
  22. <text class="info-text">{{ userInfo.genderText }}</text>
  23. </view>
  24. <view class="info-item" v-if="userInfo.age">
  25. <text class="info-icon">🎂</text>
  26. <text class="info-text">{{ userInfo.age }}岁</text>
  27. </view>
  28. <view class="info-item" v-if="userInfo.height">
  29. <text class="info-icon">📏</text>
  30. <text class="info-text">{{ userInfo.height }}cm</text>
  31. </view>
  32. <!-- <view class="info-item" v-if="userInfo.educationText">-->
  33. <!-- <text class="info-icon">🎓</text>-->
  34. <!-- <text class="info-text">{{ userInfo.educationText }}</text>-->
  35. <!-- </view>-->
  36. </view>
  37. <view class="progress-row">
  38. <view class="progress-bar">
  39. <view class="progress-fill" :style="{ width: userInfo.profileProgress + '%' }"></view>
  40. </view>
  41. <text class="progress-text" @click="goCompleteProfile">完善资料 ></text>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 统计数据展示 -->
  46. <view class="user-stats">
  47. <view class="stats-item" @click="goToLikedByMe">
  48. <text class="stats-number">{{ stats.myConnection }}</text>
  49. <text class="stats-label">我喜欢的</text>
  50. </view>
  51. <view class="stats-item" @click="goToLikedMe">
  52. <text class="stats-number">{{ stats.myFavorites }}</text>
  53. <text class="stats-label">喜欢我的</text>
  54. </view>
  55. <view class="stats-item" @click="goToVisitedByMe">
  56. <text class="stats-number">{{ stats.iViewed }}</text>
  57. <text class="stats-label">我浏览的</text>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- VIP会员卡片 -->
  62. <view class="vip-card" @click="goVip" v-if="!userInfo.isVip">
  63. <view class="vip-content">
  64. <view class="vip-icon">👑</view>
  65. <view class="vip-info">
  66. <text class="vip-title">VIP会员未开通</text>
  67. <text class="vip-subtitle">开通会员可享受尊贵服务哦</text>
  68. </view>
  69. </view>
  70. <view class="vip-button">立即开通</view>
  71. </view>
  72. <!-- 快捷入口 -->
  73. <view class="quick-actions">
  74. <view class="action-item" @click="goToPage('basicInfo')">
  75. <view class="action-icon calendar-icon">🆔</view>
  76. <text class="action-label">基本资料</text>
  77. </view>
  78. <view class="action-item" @click="goToPage('partnerRequirement')">
  79. <view class="action-icon heart-icon">💜</view>
  80. <text class="action-label">对象要求</text>
  81. </view>
  82. <view class="action-item" @click="goToPage('verifyRealName')">
  83. <view class="action-icon phone-icon">🪪</view>
  84. <text class="action-label">实名认证</text>
  85. </view>
  86. <view class="action-item" @click="goToPage('verifyEducation')">
  87. <view class="action-icon phone-icon">🎓</view>
  88. <text class="action-label">学历认证</text>
  89. </view>
  90. </view>
  91. <!-- 签到弹窗 -->
  92. <uni-popup ref="checkinPopup" type="center" :mask-click="true">
  93. <view class="checkin-popup">
  94. <view class="popup-header">
  95. <text class="popup-title">每日签到</text>
  96. <view class="close-btn" @click="closeCheckinPopup">
  97. <text class="close-icon">✕</text>
  98. </view>
  99. </view>
  100. <view class="checkin-info">
  101. <view class="info-item">
  102. <text class="info-label">已连续签到</text>
  103. <text class="info-value">{{ checkinData.continuousDays }} 天</text>
  104. </view>
  105. <view class="info-item">
  106. <text class="info-label">累计签到</text>
  107. <text class="info-value">{{ checkinData.totalDays }} 天</text>
  108. </view>
  109. </view>
  110. <scroll-view scroll-y class="checkin-content">
  111. <view class="checkin-calendar">
  112. <view class="calendar-header">
  113. <text class="month-text">{{ currentMonth }}</text>
  114. </view>
  115. <view class="week-header">
  116. <text class="week-day" v-for="day in weekDays" :key="day">{{ day }}</text>
  117. </view>
  118. <view class="calendar-body">
  119. <view
  120. class="calendar-day"
  121. v-for="(day, index) in calendarDays"
  122. :key="index"
  123. :class="{
  124. 'empty': !day.date,
  125. 'checked': day.checked,
  126. 'today': day.isToday
  127. }"
  128. >
  129. <text class="day-num" v-if="day.date">{{ day.date }}</text>
  130. <view class="check-mark" v-if="day.checked">✓</view>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="checkin-rewards">
  135. <text class="rewards-title">签到奖励</text>
  136. <view class="rewards-list">
  137. <view
  138. class="reward-item"
  139. v-for="(reward, index) in checkinRewards"
  140. :key="index"
  141. :class="{ 'received': reward.received, 'current': reward.isCurrent }"
  142. >
  143. <view class="reward-icon">{{ reward.icon }}</view>
  144. <text class="reward-day">第{{ reward.day }}天</text>
  145. <text class="reward-text">{{ reward.reward }}</text>
  146. <view class="received-mark" v-if="reward.received">✓</view>
  147. </view>
  148. </view>
  149. </view>
  150. </scroll-view>
  151. <view class="checkin-button-wrapper">
  152. <button
  153. class="checkin-btn"
  154. :class="{ 'disabled': checkinData.todayChecked }"
  155. @click="handleCheckin"
  156. :disabled="checkinData.todayChecked"
  157. >
  158. {{ checkinData.todayChecked ? '今日已签到' : '立即签到' }}
  159. </button>
  160. </view>
  161. </view>
  162. </uni-popup>
  163. <!-- 功能菜单列表 -->
  164. <view class="menu-list">
  165. <view class="menu-item" @click="showCheckinPopup">
  166. <view class="menu-left">
  167. <text class="menu-icon">📅</text>
  168. <text class="menu-text">签到</text>
  169. </view>
  170. <text class="menu-arrow">›</text>
  171. </view>
  172. <view class="menu-item" @click="goToPage('myDynamics')">
  173. <view class="menu-left">
  174. <text class="menu-icon">📝</text>
  175. <text class="menu-text">我的动态</text>
  176. </view>
  177. <text class="menu-arrow">›</text>
  178. </view>
  179. <view class="menu-item" @click="goToPage('myActivity')">
  180. <view class="menu-left">
  181. <text class="menu-icon">📷</text>
  182. <text class="menu-text">课程活动</text>
  183. </view>
  184. <text class="menu-arrow">›</text>
  185. </view>
  186. <view class="menu-item" @click="goToPage('partTimeMatchmaker')">
  187. <view class="menu-left">
  188. <text class="menu-icon">💎</text>
  189. <text class="menu-text">兼职红娘</text>
  190. </view>
  191. <text class="menu-arrow">›</text>
  192. </view>
  193. <view class="menu-item" @click="goToPage('feedback')">
  194. <view class="menu-left">
  195. <text class="menu-icon">💬</text>
  196. <text class="menu-text">用户反馈</text>
  197. </view>
  198. <text class="menu-arrow">›</text>
  199. </view>
  200. <view class="menu-item" @click="goToPage('blacklist')">
  201. <view class="menu-left">
  202. <text class="menu-icon">📋</text>
  203. <text class="menu-text">黑名单</text>
  204. </view>
  205. <text class="menu-arrow">›</text>
  206. </view>
  207. <view class="menu-item" @click="goToPage('settings')">
  208. <view class="menu-left">
  209. <text class="menu-icon">⚙️</text>
  210. <text class="menu-text">设置</text>
  211. </view>
  212. <text class="menu-arrow">›</text>
  213. </view>
  214. </view>
  215. <!-- 底部导航栏 -->
  216. <view class="tabbar">
  217. <view class="tabbar-item active" @click="switchTab('index')">
  218. <text class="tabbar-icon">🏠</text>
  219. <text class="tabbar-text">首页</text>
  220. </view>
  221. <view class="tabbar-item" @click="switchTab('plaza')">
  222. <text class="tabbar-icon">💕</text>
  223. <text class="tabbar-text">动态</text>
  224. </view>
  225. <view class="tabbar-item" @click="switchTab('recommend')">
  226. <text class="tabbar-icon">👍</text>
  227. <text class="tabbar-text">推荐</text>
  228. </view>
  229. <!-- <view class="tabbar-item" @click="switchTab('message')">
  230. <text class="tabbar-icon">💬</text>
  231. <text class="tabbar-text">消息</text>
  232. <view v-if="unreadCount >= 1" class="tabbar-badge">{{ unreadCount }}</view>
  233. </view> -->
  234. <view class="tabbar-item" @click="switchTab('mine')">
  235. <text class="tabbar-icon">👤</text>
  236. <text class="tabbar-text">我的</text>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <script>
  242. import api from '@/utils/api.js'
  243. export default {
  244. data() {
  245. return {
  246. // 网关地址
  247. gatewayURL: 'https://api.zhongruanke.cn',
  248. // 用户ID(如果没有登录,默认为1)
  249. currentUserId: null,
  250. // 用户信息(从后端获取)
  251. userInfo: {
  252. userId: null,
  253. nickname: '准备加载...',
  254. avatar: 'https://via.placeholder.com/100',
  255. phone: '',
  256. email: '',
  257. gender: null,
  258. genderText: '未知',
  259. birthDate: null,
  260. age: null,
  261. isVerified: false,
  262. profileProgress: 0,
  263. isVip: false
  264. },
  265. stats: {
  266. myConnection: 0,
  267. myFavorites: 0,
  268. whoViewedMe: 0,
  269. iViewed: 0
  270. },
  271. matchmaker: {
  272. code: 'xxxxx',
  273. phone: '99*******99'
  274. },
  275. // 签到数据
  276. checkinData: {
  277. continuousDays: 0,
  278. totalDays: 0,
  279. todayChecked: false,
  280. checkedDates: []
  281. },
  282. weekDays: ['日', '一', '二', '三', '四', '五', '六'],
  283. currentMonth: '',
  284. calendarDays: [],
  285. checkinRewards: []
  286. }
  287. },
  288. computed: {
  289. unreadCount() {
  290. return this.$store.getters.getTotalUnread || 0;
  291. }
  292. },
  293. onLoad() {
  294. // 立即检查登录状态
  295. const token = uni.getStorageSync('token')
  296. const userInfo = uni.getStorageSync('userInfo')
  297. if (!token || !userInfo) {
  298. // 未登录,立即强制跳转到登录页
  299. uni.showModal({
  300. title: '需要登录',
  301. content: '请先登录后查看个人信息',
  302. showCancel: false, // 不允许取消
  303. confirmText: '去登录',
  304. success: () => {
  305. uni.navigateTo({
  306. url: '/pages/page3/page3'
  307. })
  308. }
  309. })
  310. return
  311. }
  312. // 已登录,同步登录状态
  313. this.syncLoginStatus()
  314. // 监听VIP购买成功事件
  315. uni.$on('vipPurchased', this.handleVipPurchased)
  316. },
  317. onUnload() {
  318. // 页面卸载时移除事件监听
  319. uni.$off('vipPurchased', this.handleVipPurchased)
  320. },
  321. onShow() {
  322. // 检查登录状态
  323. const token = uni.getStorageSync('token')
  324. const userInfo = uni.getStorageSync('userInfo')
  325. if (!token || !userInfo) {
  326. // 未登录,直接跳转(不显示弹窗,因为onLoad已经显示过了)
  327. uni.navigateTo({
  328. url: '/pages/page3/page3'
  329. })
  330. return
  331. }
  332. // 已登录,同步登录状态
  333. this.syncLoginStatus()
  334. },
  335. methods: {
  336. // 同步登录状态并更新页面数据
  337. syncLoginStatus() {
  338. // 获取最新的登录信息
  339. const token = uni.getStorageSync('token')
  340. const userInfo = uni.getStorageSync('userInfo')
  341. const userId = uni.getStorageSync('userId')
  342. if (token && userInfo && userId) {
  343. this.currentUserId = parseInt(userId)
  344. // 直接使用存储的用户信息更新页面
  345. this.userInfo = {
  346. userId: userInfo.userId || userId,
  347. nickname: userInfo.nickname || '用户',
  348. avatar: userInfo.avatarUrl || userInfo.avatar || 'https://via.placeholder.com/100',
  349. phone: this.maskPhone(userInfo.phone) || '',
  350. email: userInfo.email || '',
  351. gender: userInfo.gender,
  352. genderText: this.getGenderText(userInfo.gender),
  353. birthDate: userInfo.birthDate,
  354. age: this.calculateAge(userInfo.birthDate),
  355. isVerified: false,
  356. profileProgress: userInfo.profileProgress || 0,
  357. isVip: false
  358. }
  359. // 强制页面刷新
  360. this.$forceUpdate()
  361. // 设置统计数据
  362. this.stats = {
  363. myConnection: 0,
  364. myFavorites: 0,
  365. whoViewedMe: 0,
  366. iViewed: 0
  367. }
  368. // 获取我喜欢的用户真实数量
  369. this.getLikedUsersCount()
  370. // 获取喜欢我的用户真实数量
  371. this.getLikedMeUsersCount()
  372. // 立即加载最新用户信息(不延迟)
  373. this.loadUserInfo()
  374. } else {
  375. this.currentUserId = null
  376. // 设置未登录状态的用户信息
  377. this.userInfo = {
  378. userId: null,
  379. nickname: '未登录',
  380. avatar: 'https://via.placeholder.com/100?text=未登录',
  381. phone: '',
  382. email: '',
  383. gender: 0,
  384. genderText: '未知',
  385. birthDate: null,
  386. age: null,
  387. isVerified: false,
  388. profileProgress: 0,
  389. isVip: false
  390. }
  391. // 清空统计数据
  392. this.stats = {
  393. myConnection: 0,
  394. myFavorites: 0,
  395. whoViewedMe: 0,
  396. iViewed: 0
  397. }
  398. // 强制页面更新
  399. this.$forceUpdate()
  400. // 提示需要登录
  401. setTimeout(() => {
  402. uni.showModal({
  403. title: '需要登录',
  404. content: '请先登录后查看完整功能',
  405. showCancel: false,
  406. confirmText: '去登录',
  407. success: () => {
  408. uni.navigateTo({
  409. url: '/pages/page3/page3'
  410. })
  411. }
  412. })
  413. }, 500)
  414. }
  415. },
  416. // 简单的手机号脱敏
  417. maskPhone(phone) {
  418. if (!phone || phone.length < 11) return phone
  419. return phone.substring(0, 3) + '****' + phone.substring(7)
  420. },
  421. // 获取性别文字
  422. getGenderText(gender) {
  423. switch (gender) {
  424. case 1:
  425. return '男'
  426. case 2:
  427. return '女'
  428. default:
  429. return '未知'
  430. }
  431. },
  432. // 计算年龄
  433. calculateAge(birthDate) {
  434. if (!birthDate) return null
  435. const birth = new Date(birthDate)
  436. const today = new Date()
  437. let age = today.getFullYear() - birth.getFullYear()
  438. const monthDiff = today.getMonth() - birth.getMonth()
  439. if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
  440. age--
  441. }
  442. return age
  443. },
  444. // 从后端加载用户信息(通过网关)
  445. loadUserInfo() {
  446. // 检查是否真正登录(必须有token和userInfo)
  447. const token = uni.getStorageSync('token')
  448. const userInfo = uni.getStorageSync('userInfo')
  449. if (!token || !userInfo) {
  450. console.warn('未登录,不加载用户信息')
  451. return
  452. }
  453. // 检查用户ID是否有效
  454. if (!this.currentUserId || this.currentUserId <= 0) {
  455. console.warn('无有效用户ID,无法加载用户信息')
  456. this.setDefaultUserInfo()
  457. return
  458. }
  459. // 获取用户基本信息
  460. uni.request({
  461. url: this.gatewayURL + '/api/user/info?userId=' + this.currentUserId,
  462. method: 'GET',
  463. success: (res) => {
  464. if (res.data && res.data.code === 200) {
  465. const data = res.data.data
  466. // 更新用户信息
  467. this.userInfo = {
  468. userId: data.userId,
  469. nickname: data.nickname || '用户',
  470. avatar: data.avatar || 'https://via.placeholder.com/100',
  471. phone: data.phone,
  472. email: data.email,
  473. gender: data.gender,
  474. genderText: data.genderText,
  475. birthDate: data.birthDate,
  476. age: data.age,
  477. isVerified: data.isVerified || false,
  478. profileProgress: data.profileProgress || 0,
  479. isVip: data.isVip || false,
  480. // 扩展信息
  481. height: data.height,
  482. weight: data.weight,
  483. star: data.star,
  484. animal: data.animal,
  485. educationLevel: data.educationLevel,
  486. educationText: data.educationText,
  487. schoolName: data.schoolName,
  488. company: data.company,
  489. jobTitle: data.jobTitle,
  490. salaryRange: data.salaryRange,
  491. salaryText: data.salaryText,
  492. maritalStatus: data.maritalStatus,
  493. maritalText: data.maritalText,
  494. house: data.house,
  495. houseText: data.houseText,
  496. car: data.car,
  497. carText: data.carText,
  498. hobby: data.hobby,
  499. authenticityScore: data.authenticityScore
  500. }
  501. // 强制页面更新
  502. this.$forceUpdate()
  503. // 加载签到信息
  504. this.loadCheckinInfo()
  505. } else {
  506. console.error('获取用户信息失败:', res.data)
  507. const errorMsg = res.data?.message || '获取用户信息失败'
  508. // 如果是用户不存在的错误,给出特殊提示
  509. if (errorMsg.includes('用户不存在') || errorMsg.includes('用户ID无效')) {
  510. uni.showModal({
  511. title: '用户不存在',
  512. content: `当前用户ID(${this.currentUserId})在数据库中不存在,登录信息有误,请重新登录`,
  513. showCancel: false,
  514. confirmText: '重新登录',
  515. success: () => {
  516. // 清除登录信息并跳转登录页
  517. uni.clearStorageSync()
  518. uni.navigateTo({
  519. url: '/pages/page3/page3?redirect=' + encodeURIComponent('/pages/mine/index')
  520. })
  521. }
  522. })
  523. } else {
  524. uni.showToast({
  525. title: errorMsg,
  526. icon: 'none'
  527. })
  528. // 设置默认用户信息
  529. this.setDefaultUserInfo()
  530. }
  531. }
  532. },
  533. fail: (err) => {
  534. console.error('获取用户信息失败:', err)
  535. // API失败时,提示用户网络错误
  536. uni.showModal({
  537. title: '网络错误',
  538. content: '无法连接到服务器,请检查网络连接或稍后重试',
  539. showCancel: true,
  540. cancelText: '返回',
  541. confirmText: '重试',
  542. success: (modalRes) => {
  543. if (modalRes.confirm) {
  544. // 重试加载
  545. this.loadUserInfo()
  546. }
  547. }
  548. })
  549. // 设置默认用户信息以避免页面空白
  550. this.setDefaultUserInfo()
  551. uni.showToast({
  552. title: '网络连接失败',
  553. icon: 'none',
  554. duration: 2000
  555. })
  556. }
  557. })
  558. },
  559. // 设置默认用户信息(未登录或加载失败时)
  560. setDefaultUserInfo() {
  561. this.userInfo = {
  562. userId: null,
  563. nickname: '未登录用户',
  564. avatar: 'https://via.placeholder.com/100?text=未登录',
  565. phone: '',
  566. email: '',
  567. gender: null,
  568. genderText: '未知',
  569. birthDate: null,
  570. age: null,
  571. isVerified: false,
  572. profileProgress: 0,
  573. isVip: false,
  574. height: null,
  575. weight: null,
  576. star: null,
  577. animal: null,
  578. educationLevel: null,
  579. schoolName: null,
  580. company: null,
  581. jobTitle: null,
  582. salaryRange: null,
  583. maritalStatus: null,
  584. house: null,
  585. car: null,
  586. hobby: null,
  587. authenticityScore: 0
  588. }
  589. // 显示登录提示(仅在没有登录时显示)
  590. const token = uni.getStorageSync('token')
  591. if (!token) {
  592. setTimeout(() => {
  593. uni.showModal({
  594. title: '提示',
  595. content: '请先登录以查看完整功能',
  596. showCancel: true,
  597. cancelText: '稍后',
  598. confirmText: '去登录',
  599. success: (res) => {
  600. if (res.confirm) {
  601. uni.navigateTo({
  602. url: '/pages/page3/page3?redirect=' + encodeURIComponent('/pages/mine/index')
  603. })
  604. }
  605. }
  606. })
  607. }, 1000) // 延迟1秒显示,避免页面刚加载就弹窗
  608. }
  609. },
  610. // 加载签到信息
  611. async loadCheckinInfo() {
  612. // 确保有用户ID
  613. if (!this.userInfo.userId) {
  614. console.error('用户ID不存在,无法加载签到信息')
  615. return
  616. }
  617. try {
  618. // 检查用户是否为红娘
  619. const matchmakerStatusRes = await api.user.getMatchmakerStatus(this.userInfo.userId)
  620. console.log(matchmakerStatusRes)
  621. if (matchmakerStatusRes && matchmakerStatusRes.isMatchmaker == 1) {
  622. // 获取当前年月
  623. const today = new Date()
  624. const year = today.getFullYear()
  625. const month = today.getMonth() + 1
  626. // 调用红娘签到信息接口
  627. const checkinInfoRes = await api.matchmaker.checkinInfo(
  628. this.userInfo.userId,
  629. year,
  630. month
  631. )
  632. // 更新签到数据
  633. this.checkinData = {
  634. continuousDays: checkinInfoRes.continuousDays,
  635. totalDays: checkinInfoRes.totalDays,
  636. todayChecked: checkinInfoRes.todayChecked,
  637. checkedDates: checkinInfoRes.checkedDates
  638. }
  639. // 生成日历
  640. this.generateCalendarFromBackend(checkinInfoRes.checkedDates)
  641. // 简单的奖励列表
  642. this.checkinRewards = [
  643. { day: 7, icon: '👑', reward: '积分+10', received: checkinInfoRes.continuousDays >= 7, isCurrent: checkinInfoRes.continuousDays < 7 },
  644. { day: 14, icon: '💎', reward: '积分+20', received: checkinInfoRes.continuousDays >= 14, isCurrent: checkinInfoRes.continuousDays >= 7 && checkinInfoRes.continuousDays < 14 },
  645. { day: 30, icon: '🏆', reward: '积分+50', received: checkinInfoRes.continuousDays >= 30, isCurrent: checkinInfoRes.continuousDays >= 14 && checkinInfoRes.continuousDays < 30 }
  646. ]
  647. } else {
  648. }
  649. } catch (err) {
  650. console.error('加载签到信息失败:', err)
  651. uni.showToast({
  652. title: '加载签到信息失败',
  653. icon: 'none'
  654. })
  655. }
  656. },
  657. // 根据后端数据生成日历(修复版本)
  658. generateCalendarFromBackend(checkedDates) {
  659. const today = new Date()
  660. const year = today.getFullYear()
  661. const month = today.getMonth() // 0-11
  662. // 格式化当前月份显示
  663. this.currentMonth = `${year}年${month + 1}月`
  664. // 获取本月第一天是星期几(0=周日, 1=周一, ..., 6=周六)
  665. const firstDay = new Date(year, month, 1).getDay()
  666. // 获取本月总天数
  667. const daysInMonth = new Date(year, month + 1, 0).getDate()
  668. // 今天的日期字符串(用于比较)
  669. const todayStr = this.formatDate(today)
  670. const days = []
  671. // 添加空白占位(月初前的空白)
  672. for (let i = 0; i < firstDay; i++) {
  673. days.push({ date: null, checked: false, isToday: false })
  674. }
  675. // 添加本月的每一天
  676. for (let i = 1; i <= daysInMonth; i++) {
  677. const date = new Date(year, month, i)
  678. const dateStr = this.formatDate(date)
  679. const isToday = dateStr === todayStr
  680. const checked = checkedDates.includes(dateStr)
  681. days.push({
  682. date: i,
  683. checked: checked,
  684. isToday: isToday,
  685. dateStr: dateStr
  686. })
  687. }
  688. this.calendarDays = days
  689. },
  690. // 格式化日期
  691. formatDate(date) {
  692. const year = date.getFullYear()
  693. const month = String(date.getMonth() + 1).padStart(2, '0')
  694. const day = String(date.getDate()).padStart(2, '0')
  695. return `${year}-${month}-${day}`
  696. },
  697. // 显示签到弹窗
  698. showCheckinPopup() {
  699. this.$refs.checkinPopup.open()
  700. },
  701. // 关闭签到弹窗
  702. closeCheckinPopup() {
  703. this.$refs.checkinPopup.close()
  704. },
  705. // 处理签到(通过网关)
  706. async handleCheckin() {
  707. if (this.checkinData.todayChecked) {
  708. uni.showToast({
  709. title: '今日已签到',
  710. icon: 'none'
  711. })
  712. return
  713. }
  714. // 确保有用户ID
  715. if (!this.userInfo.userId) {
  716. uni.showToast({ title: '请先登录', icon: 'none' })
  717. return
  718. }
  719. try {
  720. // 检查用户是否为红娘
  721. const matchmakerStatusRes = await api.user.getMatchmakerStatus(this.userInfo.userId)
  722. if (matchmakerStatusRes && matchmakerStatusRes.isMatchmaker) {
  723. // 是红娘,使用红娘签到接口
  724. // 调用红娘签到接口,直接使用userId作为makerId
  725. const signRes = await api.matchmaker.doCheckin(this.userInfo.userId)
  726. // 签到成功后更新状态
  727. this.checkinData.todayChecked = true
  728. this.checkinData.totalDays++
  729. this.checkinData.continuousDays++
  730. // 获取当前日期字符串
  731. const today = new Date()
  732. const todayStr = this.formatDate(today)
  733. // 更新签到日期列表
  734. if (!this.checkinData.checkedDates.includes(todayStr)) {
  735. this.checkinData.checkedDates.push(todayStr)
  736. }
  737. // 重新生成日历
  738. this.generateCalendarFromBackend(this.checkinData.checkedDates)
  739. uni.showToast({
  740. title: '签到成功 +5积分',
  741. icon: 'success',
  742. duration: 2500
  743. })
  744. // 重新加载签到信息,确保数据最新
  745. await this.loadCheckinInfo()
  746. } else {
  747. uni.showToast({
  748. title: '功能开发中,敬请期待',
  749. icon: 'none'
  750. })
  751. }
  752. } catch (err) {
  753. console.error('签到失败:', err)
  754. uni.showToast({
  755. title: err.message || '签到失败,请稍后重试',
  756. icon: 'none'
  757. })
  758. }
  759. },
  760. goVerify() {
  761. uni.navigateTo({
  762. url: '/pages/settings/id-verification'
  763. })
  764. },
  765. goCompleteProfile() {
  766. this.goToPage('basicInfo')
  767. },
  768. goVip() {
  769. uni.navigateTo({
  770. url: '/pages/vip/index'
  771. })
  772. },
  773. goToPage(page) {
  774. try {
  775. if (page === 'basicInfo') {
  776. uni.navigateTo({
  777. url: '/pages/profile/index',
  778. success: () => {
  779. },
  780. fail: (err) => {
  781. console.error('❌ 基本资料页面跳转失败:', err)
  782. uni.showToast({
  783. title: '页面跳转失败',
  784. icon: 'none'
  785. })
  786. }
  787. })
  788. } else if (page === 'verifyRealName') {
  789. // 跳转到实名认证页面
  790. uni.navigateTo({
  791. url: '/pages/settings/id-verification',
  792. success: () => {
  793. },
  794. fail: (err) => {
  795. console.error('❌ 实名认证页面跳转失败:', err)
  796. uni.showToast({
  797. title: '页面跳转失败',
  798. icon: 'none'
  799. })
  800. }
  801. })
  802. } else if (page === 'verifyEducation') {
  803. // 跳转到实名认证页面
  804. uni.navigateTo({
  805. url: '/pages/settings/id-verification',
  806. success: () => {
  807. },
  808. fail: (err) => {
  809. console.error('❌ 学历认证页面跳转失败:', err)
  810. uni.showToast({
  811. title: '页面跳转失败',
  812. icon: 'none'
  813. })
  814. }
  815. })
  816. } else if (page === 'partTimeMatchmaker') {
  817. // 跳转到兼职红娘页面
  818. uni.navigateTo({
  819. url: '/pages/part-time-matchmaker/index',
  820. success: () => {
  821. },
  822. fail: (err) => {
  823. console.error('❌ 兼职红娘页面跳转失败:', err)
  824. uni.showToast({
  825. title: '页面跳转失败',
  826. icon: 'none'
  827. })
  828. }
  829. })
  830. } else if (page === 'blacklist') {
  831. // 跳转到黑名单页面
  832. uni.navigateTo({
  833. url: '/pages/blacklist/index',
  834. success: () => {
  835. },
  836. fail: (err) => {
  837. console.error('❌ 黑名单页面跳转失败:', err)
  838. uni.showToast({
  839. title: '页面跳转失败',
  840. icon: 'none'
  841. })
  842. }
  843. })
  844. } else if (page === 'partnerRequirement') {
  845. // 跳转到对象要求页面
  846. uni.navigateTo({
  847. url: '/pages/partner-requirement/index',
  848. success: () => {
  849. },
  850. fail: (err) => {
  851. console.error('❌ 对象要求页面跳转失败:', err)
  852. uni.showToast({
  853. title: '页面跳转失败',
  854. icon: 'none'
  855. })
  856. }
  857. })
  858. } else if (page === 'feedback') {
  859. uni.navigateTo({
  860. url: '/pages/feedback/index',
  861. success: () => {
  862. },
  863. fail: (err) => {
  864. console.error('❌ 用户反馈页面跳转失败:', err)
  865. uni.showToast({
  866. title: '页面跳转失败',
  867. icon: 'none'
  868. })
  869. }
  870. })
  871. } else if (page === 'settings') {
  872. uni.navigateTo({
  873. url: '/pages/settings/index',
  874. success: () => {
  875. },
  876. fail: (err) => {
  877. console.error('❌ 设置页面跳转失败:', err)
  878. uni.showToast({
  879. title: '页面跳转失败',
  880. icon: 'none'
  881. })
  882. }
  883. })
  884. }
  885. else if (page === 'part-time-matchmaker') {
  886. uni.navigateTo({
  887. url: '/pages/part-time-matchmaker/index',
  888. success: () => {
  889. },
  890. fail: (err) => {
  891. console.error('❌ 加入红娘页面跳转失败:', err)
  892. uni.showToast({
  893. title: '页面跳转失败',
  894. icon: 'none'
  895. })
  896. }
  897. })
  898. } else if (page === 'myActivity') {
  899. uni.navigateTo({
  900. url: '/pages/mine/my-activities',
  901. success: () => {
  902. },
  903. fail: (err) => {
  904. console.error('❌ 我的活动页面跳转失败:', err)
  905. uni.showToast({
  906. title: '页面跳转失败',
  907. icon: 'none'
  908. })
  909. }
  910. })
  911. } else if (page === 'myDynamics') {
  912. uni.navigateTo({
  913. url: '/pages/mine/my-dynamics',
  914. success: () => {
  915. },
  916. fail: (err) => {
  917. console.error('❌ 我的动态页面跳转失败:', err)
  918. uni.showToast({
  919. title: '页面跳转失败',
  920. icon: 'none'
  921. })
  922. }
  923. })
  924. } else {
  925. uni.showToast({
  926. title: '功能开发中',
  927. icon: 'none'
  928. })
  929. }
  930. } catch (error) {
  931. console.error('❌ goToPage 执行出错:', error)
  932. uni.showToast({
  933. title: '页面跳转异常',
  934. icon: 'none'
  935. })
  936. }
  937. },
  938. switchTab(tab) {
  939. if (tab === 'mine') return
  940. const tabPages = {
  941. index: '/pages/index/index',
  942. plaza: '/pages/plaza/index',
  943. recommend: '/pages/recommend/index',
  944. message: '/pages/message/index'
  945. }
  946. if (tabPages[tab]) {
  947. uni.redirectTo({
  948. url: tabPages[tab]
  949. })
  950. }
  951. },
  952. // 处理退出登录
  953. handleLogout() {
  954. uni.showModal({
  955. title: '退出登录',
  956. content: '确定要退出登录吗?',
  957. showCancel: true,
  958. cancelText: '取消',
  959. confirmText: '确定',
  960. success: (res) => {
  961. if (res.confirm) {
  962. this.executeLogout()
  963. }
  964. }
  965. })
  966. },
  967. // 执行退出登录(最可靠的方式)
  968. executeLogout() {
  969. // 立即显示加载状态
  970. uni.showLoading({
  971. title: '退出中...',
  972. mask: true
  973. })
  974. // 延迟执行,确保UI更新
  975. setTimeout(() => {
  976. try {
  977. // 断开在线状态WebSocket
  978. try {
  979. const timPresenceManager = require('@/utils/tim-presence-manager.js').default;
  980. if (timPresenceManager) {
  981. timPresenceManager.disconnect();
  982. }
  983. } catch (error) {
  984. console.error('❌ 断开在线状态WebSocket失败:', error);
  985. }
  986. // 断开TIM WebSocket
  987. try {
  988. const timManager = require('@/utils/tim-manager.js').default;
  989. if (timManager && timManager.isLogin) {
  990. timManager.logout();
  991. }
  992. } catch (error) {
  993. console.error('❌ TIM登出失败:', error);
  994. }
  995. // 方法1: 逐个清除
  996. uni.removeStorageSync('token')
  997. uni.removeStorageSync('userInfo')
  998. uni.removeStorageSync('userId')
  999. uni.removeStorageSync('rememberedAccount')
  1000. const remainToken = uni.getStorageSync('token')
  1001. const remainUser = uni.getStorageSync('userInfo')
  1002. // 如果还有残留数据,使用强制清除
  1003. if (remainToken || remainUser) {
  1004. uni.clearStorageSync()
  1005. }
  1006. this.currentUserId = null
  1007. this.userInfo = {
  1008. userId: null,
  1009. nickname: '未登录用户',
  1010. avatar: 'https://via.placeholder.com/100?text=未登录'
  1011. }
  1012. // 隐藏加载,显示成功
  1013. uni.hideLoading()
  1014. uni.showToast({
  1015. title: '退出成功!',
  1016. icon: 'success',
  1017. duration: 1500
  1018. })
  1019. // 延迟跳转
  1020. setTimeout(() => {
  1021. uni.reLaunch({
  1022. url: '/pages/page3/page3'
  1023. })
  1024. }, 1500)
  1025. } catch (error) {
  1026. console.error('退出过程出错:', error)
  1027. uni.hideLoading()
  1028. // 强制退出
  1029. uni.clearStorageSync()
  1030. uni.showModal({
  1031. title: '退出完成',
  1032. content: '已清除登录信息,请重新打开应用',
  1033. showCancel: false,
  1034. confirmText: '知道了'
  1035. })
  1036. }
  1037. }, 300) // 300毫秒延迟确保UI响应
  1038. },
  1039. // 设置测试用户数据(基于数据库真实数据)
  1040. // ⚠️ 已弃用:此方法仅供调试使用,正常流程不再调用测试数据
  1041. setTestUserData() {
  1042. console.warn('⚠️ 警告:正在使用测试数据,这不应该在生产环境中发生')
  1043. // 根据当前用户ID设置对应的数据库用户信息
  1044. const userId = this.currentUserId || 1
  1045. let userData = {}
  1046. // 设置用户信息
  1047. this.userInfo = userData
  1048. // 设置统计数据
  1049. this.stats = {
  1050. myConnection: 0,
  1051. myFavorites: 0,
  1052. whoViewedMe: 0,
  1053. iViewed: 0
  1054. }
  1055. // 获取真实数量
  1056. this.getLikedUsersCount()
  1057. this.getLikedMeUsersCount()
  1058. // 显示提示
  1059. uni.showToast({
  1060. title: '使用测试数据: ' + this.userInfo.nickname,
  1061. icon: 'success',
  1062. duration: 2000
  1063. })
  1064. },
  1065. // 处理VIP购买成功事件
  1066. handleVipPurchased() {
  1067. // 延迟刷新,确保后端数据已更新
  1068. setTimeout(() => {
  1069. this.loadUserInfo()
  1070. }, 500)
  1071. },
  1072. // 统计数据板块点击事件
  1073. goToLikedByMe() {
  1074. // 跳转到我喜欢的页面
  1075. uni.navigateTo({
  1076. url: '/pages/mine/liked-by-me',
  1077. fail: (err) => {
  1078. console.error('跳转我喜欢的页面失败:', err)
  1079. uni.showToast({
  1080. title: '页面跳转失败',
  1081. icon: 'none'
  1082. })
  1083. }
  1084. })
  1085. },
  1086. // 获取我喜欢的用户真实数量
  1087. async getLikedUsersCount() {
  1088. try {
  1089. const userId = this.currentUserId
  1090. if (userId) {
  1091. // 调用后端API获取真实的喜欢用户数量
  1092. const result = await api.recommend.getLikedUsersCount(userId)
  1093. // 确保获取的是数字值
  1094. const count = typeof result === 'number' ? result : (result.data || 0)
  1095. // 更新统计数据
  1096. this.stats.myConnection = count || 0
  1097. }
  1098. } catch (error) {
  1099. console.error('获取喜欢的用户数量失败:', error)
  1100. // 如果获取失败,使用默认值
  1101. this.stats.myConnection = 0
  1102. }
  1103. },
  1104. // 获取喜欢我的用户真实数量
  1105. async getLikedMeUsersCount() {
  1106. try {
  1107. const userId = this.currentUserId
  1108. if (userId) {
  1109. // 调用后端API获取真实的喜欢我的用户数量
  1110. const result = await api.recommend.getLikedMeUsersCount(userId)
  1111. // 确保获取的是数字值
  1112. const count = typeof result === 'number' ? result : (result.data || 0)
  1113. // 更新统计数据
  1114. this.stats.myFavorites = count || 0
  1115. }
  1116. } catch (error) {
  1117. console.error('获取喜欢我的用户数量失败:', error)
  1118. // 如果获取失败,使用默认值
  1119. this.stats.myFavorites = 0
  1120. }
  1121. },
  1122. goToLikedMe() {
  1123. // 跳转到喜欢我的页面
  1124. uni.navigateTo({
  1125. url: '/pages/mine/liked-me',
  1126. fail: (err) => {
  1127. console.error('跳转喜欢我的页面失败:', err)
  1128. uni.showToast({
  1129. title: '页面跳转失败',
  1130. icon: 'none'
  1131. })
  1132. }
  1133. })
  1134. },
  1135. goToVisitedByMe() {
  1136. // 跳转到我浏览的页面
  1137. uni.navigateTo({
  1138. url: '/pages/mine/visited-by-me',
  1139. fail: (err) => {
  1140. console.error('跳转我浏览的页面失败:', err)
  1141. uni.showToast({
  1142. title: '页面跳转失败',
  1143. icon: 'none'
  1144. })
  1145. }
  1146. })
  1147. }
  1148. }
  1149. }
  1150. </script>
  1151. <style lang="scss" scoped>
  1152. /* 扁平化设计风格 */
  1153. .mine-page {
  1154. min-height: 100vh;
  1155. background: #F5F5F5;
  1156. padding-bottom: 120rpx;
  1157. }
  1158. /* 用户信息内的统计数据样式 */
  1159. .user-stats {
  1160. display: flex;
  1161. justify-content: space-around;
  1162. margin: 20rpx 0 0;
  1163. padding: 0;
  1164. background: transparent;
  1165. border-radius: 0;
  1166. box-shadow: none;
  1167. border: none;
  1168. }
  1169. .stats-item {
  1170. flex: 1;
  1171. display: flex;
  1172. flex-direction: column;
  1173. align-items: center;
  1174. justify-content: center;
  1175. padding: 15rpx 20rpx;
  1176. border-radius: 0;
  1177. transition: all 0.3s ease;
  1178. &:not(:last-child) {
  1179. border-right: none;
  1180. }
  1181. .stats-number {
  1182. font-size: 40rpx;
  1183. font-weight: bold;
  1184. color: #FFFFFF;
  1185. margin-bottom: 5rpx;
  1186. text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  1187. }
  1188. .stats-label {
  1189. font-size: 22rpx;
  1190. color: rgba(255, 255, 255, 0.9);
  1191. font-weight: 500;
  1192. text-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.1);
  1193. }
  1194. }
  1195. /* 用户信息区域 - 优化版 */
  1196. .user-section {
  1197. margin: 0;
  1198. margin-top: env(safe-area-inset-top);
  1199. padding: 30rpx;
  1200. background: linear-gradient(135deg, #FF8A9B 0%, #FFB4C0 100%);
  1201. box-shadow: 0 4rpx 20rpx rgba(255, 138, 155, 0.2);
  1202. .user-info {
  1203. display: flex;
  1204. align-items: flex-start;
  1205. margin-bottom: 0;
  1206. .avatar {
  1207. width: 140rpx;
  1208. height: 140rpx;
  1209. border-radius: 50%;
  1210. margin-right: 30rpx;
  1211. background-color: #FFFFFF;
  1212. border: 4rpx solid rgba(255, 255, 255, 0.8);
  1213. box-shadow: 0 8rpx 30rpx rgba(255, 138, 155, 0.3);
  1214. transition: transform 0.3s ease;
  1215. overflow: hidden;
  1216. }
  1217. .avatar:active {
  1218. transform: scale(1.05);
  1219. }
  1220. .user-details {
  1221. flex: 1;
  1222. .nickname-row {
  1223. display: flex;
  1224. align-items: center;
  1225. margin-bottom: 20rpx;
  1226. margin-top: 0;
  1227. .nickname {
  1228. font-size: 44rpx;
  1229. font-weight: bold;
  1230. color: #FFFFFF;
  1231. margin-right: 16rpx;
  1232. text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  1233. }
  1234. /* VIP标志样式 - 精致版 */
  1235. .vip-badge {
  1236. margin-right: 12rpx;
  1237. display: flex;
  1238. align-items: center;
  1239. justify-content: center;
  1240. background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  1241. color: #FFFFFF;
  1242. padding: 6rpx 16rpx;
  1243. border-radius: 20rpx;
  1244. font-size: 24rpx;
  1245. font-weight: bold;
  1246. box-shadow:
  1247. 0 4rpx 15rpx rgba(255, 215, 0, 0.4),
  1248. 0 0 0 2rpx rgba(255, 255, 255, 0.9);
  1249. transition: all 0.3s ease;
  1250. letter-spacing: 1rpx;
  1251. text-transform: uppercase;
  1252. position: relative;
  1253. overflow: hidden;
  1254. z-index: 1;
  1255. &:before {
  1256. content: '';
  1257. position: absolute;
  1258. top: 0;
  1259. left: -100%;
  1260. width: 100%;
  1261. height: 100%;
  1262. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  1263. transition: left 0.4s ease;
  1264. z-index: -1;
  1265. }
  1266. &:active {
  1267. transform: scale(0.95);
  1268. box-shadow:
  1269. 0 3rpx 10rpx rgba(255, 215, 0, 0.3),
  1270. 0 0 0 2rpx rgba(255, 255, 255, 0.9);
  1271. }
  1272. &:active:before {
  1273. left: 100%;
  1274. }
  1275. }
  1276. .verify-badge {
  1277. background: rgba(255, 255, 255, 0.9);
  1278. padding: 8rpx 22rpx;
  1279. border-radius: 20rpx;
  1280. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  1281. transition: all 0.3s ease;
  1282. .verify-text {
  1283. font-size: 24rpx;
  1284. color: #FF6B8A;
  1285. font-weight: 600;
  1286. }
  1287. }
  1288. .verify-badge:active {
  1289. transform: scale(0.95);
  1290. background: rgba(255, 255, 255, 1);
  1291. }
  1292. }
  1293. /* 基本信息展示 - 优化版 */
  1294. .user-basic-info {
  1295. display: flex;
  1296. flex-wrap: wrap;
  1297. gap: 18rpx;
  1298. margin-bottom: 24rpx;
  1299. .info-item {
  1300. display: flex;
  1301. align-items: center;
  1302. gap: 10rpx;
  1303. padding: 10rpx 22rpx;
  1304. background: rgba(255, 255, 255, 0.9);
  1305. border-radius: 25rpx;
  1306. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
  1307. backdrop-filter: blur(10rpx);
  1308. transition: all 0.3s ease;
  1309. .info-icon {
  1310. font-size: 30rpx;
  1311. }
  1312. .info-text {
  1313. font-size: 26rpx;
  1314. color: #333333;
  1315. font-weight: 500;
  1316. }
  1317. }
  1318. .info-item:active {
  1319. transform: scale(0.98);
  1320. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
  1321. }
  1322. }
  1323. .progress-row {
  1324. display: flex;
  1325. align-items: center;
  1326. gap: 20rpx;
  1327. .progress-bar {
  1328. flex: 1;
  1329. height: 14rpx;
  1330. background-color: rgba(255, 255, 255, 0.3);
  1331. border-radius: 7rpx;
  1332. overflow: hidden;
  1333. box-shadow: inset 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
  1334. .progress-fill {
  1335. height: 100%;
  1336. background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
  1337. border-radius: 7rpx;
  1338. transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  1339. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
  1340. }
  1341. }
  1342. .progress-text {
  1343. font-size: 26rpx;
  1344. color: rgba(255, 255, 255, 0.95);
  1345. font-weight: 500;
  1346. white-space: nowrap;
  1347. text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  1348. transition: color 0.3s ease;
  1349. }
  1350. .progress-text:active {
  1351. color: #FFFFFF;
  1352. }
  1353. }
  1354. }
  1355. }
  1356. }
  1357. /* VIP会员卡片 - 优化版 */
  1358. .vip-card {
  1359. margin: 20rpx 30rpx;
  1360. background: linear-gradient(135deg, #F0E6FF 0%, #E8DFFF 100%);
  1361. border-radius: 20rpx;
  1362. padding: 35rpx;
  1363. display: flex;
  1364. align-items: center;
  1365. justify-content: space-between;
  1366. box-shadow: 0 4rpx 20rpx rgba(153, 102, 255, 0.15);
  1367. transition: all 0.3s ease;
  1368. border: none;
  1369. &:active {
  1370. transform: translateY(2rpx);
  1371. box-shadow: 0 2rpx 10rpx rgba(153, 102, 255, 0.1);
  1372. }
  1373. .vip-content {
  1374. display: flex;
  1375. align-items: center;
  1376. .vip-icon {
  1377. font-size: 70rpx;
  1378. margin-right: 25rpx;
  1379. filter: drop-shadow(0 4rpx 15rpx rgba(218, 112, 214, 0.4));
  1380. }
  1381. .vip-info {
  1382. display: flex;
  1383. flex-direction: column;
  1384. gap: 8rpx;
  1385. .vip-title {
  1386. font-size: 34rpx;
  1387. font-weight: bold;
  1388. color: #6B4EA3;
  1389. }
  1390. .vip-subtitle {
  1391. font-size: 24rpx;
  1392. color: #8B7BAA;
  1393. background: rgba(255, 255, 255, 0.6);
  1394. padding: 6rpx 18rpx;
  1395. border-radius: 15rpx;
  1396. }
  1397. }
  1398. }
  1399. .vip-button {
  1400. background: linear-gradient(135deg, #9575CD 0%, #7E57C2 100%);
  1401. color: #FFFFFF;
  1402. padding: 18rpx 35rpx;
  1403. border-radius: 30rpx;
  1404. font-size: 28rpx;
  1405. white-space: nowrap;
  1406. font-weight: 600;
  1407. box-shadow: 0 4rpx 15rpx rgba(149, 117, 205, 0.3);
  1408. transition: all 0.3s ease;
  1409. }
  1410. .vip-button:active {
  1411. transform: scale(0.95);
  1412. box-shadow: 0 2rpx 10rpx rgba(149, 117, 205, 0.2);
  1413. }
  1414. }
  1415. /* 专属红娘 - 优化版 */
  1416. .matchmaker-card {
  1417. margin: 20rpx 30rpx;
  1418. background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  1419. border-radius: 20rpx;
  1420. padding: 25rpx;
  1421. text-align: center;
  1422. box-shadow: 0 4rpx 20rpx rgba(255, 193, 7, 0.15);
  1423. border: none;
  1424. .matchmaker-text {
  1425. font-size: 28rpx;
  1426. color: #F57C00;
  1427. font-weight: 500;
  1428. display: flex;
  1429. align-items: center;
  1430. justify-content: center;
  1431. gap: 10rpx;
  1432. }
  1433. }
  1434. /* 快捷入口 - 优化版 */
  1435. .quick-actions {
  1436. margin: 20rpx 30rpx;
  1437. background: rgba(255, 255, 255, 0.95);
  1438. backdrop-filter: blur(10rpx);
  1439. border-radius: 20rpx;
  1440. padding: 45rpx 30rpx;
  1441. display: flex;
  1442. justify-content: space-around;
  1443. box-shadow: 0 4rpx 25rpx rgba(0, 0, 0, 0.08);
  1444. border: none;
  1445. .action-item {
  1446. display: flex;
  1447. flex-direction: column;
  1448. align-items: center;
  1449. gap: 15rpx;
  1450. transition: all 0.3s ease;
  1451. padding: 15rpx;
  1452. border-radius: 15rpx;
  1453. &:active {
  1454. transform: translateY(2rpx);
  1455. background: rgba(255, 255, 255, 0.8);
  1456. }
  1457. .action-icon {
  1458. width: 110rpx;
  1459. height: 110rpx;
  1460. border-radius: 20rpx;
  1461. display: flex;
  1462. align-items: center;
  1463. justify-content: center;
  1464. font-size: 55rpx;
  1465. box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.1);
  1466. transition: all 0.3s ease;
  1467. border: none;
  1468. }
  1469. .action-icon:active {
  1470. transform: scale(0.95);
  1471. }
  1472. .calendar-icon {
  1473. background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%);
  1474. color: #4CAF50;
  1475. }
  1476. .phone-icon {
  1477. background: linear-gradient(135deg, #FFF3CD 0%, #FFEEBA 100%);
  1478. color: #FFA726;
  1479. }
  1480. .heart-icon {
  1481. background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  1482. color: #F44336;
  1483. }
  1484. .action-label {
  1485. font-size: 28rpx;
  1486. color: #333333;
  1487. font-weight: 500;
  1488. }
  1489. }
  1490. }
  1491. /* 功能菜单列表 - 优化版 */
  1492. .menu-list {
  1493. margin: 20rpx 30rpx 30rpx;
  1494. background: rgba(255, 255, 255, 0.95);
  1495. backdrop-filter: blur(10rpx);
  1496. border-radius: 20rpx;
  1497. overflow: hidden;
  1498. box-shadow: 0 4rpx 25rpx rgba(0, 0, 0, 0.08);
  1499. border: none;
  1500. .menu-item {
  1501. display: flex;
  1502. align-items: center;
  1503. justify-content: space-between;
  1504. padding: 40rpx 35rpx;
  1505. border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
  1506. transition: all 0.3s ease;
  1507. position: relative;
  1508. overflow: hidden;
  1509. &:before {
  1510. content: '';
  1511. position: absolute;
  1512. left: 0;
  1513. top: 0;
  1514. width: 5rpx;
  1515. height: 100%;
  1516. background: linear-gradient(135deg, #FF8A9B 0%, #FFB4C0 100%);
  1517. transform: scaleY(0);
  1518. transition: transform 0.3s ease;
  1519. }
  1520. &:last-child {
  1521. border-bottom: none;
  1522. }
  1523. &:active {
  1524. background: linear-gradient(135deg, #FFF8FA 0%, #FFF0F2 100%);
  1525. transform: translateX(5rpx);
  1526. &:before {
  1527. transform: scaleY(1);
  1528. }
  1529. }
  1530. .menu-left {
  1531. display: flex;
  1532. align-items: center;
  1533. gap: 25rpx;
  1534. .menu-icon {
  1535. font-size: 48rpx;
  1536. transition: transform 0.3s ease;
  1537. }
  1538. .menu-text {
  1539. font-size: 32rpx;
  1540. color: #333333;
  1541. font-weight: 500;
  1542. transition: color 0.3s ease;
  1543. }
  1544. }
  1545. .menu-arrow {
  1546. font-size: 48rpx;
  1547. color: #E0E0E0;
  1548. font-weight: 300;
  1549. transition: color 0.3s ease;
  1550. }
  1551. &:active .menu-arrow {
  1552. color: #FF8A9B;
  1553. transform: translateX(5rpx);
  1554. }
  1555. }
  1556. /* 退出登录特殊样式 - 优化版 */
  1557. .menu-item.logout-item {
  1558. border-top: 3rpx solid rgba(255, 99, 132, 0.2);
  1559. background: linear-gradient(135deg, #FFF8F8 0%, #FFF0F0 100%);
  1560. .menu-left .menu-icon {
  1561. color: #F44336;
  1562. font-size: 50rpx;
  1563. }
  1564. .menu-left .menu-text {
  1565. color: #F44336;
  1566. font-weight: bold;
  1567. font-size: 34rpx;
  1568. }
  1569. .menu-arrow {
  1570. color: #F44336;
  1571. }
  1572. &:active {
  1573. background: linear-gradient(135deg, #FFEEEE 0%, #FFDDDD 100%);
  1574. }
  1575. &:before {
  1576. background: linear-gradient(135deg, #F44336 0%, #FF6B8A 100%);
  1577. }
  1578. }
  1579. }
  1580. /* 签到弹窗样式 - 优化版 */
  1581. .checkin-popup {
  1582. width: 680rpx;
  1583. max-height: 90vh;
  1584. background: rgba(255, 255, 255, 0.98);
  1585. backdrop-filter: blur(20rpx);
  1586. border-radius: 25rpx;
  1587. overflow: hidden;
  1588. display: flex;
  1589. flex-direction: column;
  1590. box-shadow: 0 10rpx 50rpx rgba(0, 0, 0, 0.15);
  1591. border: none;
  1592. .popup-header {
  1593. display: flex;
  1594. align-items: center;
  1595. justify-content: center;
  1596. padding: 40rpx 30rpx 30rpx;
  1597. position: relative;
  1598. background: linear-gradient(135deg, #FF8A9B 0%, #FFB4C0 100%);
  1599. flex-shrink: 0;
  1600. .popup-title {
  1601. font-size: 36rpx;
  1602. font-weight: bold;
  1603. color: #FFFFFF;
  1604. text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  1605. }
  1606. .close-btn {
  1607. position: absolute;
  1608. right: 25rpx;
  1609. top: 30rpx;
  1610. width: 60rpx;
  1611. height: 60rpx;
  1612. display: flex;
  1613. align-items: center;
  1614. justify-content: center;
  1615. background: rgba(255, 255, 255, 0.2);
  1616. border-radius: 50%;
  1617. transition: all 0.3s ease;
  1618. &:active {
  1619. transform: scale(0.9);
  1620. background: rgba(255, 255, 255, 0.3);
  1621. }
  1622. .close-icon {
  1623. font-size: 40rpx;
  1624. color: #FFFFFF;
  1625. line-height: 1;
  1626. }
  1627. }
  1628. }
  1629. .checkin-info {
  1630. display: flex;
  1631. justify-content: space-around;
  1632. padding: 30rpx;
  1633. background: linear-gradient(135deg, #FFF8FA 0%, #FFF0F2 100%);
  1634. flex-shrink: 0;
  1635. .info-item {
  1636. display: flex;
  1637. flex-direction: column;
  1638. align-items: center;
  1639. gap: 12rpx;
  1640. .info-label {
  1641. font-size: 24rpx;
  1642. color: #999999;
  1643. font-weight: 500;
  1644. }
  1645. .info-value {
  1646. font-size: 42rpx;
  1647. font-weight: bold;
  1648. color: #FF6B8A;
  1649. text-shadow: 0 2rpx 8rpx rgba(255, 107, 138, 0.2);
  1650. }
  1651. }
  1652. }
  1653. .checkin-content {
  1654. flex: 1;
  1655. overflow-y: auto;
  1656. max-height: 55vh;
  1657. }
  1658. .checkin-calendar {
  1659. padding: 30rpx;
  1660. .calendar-header {
  1661. text-align: center;
  1662. margin-bottom: 25rpx;
  1663. .month-text {
  1664. font-size: 30rpx;
  1665. font-weight: bold;
  1666. color: #333333;
  1667. background: linear-gradient(135deg, #FF8A9B 0%, #FFB4C0 100%);
  1668. -webkit-background-clip: text;
  1669. -webkit-text-fill-color: transparent;
  1670. background-clip: text;
  1671. }
  1672. }
  1673. .week-header {
  1674. display: flex;
  1675. margin-bottom: 15rpx;
  1676. .week-day {
  1677. flex: 1;
  1678. text-align: center;
  1679. font-size: 24rpx;
  1680. color: #666666;
  1681. font-weight: 600;
  1682. }
  1683. }
  1684. .calendar-body {
  1685. display: grid;
  1686. grid-template-columns: repeat(7, 1fr);
  1687. gap: 12rpx;
  1688. .calendar-day {
  1689. height: 80rpx;
  1690. display: flex;
  1691. align-items: center;
  1692. justify-content: center;
  1693. position: relative;
  1694. box-sizing: border-box;
  1695. border-radius: 15rpx;
  1696. transition: all 0.3s ease;
  1697. background: rgba(255, 255, 255, 0.5);
  1698. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  1699. .day-num {
  1700. font-size: 26rpx;
  1701. color: #333333;
  1702. font-weight: 500;
  1703. }
  1704. .check-mark {
  1705. position: absolute;
  1706. top: 8rpx;
  1707. right: 8rpx;
  1708. font-size: 20rpx;
  1709. color: #FFFFFF;
  1710. background: linear-gradient(135deg, #FF6B8A 0%, #FF8A9B 100%);
  1711. width: 30rpx;
  1712. height: 30rpx;
  1713. border-radius: 50%;
  1714. display: flex;
  1715. align-items: center;
  1716. justify-content: center;
  1717. box-shadow: 0 2rpx 8rpx rgba(255, 107, 138, 0.3);
  1718. }
  1719. &.empty {
  1720. visibility: hidden;
  1721. }
  1722. &.checked {
  1723. background: linear-gradient(135deg, #FFE0E6 0%, #FFCCD5 100%);
  1724. box-shadow: 0 4rpx 15rpx rgba(255, 107, 138, 0.2);
  1725. .day-num {
  1726. color: #FF6B8A;
  1727. font-weight: bold;
  1728. }
  1729. }
  1730. &.today {
  1731. background: linear-gradient(135deg, #FF6B8A 0%, #FF8A9B 100%);
  1732. box-shadow: 0 6rpx 20rpx rgba(255, 107, 138, 0.3);
  1733. .day-num {
  1734. color: #FFFFFF;
  1735. font-weight: bold;
  1736. font-size: 28rpx;
  1737. }
  1738. }
  1739. &.today.checked {
  1740. .check-mark {
  1741. background: rgba(255, 255, 255, 0.9);
  1742. color: #FF6B8A;
  1743. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  1744. }
  1745. }
  1746. }
  1747. }
  1748. }
  1749. .checkin-rewards {
  1750. padding: 25rpx 30rpx 30rpx;
  1751. background: linear-gradient(135deg, #FFF8FA 0%, #FFF0F2 100%);
  1752. flex-shrink: 0;
  1753. .rewards-title {
  1754. font-size: 30rpx;
  1755. font-weight: bold;
  1756. color: #333333;
  1757. margin-bottom: 20rpx;
  1758. display: block;
  1759. }
  1760. .rewards-list {
  1761. display: flex;
  1762. justify-content: space-between;
  1763. gap: 18rpx;
  1764. .reward-item {
  1765. flex: 1;
  1766. background: rgba(255, 255, 255, 0.9);
  1767. border-radius: 18rpx;
  1768. padding: 25rpx 15rpx;
  1769. display: flex;
  1770. flex-direction: column;
  1771. align-items: center;
  1772. position: relative;
  1773. box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.08);
  1774. transition: all 0.3s ease;
  1775. .reward-icon {
  1776. font-size: 60rpx;
  1777. margin-bottom: 15rpx;
  1778. filter: drop-shadow(0 4rpx 15rpx rgba(0, 0, 0, 0.1));
  1779. }
  1780. .reward-day {
  1781. font-size: 26rpx;
  1782. color: #666666;
  1783. margin-bottom: 12rpx;
  1784. font-weight: 500;
  1785. }
  1786. .reward-text {
  1787. font-size: 28rpx;
  1788. color: #333333;
  1789. font-weight: bold;
  1790. }
  1791. .received-mark {
  1792. position: absolute;
  1793. top: 15rpx;
  1794. right: 15rpx;
  1795. width: 36rpx;
  1796. height: 36rpx;
  1797. background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
  1798. color: #FFFFFF;
  1799. border-radius: 50%;
  1800. display: flex;
  1801. align-items: center;
  1802. justify-content: center;
  1803. font-size: 22rpx;
  1804. box-shadow: 0 2rpx 8rpx rgba(76, 175, 80, 0.3);
  1805. }
  1806. &.received {
  1807. opacity: 0.7;
  1808. transform: scale(0.95);
  1809. }
  1810. &.current {
  1811. background: linear-gradient(135deg, #FFE0E6 0%, #FFCCD5 100%);
  1812. box-shadow: 0 6rpx 20rpx rgba(255, 107, 138, 0.2);
  1813. .reward-text {
  1814. color: #FF6B8A;
  1815. }
  1816. .reward-icon {
  1817. transform: scale(1.1);
  1818. }
  1819. }
  1820. }
  1821. }
  1822. }
  1823. .checkin-button-wrapper {
  1824. padding: 0 30rpx 40rpx;
  1825. flex-shrink: 0;
  1826. .checkin-btn {
  1827. width: 100%;
  1828. background: linear-gradient(135deg, #FF6B8A 0%, #FF8A9B 100%);
  1829. color: #FFFFFF;
  1830. font-size: 34rpx;
  1831. font-weight: bold;
  1832. border-radius: 35rpx;
  1833. padding: 25rpx;
  1834. border: none;
  1835. transition: all 0.3s ease;
  1836. box-shadow: 0 6rpx 25rpx rgba(255, 107, 138, 0.3);
  1837. &:active:not(.disabled) {
  1838. transform: translateY(2rpx);
  1839. box-shadow: 0 4rpx 15rpx rgba(255, 107, 138, 0.2);
  1840. }
  1841. &.disabled {
  1842. background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
  1843. box-shadow: none;
  1844. }
  1845. &::after {
  1846. border: none;
  1847. }
  1848. }
  1849. }
  1850. }
  1851. /* 底部导航栏 - 优化版 */
  1852. .tabbar {
  1853. position: fixed;
  1854. bottom: 0;
  1855. left: 0;
  1856. right: 0;
  1857. display: flex;
  1858. background-color: #FFFFFF;
  1859. border-top: 1rpx solid #F0F0F0;
  1860. padding-bottom: constant(safe-area-inset-bottom);
  1861. padding-bottom: env(safe-area-inset-bottom);
  1862. z-index: 999;
  1863. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  1864. .tabbar-item {
  1865. flex: 1;
  1866. display: flex;
  1867. flex-direction: column;
  1868. align-items: center;
  1869. justify-content: center;
  1870. padding: 10rpx 0;
  1871. position: relative;
  1872. transition: all 0.3s ease;
  1873. .tabbar-icon {
  1874. font-size: 48rpx;
  1875. margin-bottom: 8rpx;
  1876. transition: all 0.3s ease;
  1877. }
  1878. .first-icon{
  1879. width: 20px;
  1880. height: 20px;
  1881. margin-bottom: 5px;
  1882. margin-top: 5px;
  1883. }
  1884. .tabbar-text {
  1885. font-size: 24rpx;
  1886. color: #999999;
  1887. transition: all 0.3s ease;
  1888. font-weight: 500;
  1889. }
  1890. &.active {
  1891. transform: translateY(-5rpx);
  1892. .tabbar-icon {
  1893. color: #FF6B8A;
  1894. transform: scale(1.1);
  1895. filter: drop-shadow(0 4rpx 15rpx rgba(255, 107, 138, 0.3));
  1896. }
  1897. .tabbar-text {
  1898. color: #722F37;
  1899. font-weight: bold;
  1900. }
  1901. }
  1902. &:active:not(.active) {
  1903. transform: translateY(2rpx);
  1904. }
  1905. }
  1906. }
  1907. .tabbar-badge {
  1908. position: absolute;
  1909. top: 8rpx;
  1910. right: 50%;
  1911. margin-right: -40rpx;
  1912. min-width: 36rpx;
  1913. height: 36rpx;
  1914. line-height: 36rpx;
  1915. padding: 0 10rpx;
  1916. background: linear-gradient(135deg, #FF6B8A 0%, #FF8A9B 100%);
  1917. border-radius: 18rpx;
  1918. font-size: 22rpx;
  1919. color: #FFFFFF;
  1920. text-align: center;
  1921. font-weight: bold;
  1922. box-shadow: 0 4rpx 15rpx rgba(255, 107, 138, 0.3);
  1923. transform: scale(1);
  1924. transition: all 0.3s ease;
  1925. }
  1926. .tabbar-item.active .tabbar-badge {
  1927. transform: scale(1.1);
  1928. }
  1929. </style>