@huyooo/ui 0.11.5 → 0.11.7
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 → AuthkitAppSetting-DrX6fwKt.js} +11 -10
- package/dist/{useEnsureAuthenticated-Cc64hF1O.js → AuthkitGithubBinding-r2oVuCSV.js} +631 -680
- package/dist/{Clipboard-CRZDADLE.js → Clipboard-ChMNfcO5.js} +1 -1
- package/dist/{Contact-Y0Yczmc9.js → Contact-Yqmjh47e.js} +2 -2
- package/dist/{FeedbackItem-D7MpOmoM.js → FeedbackItem-DHp_C0pN.js} +3 -3
- package/dist/{FeedbackModal-CvNF1D-5.js → FeedbackModal-Dzl0Alp7.js} +3 -3
- package/dist/{MessageHandle-B12koVQL.js → MessageHandle-BcRjYeVi.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DxDn6Ok8.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BOtgTje-.js} +2 -2
- package/dist/{PaySubscriptions-B8jAtG5n.js → PaySubscriptions-BsU0XmXf.js} +2 -2
- package/dist/PricingPlans-Cf20-GqK.js +251 -0
- package/dist/{ReferrerReferees-D_Iiw9wZ.js → ReferrerReferees-B-ISyXHw.js} +4 -4
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-CbVSY_vt.js → Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DpVadjMH.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Czix4_tj.js} +8 -8
- package/dist/{WidthContainer-B6d4xrGT.js → WidthContainer-CYYbzXj0.js} +20 -19
- package/dist/{apiClients-DVz12LeW.js → apiClients-KFp-rs-C.js} +19 -19
- package/dist/authkit.js +31 -29
- package/dist/common/globalConfig.d.ts +2 -0
- package/dist/common.js +1 -1
- package/dist/composables/Billing/useBillingPlans.d.ts +29 -1
- package/dist/composables.js +41 -40
- package/dist/feedback.js +3 -3
- package/dist/main.d.ts +1 -0
- package/dist/main.js +674 -642
- package/dist/message.js +3 -3
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-Du5d6VK-.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js} +1 -1
- package/dist/useAuthkitAuth-Doj5VYjK.js +170 -0
- package/dist/{useAuthkitCreateAndUpdate-Bc9D5C6R.js → useAuthkitCreateAndUpdate-DomftQMK.js} +1 -1
- package/dist/useAuthkitUsersProfile-FJnHJad-.js +36 -0
- package/dist/{useDownloads-BFx1a-f9.js → useDownloads-CzC3gLUV.js} +1 -1
- package/dist/useEnsureAuthenticated-D78tsddF.js +56 -0
- package/dist/{useLegalLinks-Deksq9h-.js → useLegalLinks-OGVbqXVy.js} +2 -2
- package/dist/{useMessageNotifications-DY5xKtif.js → useMessageNotifications-DeHFJFcX.js} +1 -1
- package/dist/{useSEO-CvfzTZA9.js → useSEO-BZhVKEZr.js} +2 -2
- package/dist/useSubscriptionCheckout-BubIsxjO.js +386 -0
- package/dist/{useTableHandle-D71P3Ez_.js → useTableHandle-jw0P7-2a.js} +1 -1
- package/dist/{useUploadCos-N5pim6q1.js → useUploadCos-keDKcs0j.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/utils/legacyApi.d.ts +18 -0
- package/package.json +1 -1
- package/dist/PricingPlans-CO26OcbJ.js +0 -210
- package/dist/useAuthkitUsersProfile-CQGyvL7g.js +0 -201
- package/dist/useSubscriptionCheckout-BgQJN61l.js +0 -345
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { ref as g, computed as B } from "vue";
|
|
2
|
+
import { f as h } from "./apiClients-KFp-rs-C.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { Message as v } from "@arco-design/web-vue";
|
|
5
|
+
import { u as H } from "./useEnsureAuthenticated-D78tsddF.js";
|
|
6
|
+
function F(e) {
|
|
7
|
+
var i;
|
|
8
|
+
const n = (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.originalPrice;
|
|
9
|
+
return typeof n == "number" ? n : void 0;
|
|
10
|
+
}
|
|
11
|
+
function J(e) {
|
|
12
|
+
const n = F(e);
|
|
13
|
+
return !e || n === void 0 || n <= e.unitAmount ? 0 : Math.round((1 - e.unitAmount / n) * 100);
|
|
14
|
+
}
|
|
15
|
+
function N(e) {
|
|
16
|
+
var f, d;
|
|
17
|
+
const n = (f = e == null ? void 0 : e.metadata) == null ? void 0 : f.discountLabel;
|
|
18
|
+
if (typeof n == "string" && n.trim())
|
|
19
|
+
return n;
|
|
20
|
+
const i = (d = e == null ? void 0 : e.metadata) == null ? void 0 : d.savingMonths;
|
|
21
|
+
return typeof i == "number" && i > 0 ? `买 ${12 - i} 个月送 ${i} 个月` : "";
|
|
22
|
+
}
|
|
23
|
+
function D(e) {
|
|
24
|
+
return e === void 0 ? 0 : Math.floor(e / 100);
|
|
25
|
+
}
|
|
26
|
+
function X(e, n = 1) {
|
|
27
|
+
const i = n > 1 ? `每 ${n} ` : "按";
|
|
28
|
+
switch (e) {
|
|
29
|
+
case "month":
|
|
30
|
+
return `${i}月订阅`;
|
|
31
|
+
case "year":
|
|
32
|
+
return `${i}年订阅`;
|
|
33
|
+
case "day":
|
|
34
|
+
return `${i}天订阅`;
|
|
35
|
+
case "week":
|
|
36
|
+
return `${i}周订阅`;
|
|
37
|
+
default:
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function Y(e) {
|
|
42
|
+
const n = e != null && e.intervalCount && e.intervalCount > 1 ? `${e.intervalCount} ` : "";
|
|
43
|
+
switch (e == null ? void 0 : e.interval) {
|
|
44
|
+
case "month":
|
|
45
|
+
return `/ ${n}月`;
|
|
46
|
+
case "year":
|
|
47
|
+
return `/ ${n}年`;
|
|
48
|
+
case "day":
|
|
49
|
+
return `/ ${n}天`;
|
|
50
|
+
case "week":
|
|
51
|
+
return `/ ${n}周`;
|
|
52
|
+
default:
|
|
53
|
+
return "";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function k(e) {
|
|
57
|
+
switch (e) {
|
|
58
|
+
case "day":
|
|
59
|
+
return "每天";
|
|
60
|
+
case "week":
|
|
61
|
+
return "每周";
|
|
62
|
+
case "month":
|
|
63
|
+
return "每月";
|
|
64
|
+
case "year":
|
|
65
|
+
return "每年";
|
|
66
|
+
case "lifetime":
|
|
67
|
+
return "不重置";
|
|
68
|
+
default:
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function M(e) {
|
|
73
|
+
if (e.type === "quota" && e.value !== void 0) {
|
|
74
|
+
const n = k(e.quotaPeriod), i = n ? ` / ${n}` : "";
|
|
75
|
+
return `${e.name}: ${e.value === -1 ? "无限" : e.value}${i}`;
|
|
76
|
+
}
|
|
77
|
+
if (e.type === "unlimited") {
|
|
78
|
+
const n = k(e.quotaPeriod);
|
|
79
|
+
return n ? `${e.name}: 不限 / ${n}` : `${e.name}不限`;
|
|
80
|
+
}
|
|
81
|
+
return e.type === "boolean" && e.value === !1 ? `${e.name}(不支持)` : e.name;
|
|
82
|
+
}
|
|
83
|
+
function A(e) {
|
|
84
|
+
return e.type !== "recurring" || !e.interval ? null : {
|
|
85
|
+
key: `${e.interval}:${e.intervalCount ?? 1}`,
|
|
86
|
+
interval: e.interval,
|
|
87
|
+
intervalCount: e.intervalCount ?? 1
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function Z(e, n) {
|
|
91
|
+
const i = {
|
|
92
|
+
day: 1,
|
|
93
|
+
week: 2,
|
|
94
|
+
month: 3,
|
|
95
|
+
year: 4
|
|
96
|
+
};
|
|
97
|
+
return i[e.interval] - i[n.interval] || e.intervalCount - n.intervalCount;
|
|
98
|
+
}
|
|
99
|
+
function ee(e, n) {
|
|
100
|
+
let i = 0;
|
|
101
|
+
for (const f of e)
|
|
102
|
+
for (const d of f.prices) {
|
|
103
|
+
const o = A(d);
|
|
104
|
+
(o == null ? void 0 : o.key) === n && (i = Math.max(i, J(d)));
|
|
105
|
+
}
|
|
106
|
+
return i > 0 ? `省 ${i}%` : void 0;
|
|
107
|
+
}
|
|
108
|
+
function te(e) {
|
|
109
|
+
return e.includes(":") ? e : `${e}:1`;
|
|
110
|
+
}
|
|
111
|
+
function x() {
|
|
112
|
+
return !!localStorage.getItem("jwtToken");
|
|
113
|
+
}
|
|
114
|
+
function fe(e = "month") {
|
|
115
|
+
const n = g([]), i = g(null), f = g(null), d = g(!1), o = g(!1), l = g(te(e)), a = B(() => {
|
|
116
|
+
const t = /* @__PURE__ */ new Map();
|
|
117
|
+
for (const r of n.value)
|
|
118
|
+
for (const u of r.prices) {
|
|
119
|
+
const c = A(u);
|
|
120
|
+
c && t.set(c.key, c);
|
|
121
|
+
}
|
|
122
|
+
return [...t.values()].sort(Z).map((r) => ({
|
|
123
|
+
value: r.key,
|
|
124
|
+
label: X(r.interval, r.intervalCount),
|
|
125
|
+
badge: ee(n.value, r.key)
|
|
126
|
+
}));
|
|
127
|
+
}), $ = B(() => {
|
|
128
|
+
var r;
|
|
129
|
+
const t = [];
|
|
130
|
+
for (const u of n.value) {
|
|
131
|
+
const c = u.prices.find((b) => {
|
|
132
|
+
const w = A(b);
|
|
133
|
+
return (w == null ? void 0 : w.key) === l.value;
|
|
134
|
+
}), m = u.prices.find((b) => b.type === "free"), s = c ?? (m && u.prices.every((b) => b.type === "free") ? m : void 0);
|
|
135
|
+
s && t.push({
|
|
136
|
+
...u,
|
|
137
|
+
features: (r = s.features) != null && r.length ? s.features : u.features,
|
|
138
|
+
selectedPrice: s
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return t;
|
|
142
|
+
});
|
|
143
|
+
function P(t) {
|
|
144
|
+
l.value = t;
|
|
145
|
+
}
|
|
146
|
+
function p(t) {
|
|
147
|
+
const r = i.value, u = f.value;
|
|
148
|
+
return r != null && r.priceId && t.selectedPrice ? r.priceId === t.selectedPrice.id : r ? r.productId === t.id : u != null && u.priceId && t.selectedPrice ? u.priceId === t.selectedPrice.id : u ? u.productId === t.id : !1;
|
|
149
|
+
}
|
|
150
|
+
function L(t) {
|
|
151
|
+
var r;
|
|
152
|
+
return ((r = i.value) == null ? void 0 : r.productId) === t.id;
|
|
153
|
+
}
|
|
154
|
+
function y(t) {
|
|
155
|
+
var r;
|
|
156
|
+
return ((r = t.selectedPrice) == null ? void 0 : r.type) === "free";
|
|
157
|
+
}
|
|
158
|
+
function T() {
|
|
159
|
+
return !!i.value;
|
|
160
|
+
}
|
|
161
|
+
function U(t) {
|
|
162
|
+
return !!(!t.selectedPrice || p(t) || y(t) && T());
|
|
163
|
+
}
|
|
164
|
+
function I(t) {
|
|
165
|
+
var r;
|
|
166
|
+
return ((r = t.metadata) == null ? void 0 : r.recommended) === !0;
|
|
167
|
+
}
|
|
168
|
+
function j(t) {
|
|
169
|
+
var r;
|
|
170
|
+
return D((r = t.selectedPrice) == null ? void 0 : r.unitAmount);
|
|
171
|
+
}
|
|
172
|
+
function G(t) {
|
|
173
|
+
const r = F(t.selectedPrice);
|
|
174
|
+
return r === void 0 ? void 0 : D(r);
|
|
175
|
+
}
|
|
176
|
+
function O(t) {
|
|
177
|
+
return y(t) ? "" : Y(t.selectedPrice);
|
|
178
|
+
}
|
|
179
|
+
function R(t) {
|
|
180
|
+
var r;
|
|
181
|
+
if (y(t)) {
|
|
182
|
+
const u = (r = t.selectedPrice) == null ? void 0 : r.trialPeriodDays;
|
|
183
|
+
return u ? `${u} 天免费体验` : "免费体验";
|
|
184
|
+
}
|
|
185
|
+
return N(t.selectedPrice);
|
|
186
|
+
}
|
|
187
|
+
function E(t) {
|
|
188
|
+
return p(t) ? "当前方案" : I(t) ? "最受欢迎" : "";
|
|
189
|
+
}
|
|
190
|
+
function K(t) {
|
|
191
|
+
const r = [];
|
|
192
|
+
return p(t) ? r.push({
|
|
193
|
+
label: "当前方案",
|
|
194
|
+
type: "current"
|
|
195
|
+
}) : y(t) ? r.push({
|
|
196
|
+
label: "免费体验",
|
|
197
|
+
type: "trial"
|
|
198
|
+
}) : I(t) && r.push({
|
|
199
|
+
label: "最受欢迎",
|
|
200
|
+
type: "recommended"
|
|
201
|
+
}), r;
|
|
202
|
+
}
|
|
203
|
+
function Q(t) {
|
|
204
|
+
const r = i.value;
|
|
205
|
+
return p(t) ? "当前方案" : y(t) ? r ? "已订阅付费方案" : x() ? "免费开通" : "免费注册" : r ? L(t) ? "切换周期" : typeof r.unitAmount == "number" && t.selectedPrice.unitAmount > r.unitAmount ? "升级方案" : "切换方案" : "立即订阅";
|
|
206
|
+
}
|
|
207
|
+
function V(t, r) {
|
|
208
|
+
const u = t.features.find((c) => c.type === "quota" && c.value !== void 0);
|
|
209
|
+
if (u) {
|
|
210
|
+
const c = k(u.quotaPeriod), m = u.value === -1 ? "不限量" : u.value;
|
|
211
|
+
return `${u.name} ${c ? `${m} / ${c}` : m},覆盖核心使用场景。`;
|
|
212
|
+
}
|
|
213
|
+
return y(t) ? "注册后自动开通免费权益,适合先体验核心能力。" : r === 1 ? "为正式团队准备的高配能力组合。" : "包含入门所需的核心能力。";
|
|
214
|
+
}
|
|
215
|
+
function W(t) {
|
|
216
|
+
return t.filter((r) => r.highlight !== !1).map((r) => ({
|
|
217
|
+
title: M(r),
|
|
218
|
+
description: r.description || ""
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
function _(t) {
|
|
222
|
+
const r = t.filter((s) => s.highlight !== !1), u = r.filter((s) => s.type === "quota" || s.type === "unlimited").map((s) => ({
|
|
223
|
+
title: M(s),
|
|
224
|
+
description: s.description || ""
|
|
225
|
+
})), c = r.filter((s) => s.type === "boolean" && s.value !== !1).map((s) => ({
|
|
226
|
+
title: s.name,
|
|
227
|
+
description: s.description || ""
|
|
228
|
+
})), m = [];
|
|
229
|
+
return c.length && m.push({
|
|
230
|
+
title: "功能特性",
|
|
231
|
+
items: c
|
|
232
|
+
}), u.length && m.push({
|
|
233
|
+
title: "用量配额",
|
|
234
|
+
items: u
|
|
235
|
+
}), m;
|
|
236
|
+
}
|
|
237
|
+
async function q() {
|
|
238
|
+
d.value = !0;
|
|
239
|
+
try {
|
|
240
|
+
const {
|
|
241
|
+
data: t,
|
|
242
|
+
error: r
|
|
243
|
+
} = await h.products.listActive.post();
|
|
244
|
+
if (r) {
|
|
245
|
+
console.error("加载产品列表失败", r);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
n.value = Array.isArray(t) ? t : [], !a.value.some((c) => c.value === l.value) && a.value[0] && (l.value = a.value[0].value);
|
|
249
|
+
} finally {
|
|
250
|
+
d.value = !1;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
async function S() {
|
|
254
|
+
if (!x()) {
|
|
255
|
+
i.value = null;
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
o.value = !0;
|
|
259
|
+
try {
|
|
260
|
+
const {
|
|
261
|
+
data: t,
|
|
262
|
+
error: r
|
|
263
|
+
} = await h.subscriptions.summary.post();
|
|
264
|
+
if (r) {
|
|
265
|
+
console.error("加载当前订阅失败", r);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
i.value = (t == null ? void 0 : t.current) ?? null, f.value = (t == null ? void 0 : t.trial) ?? null;
|
|
269
|
+
} finally {
|
|
270
|
+
o.value = !1;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
async function z() {
|
|
274
|
+
await Promise.all([q(), S()]);
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
products: n,
|
|
278
|
+
plans: $,
|
|
279
|
+
currentSubscription: i,
|
|
280
|
+
currentTrial: f,
|
|
281
|
+
listLoading: d,
|
|
282
|
+
currentLoading: o,
|
|
283
|
+
billingInterval: l,
|
|
284
|
+
billingIntervalTabs: a,
|
|
285
|
+
setBillingInterval: P,
|
|
286
|
+
isCurrentPlan: p,
|
|
287
|
+
isSameProduct: L,
|
|
288
|
+
isRecommendedPlan: I,
|
|
289
|
+
isFreePlan: y,
|
|
290
|
+
isPlanActionDisabled: U,
|
|
291
|
+
getDisplayPrice: j,
|
|
292
|
+
getDisplayOriginalPrice: G,
|
|
293
|
+
getDisplayCycle: O,
|
|
294
|
+
getPromotionLabel: R,
|
|
295
|
+
getBadgeLabel: E,
|
|
296
|
+
getBadgeLabels: K,
|
|
297
|
+
getButtonLabel: Q,
|
|
298
|
+
getPlanSummary: V,
|
|
299
|
+
getFeatureItems: W,
|
|
300
|
+
getFeatureGroups: _,
|
|
301
|
+
loadProducts: q,
|
|
302
|
+
loadCurrentSubscription: S,
|
|
303
|
+
refresh: z
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function re(e) {
|
|
307
|
+
window.open(e, "_blank", "noopener,noreferrer");
|
|
308
|
+
}
|
|
309
|
+
function C(e) {
|
|
310
|
+
return e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "";
|
|
311
|
+
}
|
|
312
|
+
function ne(e) {
|
|
313
|
+
return e && typeof e == "object" && "alipayUrl" in e && typeof e.alipayUrl == "string" ? e.alipayUrl : "";
|
|
314
|
+
}
|
|
315
|
+
function ie(e) {
|
|
316
|
+
return e && typeof e == "object" && "status" in e && e.status === "trialing";
|
|
317
|
+
}
|
|
318
|
+
const ue = h;
|
|
319
|
+
function de(e) {
|
|
320
|
+
const n = g(null), {
|
|
321
|
+
ensureAuthenticated: i
|
|
322
|
+
} = H();
|
|
323
|
+
async function f(o) {
|
|
324
|
+
if (!o.selectedPrice) {
|
|
325
|
+
v.warning("当前方案暂无可购买价格");
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (!i(() => f(o))) return;
|
|
329
|
+
const l = e.currentSubscription.value;
|
|
330
|
+
if ((l == null ? void 0 : l.priceId) === o.selectedPrice.id) {
|
|
331
|
+
v.info("当前已经是该方案");
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
n.value = o.id;
|
|
335
|
+
try {
|
|
336
|
+
if (o.selectedPrice.type === "free") {
|
|
337
|
+
if (l) {
|
|
338
|
+
v.info("当前已有付费订阅,无需重复开通免费体验");
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const P = await ue.trials.start.post({
|
|
342
|
+
priceId: o.selectedPrice.id
|
|
343
|
+
});
|
|
344
|
+
if (P.error) {
|
|
345
|
+
v.error(P.error.message || "免费体验开通失败");
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
v.success(C(P.data) || "免费体验已开通"), await e.refreshCurrentSubscription();
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const a = l ? await h.subscriptions.change.post({
|
|
352
|
+
subscriptionId: l.id,
|
|
353
|
+
newPriceId: o.selectedPrice.id,
|
|
354
|
+
proration: !0
|
|
355
|
+
}) : await h.subscriptions.create.post({
|
|
356
|
+
priceId: o.selectedPrice.id
|
|
357
|
+
});
|
|
358
|
+
if (a.error) {
|
|
359
|
+
v.error(a.error.message || "订阅操作失败");
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const $ = ne(a.data);
|
|
363
|
+
if ($) {
|
|
364
|
+
re($);
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
ie(a.data) ? v.success(C(a.data) || "试用已开始") : v.success(C(a.data) || "订阅已更新"), await e.refreshCurrentSubscription();
|
|
368
|
+
} catch (a) {
|
|
369
|
+
console.error("订阅操作失败", a), v.error("订阅操作失败,请稍后重试");
|
|
370
|
+
} finally {
|
|
371
|
+
n.value = null;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
function d(o) {
|
|
375
|
+
return n.value === o.id;
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
checkoutPlanId: n,
|
|
379
|
+
checkout: f,
|
|
380
|
+
isCheckingOut: d
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
export {
|
|
384
|
+
de as a,
|
|
385
|
+
fe as u
|
|
386
|
+
};
|
package/dist/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Czix4_tj.js";
|
|
2
2
|
export {
|
|
3
3
|
a as UserAccountMenu,
|
|
4
4
|
n as UserAvatar,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface LegacyApiRequestConfig {
|
|
2
|
+
url: string;
|
|
3
|
+
method?: string;
|
|
4
|
+
data?: any;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface LegacyApiResponse<T = any> {
|
|
10
|
+
data: T;
|
|
11
|
+
status: number;
|
|
12
|
+
headers: Headers;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Legacy axios-like request helper kept for older @huyooo/ui consumers.
|
|
16
|
+
* New code should use typed clients exported from utils/apiClients.
|
|
17
|
+
*/
|
|
18
|
+
export declare function api<T = any>(config: LegacyApiRequestConfig): Promise<LegacyApiResponse<T>>;
|
package/package.json
CHANGED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, computed as R, openBlock as s, createBlock as D, withCtx as g, createVNode as P, onMounted as T, resolveDirective as M, createElementBlock as i, createElementVNode as n, unref as t, Fragment as c, renderList as u, normalizeClass as v, toDisplayString as l, createCommentVNode as o, withDirectives as j, createTextVNode as J } from "vue";
|
|
2
|
-
import { L as U, a as W } from "./LandingPageFAQ-CZJXvor9.js";
|
|
3
|
-
import { L as X } from "./LandingPageSectionHeader-D_74W4My.js";
|
|
4
|
-
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import "./index-D3Kp6R4z.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
import { Spin as Y, Button as Z } from "@arco-design/web-vue";
|
|
9
|
-
import { Icon as ee } from "@iconify/vue";
|
|
10
|
-
import { u as te, a as se } from "./useSubscriptionCheckout-BgQJN61l.js";
|
|
11
|
-
const ie = /* @__PURE__ */ L({
|
|
12
|
-
__name: "PricingFAQ",
|
|
13
|
-
props: {
|
|
14
|
-
title: {
|
|
15
|
-
default: "订阅常见问题"
|
|
16
|
-
},
|
|
17
|
-
subtitle: {
|
|
18
|
-
default: "关于试用、付款、配额、升级和取消订阅的说明。"
|
|
19
|
-
},
|
|
20
|
-
activeKeys: {
|
|
21
|
-
default: () => []
|
|
22
|
-
},
|
|
23
|
-
faqItems: {
|
|
24
|
-
default: void 0
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
setup(a) {
|
|
28
|
-
const m = [{
|
|
29
|
-
question: "可以先试用再付费吗?",
|
|
30
|
-
answer: "可以。支持试用的方案会在卡片按钮上标明试用天数。试用期间可使用对应方案能力,到期后再决定是否继续订阅。"
|
|
31
|
-
}, {
|
|
32
|
-
question: "月付和年付有什么区别?",
|
|
33
|
-
answer: "月付适合短期验证和灵活使用,年付适合稳定团队和长期项目,通常会有更优惠的价格。"
|
|
34
|
-
}, {
|
|
35
|
-
question: "已有订阅后可以升级或切换方案吗?",
|
|
36
|
-
answer: "可以。升级或切换方案时,系统会根据当前订阅和新方案计算差额;如需补差价,会跳转到支付页面完成支付。"
|
|
37
|
-
}, {
|
|
38
|
-
question: "取消订阅后还能继续使用吗?",
|
|
39
|
-
answer: "可以。取消订阅后,当前计费周期内仍可继续使用,周期结束后订阅权益将停止续期。"
|
|
40
|
-
}, {
|
|
41
|
-
question: "配额什么时候重置?",
|
|
42
|
-
answer: "配额按订阅周期重置,不一定是自然月月初。例如您在 4 月 15 日订阅月付方案,下一次配额重置通常发生在 5 月 15 日。"
|
|
43
|
-
}, {
|
|
44
|
-
question: "不同方案的技术支持有什么区别?",
|
|
45
|
-
answer: "基础方案适合个人和轻量团队,包含常规支持;更高等级方案面向正式团队和生产场景,通常包含更高优先级支持。"
|
|
46
|
-
}, {
|
|
47
|
-
question: "是否支持退款?",
|
|
48
|
-
answer: "订阅可随时取消。退款规则以付费服务协议为准,如遇到重复扣费或异常支付,可以联系支持团队处理。"
|
|
49
|
-
}, {
|
|
50
|
-
question: "使用订阅服务有什么限制?",
|
|
51
|
-
answer: "请按正常业务场景使用服务,禁止共享、转售订阅或用于违法违规场景。严重滥用可能导致服务受限或账户终止。"
|
|
52
|
-
}], _ = a, f = R(() => _.faqItems ?? m);
|
|
53
|
-
return (p, h) => (s(), D(U, {
|
|
54
|
-
class: "PricingFAQ"
|
|
55
|
-
}, {
|
|
56
|
-
BlockHeader: g(() => [P(X, {
|
|
57
|
-
title: a.title,
|
|
58
|
-
subtitle: a.subtitle
|
|
59
|
-
}, null, 8, ["title", "subtitle"])]),
|
|
60
|
-
BlockBody: g(() => [P(W, {
|
|
61
|
-
"active-keys": a.activeKeys,
|
|
62
|
-
"faq-items": f.value
|
|
63
|
-
}, null, 8, ["active-keys", "faq-items"])]),
|
|
64
|
-
_: 1
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
}), Ne = /* @__PURE__ */ S(ie, [["__scopeId", "data-v-fcab2f05"]]), ne = {
|
|
68
|
-
class: "PricingPlans"
|
|
69
|
-
}, le = {
|
|
70
|
-
class: "PricingPlans__toolbar"
|
|
71
|
-
}, ae = {
|
|
72
|
-
key: 0,
|
|
73
|
-
class: "PricingPlans__toggle",
|
|
74
|
-
role: "tablist",
|
|
75
|
-
"aria-label": "计费周期"
|
|
76
|
-
}, re = ["onClick"], oe = {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: "PricingPlans__toggleBadge"
|
|
79
|
-
}, ce = {
|
|
80
|
-
key: 1,
|
|
81
|
-
class: "PricingPlans__note"
|
|
82
|
-
}, ue = {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: "PricingPlans__grid"
|
|
85
|
-
}, _e = {
|
|
86
|
-
class: "PricingPlans__badgeRow"
|
|
87
|
-
}, de = {
|
|
88
|
-
class: "PricingPlans__header"
|
|
89
|
-
}, ge = {
|
|
90
|
-
class: "PricingPlans__price"
|
|
91
|
-
}, Pe = {
|
|
92
|
-
key: 0,
|
|
93
|
-
class: "PricingPlans__originalPrice"
|
|
94
|
-
}, me = {
|
|
95
|
-
class: "PricingPlans__amount"
|
|
96
|
-
}, fe = {
|
|
97
|
-
class: "PricingPlans__cycle"
|
|
98
|
-
}, pe = {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "PricingPlans__promotion"
|
|
101
|
-
}, ye = {
|
|
102
|
-
class: "PricingPlans__summary"
|
|
103
|
-
}, ve = {
|
|
104
|
-
class: "PricingPlans__featureGroups"
|
|
105
|
-
}, he = {
|
|
106
|
-
class: "PricingPlans__features"
|
|
107
|
-
}, ke = {
|
|
108
|
-
key: 1,
|
|
109
|
-
class: "PricingPlans__empty"
|
|
110
|
-
}, be = /* @__PURE__ */ L({
|
|
111
|
-
__name: "PricingPlans",
|
|
112
|
-
props: {
|
|
113
|
-
appName: {
|
|
114
|
-
default: "Huyooo"
|
|
115
|
-
},
|
|
116
|
-
defaultInterval: {
|
|
117
|
-
default: "month"
|
|
118
|
-
},
|
|
119
|
-
note: {
|
|
120
|
-
default: ""
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
setup(a) {
|
|
124
|
-
const m = a, {
|
|
125
|
-
plans: _,
|
|
126
|
-
currentSubscription: f,
|
|
127
|
-
listLoading: p,
|
|
128
|
-
billingInterval: h,
|
|
129
|
-
billingIntervalTabs: k,
|
|
130
|
-
setBillingInterval: F,
|
|
131
|
-
isCurrentPlan: b,
|
|
132
|
-
isRecommendedPlan: C,
|
|
133
|
-
getDisplayPrice: x,
|
|
134
|
-
getDisplayOriginalPrice: B,
|
|
135
|
-
getDisplayCycle: N,
|
|
136
|
-
getPromotionLabel: I,
|
|
137
|
-
getBadgeLabels: A,
|
|
138
|
-
getButtonLabel: Q,
|
|
139
|
-
getPlanSummary: V,
|
|
140
|
-
getFeatureGroups: $,
|
|
141
|
-
loadCurrentSubscription: G,
|
|
142
|
-
refresh: H
|
|
143
|
-
} = te(m.defaultInterval), {
|
|
144
|
-
checkout: z,
|
|
145
|
-
isCheckingOut: E
|
|
146
|
-
} = se({
|
|
147
|
-
currentSubscription: f,
|
|
148
|
-
refreshCurrentSubscription: G
|
|
149
|
-
});
|
|
150
|
-
function K(q) {
|
|
151
|
-
return q === 1 ? "适合团队协作与更高频使用" : "适合个人和轻量团队使用";
|
|
152
|
-
}
|
|
153
|
-
return T(() => {
|
|
154
|
-
H();
|
|
155
|
-
}), (q, d) => {
|
|
156
|
-
const O = M("motion-slide-top");
|
|
157
|
-
return s(), i("section", ne, [n("div", le, [t(k).length > 1 ? (s(), i("div", ae, [(s(!0), i(c, null, u(t(k), (e) => (s(), i("button", {
|
|
158
|
-
key: e.value,
|
|
159
|
-
type: "button",
|
|
160
|
-
class: v(["PricingPlans__toggleItem", {
|
|
161
|
-
"is-active": t(h) === e.value
|
|
162
|
-
}]),
|
|
163
|
-
onClick: (y) => t(F)(e.value)
|
|
164
|
-
}, [n("span", null, l(e.label), 1), e.badge ? (s(), i("span", oe, l(e.badge), 1)) : o("", !0)], 10, re))), 128))])) : o("", !0), a.note ? (s(), i("p", ce, l(a.note), 1)) : o("", !0)]), j((s(), D(t(Y), {
|
|
165
|
-
loading: t(p),
|
|
166
|
-
tip: "数据加载中",
|
|
167
|
-
class: "PricingPlans__spin"
|
|
168
|
-
}, {
|
|
169
|
-
default: g(() => [t(_).length ? (s(), i("div", ue, [(s(!0), i(c, null, u(t(_), (e, y) => (s(), i("article", {
|
|
170
|
-
key: e.id,
|
|
171
|
-
class: v(["PricingPlans__card", {
|
|
172
|
-
"is-recommended": t(C)(e),
|
|
173
|
-
"is-current": t(b)(e)
|
|
174
|
-
}])
|
|
175
|
-
}, [n("div", _e, [(s(!0), i(c, null, u(t(A)(e), (r) => (s(), i("span", {
|
|
176
|
-
key: r.type,
|
|
177
|
-
class: v(["PricingPlans__badge", `is-${r.type}`])
|
|
178
|
-
}, l(r.label), 3))), 128))]), n("div", de, [n("h2", null, l(e.name), 1), n("p", null, l(e.description || K(y)), 1)]), n("div", ge, [t(B)(e) ? (s(), i("span", Pe, " ¥" + l(t(B)(e)), 1)) : o("", !0), d[0] || (d[0] = n("span", {
|
|
179
|
-
class: "PricingPlans__currency"
|
|
180
|
-
}, "¥", -1)), n("span", me, l(t(x)(e)), 1), n("span", fe, l(t(N)(e)), 1)]), t(I)(e) ? (s(), i("p", pe, l(t(I)(e)), 1)) : o("", !0), n("p", ye, l(t(V)(e, y)), 1), P(t(Z), {
|
|
181
|
-
long: "",
|
|
182
|
-
size: "large",
|
|
183
|
-
class: "PricingPlans__button",
|
|
184
|
-
type: t(C)(e) ? "primary" : "outline",
|
|
185
|
-
loading: t(E)(e),
|
|
186
|
-
disabled: !e.selectedPrice || t(b)(e),
|
|
187
|
-
onClick: (r) => t(z)(e)
|
|
188
|
-
}, {
|
|
189
|
-
default: g(() => [J(l(t(Q)(e)), 1)]),
|
|
190
|
-
_: 2
|
|
191
|
-
}, 1032, ["type", "loading", "disabled", "onClick"]), d[1] || (d[1] = n("div", {
|
|
192
|
-
class: "PricingPlans__divider"
|
|
193
|
-
}, null, -1)), n("div", ve, [(s(!0), i(c, null, u(t($)(e.features), (r) => (s(), i("section", {
|
|
194
|
-
key: r.title,
|
|
195
|
-
class: "PricingPlans__featureGroup"
|
|
196
|
-
}, [n("h3", null, l(r.title), 1), n("ul", he, [(s(!0), i(c, null, u(r.items, (w) => (s(), i("li", {
|
|
197
|
-
key: w.title
|
|
198
|
-
}, [P(t(ee), {
|
|
199
|
-
icon: "mingcute:check-circle-fill",
|
|
200
|
-
class: "PricingPlans__featureIcon"
|
|
201
|
-
}), n("span", null, l(w.title), 1)]))), 128))])]))), 128))])], 2))), 128))])) : t(p) ? o("", !0) : (s(), i("div", ke, " 当前暂无可订阅方案 "))]),
|
|
202
|
-
_: 1
|
|
203
|
-
}, 8, ["loading"])), [[O]])]);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}), Ae = /* @__PURE__ */ S(be, [["__scopeId", "data-v-68d43e94"]]);
|
|
207
|
-
export {
|
|
208
|
-
Ne as P,
|
|
209
|
-
Ae as a
|
|
210
|
-
};
|