mine.vue 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  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. // 使用userId进行签到(后端会根据userId查询matchmaker并添加积分)
  476. const res = await api.matchmaker.doCheckin(userInfo.userId)
  477. console.log('签到API返回结果:', res)
  478. // 判断签到结果
  479. let success = false
  480. let alreadySigned = false
  481. // 后端返回格式: { code: 200, msg: "签到成功", data: true/false }
  482. if (res === true) {
  483. success = true
  484. } else if (res === false) {
  485. alreadySigned = true
  486. } else if (res && typeof res === 'object') {
  487. if (res.data === true) {
  488. success = true
  489. } else if (res.data === false || res.msg === '今日已签到') {
  490. alreadySigned = true
  491. }
  492. }
  493. if (success) {
  494. uni.showToast({
  495. title: '签到成功,+5积分',
  496. icon: 'success'
  497. })
  498. this.isSignedToday = true
  499. // 更新签到记录
  500. const today = new Date()
  501. const todayDate = today.getDate()
  502. if (!this.signedDays.includes(todayDate)) {
  503. this.signedDays.push(todayDate)
  504. this.signedDays.sort((a, b) => a - b)
  505. }
  506. this.generateCalendar()
  507. // 刷新个人资料(包含积分)
  508. await this.loadProfileData()
  509. this.closeSignInPopup()
  510. } else if (alreadySigned) {
  511. this.isSignedToday = true
  512. uni.showToast({
  513. title: '今日已签到',
  514. icon: 'none'
  515. })
  516. } else {
  517. uni.showToast({
  518. title: '签到失败,请稍后重试',
  519. icon: 'none'
  520. })
  521. }
  522. } catch (error) {
  523. console.error('签到失败:', error)
  524. // 检查是否是已签到的错误
  525. if (error.msg && error.msg.includes('已签到')) {
  526. this.isSignedToday = true
  527. uni.showToast({
  528. title: '今日已签到',
  529. icon: 'none'
  530. })
  531. } else {
  532. uni.showToast({
  533. title: error.msg || '签到失败,请稍后重试',
  534. icon: 'none'
  535. })
  536. }
  537. }
  538. },
  539. // 签到(旧方法,保持兼容)
  540. handleSignIn() {
  541. this.showSignInPopup()
  542. },
  543. // 我的资源
  544. handleMyResources() {
  545. uni.navigateTo({
  546. url: '/pages/matchmaker-workbench/my-resources'
  547. })
  548. },
  549. // 我的活动
  550. handleActivityCenter() {
  551. uni.navigateTo({
  552. url: '/pages/matchmaker-workbench/my-activities'
  553. })
  554. },
  555. // 积分商城
  556. handlePointsMall() {
  557. uni.navigateTo({
  558. url: '/pages/matchmaker-workbench/points-mall'
  559. })
  560. },
  561. // 编辑资料
  562. handleEditProfile() {
  563. console.log('编辑资料')
  564. uni.navigateTo({
  565. url: '/pages/matchmaker-workbench/edit-profile'
  566. })
  567. },
  568. // 关于我们
  569. handleAccountSettings() {
  570. uni.navigateTo({
  571. url: '/pages/settings/about'
  572. })
  573. },
  574. // 退出登录
  575. handleLogout() {
  576. uni.showModal({
  577. title: '退出登录',
  578. content: '确定要退出登录吗?',
  579. success: (res) => {
  580. if (res.confirm) {
  581. uni.removeStorageSync('token')
  582. uni.removeStorageSync('userInfo')
  583. uni.navigateTo({
  584. url: '/pages/page3/page3'
  585. })
  586. }
  587. }
  588. })
  589. },
  590. // 导航到工作台
  591. navigateToWorkbench() {
  592. uni.navigateTo({
  593. url: '/pages/matchmaker-workbench/index'
  594. })
  595. },
  596. // 导航到我的资源
  597. navigateToMyResources() {
  598. uni.navigateTo({
  599. url: '/pages/matchmaker-workbench/my-resources'
  600. })
  601. },
  602. // 导航到排行榜
  603. navigateToRanking() {
  604. uni.navigateTo({
  605. url: '/pages/matchmaker-workbench/ranking'
  606. })
  607. },
  608. // 导航到消息
  609. navigateToMessage() {
  610. uni.navigateTo({
  611. url: '/pages/matchmaker-workbench/message'
  612. })
  613. },
  614. // 导航到我的
  615. navigateToMine() {
  616. // 已在我的页面,无需跳转
  617. }
  618. }
  619. }
  620. </script>
  621. <style lang="scss" scoped>
  622. .matchmaker-mine {
  623. min-height: 100vh;
  624. background: #FFF9F9;
  625. display: flex;
  626. flex-direction: column;
  627. }
  628. /* 顶部导航栏 */
  629. .header {
  630. display: flex;
  631. align-items: center;
  632. justify-content: space-between;
  633. padding: 25rpx 30rpx;
  634. padding-top: calc(25rpx + env(safe-area-inset-top));
  635. background: #FFF9F9;
  636. border-bottom: 1rpx solid #F0F0F0;
  637. .back-btn {
  638. width: 70rpx;
  639. height: 70rpx;
  640. display: flex;
  641. align-items: center;
  642. justify-content: center;
  643. background: rgba(240, 240, 240, 0.5);
  644. border-radius: 50%;
  645. 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>');
  646. background-size: 40rpx 40rpx;
  647. background-repeat: no-repeat;
  648. background-position: center;
  649. }
  650. .header-title {
  651. font-size: 38rpx;
  652. font-weight: bold;
  653. color: #333;
  654. }
  655. .placeholder {
  656. width: 70rpx;
  657. }
  658. }
  659. .content {
  660. flex: 1;
  661. padding: 0;
  662. }
  663. .content-container {
  664. padding: 20rpx 30rpx 120rpx;
  665. }
  666. /* 个人信息卡片 */
  667. .profile-card {
  668. background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  669. border-radius: 25rpx;
  670. padding: 35rpx;
  671. margin-bottom: 25rpx;
  672. box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1);
  673. }
  674. .profile-header {
  675. display: flex;
  676. align-items: center;
  677. margin-bottom: 30rpx;
  678. .profile-avatar {
  679. width: 160rpx;
  680. height: 160rpx;
  681. border-radius: 50%;
  682. background-size: cover;
  683. background-repeat: no-repeat;
  684. background-position: center;
  685. margin-right: 25rpx;
  686. border: 2rpx solid #FFF;
  687. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  688. }
  689. .profile-info {
  690. flex: 1;
  691. .profile-name {
  692. display: block;
  693. font-size: 36rpx;
  694. font-weight: bold;
  695. color: #333;
  696. margin-bottom: 10rpx;
  697. }
  698. .profile-badge {
  699. display: inline-block;
  700. background: #FFD700;
  701. color: #FFFFFF;
  702. font-size: 24rpx;
  703. font-weight: bold;
  704. padding: 6rpx 16rpx;
  705. border-radius: 15rpx;
  706. margin-bottom: 10rpx;
  707. }
  708. .profile-rating {
  709. display: block;
  710. font-size: 28rpx;
  711. color: #666;
  712. }
  713. }
  714. }
  715. /* 等级和积分 */
  716. .level-points {
  717. display: flex;
  718. align-items: center;
  719. justify-content: space-between;
  720. margin-bottom: 30rpx;
  721. .level-info {
  722. display: flex;
  723. align-items: center;
  724. gap: 10rpx;
  725. .level-icon {
  726. width: 44rpx;
  727. height: 44rpx;
  728. 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>');
  729. background-size: contain;
  730. background-repeat: no-repeat;
  731. background-position: center;
  732. }
  733. .level-name {
  734. font-size: 32rpx;
  735. font-weight: bold;
  736. color: #FF9800;
  737. }
  738. }
  739. .points-value {
  740. font-size: 48rpx;
  741. font-weight: bold;
  742. color: #E91E63;
  743. }
  744. .points-label {
  745. font-size: 28rpx;
  746. color: #666;
  747. }
  748. }
  749. /* 等级进度 */
  750. .level-progress {
  751. .progress-label {
  752. display: block;
  753. font-size: 26rpx;
  754. color: #333;
  755. margin-bottom: 15rpx;
  756. }
  757. .progress-bar {
  758. width: 100%;
  759. height: 12rpx;
  760. background: rgba(255, 255, 255, 0.5);
  761. border-radius: 6rpx;
  762. margin-bottom: 10rpx;
  763. .progress-fill {
  764. height: 100%;
  765. background: #FFB74D;
  766. border-radius: 6rpx;
  767. }
  768. }
  769. .progress-values {
  770. display: flex;
  771. justify-content: space-between;
  772. margin-bottom: 15rpx;
  773. .current-value,
  774. .target-value {
  775. font-size: 24rpx;
  776. color: #666;
  777. }
  778. }
  779. .upgrade-tip {
  780. display: block;
  781. background: rgba(255, 255, 255, 0.3);
  782. color: #E91E63;
  783. font-size: 26rpx;
  784. font-weight: bold;
  785. padding: 15rpx;
  786. border-radius: 15rpx;
  787. text-align: center;
  788. }
  789. }
  790. /* 功能菜单 */
  791. .function-grid {
  792. display: grid;
  793. grid-template-columns: repeat(4, 1fr);
  794. gap: 25rpx;
  795. padding: 35rpx;
  796. background: #FFFFFF;
  797. border-radius: 20rpx;
  798. margin-bottom: 20rpx;
  799. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  800. .function-item {
  801. display: flex;
  802. flex-direction: column;
  803. align-items: center;
  804. gap: 15rpx;
  805. .function-icon {
  806. width: 90rpx;
  807. height: 90rpx;
  808. border-radius: 50%;
  809. background-size: 50rpx 50rpx;
  810. background-repeat: no-repeat;
  811. background-position: center;
  812. &.calendar {
  813. background-color: #FFF3E0;
  814. 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>');
  815. display: flex;
  816. align-items: center;
  817. justify-content: center;
  818. font-size: 32rpx;
  819. font-weight: bold;
  820. color: #FF9800;
  821. }
  822. &.resources {
  823. background-color: #E8F5E9;
  824. 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>');
  825. }
  826. &.heart-book {
  827. background-color: #FFEBEE;
  828. 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>');
  829. }
  830. &.money {
  831. background-color: #F3E5F5;
  832. 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>');
  833. }
  834. }
  835. .function-text {
  836. font-size: 26rpx;
  837. color: #333;
  838. }
  839. }
  840. }
  841. /* 设置选项 */
  842. .settings-section {
  843. background: #FFFFFF;
  844. border-radius: 20rpx;
  845. padding: 0;
  846. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  847. .settings-item {
  848. display: flex;
  849. align-items: center;
  850. justify-content: space-between;
  851. padding: 25rpx 35rpx;
  852. margin-bottom: 0;
  853. background: #FFFFFF;
  854. border-radius: 20rpx;
  855. &:last-child {
  856. margin-bottom: 0;
  857. }
  858. .settings-icon {
  859. width: 44rpx;
  860. height: 44rpx;
  861. background-size: contain;
  862. background-repeat: no-repeat;
  863. background-position: center;
  864. margin-right: 20rpx;
  865. }
  866. .settings-icon.user {
  867. 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>');
  868. }
  869. .settings-icon.gear {
  870. 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>');
  871. }
  872. .settings-icon.logout {
  873. 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>');
  874. }
  875. .settings-icon.info {
  876. 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>');
  877. }
  878. .settings-text {
  879. flex: 1;
  880. font-size: 30rpx;
  881. color: #333;
  882. }
  883. .arrow-right {
  884. width: 24rpx;
  885. height: 24rpx;
  886. 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>');
  887. background-size: contain;
  888. background-repeat: no-repeat;
  889. background-position: center;
  890. }
  891. }
  892. }
  893. /* 底部导航 */
  894. .tabbar {
  895. position: fixed;
  896. bottom: 0;
  897. left: 0;
  898. right: 0;
  899. height: 100rpx;
  900. background: #FFFFFF;
  901. border-top: 1rpx solid #F0F0F0;
  902. display: flex;
  903. justify-content: space-around;
  904. align-items: center;
  905. padding-bottom: env(safe-area-inset-bottom);
  906. .tabbar-item {
  907. display: flex;
  908. flex-direction: column;
  909. align-items: center;
  910. gap: 8rpx;
  911. padding: 10rpx 0;
  912. .tabbar-icon {
  913. width: 44rpx;
  914. height: 44rpx;
  915. background-size: contain;
  916. background-repeat: no-repeat;
  917. background-position: center;
  918. position: relative;
  919. .badge {
  920. position: absolute;
  921. top: -8rpx;
  922. right: -8rpx;
  923. background: #FF4444;
  924. color: #FFFFFF;
  925. font-size: 20rpx;
  926. font-weight: bold;
  927. width: 32rpx;
  928. height: 32rpx;
  929. display: flex;
  930. align-items: center;
  931. justify-content: center;
  932. border-radius: 16rpx;
  933. }
  934. }
  935. .tabbar-text {
  936. font-size: 20rpx;
  937. color: #999;
  938. }
  939. &.active {
  940. .tabbar-text {
  941. color: #9C27B0;
  942. font-weight: bold;
  943. }
  944. }
  945. &.home .tabbar-icon {
  946. 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>');
  947. }
  948. &.active.home .tabbar-icon {
  949. 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>');
  950. }
  951. &.resources .tabbar-icon {
  952. 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>');
  953. }
  954. &.active.resources .tabbar-icon {
  955. 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>');
  956. }
  957. &.trophy .tabbar-icon {
  958. 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>');
  959. }
  960. &.active.trophy .tabbar-icon {
  961. 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>');
  962. }
  963. &.message .tabbar-icon {
  964. 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>');
  965. }
  966. &.active.message .tabbar-icon {
  967. 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>');
  968. }
  969. &.mine .tabbar-icon {
  970. 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>');
  971. }
  972. &.mine.active .tabbar-icon {
  973. 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>');
  974. }
  975. }
  976. }
  977. /* 签到弹框样式 */
  978. .sign-in-popup {
  979. width: 600rpx;
  980. background: #FFFFFF;
  981. border-radius: 20rpx;
  982. overflow: hidden;
  983. .popup-header {
  984. display: flex;
  985. justify-content: space-between;
  986. align-items: center;
  987. padding: 30rpx;
  988. background: #FFEBEE;
  989. border-bottom: none;
  990. .popup-title {
  991. font-size: 36rpx;
  992. font-weight: bold;
  993. color: #E91E63;
  994. }
  995. .close-btn {
  996. width: 40rpx;
  997. height: 40rpx;
  998. 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>');
  999. background-size: contain;
  1000. background-repeat: no-repeat;
  1001. background-position: center;
  1002. }
  1003. }
  1004. .popup-content {
  1005. padding: 20rpx 30rpx 30rpx;
  1006. /* 签到统计 */
  1007. .checkin-stats {
  1008. display: flex;
  1009. justify-content: space-around;
  1010. margin-bottom: 30rpx;
  1011. padding: 20rpx;
  1012. background: #FFF3E0;
  1013. border-radius: 15rpx;
  1014. .stats-item {
  1015. display: flex;
  1016. flex-direction: column;
  1017. align-items: center;
  1018. gap: 10rpx;
  1019. .stats-label {
  1020. font-size: 24rpx;
  1021. color: #666;
  1022. }
  1023. .stats-value {
  1024. font-size: 48rpx;
  1025. font-weight: bold;
  1026. color: #E91E63;
  1027. }
  1028. .stats-unit {
  1029. font-size: 24rpx;
  1030. color: #666;
  1031. }
  1032. }
  1033. }
  1034. .calendar-container {
  1035. background: #FFFFFF;
  1036. border-radius: 15rpx;
  1037. padding: 20rpx;
  1038. margin-bottom: 30rpx;
  1039. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  1040. .calendar-header {
  1041. display: flex;
  1042. justify-content: center;
  1043. align-items: center;
  1044. margin-bottom: 20rpx;
  1045. .calendar-title {
  1046. font-size: 28rpx;
  1047. font-weight: bold;
  1048. color: #333;
  1049. }
  1050. }
  1051. .calendar-week {
  1052. display: grid;
  1053. grid-template-columns: repeat(7, 1fr);
  1054. gap: 10rpx;
  1055. margin-bottom: 20rpx;
  1056. .week-day {
  1057. text-align: center;
  1058. font-size: 24rpx;
  1059. color: #999;
  1060. font-weight: bold;
  1061. }
  1062. }
  1063. .calendar-days {
  1064. display: grid;
  1065. grid-template-columns: repeat(7, 1fr);
  1066. gap: 15rpx;
  1067. .calendar-day {
  1068. text-align: center;
  1069. font-size: 28rpx;
  1070. color: #333;
  1071. background: #F5F5F5;
  1072. border-radius: 8rpx;
  1073. height: 70rpx;
  1074. display: flex;
  1075. flex-direction: column;
  1076. align-items: center;
  1077. justify-content: center;
  1078. position: relative;
  1079. &.other-month {
  1080. color: #CCCCCC;
  1081. background: #F9F9F9;
  1082. }
  1083. &.today {
  1084. background: #FFF3E0;
  1085. color: #FF9800;
  1086. font-weight: bold;
  1087. }
  1088. &.checked {
  1089. background: #FFCDD2;
  1090. color: #E91E63;
  1091. font-weight: bold;
  1092. }
  1093. &.today-checked {
  1094. background: #E91E63;
  1095. color: #FFFFFF;
  1096. font-weight: bold;
  1097. }
  1098. .check-mark {
  1099. position: absolute;
  1100. bottom: 5rpx;
  1101. right: 5rpx;
  1102. font-size: 18rpx;
  1103. color: #FFFFFF;
  1104. background: #E91E63;
  1105. border-radius: 50%;
  1106. width: 24rpx;
  1107. height: 24rpx;
  1108. display: flex;
  1109. align-items: center;
  1110. justify-content: center;
  1111. }
  1112. .today-checked .check-mark {
  1113. background: #FFFFFF;
  1114. color: #E91E63;
  1115. }
  1116. }
  1117. }
  1118. }
  1119. .sign-in-reward {
  1120. display: flex;
  1121. flex-direction: column;
  1122. align-items: center;
  1123. gap: 10rpx;
  1124. .reward-title {
  1125. font-size: 28rpx;
  1126. color: #666;
  1127. }
  1128. .reward-points {
  1129. font-size: 48rpx;
  1130. font-weight: bold;
  1131. color: #E91E63;
  1132. }
  1133. }
  1134. }
  1135. .popup-footer {
  1136. padding: 0 30rpx 30rpx;
  1137. .sign-in-btn {
  1138. width: 100%;
  1139. height: 80rpx;
  1140. background: #E91E63;
  1141. color: #FFFFFF;
  1142. font-size: 32rpx;
  1143. border-radius: 40rpx;
  1144. border: none;
  1145. font-weight: bold;
  1146. transition: all 0.3s;
  1147. &:hover {
  1148. background: #C2185B;
  1149. }
  1150. &.signed {
  1151. background: #E0E0E0;
  1152. color: #9E9E9E;
  1153. cursor: not-allowed;
  1154. &:hover {
  1155. background: #E0E0E0;
  1156. }
  1157. }
  1158. }
  1159. }
  1160. }
  1161. </style>