|
|
@@ -3,184 +3,158 @@
|
|
|
<!-- TabTransition overlay -->
|
|
|
<tab-transition v-if="showTabTransition" dimCode="wealth" />
|
|
|
|
|
|
- <!-- 未登录 -->
|
|
|
- <view v-if="!isLoggedIn" class="login-prompt">
|
|
|
- <view class="prompt-icon">👤</view>
|
|
|
- <text class="prompt-title">登录浠艾福</text>
|
|
|
- <text class="prompt-desc">登录后查看财富能量详情</text>
|
|
|
- <button class="login-btn" @click="goLogin">登录 / 注册</button>
|
|
|
- </view>
|
|
|
+ <!-- 品牌头部(始终显示) -->
|
|
|
+ <PageBanner theme="wealth"
|
|
|
+ tagline="利他创富 · 价值共享"
|
|
|
+ quote="富足源于利他与坚持" />
|
|
|
|
|
|
- <template v-else>
|
|
|
- <!-- 品牌头部 -->
|
|
|
- <PageBanner theme="wealth"
|
|
|
- tagline="利他创富 · 价值共享"
|
|
|
- quote="富足源于利他与坚持" />
|
|
|
+ <!-- 游客专属区块 -->
|
|
|
+ <template v-if="!isLoggedIn">
|
|
|
+ <LoginGuideCard
|
|
|
+ title="登录后查看财富能量详情"
|
|
|
+ :items="[
|
|
|
+ '查看家庭财富能量与子维度评分',
|
|
|
+ '查看专属财富商品和活动推荐',
|
|
|
+ '查看创客中心和推广收益'
|
|
|
+ ]" />
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 退出切换按钮 -->
|
|
|
- <view class="exit-switch" v-if="isSwitchedChild" @click="exitSwitch">
|
|
|
- <text>🔄 退出切换</text>
|
|
|
- </view>
|
|
|
+ <!-- 登录后:五维能量条 -->
|
|
|
+ <FamilyEnergyBar
|
|
|
+ v-if="isLoggedIn"
|
|
|
+ dimensionCode="wealth"
|
|
|
+ :sandboxData="sandboxData"
|
|
|
+ :dualDimension="dualDimension" />
|
|
|
|
|
|
- <!-- 用户卡片 -->
|
|
|
- <view class="user-card" @click="goToProfile">
|
|
|
- <view class="avatar">👤</view>
|
|
|
- <view class="user-info">
|
|
|
- <text class="nickname">{{ nickname || '未设置昵称' }}</text>
|
|
|
- <text class="role">{{ role === 'parent' ? '家长模式' : (role === 'child' ? '孩子模式' : '成长规划师模式') }}</text>
|
|
|
- </view>
|
|
|
- <text class="card-arrow">›</text>
|
|
|
- </view>
|
|
|
+ <!-- 退出切换按钮 -->
|
|
|
+ <view class="exit-switch" v-if="isLoggedIn && isSwitchedChild" @click="exitSwitch">
|
|
|
+ <text>🔄 退出切换</text>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 切换按钮(家长模式 + 未切换状态) -->
|
|
|
- <view class="switch-section" v-if="role === 'parent' && !isSwitchedChild">
|
|
|
- <button class="btn-switch" @click="onSwitchMode">切换到孩子视角</button>
|
|
|
- </view>
|
|
|
+ <!-- 切换按钮(家长模式 + 未切换状态) -->
|
|
|
+ <view class="switch-section" v-if="isLoggedIn && role === 'parent' && !isSwitchedChild">
|
|
|
+ <button class="btn-switch" @click="onSwitchMode">切换到孩子视角</button>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 财富子维度卡片 -->
|
|
|
- <view class="section">
|
|
|
- <view class="section-header">
|
|
|
- <text class="section-title">💎 财富子维度</text>
|
|
|
+ <!-- 财富子维度卡片 -->
|
|
|
+ <view class="section" v-if="isLoggedIn">
|
|
|
+ <view class="section-header">
|
|
|
+ <text class="section-title">💎 财富子维度</text>
|
|
|
+ </view>
|
|
|
+ <!-- 家长版 -->
|
|
|
+ <view class="sub-dim-grid" v-if="role === 'parent'">
|
|
|
+ <view class="sub-dim-card" @click="goToIncome">
|
|
|
+ <text class="sub-dim-score">{{ wealthIncome || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">金钱收入</text>
|
|
|
+ <text class="sub-dim-desc">累计佣金</text>
|
|
|
</view>
|
|
|
- <!-- 家长版 -->
|
|
|
- <view class="sub-dim-grid" v-if="role === 'parent'">
|
|
|
- <view class="sub-dim-card" @click="goToIncome">
|
|
|
- <text class="sub-dim-score">{{ wealthIncome || '-' }}</text>
|
|
|
- <text class="sub-dim-label">金钱收入</text>
|
|
|
- <text class="sub-dim-desc">累计佣金</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="goToAchievements">
|
|
|
- <text class="sub-dim-score">{{ wealthAchievement || '-' }}</text>
|
|
|
- <text class="sub-dim-label">个人成就</text>
|
|
|
- <text class="sub-dim-desc">认证成就</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="goToNetwork">
|
|
|
- <text class="sub-dim-score">{{ wealthNetwork || '-' }}</text>
|
|
|
- <text class="sub-dim-label">资源网络</text>
|
|
|
- <text class="sub-dim-desc">推荐关系</text>
|
|
|
- </view>
|
|
|
+ <view class="sub-dim-card" @click="goToAchievements">
|
|
|
+ <text class="sub-dim-score">{{ wealthAchievement || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">个人成就</text>
|
|
|
+ <text class="sub-dim-desc">认证成就</text>
|
|
|
</view>
|
|
|
- <!-- 孩子版 -->
|
|
|
- <view class="sub-dim-grid" v-else>
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('education')">
|
|
|
- <text class="sub-dim-score">{{ wealthEducation || '-' }}</text>
|
|
|
- <text class="sub-dim-label">学业成绩</text>
|
|
|
- <text class="sub-dim-desc">测评综合</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('social')">
|
|
|
- <text class="sub-dim-score">{{ wealthSocial || '-' }}</text>
|
|
|
- <text class="sub-dim-label">社交筹码</text>
|
|
|
- <text class="sub-dim-desc">活动参与</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('points')">
|
|
|
- <text class="sub-dim-score">{{ wealthPoints || '-' }}</text>
|
|
|
- <text class="sub-dim-label">规则博弈</text>
|
|
|
- <text class="sub-dim-desc">积分效率</text>
|
|
|
- </view>
|
|
|
+ <view class="sub-dim-card" @click="goToNetwork">
|
|
|
+ <text class="sub-dim-score">{{ wealthNetwork || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">资源网络</text>
|
|
|
+ <text class="sub-dim-desc">推荐关系</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- 心的子维度(仅孩子) -->
|
|
|
- <view class="section" v-if="role !== 'parent'">
|
|
|
- <view class="section-header">
|
|
|
- <text class="section-title">🔥 心的子维度</text>
|
|
|
+ <!-- 孩子版 -->
|
|
|
+ <view class="sub-dim-grid" v-else>
|
|
|
+ <view class="sub-dim-card" @click="childSubDimClick('education')">
|
|
|
+ <text class="sub-dim-score">{{ wealthEducation || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">学业成绩</text>
|
|
|
+ <text class="sub-dim-desc">测评综合</text>
|
|
|
</view>
|
|
|
- <view class="sub-dim-grid heart-sub-dim">
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('emotion')">
|
|
|
- <text class="sub-dim-score">{{ heartEmotionStable || '-' }}</text>
|
|
|
- <text class="sub-dim-label">情绪稳定</text>
|
|
|
- <text class="sub-dim-desc">EMI情绪管理</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('understanding')">
|
|
|
- <text class="sub-dim-score">{{ heartUnderstanding || '-' }}</text>
|
|
|
- <text class="sub-dim-label">理解包容</text>
|
|
|
- <text class="sub-dim-desc">共情+社交适应</text>
|
|
|
- </view>
|
|
|
- <view class="sub-dim-card" @click="childSubDimClick('legacy')">
|
|
|
- <text class="sub-dim-score">{{ heartLegacy || '-' }}</text>
|
|
|
- <text class="sub-dim-label">传承传递</text>
|
|
|
- <text class="sub-dim-desc">未来开放</text>
|
|
|
- </view>
|
|
|
+ <view class="sub-dim-card" @click="childSubDimClick('social')">
|
|
|
+ <text class="sub-dim-score">{{ wealthSocial || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">社交筹码</text>
|
|
|
+ <text class="sub-dim-desc">活动参与</text>
|
|
|
+ </view>
|
|
|
+ <view class="sub-dim-card" @click="childSubDimClick('points')">
|
|
|
+ <text class="sub-dim-score">{{ wealthPoints || '-' }}</text>
|
|
|
+ <text class="sub-dim-label">规则博弈</text>
|
|
|
+ <text class="sub-dim-desc">积分效率</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 财富数据(仅家长) -->
|
|
|
- <view class="section" v-if="role === 'parent'">
|
|
|
- <view class="section-header">
|
|
|
- <text class="section-title">💰 财富数据</text>
|
|
|
+ <!-- 财富数据(仅家长) -->
|
|
|
+ <view class="section" v-if="isLoggedIn && role === 'parent'">
|
|
|
+ <view class="section-header">
|
|
|
+ <text class="section-title">💰 财富数据</text>
|
|
|
+ </view>
|
|
|
+ <view class="wealth-card">
|
|
|
+ <view class="wealth-item">
|
|
|
+ <text class="wealth-value">{{ wealthData.totalEarnings || 0 }}</text>
|
|
|
+ <text class="wealth-label">累计收益</text>
|
|
|
</view>
|
|
|
- <view class="wealth-card">
|
|
|
- <view class="wealth-item">
|
|
|
- <text class="wealth-value">{{ wealthData.totalEarnings || 0 }}</text>
|
|
|
- <text class="wealth-label">累计收益</text>
|
|
|
- </view>
|
|
|
- <view class="wealth-divider"></view>
|
|
|
- <view class="wealth-item">
|
|
|
- <text class="wealth-value">{{ wealthData.availableAmount || 0 }}</text>
|
|
|
- <text class="wealth-label">可提现</text>
|
|
|
- </view>
|
|
|
- <view class="wealth-divider"></view>
|
|
|
- <view class="wealth-item">
|
|
|
- <text class="wealth-value">{{ wealthData.referralCount || 0 }}</text>
|
|
|
- <text class="wealth-label">邀请人数</text>
|
|
|
- </view>
|
|
|
+ <view class="wealth-divider"></view>
|
|
|
+ <view class="wealth-item">
|
|
|
+ <text class="wealth-value">{{ wealthData.availableAmount || 0 }}</text>
|
|
|
+ <text class="wealth-label">可提现</text>
|
|
|
</view>
|
|
|
- <!-- 邀请码复制 -->
|
|
|
- <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
|
|
|
- <text class="referral-code-label">我的邀请码</text>
|
|
|
- <text class="referral-code-value">{{ wealthData.referralCode }}</text>
|
|
|
- <text class="referral-code-copy">复制</text>
|
|
|
+ <view class="wealth-divider"></view>
|
|
|
+ <view class="wealth-item">
|
|
|
+ <text class="wealth-value">{{ wealthData.referralCount || 0 }}</text>
|
|
|
+ <text class="wealth-label">邀请人数</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- 增值服务入口 -->
|
|
|
- <view class="section">
|
|
|
- <view class="section-header">
|
|
|
- <text class="section-title">🚀 增值服务</text>
|
|
|
- </view>
|
|
|
- <view class="service-grid">
|
|
|
- <view class="service-item" @click="goToCheckin">
|
|
|
- <text class="service-icon">📝</text>
|
|
|
- <text class="service-label">记账打卡</text>
|
|
|
- </view>
|
|
|
- <view class="service-item" @click="goToInsurance">
|
|
|
- <text class="service-icon">🛡️</text>
|
|
|
- <text class="service-label">保单管理</text>
|
|
|
- </view>
|
|
|
- <view class="service-item" @click="goToCreator">
|
|
|
- <text class="service-icon">🎨</text>
|
|
|
- <text class="service-label">创客中心</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <!-- 邀请码复制 -->
|
|
|
+ <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
|
|
|
+ <text class="referral-code-label">我的邀请码</text>
|
|
|
+ <text class="referral-code-value">{{ wealthData.referralCode }}</text>
|
|
|
+ <text class="referral-code-copy">复制</text>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 商品推荐 -->
|
|
|
- <DimensionProductList
|
|
|
- v-if="isLoggedIn"
|
|
|
- dimensionCode="wealth"
|
|
|
- :familyId="activeChildId"
|
|
|
- title="为你推荐" />
|
|
|
-
|
|
|
- <!-- 底部菜单 -->
|
|
|
- <view class="menu-list">
|
|
|
- <view class="menu-item" @click="goToProfile">
|
|
|
- <text>👤 个人中心</text>
|
|
|
- <text class="arrow">›</text>
|
|
|
- </view>
|
|
|
- <view class="menu-item" @click="goToPointsLogs">
|
|
|
- <text>📊 积分记录</text>
|
|
|
- <text class="arrow">›</text>
|
|
|
+ <!-- 增值服务入口 -->
|
|
|
+ <view class="section" v-if="isLoggedIn">
|
|
|
+ <view class="section-header">
|
|
|
+ <text class="section-title">🚀 增值服务</text>
|
|
|
+ </view>
|
|
|
+ <view class="service-grid">
|
|
|
+ <view class="service-item" @click="goToCheckin">
|
|
|
+ <text class="service-icon">📝</text>
|
|
|
+ <text class="service-label">记账打卡</text>
|
|
|
</view>
|
|
|
- <view class="menu-item" @click="goToPromotion">
|
|
|
- <text>📣 推广中心</text>
|
|
|
- <text class="arrow">›</text>
|
|
|
+ <view class="service-item" @click="goToInsurance">
|
|
|
+ <text class="service-icon">🛡️</text>
|
|
|
+ <text class="service-label">保单管理</text>
|
|
|
</view>
|
|
|
- <view class="menu-item logout-item" @click="logout">
|
|
|
- <text>🚪 退出登录</text>
|
|
|
- <text class="arrow">›</text>
|
|
|
+ <view class="service-item" @click="goToCreator">
|
|
|
+ <text class="service-icon">🎨</text>
|
|
|
+ <text class="service-label">创客中心</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </template>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 维度活动 -->
|
|
|
+ <DimensionActivities
|
|
|
+ dimensionCode="wealth"
|
|
|
+ :activities="dimensionActivities"
|
|
|
+ :isLoggedIn="isLoggedIn"
|
|
|
+ @activityClick="goActivityDetail"
|
|
|
+ @moreActivities="goMoreActivities" />
|
|
|
+
|
|
|
+ <!-- 商品推荐 -->
|
|
|
+ <DimensionProductList
|
|
|
+ v-if="isLoggedIn"
|
|
|
+ dimensionCode="wealth"
|
|
|
+ :familyId="activeChildId"
|
|
|
+ title="为你推荐" />
|
|
|
+
|
|
|
+ <!-- 推荐阅读 -->
|
|
|
+ <DimensionArticles
|
|
|
+ dimensionCode="wealth"
|
|
|
+ :articles="wealthArticles"
|
|
|
+ :isLoggedIn="isLoggedIn"
|
|
|
+ @articleClick="goArticleDetail"
|
|
|
+ @moreArticles="goMoreArticles" />
|
|
|
+
|
|
|
+ <!-- 底部占位 -->
|
|
|
+ <view class="bottom-spacer"></view>
|
|
|
+ <AIFloatingAvatar />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -188,20 +162,39 @@
|
|
|
import TabTransition from '../../components/tab-transition.vue'
|
|
|
import PageBanner from '../../components/PageBanner.vue'
|
|
|
import DimensionProductList from '../../components/DimensionProductList.vue'
|
|
|
+import DimensionActivities from '../../components/DimensionActivities.vue'
|
|
|
+import DimensionArticles from '../../components/DimensionArticles.vue'
|
|
|
+import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
|
|
|
+import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
|
+import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
|
|
|
import {
|
|
|
verifyPassword,
|
|
|
getChildren,
|
|
|
getWealthDetail,
|
|
|
getReferralCode,
|
|
|
getReferralSummary,
|
|
|
- getCommissionSummary
|
|
|
+ getCommissionSummary,
|
|
|
+ getFamilyEnergySandbox,
|
|
|
+ getEnergyOverview,
|
|
|
+ getActivityList,
|
|
|
+ getFeaturedArticles
|
|
|
} from '../../utils/api.js'
|
|
|
|
|
|
export default {
|
|
|
- components: { TabTransition, PageBanner, DimensionProductList },
|
|
|
+ components: {
|
|
|
+ TabTransition,
|
|
|
+ PageBanner,
|
|
|
+ DimensionProductList,
|
|
|
+ DimensionActivities,
|
|
|
+ DimensionArticles,
|
|
|
+ FamilyEnergyBar,
|
|
|
+ LoginGuideCard,
|
|
|
+ AIFloatingAvatar
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
showTabTransition: true,
|
|
|
+ isLoggedIn: false,
|
|
|
role: 'parent',
|
|
|
isSwitchedChild: false,
|
|
|
nickname: '',
|
|
|
@@ -211,10 +204,6 @@ export default {
|
|
|
wisdomScore: 0,
|
|
|
actionScore: 0,
|
|
|
wealthScore: 0,
|
|
|
- // 心的子维度(仅孩子有真实数据)
|
|
|
- heartEmotionStable: null,
|
|
|
- heartUnderstanding: null,
|
|
|
- heartLegacy: null,
|
|
|
// 子维度 - parent
|
|
|
wealthIncome: null,
|
|
|
wealthAchievement: null,
|
|
|
@@ -230,13 +219,16 @@ export default {
|
|
|
referralCount: 0,
|
|
|
referralCode: ''
|
|
|
},
|
|
|
- children: []
|
|
|
+ children: [],
|
|
|
+ // 能量条相关
|
|
|
+ sandboxData: null,
|
|
|
+ dualDimension: null,
|
|
|
+ // 维度活动和文章
|
|
|
+ dimensionActivities: [],
|
|
|
+ wealthArticles: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- isLoggedIn() {
|
|
|
- return !!uni.getStorageSync('token')
|
|
|
- },
|
|
|
activeChildId() {
|
|
|
if (this.role === 'child') {
|
|
|
return uni.getStorageSync('currentChildId')
|
|
|
@@ -246,8 +238,9 @@ export default {
|
|
|
},
|
|
|
onShow() {
|
|
|
this.showTabTransition = true
|
|
|
+ this.isLoggedIn = !!uni.getStorageSync('token')
|
|
|
|
|
|
- if (!uni.getStorageSync('token')) {
|
|
|
+ if (!this.isLoggedIn) {
|
|
|
this._watchPageReady()
|
|
|
return
|
|
|
}
|
|
|
@@ -266,12 +259,13 @@ export default {
|
|
|
this.loadChildren()
|
|
|
this.loadWealthDetail()
|
|
|
this.loadWealthData()
|
|
|
+ this.loadSandboxData()
|
|
|
+ // 游客也能浏览活动和文章
|
|
|
+ this.loadDimensionActivities()
|
|
|
+ this.loadFeaturedArticles()
|
|
|
this._watchPageReady()
|
|
|
},
|
|
|
methods: {
|
|
|
- goLogin() {
|
|
|
- uni.navigateTo({ url: '/pages/login/login' })
|
|
|
- },
|
|
|
_watchPageReady() {
|
|
|
var self = this
|
|
|
this.$nextTick(function() {
|
|
|
@@ -315,9 +309,6 @@ export default {
|
|
|
this.wealthEducation = d.wealthEducation
|
|
|
this.wealthSocial = d.wealthSocial
|
|
|
this.wealthPoints = d.wealthPoints
|
|
|
- this.heartEmotionStable = d.heartEmotionStable
|
|
|
- this.heartUnderstanding = d.heartUnderstanding
|
|
|
- this.heartLegacy = d.heartLegacy
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
@@ -352,6 +343,69 @@ export default {
|
|
|
console.error('获取佣金统计失败', e)
|
|
|
}
|
|
|
},
|
|
|
+ loadSandboxData() {
|
|
|
+ var self = this
|
|
|
+ getFamilyEnergySandbox().then(function(res) {
|
|
|
+ if (res && res.data) {
|
|
|
+ self.sandboxData = res.data
|
|
|
+ }
|
|
|
+ }).catch(function(e) {
|
|
|
+ console.log('获取沙盘数据失败', e)
|
|
|
+ })
|
|
|
+ // 加载双维度(财富与关系)
|
|
|
+ var childId = this.activeChildId
|
|
|
+ if (childId) {
|
|
|
+ getEnergyOverview(childId).then(function(res) {
|
|
|
+ if (res && res.data && res.data.dimensions) {
|
|
|
+ var dims = res.data.dimensions
|
|
|
+ for (var i = 0; i < dims.length; i++) {
|
|
|
+ if (dims[i].code === 'wealth') {
|
|
|
+ self.dualDimension = dims[i]
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(function(e) {
|
|
|
+ console.log('获取能量概览失败', e)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ loadDimensionActivities() {
|
|
|
+ var self = this
|
|
|
+ getActivityList({ dimensionCode: 'wealth', page: 1, size: 3 }).then(function(res) {
|
|
|
+ if (res && res.data) {
|
|
|
+ var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
|
|
|
+ self.dimensionActivities = list.slice(0, 3)
|
|
|
+ }
|
|
|
+ }).catch(function() { self.dimensionActivities = [] })
|
|
|
+ },
|
|
|
+ loadFeaturedArticles() {
|
|
|
+ var self = this
|
|
|
+ getFeaturedArticles({ size: 5 }).then(function(res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ var gradientColors = [
|
|
|
+ 'linear-gradient(135deg, #F59E0B, #FBBF24)',
|
|
|
+ 'linear-gradient(135deg, #42A5F5, #64B5F6)',
|
|
|
+ 'linear-gradient(135deg, #FF8C42, #FFB074)',
|
|
|
+ 'linear-gradient(135deg, #FF6B9D, #FF9DBD)',
|
|
|
+ 'linear-gradient(135deg, #6366F1, #818CF8)'
|
|
|
+ ]
|
|
|
+ var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
|
|
|
+ self.wealthArticles = list.map(function(item, index) {
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ category: item.categoryName || '财富创富',
|
|
|
+ categoryColor: gradientColors[index % gradientColors.length],
|
|
|
+ title: item.title || '',
|
|
|
+ summary: item.summary || '',
|
|
|
+ dimensionWeights: item.dimensionWeights || null,
|
|
|
+ views: item.viewCount ? String(item.viewCount) : '0',
|
|
|
+ date: item.publishedAt ? item.publishedAt.slice(0, 10) : ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(function() {})
|
|
|
+ },
|
|
|
copyReferralCode() {
|
|
|
if (!this.wealthData.referralCode) return
|
|
|
uni.setClipboardData({
|
|
|
@@ -433,21 +487,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- logout() {
|
|
|
- uni.showModal({
|
|
|
- title: '退出登录',
|
|
|
- content: '确定要退出登录吗?',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- uni.clearStorageSync()
|
|
|
- uni.reLaunch({ url: '/pages/login/login' })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- goToProfile() {
|
|
|
- uni.navigateTo({ url: '/pages/profile/profile' })
|
|
|
- },
|
|
|
goToCheckin() {
|
|
|
uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
|
|
|
},
|
|
|
@@ -457,12 +496,6 @@ export default {
|
|
|
goToCreator() {
|
|
|
uni.navigateTo({ url: '/pages/promotion/index' })
|
|
|
},
|
|
|
- goToPointsLogs() {
|
|
|
- uni.navigateTo({ url: '/pages/points/points' })
|
|
|
- },
|
|
|
- goToPromotion() {
|
|
|
- uni.navigateTo({ url: '/pages/promotion/index' })
|
|
|
- },
|
|
|
goToIncome() {
|
|
|
uni.navigateTo({ url: '/pages/promotion/commission' })
|
|
|
},
|
|
|
@@ -476,15 +509,26 @@ export default {
|
|
|
var routes = {
|
|
|
education: '/pages/assessment/results',
|
|
|
social: '/pages/activity/index',
|
|
|
- points: '/pages/points/mall',
|
|
|
- emotion: '/pages/mind-detail/emotion-report',
|
|
|
- understanding: '/pages/mind-detail/emotion-trend',
|
|
|
- legacy: '/pages/wishes/index'
|
|
|
+ points: '/pages/points/mall'
|
|
|
}
|
|
|
var url = routes[key]
|
|
|
if (url) {
|
|
|
uni.navigateTo({ url: url })
|
|
|
}
|
|
|
+ },
|
|
|
+ goActivityDetail(act) {
|
|
|
+ if (!act || !act.id) return
|
|
|
+ uni.navigateTo({ url: '/pages/discover-detail/activity-detail/activity-detail?id=' + act.id })
|
|
|
+ },
|
|
|
+ goMoreActivities() {
|
|
|
+ uni.navigateTo({ url: '/pages/activity/index' })
|
|
|
+ },
|
|
|
+ goArticleDetail(article) {
|
|
|
+ var id = article.id || article
|
|
|
+ uni.navigateTo({ url: '/pages/mind-detail/article-detail?id=' + id })
|
|
|
+ },
|
|
|
+ goMoreArticles() {
|
|
|
+ uni.navigateTo({ url: '/pages/article-center/index?dimension=wealth' })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -516,47 +560,6 @@ export default {
|
|
|
color: #999;
|
|
|
}
|
|
|
|
|
|
-/* 用户卡片 */
|
|
|
-.user-card {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- background: #fff;
|
|
|
- margin: 0 30rpx 20rpx;
|
|
|
- border-radius: 20rpx;
|
|
|
- padding: 30rpx;
|
|
|
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
|
|
|
-}
|
|
|
-.avatar {
|
|
|
- width: 100rpx;
|
|
|
- height: 100rpx;
|
|
|
- border-radius: 50%;
|
|
|
- background: linear-gradient(135deg, #F59E0B, #FBBF24);
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- font-size: 48rpx;
|
|
|
- margin-right: 24rpx;
|
|
|
- flex-shrink: 0;
|
|
|
-}
|
|
|
-.user-info {
|
|
|
- flex: 1;
|
|
|
-}
|
|
|
-.nickname {
|
|
|
- font-size: 34rpx;
|
|
|
- font-weight: bold;
|
|
|
- color: #333;
|
|
|
- margin-bottom: 8rpx;
|
|
|
-}
|
|
|
-.role {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #999;
|
|
|
-}
|
|
|
-.card-arrow {
|
|
|
- color: #ccc;
|
|
|
- font-size: 40rpx;
|
|
|
- margin-left: 16rpx;
|
|
|
-}
|
|
|
-
|
|
|
/* 切换区域 */
|
|
|
.switch-section {
|
|
|
margin: 0 30rpx 20rpx;
|
|
|
@@ -655,9 +658,6 @@ export default {
|
|
|
font-weight: bold;
|
|
|
color: #F59E0B;
|
|
|
}
|
|
|
-.heart-sub-dim .sub-dim-score {
|
|
|
- color: #FF6B9D;
|
|
|
-}
|
|
|
.sub-dim-label {
|
|
|
font-size: 24rpx;
|
|
|
color: #333;
|
|
|
@@ -695,77 +695,6 @@ export default {
|
|
|
color: #666;
|
|
|
}
|
|
|
|
|
|
-/* 底部菜单 */
|
|
|
-.menu-list {
|
|
|
- margin: 30rpx 30rpx 0;
|
|
|
- background: #fff;
|
|
|
- border-radius: 16rpx;
|
|
|
-}
|
|
|
-.menu-item {
|
|
|
- padding: 30rpx;
|
|
|
- border-bottom: 1rpx solid #f0f0f0;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- font-size: 28rpx;
|
|
|
-}
|
|
|
-.menu-item:last-child {
|
|
|
- border-bottom: none;
|
|
|
-}
|
|
|
-.arrow {
|
|
|
- color: #ccc;
|
|
|
- font-size: 32rpx;
|
|
|
-}
|
|
|
-.logout-item {
|
|
|
- color: #EF4444;
|
|
|
-}
|
|
|
-
|
|
|
-/* 未登录 */
|
|
|
-.login-prompt {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- min-height: 80vh;
|
|
|
- padding: 60rpx;
|
|
|
-}
|
|
|
-.prompt-icon {
|
|
|
- font-size: 120rpx;
|
|
|
- margin-bottom: 30rpx;
|
|
|
- width: 160rpx;
|
|
|
- height: 160rpx;
|
|
|
- line-height: 160rpx;
|
|
|
- text-align: center;
|
|
|
- background: #f5f5f5;
|
|
|
- border-radius: 50%;
|
|
|
-}
|
|
|
-.prompt-title {
|
|
|
- font-size: 36rpx;
|
|
|
- font-weight: bold;
|
|
|
- color: #333;
|
|
|
- margin-bottom: 16rpx;
|
|
|
-}
|
|
|
-.prompt-desc {
|
|
|
- font-size: 26rpx;
|
|
|
- color: #999;
|
|
|
- text-align: center;
|
|
|
- margin-bottom: 40rpx;
|
|
|
-}
|
|
|
-.login-prompt .login-btn {
|
|
|
- width: 60%;
|
|
|
- height: 80rpx;
|
|
|
- line-height: 80rpx;
|
|
|
- background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
|
|
|
- color: #fff;
|
|
|
- font-size: 30rpx;
|
|
|
- font-weight: bold;
|
|
|
- border-radius: 40rpx;
|
|
|
- text-align: center;
|
|
|
- border: none;
|
|
|
-}
|
|
|
-.login-prompt .login-btn::after {
|
|
|
- border: none;
|
|
|
-}
|
|
|
-
|
|
|
/* 退出切换 */
|
|
|
.exit-switch {
|
|
|
margin: 20rpx 30rpx 0;
|
|
|
@@ -776,4 +705,9 @@ export default {
|
|
|
font-size: 26rpx;
|
|
|
color: #92400E;
|
|
|
}
|
|
|
+
|
|
|
+/* 底部占位 */
|
|
|
+.bottom-spacer {
|
|
|
+ height: 120rpx;
|
|
|
+}
|
|
|
</style>
|