|
|
@@ -49,6 +49,16 @@
|
|
|
<text>👨🏫 邀请规划师</text>
|
|
|
<text class="arrow">›</text>
|
|
|
</button>
|
|
|
+ <!-- 会员中心(溪福俱乐部) -->
|
|
|
+ <view class="menu-item" @click="goToMembership">
|
|
|
+ <text>👑 会员中心</text>
|
|
|
+ <text class="arrow">›</text>
|
|
|
+ </view>
|
|
|
+ <!-- 服务商中心(仅已通过服务商可见) -->
|
|
|
+ <view class="menu-item" v-if="isVendor" @click="goToVendorCenter">
|
|
|
+ <text>🏪 服务商中心</text>
|
|
|
+ <text class="arrow">›</text>
|
|
|
+ </view>
|
|
|
<view class="menu-item" @click="logout">
|
|
|
<text>🚪 退出登录</text>
|
|
|
<text class="arrow">›</text>
|
|
|
@@ -78,7 +88,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { setPassword, verifyPassword, getChildren } from '../../utils/api.js'
|
|
|
+import { setPassword, verifyPassword, getChildren, vendorStatus } from '../../utils/api.js'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -92,7 +102,8 @@ export default {
|
|
|
confirmPassword: '',
|
|
|
children: [],
|
|
|
isSwitchedChild: false,
|
|
|
- shareData: null
|
|
|
+ shareData: null,
|
|
|
+ isVendor: false
|
|
|
}
|
|
|
},
|
|
|
onShareAppMessage() {
|
|
|
@@ -116,8 +127,9 @@ export default {
|
|
|
this.role = currentRole
|
|
|
this.hasPassword = !!uni.getStorageSync('passwordSet')
|
|
|
// 获取切换标记
|
|
|
- this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
|
|
|
+ this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
|
|
|
this.loadChildren()
|
|
|
+ this.checkVendorStatus()
|
|
|
},
|
|
|
methods: {
|
|
|
async loadChildren() {
|
|
|
@@ -300,6 +312,20 @@ export default {
|
|
|
uni.showToast({ title: e.message || '生成邀请失败', icon: 'none' })
|
|
|
}
|
|
|
},
|
|
|
+ goToMembership() {
|
|
|
+ uni.showToast({ title: '即将上线', icon: 'none' })
|
|
|
+ },
|
|
|
+ goToVendorCenter() {
|
|
|
+ uni.navigateTo({ url: '/pages/vendor/center' })
|
|
|
+ },
|
|
|
+ async checkVendorStatus() {
|
|
|
+ try {
|
|
|
+ const res = await vendorStatus()
|
|
|
+ this.isVendor = res.data && res.data.vendorStatus === 'approved'
|
|
|
+ } catch (e) {
|
|
|
+ this.isVendor = false
|
|
|
+ }
|
|
|
+ },
|
|
|
exitSwitch() {
|
|
|
if (!this.isSwitchedChild) return
|
|
|
uni.showModal({
|