index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  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) uni.navigateTo({ url: '/pages/discover-detail/activity-detail/activity-detail?id=' + act.id })
  408. },
  409. goProductDetail: function(prod) {
  410. if (prod && prod.id) {
  411. var token = uni.getStorageSync('token')
  412. if (token) {
  413. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  414. } else {
  415. uni.navigateTo({ url: '/pages/login/login?redirect=' + encodeURIComponent('/pages/wisdom/index') })
  416. }
  417. }
  418. },
  419. goMoreProducts: function() {
  420. uni.navigateTo({ url: '/pages/shop/index' })
  421. },
  422. loadFeaturedArticles: function() {
  423. var self = this
  424. getFeaturedArticles({ size: 5, dimensionCode: 'wisdom' }).then(function(res) {
  425. if (res.code === 200 && res.data) {
  426. var gradientColors = [
  427. 'linear-gradient(135deg, #6366F1, #818CF8)',
  428. 'linear-gradient(135deg, #8B5CF6, #A78BFA)',
  429. 'linear-gradient(135deg, #5B9BD5, #8FC5E8)',
  430. 'linear-gradient(135deg, #10B981, #34D399)',
  431. 'linear-gradient(135deg, #F97316, #FB923C)'
  432. ]
  433. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  434. self.articles = list.map(function(item, index) {
  435. return {
  436. id: item.id,
  437. category: item.categoryName || '智慧文章',
  438. categoryColor: gradientColors[index % gradientColors.length],
  439. title: item.title || '',
  440. summary: item.summary || '',
  441. views: item.viewCount ? String(item.viewCount) : '0',
  442. likes: '0',
  443. date: item.publishedAt ? item.publishedAt.slice(0, 10) : '',
  444. relatedDimensions: item.relatedDimensions || []
  445. }
  446. })
  447. }
  448. }).catch(function() {})
  449. },
  450. goMoreArticles: function() {
  451. uni.navigateTo({ url: '/pages/mind/articles' })
  452. },
  453. goArticleDetail: function(article) {
  454. uni.navigateTo({ url: '/pages/mind-detail/article-detail?id=' + (article.id || article) })
  455. },
  456. // ===== 重要关系 =====
  457. loadContacts: function() {
  458. var self = this
  459. getContactList({}).then(function(res) {
  460. if (res.code === 200 && res.data) {
  461. self.contactList = Array.isArray(res.data) ? res.data : []
  462. }
  463. }).catch(function(e) {
  464. console.log('获取联系人失败', e)
  465. })
  466. },
  467. loadRelationshipHealth: function() {
  468. var self = this
  469. getHealthAlerts({}).then(function(res) {
  470. if (res.code === 200 && res.data) {
  471. self.healthAlerts = Array.isArray(res.data) ? res.data : []
  472. }
  473. }).catch(function() {
  474. self.healthAlerts = []
  475. })
  476. getMilestones({}, 30).then(function(res) {
  477. if (res.code === 200 && res.data) {
  478. self.milestones = Array.isArray(res.data) ? res.data : []
  479. }
  480. }).catch(function() {
  481. self.milestones = []
  482. })
  483. },
  484. onContactClick: function(item) {
  485. uni.navigateTo({ url: '/pages/wisdom-detail/contact-detail?id=' + item.id })
  486. },
  487. onShowImport: function() {
  488. uni.showToast({ title: '导入通讯录', icon: 'none' })
  489. },
  490. goInteractionLog: function(memberId) {
  491. if (memberId) {
  492. uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log?memberId=' + memberId })
  493. } else {
  494. uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log' })
  495. }
  496. },
  497. goRelationshipQuestionnaire: function() {
  498. uni.navigateTo({ url: '/pages/wisdom-detail/relationship-questionnaire' })
  499. },
  500. _watchPageReady() {
  501. var self = this
  502. var unwatch = this.$watch(function() {
  503. if (self.isLoggedIn) {
  504. return !!(self.cognitiveReport || self.energyOverview)
  505. }
  506. return !!(self.dimensionActivities && self.dimensionActivities.length > 0) ||
  507. !!(self.dimensionProducts && self.dimensionProducts.length > 0)
  508. }, function(val) {
  509. if (val) {
  510. if (unwatch) unwatch()
  511. self.showTabTransition = false
  512. }
  513. })
  514. setTimeout(function() {
  515. if (unwatch) unwatch()
  516. self.showTabTransition = false
  517. }, 5000)
  518. }
  519. }
  520. }
  521. </script>
  522. <style scoped>
  523. .wisdom-container {
  524. min-height: 100vh;
  525. background: #f5f7fa;
  526. padding-bottom: 120rpx;
  527. }
  528. .func-section {
  529. margin: -40rpx 20rpx 0;
  530. position: relative;
  531. z-index: 2;
  532. }
  533. .func-grid {
  534. background: #fff;
  535. border-radius: 24rpx;
  536. padding: 30rpx 16rpx;
  537. display: flex;
  538. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  539. }
  540. .func-item {
  541. flex: 1;
  542. display: flex;
  543. flex-direction: column;
  544. align-items: center;
  545. }
  546. .func-item:active {
  547. opacity: 0.7;
  548. }
  549. .func-icon-wrap {
  550. width: 88rpx;
  551. height: 88rpx;
  552. border-radius: 50%;
  553. background: #FFF8E1;
  554. display: flex;
  555. align-items: center;
  556. justify-content: center;
  557. margin-bottom: 10rpx;
  558. }
  559. .func-icon {
  560. font-size: 40rpx;
  561. }
  562. .func-label {
  563. font-size: 24rpx;
  564. color: #333;
  565. font-weight: 500;
  566. }
  567. /* ===== Section ===== */
  568. .section {
  569. margin: 20rpx 20rpx;
  570. }
  571. .section-header {
  572. display: flex;
  573. justify-content: space-between;
  574. align-items: center;
  575. margin-bottom: 20rpx;
  576. }
  577. .section-title {
  578. font-size: 30rpx;
  579. font-weight: bold;
  580. color: #333;
  581. }
  582. .section-more {
  583. font-size: 24rpx;
  584. color: #999;
  585. }
  586. /* ===== 智慧小贴士 ===== */
  587. .tips-list {
  588. display: flex;
  589. flex-direction: column;
  590. }
  591. .tip-card {
  592. background: #fff;
  593. border-radius: 16rpx;
  594. padding: 24rpx 20rpx;
  595. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  596. margin-bottom: 16rpx;
  597. }
  598. .tip-title {
  599. font-size: 28rpx;
  600. font-weight: bold;
  601. color: #333;
  602. display: block;
  603. margin-bottom: 8rpx;
  604. }
  605. .tip-summary {
  606. font-size: 24rpx;
  607. color: #888;
  608. line-height: 1.5;
  609. display: block;
  610. }
  611. /* ===== 快捷操作按钮 ===== */
  612. .quick-actions {
  613. display: flex;
  614. flex-direction: row;
  615. flex-wrap: wrap;
  616. justify-content: space-between;
  617. }
  618. .action-btn {
  619. width: 48%;
  620. background: #fff;
  621. border-radius: 16rpx;
  622. padding: 24rpx 0;
  623. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  624. display: flex;
  625. flex-direction: column;
  626. align-items: center;
  627. margin-bottom: 20rpx;
  628. }
  629. .action-btn:active {
  630. opacity: 0.8;
  631. }
  632. .action-icon {
  633. font-size: 40rpx;
  634. margin-bottom: 10rpx;
  635. }
  636. .action-text {
  637. font-size: 26rpx;
  638. color: #333;
  639. font-weight: 500;
  640. }
  641. /* ===== 底部占位 ===== */
  642. .bottom-spacer {
  643. height: 120rpx;
  644. }
  645. </style>