mine.vue 40 KB

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