index.vue 22 KB

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