first commit
This commit is contained in:
commit
db5762abd4
687 files changed
+171307
No files matched your search
+127
@@ -0,0 +1,127 @@
|
||||
import { n as product_name_n } from "~/lib/product-name.js";
|
||||
var t = {
|
||||
Unpaid: {
|
||||
label: `未付款`,
|
||||
severity: `warn`,
|
||||
},
|
||||
Pending: {
|
||||
label: `开通中`,
|
||||
severity: `info`,
|
||||
},
|
||||
Active: {
|
||||
label: `使用中`,
|
||||
severity: `success`,
|
||||
},
|
||||
Suspended: {
|
||||
label: `暂停`,
|
||||
severity: `danger`,
|
||||
},
|
||||
Deleted: {
|
||||
label: `删除`,
|
||||
severity: `secondary`,
|
||||
},
|
||||
Failed: {
|
||||
label: `开通失败`,
|
||||
severity: `danger`,
|
||||
},
|
||||
},
|
||||
n = {
|
||||
Unpaid: {
|
||||
label: `未付款`,
|
||||
severity: `warn`,
|
||||
},
|
||||
Paid: {
|
||||
label: `已付款`,
|
||||
severity: `success`,
|
||||
},
|
||||
WaitUpload: {
|
||||
label: `待上传`,
|
||||
severity: `warn`,
|
||||
},
|
||||
WaitReview: {
|
||||
label: `待审核`,
|
||||
severity: `warn`,
|
||||
},
|
||||
ReviewFail: {
|
||||
label: `审核失败`,
|
||||
severity: `danger`,
|
||||
},
|
||||
Cancelled: {
|
||||
label: `已取消`,
|
||||
severity: `secondary`,
|
||||
},
|
||||
Refunded: {
|
||||
label: `已退款`,
|
||||
severity: `info`,
|
||||
},
|
||||
},
|
||||
r = {
|
||||
new: `新订单`,
|
||||
renew: `续费订单`,
|
||||
upgrade: `升降级订单`,
|
||||
artificial: `人工订单`,
|
||||
recharge: `充值订单`,
|
||||
combine: `合并订单`,
|
||||
credit_limit: `还款订单`,
|
||||
on_demand: `按需订单`,
|
||||
change_billing_cycle: `变更计费周期`,
|
||||
},
|
||||
i = {
|
||||
Recharge: `充值`,
|
||||
Applied: `扣费`,
|
||||
Refund: `退款`,
|
||||
Withdraw: `提现`,
|
||||
Artificial: `人工`,
|
||||
Freeze: `冻结`,
|
||||
Unfreeze: `解冻`,
|
||||
DeveloperWithdraw: `开发者提现`,
|
||||
};
|
||||
function a(e) {
|
||||
return i[e] ?? e;
|
||||
}
|
||||
function o(t) {
|
||||
let n = t.product_names;
|
||||
if (Array.isArray(n)) {
|
||||
let t = n.map(product_name_n).filter(Boolean).join(`、`);
|
||||
if (t) return t;
|
||||
} else if (n) return product_name_n(n);
|
||||
return t.name || t.description || `--`;
|
||||
}
|
||||
function s(e) {
|
||||
return t[e]?.label ?? e;
|
||||
}
|
||||
function c(e) {
|
||||
return t[e]?.severity ?? `secondary`;
|
||||
}
|
||||
function l(e) {
|
||||
return r[e] ?? e;
|
||||
}
|
||||
function u(e) {
|
||||
return n[e]?.label ?? e;
|
||||
}
|
||||
function d(e) {
|
||||
return n[e]?.severity ?? `secondary`;
|
||||
}
|
||||
function f(e) {
|
||||
if (!e) return `--`;
|
||||
let t = new Date(e * 1e3),
|
||||
n = (e) => String(e).padStart(2, `0`);
|
||||
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;
|
||||
}
|
||||
function p(e) {
|
||||
if (!e) return `--`;
|
||||
let t = new Date(e * 1e3),
|
||||
n = (e) => String(e).padStart(2, `0`);
|
||||
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
||||
}
|
||||
export {
|
||||
u as a,
|
||||
s as c,
|
||||
o as i,
|
||||
c as l,
|
||||
p as n,
|
||||
d as o,
|
||||
f as r,
|
||||
l as s,
|
||||
a as t,
|
||||
};
|
||||
Reference in new issue
Block a user