import { defineComponent, ref, reactive, computed, watch, resolveComponent, mergeProps, withCtx, unref, createTextVNode, createVNode, toDisplayString, createBlock, openBlock, Fragment, renderList, isRef, createCommentVNode, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrRenderAttr } from 'vue/server-renderer'; import { ReloadOutlined } from '@ant-design/icons-vue'; import { message } from 'ant-design-vue'; import { a as _export_sfc, c as useHead } from './server.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'better-sqlite3'; import 'vue-router'; import '@babel/runtime/helpers/esm/extends'; import 'stylis'; import 'dayjs'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/plugins'; import 'unhead/utils'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", __ssrInlineRender: true, setup(__props) { useHead({ title: "会员管理 - 后台管理" }); const loading = ref(false); const members = ref([]); const memberType = ref("all"); const filterStatus = ref(void 0); const searchKeyword = ref(""); const pagination = reactive({ current: 1, pageSize: 20, showSizeChanger: true, showQuickJumper: true }); const statCards = reactive([ { key: 0, icon: "⏳", label: "待审核", value: 0, color: "orange" }, { key: 1, icon: "✅", label: "已通过", value: 0, color: "green" }, { key: 2, icon: "❌", label: "已拒绝", value: 0, color: "red" }, { key: -1, icon: "👥", label: "全部会员", value: 0, color: "blue" } ]); const columns = [ { title: "会员信息", key: "info", width: 260 }, { title: "联系方式", key: "contact", width: 180 }, { title: "状态", key: "status", width: 100 }, { title: "申请时间", key: "createTime", width: 120 }, { title: "操作", key: "action", width: 120 } ]; const showDetailModal = ref(false); const currentMember = ref(null); const filteredMembers = computed(() => { const keyword = searchKeyword.value.trim().toLowerCase(); return members.value.filter((item) => { if (memberType.value === "enterprise") return item.type === 1; if (memberType.value === "personal") return item.type === 2; return true; }).filter((item) => filterStatus.value === void 0 || item.status === filterStatus.value).filter((item) => { if (!keyword) return true; return [item.name, item.contact].some((val) => String(val || "").toLowerCase().includes(keyword)); }).sort((a, b) => (b.id || 0) - (a.id || 0)); }); const pagedMembers = computed(() => { const start = (pagination.current - 1) * pagination.pageSize; return filteredMembers.value.slice(start, start + pagination.pageSize); }); const tablePagination = computed(() => ({ current: pagination.current, pageSize: pagination.pageSize, total: filteredMembers.value.length, showSizeChanger: pagination.showSizeChanger, showQuickJumper: pagination.showQuickJumper })); function updateStats() { const filtered = members.value.filter((item) => { if (memberType.value === "enterprise") return item.type === 1; if (memberType.value === "personal") return item.type === 2; return true; }); statCards[0].value = filtered.filter((i) => i.status === 0).length; statCards[1].value = filtered.filter((i) => i.status === 1).length; statCards[2].value = filtered.filter((i) => i.status === 2).length; statCards[3].value = filtered.length; } async function loadMembers() { loading.value = true; try { updateStats(); } catch (e) { message.error(e?.message || "加载会员列表失败"); } finally { loading.value = false; } } function handleStatFilter(key) { filterStatus.value = key === -1 ? void 0 : key; pagination.current = 1; } function handleSearch() { pagination.current = 1; } function handleTableChange(pag) { pagination.current = pag.current; pagination.pageSize = pag.pageSize; } function handleView(record) { currentMember.value = record; showDetailModal.value = true; } function handleReview(record) { currentMember.value = record; showDetailModal.value = true; } async function handleApprove(member) { try { message.success("已通过审核"); showDetailModal.value = false; await loadMembers(); } catch (e) { message.error(e?.message || "操作失败"); } } async function handleReject(member) { try { message.success("已拒绝"); showDetailModal.value = false; await loadMembers(); } catch (e) { message.error(e?.message || "操作失败"); } } function statusText(status) { const map = { 0: "待审核", 1: "已通过", 2: "已拒绝" }; return map[status ?? -1] || "-"; } function statusColor(status) { const map = { 0: "orange", 1: "success", 2: "error" }; return map[status ?? -1] || "default"; } watch(memberType, () => { updateStats(); }); return (_ctx, _push, _parent, _attrs) => { const _component_a_space = resolveComponent("a-space"); const _component_a_button = resolveComponent("a-button"); const _component_a_row = resolveComponent("a-row"); const _component_a_col = resolveComponent("a-col"); const _component_a_radio_group = resolveComponent("a-radio-group"); const _component_a_radio_button = resolveComponent("a-radio-button"); const _component_a_select = resolveComponent("a-select"); const _component_a_select_option = resolveComponent("a-select-option"); const _component_a_input_search = resolveComponent("a-input-search"); const _component_a_table = resolveComponent("a-table"); const _component_a_tag = resolveComponent("a-tag"); const _component_a_modal = resolveComponent("a-modal"); const _component_a_descriptions = resolveComponent("a-descriptions"); const _component_a_descriptions_item = resolveComponent("a-descriptions-item"); const _component_a_divider = resolveComponent("a-divider"); _push(``); _push(ssrRenderComponent(_component_a_row, { gutter: [16, 16], class: "mb-6" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(``); ssrRenderList(unref(statCards), (stat) => { _push2(ssrRenderComponent(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`
${ssrInterpolate(stat.icon)}
${ssrInterpolate(stat.value)}
${ssrInterpolate(stat.label)}
`); } else { return [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]; } }), _: 2 }, _parent2, _scopeId)); }); _push2(``); } else { return [ (openBlock(true), createBlock(Fragment, null, renderList(unref(statCards), (stat) => { return openBlock(), createBlock(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx(() => [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]), _: 2 }, 1024); }), 128)) ]; } }), _: 1 }, _parent)); _push(ssrRenderComponent(_component_a_radio_group, { value: unref(memberType), "onUpdate:value": ($event) => isRef(memberType) ? memberType.value = $event : null, "button-style": "solid", class: "mb-4" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_a_radio_button, { value: "all" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`全部`); } else { return [ createTextVNode("全部") ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_radio_button, { value: "enterprise" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`企业会员`); } else { return [ createTextVNode("企业会员") ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_radio_button, { value: "personal" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`个人会员`); } else { return [ createTextVNode("个人会员") ]; } }), _: 1 }, _parent2, _scopeId)); } else { return [ createVNode(_component_a_radio_button, { value: "all" }, { default: withCtx(() => [ createTextVNode("全部") ]), _: 1 }), createVNode(_component_a_radio_button, { value: "enterprise" }, { default: withCtx(() => [ createTextVNode("企业会员") ]), _: 1 }), createVNode(_component_a_radio_button, { value: "personal" }, { default: withCtx(() => [ createTextVNode("个人会员") ]), _: 1 }) ]; } }), _: 1 }, _parent)); _push(`
📋 会员列表`); _push(ssrRenderComponent(_component_a_space, { wrap: "" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_select_option, { value: void 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`全部状态`); } else { return [ createTextVNode("全部状态") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`待审核`); } else { return [ createTextVNode("待审核") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 1 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已通过`); } else { return [ createTextVNode("已通过") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已拒绝`); } else { return [ createTextVNode("已拒绝") ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待审核") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已通过") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已拒绝") ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索姓名 / 企业名称", style: { "width": "240px" }, onSearch: handleSearch }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待审核") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已通过") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已拒绝") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]), createVNode(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索姓名 / 企业名称", style: { "width": "240px" }, onSearch: handleSearch }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_table, { columns, "data-source": unref(pagedMembers), loading: unref(loading), pagination: unref(tablePagination), "row-key": "id", onChange: handleTableChange, size: "middle" }, { bodyCell: withCtx(({ column, record }, _push2, _parent2, _scopeId) => { if (_push2) { if (column.key === "info") { _push2(`
${ssrInterpolate(record.type === 1 ? "🏢" : "👤")}
${ssrInterpolate(record.name)}
`); _push2(ssrRenderComponent(_component_a_tag, { color: record.type === 1 ? "blue" : "green", size: "small" }, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`${ssrInterpolate(record.type === 1 ? "企业会员" : "个人会员")}`); } else { return [ createTextVNode(toDisplayString(record.type === 1 ? "企业会员" : "个人会员"), 1) ]; } }), _: 2 }, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } if (column.key === "contact") { _push2(`
`); if (record.contact) { _push2(`
📞 ${ssrInterpolate(record.contact)}
`); } else { _push2(``); } if (record.phone) { _push2(`
📱 ${ssrInterpolate(record.phone)}
`); } else { _push2(``); } _push2(`
`); } else { _push2(``); } if (column.key === "status") { _push2(ssrRenderComponent(_component_a_tag, { color: statusColor(record.status) }, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`${ssrInterpolate(statusText(record.status))}`); } else { return [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } if (column.key === "createTime") { _push2(`${ssrInterpolate(record.createTime?.substring(0, 10) || "-")}`); } else { _push2(``); } if (column.key === "action") { _push2(ssrRenderComponent(_component_a_space, null, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`查看`); } else { return [ createTextVNode("查看") ]; } }), _: 2 }, _parent3, _scopeId2)); if (record.status === 0) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`审核`); } else { return [ createTextVNode("审核") ]; } }), _: 2 }, _parent3, _scopeId2)); } else { _push3(``); } } else { return [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx(() => [ createTextVNode("审核") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } } else { return [ column.key === "info" ? (openBlock(), createBlock("div", { key: 0, class: "member-info-cell" }, [ createVNode("div", { class: ["member-avatar", record.type === 1 ? "enterprise" : "personal"] }, toDisplayString(record.type === 1 ? "🏢" : "👤"), 3), createVNode("div", { class: "member-info-text" }, [ createVNode("div", { class: "member-name" }, toDisplayString(record.name), 1), createVNode("div", { class: "member-meta" }, [ createVNode(_component_a_tag, { color: record.type === 1 ? "blue" : "green", size: "small" }, { default: withCtx(() => [ createTextVNode(toDisplayString(record.type === 1 ? "企业会员" : "个人会员"), 1) ]), _: 2 }, 1032, ["color"]) ]) ]) ])) : createCommentVNode("", true), column.key === "contact" ? (openBlock(), createBlock("div", { key: 1, class: "contact-cell" }, [ record.contact ? (openBlock(), createBlock("div", { key: 0 }, "📞 " + toDisplayString(record.contact), 1)) : createCommentVNode("", true), record.phone ? (openBlock(), createBlock("div", { key: 1 }, "📱 " + toDisplayString(record.phone), 1)) : createCommentVNode("", true) ])) : createCommentVNode("", true), column.key === "status" ? (openBlock(), createBlock(_component_a_tag, { key: 2, color: statusColor(record.status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]), _: 2 }, 1032, ["color"])) : createCommentVNode("", true), column.key === "createTime" ? (openBlock(), createBlock("span", { key: 3, class: "text-sm text-gray" }, toDisplayString(record.createTime?.substring(0, 10) || "-"), 1)) : createCommentVNode("", true), column.key === "action" ? (openBlock(), createBlock(_component_a_space, { key: 4 }, { default: withCtx(() => [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx(() => [ createTextVNode("审核") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]), _: 2 }, 1024)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_modal, { open: unref(showDetailModal), "onUpdate:open": ($event) => isRef(showDetailModal) ? showDetailModal.value = $event : null, title: "会员详情", width: "700px", footer: null }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { if (unref(currentMember)) { _push2(``); _push2(ssrRenderComponent(_component_a_tag, { color: unref(currentMember).type === 1 ? "blue" : "green", style: { "margin-bottom": "16px" } }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`${ssrInterpolate(unref(currentMember).type === 1 ? "企业会员" : "个人会员")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).type === 1 ? "企业会员" : "个人会员"), 1) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "姓名/企业名" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).name)}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).name), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "联系人" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).contact || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "联系电话" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).phone || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).email || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).email || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "状态" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_tag, { color: statusColor(unref(currentMember).status) }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(`${ssrInterpolate(statusText(unref(currentMember).status))}`); } else { return [ createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1) ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_tag, { color: statusColor(unref(currentMember).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1) ]), _: 1 }, 8, ["color"]) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).createTime?.substring(0, 10) || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).createTime?.substring(0, 10) || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "简介", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentMember).bio || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_descriptions_item, { label: "姓名/企业名" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).name), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系人" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系电话" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).email || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentMember).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).createTime?.substring(0, 10) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "简介", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1) ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); if (unref(currentMember).attachments?.length) { _push2(`

附件材料

`); ssrRenderList(unref(currentMember).attachments, (file, idx) => { _push2(` 📎 ${ssrInterpolate(file.name)}`); }); _push2(`
`); } else { _push2(``); } if (unref(currentMember).status === 0) { _push2(`
`); _push2(ssrRenderComponent(_component_a_divider, null, null, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_space, null, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentMember)) }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`通过审核`); } else { return [ createTextVNode("通过审核") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentMember)) }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`拒绝`); } else { return [ createTextVNode("拒绝") ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentMember)) }, { default: withCtx(() => [ createTextVNode("通过审核") ]), _: 1 }, 8, ["onClick"]), createVNode(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentMember)) }, { default: withCtx(() => [ createTextVNode("拒绝") ]), _: 1 }, 8, ["onClick"]) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } _push2(``); } else { _push2(``); } } else { return [ unref(currentMember) ? (openBlock(), createBlock(Fragment, { key: 0 }, [ createVNode(_component_a_tag, { color: unref(currentMember).type === 1 ? "blue" : "green", style: { "margin-bottom": "16px" } }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).type === 1 ? "企业会员" : "个人会员"), 1) ]), _: 1 }, 8, ["color"]), createVNode(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx(() => [ createVNode(_component_a_descriptions_item, { label: "姓名/企业名" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).name), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系人" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系电话" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).email || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentMember).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).createTime?.substring(0, 10) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "简介", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1) ]), _: 1 }) ]), _: 1 }), unref(currentMember).attachments?.length ? (openBlock(), createBlock("div", { key: 0, class: "attachments-section" }, [ createVNode("h4", null, "附件材料"), createVNode("div", { class: "attachment-list" }, [ (openBlock(true), createBlock(Fragment, null, renderList(unref(currentMember).attachments, (file, idx) => { return openBlock(), createBlock("a", { key: idx, href: file.url, target: "_blank" }, " 📎 " + toDisplayString(file.name), 9, ["href"]); }), 128)) ]) ])) : createCommentVNode("", true), unref(currentMember).status === 0 ? (openBlock(), createBlock("div", { key: 1, class: "review-actions" }, [ createVNode(_component_a_divider), createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentMember)) }, { default: withCtx(() => [ createTextVNode("通过审核") ]), _: 1 }, 8, ["onClick"]), createVNode(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentMember)) }, { default: withCtx(() => [ createTextVNode("拒绝") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ])) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(``); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/admin/members/index.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f747bdd7"]]); export { index as default }; //# sourceMappingURL=index-DdeGb0tg.mjs.map