Files
cneicy 42dfead9cd
前端验证 / verify (push) Failing after 15m3s
feat(ui): 优化控制台响应式布局与视觉体验
- 统一页面标题、圆角、字体和响应式断点,调整暗色主题及图表配色
- 新增表格列标签插件,在窄屏下将表格转换为卡片布局,优化实例、订单、工单等列表展示
- 支持移动端点击订单行进入详情,并完善订单凭据的打印布局
- 在财务中心展示本月及累计消费,补充充值关闭时的提示
- 优化工单详情布局,将附件上传入口整合至富文本编辑器工具栏
- 调整实例操作按钮、SSH 密钥操作及安全菜单图标
- 为多个页面显式导入 definePageMeta,完善页面元数据声明
2026-11-07 00:09:57 +08:00

1690 lines
65 KiB
Vue

<script>
/**
* 实例转移:可转移、待接收和记录各自走服务端列表;发起前验证接收人转移码,敏感请求可由安全挑战续接,手续费订单独立支付。
*/
import { definePageMeta } from "#imports";
import "~/assets/styles/GeetestField.DiieTibK.css";
import "~/assets/styles/CaptchaField.BSN3ZbsD.css";
import "~/assets/styles/SecurityVerificationDialog.skYFo4v7.css";
import "~/assets/styles/PaymentDialog.BNFKQF1U.css";
import "~/assets/styles/transfer.CAsJhVUW.css";
definePageMeta({
scrollToTop: !0,
});
import { toDisplayString } from "vue";
import { onMounted } from "vue";
import { normalizeClass } from "vue";
import { onBeforeUnmount } from "vue";
import { watch } from "vue";
import { createBlock } from "vue";
import { ref } from "vue";
import { withCtx } from "vue";
import { createCommentVNode } from "vue";
import { computed } from "vue";
import { reactive } from "vue";
import { isRef } from "vue";
import { createElementBlock } from "vue";
import { Fragment } from "vue";
import { createElementVNode } from "vue";
import { createTextVNode } from "vue";
import { unref } from "vue";
import { defineComponent } from "vue";
import { createVNode } from "vue";
import { openBlock } from "vue";
import { withKeys } from "vue";
import { useApi } from "~/lib/auth.js";
import { assertSecurityComplete } from "~/lib/auth.js";
import { securityChallenge } from "~/lib/auth.js";
import dialog from "primevue/dialog";
import button from "primevue/button";
import { t as _plugin_vue_export_helper_t } from "~/lib/_plugin-vue_export-helper.js";
import message from "primevue/message";
import inputtext from "primevue/inputtext";
import { n as product_name_n } from "~/lib/product-name.js";
import { r as dict_r } from "~/lib/dict.js";
import datatable from "primevue/datatable";
import paginator from "primevue/paginator";
import select from "primevue/select";
import checkbox from "primevue/checkbox";
import column from "primevue/column";
import ListSegments from "~/components/ListSegments.vue";
import ListEmpty from "~/components/ListEmpty.vue";
import PaymentDialog from "~/components/PaymentDialog.vue";
import tag from "primevue/tag";
import SecurityVerificationDialog from "~/components/SecurityVerificationDialog.vue";
import { t as composables_t } from "~/lib/composables-2.js";
var xe = {
class: `list-page`,
},
Se = {
class: `transfer-tabs`,
},
Ce = {
class: `code-card`,
},
we = {
class: `code-main`,
},
Te = {
class: `code-value`,
},
Ee = {
key: 0,
class: `code-warn`,
},
De = {
class: `transfer-section-head`,
},
Oe = {
class: `list-toolbar`,
},
ke = {
class: `list-toolbar-right`,
},
Ae = {
class: `list-search`,
},
je = {
class: `list-table`,
},
Me = {
class: `col-id`,
},
Ne = {
class: `prod`,
},
Pe = {
class: `prod-name`,
},
Fe = {
class: `prod-host`,
},
Ie = {
class: `col-mono`,
},
Le = {
class: `nowrap`,
},
Re = {
class: `row-actions`,
},
ze = {
key: 3,
class: `list-foot`,
},
Be = {
key: 0,
class: `dlg`,
},
Ve = {
class: `detail`,
},
He = {
class: `d-row`,
},
Ue = {
class: `d-row`,
},
We = {
key: 0,
class: `d-row`,
},
Ge = {
class: `d-row`,
},
Ke = {
class: `d-row`,
},
qe = {
class: `d-row`,
},
Je = {
key: 1,
class: `d-row`,
},
Ye = {
key: 2,
class: `d-row`,
},
Xe = {
class: `fee`,
},
Ze = {
class: `field`,
},
Qe = {
class: `field`,
},
$e = {
class: `verify-row`,
},
et = {
key: 1,
class: `disclaimer`,
},
tt = _plugin_vue_export_helper_t(
defineComponent({
__name: `index`,
setup(g) {
composables_t({
scrollToTop: !0,
});
let b = useApi(),
tt = [
{
value: `host`,
label: `可转移`,
},
{
value: `wait_accept_host`,
label: `待接收`,
},
{
value: `log`,
label: `转移记录`,
},
],
nt = {
0: `待支付`,
1: `转移中`,
2: `已取消`,
3: `已退回`,
4: `已完成`,
5: `转移失败`,
},
rt = {
0: `warn`,
1: `info`,
2: `secondary`,
3: `secondary`,
4: `success`,
5: `danger`,
},
x = ref(`host`),
S = ref(``),
C = ref(null),
w = ref([]),
T = ref(0),
E = ref(!1),
D = ref(1),
O = ref(10),
k = ref(null),
A = ref(``),
j = ref(!1),
M = ref(``),
N = ref(``),
P = ref(``),
F = 0,
I = !1;
onBeforeUnmount(() => {
((I = !0), F++, Y(), (q.value = null));
});
// 并行读取转移规则与本账户转移码;失败时不继续假定规则已就绪。
async function it() {
N.value = ``;
try {
let [e, t] = await Promise.all([
b.get(`/host_transfer/config`),
b.get(`/host_transfer/transfer_code`),
]);
if (I) return;
((k.value = e), (A.value = t.transfer_code ?? ``));
} catch (e) {
I ||
(N.value = e instanceof Error ? e.message : `加载转移设置失败`);
}
}
// 按当前标签、分页和关键词读取列表,类型筛选只用于历史记录;旧代次不回写。
async function L() {
let e = ++F,
t = x.value,
n = D.value,
r = S.value,
i = C.value;
((E.value = !0), (M.value = ``));
try {
let a = await b.get(
`/host_transfer/${t}`,
{
page: n,
limit: O.value,
keywords: r,
type: t === `log` ? (i ?? ``) : ``,
},
!0,
);
if (e !== F) return;
((w.value = a.list ?? []), (T.value = a.count ?? 0));
} catch (t) {
if (e !== F) return;
((M.value = t instanceof Error ? t.message : `加载失败`),
(w.value = []),
(T.value = 0));
} finally {
e === F && (E.value = !1);
}
}
// 切换标签时重置页码与筛选,避免将记录条件带入可转移列表。
function at(e) {
e !== void 0 &&
((x.value = e),
(D.value = 1),
(S.value = ``),
(C.value = null),
L());
}
// 筛选变化时回到第一页再加载。
function R() {
((D.value = 1), L());
}
// 将分页器零基页码转换为服务端一基页码。
function ot(e) {
((D.value = e.page + 1), (O.value = e.rows), L());
}
// 复制本账户接收转移码,反馈仅用于界面,不改变转移状态。
async function st() {
try {
(await navigator.clipboard.writeText(A.value),
(j.value = !0),
setTimeout(() => (j.value = !1), 2e3));
} catch {}
}
// 把秒级限制时长转换为小时或天,不把它当作绝对到期时间。
function ct(e) {
if (!e || e <= 0) return `—`;
let t = 86400;
return e < t
? `${(e / 3600).toFixed(1)} 小时`
: `${Math.floor(e / t)} 天 ${((e % t) / 3600).toFixed(1)} 小时`;
}
let z = ref(!1),
B = ref(`start`),
V = ref(null),
H = reactive({
transfer_code: ``,
repeat: ``,
checked: !1,
}),
U = ref(null),
W = ref(!1),
G = ref(!1),
K = ref(!1),
lt = ref({}),
q = ref(null),
J = 0;
// 转移码或确认码变化时立即废弃旧的接收人验证;非提交期间同时清除待续交安全请求。
function Y() {
(J++,
(U.value = null),
(W.value = !1),
G.value || ((q.value = null), (K.value = !1)));
}
(watch(() => [H.transfer_code, H.repeat], Y, {
flush: `sync`,
}),
watch(
z,
(e) => {
e || Y();
},
{
flush: `sync`,
},
));
let ut = computed(
() =>
B.value === `handle` ||
(!!k.value &&
!N.value &&
!!H.transfer_code &&
H.transfer_code === H.repeat &&
U.value?.code === H.transfer_code &&
!!U.value?.ok &&
(!k.value?.disclaimer || H.checked) &&
!W.value &&
!G.value),
);
// 新发起转移前清空上一次接收码、免责声明与校验结果。
function dt(e) {
G.value ||
K.value ||
(Y(),
(V.value = e),
(B.value = `start`),
(H.transfer_code = ``),
(H.repeat = ``),
(H.checked = !1),
(U.value = null),
(M.value = ``),
(z.value = !0));
}
// 打开待接收记录的处理模式,与发起转移草稿区分。
function ft(e) {
((V.value = e), (B.value = `handle`), (M.value = ``), (z.value = !0));
}
// 只有两次转移码一致才查找用户;结果绑定提交时的码及请求代次,修改后不能复用。
async function pt() {
if (
W.value ||
G.value ||
!H.transfer_code ||
H.transfer_code !== H.repeat
)
return;
let e = H.transfer_code,
t = ++J;
((W.value = !0), (U.value = null));
try {
let n = await b.get(`/host_transfer/search_client`, {
transfer_code: e,
});
if (t !== J || e !== H.transfer_code) return;
U.value = n.exist
? {
code: e,
ok: !0,
text: `验证成功,用户 ${n.username}`,
}
: {
code: e,
ok: !1,
text: `验证失败,用户不存在`,
};
} catch (n) {
if (t !== J || e !== H.transfer_code) return;
U.value = {
code: e,
ok: !1,
text: n instanceof Error ? n.message : `验证失败`,
};
} finally {
t === J && (W.value = !1);
}
}
let X = ref(!1),
mt = ref(null),
Z = ref(``);
// 通过规则、免责声明与接收人校验后冻结 host_id/transfer_code,再提交敏感操作。
async function ht() {
V.value &&
B.value === `start` &&
ut.value &&
!G.value &&
!K.value &&
((q.value = {
host_id: V.value.host_id ?? V.value.id,
transfer_code: H.transfer_code,
}),
await gt());
}
// 携带冻结的转移请求和安全验证结果续交;确认安全流程完成后刷新列表,返回手续费订单时打开支付。
async function gt(e) {
if (!q.value || G.value || I) return;
let t = {
...q.value,
...e,
};
((G.value = !0), (M.value = ``));
try {
let e = await b.post(`/host_transfer/start_transfer`, t);
if (
I ||
(assertSecurityComplete(e),
(K.value = !1),
(q.value = null),
(z.value = !1),
await L(),
I)
)
return;
let n = e?.order_id ?? e?.id;
Number.isSafeInteger(Number(n)) &&
Number(n) > 0 &&
((mt.value = n),
(Z.value = String(e.amount ?? ``)),
(X.value = !0));
} catch (e) {
if (I) return;
let t = securityChallenge(e);
(t && ((lt.value = t), (K.value = !0)),
(M.value = e instanceof Error ? e.message : `发起转移失败`));
} finally {
G.value = !1;
}
}
// 对待接收记录执行接受或退回,成功后关闭弹窗并从服务端刷新。
async function _t(e) {
if (V.value && !G.value) {
((G.value = !0), (M.value = ``));
try {
(await b.post(`/host_transfer/log/${V.value.id}/${e}`),
(z.value = !1),
(P.value = e === `accept` ? `已接收该产品` : `已退回该产品`),
setTimeout(() => (P.value = ``), 3e3),
await L());
} catch (e) {
M.value = e instanceof Error ? e.message : `操作失败`;
} finally {
G.value = !1;
}
}
}
let Q = ref(!1),
$ = ref(null);
// 取消前保存目标记录并打开确认,尚未发起取消请求。
function vt(e) {
(($.value = e), (M.value = ``), (Q.value = !0));
}
// 确认取消当前记录,成功后刷新列表,不直接在本地改成完成状态。
async function yt() {
if ($.value && !G.value) {
G.value = !0;
try {
(await b.post(`/host_transfer/log/${$.value.id}/cancel`),
(Q.value = !1),
(P.value = `已取消转移`),
setTimeout(() => (P.value = ``), 3e3),
await L());
} catch (e) {
M.value = e instanceof Error ? e.message : `取消失败`;
} finally {
G.value = !1;
}
}
}
// 只有有效正整数手续费订单 ID 才能继续支付,缺少订单时提示刷新核实。
function bt(e) {
if (
!Number.isSafeInteger(Number(e.order_id)) ||
Number(e.order_id) <= 0
) {
M.value = `该转移记录缺少手续费订单,请刷新后重试`;
return;
}
((mt.value = e.order_id),
(Z.value = e.commission_price ?? `0`),
(X.value = !0));
}
return (
onMounted(() => {
(it(), L());
}),
// 三类列表共用分页但操作目标分开保存;转移码校验、安全验证与手续费支付为不同阶段。
(t, r) => {
let i = ListSegments,
o = button,
l = message,
ee = select,
g = inputtext,
y = column,
ne = tag,
re = ListEmpty,
b = datatable,
be = paginator,
F = checkbox,
I = dialog,
J = SecurityVerificationDialog,
Y = PaymentDialog;
return (
openBlock(),
createElementBlock(`div`, xe, [
(r[32] ||= createElementVNode(
`div`,
{
class: `list-head`,
},
[
createElementVNode(`div`, null, [
createElementVNode(`h2`, null, `实例转移`),
createElementVNode(
`p`,
{
class: `page-description`,
},
`管理您的实例转移,包括可转移的实例、待接收的实例以及转移记录。`,
),
]),
],
-1,
)),
createElementVNode(`div`, Se, [
createVNode(
i,
{
modelValue: unref(x),
"onUpdate:modelValue": [
(r[0] ||= (e) => (isRef(x) ? (x.value = e) : null)),
at,
],
options: tt,
},
null,
8,
[`modelValue`],
),
]),
unref(N)
? (openBlock(),
createBlock(
l,
{
key: 0,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(N)) + ` `, 1),
createVNode(o, {
label: `重试转移设置`,
text: ``,
onClick: it,
}),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
createElementVNode(`section`, Ce, [
createElementVNode(`div`, we, [
(r[15] ||= createElementVNode(
`span`,
{
class: `code-label`,
},
`您的转移码`,
-1,
)),
createElementVNode(
`span`,
Te,
toDisplayString(unref(A) || `—`),
1,
),
createVNode(
o,
{
label: unref(j) ? `已复制` : `复制`,
icon: unref(j) ? `pi pi-check` : `pi pi-copy`,
size: `small`,
severity: `secondary`,
outlined: ``,
disabled: !unref(A),
onClick: st,
},
null,
8,
[`label`, `icon`, `disabled`],
),
]),
(r[17] ||= createElementVNode(
`p`,
{
class: `code-tip`,
},
` 对方发起转移时填写此码即可将产品转入你的账户。请先完成实名认证,才可进行产品转移或接收操作。 `,
-1,
)),
unref(k)?.certification
? (openBlock(),
createElementBlock(`p`, Ee, [
...(r[16] ||= [
createElementVNode(
`i`,
{
class: `pi pi-exclamation-triangle`,
},
null,
-1,
),
createTextVNode(
` 当前账户尚未完成实名认证,暂时无法发起转移或接收产品。 `,
-1,
),
]),
]))
: createCommentVNode(``, !0),
]),
unref(M)
? (openBlock(),
createBlock(
l,
{
key: 1,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(M)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
unref(P)
? (openBlock(),
createBlock(
l,
{
key: 2,
severity: `success`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(P)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
createElementVNode(`div`, De, [
createElementVNode(
`strong`,
null,
toDisplayString(
unref(x) === `host`
? `可转移实例`
: unref(x) === `wait_accept_host`
? `待接收实例`
: `转移记录`,
),
1,
),
createVNode(o, {
label: `刷新`,
icon: `pi pi-refresh`,
severity: `secondary`,
outlined: ``,
onClick: L,
}),
]),
createElementVNode(`div`, Oe, [
createElementVNode(`div`, ke, [
unref(x) === `log`
? (openBlock(),
createBlock(
ee,
{
key: 0,
modelValue: unref(C),
"onUpdate:modelValue": [
(r[1] ||= (e) =>
isRef(C) ? (C.value = e) : null),
R,
],
options: [
{
label: `转出`,
value: 1,
},
{
label: `接收`,
value: 2,
},
],
optionLabel: `label`,
optionValue: `value`,
placeholder: `全部类别`,
showClear: ``,
class: `list-select`,
},
null,
8,
[`modelValue`],
))
: createCommentVNode(``, !0),
createElementVNode(`span`, Ae, [
createVNode(
g,
{
modelValue: unref(S),
"onUpdate:modelValue": (r[2] ||= (e) =>
isRef(S) ? (S.value = e) : null),
placeholder: `搜索商品名、产品标识`,
onKeyup: withKeys(R, [`enter`]),
},
null,
8,
[`modelValue`],
),
]),
createVNode(o, {
label: `查询`,
size: `small`,
severity: `secondary`,
outlined: ``,
onClick: R,
}),
]),
]),
createElementVNode(`div`, je, [
createVNode(
b,
{
value: unref(w),
loading: unref(E),
dataKey: `id`,
scrollable: ``,
},
{
empty: withCtx(() => [
createVNode(
re,
{
icon: `pi pi-arrow-right-arrow-left`,
title:
unref(x) === `host`
? `暂无可转移的产品`
: unref(x) === `wait_accept_host`
? `暂无待接收的产品`
: `暂无转移记录`,
description:
unref(x) === `host`
? `剩余有效期满足门槛、且不在冷却期内的产品可发起转移`
: unref(x) === `wait_accept_host`
? `他人向你发起转移后,产品会出现在这里`
: `发起或接收产品转移后,记录会显示在这里`,
},
null,
8,
[`title`, `description`],
),
]),
default: withCtx(() => [
createVNode(
y,
{
header: `ID`,
style: {
width: `90px`,
},
},
{
body: withCtx(({ data: t }) => [
createElementVNode(
`span`,
Me,
toDisplayString(t.id),
1,
),
]),
_: 1,
},
),
createVNode(
y,
{
header: `产品`,
style: {
"min-width": `220px`,
},
},
{
body: withCtx(({ data: t }) => [
createElementVNode(`div`, Ne, [
createElementVNode(
`span`,
Pe,
toDisplayString(
unref(product_name_n)(t.product_name),
),
1,
),
createElementVNode(
`span`,
Fe,
toDisplayString(t.name),
1,
),
]),
]),
_: 1,
},
),
createVNode(
y,
{
header: `IP`,
style: {
width: `150px`,
},
},
{
body: withCtx(({ data: t }) => [
createElementVNode(
`span`,
Ie,
toDisplayString(t.dedicate_ip || `—`),
1,
),
]),
_: 1,
},
),
createVNode(
y,
{
header: `续费金额 / 周期`,
style: {
width: `160px`,
},
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
`¥` +
toDisplayString(t.renew_amount ?? `0.00`) +
` / ` +
toDisplayString(t.billing_cycle_name || `—`),
1,
),
]),
_: 1,
},
),
createVNode(
y,
{
header: `到期时间`,
style: {
width: `170px`,
},
},
{
body: withCtx(({ data: n }) => [
createElementVNode(
`span`,
Le,
toDisplayString(
(`formatTime` in t
? t.formatTime
: unref(dict_r))(n.due_time),
),
1,
),
]),
_: 1,
},
),
unref(x) === `host`
? (openBlock(),
createBlock(
y,
{
key: 0,
header: `冷却期`,
style: {
width: `150px`,
},
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
ct(Number(t.transfer_cd ?? 0)),
),
1,
),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
unref(x) === `log`
? (openBlock(),
createElementBlock(
Fragment,
{
key: 1,
},
[
createVNode(
y,
{
header: `类别`,
style: {
width: `90px`,
},
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.type === 1 ? `转出` : `接收`,
),
1,
),
]),
_: 1,
},
),
createVNode(
y,
{
header: `转入用户`,
style: {
width: `130px`,
},
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.type === 1
? t.new_username || `—`
: `自己`,
),
1,
),
]),
_: 1,
},
),
createVNode(
y,
{
header: `转移状态`,
style: {
width: `110px`,
},
},
{
body: withCtx(({ data: e }) => [
createVNode(
ne,
{
value: nt[e.status ?? -1] ?? `—`,
severity:
rt[e.status ?? -1] ?? `secondary`,
},
null,
8,
[`value`, `severity`],
),
]),
_: 1,
},
),
],
64,
))
: createCommentVNode(``, !0),
createVNode(
y,
{
header: `操作`,
style: {
width: `170px`,
},
},
{
body: withCtx(({ data: e }) => [
createElementVNode(`div`, Re, [
unref(x) === `host`
? (openBlock(),
createBlock(
o,
{
key: 0,
label: `转移`,
size: `small`,
text: ``,
disabled:
Number(e.transfer_cd ?? 0) > 0 ||
e.in_active_day === 0 ||
!!unref(k)?.certification,
onClick: (t) => dt(e),
},
null,
8,
[`disabled`, `onClick`],
))
: unref(x) === `wait_accept_host`
? (openBlock(),
createBlock(
o,
{
key: 1,
label: `处理`,
size: `small`,
text: ``,
disabled: !!unref(k)?.certification,
onClick: (t) => ft(e),
},
null,
8,
[`disabled`, `onClick`],
))
: (openBlock(),
createElementBlock(
Fragment,
{
key: 2,
},
[
e.status === 0 || e.status === 1
? (openBlock(),
createBlock(
o,
{
key: 0,
label: `取消转移`,
size: `small`,
severity: `secondary`,
text: ``,
onClick: (t) => vt(e),
},
null,
8,
[`onClick`],
))
: createCommentVNode(``, !0),
e.status === 0
? (openBlock(),
createBlock(
o,
{
key: 1,
label: `支付手续费`,
size: `small`,
text: ``,
onClick: (t) => bt(e),
},
null,
8,
[`onClick`],
))
: createCommentVNode(``, !0),
],
64,
)),
]),
]),
_: 1,
},
),
]),
_: 1,
},
8,
[`value`, `loading`],
),
]),
unref(T) > 0
? (openBlock(),
createElementBlock(`div`, ze, [
(r[18] ||= createElementVNode(
`div`,
{
class: `list-bulk`,
},
null,
-1,
)),
createVNode(
be,
{
rows: unref(O),
totalRecords: unref(T),
first: (unref(D) - 1) * unref(O),
rowsPerPageOptions: [10, 20, 50],
onPage: ot,
},
null,
8,
[`rows`, `totalRecords`, `first`],
),
]))
: createCommentVNode(``, !0),
createVNode(
I,
{
visible: unref(z),
"onUpdate:visible": (r[9] ||= (e) =>
isRef(z) ? (z.value = e) : null),
header:
unref(B) === `start` ? `发起转移` : `处理待接收产品`,
modal: ``,
closable: !unref(G) && !unref(K),
"close-on-escape": !unref(G) && !unref(K),
draggable: !1,
style: {
width: `620px`,
},
},
{
footer: withCtx(() => [
createVNode(o, {
label: `取消`,
severity: `secondary`,
text: ``,
onClick: (r[6] ||= (e) => (z.value = !1)),
}),
unref(B) === `start`
? (openBlock(),
createBlock(
o,
{
key: 0,
label: `确定`,
loading: unref(G),
disabled: !unref(ut),
onClick: ht,
},
null,
8,
[`loading`, `disabled`],
))
: (openBlock(),
createElementBlock(
Fragment,
{
key: 1,
},
[
createVNode(
o,
{
label: `退回`,
severity: `danger`,
loading: unref(G),
onClick: (r[7] ||= (e) => _t(`return`)),
},
null,
8,
[`loading`],
),
createVNode(
o,
{
label: `接收`,
loading: unref(G),
onClick: (r[8] ||= (e) => _t(`accept`)),
},
null,
8,
[`loading`],
),
],
64,
)),
]),
default: withCtx(() => [
unref(V)
? (openBlock(),
createElementBlock(`div`, Be, [
createElementVNode(`section`, Ve, [
createElementVNode(`div`, He, [
(r[19] ||= createElementVNode(
`span`,
null,
`商品名`,
-1,
)),
createElementVNode(
`b`,
null,
`#` +
toDisplayString(unref(V).product_id) +
`-` +
toDisplayString(
unref(product_name_n)(
unref(V).product_name,
),
),
1,
),
]),
createElementVNode(`div`, Ue, [
(r[20] ||= createElementVNode(
`span`,
null,
`产品标识`,
-1,
)),
createElementVNode(
`b`,
null,
toDisplayString(unref(V).name),
1,
),
]),
unref(B) === `start`
? (openBlock(),
createElementBlock(`div`, We, [
(r[21] ||= createElementVNode(
`span`,
null,
`订购金额`,
-1,
)),
createElementVNode(
`b`,
null,
`¥` +
toDisplayString(
unref(V).first_payment_amount ??
`0.00`,
),
1,
),
]))
: createCommentVNode(``, !0),
createElementVNode(`div`, Ge, [
(r[22] ||= createElementVNode(
`span`,
null,
`账单周期`,
-1,
)),
createElementVNode(
`b`,
null,
toDisplayString(
unref(V).billing_cycle_name || `—`,
),
1,
),
]),
createElementVNode(`div`, Ke, [
(r[23] ||= createElementVNode(
`span`,
null,
`下次付款日期`,
-1,
)),
createElementVNode(
`b`,
null,
toDisplayString(
(`formatTime` in t
? t.formatTime
: unref(dict_r))(unref(V).due_time),
),
1,
),
]),
createElementVNode(`div`, qe, [
(r[24] ||= createElementVNode(
`span`,
null,
`下次续费金额`,
-1,
)),
createElementVNode(
`b`,
null,
`¥` +
toDisplayString(
unref(V).renew_amount ?? `0.00`,
),
1,
),
]),
unref(k)?.transfer_cd
? (openBlock(),
createElementBlock(`div`, Je, [
(r[25] ||= createElementVNode(
`span`,
null,
`冷却期`,
-1,
)),
createElementVNode(
`b`,
null,
toDisplayString(unref(k).transfer_cd) +
` 天`,
1,
),
]))
: createCommentVNode(``, !0),
Number(unref(V).commission_price ?? 0) > 0
? (openBlock(),
createElementBlock(`div`, Ye, [
(r[26] ||= createElementVNode(
`span`,
null,
`手续费`,
-1,
)),
createElementVNode(
`b`,
Xe,
`¥` +
toDisplayString(
unref(V).commission_price,
),
1,
),
]))
: createCommentVNode(``, !0),
]),
unref(B) === `start`
? (openBlock(),
createElementBlock(
Fragment,
{
key: 0,
},
[
createElementVNode(`div`, Ze, [
(r[27] ||= createElementVNode(
`label`,
null,
[
createTextVNode(`目标用户转移码 `),
createElementVNode(
`span`,
{
class: `req`,
},
`*`,
),
],
-1,
)),
createVNode(
g,
{
modelValue: unref(H).transfer_code,
"onUpdate:modelValue": (r[3] ||= (
e,
) => (unref(H).transfer_code = e)),
placeholder: `请输入对方的用户转移码`,
fluid: ``,
},
null,
8,
[`modelValue`],
),
]),
createElementVNode(`div`, Qe, [
(r[28] ||= createElementVNode(
`label`,
null,
[
createTextVNode(`确认转移码 `),
createElementVNode(
`span`,
{
class: `req`,
},
`*`,
),
],
-1,
)),
createElementVNode(`div`, $e, [
createVNode(
g,
{
modelValue: unref(H).repeat,
"onUpdate:modelValue": (r[4] ||= (
e,
) => (unref(H).repeat = e)),
placeholder: `请再次输入以核对`,
fluid: ``,
},
null,
8,
[`modelValue`],
),
createVNode(
o,
{
label: `验证`,
severity: `secondary`,
outlined: ``,
loading: unref(W),
disabled:
!unref(H).transfer_code ||
unref(H).transfer_code !==
unref(H).repeat,
onClick: pt,
},
null,
8,
[`loading`, `disabled`],
),
]),
]),
unref(U)
? (openBlock(),
createElementBlock(
`p`,
{
key: 0,
class: normalizeClass([
`verify-result`,
unref(U).ok ? `ok` : `bad`,
]),
},
[
createElementVNode(
`i`,
{
class: normalizeClass(
unref(U).ok
? `pi pi-check-circle`
: `pi pi-times-circle`,
),
},
null,
2,
),
createTextVNode(
` ` +
toDisplayString(unref(U).text),
1,
),
],
2,
))
: createCommentVNode(``, !0),
(r[29] ||= createElementVNode(
`p`,
{
class: `note`,
},
[
createTextVNode(
` 注:转移发起后,该产品仅支持续费操作,其他操作可能导致接收方无法接收。`,
),
createElementVNode(`br`),
createTextVNode(
` 请在转移产品前,确认是否需要备份个人数据,删除敏感信息。 `,
),
],
-1,
)),
unref(k)?.disclaimer
? (openBlock(),
createElementBlock(`label`, et, [
createVNode(
F,
{
modelValue: unref(H).checked,
"onUpdate:modelValue": (r[5] ||= (
e,
) => (unref(H).checked = e)),
binary: ``,
},
null,
8,
[`modelValue`],
),
createElementVNode(
`span`,
null,
toDisplayString(
unref(k).disclaimer,
),
1,
),
]))
: createCommentVNode(``, !0),
],
64,
))
: (openBlock(),
createBlock(
l,
{
key: 1,
severity: `info`,
closable: !1,
},
{
default: withCtx(() => [
...(r[30] ||= [
createTextVNode(
` 接收后产品将转入你的账户并继续按原周期计费;退回则取消本次转移。 `,
-1,
),
]),
]),
_: 1,
},
)),
unref(M)
? (openBlock(),
createBlock(
l,
{
key: 2,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(
toDisplayString(unref(M)),
1,
),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
]))
: createCommentVNode(``, !0),
]),
_: 1,
},
8,
[`visible`, `header`, `closable`, `close-on-escape`],
),
createVNode(
I,
{
visible: unref(Q),
"onUpdate:visible": (r[11] ||= (e) =>
isRef(Q) ? (Q.value = e) : null),
header: `取消转移`,
modal: ``,
draggable: !1,
style: {
width: `380px`,
},
},
{
footer: withCtx(() => [
createVNode(o, {
label: `再想想`,
severity: `secondary`,
text: ``,
onClick: (r[10] ||= (e) => (Q.value = !1)),
}),
createVNode(
o,
{
label: `确认取消`,
loading: unref(G),
onClick: yt,
},
null,
8,
[`loading`],
),
]),
default: withCtx(() => [
(r[31] ||= createElementVNode(
`p`,
{
class: `confirm-text`,
},
`确认取消本次产品转移?`,
-1,
)),
unref(M)
? (openBlock(),
createBlock(
l,
{
key: 0,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(M)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
]),
_: 1,
},
8,
[`visible`],
),
createVNode(
J,
{
visible: unref(K),
"onUpdate:visible": (r[12] ||= (e) =>
isRef(K) ? (K.value = e) : null),
challenge: unref(lt),
busy: unref(G),
"request-error": unref(M),
context: {
scene: `account`,
action: `host_transfer`,
},
onVerified: gt,
onCancel: (r[13] ||= (e) => (q.value = null)),
},
null,
8,
[`visible`, `challenge`, `busy`, `request-error`],
),
createVNode(
Y,
{
modelValue: unref(X),
"onUpdate:modelValue": (r[14] ||= (e) =>
isRef(X) ? (X.value = e) : null),
"order-id": unref(mt),
amount: unref(Z),
onSuccess: L,
},
null,
8,
[`modelValue`, `order-id`, `amount`],
),
])
);
}
);
},
}),
[[`__scopeId`, `data-v-559a870e`]],
);
export {};
export default tt;
</script>