import { defineComponent, ref, computed, reactive, mergeProps, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderStyle, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer'; import { u as useApi } from './useApi-BNSkSrat.mjs'; import { u as useToast } from './useToast-MBvLaNjH.mjs'; import { a as useAuthStore } from './server.mjs'; import { r as regionLabel } from './regions-D1dSykUW.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 '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'pinia'; import 'perfect-debounce'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "users", __ssrInlineRender: true, setup(__props) { useApi(); useToast(); const auth = useAuthStore(); const apps = ref([]); const qApp = ref(""); const qRegion = ref(""); const qUid = ref(""); const user = ref(null); const emptyHint = ref("请输入查询条件后点击「搜索」"); ref(""); const lastUid = ref(""); const giftAllowed = computed(() => [1, 2, 3].includes(auth.identity)); ref(null); const gift = reactive({ vipday: 0, trademin: 0, meetmin: 0 }); const appNames = computed(() => { const names = []; apps.value.forEach((a) => { const n = a.app_name || a.name; if (n && !names.includes(n)) names.push(n); }); return names; }); const regionItems = computed(() => apps.value.filter((a) => (a.app_name || a.name) === qApp.value)); function fmtTs(ts) { if (!ts) return "-"; return new Date(ts * 1e3).toLocaleString(); } function fmtBool(v) { return v ? "是" : "否"; } function fmtGender(g) { return g === 1 ? "男" : g === 2 ? "女" : "未知"; } function dispVal(v) { return v === void 0 || v === null || v === "" ? "-" : v; } const sections = [ { title: "基本信息", rows: [ ["uid", "UID"], ["name", "用户名"], ["account", "登录账号"], ["mail", "邮箱"], ["phone", "手机号"], ["gender", "性别", "gender"], ["language", "语言"], ["version", "版本"], ["channel", "渠道"], ["State", "状态"], ["country_code", "国家码"], ["continent_code", "大洲码"], ["servicetag", "服务区"], ["phonemodel", "手机型号"], ["phonemac", "设备ID"] ] }, { title: "第三方登录", rows: [ ["wxopenid", "微信 openid"], ["googleopenid", "Google openid"], ["facebookopenid", "Facebook openid"], ["appleopenid", "Apple openid"] ] }, { title: "会员与积分", rows: [ ["viplv", "VIP等级"], ["vipexptime", "VIP到期", "ts"], ["aichatintegral", "AI积分"], ["aichattotalintegral", "AI累计积分"], ["tradeintegral", "翻译积分"], ["tradetotalintegral", "翻译累计积分"], ["meetintegral", "会议积分"], ["meettotalintegral", "会议累计积分"], ["lastbindproductid", "最后绑定产品ID"], ["isactivatecode", "已领激活码", "bool"], ["isgiveaway", "首次绑定赠送", "bool"] ] }, { title: "时间", rows: [ ["createtime", "注册时间", "ts"], ["lastsgintime", "最后登录", "ts"], ["canceltime", "注销时间", "ts"] ] } ]; function cellValue(u, row) { const t = row[2]; const v = u[row[0]]; if (t === "ts") return fmtTs(v); if (t === "bool") return fmtBool(v); if (t === "gender") return fmtGender(v); return dispVal(v); } const avatarInitial = computed(() => { const u = user.value; if (!u) return "?"; return String(u.name || u.uid || "?").charAt(0).toUpperCase(); }); return (_ctx, _push, _parent, _attrs) => { _push(`
选择应用与区域后输入 UID,直接查询该部署业务库中的用户信息。