更新若干
This commit is contained in:
1 parent
54c90072fb
commit
5682069553
59 files changed
+3813
-1617
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="user-profile">
|
||||
<div class="profile-page" v-loading="!userInfo">
|
||||
<input
|
||||
ref="avatarInputRef"
|
||||
type="file"
|
||||
@@ -7,32 +7,150 @@
|
||||
class="avatar-file-input"
|
||||
@change="onAvatarPicked"
|
||||
/>
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
|
||||
<ProfileCard
|
||||
:user-info="userInfo"
|
||||
@change-avatar="handleAvatarChange"
|
||||
/>
|
||||
|
||||
<QuickActions @logout="handleLogout" />
|
||||
<div class="profile-hero">
|
||||
<div class="hero-deco hero-deco-a"></div>
|
||||
<div class="hero-deco hero-deco-b"></div>
|
||||
<div class="hero-main">
|
||||
<div class="avatar-wrap" @click="handleAvatarChange" :title="avatarUploading ? '上传中...' : '点击更换头像'">
|
||||
<el-avatar :size="96" :src="userInfo?.avatar || ''" class="hero-avatar">
|
||||
{{ (userInfo?.name || userInfo?.account || "U").charAt(0).toUpperCase() }}
|
||||
</el-avatar>
|
||||
<span class="avatar-badge"><el-icon><Camera /></el-icon></span>
|
||||
</div>
|
||||
<div class="hero-info">
|
||||
<div class="hero-name-row">
|
||||
<h1 class="hero-name">{{ userInfo?.name || userInfo?.account || "用户" }}</h1>
|
||||
<el-tag :type="userInfo?.status === 1 ? 'success' : 'danger'" effect="dark" size="small" round>
|
||||
{{ userInfo?.status === 1 ? "正常" : "禁用" }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<p class="hero-account">@{{ userInfo?.account || "-" }}</p>
|
||||
<div class="hero-meta" v-if="subTitle">
|
||||
<span v-if="department"><el-icon><OfficeBuilding /></el-icon>{{ department }}</span>
|
||||
<span v-if="position"><el-icon><Postcard /></el-icon>{{ position }}</span>
|
||||
<span v-if="roleName"><el-icon><User /></el-icon>{{ roleName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<el-button type="primary" round :icon="Edit" @click="handleEditProfile">编辑资料</el-button>
|
||||
<el-button round :icon="SwitchButton" @click="handleLogout">退出登录</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-stats">
|
||||
<div class="stat-item">
|
||||
<span class="stat-value">{{ userInfo?.login_count ?? 0 }}</span>
|
||||
<span class="stat-label">累计登录</span>
|
||||
</div>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-value stat-date">{{ formatDate(userInfo?.create_time) }}</span>
|
||||
<span class="stat-label">注册时间</span>
|
||||
</div>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-value">{{ securityScore }}/3</span>
|
||||
<span class="stat-label">安全完善度</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="20" class="profile-body">
|
||||
<el-col :xs="24" :sm="24" :md="9" :lg="8" :xl="8">
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="panel-icon icon-blue"><el-icon><User /></el-icon></span>
|
||||
<h3 class="panel-title">账户信息</h3>
|
||||
</div>
|
||||
<div class="info-list">
|
||||
<div class="info-item">
|
||||
<span class="info-label">账号</span>
|
||||
<span class="info-value">{{ userInfo?.account || "-" }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">手机号</span>
|
||||
<span class="info-value" :class="{ 'value-empty': !userInfo?.phone }">{{ userInfo?.phone || "未绑定" }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">邮箱</span>
|
||||
<span class="info-value" :class="{ 'value-empty': !userInfo?.email }">{{ userInfo?.email || "未绑定" }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">性别</span>
|
||||
<span class="info-value">{{ getSexText(userInfo?.sex) }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">生日</span>
|
||||
<span class="info-value">{{ userInfo?.birth || "-" }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">最后登录</span>
|
||||
<span class="info-value">{{ userInfo?.last_login_ip || "-" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="panel-icon icon-green"><el-icon><Lock /></el-icon></span>
|
||||
<h3 class="panel-title">安全中心</h3>
|
||||
<span class="panel-extra">已完善 {{ securityScore }}/3 项</span>
|
||||
</div>
|
||||
<div class="security-list">
|
||||
<div class="security-item">
|
||||
<span class="security-ico ico-blue"><el-icon><Lock /></el-icon></span>
|
||||
<div class="security-text">
|
||||
<div class="security-title">登录密码</div>
|
||||
<div class="security-desc">已设置 · 定期更换更安全</div>
|
||||
</div>
|
||||
<el-button type="primary" link size="small" @click="handleChangePassword">修改</el-button>
|
||||
</div>
|
||||
<div class="security-item">
|
||||
<span class="security-ico" :class="userInfo?.phone ? 'ico-green' : 'ico-gray'"><el-icon><Iphone /></el-icon></span>
|
||||
<div class="security-text">
|
||||
<div class="security-title">手机绑定</div>
|
||||
<div class="security-desc">{{ userInfo?.phone ? maskPhone(userInfo.phone) : "未绑定 · 建议绑定" }}</div>
|
||||
</div>
|
||||
<el-button type="primary" link size="small" @click="bindPhoneDialogVisible = true">
|
||||
{{ userInfo?.phone ? "更换" : "绑定" }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="security-item">
|
||||
<span class="security-ico" :class="userInfo?.email ? 'ico-green' : 'ico-gray'"><el-icon><Message /></el-icon></span>
|
||||
<div class="security-text">
|
||||
<div class="security-title">邮箱绑定</div>
|
||||
<div class="security-desc">{{ userInfo?.email ? maskEmail(userInfo.email) : "未绑定 · 建议绑定" }}</div>
|
||||
</div>
|
||||
<el-button type="primary" link size="small" @click="bindEmailDialogVisible = true">
|
||||
{{ userInfo?.email ? "更换" : "绑定" }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
|
||||
<DetailCard
|
||||
:user-info="userInfo"
|
||||
:format-date="formatDate"
|
||||
:get-sex-text="getSexText"
|
||||
@edit="handleEditProfile"
|
||||
/>
|
||||
<el-col :xs="24" :sm="24" :md="15" :lg="16" :xl="16">
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="panel-icon icon-purple"><el-icon><Tickets /></el-icon></span>
|
||||
<h3 class="panel-title">个人简介</h3>
|
||||
<el-button type="primary" link size="small" :icon="Edit" @click="handleEditProfile">编辑</el-button>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="profile-desc">
|
||||
<el-descriptions-item label="姓名">{{ userInfo?.name || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="账号">{{ userInfo?.account || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ getSexText(userInfo?.sex) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="生日">{{ userInfo?.birth || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">{{ userInfo?.phone || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{ userInfo?.email || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="注册时间">{{ formatDate(userInfo?.create_time) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最后登录IP">{{ userInfo?.last_login_ip || "-" }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<SecurityCard
|
||||
:user-info="userInfo"
|
||||
@change-password="handleChangePassword"
|
||||
@bind-phone="bindPhoneDialogVisible = true"
|
||||
@bind-email="bindEmailDialogVisible = true"
|
||||
/>
|
||||
|
||||
<WechatBindCard />
|
||||
<div class="panel wechat-panel">
|
||||
<WechatBindCard />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -42,19 +160,13 @@
|
||||
:user-id="authStore.user?.id"
|
||||
@saved="fetchUserInfo"
|
||||
/>
|
||||
|
||||
<ChangePasswordDialog
|
||||
v-model="passwordDialogVisible"
|
||||
:user-id="authStore.user?.id"
|
||||
/>
|
||||
|
||||
<ChangePasswordDialog v-model="passwordDialogVisible" :user-id="authStore.user?.id" />
|
||||
<BindPhoneDialog
|
||||
v-model="bindPhoneDialogVisible"
|
||||
:user-info="userInfo"
|
||||
:user-id="authStore.user?.id"
|
||||
@saved="fetchUserInfo"
|
||||
/>
|
||||
|
||||
<BindEmailDialog
|
||||
v-model="bindEmailDialogVisible"
|
||||
:user-info="userInfo"
|
||||
@@ -65,15 +177,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { Camera, Edit, SwitchButton, User, Lock, Iphone, Message, OfficeBuilding, Postcard, Tickets } from "@element-plus/icons-vue";
|
||||
import { getUserInfo, uploadAvatar } from "@/api/user";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { formatDateTime as formatDate } from "@/utils/datetime";
|
||||
import ProfileCard from "./components/ProfileCard.vue";
|
||||
import QuickActions from "./components/QuickActions.vue";
|
||||
import DetailCard from "./components/DetailCard.vue";
|
||||
import SecurityCard from "./components/SecurityCard.vue";
|
||||
import { getCurrentUserProfile } from "@/api/login";
|
||||
import EditProfileDialog from "./components/EditProfileDialog.vue";
|
||||
import ChangePasswordDialog from "./components/ChangePasswordDialog.vue";
|
||||
import BindPhoneDialog from "./components/BindPhoneDialog.vue";
|
||||
@@ -88,15 +198,35 @@ const passwordDialogVisible = ref(false);
|
||||
const bindPhoneDialogVisible = ref(false);
|
||||
const bindEmailDialogVisible = ref(false);
|
||||
|
||||
const extraProfile = ref({ department: "", position: "", role_name: "" });
|
||||
const department = computed(() => extraProfile.value.department || "");
|
||||
const position = computed(() => extraProfile.value.position || "");
|
||||
const roleName = computed(() => extraProfile.value.role_name || "");
|
||||
const subTitle = computed(() => department.value || position.value || roleName.value);
|
||||
|
||||
const securityScore = computed(() => {
|
||||
const u = userInfo.value || {};
|
||||
return 1 + (u.phone ? 1 : 0) + (u.email ? 1 : 0);
|
||||
});
|
||||
|
||||
const getSexText = (sex) => {
|
||||
const map = {
|
||||
0: "保密",
|
||||
1: "男",
|
||||
2: "女"
|
||||
};
|
||||
const map = { 0: "保密", 1: "男", 2: "女" };
|
||||
return map[sex] || "-";
|
||||
};
|
||||
|
||||
const maskPhone = (phone) => {
|
||||
const s = String(phone || "");
|
||||
return s.length >= 7 ? `${s.slice(0, 3)}****${s.slice(-4)}` : s;
|
||||
};
|
||||
|
||||
const maskEmail = (email) => {
|
||||
const s = String(email || "");
|
||||
const at = s.indexOf("@");
|
||||
if (at <= 0) return s;
|
||||
const name = s.slice(0, at);
|
||||
return `${name.slice(0, Math.min(2, name.length))}***${s.slice(at)}`;
|
||||
};
|
||||
|
||||
const fetchUserInfo = async () => {
|
||||
try {
|
||||
const userId = authStore.user?.id;
|
||||
@@ -105,22 +235,29 @@ const fetchUserInfo = async () => {
|
||||
return;
|
||||
}
|
||||
const res = await getUserInfo(userId);
|
||||
if (res.code === 200) {
|
||||
userInfo.value = res.data;
|
||||
}
|
||||
if (res.code === 200) userInfo.value = res.data;
|
||||
} catch (error) {
|
||||
console.error("获取用户信息失败", error);
|
||||
ElMessage.error("获取用户信息失败");
|
||||
}
|
||||
};
|
||||
|
||||
const handleEditProfile = () => {
|
||||
editDialogVisible.value = true;
|
||||
const fetchExtraProfile = async () => {
|
||||
try {
|
||||
const res = await getCurrentUserProfile();
|
||||
if (res && res.code === 200 && res.data) {
|
||||
extraProfile.value = {
|
||||
department: res.data.department || "",
|
||||
position: res.data.position || "",
|
||||
role_name: res.data.role_name || "",
|
||||
};
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
};
|
||||
|
||||
const handleChangePassword = () => {
|
||||
passwordDialogVisible.value = true;
|
||||
};
|
||||
const handleEditProfile = () => { editDialogVisible.value = true; };
|
||||
const handleChangePassword = () => { passwordDialogVisible.value = true; };
|
||||
|
||||
const avatarInputRef = ref(null);
|
||||
const avatarUploading = ref(false);
|
||||
@@ -149,7 +286,6 @@ async function onAvatarPicked(event) {
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
|
||||
avatarUploading.value = true;
|
||||
try {
|
||||
const res = await uploadAvatar(formData);
|
||||
@@ -173,28 +309,15 @@ const handleLogout = () => {
|
||||
ElMessageBox.confirm("确定要退出登录吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
}).then(async () => {
|
||||
try {
|
||||
await authStore.logout(authStore.user?.id);
|
||||
} catch (error) {
|
||||
console.error("退出登录接口调用失败:", error);
|
||||
}
|
||||
|
||||
localStorage.removeItem("active_tab");
|
||||
localStorage.removeItem("1123567809876");
|
||||
localStorage.removeItem("tabs_list");
|
||||
localStorage.removeItem("token");
|
||||
localStorage.removeItem("user");
|
||||
localStorage.removeItem("tenant");
|
||||
|
||||
sessionStorage.removeItem("active_tab");
|
||||
sessionStorage.removeItem("456");
|
||||
sessionStorage.removeItem("tabs_list");
|
||||
sessionStorage.removeItem("token");
|
||||
sessionStorage.removeItem("user");
|
||||
sessionStorage.removeItem("tenant");
|
||||
|
||||
["active_tab", "1123567809876", "tabs_list", "token", "user", "tenant"].forEach((k) => localStorage.removeItem(k));
|
||||
["active_tab", "456", "tabs_list", "token", "user", "tenant"].forEach((k) => sessionStorage.removeItem(k));
|
||||
const clearCookie = (name) => {
|
||||
document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;
|
||||
document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=`;
|
||||
@@ -203,22 +326,11 @@ const handleLogout = () => {
|
||||
document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${location.hostname}`;
|
||||
}
|
||||
};
|
||||
|
||||
clearCookie("PHPSESSID");
|
||||
clearCookie("token");
|
||||
clearCookie("user");
|
||||
clearCookie("tenant");
|
||||
|
||||
const cookies = document.cookie.split(";");
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
const cookie = cookies[i].trim();
|
||||
const eqPos = cookie.indexOf("=");
|
||||
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
||||
if (name) {
|
||||
clearCookie(name);
|
||||
}
|
||||
}
|
||||
|
||||
["PHPSESSID", "token", "user", "tenant"].forEach(clearCookie);
|
||||
document.cookie.split(";").forEach((cookie) => {
|
||||
const name = cookie.trim().split("=")[0];
|
||||
if (name) clearCookie(name);
|
||||
});
|
||||
authStore.clearToken();
|
||||
ElMessage.success("已退出登录");
|
||||
}).catch(() => {});
|
||||
@@ -226,15 +338,242 @@ const handleLogout = () => {
|
||||
|
||||
onMounted(() => {
|
||||
fetchUserInfo();
|
||||
fetchExtraProfile();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.user-profile {
|
||||
.profile-page {
|
||||
padding: 0;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.avatar-file-input {
|
||||
display: none;
|
||||
.avatar-file-input { display: none; }
|
||||
|
||||
/* 顶部横幅 */
|
||||
.profile-hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 16px;
|
||||
padding: 32px 36px 0;
|
||||
color: #fff;
|
||||
background: linear-gradient(120deg, #2563eb 0%, #3b82f6 45%, #6366f1 100%);
|
||||
box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18);
|
||||
|
||||
.hero-deco {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
pointer-events: none;
|
||||
}
|
||||
.hero-deco-a { width: 260px; height: 260px; right: -60px; top: -110px; }
|
||||
.hero-deco-b { width: 180px; height: 180px; right: 160px; bottom: -90px; background: rgba(255, 255, 255, 0.06); }
|
||||
|
||||
.hero-main {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.avatar-wrap {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
|
||||
.hero-avatar {
|
||||
border: 3px solid rgba(255, 255, 255, 0.85);
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.avatar-badge {
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: -2px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
color: #2563eb;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 15px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
&:hover .avatar-badge { transform: scale(1.1); }
|
||||
}
|
||||
|
||||
.hero-info {
|
||||
flex: 1;
|
||||
min-width: 220px;
|
||||
|
||||
.hero-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
.hero-name { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.5px; }
|
||||
}
|
||||
.hero-account { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, 0.82); }
|
||||
.hero-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 14px;
|
||||
margin-top: 12px;
|
||||
span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(255, 255, 255, 0.9); }
|
||||
}
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
:deep(.el-button--primary) {
|
||||
background: #fff;
|
||||
color: #2563eb;
|
||||
border-color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
:deep(.el-button:not(.el-button--primary)) {
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
color: #fff;
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
&:hover { background: rgba(255, 255, 255, 0.26); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hero-stats {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 36px;
|
||||
margin-top: 28px;
|
||||
padding: 18px 0 20px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
||||
|
||||
.stat-item { display: flex; flex-direction: column; gap: 4px; }
|
||||
.stat-value { font-size: 22px; font-weight: 700; }
|
||||
.stat-value.stat-date { font-size: 16px; }
|
||||
.stat-label { font-size: 12px; color: rgba(255, 255, 255, 0.78); }
|
||||
.stat-divider { width: 1px; height: 30px; background: rgba(255, 255, 255, 0.25); }
|
||||
}
|
||||
}
|
||||
|
||||
.profile-body { margin-top: 20px; }
|
||||
|
||||
.panel {
|
||||
background: var(--el-bg-color);
|
||||
border: 1px solid var(--el-border-color-lighter);
|
||||
border-radius: 14px;
|
||||
padding: 20px 22px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
|
||||
transition: box-shadow 0.3s;
|
||||
&:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }
|
||||
|
||||
.panel-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 18px;
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
|
||||
.panel-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--el-text-color-primary); flex: 1; }
|
||||
.panel-extra { font-size: 12px; color: var(--el-text-color-secondary); }
|
||||
}
|
||||
|
||||
.panel-icon {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 9px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.icon-blue { background: #eaf2ff; color: #2563eb; }
|
||||
.icon-green { background: #e8f8f0; color: #16a34a; }
|
||||
.icon-purple { background: #f1ecff; color: #7c3aed; }
|
||||
}
|
||||
|
||||
.info-list {
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 11px 0;
|
||||
border-bottom: 1px dashed var(--el-border-color-lighter);
|
||||
&:last-child { border-bottom: none; }
|
||||
.info-label { font-size: 13px; color: var(--el-text-color-secondary); flex-shrink: 0; }
|
||||
.info-value { font-size: 14px; font-weight: 500; color: var(--el-text-color-primary); text-align: right; word-break: break-all; }
|
||||
.info-value.value-empty { color: var(--el-text-color-placeholder); font-weight: 400; }
|
||||
}
|
||||
}
|
||||
|
||||
.security-list {
|
||||
.security-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
background: var(--el-fill-color-lighter);
|
||||
&:last-child { margin-bottom: 0; }
|
||||
.security-ico {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ico-blue { background: #eaf2ff; color: #2563eb; }
|
||||
.ico-green { background: #e8f8f0; color: #16a34a; }
|
||||
.ico-gray { background: var(--el-fill-color); color: var(--el-text-color-placeholder); }
|
||||
.security-text { flex: 1; min-width: 0; }
|
||||
.security-title { font-size: 14px; font-weight: 600; color: var(--el-text-color-primary); }
|
||||
.security-desc { margin-top: 3px; font-size: 12px; color: var(--el-text-color-secondary); }
|
||||
}
|
||||
}
|
||||
|
||||
.profile-desc {
|
||||
:deep(.el-descriptions__label) { font-weight: 500; color: var(--el-text-color-secondary); }
|
||||
}
|
||||
|
||||
.wechat-panel {
|
||||
:deep(.wechat-bind-card) {
|
||||
margin-top: 0 !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
:deep(.el-card__header) { padding-left: 0; padding-right: 0; border-bottom-color: var(--el-border-color-lighter); }
|
||||
:deep(.el-card__body) { padding-left: 0; padding-right: 0; }
|
||||
:deep(.card-title) { color: var(--el-text-color-primary); font-size: 16px; font-weight: 600; }
|
||||
:deep(.bound-info p) { color: var(--el-text-color-regular); }
|
||||
:deep(.tip) { color: var(--el-text-color-secondary); }
|
||||
:deep(.guide-list) { color: var(--el-text-color-regular); }
|
||||
:deep(.qr-box) { border-color: var(--el-border-color); }
|
||||
:deep(.qr-empty) { color: var(--el-text-color-placeholder); }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.profile-hero { padding: 22px 20px 0; }
|
||||
.hero-main { gap: 16px; }
|
||||
.hero-actions { width: 100%; }
|
||||
.hero-stats { gap: 18px; }
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user