index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <view class="container">
  3. <!-- Tabbar 切换过渡页 -->
  4. <tab-transition v-if="showTabTransition" dimCode="action" ref="tabTransition" @close="showTabTransition = false" />
  5. <!-- 品牌头部 -->
  6. <PageBanner theme="action"
  7. tagline="人际和谐 · 关系滋养"
  8. quote="和谐关系滋养幸福家庭" />
  9. <!-- 品牌定位语(登录前显示) -->
  10. <view class="brand-strap" v-if="!isLoggedIn">
  11. <text class="brand-strap-text">改善全家关系与沟通能力</text>
  12. </view>
  13. <!-- 家庭成员选择条 -->
  14. <FamilyMemberStrip
  15. v-if="currentView === 'self' && isLoggedIn"
  16. :members="familyMembersVisible"
  17. :selectedMemberId="selectedMemberId"
  18. @select="onFamilyMemberSelect"
  19. @removed="loadFamilyMembersVisible" />
  20. <!-- 游客引导语(每月更换) -->
  21. <view class="monthly-guidance" v-if="!isLoggedIn">
  22. <text class="guidance-icon">🌿</text>
  23. <text class="guidance-text">{{ monthlyGuidance }}</text>
  24. </view>
  25. <!-- 登录后:五维能量条 -->
  26. <FamilyEnergyBar
  27. v-if="isLoggedIn"
  28. dimensionCode="action"
  29. :sandboxData="sandboxData"
  30. :dualDimension="dualDimension" />
  31. <!-- 关系解读 -->
  32. <view class="section score-explain-card" v-if="isLoggedIn && currentView === 'self' && actionScore != null">
  33. <view class="explain-header">
  34. <text class="explain-icon">{{ actionScore >= 80 ? '✅' : actionScore >= 60 ? '⚠️' : '❗' }}</text>
  35. <text class="explain-title">关系解读</text>
  36. </view>
  37. <text class="explain-text">{{ actionScore >= 80 ? '家庭关系和谐,家人沟通顺畅。' : actionScore >= 60 ? '家庭关系一般,建议多花时间陪伴家人。' : '家庭关系需要改善,建议进行家庭沟通活动。' }}</text>
  38. </view>
  39. <!-- 关系六维 -->
  40. <dimension-sub-dims
  41. v-if="isLoggedIn && actionSubDims.length > 0"
  42. title="🌲 关系六维"
  43. subtitle="家庭关系的六个方面"
  44. accent-color="#10B981"
  45. :dims="actionSubDims" />
  46. <!-- 登录后:家庭关系(行维度核心) -->
  47. <view class="section" v-if="isLoggedIn">
  48. <view class="section-header">
  49. <text class="section-title">家庭关系</text>
  50. <text class="section-sub">了解每位家人的关系质量,改善沟通方式</text>
  51. <text class="section-sub">点击家人节点,查看关系详情</text>
  52. </view>
  53. <FamilyRelationGraph
  54. dimensionCode="action"
  55. :selfId="selfId"
  56. :members="graphMembers"
  57. :energyMap="energyMapForGraph"
  58. :intimacyMap="intimacyMapForGraph"
  59. :interactive="true" />
  60. </view>
  61. <!-- 登录后:章鱼图(谁帮过我) -->
  62. <view class="section" v-if="isLoggedIn">
  63. <view class="section-header">
  64. <view>
  65. <text class="section-title">🐙 章鱼图</text>
  66. <text class="section-sub">盘点帮助过你的人——你不是一个人在硬撑</text>
  67. </view>
  68. <text class="section-link" @tap="goOctopusHelp">+ 记录</text>
  69. </view>
  70. <OctopusDiagram
  71. ref="octopusDiagram"
  72. :selfId="selfId"
  73. :interactive="true"
  74. @view-records="onViewOctopusRecords"
  75. @add-help="goOctopusHelp" />
  76. </view>
  77. <!-- 登录后:珍珠图(我有什么) -->
  78. <view class="section" v-if="isLoggedIn">
  79. <view class="section-header">
  80. <view>
  81. <text class="section-title">🫧 珍珠图</text>
  82. <text class="section-sub">把可调用的资源串成珍珠项链——盘点我有什么</text>
  83. </view>
  84. <text class="section-link" @tap="goPearlAddResource">+ 登记</text>
  85. </view>
  86. <PearlDiagram
  87. ref="pearlDiagram"
  88. :selfId="selfId"
  89. :resources="pearlData"
  90. :interactive="true"
  91. @add="goPearlAddResource"
  92. @delete="onDeletePearlResource" />
  93. </view>
  94. <!-- 登录后:能力图(谁会什么) -->
  95. <view class="section" v-if="isLoggedIn">
  96. <view class="section-header">
  97. <view>
  98. <text class="section-title">💡 能力图</text>
  99. <text class="section-sub">身边藏着什么技能——谁有能力帮到你</text>
  100. </view>
  101. </view>
  102. <AbilityDiagram
  103. ref="abilityDiagram"
  104. :selfId="selfId"
  105. :abilities="abilityData"
  106. :interactive="true" />
  107. </view>
  108. <!-- 行6维关系域雷达图(登录后) -->
  109. <view class="section" v-if="isLoggedIn && currentMemberEnergies">
  110. <view class="section-header">
  111. <text class="section-title">🫂 关系质量</text>
  112. </view>
  113. <RadarChart
  114. :dimensions="actionDimensions"
  115. :scores="actionScores"
  116. fillColor="#10B981"
  117. gridColor="#D1FAE5"
  118. labelColor="#065F46"
  119. :width="580"
  120. :height="580" />
  121. </view>
  122. <!-- 功能入口 -->
  123. <view class="func-section" v-if="sectionVisible('func_entries')">
  124. <view class="func-grid">
  125. <view class="func-item" v-for="item in funcList" :key="item.label" @click="onFuncClick(item)">
  126. <view class="func-icon-wrap">
  127. <text class="func-icon">{{ item.icon }}</text>
  128. </view>
  129. <text class="func-label">{{ item.label }}</text>
  130. </view>
  131. </view>
  132. </view>
  133. <!-- 登录后:今日任务 -->
  134. <DimensionTasks
  135. v-if="isLoggedIn"
  136. :memberId="activeChildId"
  137. @taskClick="onTaskClick"
  138. @moreTasks="goTasks" />
  139. <!-- 登录后:活动 -->
  140. <DimensionActivities
  141. v-if="isLoggedIn"
  142. :isLoggedIn="true"
  143. @activityClick="goActivityDetail"
  144. @moreActivities="goMoreActivities" />
  145. <!-- 登录后:商品 -->
  146. <DimensionProducts
  147. v-if="isLoggedIn"
  148. :isLoggedIn="true"
  149. @productClick="goProductDetail"
  150. @moreProducts="goMoreProducts" />
  151. <!-- 行维度介绍卡片(登录后显示) -->
  152. <DimensionIntroCard dimCode="action" v-if="isLoggedIn" learn-more-url="/pages/action-detail/dimension-intro" />
  153. <!-- 底部占位 -->
  154. <view class="bottom-spacer"></view>
  155. <FloatingAvatar />
  156. </view>
  157. </template>
  158. <script>
  159. import TabTransition from '../../components/tab-transition.vue'
  160. import PageBanner from '../../components/PageBanner.vue'
  161. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  162. import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
  163. import OctopusDiagram from '../../components/OctopusDiagram.vue'
  164. import PearlDiagram from '../../components/PearlDiagram.vue'
  165. import AbilityDiagram from '../../components/AbilityDiagram.vue'
  166. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  167. import DimensionTasks from '../../components/DimensionTasks.vue'
  168. import DimensionActivities from '../../components/DimensionActivities.vue'
  169. import DimensionProducts from '../../components/DimensionProducts.vue'
  170. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  171. import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
  172. import RadarChart from '../../components/RadarChart.vue'
  173. import DimensionSubDims from '../../components/DimensionSubDims.vue'
  174. import { getVisibleSections, getEnergyOverview, getChildren, getFamilyEnergySandbox, getEnergySandbox, getFamilyMemberList, getOctopusTentacles, getPearlResources, deletePearlResource, getAbilityMap } from '../../utils/api.js'
  175. export default {
  176. components: { TabTransition, PageBanner, FamilyEnergyBar, FamilyRelationGraph, OctopusDiagram, PearlDiagram, AbilityDiagram, FamilyMemberStrip, DimensionTasks, DimensionActivities, DimensionProducts, DimensionIntroCard, FloatingAvatar, RadarChart, DimensionSubDims },
  177. data() {
  178. return {
  179. isLoggedIn: false,
  180. role: null,
  181. showTabTransition: true,
  182. activeChildId: null,
  183. selectedMemberId: null,
  184. activeChildName: '',
  185. userName: '',
  186. children: [],
  187. familyMembersVisible: [],
  188. childrenChecked: false,
  189. membersChecked: false,
  190. actionSubDims: [],
  191. sandboxData: null,
  192. currentView: 'self', // 'self' | 'family'
  193. dualDimension: null,
  194. selfId: null,
  195. visibleSections: [],
  196. pearlData: null,
  197. abilityData: null,
  198. funcList: [
  199. { icon: '\u{1F4AC}', label: '记录互动', needLogin: true, page: '/pages/action-detail/interaction-log' },
  200. { icon: '\u{1F4DD}', label: '关系问卷', needLogin: true, page: '/pages/action-detail/relationship-questionnaire' },
  201. { icon: '\u{1F465}', label: '家庭成员', needLogin: true, page: '/pages/profile-extra/family-members' },
  202. { icon: '\u{1F4CB}', label: '任务中心', needLogin: true, page: '/pages/tasks/tasks' }
  203. ]
  204. }
  205. },
  206. computed: {
  207. /** 关系图谱:成员节点(来自沙盘数据) */
  208. graphMembers: function() {
  209. if (!this.sandboxData || !this.sandboxData.members) return []
  210. return this.sandboxData.members.map(function(m) {
  211. return {
  212. id: m.memberId || m.id,
  213. nickname: m.name || m.nickname || '成员',
  214. memberType: m.memberType || 'child'
  215. }
  216. })
  217. },
  218. /** 关系图谱:节点能量映射 */
  219. energyMapForGraph: function() {
  220. var map = {}
  221. if (this.sandboxData && this.sandboxData.members) {
  222. for (var i = 0; i < this.sandboxData.members.length; i++) {
  223. var m = this.sandboxData.members[i]
  224. map[m.memberId || m.id] = {
  225. bodyScore: m.bodyScore || 0,
  226. mindScore: m.mindScore || 0,
  227. actionScore: m.actionScore || 0
  228. }
  229. }
  230. }
  231. return map
  232. },
  233. intimacyMapForGraph: function() {
  234. return {}
  235. },
  236. /** 每月引导语 */
  237. monthlyGuidance: function() {
  238. var month = new Date().getMonth()
  239. var messages = [
  240. '一月:新年伊始,增进家庭沟通',
  241. '二月:春节团聚,珍惜亲子时光',
  242. '三月:春暖花开,多陪伴孩子',
  243. '四月:清明踏青,共享家庭活动',
  244. '五月:劳动教育,培养家庭责任感',
  245. '六月:儿童节,倾听孩子心声',
  246. '七月:暑期陪伴,增进亲子关系',
  247. '八月:开学准备,共同规划',
  248. '九月:新学期,建立家庭规则',
  249. '十月:国庆假期,家庭协作时光',
  250. '十一月:感恩季节,表达家庭关爱',
  251. '十二月:年终总结,回顾家庭成长'
  252. ]
  253. return messages[month] || messages[0]
  254. },
  255. /** 当前选中成员的能量数据(从 sandboxData.members 中查找) */
  256. currentMemberEnergies: function() {
  257. if (!this.sandboxData || !this.sandboxData.members) return null
  258. var members = this.sandboxData.members
  259. var targetId = this.selectedMemberId || this.activeChildId
  260. for (var i = 0; i < members.length; i++) {
  261. var m = members[i]
  262. if (m && (m.memberId === targetId)) return m
  263. }
  264. return members[0] || null
  265. },
  266. /** 行6维关系域维度定义(根据角色切换家长版/孩子版) */
  267. actionDimensions: function() {
  268. var role = this.role || uni.getStorageSync('currentRole') || ''
  269. var isParent = (role === 'parent')
  270. if (isParent) {
  271. return [
  272. { key: 'actionParentChild', label: '亲子关系' },
  273. { key: 'actionMarital', label: '夫妻关系' },
  274. { key: 'actionParental', label: '父母关系' },
  275. { key: 'actionLeadership', label: '领导关系' },
  276. { key: 'actionSociality', label: '社会性' },
  277. { key: 'actionInterpersonal', label: '人际韧性' }
  278. ]
  279. } else {
  280. return [
  281. { key: 'actionChildParentChild', label: '亲子关系' },
  282. { key: 'actionSibling', label: '同胞关系' },
  283. { key: 'actionRelative', label: '亲属关系' },
  284. { key: 'actionTeacherStudent', label: '师生关系' },
  285. { key: 'actionChildSociality', label: '社会性' },
  286. { key: 'actionChildInterpersonal', label: '人际韧性' }
  287. ]
  288. }
  289. },
  290. /** 当前选中成员的行维度分数 */
  291. actionScore: function() {
  292. var member = this.currentMemberEnergies
  293. return member ? (member.actionScore || 0) : null
  294. },
  295. /** 行6维分值(从当前成员中提取,与 dimensions 顺序对应) */
  296. actionScores: function() {
  297. var member = this.currentMemberEnergies
  298. if (!member) return []
  299. var dims = this.actionDimensions
  300. var scores = []
  301. for (var i = 0; i < dims.length; i++) {
  302. scores.push(member[dims[i].key] || 0)
  303. }
  304. return scores
  305. }
  306. },
  307. onShow() {
  308. this.showTabTransition = true
  309. var token = uni.getStorageSync('token')
  310. this.isLoggedIn = !!token
  311. if (this.isLoggedIn) {
  312. this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  313. this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
  314. this.selfId = uni.getStorageSync('userId') || null
  315. }
  316. this.loadSectionConfig()
  317. if (this.isLoggedIn) {
  318. this.loadChildren()
  319. this.loadFamilyMembersVisible()
  320. this.loadOctopusTentacles()
  321. this.loadPearlResources()
  322. this.loadAbilityMap()
  323. }
  324. this._watchPageReady()
  325. },
  326. methods: {
  327. loadSectionConfig: function() {
  328. var baseSections = ['func_entries']
  329. if (!uni.getStorageSync('token')) {
  330. this.visibleSections = baseSections
  331. return
  332. }
  333. var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  334. var self = this
  335. getVisibleSections({ pageKey: 'action', role: role }).then(function(res) {
  336. if (res.code === 200 && res.data) {
  337. var keys = res.data.map(function(s) { return s.sectionKey })
  338. var merged = baseSections.slice()
  339. keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
  340. self.visibleSections = merged
  341. }
  342. }).catch(function(e) {
  343. self.visibleSections = ['func_entries']
  344. })
  345. },
  346. loadChildren: function() {
  347. var self = this
  348. getChildren().then(function(res) {
  349. if (res.code === 200 && res.data) {
  350. self.children = res.data
  351. var savedChildId = uni.getStorageSync('currentChildId')
  352. var found = false
  353. for (var i = 0; i < self.children.length; i++) {
  354. if (self.children[i].memberId === savedChildId) {
  355. self.activeChildId = savedChildId
  356. self.activeChildName = self.children[i].name || self.children[i].nickname || '孩子'
  357. found = true
  358. break
  359. }
  360. }
  361. if (!found && self.children.length > 0) {
  362. self.activeChildId = self.children[0].memberId
  363. self.activeChildName = self.children[0].name || self.children[0].nickname || '孩子'
  364. uni.setStorageSync('currentChildId', self.activeChildId)
  365. }
  366. if (self.activeChildId) {
  367. self.loadDashboardData()
  368. }
  369. }
  370. self.childrenChecked = true
  371. }).catch(function(e) {
  372. console.log('获取孩子列表失败', e)
  373. self.childrenChecked = true
  374. })
  375. },
  376. loadDashboardData: function() {
  377. if (!this.activeChildId) return
  378. this.loadEnergyData()
  379. this.loadSandboxData()
  380. },
  381. loadSandboxData: function() {
  382. var self = this
  383. getFamilyEnergySandbox().then(function(res) {
  384. if (res && res.data) {
  385. self.sandboxData = res.data
  386. }
  387. }).catch(function(e) {
  388. console.log('获取沙盘数据失败', e)
  389. })
  390. },
  391. switchView: function(view) {
  392. this.currentView = view
  393. if (view === 'family') {
  394. this.selectedMemberId = null
  395. var self = this
  396. getEnergySandbox('family').then(function(res) {
  397. if (res && res.data && !res.data.locked) {
  398. self.sandboxData = res.data.familyData || res.data
  399. }
  400. }).catch(function(e) { console.log('获取家庭数据失败', e) })
  401. } else {
  402. this.loadSandboxData()
  403. }
  404. },
  405. loadEnergyData: function() {
  406. var self = this
  407. getEnergyOverview(this.activeChildId).then(function(res) {
  408. if (res && res.data) {
  409. var dims = res.data.dimensions
  410. if (dims && dims.length > 0) {
  411. for (var i = 0; i < dims.length; i++) {
  412. if (dims[i].code === 'action') {
  413. self.dualDimension = dims[i]
  414. break
  415. }
  416. }
  417. }
  418. }
  419. }).catch(function(e) {
  420. console.log('获取能量概览失败', e)
  421. })
  422. },
  423. onFamilyMemberSelect: function(member) {
  424. this.selectedMemberId = member.id
  425. },
  426. loadFamilyMembersVisible: function() {
  427. var self = this
  428. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  429. self.familyMembersVisible = res.data || []
  430. self.membersChecked = true
  431. }).catch(function(e) {
  432. console.log('获取可见家庭成员失败', e)
  433. self.familyMembersVisible = []
  434. self.membersChecked = true
  435. })
  436. },
  437. sectionVisible: function(key) {
  438. return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
  439. },
  440. onFuncClick: function(item) {
  441. if (item.needLogin && !this.isLoggedIn) {
  442. uni.showModal({
  443. title: '提示',
  444. content: '请先登录后使用此功能',
  445. success: function(res) {
  446. if (res.confirm) uni.navigateTo({ url: '/pages/login/login' })
  447. }
  448. })
  449. return
  450. }
  451. if (item.page) uni.navigateTo({ url: item.page })
  452. },
  453. /** 加载章鱼图数据 */
  454. loadOctopusTentacles: function() {
  455. var self = this
  456. getOctopusTentacles().then(function(res) {
  457. var tentacles = (res.code === 200 && Array.isArray(res.data)) ? res.data : []
  458. if (self.$refs.octopusDiagram) {
  459. self.$refs.octopusDiagram.tentacles = tentacles
  460. }
  461. }).catch(function(e) {
  462. console.log('获取章鱼图数据失败', e)
  463. })
  464. },
  465. /** 查看某人的帮助明细 */
  466. onViewOctopusRecords: function(contactId) {
  467. if (!contactId) return
  468. uni.navigateTo({
  469. url: '/pages/action-detail/octopus-records?contactId=' + contactId
  470. })
  471. },
  472. /** 记录帮助入口 */
  473. goOctopusHelp: function() {
  474. uni.navigateTo({ url: '/pages/action-detail/octopus-add-help' })
  475. },
  476. /** 加载珍珠图数据 */
  477. loadPearlResources: function() {
  478. var self = this
  479. getPearlResources().then(function(res) {
  480. self.pearlData = (res.code === 200 && res.data) ? res.data : null
  481. }).catch(function(e) {
  482. console.log('获取珍珠图数据失败', e)
  483. self.pearlData = null
  484. })
  485. },
  486. /** 登记珍珠图资源入口 */
  487. goPearlAddResource: function() {
  488. uni.navigateTo({ url: '/pages/action-detail/pearl-add-resource' })
  489. },
  490. /** 删除珍珠图资源 */
  491. onDeletePearlResource: function(item) {
  492. if (!item || !item.id) return
  493. var self = this
  494. uni.showModal({
  495. title: '提示',
  496. content: '确定删除该资源吗?',
  497. success: function(res) {
  498. if (!res.confirm) return
  499. deletePearlResource({ itemId: item.id }).then(function(r) {
  500. if (r.code === 200) {
  501. uni.showToast({ title: '已删除', icon: 'success' })
  502. self.loadPearlResources()
  503. } else {
  504. uni.showToast({ title: r.message || '删除失败', icon: 'none' })
  505. }
  506. }).catch(function(e) {
  507. console.log('删除珍珠图资源失败', e)
  508. uni.showToast({ title: '删除失败', icon: 'none' })
  509. })
  510. }
  511. })
  512. },
  513. /** 加载能力图数据 */
  514. loadAbilityMap: function() {
  515. var self = this
  516. getAbilityMap().then(function(res) {
  517. self.abilityData = (res.code === 200 && Array.isArray(res.data)) ? res.data : []
  518. }).catch(function(e) {
  519. console.log('获取能力图数据失败', e)
  520. self.abilityData = []
  521. })
  522. },
  523. onTaskClick: function(task) {
  524. uni.navigateTo({ url: '/pages/tasks/tasks' })
  525. },
  526. goActivityDetail: function(act) {
  527. if (act && act.id) uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id })
  528. },
  529. goMoreActivities: function() {
  530. uni.navigateTo({ url: '/pages/activity/index' })
  531. },
  532. goProductDetail: function(prod) {
  533. if (prod && prod.id) uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  534. },
  535. goMoreProducts: function() {
  536. uni.navigateTo({ url: '/pages/shop/index/index' })
  537. },
  538. goTasks: function() {
  539. uni.navigateTo({ url: '/pages/tasks/tasks' })
  540. },
  541. _watchPageReady() {
  542. var self = this
  543. var unwatch = this.$watch(function() {
  544. if (self.isLoggedIn) {
  545. return !!(self.dualDimension || self.sandboxData)
  546. }
  547. return true
  548. }, function(val) {
  549. if (val) {
  550. if (unwatch) unwatch()
  551. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  552. }
  553. })
  554. }
  555. }
  556. }
  557. </script>
  558. <style scoped>
  559. .container {
  560. min-height: 100vh;
  561. background: #f5f7fa;
  562. padding-bottom: 120rpx;
  563. }
  564. /* 品牌定位语 */
  565. .brand-strap {
  566. margin: 16rpx 30rpx 0;
  567. padding: 20rpx 28rpx;
  568. background: linear-gradient(135deg, #F0FFF4, rgba(16,185,129,0.12));
  569. border-radius: 16rpx;
  570. border-left: 4rpx solid #10B981;
  571. }
  572. .brand-strap-text {
  573. font-size: 26rpx;
  574. color: #065F46;
  575. font-weight: 500;
  576. }
  577. /* 每月引导语 */
  578. .monthly-guidance {
  579. margin: 16rpx 30rpx 0;
  580. padding: 20rpx 28rpx;
  581. background: linear-gradient(135deg, #F0FFF4, rgba(16,185,129,0.08));
  582. border-radius: 16rpx;
  583. border-left: 4rpx solid #10B981;
  584. display: flex;
  585. align-items: center;
  586. gap: 12rpx;
  587. }
  588. .guidance-icon { font-size: 32rpx; }
  589. .guidance-text {
  590. font-size: 26rpx;
  591. color: #065F46;
  592. font-weight: 500;
  593. }
  594. /* ===== 通用区块 ===== */
  595. .section {
  596. margin: 20rpx 30rpx 0;
  597. }
  598. .section-header {
  599. display: flex;
  600. flex-direction: row;
  601. align-items: center;
  602. justify-content: space-between;
  603. margin-bottom: 16rpx;
  604. }
  605. .section-title {
  606. font-size: 32rpx;
  607. font-weight: bold;
  608. color: #333;
  609. }
  610. .section-sub {
  611. font-size: 22rpx;
  612. color: #999;
  613. }
  614. /* ===== 功能入口 ===== */
  615. .func-section {
  616. margin: 20rpx 30rpx 0;
  617. }
  618. .func-grid {
  619. display: flex;
  620. flex-direction: row;
  621. justify-content: space-between;
  622. background: #fff;
  623. border-radius: 20rpx;
  624. padding: 24rpx 16rpx;
  625. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  626. }
  627. .func-item {
  628. display: flex;
  629. flex-direction: column;
  630. align-items: center;
  631. flex: 1;
  632. }
  633. .func-icon-wrap {
  634. width: 80rpx;
  635. height: 80rpx;
  636. border-radius: 40rpx;
  637. background: linear-gradient(135deg, #D1FAE5, #ECFDF5);
  638. display: flex;
  639. align-items: center;
  640. justify-content: center;
  641. margin-bottom: 10rpx;
  642. }
  643. .func-icon {
  644. font-size: 40rpx;
  645. }
  646. .func-label {
  647. font-size: 22rpx;
  648. color: #666;
  649. font-weight: 500;
  650. }
  651. .bottom-spacer {
  652. height: 40rpx;
  653. }
  654. </style>