index.vue 59 KB

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