@huyooo/ui 0.11.1 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AuthkitAppSetting-CSHkDxQT.js +1914 -0
- package/dist/{Clipboard---tG2Zxz.js → Clipboard-CRZDADLE.js} +1 -1
- package/dist/{Contact-BEUbBGiB.js → Contact-Y0Yczmc9.js} +8 -7
- package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-BUkwlbzN.js} +3 -2
- package/dist/{FeedbackItem-CN041vTm.js → FeedbackItem-D7MpOmoM.js} +3 -3
- package/dist/FeedbackModal-CvNF1D-5.js +1050 -0
- package/dist/LandingPageFAQ-CZJXvor9.js +80 -0
- package/dist/LandingPageLinkGroup-DDNRivMt.js +521 -0
- package/dist/LandingPageSectionHeader-D_74W4My.js +69 -0
- package/dist/{LandingPageSectionTabs-B6ZVxR47.js → LandingPageSectionTabs-Ce3_Rc2L.js} +354 -426
- package/dist/MessageHandle-B12koVQL.js +924 -0
- package/dist/MessageList-Bo6YCfRO.js +233 -0
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DxDn6Ok8.js} +2 -2
- package/dist/PaySubscriptions-B8jAtG5n.js +515 -0
- package/dist/PricingPlans-CO26OcbJ.js +210 -0
- package/dist/ReferrerReferees-D_Iiw9wZ.js +106 -0
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js → Upload.vue_vue_type_script_setup_true_lang-CbVSY_vt.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DpVadjMH.js +508 -0
- package/dist/WidthContainer-B6d4xrGT.js +693 -0
- package/dist/{apiClients-9b4zNZ2S.js → apiClients-DVz12LeW.js} +81 -75
- package/dist/authkit.d.ts +7 -0
- package/dist/authkit.js +52 -45
- package/dist/common/globalConfig.d.ts +2 -2
- package/dist/common/userMenuModal.d.ts +1 -0
- package/dist/common.js +2 -2
- package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +31 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneBinding.vue.d.ts +14 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +66 -0
- package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +27 -0
- package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +1 -1
- package/dist/components/Authkit/Auth/AuthkitPasswordAuth.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +15 -3
- package/dist/components/Authkit/AuthkitOAuthCallbackProvider.vue.d.ts +11 -0
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +45 -0
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +9 -0
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -6
- package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
- package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -1
- package/dist/components/Pay/PricingFAQ.vue.d.ts +17 -0
- package/dist/components/Pay/PricingPlans.vue.d.ts +12 -0
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +2 -2
- package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +8 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +26 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +21 -9
- package/dist/composables/Authkit/useEnsureAuthenticated.d.ts +26 -0
- package/dist/composables/Authkit/useOauth.d.ts +4 -1
- package/dist/composables/Billing/useBillingPlans.d.ts +201 -0
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +280 -0
- package/dist/composables/Billing/useSubscriptionCheckout.d.ts +12 -0
- package/dist/composables/UserMenu/useUserMenu.d.ts +5 -1
- package/dist/composables.d.ts +2 -0
- package/dist/composables.js +25 -22
- package/dist/feedback.js +3 -3
- package/dist/index-D3Kp6R4z.js +4 -0
- package/dist/landingPage.js +42 -40
- package/dist/main.js +285 -269
- package/dist/message.js +19 -18
- package/dist/pay.d.ts +5 -0
- package/dist/pay.js +9 -2
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +103 -39
- package/dist/types/api/billing.generated.d.ts +61 -28
- package/dist/types/api.d.ts +1 -1
- package/dist/types/app.d.ts +14 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-Du5d6VK-.js} +20 -7
- package/dist/{useAuthkitCreateAndUpdate-DyRtFxZS.js → useAuthkitCreateAndUpdate-Bc9D5C6R.js} +1 -1
- package/dist/useAuthkitUsersProfile-CQGyvL7g.js +201 -0
- package/dist/{useDownloads-DaeIY0E9.js → useDownloads-BFx1a-f9.js} +1 -1
- package/dist/useEnsureAuthenticated-Cc64hF1O.js +2247 -0
- package/dist/{useLegalLinks-CPbWqlu6.js → useLegalLinks-Deksq9h-.js} +2 -2
- package/dist/{useMessageNotifications-Dg5q-C_o.js → useMessageNotifications-DY5xKtif.js} +1 -1
- package/dist/{useSEO-CXX9dcBx.js → useSEO-CvfzTZA9.js} +2 -2
- package/dist/useSubscriptionCheckout-BgQJN61l.js +345 -0
- package/dist/{useTableHandle-Cjq4gcC0.js → useTableHandle-D71P3Ez_.js} +1 -1
- package/dist/{useUploadCos-DiJmmbRf.js → useUploadCos-N5pim6q1.js} +501 -515
- package/dist/useUserMenu-ClPBlvaM.js +44 -0
- package/dist/user.js +12 -13
- package/dist/utils/apiMiddlewares.d.ts +6 -0
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BCrLMpLg.js +0 -1322
- package/dist/AuthkitSignInPhone-DmCQ2fWs.js +0 -1721
- package/dist/FeedbackModal-aI28o-w5.js +0 -1053
- package/dist/LandingPageSectionHeader-Cs1x8i3q.js +0 -584
- package/dist/MessageHandle-BV1nKlxs.js +0 -1147
- package/dist/PaySubscriptions-B3gI1Eme.js +0 -408
- package/dist/ReferrerReferees-DJzPo7X5.js +0 -106
- package/dist/UserAccountMenu-CJ9KKVYa.js +0 -371
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +0 -81
- package/dist/WidthContainer-BG10rumn.js +0 -669
- package/dist/useAuthkitUsersProfile-lGlQP54m.js +0 -186
- package/dist/useUserMenu-B3HKZKJ4.js +0 -43
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { U as ft } from "./index-D3Kp6R4z.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { ref as v, computed as f, defineComponent as gt, openBlock as s, createBlock as P, unref as n, isRef as yt, withCtx as o, createElementVNode as i, createElementBlock as l, toDisplayString as u, createTextVNode as d, createVNode as c, createCommentVNode as g, Fragment as bt, renderList as _t } from "vue";
|
|
10
|
+
import { Modal as kt, Button as w, Popconfirm as ht, Tabs as St, TabPane as D, Tag as K, Spin as wt, Empty as Ct, Progress as It } from "@arco-design/web-vue";
|
|
11
|
+
import { f as C } from "./apiClients-DVz12LeW.js";
|
|
12
|
+
import { u as xt } from "./useAuthkitCreateAndUpdate-Bc9D5C6R.js";
|
|
13
|
+
import { C as O } from "./CustomTable-BUkwlbzN.js";
|
|
14
|
+
import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
function H() {
|
|
16
|
+
return {
|
|
17
|
+
current: null,
|
|
18
|
+
trial: null,
|
|
19
|
+
entitlement: null,
|
|
20
|
+
features: [],
|
|
21
|
+
quotas: [],
|
|
22
|
+
pointsBalance: null,
|
|
23
|
+
pendingInvoice: null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function zt() {
|
|
27
|
+
const m = v(H()), I = v(!1), E = f(() => m.value.current), z = f(() => m.value.trial), L = f(() => m.value.entitlement), y = f(() => m.value.features), k = f(() => m.value.quotas), r = f(() => m.value.pointsBalance), T = f(() => m.value.pendingInvoice);
|
|
28
|
+
async function A() {
|
|
29
|
+
I.value = !0;
|
|
30
|
+
try {
|
|
31
|
+
const {
|
|
32
|
+
data: N,
|
|
33
|
+
error: W
|
|
34
|
+
} = await C.subscriptions.summary.post();
|
|
35
|
+
if (W)
|
|
36
|
+
throw new Error(W.message || "获取订阅摘要失败");
|
|
37
|
+
m.value = N || H();
|
|
38
|
+
} finally {
|
|
39
|
+
I.value = !1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
summary: m,
|
|
44
|
+
current: E,
|
|
45
|
+
trial: z,
|
|
46
|
+
entitlement: L,
|
|
47
|
+
features: y,
|
|
48
|
+
quotas: k,
|
|
49
|
+
pointsBalance: r,
|
|
50
|
+
pendingInvoice: T,
|
|
51
|
+
loading: I,
|
|
52
|
+
refresh: A
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const At = {
|
|
56
|
+
class: "content"
|
|
57
|
+
}, Nt = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "current-subscription-card"
|
|
60
|
+
}, Wt = {
|
|
61
|
+
class: "subscription-header"
|
|
62
|
+
}, Et = {
|
|
63
|
+
class: "subscription-info"
|
|
64
|
+
}, Lt = {
|
|
65
|
+
class: "subscription-actions"
|
|
66
|
+
}, Tt = {
|
|
67
|
+
class: "subscription-details"
|
|
68
|
+
}, $t = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "detail-item"
|
|
71
|
+
}, Bt = {
|
|
72
|
+
key: 1,
|
|
73
|
+
class: "detail-item"
|
|
74
|
+
}, Ut = {
|
|
75
|
+
key: 2,
|
|
76
|
+
class: "detail-item"
|
|
77
|
+
}, qt = {
|
|
78
|
+
class: "label"
|
|
79
|
+
}, Dt = {
|
|
80
|
+
key: 3,
|
|
81
|
+
class: "detail-item warning"
|
|
82
|
+
}, Ft = {
|
|
83
|
+
key: 4,
|
|
84
|
+
class: "detail-item"
|
|
85
|
+
}, Vt = {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "pending-invoice-alert"
|
|
88
|
+
}, Mt = {
|
|
89
|
+
key: 1,
|
|
90
|
+
class: "no-subscription-row"
|
|
91
|
+
}, Rt = {
|
|
92
|
+
key: 1
|
|
93
|
+
}, Kt = {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: "quotas-loading"
|
|
96
|
+
}, Ot = {
|
|
97
|
+
key: 1,
|
|
98
|
+
class: "no-quotas"
|
|
99
|
+
}, Ht = {
|
|
100
|
+
key: 2,
|
|
101
|
+
class: "quotas-grid"
|
|
102
|
+
}, jt = {
|
|
103
|
+
class: "quota-header"
|
|
104
|
+
}, Gt = {
|
|
105
|
+
class: "quota-name"
|
|
106
|
+
}, Jt = {
|
|
107
|
+
class: "quota-period"
|
|
108
|
+
}, Qt = {
|
|
109
|
+
class: "quota-progress"
|
|
110
|
+
}, Xt = {
|
|
111
|
+
class: "quota-detail"
|
|
112
|
+
}, Yt = {
|
|
113
|
+
key: 0
|
|
114
|
+
}, Zt = {
|
|
115
|
+
key: 1
|
|
116
|
+
}, te = {
|
|
117
|
+
key: 2,
|
|
118
|
+
class: "reset-time"
|
|
119
|
+
}, ee = /* @__PURE__ */ gt({
|
|
120
|
+
__name: "PaySubscriptions",
|
|
121
|
+
emits: ["confirm", "cancel"],
|
|
122
|
+
setup(m, {
|
|
123
|
+
expose: I,
|
|
124
|
+
emit: E
|
|
125
|
+
}) {
|
|
126
|
+
const z = E, {
|
|
127
|
+
changeType: L,
|
|
128
|
+
show: y
|
|
129
|
+
} = xt(z), k = v("subscriptions"), {
|
|
130
|
+
current: r,
|
|
131
|
+
entitlement: T,
|
|
132
|
+
quotas: A,
|
|
133
|
+
pointsBalance: N,
|
|
134
|
+
pendingInvoice: W,
|
|
135
|
+
loading: j,
|
|
136
|
+
refresh: $
|
|
137
|
+
} = zt(), h = f(() => T.value), F = v([]), B = v(!1), b = v({
|
|
138
|
+
current: 1,
|
|
139
|
+
pageSize: 10,
|
|
140
|
+
total: 0
|
|
141
|
+
}), V = v([]), U = v(!1), _ = v({
|
|
142
|
+
current: 1,
|
|
143
|
+
pageSize: 10,
|
|
144
|
+
total: 0
|
|
145
|
+
}), G = f(() => j.value), J = [{
|
|
146
|
+
dataIndex: "productName",
|
|
147
|
+
title: "产品",
|
|
148
|
+
minWidth: 120
|
|
149
|
+
}, {
|
|
150
|
+
dataIndex: "interval",
|
|
151
|
+
slotName: "interval",
|
|
152
|
+
title: "周期",
|
|
153
|
+
minWidth: 80
|
|
154
|
+
}, {
|
|
155
|
+
dataIndex: "unitAmount",
|
|
156
|
+
slotName: "unitAmount",
|
|
157
|
+
title: "价格",
|
|
158
|
+
minWidth: 100
|
|
159
|
+
}, {
|
|
160
|
+
dataIndex: "status",
|
|
161
|
+
slotName: "status",
|
|
162
|
+
title: "状态",
|
|
163
|
+
minWidth: 100
|
|
164
|
+
}, {
|
|
165
|
+
dataIndex: "currentPeriodStart",
|
|
166
|
+
title: "开始时间",
|
|
167
|
+
minWidth: 160
|
|
168
|
+
}, {
|
|
169
|
+
dataIndex: "currentPeriodEnd",
|
|
170
|
+
title: "结束时间",
|
|
171
|
+
minWidth: 160
|
|
172
|
+
}, {
|
|
173
|
+
dataIndex: "createAt",
|
|
174
|
+
title: "创建时间",
|
|
175
|
+
minWidth: 160
|
|
176
|
+
}], Q = [{
|
|
177
|
+
dataIndex: "productName",
|
|
178
|
+
title: "产品",
|
|
179
|
+
minWidth: 120
|
|
180
|
+
}, {
|
|
181
|
+
dataIndex: "total",
|
|
182
|
+
slotName: "total",
|
|
183
|
+
title: "金额",
|
|
184
|
+
minWidth: 100
|
|
185
|
+
}, {
|
|
186
|
+
dataIndex: "status",
|
|
187
|
+
slotName: "status",
|
|
188
|
+
title: "状态",
|
|
189
|
+
minWidth: 100
|
|
190
|
+
}, {
|
|
191
|
+
dataIndex: "tradeNo",
|
|
192
|
+
title: "交易号",
|
|
193
|
+
minWidth: 200
|
|
194
|
+
}, {
|
|
195
|
+
dataIndex: "paidAt",
|
|
196
|
+
title: "支付时间",
|
|
197
|
+
minWidth: 160
|
|
198
|
+
}, {
|
|
199
|
+
dataIndex: "createAt",
|
|
200
|
+
title: "创建时间",
|
|
201
|
+
minWidth: 160
|
|
202
|
+
}, {
|
|
203
|
+
dataIndex: "actions",
|
|
204
|
+
slotName: "actions",
|
|
205
|
+
title: "操作",
|
|
206
|
+
minWidth: 100,
|
|
207
|
+
fixed: "right"
|
|
208
|
+
}];
|
|
209
|
+
function X(t) {
|
|
210
|
+
return {
|
|
211
|
+
trialing: "blue",
|
|
212
|
+
active: "green",
|
|
213
|
+
past_due: "orange",
|
|
214
|
+
canceled: "gray",
|
|
215
|
+
expired: "gray",
|
|
216
|
+
incomplete: "red"
|
|
217
|
+
}[t] || "gray";
|
|
218
|
+
}
|
|
219
|
+
function Y(t) {
|
|
220
|
+
return {
|
|
221
|
+
trialing: "试用中",
|
|
222
|
+
active: "已激活",
|
|
223
|
+
past_due: "逾期",
|
|
224
|
+
canceled: "已取消",
|
|
225
|
+
expired: "已过期",
|
|
226
|
+
incomplete: "未完成",
|
|
227
|
+
paused: "已暂停"
|
|
228
|
+
}[t] || t;
|
|
229
|
+
}
|
|
230
|
+
function Z(t) {
|
|
231
|
+
return {
|
|
232
|
+
draft: "gray",
|
|
233
|
+
open: "orange",
|
|
234
|
+
paid: "green",
|
|
235
|
+
void: "red",
|
|
236
|
+
uncollectible: "red"
|
|
237
|
+
}[t] || "gray";
|
|
238
|
+
}
|
|
239
|
+
function tt(t) {
|
|
240
|
+
return {
|
|
241
|
+
draft: "草稿",
|
|
242
|
+
open: "待支付",
|
|
243
|
+
paid: "已支付",
|
|
244
|
+
void: "已作废",
|
|
245
|
+
uncollectible: "无法收款"
|
|
246
|
+
}[t] || t;
|
|
247
|
+
}
|
|
248
|
+
function et(t) {
|
|
249
|
+
return {
|
|
250
|
+
day: "每天",
|
|
251
|
+
week: "每周",
|
|
252
|
+
month: "每月",
|
|
253
|
+
year: "每年",
|
|
254
|
+
lifetime: "不重置"
|
|
255
|
+
}[t] || t;
|
|
256
|
+
}
|
|
257
|
+
function M(t, e = 1) {
|
|
258
|
+
const p = e > 1 ? `每 ${e} ` : "按", S = {
|
|
259
|
+
day: `${p}天`,
|
|
260
|
+
week: `${p}周`,
|
|
261
|
+
month: `${p}月`,
|
|
262
|
+
year: `${p}年`
|
|
263
|
+
};
|
|
264
|
+
return t ? S[t] || t : "-";
|
|
265
|
+
}
|
|
266
|
+
function nt(t, e, p = 1) {
|
|
267
|
+
if (typeof t != "number") return "-";
|
|
268
|
+
const S = M(e, p).replace("按", "").replace("每 ", "");
|
|
269
|
+
return `¥${(t / 100).toFixed(2)} / ${S}`;
|
|
270
|
+
}
|
|
271
|
+
function at() {
|
|
272
|
+
y.value = !1, z("cancel");
|
|
273
|
+
}
|
|
274
|
+
function R() {
|
|
275
|
+
window.location.assign("/Pricing");
|
|
276
|
+
}
|
|
277
|
+
function it(t) {
|
|
278
|
+
window.open(t, "_blank", "noopener,noreferrer");
|
|
279
|
+
}
|
|
280
|
+
async function st() {
|
|
281
|
+
await $();
|
|
282
|
+
}
|
|
283
|
+
async function x() {
|
|
284
|
+
B.value = !0;
|
|
285
|
+
const {
|
|
286
|
+
data: t
|
|
287
|
+
} = await C.subscriptions.my.post({
|
|
288
|
+
current: b.value.current,
|
|
289
|
+
pageSize: b.value.pageSize
|
|
290
|
+
});
|
|
291
|
+
B.value = !1, t && (F.value = t.items, b.value.total = t.count);
|
|
292
|
+
}
|
|
293
|
+
async function q() {
|
|
294
|
+
U.value = !0;
|
|
295
|
+
const {
|
|
296
|
+
data: t
|
|
297
|
+
} = await C.invoices.my.post({
|
|
298
|
+
current: _.value.current,
|
|
299
|
+
pageSize: _.value.pageSize
|
|
300
|
+
});
|
|
301
|
+
U.value = !1, t && (V.value = t.items, _.value.total = t.count);
|
|
302
|
+
}
|
|
303
|
+
async function ot(t) {
|
|
304
|
+
const {
|
|
305
|
+
data: e
|
|
306
|
+
} = await C.invoices.pay.post({
|
|
307
|
+
id: t.id
|
|
308
|
+
});
|
|
309
|
+
e != null && e.alipayUrl && it(e.alipayUrl);
|
|
310
|
+
}
|
|
311
|
+
async function lt() {
|
|
312
|
+
if (!r.value) return;
|
|
313
|
+
const {
|
|
314
|
+
error: t
|
|
315
|
+
} = await C.subscriptions.cancel.post({
|
|
316
|
+
subscriptionId: r.value.id,
|
|
317
|
+
cancelAtPeriodEnd: !0
|
|
318
|
+
});
|
|
319
|
+
t || (await $(), await x());
|
|
320
|
+
}
|
|
321
|
+
async function rt() {
|
|
322
|
+
if (!r.value) return;
|
|
323
|
+
const {
|
|
324
|
+
error: t
|
|
325
|
+
} = await C.subscriptions.resume.post({
|
|
326
|
+
subscriptionId: r.value.id
|
|
327
|
+
});
|
|
328
|
+
t || (await $(), await x());
|
|
329
|
+
}
|
|
330
|
+
function ut(t) {
|
|
331
|
+
b.value.current = t, x();
|
|
332
|
+
}
|
|
333
|
+
function ct(t) {
|
|
334
|
+
b.value.pageSize = t, b.value.current = 1, x();
|
|
335
|
+
}
|
|
336
|
+
function dt(t) {
|
|
337
|
+
_.value.current = t, q();
|
|
338
|
+
}
|
|
339
|
+
function pt(t) {
|
|
340
|
+
_.value.pageSize = t, _.value.current = 1, q();
|
|
341
|
+
}
|
|
342
|
+
function mt(t) {
|
|
343
|
+
return (t == null ? void 0 : t.target) === "invoices" ? "invoices" : (t == null ? void 0 : t.target) === "quotas" ? "quotas" : "subscriptions";
|
|
344
|
+
}
|
|
345
|
+
function vt(t, e) {
|
|
346
|
+
y.value = e, L.value = "编辑", k.value = mt(t), e && (st(), x(), q());
|
|
347
|
+
}
|
|
348
|
+
return I({
|
|
349
|
+
setData: vt
|
|
350
|
+
}), (t, e) => (s(), P(n(kt), {
|
|
351
|
+
visible: n(y),
|
|
352
|
+
"onUpdate:visible": e[2] || (e[2] = (p) => yt(y) ? y.value = p : null),
|
|
353
|
+
loading: !1,
|
|
354
|
+
"body-class": "SubscriptionsbodyClass",
|
|
355
|
+
"mask-closable": !1,
|
|
356
|
+
footer: !1,
|
|
357
|
+
width: n(ft),
|
|
358
|
+
onCancel: at
|
|
359
|
+
}, {
|
|
360
|
+
title: o(() => [...e[3] || (e[3] = [d(" 订阅管理 ", -1)])]),
|
|
361
|
+
default: o(() => {
|
|
362
|
+
var p, S;
|
|
363
|
+
return [i("div", At, [h.value ? (s(), l("div", Nt, [i("div", Wt, [i("div", Et, [i("h3", null, u(h.value.productName), 1)]), i("div", Lt, [h.value.type === "trial" ? (s(), P(n(w), {
|
|
364
|
+
key: 0,
|
|
365
|
+
type: "primary",
|
|
366
|
+
size: "small",
|
|
367
|
+
onClick: R
|
|
368
|
+
}, {
|
|
369
|
+
default: o(() => [...e[4] || (e[4] = [d(" 立即订阅 ", -1)])]),
|
|
370
|
+
_: 1
|
|
371
|
+
})) : (p = n(r)) != null && p.cancelAtPeriodEnd ? (s(), P(n(w), {
|
|
372
|
+
key: 1,
|
|
373
|
+
type: "primary",
|
|
374
|
+
size: "small",
|
|
375
|
+
onClick: rt
|
|
376
|
+
}, {
|
|
377
|
+
default: o(() => [...e[5] || (e[5] = [d(" 恢复订阅 ", -1)])]),
|
|
378
|
+
_: 1
|
|
379
|
+
})) : n(r) ? (s(), P(n(ht), {
|
|
380
|
+
key: 2,
|
|
381
|
+
content: "取消后订阅将在当前周期结束时失效,确定取消吗?",
|
|
382
|
+
onOk: lt
|
|
383
|
+
}, {
|
|
384
|
+
default: o(() => [c(n(w), {
|
|
385
|
+
type: "outline",
|
|
386
|
+
size: "small",
|
|
387
|
+
status: "warning"
|
|
388
|
+
}, {
|
|
389
|
+
default: o(() => [...e[6] || (e[6] = [d(" 取消订阅 ", -1)])]),
|
|
390
|
+
_: 1
|
|
391
|
+
})]),
|
|
392
|
+
_: 1
|
|
393
|
+
})) : g("", !0)])]), i("div", Tt, [n(r) ? (s(), l("div", $t, [e[7] || (e[7] = i("span", {
|
|
394
|
+
class: "label"
|
|
395
|
+
}, "计费周期:", -1)), i("span", null, u(M(n(r).interval, n(r).intervalCount)), 1)])) : g("", !0), n(r) ? (s(), l("div", Bt, [e[8] || (e[8] = i("span", {
|
|
396
|
+
class: "label"
|
|
397
|
+
}, "价格:", -1)), i("span", null, u(nt(n(r).unitAmount, n(r).interval, n(r).intervalCount)), 1)])) : g("", !0), h.value.endAt ? (s(), l("div", Ut, [i("span", qt, u(h.value.type === "trial" ? "试用有效期至:" : "当前周期结束:"), 1), i("span", null, u(h.value.endAt), 1)])) : g("", !0), (S = n(r)) != null && S.cancelAtPeriodEnd ? (s(), l("div", Dt, [...e[9] || (e[9] = [i("span", {
|
|
398
|
+
class: "label"
|
|
399
|
+
}, "订阅将于周期结束后停止", -1)])])) : g("", !0), n(N) ? (s(), l("div", Ft, [e[10] || (e[10] = i("span", {
|
|
400
|
+
class: "label"
|
|
401
|
+
}, "积分余额:", -1)), i("span", null, u(n(N).totalPoints), 1)])) : g("", !0)]), n(W) ? (s(), l("div", Vt, [e[12] || (e[12] = i("div", null, [i("strong", null, "存在待支付账单"), i("span", null, "请前往账单记录选择具体账单完成支付。")], -1)), c(n(w), {
|
|
402
|
+
type: "primary",
|
|
403
|
+
status: "warning",
|
|
404
|
+
size: "small",
|
|
405
|
+
onClick: e[0] || (e[0] = (a) => k.value = "invoices")
|
|
406
|
+
}, {
|
|
407
|
+
default: o(() => [...e[11] || (e[11] = [d(" 去处理 ", -1)])]),
|
|
408
|
+
_: 1
|
|
409
|
+
})])) : g("", !0)])) : (s(), l("div", Mt, [e[14] || (e[14] = i("span", {
|
|
410
|
+
class: "no-subscription-text"
|
|
411
|
+
}, "暂无方案", -1)), c(n(w), {
|
|
412
|
+
type: "primary",
|
|
413
|
+
size: "small",
|
|
414
|
+
onClick: R
|
|
415
|
+
}, {
|
|
416
|
+
default: o(() => [...e[13] || (e[13] = [d("查看价格方案", -1)])]),
|
|
417
|
+
_: 1
|
|
418
|
+
})])), c(n(St), {
|
|
419
|
+
"active-key": k.value,
|
|
420
|
+
"onUpdate:activeKey": e[1] || (e[1] = (a) => k.value = a),
|
|
421
|
+
class: "subscription-tabs"
|
|
422
|
+
}, {
|
|
423
|
+
default: o(() => [c(n(D), {
|
|
424
|
+
key: "subscriptions",
|
|
425
|
+
title: "订阅历史"
|
|
426
|
+
}, {
|
|
427
|
+
default: o(() => [c(O, {
|
|
428
|
+
columns: J,
|
|
429
|
+
data: F.value,
|
|
430
|
+
loading: B.value,
|
|
431
|
+
pagination: b.value,
|
|
432
|
+
onPageChange: ut,
|
|
433
|
+
onPageSizeChange: ct
|
|
434
|
+
}, {
|
|
435
|
+
status: o(({
|
|
436
|
+
record: a
|
|
437
|
+
}) => [c(n(K), {
|
|
438
|
+
color: X(a.status)
|
|
439
|
+
}, {
|
|
440
|
+
default: o(() => [d(u(Y(a.status)), 1)]),
|
|
441
|
+
_: 2
|
|
442
|
+
}, 1032, ["color"])]),
|
|
443
|
+
interval: o(({
|
|
444
|
+
record: a
|
|
445
|
+
}) => [d(u(a.interval === "month" ? "按月" : a.interval === "year" ? "按年" : a.interval || "-"), 1)]),
|
|
446
|
+
unitAmount: o(({
|
|
447
|
+
record: a
|
|
448
|
+
}) => [d(u(a.unitAmount ? `¥${(a.unitAmount / 100).toFixed(2)}` : "-"), 1)]),
|
|
449
|
+
_: 1
|
|
450
|
+
}, 8, ["data", "loading", "pagination"])]),
|
|
451
|
+
_: 1
|
|
452
|
+
}), c(n(D), {
|
|
453
|
+
key: "invoices",
|
|
454
|
+
title: "账单记录"
|
|
455
|
+
}, {
|
|
456
|
+
default: o(() => [c(O, {
|
|
457
|
+
columns: Q,
|
|
458
|
+
data: V.value,
|
|
459
|
+
loading: U.value,
|
|
460
|
+
pagination: _.value,
|
|
461
|
+
onPageChange: dt,
|
|
462
|
+
onPageSizeChange: pt
|
|
463
|
+
}, {
|
|
464
|
+
status: o(({
|
|
465
|
+
record: a
|
|
466
|
+
}) => [c(n(K), {
|
|
467
|
+
color: Z(a.status)
|
|
468
|
+
}, {
|
|
469
|
+
default: o(() => [d(u(tt(a.status)), 1)]),
|
|
470
|
+
_: 2
|
|
471
|
+
}, 1032, ["color"])]),
|
|
472
|
+
total: o(({
|
|
473
|
+
record: a
|
|
474
|
+
}) => [d(" ¥" + u((a.total / 100).toFixed(2)), 1)]),
|
|
475
|
+
actions: o(({
|
|
476
|
+
record: a
|
|
477
|
+
}) => [a.status === "open" ? (s(), P(n(w), {
|
|
478
|
+
key: 0,
|
|
479
|
+
type: "primary",
|
|
480
|
+
status: "warning",
|
|
481
|
+
size: "mini",
|
|
482
|
+
onClick: (ne) => ot(a)
|
|
483
|
+
}, {
|
|
484
|
+
default: o(() => [...e[15] || (e[15] = [d(" 去支付 ", -1)])]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 8, ["onClick"])) : (s(), l("span", Rt, "-"))]),
|
|
487
|
+
_: 1
|
|
488
|
+
}, 8, ["data", "loading", "pagination"])]),
|
|
489
|
+
_: 1
|
|
490
|
+
}), c(n(D), {
|
|
491
|
+
key: "quotas",
|
|
492
|
+
title: "配额使用"
|
|
493
|
+
}, {
|
|
494
|
+
default: o(() => [G.value ? (s(), l("div", Kt, [c(n(wt))])) : n(A).length === 0 ? (s(), l("div", Ot, [c(n(Ct), {
|
|
495
|
+
description: "暂无配额限制"
|
|
496
|
+
})])) : (s(), l("div", Ht, [(s(!0), l(bt, null, _t(n(A), (a) => (s(), l("div", {
|
|
497
|
+
key: a.featureKey,
|
|
498
|
+
class: "quota-card"
|
|
499
|
+
}, [i("div", jt, [i("span", Gt, u(a.name), 1), i("span", Jt, u(et(a.period)), 1)]), i("div", Qt, [c(n(It), {
|
|
500
|
+
percent: a.percentage,
|
|
501
|
+
status: a.percentage >= 90 ? "danger" : a.percentage >= 70 ? "warning" : "normal"
|
|
502
|
+
}, null, 8, ["percent", "status"])]), i("div", Xt, [a.unlimited ? (s(), l("span", Yt, "无限制")) : (s(), l("span", Zt, "已使用 " + u(a.used) + " / " + u(a.limit), 1)), a.resetsAt ? (s(), l("span", te, u(a.resetsAt) + " 重置", 1)) : g("", !0)])]))), 128))]))]),
|
|
503
|
+
_: 1
|
|
504
|
+
})]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["active-key"])])];
|
|
507
|
+
}),
|
|
508
|
+
_: 1
|
|
509
|
+
}, 8, ["visible", "width"]));
|
|
510
|
+
}
|
|
511
|
+
}), ye = /* @__PURE__ */ Pt(ee, [["__scopeId", "data-v-610f8628"]]);
|
|
512
|
+
export {
|
|
513
|
+
ye as P,
|
|
514
|
+
zt as u
|
|
515
|
+
};
|