更新
This commit is contained in:
1 parent
fb04d66e61
commit
b6b528490c
13 files changed
+518
-168
No files matched your search
@@ -1,12 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="profile-header" :style="headPad">
|
||||
<view class="header-top">
|
||||
<view class="back-platform" @tap="goBackPlatform">
|
||||
<FaIcon name="chevron-left" color="#ffffff" :size="14" />
|
||||
<text>回平台</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profile-info">
|
||||
<view class="profile-avatar">
|
||||
<text class="avatar-text">{{ avatarText }}</text>
|
||||
@@ -63,7 +57,7 @@
|
||||
<view class="bottom-space" />
|
||||
</view>
|
||||
|
||||
<AppTabbar current="profile" />
|
||||
<AppTabbar current="profile" :tabs="profileTabs" />
|
||||
|
||||
<!-- 编辑资料:姓名 / 邮箱可改,手机号由微信验证只读 -->
|
||||
<view v-if="editVisible" class="edit-mask" @tap="closeEdit">
|
||||
@@ -108,6 +102,12 @@ import AppTabbar from '@/components/MainTabbar.vue'
|
||||
|
||||
const user = ref(null)
|
||||
|
||||
// 个人中心底部只保留两项:左侧「我的」、右侧「回平台」(platform 由 MainTabbar 处理跳转)
|
||||
const profileTabs = [
|
||||
{ name: 'profile', text: '我的', icon: 'user' },
|
||||
{ name: 'platform', text: '回平台', icon: 'arrow-left' }
|
||||
]
|
||||
|
||||
const avatarText = computed(() => {
|
||||
const name = user.value?.nickname || user.value?.name || '云'
|
||||
return name.charAt(0).toUpperCase()
|
||||
@@ -135,6 +135,7 @@ const menuGroups = ref([
|
||||
{ title: '浏览历史', icon: 'clock-rotate-left' }
|
||||
],
|
||||
[
|
||||
{ title: '企业绑定', icon: 'building' },
|
||||
{ title: '消息通知', icon: 'bell', badge: '3' },
|
||||
{ title: '账号安全', icon: 'lock' },
|
||||
{ title: '隐私设置', icon: 'eye' }
|
||||
@@ -234,11 +235,13 @@ async function saveProfile() {
|
||||
}
|
||||
}
|
||||
|
||||
function goBackPlatform() {
|
||||
uni.reLaunch({ url: '/pages/nav/nav' })
|
||||
}
|
||||
|
||||
|
||||
function onMenuTap(item) {
|
||||
if (item.title === '企业绑定') {
|
||||
uni.navigateTo({ url: '/pages/profile/bindTenant' })
|
||||
return
|
||||
}
|
||||
if (item.title === '账号安全') {
|
||||
uni.navigateTo({ url: '/pages/login/forget' })
|
||||
return
|
||||
@@ -319,6 +322,8 @@ function handleLogout() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24rpx;
|
||||
/* 取消顶部回平台按钮后补偿占位,headPad 内联 paddingTop 继续避让状态栏/胶囊 */
|
||||
margin-top: 20rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -452,25 +457,6 @@ function handleLogout() {
|
||||
.bottom-space {
|
||||
height: 48rpx;
|
||||
}
|
||||
/* ============ 回平台 ============ */
|
||||
.header-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.back-platform {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: $radius-full;
|
||||
background: rgba(255, 255, 255, .18);
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* ============ 编辑资料弹层 ============ */
|
||||
.edit-mask {
|
||||
position: fixed;
|
||||
|
||||
Reference in new issue
Block a user