index.vue 22 KB

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