import { _ as __nuxt_component_0 } from './AccountCredentialDialog-D37zgaXm.mjs'; import { defineComponent, ref, reactive, computed, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderStyle, ssrRenderList, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderComponent } 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 '../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 PLATFORM_MAIL = "358030594@qq.com"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "factory", __ssrInlineRender: true, setup(__props) { useApi(); useToast(); const auth = useAuthStore(); const view = ref("list"); const rows = ref([]); const providers = ref([]); const loading = ref(false); const submitting = ref(false); const isEditing = ref(false); const emails = ref([]); const newEmail = ref(""); const form = reactive({ id: 0, brand: "", providerid: 0, description: "", sharepct: 0, // 仅新增时用:官方渠道名称 + 顺手开一个品牌商账号 officialChannelName: "", createAccount: false, accountUsername: "", accountPassword: "", accountRemark: "" }); const defaultOfficialName = computed(() => (form.brand.trim() || "品牌") + "官方渠道"); const credentialMails = computed( () => emails.value.filter((e) => e.toLowerCase() !== PLATFORM_MAIL) ); const cred = ref(null); function ratePct(rate) { return ((Number(rate) || 0) / 100).toFixed(2) + "%"; } function hexId(id) { return id ? Number(id).toString(16).toUpperCase() : ""; } function mailList(s) { return (s || "").split(",").map((e) => e.trim()).filter(Boolean); } function providerName(pid) { if (!pid) return "-"; const p = providers.value.find((x) => x.id === pid); return p ? p.name : "方案商#" + pid; } return (_ctx, _push, _parent, _attrs) => { const _component_AccountCredentialDialog = __nuxt_component_0; _push(`
| ID | 品牌名称 | 归属方案商 | 分成比例 | 联系邮箱 | 产品 | 操作 |
|---|---|---|---|---|---|---|
| 暂无数据 | ||||||
| ${ssrInterpolate(hexId(b.id))} | ${ssrInterpolate(b.brand)} | ${ssrInterpolate(providerName(b.providerid))} | ${ssrInterpolate(ratePct(b.sharerate))} | `); if (mailList(b.contactmails).length) { _push(``); ssrRenderList(mailList(b.contactmails), (e, i) => { _push(`${ssrInterpolate(e)}`); }); _push(``); } else { _push(`-`); } _push(` | ${ssrInterpolate(b.productlists || "")} | |