`);
_push(ssrRenderComponent(_component_a_result, {
status: "403",
title: "请先登录",
"sub-title": "登录后可查看和编辑个人信息"
}, {
extra: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_a_button, {
type: "primary",
size: "large",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/login")
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`去登录`);
} else {
return [
createTextVNode("去登录")
];
}
}),
_: 1
}, _parent2, _scopeId));
} else {
return [
createVNode(_component_a_button, {
type: "primary",
size: "large",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/login")
}, {
default: withCtx(() => [
createTextVNode("去登录")
]),
_: 1
}, 8, ["onClick"])
];
}
}),
_: 1
}, _parent));
_push(`
`);
_push(ssrRenderComponent(_component_a_row, { gutter: [32, 24] }, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_a_col, {
xs: 24,
lg: 7
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`
`);
_push3(ssrRenderComponent(_component_a_upload, {
name: "avatar",
"list-type": "picture-circle",
class: "avatar-uploader",
"show-upload-list": false,
"before-upload": beforeUpload,
onChange: handleAvatarChange
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(`
`);
if (unref(userInfo).avatar) {
_push4(`
![avatar]()
`);
} else {
_push4(`
${ssrInterpolate(unref(userInfo).nickname?.charAt(0) || "用")}
`);
}
_push4(`
更换头像
`);
} else {
return [
createVNode("div", { class: "avatar-wrap" }, [
unref(userInfo).avatar ? (openBlock(), createBlock("img", {
key: 0,
src: unref(userInfo).avatar,
alt: "avatar",
class: "avatar-img"
}, null, 8, ["src"])) : (openBlock(), createBlock("div", {
key: 1,
class: "avatar-placeholder"
}, toDisplayString(unref(userInfo).nickname?.charAt(0) || "用"), 1)),
createVNode("div", { class: "avatar-overlay" }, [
createVNode("span", null, "更换头像")
])
])
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
${ssrInterpolate(unref(userInfo).nickname || unref(userInfo).username || "用户")}
`);
_push3(ssrRenderComponent(_component_a_tag, {
color: unref(userInfo).isAdmin ? "red" : "blue"
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(`${ssrInterpolate(unref(userInfo).isAdmin ? "管理员" : "普通用户")}`);
} else {
return [
createTextVNode(toDisplayString(unref(userInfo).isAdmin ? "管理员" : "普通用户"), 1)
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
${ssrInterpolate(unref(stats).suggestions)}
建言
${ssrInterpolate(unref(stats).favorites)}
收藏
${ssrInterpolate(unref(stats).views)}
浏览
`);
} else {
return [
createVNode("div", { class: "profile-card" }, [
createVNode("div", { class: "avatar-section" }, [
createVNode(_component_a_upload, {
name: "avatar",
"list-type": "picture-circle",
class: "avatar-uploader",
"show-upload-list": false,
"before-upload": beforeUpload,
onChange: handleAvatarChange
}, {
default: withCtx(() => [
createVNode("div", { class: "avatar-wrap" }, [
unref(userInfo).avatar ? (openBlock(), createBlock("img", {
key: 0,
src: unref(userInfo).avatar,
alt: "avatar",
class: "avatar-img"
}, null, 8, ["src"])) : (openBlock(), createBlock("div", {
key: 1,
class: "avatar-placeholder"
}, toDisplayString(unref(userInfo).nickname?.charAt(0) || "用"), 1)),
createVNode("div", { class: "avatar-overlay" }, [
createVNode("span", null, "更换头像")
])
])
]),
_: 1
})
]),
createVNode("h2", { class: "user-name" }, toDisplayString(unref(userInfo).nickname || unref(userInfo).username || "用户"), 1),
createVNode("div", { class: "user-role" }, [
createVNode(_component_a_tag, {
color: unref(userInfo).isAdmin ? "red" : "blue"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(userInfo).isAdmin ? "管理员" : "普通用户"), 1)
]),
_: 1
}, 8, ["color"])
]),
createVNode("div", { class: "user-stats" }, [
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).suggestions), 1),
createVNode("div", { class: "stat-label" }, "建言")
]),
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).favorites), 1),
createVNode("div", { class: "stat-label" }, "收藏")
]),
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).views), 1),
createVNode("div", { class: "stat-label" }, "浏览")
])
]),
createVNode("div", { class: "side-menu" }, [
(openBlock(), createBlock(Fragment, null, renderList(sideMenuItems, (item) => {
return createVNode("div", {
key: item.key,
class: ["side-menu-item", { active: unref(activeTab) === item.key }],
onClick: ($event) => activeTab.value = item.key
}, [
createVNode("span", { class: "menu-icon" }, toDisplayString(item.icon), 1),
createVNode("span", null, toDisplayString(item.label), 1)
], 10, ["onClick"]);
}), 64))
])
])
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_col, {
xs: 24,
lg: 17
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`
`);
_push3(ssrRenderComponent(_component_a_form, {
model: unref(editForm),
layout: "vertical",
class: "info-form"
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_row, { gutter: 16 }, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_5, _push6, _parent6, _scopeId5) => {
if (_push6) {
_push6(ssrRenderComponent(_component_a_form_item, { label: "昵称" }, {
default: withCtx((_6, _push7, _parent7, _scopeId6) => {
if (_push7) {
_push7(ssrRenderComponent(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, _parent7, _scopeId6));
} else {
return [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
];
}
}),
_: 1
}, _parent6, _scopeId5));
} else {
return [
createVNode(_component_a_form_item, { label: "昵称" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent5, _scopeId4));
_push5(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_5, _push6, _parent6, _scopeId5) => {
if (_push6) {
_push6(ssrRenderComponent(_component_a_form_item, { label: "手机号" }, {
default: withCtx((_6, _push7, _parent7, _scopeId6) => {
if (_push7) {
_push7(ssrRenderComponent(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, _parent7, _scopeId6));
} else {
return [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
];
}
}),
_: 1
}, _parent6, _scopeId5));
} else {
return [
createVNode(_component_a_form_item, { label: "手机号" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent5, _scopeId4));
_push5(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_5, _push6, _parent6, _scopeId5) => {
if (_push6) {
_push6(ssrRenderComponent(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx((_6, _push7, _parent7, _scopeId6) => {
if (_push7) {
_push7(ssrRenderComponent(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, _parent7, _scopeId6));
} else {
return [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
];
}
}),
_: 1
}, _parent6, _scopeId5));
} else {
return [
createVNode(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent5, _scopeId4));
_push5(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_5, _push6, _parent6, _scopeId5) => {
if (_push6) {
_push6(ssrRenderComponent(_component_a_form_item, { label: "工作单位" }, {
default: withCtx((_6, _push7, _parent7, _scopeId6) => {
if (_push7) {
_push7(ssrRenderComponent(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, _parent7, _scopeId6));
} else {
return [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
];
}
}),
_: 1
}, _parent6, _scopeId5));
} else {
return [
createVNode(_component_a_form_item, { label: "工作单位" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent5, _scopeId4));
_push5(ssrRenderComponent(_component_a_col, { span: 24 }, {
default: withCtx((_5, _push6, _parent6, _scopeId5) => {
if (_push6) {
_push6(ssrRenderComponent(_component_a_form_item, { label: "个人简介" }, {
default: withCtx((_6, _push7, _parent7, _scopeId6) => {
if (_push7) {
_push7(ssrRenderComponent(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, _parent7, _scopeId6));
} else {
return [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
];
}
}),
_: 1
}, _parent6, _scopeId5));
} else {
return [
createVNode(_component_a_form_item, { label: "个人简介" }, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "昵称" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "手机号" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "工作单位" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 24 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "个人简介" }, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
})
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_row, { gutter: 16 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "昵称" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "手机号" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "工作单位" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 24 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "个人简介" }, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
账号安全
`);
_push3(ssrRenderComponent(_component_a_button, {
size: "small",
onClick: ($event) => showChangePwd.value = true
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(`修改`);
} else {
return [
createTextVNode("修改")
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
📱绑定手机
${ssrInterpolate(unref(editForm).phone ? `已绑定 ${unref(editForm).phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}` : "未绑定手机号")}
`);
_push3(ssrRenderComponent(_component_a_button, { size: "small" }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(`${ssrInterpolate(unref(editForm).phone ? "修改" : "绑定")}`);
} else {
return [
createTextVNode(toDisplayString(unref(editForm).phone ? "修改" : "绑定"), 1)
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
`);
if (unref(mySuggestions).length === 0) {
_push3(`
`);
_push3(ssrRenderComponent(_component_a_empty, { description: "暂无建言记录" }, {
extra: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(`立即建言`);
} else {
return [
createTextVNode("立即建言")
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx(() => [
createTextVNode("立即建言")
]),
_: 1
}, 8, ["onClick"])
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`
`);
} else {
_push3(``);
}
_push3(`
`);
ssrRenderList(unref(mySuggestions), (item) => {
_push3(`
${ssrInterpolate(item.content)}
${ssrInterpolate(item.createTime)}`);
if (item.reply) {
_push3(`已回复`);
} else {
_push3(``);
}
_push3(`
`);
if (item.reply) {
_push3(`
官方回复:${ssrInterpolate(item.reply)}
`);
} else {
_push3(``);
}
_push3(`
`);
});
_push3(`
`);
_push3(ssrRenderComponent(_component_a_empty, {
description: "暂无收藏内容",
style: { "padding": "60px 0" }
}, null, _parent3, _scopeId2));
_push3(`
`);
_push3(ssrRenderComponent(_component_a_empty, {
description: "暂无浏览记录",
style: { "padding": "60px 0" }
}, null, _parent3, _scopeId2));
_push3(`
`);
} else {
return [
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "基本信息"),
!unref(editing) ? (openBlock(), createBlock(_component_a_button, {
key: 0,
type: "primary",
onClick: ($event) => editing.value = true
}, {
default: withCtx(() => [
createTextVNode("编辑资料")
]),
_: 1
}, 8, ["onClick"])) : (openBlock(), createBlock(_component_a_space, { key: 1 }, {
default: withCtx(() => [
createVNode(_component_a_button, {
onClick: ($event) => editing.value = false
}, {
default: withCtx(() => [
createTextVNode("取消")
]),
_: 1
}, 8, ["onClick"]),
createVNode(_component_a_button, {
type: "primary",
loading: unref(saving),
onClick: saveInfo
}, {
default: withCtx(() => [
createTextVNode("保存")
]),
_: 1
}, 8, ["loading"])
]),
_: 1
}))
]),
createVNode(_component_a_form, {
model: unref(editForm),
layout: "vertical",
class: "info-form"
}, {
default: withCtx(() => [
createVNode(_component_a_row, { gutter: 16 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "昵称" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "手机号" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "工作单位" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 24 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "个人简介" }, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}, 8, ["model"]),
createVNode("div", { class: "security-section" }, [
createVNode("h4", null, "账号安全"),
createVNode("div", { class: "security-items" }, [
createVNode("div", { class: "security-item" }, [
createVNode("div", { class: "security-info" }, [
createVNode("span", { class: "security-icon" }, "🔒"),
createVNode("div", null, [
createVNode("div", { class: "security-name" }, "登录密码"),
createVNode("div", { class: "security-desc" }, "建议定期修改密码保护账户安全")
])
]),
createVNode(_component_a_button, {
size: "small",
onClick: ($event) => showChangePwd.value = true
}, {
default: withCtx(() => [
createTextVNode("修改")
]),
_: 1
}, 8, ["onClick"])
]),
createVNode("div", { class: "security-item" }, [
createVNode("div", { class: "security-info" }, [
createVNode("span", { class: "security-icon" }, "📱"),
createVNode("div", null, [
createVNode("div", { class: "security-name" }, "绑定手机"),
createVNode("div", { class: "security-desc" }, toDisplayString(unref(editForm).phone ? `已绑定 ${unref(editForm).phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}` : "未绑定手机号"), 1)
])
]),
createVNode(_component_a_button, { size: "small" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(editForm).phone ? "修改" : "绑定"), 1)
]),
_: 1
})
])
])
])
], 512), [
[vShow, unref(activeTab) === "info"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "我的建言"),
createVNode(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx(() => [
createTextVNode("提交新建言")
]),
_: 1
}, 8, ["onClick"])
]),
unref(mySuggestions).length === 0 ? (openBlock(), createBlock("div", {
key: 0,
class: "empty-state"
}, [
createVNode(_component_a_empty, { description: "暂无建言记录" }, {
extra: withCtx(() => [
createVNode(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx(() => [
createTextVNode("立即建言")
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
})
])) : createCommentVNode("", true),
createVNode("div", { class: "suggestion-list" }, [
(openBlock(true), createBlock(Fragment, null, renderList(unref(mySuggestions), (item) => {
return openBlock(), createBlock("div", {
key: item.id,
class: "suggestion-item"
}, [
createVNode("div", { class: "suggestion-header" }, [
createVNode("span", { class: "suggestion-title" }, toDisplayString(item.title), 1),
createVNode(_component_a_tag, {
color: getStatusColor(item.status)
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(getStatusText(item.status)), 1)
]),
_: 2
}, 1032, ["color"])
]),
createVNode("p", { class: "suggestion-content" }, toDisplayString(item.content), 1),
createVNode("div", { class: "suggestion-meta" }, [
createVNode("span", null, toDisplayString(item.createTime), 1),
item.reply ? (openBlock(), createBlock("span", {
key: 0,
class: "has-reply"
}, "已回复")) : createCommentVNode("", true)
]),
item.reply ? (openBlock(), createBlock("div", {
key: 0,
class: "suggestion-reply"
}, [
createVNode("span", { class: "reply-label" }, "官方回复:"),
createVNode("span", null, toDisplayString(item.reply), 1)
])) : createCommentVNode("", true)
]);
}), 128))
])
], 512), [
[vShow, unref(activeTab) === "suggestions"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "我的收藏")
]),
createVNode(_component_a_empty, {
description: "暂无收藏内容",
style: { "padding": "60px 0" }
})
], 512), [
[vShow, unref(activeTab) === "favorites"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "浏览历史"),
createVNode(_component_a_button, { onClick: clearHistory }, {
default: withCtx(() => [
createTextVNode("清空历史")
]),
_: 1
})
]),
createVNode(_component_a_empty, {
description: "暂无浏览记录",
style: { "padding": "60px 0" }
})
], 512), [
[vShow, unref(activeTab) === "history"]
])
];
}
}),
_: 1
}, _parent2, _scopeId));
} else {
return [
createVNode(_component_a_col, {
xs: 24,
lg: 7
}, {
default: withCtx(() => [
createVNode("div", { class: "profile-card" }, [
createVNode("div", { class: "avatar-section" }, [
createVNode(_component_a_upload, {
name: "avatar",
"list-type": "picture-circle",
class: "avatar-uploader",
"show-upload-list": false,
"before-upload": beforeUpload,
onChange: handleAvatarChange
}, {
default: withCtx(() => [
createVNode("div", { class: "avatar-wrap" }, [
unref(userInfo).avatar ? (openBlock(), createBlock("img", {
key: 0,
src: unref(userInfo).avatar,
alt: "avatar",
class: "avatar-img"
}, null, 8, ["src"])) : (openBlock(), createBlock("div", {
key: 1,
class: "avatar-placeholder"
}, toDisplayString(unref(userInfo).nickname?.charAt(0) || "用"), 1)),
createVNode("div", { class: "avatar-overlay" }, [
createVNode("span", null, "更换头像")
])
])
]),
_: 1
})
]),
createVNode("h2", { class: "user-name" }, toDisplayString(unref(userInfo).nickname || unref(userInfo).username || "用户"), 1),
createVNode("div", { class: "user-role" }, [
createVNode(_component_a_tag, {
color: unref(userInfo).isAdmin ? "red" : "blue"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(userInfo).isAdmin ? "管理员" : "普通用户"), 1)
]),
_: 1
}, 8, ["color"])
]),
createVNode("div", { class: "user-stats" }, [
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).suggestions), 1),
createVNode("div", { class: "stat-label" }, "建言")
]),
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).favorites), 1),
createVNode("div", { class: "stat-label" }, "收藏")
]),
createVNode("div", { class: "stat-item" }, [
createVNode("div", { class: "stat-num" }, toDisplayString(unref(stats).views), 1),
createVNode("div", { class: "stat-label" }, "浏览")
])
]),
createVNode("div", { class: "side-menu" }, [
(openBlock(), createBlock(Fragment, null, renderList(sideMenuItems, (item) => {
return createVNode("div", {
key: item.key,
class: ["side-menu-item", { active: unref(activeTab) === item.key }],
onClick: ($event) => activeTab.value = item.key
}, [
createVNode("span", { class: "menu-icon" }, toDisplayString(item.icon), 1),
createVNode("span", null, toDisplayString(item.label), 1)
], 10, ["onClick"]);
}), 64))
])
])
]),
_: 1
}),
createVNode(_component_a_col, {
xs: 24,
lg: 17
}, {
default: withCtx(() => [
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "基本信息"),
!unref(editing) ? (openBlock(), createBlock(_component_a_button, {
key: 0,
type: "primary",
onClick: ($event) => editing.value = true
}, {
default: withCtx(() => [
createTextVNode("编辑资料")
]),
_: 1
}, 8, ["onClick"])) : (openBlock(), createBlock(_component_a_space, { key: 1 }, {
default: withCtx(() => [
createVNode(_component_a_button, {
onClick: ($event) => editing.value = false
}, {
default: withCtx(() => [
createTextVNode("取消")
]),
_: 1
}, 8, ["onClick"]),
createVNode(_component_a_button, {
type: "primary",
loading: unref(saving),
onClick: saveInfo
}, {
default: withCtx(() => [
createTextVNode("保存")
]),
_: 1
}, 8, ["loading"])
]),
_: 1
}))
]),
createVNode(_component_a_form, {
model: unref(editForm),
layout: "vertical",
class: "info-form"
}, {
default: withCtx(() => [
createVNode(_component_a_row, { gutter: 16 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "昵称" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).nickname,
"onUpdate:value": ($event) => unref(editForm).nickname = $event,
disabled: !unref(editing),
placeholder: "请输入昵称"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "手机号" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).phone,
"onUpdate:value": ($event) => unref(editForm).phone = $event,
disabled: !unref(editing),
placeholder: "请输入手机号"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "电子邮箱" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).email,
"onUpdate:value": ($event) => unref(editForm).email = $event,
disabled: !unref(editing),
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "工作单位" }, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(editForm).organization,
"onUpdate:value": ($event) => unref(editForm).organization = $event,
disabled: !unref(editing),
placeholder: "请输入工作单位"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 24 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, { label: "个人简介" }, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(editForm).bio,
"onUpdate:value": ($event) => unref(editForm).bio = $event,
disabled: !unref(editing),
rows: 3,
placeholder: "请输入个人简介"
}, null, 8, ["value", "onUpdate:value", "disabled"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}, 8, ["model"]),
createVNode("div", { class: "security-section" }, [
createVNode("h4", null, "账号安全"),
createVNode("div", { class: "security-items" }, [
createVNode("div", { class: "security-item" }, [
createVNode("div", { class: "security-info" }, [
createVNode("span", { class: "security-icon" }, "🔒"),
createVNode("div", null, [
createVNode("div", { class: "security-name" }, "登录密码"),
createVNode("div", { class: "security-desc" }, "建议定期修改密码保护账户安全")
])
]),
createVNode(_component_a_button, {
size: "small",
onClick: ($event) => showChangePwd.value = true
}, {
default: withCtx(() => [
createTextVNode("修改")
]),
_: 1
}, 8, ["onClick"])
]),
createVNode("div", { class: "security-item" }, [
createVNode("div", { class: "security-info" }, [
createVNode("span", { class: "security-icon" }, "📱"),
createVNode("div", null, [
createVNode("div", { class: "security-name" }, "绑定手机"),
createVNode("div", { class: "security-desc" }, toDisplayString(unref(editForm).phone ? `已绑定 ${unref(editForm).phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}` : "未绑定手机号"), 1)
])
]),
createVNode(_component_a_button, { size: "small" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(editForm).phone ? "修改" : "绑定"), 1)
]),
_: 1
})
])
])
])
], 512), [
[vShow, unref(activeTab) === "info"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "我的建言"),
createVNode(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx(() => [
createTextVNode("提交新建言")
]),
_: 1
}, 8, ["onClick"])
]),
unref(mySuggestions).length === 0 ? (openBlock(), createBlock("div", {
key: 0,
class: "empty-state"
}, [
createVNode(_component_a_empty, { description: "暂无建言记录" }, {
extra: withCtx(() => [
createVNode(_component_a_button, {
type: "primary",
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/suggestions")
}, {
default: withCtx(() => [
createTextVNode("立即建言")
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
})
])) : createCommentVNode("", true),
createVNode("div", { class: "suggestion-list" }, [
(openBlock(true), createBlock(Fragment, null, renderList(unref(mySuggestions), (item) => {
return openBlock(), createBlock("div", {
key: item.id,
class: "suggestion-item"
}, [
createVNode("div", { class: "suggestion-header" }, [
createVNode("span", { class: "suggestion-title" }, toDisplayString(item.title), 1),
createVNode(_component_a_tag, {
color: getStatusColor(item.status)
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(getStatusText(item.status)), 1)
]),
_: 2
}, 1032, ["color"])
]),
createVNode("p", { class: "suggestion-content" }, toDisplayString(item.content), 1),
createVNode("div", { class: "suggestion-meta" }, [
createVNode("span", null, toDisplayString(item.createTime), 1),
item.reply ? (openBlock(), createBlock("span", {
key: 0,
class: "has-reply"
}, "已回复")) : createCommentVNode("", true)
]),
item.reply ? (openBlock(), createBlock("div", {
key: 0,
class: "suggestion-reply"
}, [
createVNode("span", { class: "reply-label" }, "官方回复:"),
createVNode("span", null, toDisplayString(item.reply), 1)
])) : createCommentVNode("", true)
]);
}), 128))
])
], 512), [
[vShow, unref(activeTab) === "suggestions"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "我的收藏")
]),
createVNode(_component_a_empty, {
description: "暂无收藏内容",
style: { "padding": "60px 0" }
})
], 512), [
[vShow, unref(activeTab) === "favorites"]
]),
withDirectives(createVNode("div", { class: "content-panel" }, [
createVNode("div", { class: "panel-header" }, [
createVNode("h3", null, "浏览历史"),
createVNode(_component_a_button, { onClick: clearHistory }, {
default: withCtx(() => [
createTextVNode("清空历史")
]),
_: 1
})
]),
createVNode(_component_a_empty, {
description: "暂无浏览记录",
style: { "padding": "60px 0" }
})
], 512), [
[vShow, unref(activeTab) === "history"]
])
]),
_: 1
})
];
}
}),
_: 1
}, _parent));
_push(`