|
|
@@ -45,6 +45,16 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 我的管家入口 -->
|
|
|
+ <view class="butler-entry" @click="goButlerSelect">
|
|
|
+ <view class="butler-entry-icon">🤵</view>
|
|
|
+ <view class="butler-entry-main">
|
|
|
+ <text class="butler-entry-title">{{ butlerEntryTitle }}</text>
|
|
|
+ <text class="butler-entry-sub">{{ butlerEntrySub }}</text>
|
|
|
+ </view>
|
|
|
+ <text class="butler-entry-arrow">›</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 权益对比表 -->
|
|
|
<view class="compare-section">
|
|
|
<text class="section-title">权益对比</text>
|
|
|
@@ -68,7 +78,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getMyMembership } from '../../utils/api.js'
|
|
|
+import { getMyMembership, getMyButler } from '../../utils/api.js'
|
|
|
import { parseDate } from '../../utils/format.js'
|
|
|
|
|
|
export default {
|
|
|
@@ -86,11 +96,22 @@ export default {
|
|
|
{ name: '专属活动', free: '部分参与', family: '全部参与', premium: '优先参与' },
|
|
|
{ name: '成长报告', free: '月度', family: '每周+深度', premium: '每日+深度+专家解读' },
|
|
|
{ name: '任务配额', free: '每日5个', family: '不限量', premium: '不限量+优先审核' }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ myButlerInfo: null,
|
|
|
+ isL2Active: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ butlerEntryTitle() {
|
|
|
+ return this.myButlerInfo ? ('我的管家 · ' + this.myButlerInfo.nickname) : '我的管家'
|
|
|
+ },
|
|
|
+ butlerEntrySub() {
|
|
|
+ return this.myButlerInfo ? '点击查看或更换' : '久久一生会员可自助选择专属管家'
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
this.loadData()
|
|
|
+ this.loadButlerEntry()
|
|
|
},
|
|
|
methods: {
|
|
|
loadData() {
|
|
|
@@ -113,6 +134,17 @@ export default {
|
|
|
goBenefits() {
|
|
|
uni.navigateTo({ url: '/pages/membership/benefits' })
|
|
|
},
|
|
|
+ goButlerSelect() {
|
|
|
+ uni.navigateTo({ url: '/pages/butler/select' })
|
|
|
+ },
|
|
|
+ loadButlerEntry() {
|
|
|
+ var that = this
|
|
|
+ getMyButler().then(function (res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ that.myButlerInfo = res.data
|
|
|
+ }
|
|
|
+ }).catch(function () {})
|
|
|
+ },
|
|
|
formatDate(date) {
|
|
|
if (!date) return ''
|
|
|
var d = parseDate(date)
|
|
|
@@ -340,4 +372,12 @@ export default {
|
|
|
color: #F97316;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+
|
|
|
+/* ===== 我的管家入口 ===== */
|
|
|
+.butler-entry { display: flex; align-items: center; background: #fff; border-radius: 16rpx; padding: 28rpx; margin: 20rpx 0; }
|
|
|
+.butler-entry-icon { font-size: 48rpx; margin-right: 20rpx; }
|
|
|
+.butler-entry-main { flex: 1; display: flex; flex-direction: column; }
|
|
|
+.butler-entry-title { font-size: 30rpx; font-weight: bold; color: #333; }
|
|
|
+.butler-entry-sub { font-size: 24rpx; color: #999; margin-top: 6rpx; }
|
|
|
+.butler-entry-arrow { font-size: 40rpx; color: #ccc; }
|
|
|
</style>
|