index.vue 22 KB

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