mine.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286
  1. <template>
  2. <view class="matchmaker-mine">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-btn" @click="goBack"></view>
  6. <text class="header-title">我的</text>
  7. <view class="placeholder"></view>
  8. </view>
  9. <scroll-view scroll-y class="content">
  10. <view class="content-container">
  11. <!-- 个人信息卡片 -->
  12. <view class="profile-card">
  13. <view class="profile-header">
  14. <view class="profile-avatar" :style="{ backgroundImage: `url(${profile.avatarUrl})` }"></view>
  15. <view class="profile-info">
  16. <text class="profile-name">{{ profile.realName }}</text>
  17. <view class="profile-badge">{{ profile.badge }}</view>
  18. </view>
  19. </view>
  20. <!-- 等级和积分 -->
  21. <view class="level-points">
  22. <view class="level-info">
  23. <view class="level-icon"></view>
  24. <text class="level-name">{{ profile.levelName }}</text>
  25. </view>
  26. <text class="points-value">{{ profile.points }}</text>
  27. <text class="points-label">积分</text>
  28. </view>
  29. <!-- 等级进度 -->
  30. <view class="level-progress">
  31. <text class="progress-label">距离下一等级</text>
  32. <view class="progress-bar">
  33. <view class="progress-fill" :style="{ width: profile.levelProgress + '%' }"></view>
  34. </view>
  35. <view class="progress-values">
  36. <text class="current-value">当前{{ profile.points }}</text>
  37. <text class="target-value">目标{{ profile.nextLevelPoints }}</text>
  38. </view>
  39. <view class="upgrade-tip">再获得{{ profile.pointsToNextLevel }}积分即可晋升{{ profile.nextLevelName }}等级</view>
  40. </view>
  41. </view>
  42. <!-- 功能菜单 -->
  43. <view class="function-grid">
  44. <view class="function-item" @click="showSignInPopup">
  45. <view class="function-icon calendar">22</view>
  46. <text class="function-text">签到</text>
  47. </view>
  48. <view class="function-item" @click="handleMyResources">
  49. <view class="function-icon resources"></view>
  50. <text class="function-text">我的资源</text>
  51. </view>
  52. <view class="function-item" @click="handleActivityCenter">
  53. <view class="function-icon heart-book"></view>
  54. <text class="function-text">我的活动</text>
  55. </view>
  56. <view class="function-item" @click="handlePointsMall">
  57. <view class="function-icon money"></view>
  58. <text class="function-text">我的积分</text>
  59. </view>
  60. </view>
  61. <!-- 设置选项 -->
  62. <view class="settings-section">
  63. <view class="settings-item" @click="handleEditProfile">
  64. <view class="settings-icon user"></view>
  65. <text class="settings-text">编辑资料</text>
  66. <view class="arrow-right"></view>
  67. </view>
  68. <view class="settings-item" @click="handleAccountSettings">
  69. <view class="settings-icon info"></view>
  70. <text class="settings-text">关于我们</text>
  71. <view class="arrow-right"></view>
  72. </view>
  73. <view class="settings-item" @click="handleLogout">
  74. <view class="settings-icon logout"></view>
  75. <text class="settings-text">退出登录</text>
  76. <view class="arrow-right"></view>
  77. </view>
  78. </view>
  79. </view>
  80. </scroll-view>
  81. <!-- 底部导航 -->
  82. <view class="tabbar">
  83. <view class="tabbar-item home" @click="navigateToWorkbench">
  84. <view class="tabbar-icon"></view>
  85. <text class="tabbar-text">工作台</text>
  86. </view>
  87. <view class="tabbar-item resources" @click="navigateToMyResources">
  88. <view class="tabbar-icon"></view>
  89. <text class="tabbar-text">我的资源</text>
  90. </view>
  91. <view class="tabbar-item trophy" @click="navigateToRanking">
  92. <view class="tabbar-icon"></view>
  93. <text class="tabbar-text">排行榜</text>
  94. </view>
  95. <view class="tabbar-item message" @click="navigateToMessage">
  96. <view class="tabbar-icon">
  97. <view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
  98. </view>
  99. <text class="tabbar-text">消息</text>
  100. </view>
  101. <view class="tabbar-item mine active" @click="navigateToMine">
  102. <view class="tabbar-icon"></view>
  103. <text class="tabbar-text">我的</text>
  104. </view>
  105. </view>
  106. <!-- 签到弹框 -->
  107. <uni-popup ref="signInPopup" type="center" :mask-click="false">
  108. <view class="sign-in-popup">
  109. <view class="popup-header">
  110. <text class="popup-title">每日签到</text>
  111. <view class="close-btn" @click="closeSignInPopup"></view>
  112. </view>
  113. <view class="popup-content">
  114. <!-- 签到统计 -->
  115. <view class="checkin-stats">
  116. <view class="stats-item">
  117. <text class="stats-label">已连续签到</text>
  118. <text class="stats-value">{{ continuousDays }}</text>
  119. <text class="stats-unit">天</text>
  120. </view>
  121. <view class="stats-item">
  122. <text class="stats-label">累计签到</text>
  123. <text class="stats-value">{{ totalDays }}</text>
  124. <text class="stats-unit">天</text>
  125. </view>
  126. </view>
  127. <view class="calendar-container">
  128. <view class="calendar-header">
  129. <text class="calendar-title">{{ calendarTitle }}</text>
  130. </view>
  131. <view class="calendar-week">
  132. <text class="week-day">日</text>
  133. <text class="week-day">一</text>
  134. <text class="week-day">二</text>
  135. <text class="week-day">三</text>
  136. <text class="week-day">四</text>
  137. <text class="week-day">五</text>
  138. <text class="week-day">六</text>
  139. </view>
  140. <view class="calendar-days">
  141. <view
  142. v-for="(day, index) in calendarDays"
  143. :key="index"
  144. :class="[
  145. 'calendar-day',
  146. { 'other-month': !day.isCurrentMonth },
  147. { 'today': day.isToday },
  148. { 'checked': day.isChecked },
  149. { 'today-checked': day.isToday && day.isChecked }
  150. ]"
  151. >
  152. <text class="day-text">{{ day.date }}</text>
  153. <view v-if="day.isChecked" class="check-mark">✓</view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="sign-in-reward">
  158. <text class="reward-title">签到奖励</text>
  159. <text class="reward-points">+5积分</text>
  160. </view>
  161. </view>
  162. <view class="popup-footer">
  163. <button
  164. :class="['sign-in-btn', { 'signed': isSignedToday }]"
  165. @click="doSignIn"
  166. :disabled="isSignedToday"
  167. >
  168. {{ isSignedToday ? '今日已签到' : '立即签到' }}
  169. </button>
  170. </view>
  171. </view>
  172. </uni-popup>
  173. </view>
  174. </template>
  175. <script>
  176. import api from '../../utils/api.js'
  177. export default {
  178. data() {
  179. return {
  180. profile: {
  181. realName: '',
  182. avatarUrl: '',
  183. badge: '',
  184. rating: 5.0,
  185. level: '',
  186. levelName: '',
  187. nextLevelName: '',
  188. points: 0,
  189. currentLevelPoints: 0,
  190. nextLevelPoints: 100,
  191. pointsToNextLevel: 0,
  192. levelProgress: 0
  193. },
  194. // 签到相关
  195. isSignedToday: false,
  196. continuousDays: 0,
  197. totalDays: 0,
  198. currentDate: new Date(),
  199. calendarTitle: '',
  200. calendarDays: [],
  201. signedDays: [] // 存储本月已签到的日期
  202. }
  203. },
  204. onLoad() {
  205. this.loadProfileData()
  206. this.checkSignInStatus()
  207. this.generateCalendar()
  208. },
  209. onShow() {
  210. // 从编辑资料页返回时,自动刷新个人资料
  211. this.loadProfileData()
  212. },
  213. computed: {
  214. unreadCount() {
  215. return this.$store.getters.getTotalUnread || 0
  216. }
  217. },
  218. methods: {
  219. // 生成日历数据
  220. generateCalendar() {
  221. const date = this.currentDate || new Date()
  222. const year = date.getFullYear()
  223. const month = date.getMonth()
  224. // 设置日历标题
  225. this.calendarTitle = `${year}年·${month + 1}月`
  226. // 获取当月第一天
  227. const firstDay = new Date(year, month, 1)
  228. // 获取当月第一天是星期几(0-6,0表示周日)
  229. const firstDayWeek = firstDay.getDay()
  230. // 获取当月最后一天
  231. const lastDay = new Date(year, month + 1, 0)
  232. // 获取当月最后一天的日期
  233. const lastDayDate = lastDay.getDate()
  234. // 获取上个月最后一天的日期
  235. const prevMonthLastDay = new Date(year, month, 0).getDate()
  236. const days = []
  237. // 添加上个月的日期
  238. for (let i = firstDayWeek - 1; i >= 0; i--) {
  239. days.push({
  240. date: prevMonthLastDay - i,
  241. isCurrentMonth: false,
  242. isToday: false,
  243. isChecked: false
  244. })
  245. }
  246. // 添加当月的日期
  247. const today = new Date()
  248. const isCurrentMonth = today.getFullYear() === year && today.getMonth() === month
  249. for (let i = 1; i <= lastDayDate; i++) {
  250. const isToday = isCurrentMonth && today.getDate() === i
  251. // 检查该日期是否已签到
  252. const isChecked = isToday && this.isSignedToday || this.signedDays.includes(i)
  253. days.push({
  254. date: i,
  255. isCurrentMonth: true,
  256. isToday: isToday,
  257. isChecked: isChecked
  258. })
  259. }
  260. // 添加下个月的日期,补满6行
  261. const totalDays = 42 // 6行7列
  262. const nextMonthDays = totalDays - days.length
  263. for (let i = 1; i <= nextMonthDays; i++) {
  264. days.push({
  265. date: i,
  266. isCurrentMonth: false,
  267. isToday: false,
  268. isChecked: false
  269. })
  270. }
  271. this.calendarDays = days
  272. },
  273. // 加载个人资料数据
  274. async loadProfileData() {
  275. try {
  276. const userInfo = uni.getStorageSync('userInfo')
  277. console.log('从本地存储获取到的用户信息:', userInfo)
  278. // 模拟用户信息,用于测试
  279. const testUserId = 19
  280. const userId = userInfo && userInfo.userId ? userInfo.userId : testUserId
  281. console.log('使用的userId:', userId)
  282. // 调用API获取红娘信息
  283. console.log('开始调用API获取红娘信息...')
  284. const matchmakerInfo = await api.matchmaker.getByUserId(userId)
  285. console.log('API调用结果:', matchmakerInfo)
  286. if (matchmakerInfo) {
  287. const levelNames = ['', '青铜', '白银', '黄金', '铂金', '钻石']
  288. const currentLevel = matchmakerInfo.level || 1
  289. const nextLevel = currentLevel < 5 ? currentLevel + 1 : 5
  290. const nextLevelName = levelNames[nextLevel]
  291. const defaultAvatars = {
  292. male: 'http://115.190.125.125:9000/dynamic-comments/dynamics/5c645152-9940-41d3-83a9-69ee6e0c0aaa.png',
  293. female: 'http://115.190.125.125:9000/dynamic-comments/dynamics/c7fb04d7-ee4d-4b3d-bcef-f246da9c841f.png'
  294. }
  295. const avatarUrl = matchmakerInfo.avatarUrl || matchmakerInfo.avatar_url || (matchmakerInfo.gender === 1 ? defaultAvatars.male : defaultAvatars.female)
  296. console.log('获取到的红娘信息:', matchmakerInfo)
  297. this.profile = {
  298. realName: matchmakerInfo.real_name || '',
  299. avatarUrl: avatarUrl,
  300. badge: matchmakerInfo.type_name || '',
  301. rating: matchmakerInfo.rating || 5.0,
  302. level: currentLevel,
  303. levelName: matchmakerInfo.level_name || levelNames[currentLevel],
  304. nextLevelName: nextLevelName,
  305. points: matchmakerInfo.points || 0,
  306. currentLevelPoints: matchmakerInfo.current_level_points || 0,
  307. nextLevelPoints: matchmakerInfo.next_level_points || 100,
  308. pointsToNextLevel: matchmakerInfo.points_to_next_level || 0,
  309. levelProgress: matchmakerInfo.level_progress || 0
  310. }
  311. console.log('更新后的profile数据:', this.profile)
  312. } else {
  313. console.log('matchmakerInfo为空,无法更新profile数据')
  314. }
  315. } catch (error) {
  316. console.error('加载个人资料失败:', error)
  317. uni.showToast({
  318. title: '加载失败,请稍后重试: ' + error.message,
  319. icon: 'none'
  320. })
  321. }
  322. },
  323. // 返回上一页
  324. goBack() {
  325. uni.navigateBack()
  326. },
  327. // 检查今日是否已签到
  328. async checkSignInStatus() {
  329. try {
  330. const userInfo = uni.getStorageSync('userInfo')
  331. if (!userInfo || !userInfo.userId) {
  332. this.isSignedToday = false
  333. this.continuousDays = 0
  334. this.totalDays = 0
  335. this.signedDays = []
  336. console.warn('没有有效的userId,无法检查签到状态')
  337. return
  338. }
  339. // 首先获取红娘信息,以获取makerId
  340. const matchmakerInfo = await api.matchmaker.getByUserId(userInfo.userId)
  341. if (!matchmakerInfo || !matchmakerInfo.matchmakerId && !matchmakerInfo.matchmaker_id) {
  342. this.isSignedToday = false
  343. this.continuousDays = 0
  344. this.totalDays = 0
  345. this.signedDays = []
  346. console.warn('没有有效的makerId,无法检查签到状态')
  347. return
  348. }
  349. const makerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id
  350. // 检查今日是否已签到
  351. const res = await api.matchmaker.checkinStatus(makerId)
  352. console.log('检查签到状态返回结果:', res)
  353. let signed = false
  354. if (typeof res === 'boolean') {
  355. signed = res
  356. } else if (typeof res === 'string') {
  357. signed = res === 'true'
  358. } else if (typeof res === 'number') {
  359. signed = res === 1
  360. } else if (res && typeof res === 'object') {
  361. if (typeof res.todaySigned === 'boolean') signed = res.todaySigned
  362. else if (typeof res.signed === 'boolean') signed = res.signed
  363. else if (typeof res.isSignedToday === 'boolean') signed = res.isSignedToday
  364. else if (typeof res.data === 'object' && res.data) {
  365. if (typeof res.data.todaySigned === 'boolean') signed = res.data.todaySigned
  366. else if (typeof res.data.signed === 'boolean') signed = res.data.signed
  367. else if (typeof res.data.isSignedToday === 'boolean') signed = res.data.isSignedToday
  368. }
  369. }
  370. this.isSignedToday = !!signed
  371. // 获取签到统计
  372. const stats = await api.matchmaker.checkinStats(makerId)
  373. console.log('获取签到统计返回结果:', stats)
  374. // 初始化签到记录数组
  375. this.signedDays = []
  376. if (stats) {
  377. this.continuousDays = stats.continuousDays || 0
  378. this.totalDays = stats.totalDays || 0
  379. // 检查stats中是否包含本月的签到记录
  380. let signedDays = []
  381. // 情况1: stats直接包含signedDays数组
  382. if (stats.signedDays && Array.isArray(stats.signedDays)) {
  383. signedDays = stats.signedDays
  384. }
  385. // 情况2: stats.data包含signedDays数组
  386. else if (stats.data && stats.data.signedDays && Array.isArray(stats.data.signedDays)) {
  387. signedDays = stats.data.signedDays
  388. }
  389. // 情况3: stats是对象,直接包含日期属性
  390. else if (typeof stats === 'object') {
  391. // 处理stats对象
  392. const processStats = (obj) => {
  393. const days = []
  394. // 遍历对象,寻找日期相关的属性
  395. for (const key in obj) {
  396. if (obj.hasOwnProperty(key)) {
  397. // 检查是否是日期相关的属性
  398. const value = obj[key]
  399. // 检查是否是日期格式
  400. if (typeof value === 'object' && value !== null && typeof value.isChecked === 'boolean') {
  401. // 如果是包含isChecked属性的对象,且isChecked为true
  402. if (value.isChecked && typeof value.date === 'number') {
  403. days.push(value.date)
  404. }
  405. }
  406. }
  407. }
  408. return days
  409. }
  410. // 先处理stats对象本身
  411. signedDays = processStats(stats)
  412. // 如果stats.data存在,也处理一下
  413. if (stats.data && typeof stats.data === 'object') {
  414. signedDays = [...signedDays, ...processStats(stats.data)]
  415. }
  416. }
  417. // 检查签到状态响应中是否包含签到记录
  418. if (signedDays.length === 0 && res && typeof res === 'object') {
  419. const processRes = (obj) => {
  420. const days = []
  421. if (obj.signedDays && Array.isArray(obj.signedDays)) {
  422. days.push(...obj.signedDays)
  423. }
  424. return days
  425. }
  426. signedDays = processRes(res)
  427. if (res.data && typeof res.data === 'object') {
  428. signedDays = [...signedDays, ...processRes(res.data)]
  429. }
  430. }
  431. // 检查今日是否已签到,如果已签到但不在signedDays中,添加进去
  432. const today = new Date().getDate()
  433. if (this.isSignedToday && !signedDays.includes(today)) {
  434. signedDays.push(today)
  435. }
  436. // 去重并排序
  437. this.signedDays = [...new Set(signedDays)].sort((a, b) => a - b)
  438. }
  439. console.log('最终的signedDays:', this.signedDays)
  440. } catch (error) {
  441. console.error('检查签到状态失败:', error)
  442. this.isSignedToday = false
  443. this.continuousDays = 0
  444. this.totalDays = 0
  445. this.signedDays = []
  446. }
  447. },
  448. // 显示签到弹框
  449. async showSignInPopup() {
  450. // 显示弹窗前刷新签到状态和记录
  451. await this.checkSignInStatus()
  452. this.generateCalendar()
  453. this.$refs.signInPopup.open()
  454. },
  455. // 关闭签到弹框
  456. closeSignInPopup() {
  457. this.$refs.signInPopup.close()
  458. },
  459. // 执行签到
  460. async doSignIn() {
  461. try {
  462. const userInfo = uni.getStorageSync('userInfo')
  463. if (!userInfo || !userInfo.userId) {
  464. uni.showToast({
  465. title: '请先登录',
  466. icon: 'none'
  467. })
  468. setTimeout(() => {
  469. uni.navigateTo({
  470. url: '/pages/page3/page3'
  471. })
  472. }, 1000)
  473. return
  474. }
  475. // 首先获取红娘信息,以获取makerId
  476. const matchmakerInfo = await api.matchmaker.getByUserId(userInfo.userId)
  477. if (!matchmakerInfo || !matchmakerInfo.matchmakerId && !matchmakerInfo.matchmaker_id) {
  478. uni.showToast({
  479. title: '没有有效的makerId,无法签到',
  480. icon: 'none'
  481. })
  482. return
  483. }
  484. const makerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id
  485. // 执行签到
  486. const res = await api.matchmaker.doCheckin(makerId)
  487. console.log('签到API返回结果:', res)
  488. let success = false
  489. let alreadySigned = false
  490. if (typeof res === 'boolean') {
  491. success = res
  492. } else if (typeof res === 'string') {
  493. success = res === 'true' || res === 'ok' || res === 'success'
  494. } else if (res && typeof res === 'object') {
  495. if (typeof res.success === 'boolean') success = res.success
  496. if (typeof res.todaySigned === 'boolean') alreadySigned = res.todaySigned
  497. else if (typeof res.signed === 'boolean') alreadySigned = res.signed
  498. else if (typeof res.isSignedToday === 'boolean') alreadySigned = res.isSignedToday
  499. if (res.data && typeof res.data === 'object') {
  500. if (typeof res.data.success === 'boolean') success = res.data.success
  501. if (typeof res.data.todaySigned === 'boolean') alreadySigned = res.data.todaySigned
  502. else if (typeof res.data.signed === 'boolean') alreadySigned = res.data.signed
  503. else if (typeof res.data.isSignedToday === 'boolean') alreadySigned = res.data.isSignedToday
  504. }
  505. }
  506. if (success) {
  507. uni.showToast({
  508. title: '签到成功',
  509. icon: 'success'
  510. })
  511. this.isSignedToday = true
  512. // 更新签到记录
  513. const today = new Date()
  514. const todayDate = today.getDate()
  515. if (!this.signedDays.includes(todayDate)) {
  516. this.signedDays.push(todayDate)
  517. this.signedDays.sort((a, b) => a - b)
  518. }
  519. this.generateCalendar()
  520. this.loadProfileData()
  521. this.closeSignInPopup()
  522. } else if (alreadySigned) {
  523. uni.showToast({
  524. title: '今日已签到',
  525. icon: 'none'
  526. })
  527. } else {
  528. uni.showToast({
  529. title: '签到失败,请稍后重试',
  530. icon: 'none'
  531. })
  532. }
  533. } catch (error) {
  534. console.error('签到失败:', error)
  535. uni.showToast({
  536. title: error.msg || '签到失败,请稍后重试',
  537. icon: 'none'
  538. })
  539. }
  540. },
  541. // 签到(旧方法,保持兼容)
  542. handleSignIn() {
  543. this.showSignInPopup()
  544. },
  545. // 我的资源
  546. handleMyResources() {
  547. uni.navigateTo({
  548. url: '/pages/matchmaker-workbench/my-resources'
  549. })
  550. },
  551. // 我的活动
  552. handleActivityCenter() {
  553. uni.navigateTo({
  554. url: '/pages/matchmaker-workbench/my-activities'
  555. })
  556. },
  557. // 积分商城
  558. handlePointsMall() {
  559. uni.navigateTo({
  560. url: '/pages/matchmaker-workbench/points-mall'
  561. })
  562. },
  563. // 编辑资料
  564. handleEditProfile() {
  565. console.log('编辑资料')
  566. uni.navigateTo({
  567. url: '/pages/matchmaker-workbench/edit-profile'
  568. })
  569. },
  570. // 关于我们
  571. handleAccountSettings() {
  572. uni.navigateTo({
  573. url: '/pages/settings/about'
  574. })
  575. },
  576. // 退出登录
  577. handleLogout() {
  578. uni.showModal({
  579. title: '退出登录',
  580. content: '确定要退出登录吗?',
  581. success: (res) => {
  582. if (res.confirm) {
  583. uni.removeStorageSync('token')
  584. uni.removeStorageSync('userInfo')
  585. uni.navigateTo({
  586. url: '/pages/page3/page3'
  587. })
  588. }
  589. }
  590. })
  591. },
  592. // 导航到工作台
  593. navigateToWorkbench() {
  594. uni.navigateTo({
  595. url: '/pages/matchmaker-workbench/index'
  596. })
  597. },
  598. // 导航到我的资源
  599. navigateToMyResources() {
  600. uni.navigateTo({
  601. url: '/pages/matchmaker-workbench/my-resources'
  602. })
  603. },
  604. // 导航到排行榜
  605. navigateToRanking() {
  606. uni.navigateTo({
  607. url: '/pages/matchmaker-workbench/ranking'
  608. })
  609. },
  610. // 导航到消息
  611. navigateToMessage() {
  612. uni.navigateTo({
  613. url: '/pages/matchmaker-workbench/message'
  614. })
  615. },
  616. // 导航到我的
  617. navigateToMine() {
  618. // 已在我的页面,无需跳转
  619. }
  620. }
  621. }
  622. </script>
  623. <style lang="scss" scoped>
  624. .matchmaker-mine {
  625. min-height: 100vh;
  626. background: #FFF9F9;
  627. display: flex;
  628. flex-direction: column;
  629. }
  630. /* 顶部导航栏 */
  631. .header {
  632. display: flex;
  633. align-items: center;
  634. justify-content: space-between;
  635. padding: 25rpx 30rpx;
  636. padding-top: calc(25rpx + env(safe-area-inset-top));
  637. background: #FFF9F9;
  638. border-bottom: 1rpx solid #F0F0F0;
  639. .back-btn {
  640. width: 70rpx;
  641. height: 70rpx;
  642. display: flex;
  643. align-items: center;
  644. justify-content: center;
  645. background: rgba(240, 240, 240, 0.5);
  646. border-radius: 50%;
  647. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
  648. background-size: 40rpx 40rpx;
  649. background-repeat: no-repeat;
  650. background-position: center;
  651. }
  652. .header-title {
  653. font-size: 38rpx;
  654. font-weight: bold;
  655. color: #333;
  656. }
  657. .placeholder {
  658. width: 70rpx;
  659. }
  660. }
  661. .content {
  662. flex: 1;
  663. padding: 0;
  664. }
  665. .content-container {
  666. padding: 20rpx 30rpx 120rpx;
  667. }
  668. /* 个人信息卡片 */
  669. .profile-card {
  670. background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  671. border-radius: 25rpx;
  672. padding: 35rpx;
  673. margin-bottom: 25rpx;
  674. box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1);
  675. }
  676. .profile-header {
  677. display: flex;
  678. align-items: center;
  679. margin-bottom: 30rpx;
  680. .profile-avatar {
  681. width: 160rpx;
  682. height: 160rpx;
  683. border-radius: 50%;
  684. background-size: cover;
  685. background-repeat: no-repeat;
  686. background-position: center;
  687. margin-right: 25rpx;
  688. border: 2rpx solid #FFF;
  689. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  690. }
  691. .profile-info {
  692. flex: 1;
  693. .profile-name {
  694. display: block;
  695. font-size: 36rpx;
  696. font-weight: bold;
  697. color: #333;
  698. margin-bottom: 10rpx;
  699. }
  700. .profile-badge {
  701. display: inline-block;
  702. background: #FFD700;
  703. color: #FFFFFF;
  704. font-size: 24rpx;
  705. font-weight: bold;
  706. padding: 6rpx 16rpx;
  707. border-radius: 15rpx;
  708. margin-bottom: 10rpx;
  709. }
  710. .profile-rating {
  711. display: block;
  712. font-size: 28rpx;
  713. color: #666;
  714. }
  715. }
  716. }
  717. /* 等级和积分 */
  718. .level-points {
  719. display: flex;
  720. align-items: center;
  721. justify-content: space-between;
  722. margin-bottom: 30rpx;
  723. .level-info {
  724. display: flex;
  725. align-items: center;
  726. gap: 10rpx;
  727. .level-icon {
  728. width: 44rpx;
  729. height: 44rpx;
  730. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
  731. background-size: contain;
  732. background-repeat: no-repeat;
  733. background-position: center;
  734. }
  735. .level-name {
  736. font-size: 32rpx;
  737. font-weight: bold;
  738. color: #FF9800;
  739. }
  740. }
  741. .points-value {
  742. font-size: 48rpx;
  743. font-weight: bold;
  744. color: #E91E63;
  745. }
  746. .points-label {
  747. font-size: 28rpx;
  748. color: #666;
  749. }
  750. }
  751. /* 等级进度 */
  752. .level-progress {
  753. .progress-label {
  754. display: block;
  755. font-size: 26rpx;
  756. color: #333;
  757. margin-bottom: 15rpx;
  758. }
  759. .progress-bar {
  760. width: 100%;
  761. height: 12rpx;
  762. background: rgba(255, 255, 255, 0.5);
  763. border-radius: 6rpx;
  764. margin-bottom: 10rpx;
  765. .progress-fill {
  766. height: 100%;
  767. background: #FFB74D;
  768. border-radius: 6rpx;
  769. }
  770. }
  771. .progress-values {
  772. display: flex;
  773. justify-content: space-between;
  774. margin-bottom: 15rpx;
  775. .current-value,
  776. .target-value {
  777. font-size: 24rpx;
  778. color: #666;
  779. }
  780. }
  781. .upgrade-tip {
  782. display: block;
  783. background: rgba(255, 255, 255, 0.3);
  784. color: #E91E63;
  785. font-size: 26rpx;
  786. font-weight: bold;
  787. padding: 15rpx;
  788. border-radius: 15rpx;
  789. text-align: center;
  790. }
  791. }
  792. /* 功能菜单 */
  793. .function-grid {
  794. display: grid;
  795. grid-template-columns: repeat(4, 1fr);
  796. gap: 25rpx;
  797. padding: 35rpx;
  798. background: #FFFFFF;
  799. border-radius: 20rpx;
  800. margin-bottom: 20rpx;
  801. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  802. .function-item {
  803. display: flex;
  804. flex-direction: column;
  805. align-items: center;
  806. gap: 15rpx;
  807. .function-icon {
  808. width: 90rpx;
  809. height: 90rpx;
  810. border-radius: 50%;
  811. background-size: 50rpx 50rpx;
  812. background-repeat: no-repeat;
  813. background-position: center;
  814. &.calendar {
  815. background-color: #FFF3E0;
  816. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FF9800"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>');
  817. display: flex;
  818. align-items: center;
  819. justify-content: center;
  820. font-size: 32rpx;
  821. font-weight: bold;
  822. color: #FF9800;
  823. }
  824. &.resources {
  825. background-color: #E8F5E9;
  826. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234CAF50"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  827. }
  828. &.heart-book {
  829. background-color: #FFEBEE;
  830. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23F44336"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>');
  831. }
  832. &.money {
  833. background-color: #F3E5F5;
  834. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>');
  835. }
  836. }
  837. .function-text {
  838. font-size: 26rpx;
  839. color: #333;
  840. }
  841. }
  842. }
  843. /* 设置选项 */
  844. .settings-section {
  845. background: #FFFFFF;
  846. border-radius: 20rpx;
  847. padding: 0;
  848. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  849. .settings-item {
  850. display: flex;
  851. align-items: center;
  852. justify-content: space-between;
  853. padding: 25rpx 35rpx;
  854. margin-bottom: 0;
  855. background: #FFFFFF;
  856. border-radius: 20rpx;
  857. &:last-child {
  858. margin-bottom: 0;
  859. }
  860. .settings-icon {
  861. width: 44rpx;
  862. height: 44rpx;
  863. background-size: contain;
  864. background-repeat: no-repeat;
  865. background-position: center;
  866. margin-right: 20rpx;
  867. }
  868. .settings-icon.user {
  869. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  870. }
  871. .settings-icon.gear {
  872. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/></svg>');
  873. }
  874. .settings-icon.logout {
  875. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"/></svg>');
  876. }
  877. .settings-icon.info {
  878. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
  879. }
  880. .settings-text {
  881. flex: 1;
  882. font-size: 30rpx;
  883. color: #333;
  884. }
  885. .arrow-right {
  886. width: 24rpx;
  887. height: 24rpx;
  888. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg>');
  889. background-size: contain;
  890. background-repeat: no-repeat;
  891. background-position: center;
  892. }
  893. }
  894. }
  895. /* 底部导航 */
  896. .tabbar {
  897. position: fixed;
  898. bottom: 0;
  899. left: 0;
  900. right: 0;
  901. height: 100rpx;
  902. background: #FFFFFF;
  903. border-top: 1rpx solid #F0F0F0;
  904. display: flex;
  905. justify-content: space-around;
  906. align-items: center;
  907. padding-bottom: env(safe-area-inset-bottom);
  908. .tabbar-item {
  909. display: flex;
  910. flex-direction: column;
  911. align-items: center;
  912. gap: 8rpx;
  913. padding: 10rpx 0;
  914. .tabbar-icon {
  915. width: 44rpx;
  916. height: 44rpx;
  917. background-size: contain;
  918. background-repeat: no-repeat;
  919. background-position: center;
  920. position: relative;
  921. .badge {
  922. position: absolute;
  923. top: -8rpx;
  924. right: -8rpx;
  925. background: #FF4444;
  926. color: #FFFFFF;
  927. font-size: 20rpx;
  928. font-weight: bold;
  929. width: 32rpx;
  930. height: 32rpx;
  931. display: flex;
  932. align-items: center;
  933. justify-content: center;
  934. border-radius: 16rpx;
  935. }
  936. }
  937. .tabbar-text {
  938. font-size: 20rpx;
  939. color: #999;
  940. }
  941. &.active {
  942. .tabbar-text {
  943. color: #9C27B0;
  944. font-weight: bold;
  945. }
  946. }
  947. &.home .tabbar-icon {
  948. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  949. }
  950. &.active.home .tabbar-icon {
  951. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  952. }
  953. &.resources .tabbar-icon {
  954. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  955. }
  956. &.active.resources .tabbar-icon {
  957. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>');
  958. }
  959. &.trophy .tabbar-icon {
  960. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"/></svg>');
  961. }
  962. &.active.trophy .tabbar-icon {
  963. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"/></svg>');
  964. }
  965. &.message .tabbar-icon {
  966. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>');
  967. }
  968. &.active.message .tabbar-icon {
  969. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>');
  970. }
  971. &.mine .tabbar-icon {
  972. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  973. }
  974. &.mine.active .tabbar-icon {
  975. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  976. }
  977. }
  978. }
  979. /* 签到弹框样式 */
  980. .sign-in-popup {
  981. width: 600rpx;
  982. background: #FFFFFF;
  983. border-radius: 20rpx;
  984. overflow: hidden;
  985. .popup-header {
  986. display: flex;
  987. justify-content: space-between;
  988. align-items: center;
  989. padding: 30rpx;
  990. background: #FFEBEE;
  991. border-bottom: none;
  992. .popup-title {
  993. font-size: 36rpx;
  994. font-weight: bold;
  995. color: #E91E63;
  996. }
  997. .close-btn {
  998. width: 40rpx;
  999. height: 40rpx;
  1000. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23E91E63"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
  1001. background-size: contain;
  1002. background-repeat: no-repeat;
  1003. background-position: center;
  1004. }
  1005. }
  1006. .popup-content {
  1007. padding: 20rpx 30rpx 30rpx;
  1008. /* 签到统计 */
  1009. .checkin-stats {
  1010. display: flex;
  1011. justify-content: space-around;
  1012. margin-bottom: 30rpx;
  1013. padding: 20rpx;
  1014. background: #FFF3E0;
  1015. border-radius: 15rpx;
  1016. .stats-item {
  1017. display: flex;
  1018. flex-direction: column;
  1019. align-items: center;
  1020. gap: 10rpx;
  1021. .stats-label {
  1022. font-size: 24rpx;
  1023. color: #666;
  1024. }
  1025. .stats-value {
  1026. font-size: 48rpx;
  1027. font-weight: bold;
  1028. color: #E91E63;
  1029. }
  1030. .stats-unit {
  1031. font-size: 24rpx;
  1032. color: #666;
  1033. }
  1034. }
  1035. }
  1036. .calendar-container {
  1037. background: #FFFFFF;
  1038. border-radius: 15rpx;
  1039. padding: 20rpx;
  1040. margin-bottom: 30rpx;
  1041. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  1042. .calendar-header {
  1043. display: flex;
  1044. justify-content: center;
  1045. align-items: center;
  1046. margin-bottom: 20rpx;
  1047. .calendar-title {
  1048. font-size: 28rpx;
  1049. font-weight: bold;
  1050. color: #333;
  1051. }
  1052. }
  1053. .calendar-week {
  1054. display: grid;
  1055. grid-template-columns: repeat(7, 1fr);
  1056. gap: 10rpx;
  1057. margin-bottom: 20rpx;
  1058. .week-day {
  1059. text-align: center;
  1060. font-size: 24rpx;
  1061. color: #999;
  1062. font-weight: bold;
  1063. }
  1064. }
  1065. .calendar-days {
  1066. display: grid;
  1067. grid-template-columns: repeat(7, 1fr);
  1068. gap: 15rpx;
  1069. .calendar-day {
  1070. text-align: center;
  1071. font-size: 28rpx;
  1072. color: #333;
  1073. background: #F5F5F5;
  1074. border-radius: 8rpx;
  1075. height: 70rpx;
  1076. display: flex;
  1077. flex-direction: column;
  1078. align-items: center;
  1079. justify-content: center;
  1080. position: relative;
  1081. &.other-month {
  1082. color: #CCCCCC;
  1083. background: #F9F9F9;
  1084. }
  1085. &.today {
  1086. background: #FFF3E0;
  1087. color: #FF9800;
  1088. font-weight: bold;
  1089. }
  1090. &.checked {
  1091. background: #FFCDD2;
  1092. color: #E91E63;
  1093. font-weight: bold;
  1094. }
  1095. &.today-checked {
  1096. background: #E91E63;
  1097. color: #FFFFFF;
  1098. font-weight: bold;
  1099. }
  1100. .check-mark {
  1101. position: absolute;
  1102. bottom: 5rpx;
  1103. right: 5rpx;
  1104. font-size: 18rpx;
  1105. color: #FFFFFF;
  1106. background: #E91E63;
  1107. border-radius: 50%;
  1108. width: 24rpx;
  1109. height: 24rpx;
  1110. display: flex;
  1111. align-items: center;
  1112. justify-content: center;
  1113. }
  1114. .today-checked .check-mark {
  1115. background: #FFFFFF;
  1116. color: #E91E63;
  1117. }
  1118. }
  1119. }
  1120. }
  1121. .sign-in-reward {
  1122. display: flex;
  1123. flex-direction: column;
  1124. align-items: center;
  1125. gap: 10rpx;
  1126. .reward-title {
  1127. font-size: 28rpx;
  1128. color: #666;
  1129. }
  1130. .reward-points {
  1131. font-size: 48rpx;
  1132. font-weight: bold;
  1133. color: #E91E63;
  1134. }
  1135. }
  1136. }
  1137. .popup-footer {
  1138. padding: 0 30rpx 30rpx;
  1139. .sign-in-btn {
  1140. width: 100%;
  1141. height: 80rpx;
  1142. background: #E91E63;
  1143. color: #FFFFFF;
  1144. font-size: 32rpx;
  1145. border-radius: 40rpx;
  1146. border: none;
  1147. font-weight: bold;
  1148. transition: all 0.3s;
  1149. &:hover {
  1150. background: #C2185B;
  1151. }
  1152. &.signed {
  1153. background: #E0E0E0;
  1154. color: #9E9E9E;
  1155. cursor: not-allowed;
  1156. &:hover {
  1157. background: #E0E0E0;
  1158. }
  1159. }
  1160. }
  1161. }
  1162. }
  1163. </style>