index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <view class="wisdom-container">
  3. <!-- Tabbar 切换过渡页 -->
  4. <tab-transition v-if="showTabTransition" dimCode="wisdom" />
  5. <!-- 1. 品牌头部 -->
  6. <PageBanner theme="wisdom"
  7. tagline="学以启智 · 慧及未来"
  8. quote="知者不惑,仁者不忧" />
  9. <!-- 2. 游客专属区块 -->
  10. <template v-if="!isLoggedIn">
  11. <LoginGuideCard
  12. title="登录后查看全家智慧成长数据"
  13. :items="[
  14. '查看全家认知能量数据和测评报告',
  15. '记录每日成长,获取智慧能量',
  16. '参与认知训练,提升综合能力'
  17. ]" />
  18. </template>
  19. <!-- 3. 五维能量条(登录后) -->
  20. <FamilyEnergyBar
  21. v-if="isLoggedIn"
  22. dimensionCode="wisdom"
  23. :sandboxData="sandboxData"
  24. :dualDimension="dualDimension" />
  25. <!-- 4. 认知雷达图(登录后) -->
  26. <view class="section" v-if="isLoggedIn && cognitiveReport">
  27. <view class="section-header">
  28. <text class="section-title">认知雷达</text>
  29. <text class="section-more" @click="goCognitiveReport">查看详情 ›</text>
  30. </view>
  31. <RadarChart
  32. :dimensions="cognitiveDimensions"
  33. :scores="cognitiveScores"
  34. :avg-scores="cognitiveAvgScores"
  35. :childName="activeChildName"
  36. fillColor="#6366F1"
  37. gridColor="#E0E7FF"
  38. labelColor="#3730A3" />
  39. </view>
  40. <!-- 5. 家庭成员关系图谱(登录后) -->
  41. <FamilyRelationGraph
  42. v-if="isLoggedIn && familyMembersVisible.length > 0"
  43. dimensionCode="wisdom"
  44. :selfId="activeChildId"
  45. :members="familyMembersVisible"
  46. :energyMap="energyMapForGraph"
  47. :intimacyMap="intimacyMapForGraph"
  48. @memberTap="goMemberDetail" />
  49. <!-- 6. 用户快捷入口 -->
  50. <UserQuickEntry
  51. v-if="isLoggedIn"
  52. :userName="userName"
  53. roleName="家长"
  54. :currentChildName="activeChildName"
  55. :children="children"
  56. @childChanged="onChildChanged"
  57. @scrollTo="scrollToSection" />
  58. <!-- 7. 功能入口 -->
  59. <view class="func-section" v-if="sectionVisible('func_entries')">
  60. <view class="func-grid">
  61. <view class="func-item" v-for="item in funcList" :key="item.label" @click="onFuncClick(item)">
  62. <view class="func-icon-wrap">
  63. <text class="func-icon">{{ item.icon }}</text>
  64. </view>
  65. <text class="func-label">{{ item.label }}</text>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 8. 维度任务 -->
  70. <DimensionTasks
  71. v-if="isLoggedIn"
  72. dimensionCode="wisdom"
  73. :tasks="dimensionTasks"
  74. @taskClick="onTaskClick"
  75. @moreTasks="goTasks" />
  76. <!-- 9. 维度活动 -->
  77. <DimensionActivities
  78. dimensionCode="wisdom"
  79. :activities="dimensionActivities"
  80. :isLoggedIn="isLoggedIn"
  81. @activityClick="goActivityDetail"
  82. @moreActivities="goMoreActivities" />
  83. <!-- 10. 维度商品 -->
  84. <DimensionProducts
  85. dimensionCode="wisdom"
  86. :products="dimensionProducts"
  87. @productClick="goProductDetail"
  88. @moreProducts="goMoreProducts" />
  89. <!-- 11. 推荐阅读 -->
  90. <DimensionArticles
  91. v-if="sectionVisible('recommended_reading')"
  92. dimensionCode="wisdom"
  93. :articles="wisdomArticles"
  94. :isLoggedIn="isLoggedIn"
  95. @articleClick="goArticleDetail"
  96. @moreArticles="goMoreArticles" />
  97. <!-- 12. 智慧小贴士 -->
  98. <view class="section" v-if="sectionVisible('wisdom_tips')">
  99. <view class="section-header">
  100. <text class="section-title">智慧小贴士</text>
  101. </view>
  102. <view class="tips-list">
  103. <view class="tip-card" v-for="item in wisdomTips" :key="item.id">
  104. <text class="tip-title">{{ item.title }}</text>
  105. <text class="tip-summary">{{ item.summary }}</text>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 13. 快捷操作按钮 -->
  110. <view class="section quick-actions" v-if="isLoggedIn">
  111. <view class="action-btn" @click="goCognitiveReport">
  112. <text class="action-icon">📊</text>
  113. <text class="action-text">认知报告</text>
  114. </view>
  115. <view class="action-btn" @click="goTrainingHub">
  116. <text class="action-icon">🧠</text>
  117. <text class="action-text">认知训练</text>
  118. </view>
  119. <view class="action-btn" @click="goAssessment">
  120. <text class="action-icon">📋</text>
  121. <text class="action-text">测评预约</text>
  122. </view>
  123. <view class="action-btn" @click="goHome">
  124. <text class="action-icon">🏠</text>
  125. <text class="action-text">返回首页</text>
  126. </view>
  127. </view>
  128. <!-- 底部占位 -->
  129. <view class="bottom-spacer"></view>
  130. <AIFloatingAvatar />
  131. </view>
  132. </template>
  133. <script>
  134. import TabTransition from '../../components/tab-transition.vue'
  135. import PageBanner from '../../components/PageBanner.vue'
  136. import LoginGuideCard from '../../components/LoginGuideCard.vue'
  137. import RadarChart from '../../components/RadarChart.vue'
  138. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  139. import UserQuickEntry from '../../components/UserQuickEntry.vue'
  140. import DimensionTasks from '../../components/DimensionTasks.vue'
  141. import DimensionActivities from '../../components/DimensionActivities.vue'
  142. import DimensionProducts from '../../components/DimensionProducts.vue'
  143. import DimensionArticles from '../../components/DimensionArticles.vue'
  144. import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
  145. import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
  146. import { getVisibleSections, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getAssessmentLatestResult, getFeaturedArticles, getContactList, getHealthAlerts, getMilestones } from '../../utils/api.js'
  147. export default {
  148. components: { TabTransition, PageBanner, LoginGuideCard, RadarChart, FamilyEnergyBar, UserQuickEntry, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, FamilyRelationGraph, AIFloatingAvatar },
  149. data() {
  150. return {
  151. isLoggedIn: false,
  152. role: null,
  153. showTabTransition: true,
  154. activeChildId: null,
  155. activeChildName: '',
  156. userName: '',
  157. children: [],
  158. familyMembersVisible: [],
  159. sandboxData: null,
  160. dualDimension: null,
  161. visibleSections: [],
  162. cognitiveReport: null,
  163. dimensionTasks: [],
  164. dimensionActivities: [],
  165. dimensionProducts: [],
  166. articles: [],
  167. wisdomTips: [],
  168. /** Mock 平均值(6维认知):感知/专注/记忆/逻辑/空间/加工速度 */
  169. cognitiveAvgScores: [70, 65, 72, 68, 66, 71],
  170. contactList: [],
  171. healthAlerts: [],
  172. milestones: [],
  173. funcList: [
  174. { icon: '\u{1F4CA}', label: '认知报告', needLogin: true, page: '/pages/wisdom-detail/cognitive-report' },
  175. { icon: '\u{270F}\uFE0F', label: '自己出题', needLogin: true, page: '/pages/wisdom-detail/self-quiz' },
  176. { icon: '\u{1F9E0}', label: '训练中心', needLogin: true, page: '/pages/wisdom-detail/training-hub' },
  177. { icon: '\u{1F3AF}', label: '测评预约', needLogin: false, page: '/pages/assessment/apply' },
  178. { icon: '\u{1F4D6}', label: '阅读天地', needLogin: false, page: '/pages/mind/articles' }
  179. ]
  180. }
  181. },
  182. computed: {
  183. energyMapForGraph: function() {
  184. var map = {}
  185. if (this.sandboxData && this.sandboxData.members) {
  186. for (var i = 0; i < this.sandboxData.members.length; i++) {
  187. var m = this.sandboxData.members[i]
  188. map[m.memberId || m.id] = {
  189. bodyScore: m.bodyScore || 0,
  190. mindScore: m.mindScore || 0,
  191. actionScore: m.actionScore || 0,
  192. wisdomScore: m.wisdomScore || 0
  193. }
  194. }
  195. }
  196. return map
  197. },
  198. intimacyMapForGraph: function() {
  199. return {}
  200. },
  201. wisdomArticles: function() {
  202. if (!this.articles || this.articles.length === 0) return []
  203. var result = []
  204. for (var i = 0; i < this.articles.length; i++) {
  205. var a = this.articles[i]
  206. if (a.relatedDimensions && a.relatedDimensions.indexOf('wisdom') !== -1) {
  207. result.push(a)
  208. }
  209. }
  210. if (result.length === 0) return this.articles.slice(0, 5)
  211. return result.slice(0, 5)
  212. },
  213. cognitiveDimensions: function() {
  214. return [
  215. { label: '感知能力', key: 'perceptionScore' },
  216. { label: '专注力', key: 'focusScore' },
  217. { label: '记忆力', key: 'memoryScore' },
  218. { label: '逻辑思维', key: 'logicScore' },
  219. { label: '空间思维', key: 'spatialScore' },
  220. { label: '加工速度', key: 'processingSpeedScore' }
  221. ]
  222. },
  223. cognitiveScores: function() {
  224. if (!this.cognitiveReport) return []
  225. var dims = this.cognitiveDimensions
  226. var scores = []
  227. for (var i = 0; i < dims.length; i++) {
  228. scores.push(this.cognitiveReport[dims[i].key] || 0)
  229. }
  230. return scores
  231. }
  232. },
  233. onShow() {
  234. this.showTabTransition = true
  235. var token = uni.getStorageSync('token')
  236. this.isLoggedIn = !!token
  237. if (this.isLoggedIn) {
  238. this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  239. this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
  240. }
  241. this.loadSectionConfig()
  242. if (this.isLoggedIn) {
  243. this.loadChildren()
  244. this.loadFamilyMembersVisible()
  245. this.loadCognitiveReport()
  246. this.loadRelationshipHealth()
  247. }
  248. this.loadDimensionActivities()
  249. this.loadDimensionProducts()
  250. // 游客也能浏览文章
  251. this.loadFeaturedArticles()
  252. this._watchPageReady()
  253. },
  254. methods: {
  255. loadSectionConfig: function() {
  256. var baseSections = ['func_entries', 'wisdom_tips', 'recommended_reading']
  257. if (!uni.getStorageSync('token')) {
  258. this.visibleSections = baseSections
  259. return
  260. }
  261. var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  262. var self = this
  263. getVisibleSections({ pageKey: 'wisdom', role: role }).then(function(res) {
  264. if (res.code === 200 && res.data) {
  265. var keys = res.data.map(function(s) { return s.sectionKey })
  266. var merged = baseSections.slice()
  267. keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
  268. self.visibleSections = merged
  269. }
  270. }).catch(function(e) {
  271. self.visibleSections = ['func_entries', 'wisdom_tips']
  272. })
  273. },
  274. loadChildren: function() {
  275. var self = this
  276. getChildren().then(function(res) {
  277. if (res.code === 200 && res.data) {
  278. self.children = res.data
  279. if (self.children.length > 0) {
  280. var activeId = uni.getStorageSync('currentChildId')
  281. if (activeId) {
  282. for (var i = 0; i < self.children.length; i++) {
  283. if (self.children[i].id == activeId) {
  284. self.activeChildId = activeId
  285. self.activeChildName = self.children[i].nickname || self.children[i].name || ''
  286. break
  287. }
  288. }
  289. }
  290. if (!self.activeChildId) {
  291. self.activeChildId = self.children[0].id
  292. self.activeChildName = self.children[0].nickname || self.children[0].name || ''
  293. uni.setStorageSync('currentChildId', self.activeChildId)
  294. }
  295. }
  296. // Load cognitive report AFTER activeChildId is confirmed set
  297. self.loadCognitiveReport()
  298. }
  299. self.loadContacts()
  300. }).catch(function(e) {})
  301. },
  302. loadFamilyMembersVisible: function() {
  303. var self = this
  304. getFamilyEnergySandbox().then(function(res) {
  305. if (res && res.data) {
  306. self.sandboxData = res.data.sandboxData || null
  307. self.dualDimension = res.data.dualDimension || null
  308. if (res.data.members) {
  309. self.familyMembersVisible = res.data.members
  310. }
  311. }
  312. }).catch(function(e) {})
  313. },
  314. loadCognitiveReport: function() {
  315. var self = this
  316. var childId = this.activeChildId
  317. if (!childId) return
  318. getAssessmentLatestResult(childId).then(function(res) {
  319. if (res.code === 200 && res.data) {
  320. self.cognitiveReport = res.data
  321. }
  322. }).catch(function(e) {})
  323. },
  324. onChildChanged: function(childId) {
  325. this.activeChildId = childId
  326. uni.setStorageSync('currentChildId', childId)
  327. for (var i = 0; i < this.children.length; i++) {
  328. if (this.children[i].id == childId) {
  329. this.activeChildName = this.children[i].nickname || this.children[i].name || ''
  330. break
  331. }
  332. }
  333. this.loadFamilyMembersVisible()
  334. this.loadCognitiveReport()
  335. },
  336. loadDimensionTasks: function() {
  337. var self = this
  338. var childId = this.activeChildId
  339. if (!childId) return
  340. getTodayTasksByCategory(childId, 'wisdom').then(function(res) {
  341. if (res && res.data) {
  342. self.dimensionTasks = res.data.slice(0, 5)
  343. }
  344. }).catch(function(e) {})
  345. },
  346. loadDimensionActivities: function() {
  347. var self = this
  348. getActivityList({ dimensionCode: 'wisdom', page: 1, size: 5 }).then(function(res) {
  349. if (res && res.data) {
  350. self.dimensionActivities = res.data.records || res.data
  351. }
  352. }).catch(function(e) {})
  353. },
  354. loadDimensionProducts: function() {
  355. var self = this
  356. getProductsByDomain('wisdom', 1, 4).then(function(res) {
  357. if (res && res.data) {
  358. self.dimensionProducts = res.data.records || res.data
  359. }
  360. }).catch(function(e) {})
  361. },
  362. sectionVisible: function(key) {
  363. return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
  364. },
  365. onFuncClick: function(item) {
  366. if (item.needLogin && !this.isLoggedIn) {
  367. uni.showModal({
  368. title: '提示',
  369. content: '请先登录后使用此功能',
  370. success: function(res) { if (res.confirm) uni.navigateTo({ url: '/pages/login/login' }) }
  371. })
  372. return
  373. }
  374. if (item.page) {
  375. var nativeTabs = ['/pages/tasks/tasks', '/pages/index/index', '/pages/body/index', '/pages/mind/index', '/pages/action/index', '/pages/wisdom/index', '/pages/profile/profile']
  376. if (nativeTabs.indexOf(item.page) !== -1) {
  377. uni.switchTab({ url: item.page })
  378. } else {
  379. uni.navigateTo({ url: item.page })
  380. }
  381. }
  382. },
  383. scrollToSection: function(section) {},
  384. goMemberDetail: function(memberId) {
  385. uni.navigateTo({ url: '/pages/member-detail/member-detail?memberId=' + memberId + '&entrySource=relation-graph&dimensionCode=wisdom' })
  386. },
  387. goFamilyMembers: function() {
  388. uni.navigateTo({ url: '/pages/profile/family-members' })
  389. },
  390. goCognitiveReport: function() {
  391. uni.navigateTo({ url: '/pages/wisdom-detail/cognitive-report' })
  392. },
  393. goSelfQuiz: function() {
  394. uni.navigateTo({ url: '/pages/wisdom-detail/self-quiz' })
  395. },
  396. goTrainingHub: function() {
  397. uni.navigateTo({ url: '/pages/wisdom-detail/training-hub' })
  398. },
  399. goAssessment: function() {
  400. uni.navigateTo({ url: '/pages/assessment/apply' })
  401. },
  402. goHome: function() {
  403. uni.switchTab({ url: '/pages/index/index' })
  404. },
  405. onTaskClick: function(task) {},
  406. goTasks: function() { uni.switchTab({ url: '/pages/tasks/tasks' }) },
  407. goActivityDetail: function(id) {},
  408. goMoreActivities: function() {
  409. uni.navigateTo({ url: '/pages/activity/index' })
  410. },
  411. goActivityDetail: function(act) {
  412. if (!act || !act.id) return
  413. uni.navigateTo({ url: '/pages/discover-detail/activity-detail/activity-detail?id=' + act.id })
  414. },
  415. goProductDetail: function(prod) {
  416. if (prod && prod.id) {
  417. var token = uni.getStorageSync('token')
  418. if (token) {
  419. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  420. } else {
  421. uni.navigateTo({ url: '/pages/login/login?redirect=' + encodeURIComponent('/pages/wisdom/index') })
  422. }
  423. }
  424. },
  425. goMoreProducts: function() {
  426. uni.navigateTo({ url: '/pages/shop/index' })
  427. },
  428. parseRelatedDimensions: function(val) {
  429. if (!val) return []
  430. if (Array.isArray(val)) return val
  431. if (typeof val === 'string') {
  432. try {
  433. var parsed = JSON.parse(val)
  434. return Array.isArray(parsed) ? parsed : []
  435. } catch (e) {
  436. return val.split(',').map(function(s) { return s.trim() }).filter(function(s) { return s })
  437. }
  438. }
  439. return []
  440. },
  441. loadFeaturedArticles: function() {
  442. var self = this
  443. getFeaturedArticles({ size: 5, dimensionCode: 'wisdom' }).then(function(res) {
  444. if (res.code === 200 && res.data) {
  445. var gradientColors = [
  446. 'linear-gradient(135deg, #6366F1, #818CF8)',
  447. 'linear-gradient(135deg, #8B5CF6, #A78BFA)',
  448. 'linear-gradient(135deg, #5B9BD5, #8FC5E8)',
  449. 'linear-gradient(135deg, #10B981, #34D399)',
  450. 'linear-gradient(135deg, #F97316, #FB923C)'
  451. ]
  452. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  453. self.articles = list.map(function(item, index) {
  454. return {
  455. id: item.id,
  456. category: item.categoryName || '智慧文章',
  457. categoryColor: gradientColors[index % gradientColors.length],
  458. title: item.title || '',
  459. summary: item.summary || '',
  460. views: item.viewCount ? String(item.viewCount) : '0',
  461. likes: '0',
  462. date: item.publishedAt ? item.publishedAt.slice(0, 10) : '',
  463. relatedDimensions: self.parseRelatedDimensions(item.relatedDimensions)
  464. }
  465. })
  466. }
  467. }).catch(function() {})
  468. },
  469. goMoreArticles: function() {
  470. uni.navigateTo({ url: '/pages/article-center/index?dimension=wisdom' })
  471. },
  472. goArticleDetail: function(article) {
  473. uni.navigateTo({ url: '/pages/mind-detail/article-detail?id=' + (article.id || article) })
  474. },
  475. // ===== 重要关系 =====
  476. loadContacts: function() {
  477. var self = this
  478. getContactList({}).then(function(res) {
  479. if (res.code === 200 && res.data) {
  480. self.contactList = Array.isArray(res.data) ? res.data : []
  481. }
  482. }).catch(function(e) {
  483. console.log('获取联系人失败', e)
  484. })
  485. },
  486. loadRelationshipHealth: function() {
  487. var self = this
  488. getHealthAlerts({}).then(function(res) {
  489. if (res.code === 200 && res.data) {
  490. self.healthAlerts = Array.isArray(res.data) ? res.data : []
  491. }
  492. }).catch(function() {
  493. self.healthAlerts = []
  494. })
  495. getMilestones({}, 30).then(function(res) {
  496. if (res.code === 200 && res.data) {
  497. self.milestones = Array.isArray(res.data) ? res.data : []
  498. }
  499. }).catch(function() {
  500. self.milestones = []
  501. })
  502. },
  503. onContactClick: function(item) {
  504. uni.navigateTo({ url: '/pages/wisdom-detail/contact-detail?id=' + item.id })
  505. },
  506. onShowImport: function() {
  507. uni.showToast({ title: '导入通讯录', icon: 'none' })
  508. },
  509. goInteractionLog: function(memberId) {
  510. if (memberId) {
  511. uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log?memberId=' + memberId })
  512. } else {
  513. uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log' })
  514. }
  515. },
  516. goRelationshipQuestionnaire: function() {
  517. uni.navigateTo({ url: '/pages/wisdom-detail/relationship-questionnaire' })
  518. },
  519. _watchPageReady() {
  520. var self = this
  521. var unwatch = this.$watch(function() {
  522. if (self.isLoggedIn) {
  523. return !!(self.cognitiveReport || self.energyOverview)
  524. }
  525. return !!(self.dimensionActivities && self.dimensionActivities.length > 0) ||
  526. !!(self.dimensionProducts && self.dimensionProducts.length > 0)
  527. }, function(val) {
  528. if (val) {
  529. if (unwatch) unwatch()
  530. self.showTabTransition = false
  531. }
  532. })
  533. setTimeout(function() {
  534. if (unwatch) unwatch()
  535. self.showTabTransition = false
  536. }, 5000)
  537. }
  538. }
  539. }
  540. </script>
  541. <style scoped>
  542. .wisdom-container {
  543. min-height: 100vh;
  544. background: #f5f7fa;
  545. padding-bottom: 120rpx;
  546. }
  547. .func-section {
  548. margin: -40rpx 20rpx 0;
  549. position: relative;
  550. z-index: 2;
  551. }
  552. .func-grid {
  553. background: #fff;
  554. border-radius: 24rpx;
  555. padding: 30rpx 16rpx;
  556. display: flex;
  557. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  558. }
  559. .func-item {
  560. flex: 1;
  561. display: flex;
  562. flex-direction: column;
  563. align-items: center;
  564. }
  565. .func-item:active {
  566. opacity: 0.7;
  567. }
  568. .func-icon-wrap {
  569. width: 88rpx;
  570. height: 88rpx;
  571. border-radius: 50%;
  572. background: #FFF8E1;
  573. display: flex;
  574. align-items: center;
  575. justify-content: center;
  576. margin-bottom: 10rpx;
  577. }
  578. .func-icon {
  579. font-size: 40rpx;
  580. }
  581. .func-label {
  582. font-size: 24rpx;
  583. color: #333;
  584. font-weight: 500;
  585. }
  586. /* ===== Section ===== */
  587. .section {
  588. margin: 20rpx 20rpx;
  589. }
  590. .section-header {
  591. display: flex;
  592. justify-content: space-between;
  593. align-items: center;
  594. margin-bottom: 20rpx;
  595. }
  596. .section-title {
  597. font-size: 30rpx;
  598. font-weight: bold;
  599. color: #333;
  600. }
  601. .section-more {
  602. font-size: 24rpx;
  603. color: #999;
  604. }
  605. /* ===== 智慧小贴士 ===== */
  606. .tips-list {
  607. display: flex;
  608. flex-direction: column;
  609. }
  610. .tip-card {
  611. background: #fff;
  612. border-radius: 16rpx;
  613. padding: 24rpx 20rpx;
  614. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  615. margin-bottom: 16rpx;
  616. }
  617. .tip-title {
  618. font-size: 28rpx;
  619. font-weight: bold;
  620. color: #333;
  621. display: block;
  622. margin-bottom: 8rpx;
  623. }
  624. .tip-summary {
  625. font-size: 24rpx;
  626. color: #888;
  627. line-height: 1.5;
  628. display: block;
  629. }
  630. /* ===== 快捷操作按钮 ===== */
  631. .quick-actions {
  632. display: flex;
  633. flex-direction: row;
  634. flex-wrap: wrap;
  635. justify-content: space-between;
  636. }
  637. .action-btn {
  638. width: 48%;
  639. background: #fff;
  640. border-radius: 16rpx;
  641. padding: 24rpx 0;
  642. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  643. display: flex;
  644. flex-direction: column;
  645. align-items: center;
  646. margin-bottom: 20rpx;
  647. }
  648. .action-btn:active {
  649. opacity: 0.8;
  650. }
  651. .action-icon {
  652. font-size: 40rpx;
  653. margin-bottom: 10rpx;
  654. }
  655. .action-text {
  656. font-size: 26rpx;
  657. color: #333;
  658. font-weight: 500;
  659. }
  660. /* ===== 底部占位 ===== */
  661. .bottom-spacer {
  662. height: 120rpx;
  663. }
  664. </style>