@huyooo/ui 0.15.1 → 0.15.2

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.
@@ -2,15 +2,15 @@
2
2
  import "./index-D3Kp6R4z.js";
3
3
  import "./apiClients-DT7o0IpO.js";
4
4
  /* empty css */
5
- import { defineComponent as z, computed as k, onMounted as te, onUnmounted as Pe, openBlock as n, createElementBlock as s, createElementVNode as i, unref as e, createBlock as H, toDisplayString as r, createVNode as v, withCtx as b, createTextVNode as R, resolveDirective as me, withDirectives as fe, normalizeClass as L, Fragment as w, renderList as C, createCommentVNode as p } from "vue";
6
- import { Spin as ne, Button as A, Message as Z } from "@arco-design/web-vue";
5
+ import { defineComponent as z, computed as k, onMounted as te, onUnmounted as Pe, openBlock as t, createElementBlock as s, createElementVNode as i, unref as e, createBlock as H, toDisplayString as r, createVNode as v, withCtx as b, createTextVNode as L, resolveDirective as me, withDirectives as fe, normalizeClass as B, Fragment as I, renderList as w, createCommentVNode as p } from "vue";
6
+ import { Spin as ne, Button as R, Message as Z } from "@arco-design/web-vue";
7
7
  import { useRoute as pe, useRouter as ve } from "vue-router";
8
8
  import { b as ye } from "./PaySubscriptions-D3g1OhiA.js";
9
9
  import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { L as he, a as ke } from "./LandingPageFAQ-CZJXvor9.js";
11
11
  import { L as be } from "./LandingPageSectionHeader-D_74W4My.js";
12
12
  import { Icon as ee } from "@iconify/vue";
13
- import { u as Te, a as Ie } from "./useSubscriptionCheckout-CfFdAhTR.js";
13
+ import { u as Te, a as Ie } from "./useSubscriptionCheckout-BjPiHSjA.js";
14
14
  import { u as we } from "./useEnsureAuthenticated-BEKhtQAl.js";
15
15
  const pt = "/Pay/Return";
16
16
  function V(a) {
@@ -62,15 +62,15 @@ const Be = {
62
62
  const {
63
63
  phase: g,
64
64
  message: y,
65
- checking: F,
66
- confirmPayment: D,
67
- stopPolling: S,
68
- verifyNow: N
69
- } = ye(_), $ = k(() => g.value === "success" ? "支付成功" : g.value === "failed" ? "支付未完成" : "正在确认支付");
70
- function B() {
65
+ checking: q,
66
+ confirmPayment: A,
67
+ stopPolling: F,
68
+ verifyNow: S
69
+ } = ye(_), D = k(() => g.value === "success" ? "支付成功" : g.value === "failed" ? "支付未完成" : "正在确认支付");
70
+ function C() {
71
71
  c.replace(_());
72
72
  }
73
- async function E() {
73
+ async function N() {
74
74
  const {
75
75
  scene: m,
76
76
  orderId: o
@@ -80,7 +80,7 @@ const Be = {
80
80
  return;
81
81
  }
82
82
  try {
83
- const f = await N(m, o);
83
+ const f = await S(m, o);
84
84
  if (f.success) {
85
85
  g.value = "success", y.value = f.message || "支付成功", window.setTimeout(() => {
86
86
  c.replace(_());
@@ -107,27 +107,27 @@ const Be = {
107
107
  }, 1200);
108
108
  return;
109
109
  }
110
- D(m, o);
111
- }), Pe(S), (m, o) => (n(), s("div", Be, [i("div", Le, [e(g) === "loading" ? (n(), H(e(ne), {
110
+ A(m, o);
111
+ }), Pe(F), (m, o) => (t(), s("div", Be, [i("div", Le, [e(g) === "loading" ? (t(), H(e(ne), {
112
112
  key: 0,
113
113
  size: 36
114
- })) : e(g) === "success" ? (n(), s("div", Re, "✓")) : (n(), s("div", Ae, "!")), i("h1", null, r($.value), 1), i("p", null, r(e(y)), 1), e(g) === "loading" ? (n(), s("div", De, [v(e(A), {
115
- loading: e(F),
114
+ })) : e(g) === "success" ? (t(), s("div", Re, "✓")) : (t(), s("div", Ae, "!")), i("h1", null, r(D.value), 1), i("p", null, r(e(y)), 1), e(g) === "loading" ? (t(), s("div", De, [v(e(R), {
115
+ loading: e(q),
116
116
  type: "primary",
117
- onClick: E
117
+ onClick: N
118
118
  }, {
119
- default: b(() => [...o[0] || (o[0] = [R(" 我已完成支付 ", -1)])]),
119
+ default: b(() => [...o[0] || (o[0] = [L(" 我已完成支付 ", -1)])]),
120
120
  _: 1
121
- }, 8, ["loading"]), v(e(A), {
122
- onClick: B
121
+ }, 8, ["loading"]), v(e(R), {
122
+ onClick: C
123
123
  }, {
124
- default: b(() => [...o[1] || (o[1] = [R("返回", -1)])]),
124
+ default: b(() => [...o[1] || (o[1] = [L("返回", -1)])]),
125
125
  _: 1
126
- })])) : (n(), s("div", $e, [v(e(A), {
126
+ })])) : (t(), s("div", $e, [v(e(R), {
127
127
  type: "primary",
128
- onClick: B
128
+ onClick: C
129
129
  }, {
130
- default: b(() => [...o[2] || (o[2] = [R("返回", -1)])]),
130
+ default: b(() => [...o[2] || (o[2] = [L("返回", -1)])]),
131
131
  _: 1
132
132
  })]))])]));
133
133
  }
@@ -173,7 +173,7 @@ const Be = {
173
173
  question: "使用订阅服务有什么限制?",
174
174
  answer: "请按正常业务场景使用服务,禁止共享、转售订阅或用于违法违规场景。严重滥用可能导致服务受限或账户终止。"
175
175
  }], l = a, c = k(() => l.faqItems ?? u);
176
- return (_, g) => (n(), H(he, {
176
+ return (_, g) => (t(), H(he, {
177
177
  class: "PricingFAQ"
178
178
  }, {
179
179
  BlockHeader: b(() => [v(be, {
@@ -257,13 +257,13 @@ const Be = {
257
257
  currentSubscription: _,
258
258
  currentLoading: g,
259
259
  listLoading: y,
260
- billingInterval: F,
261
- billingIntervalTabs: D,
262
- setBillingInterval: S,
263
- currentTrial: N,
264
- isCurrentPlan: $,
265
- isRecommendedPlan: B,
266
- isFreePlan: E,
260
+ billingInterval: q,
261
+ billingIntervalTabs: A,
262
+ setBillingInterval: F,
263
+ currentTrial: S,
264
+ isCurrentPlan: D,
265
+ isRecommendedPlan: C,
266
+ isFreePlan: N,
267
267
  isPlanActionDisabled: m,
268
268
  getDisplayPrice: o,
269
269
  getDisplayOriginalPrice: f,
@@ -276,18 +276,17 @@ const Be = {
276
276
  loadCurrentSubscription: W,
277
277
  refresh: ae
278
278
  } = Te(u.defaultInterval), T = k(() => {
279
- var d;
280
279
  if (!_.value)
281
- for (const P of l.value) {
282
- const I = P.prices.find((t) => t.type === "free");
283
- if (I)
280
+ for (const d of l.value) {
281
+ const P = d.prices.find((M) => M.type === "free");
282
+ if (P)
284
283
  return {
285
- ...P,
286
- features: (d = I.features) != null && d.length ? I.features : P.features,
287
- selectedPrice: I
284
+ ...d,
285
+ features: P.features ?? [],
286
+ selectedPrice: P
288
287
  };
289
288
  }
290
- }), q = k(() => c.value.filter((d) => !E(d))), j = k(() => !!localStorage.getItem("jwtToken")), x = k(() => !!N.value), M = k(() => j.value && g.value && !x.value), Y = k(() => x.value || M.value), {
289
+ }), $ = k(() => c.value.filter((d) => !N(d))), j = k(() => !!localStorage.getItem("jwtToken")), E = k(() => !!S.value), x = k(() => j.value && g.value && !E.value), Y = k(() => E.value || x.value), {
291
290
  checkout: le,
292
291
  isCheckingOut: oe
293
292
  } = Ie({
@@ -306,7 +305,7 @@ const Be = {
306
305
  return (d.description || O(d, 0)).replace(/^\s*\d+\s*天(?:免费)?体验[,,、\s]*/, "").replace(/^\s*免费体验[,,、\s]*/, "").trim();
307
306
  }
308
307
  function _e() {
309
- return M.value ? "权益加载中" : x.value ? "正在体验当前权益" : "立即体验";
308
+ return x.value ? "权益加载中" : E.value ? "正在体验当前权益" : "立即体验";
310
309
  }
311
310
  async function ge() {
312
311
  if (!Y.value) {
@@ -320,81 +319,81 @@ const Be = {
320
319
  return te(() => {
321
320
  ae();
322
321
  }), (d, P) => {
323
- const I = me("motion-slide-top");
324
- return n(), s("section", Se, [fe((n(), H(e(ne), {
322
+ const M = me("motion-slide-top");
323
+ return t(), s("section", Se, [fe((t(), H(e(ne), {
325
324
  loading: e(y),
326
325
  tip: "数据加载中",
327
326
  class: "PricingPlans__spin"
328
327
  }, {
329
- default: b(() => [T.value ? (n(), s("article", {
328
+ default: b(() => [T.value ? (t(), s("article", {
330
329
  key: 0,
331
- class: L(["PricingPlans__trial", {
332
- "is-current": e($)(T.value)
330
+ class: B(["PricingPlans__trial", {
331
+ "is-current": e(D)(T.value)
333
332
  }])
334
- }, [i("div", Ne, [i("div", Ee, [i("h2", null, r(T.value.name), 1), i("p", null, r(de(T.value)), 1), J(T.value).length ? (n(), s("ul", xe, [(n(!0), s(w, null, C(J(T.value), (t) => (n(), s("li", {
335
- key: t.title
333
+ }, [i("div", Ne, [i("div", Ee, [i("h2", null, r(T.value.name), 1), i("p", null, r(de(T.value)), 1), J(T.value).length ? (t(), s("ul", xe, [(t(!0), s(I, null, w(J(T.value), (n) => (t(), s("li", {
334
+ key: n.title
336
335
  }, [v(e(ee), {
337
336
  icon: "mingcute:check-circle-fill",
338
337
  class: "PricingPlans__trialFeatureIcon"
339
- }), i("span", null, r(t.title), 1)]))), 128))])) : p("", !0)]), i("div", Me, [v(e(A), {
338
+ }), i("span", null, r(n.title), 1)]))), 128))])) : p("", !0)]), i("div", Me, [v(e(R), {
340
339
  size: "large",
341
340
  class: "PricingPlans__trialButton",
342
- loading: M.value,
341
+ loading: x.value,
343
342
  disabled: Y.value,
344
343
  onClick: ge
345
344
  }, {
346
- default: b(() => [R(r(_e()), 1)]),
345
+ default: b(() => [L(r(_e()), 1)]),
347
346
  _: 1
348
- }, 8, ["loading", "disabled"])])])], 2)) : p("", !0), q.value.length ? (n(), s("div", Qe, [e(D).length > 1 ? (n(), s("div", Ve, [(n(!0), s(w, null, C(e(D), (t) => (n(), s("button", {
349
- key: t.value,
347
+ }, 8, ["loading", "disabled"])])])], 2)) : p("", !0), $.value.length ? (t(), s("div", Qe, [e(A).length > 1 ? (t(), s("div", Ve, [(t(!0), s(I, null, w(e(A), (n) => (t(), s("button", {
348
+ key: n.value,
350
349
  type: "button",
351
- class: L(["PricingPlans__toggleItem", {
352
- "is-active": e(F) === t.value
350
+ class: B(["PricingPlans__toggleItem", {
351
+ "is-active": e(q) === n.value
353
352
  }]),
354
- onClick: (Q) => e(S)(t.value)
355
- }, [i("span", null, r(t.label), 1), t.badge ? (n(), s("span", He, r(t.badge), 1)) : p("", !0)], 10, ze))), 128))])) : p("", !0), a.note ? (n(), s("p", Ge, r(a.note), 1)) : p("", !0)])) : p("", !0), q.value.length ? (n(), s("div", {
353
+ onClick: (Q) => e(F)(n.value)
354
+ }, [i("span", null, r(n.label), 1), n.badge ? (t(), s("span", He, r(n.badge), 1)) : p("", !0)], 10, ze))), 128))])) : p("", !0), a.note ? (t(), s("p", Ge, r(a.note), 1)) : p("", !0)])) : p("", !0), $.value.length ? (t(), s("div", {
356
355
  key: 2,
357
- class: L(["PricingPlans__grid", {
358
- "PricingPlans__grid--compact": q.value.length <= 2
356
+ class: B(["PricingPlans__grid", {
357
+ "PricingPlans__grid--compact": $.value.length <= 2
359
358
  }])
360
- }, [(n(!0), s(w, null, C(q.value, (t, Q) => (n(), s("article", {
361
- key: t.id,
362
- class: L(["PricingPlans__card", {
363
- "is-recommended": e(B)(t),
364
- "is-current": e($)(t)
359
+ }, [(t(!0), s(I, null, w($.value, (n, Q) => (t(), s("article", {
360
+ key: n.id,
361
+ class: B(["PricingPlans__card", {
362
+ "is-recommended": e(C)(n),
363
+ "is-current": e(D)(n)
365
364
  }])
366
- }, [i("div", Ke, [(n(!0), s(w, null, C(e(ie)(t), (h) => (n(), s("span", {
365
+ }, [i("div", Ke, [(t(!0), s(I, null, w(e(ie)(n), (h) => (t(), s("span", {
367
366
  key: h.type,
368
- class: L(["PricingPlans__badge", `is-${h.type}`])
369
- }, r(h.label), 3))), 128))]), i("div", Oe, [i("h2", null, r(t.name), 1), i("p", null, r(t.description || ue(Q)), 1)]), i("div", Ue, [e(f)(t) ? (n(), s("span", We, " ¥" + r(e(f)(t)), 1)) : p("", !0), P[0] || (P[0] = i("span", {
367
+ class: B(["PricingPlans__badge", `is-${h.type}`])
368
+ }, r(h.label), 3))), 128))]), i("div", Oe, [i("h2", null, r(n.name), 1), i("p", null, r(n.description || ue(Q)), 1)]), i("div", Ue, [e(f)(n) ? (t(), s("span", We, " ¥" + r(e(f)(n)), 1)) : p("", !0), P[0] || (P[0] = i("span", {
370
369
  class: "PricingPlans__currency"
371
- }, "¥", -1)), i("span", je, r(e(o)(t)), 1), i("span", Ye, r(e(se)(t)), 1)]), e(K)(t) ? (n(), s("p", Je, r(e(K)(t)), 1)) : p("", !0), i("p", Xe, r(e(O)(t, Q)), 1), v(e(A), {
370
+ }, "¥", -1)), i("span", je, r(e(o)(n)), 1), i("span", Ye, r(e(se)(n)), 1)]), e(K)(n) ? (t(), s("p", Je, r(e(K)(n)), 1)) : p("", !0), i("p", Xe, r(e(O)(n, Q)), 1), v(e(R), {
372
371
  long: "",
373
372
  size: "large",
374
373
  class: "PricingPlans__button",
375
- type: e(B)(t) ? "primary" : "outline",
376
- loading: e(oe)(t),
377
- disabled: e(m)(t),
378
- onClick: (h) => e(le)(t)
374
+ type: e(C)(n) ? "primary" : "outline",
375
+ loading: e(oe)(n),
376
+ disabled: e(m)(n),
377
+ onClick: (h) => e(le)(n)
379
378
  }, {
380
- default: b(() => [R(r(e(re)(t)), 1)]),
379
+ default: b(() => [L(r(e(re)(n)), 1)]),
381
380
  _: 2
382
381
  }, 1032, ["type", "loading", "disabled", "onClick"]), P[1] || (P[1] = i("div", {
383
382
  class: "PricingPlans__divider"
384
- }, null, -1)), i("div", Ze, [(n(!0), s(w, null, C(e(U)(t.features), (h) => (n(), s("section", {
383
+ }, null, -1)), i("div", Ze, [(t(!0), s(I, null, w(e(U)(n.features), (h) => (t(), s("section", {
385
384
  key: h.title,
386
385
  class: "PricingPlans__featureGroup"
387
- }, [i("h3", null, r(h.title), 1), i("ul", et, [(n(!0), s(w, null, C(h.items, (X) => (n(), s("li", {
386
+ }, [i("h3", null, r(h.title), 1), i("ul", et, [(t(!0), s(I, null, w(h.items, (X) => (t(), s("li", {
388
387
  key: X.title
389
388
  }, [v(e(ee), {
390
389
  icon: "mingcute:check-circle-fill",
391
390
  class: "PricingPlans__featureIcon"
392
- }), i("span", null, r(X.title), 1)]))), 128))])]))), 128))])], 2))), 128))], 2)) : !T.value && !e(y) ? (n(), s("div", tt, " 当前暂无可订阅方案 ")) : p("", !0)]),
391
+ }), i("span", null, r(X.title), 1)]))), 128))])]))), 128))])], 2))), 128))], 2)) : !T.value && !e(y) ? (t(), s("div", tt, " 当前暂无可订阅方案 ")) : p("", !0)]),
393
392
  _: 1
394
- }, 8, ["loading"])), [[I]])]);
393
+ }, 8, ["loading"])), [[M]])]);
395
394
  };
396
395
  }
397
- }), ht = /* @__PURE__ */ G(nt, [["__scopeId", "data-v-6ca2e434"]]);
396
+ }), ht = /* @__PURE__ */ G(nt, [["__scopeId", "data-v-8cdab97c"]]);
398
397
  export {
399
398
  pt as P,
400
399
  vt as a,
@@ -25,12 +25,12 @@ export interface BillingProduct {
25
25
  id: string;
26
26
  name: string;
27
27
  description?: string;
28
- features: BillingProductFeature[];
29
28
  metadata?: Record<string, unknown>;
30
29
  displayOrder?: number;
31
30
  prices: BillingPrice[];
32
31
  }
33
32
  export interface BillingPlan extends BillingProduct {
33
+ features: BillingProductFeature[];
34
34
  selectedPrice: BillingPrice;
35
35
  }
36
36
  export interface BillingSubscription {
@@ -96,15 +96,6 @@ export declare function useBillingPlans(defaultInterval?: BillingInterval | Bill
96
96
  id: string;
97
97
  name: string;
98
98
  description?: string | undefined;
99
- features: {
100
- key: string;
101
- name: string;
102
- description?: string | undefined;
103
- type: "boolean" | "quota" | "unlimited";
104
- value?: boolean | number | undefined;
105
- highlight?: boolean | undefined;
106
- quotaPeriod?: BillingQuotaPeriod | undefined;
107
- }[];
108
99
  metadata?: Record<string, unknown> | undefined;
109
100
  displayOrder?: number | undefined;
110
101
  prices: {
@@ -130,15 +121,6 @@ export declare function useBillingPlans(defaultInterval?: BillingInterval | Bill
130
121
  id: string;
131
122
  name: string;
132
123
  description?: string | undefined;
133
- features: {
134
- key: string;
135
- name: string;
136
- description?: string | undefined;
137
- type: "boolean" | "quota" | "unlimited";
138
- value?: boolean | number | undefined;
139
- highlight?: boolean | undefined;
140
- quotaPeriod?: BillingQuotaPeriod | undefined;
141
- }[];
142
124
  metadata?: Record<string, unknown> | undefined;
143
125
  displayOrder?: number | undefined;
144
126
  prices: {
@@ -10,7 +10,7 @@ import { u as E } from "./useTableHandle-TDJa_Czn.js";
10
10
  import { f as k, a as _, g as I, u as M, b as B, c as w, w as F } from "./useRoutePermission-v4_0B-aO.js";
11
11
  import { u as v } from "./useUploadCos-CvG6EL5Q.js";
12
12
  import { u as G } from "./useUserMenu-ClPBlvaM.js";
13
- import { u as H, a as V } from "./useSubscriptionCheckout-CfFdAhTR.js";
13
+ import { u as H, a as V } from "./useSubscriptionCheckout-BjPiHSjA.js";
14
14
  import { I as j, P as q, R as z, c as J, u as Q, a as W, b as X } from "./useBillingStatusOptions-CAsu1hrf.js";
15
15
  export {
16
16
  j as INVOICE_STATUS_FALLBACK,
package/dist/main.js CHANGED
@@ -13,7 +13,7 @@ import { u as Z3 } from "./useTableHandle-TDJa_Czn.js";
13
13
  import { f as U3, a as H3, g as E3, u as k3, b as S3, c as A3, w as G3 } from "./useRoutePermission-v4_0B-aO.js";
14
14
  import { u as D3 } from "./useUploadCos-CvG6EL5Q.js";
15
15
  import { u as B3 } from "./useUserMenu-ClPBlvaM.js";
16
- import { u as T3, a as I3 } from "./useSubscriptionCheckout-CfFdAhTR.js";
16
+ import { u as T3, a as I3 } from "./useSubscriptionCheckout-BjPiHSjA.js";
17
17
  import { I as N3, P as R3, R as j3, c as z3, u as W3, a as q3, b as K3 } from "./useBillingStatusOptions-CAsu1hrf.js";
18
18
  import { A as Y3, B as J3, E as X3, a as e4, b as t4, O as o4, P as a4, c as s4, _ as i4, d as n4, S as r4, e as c4, u as C4 } from "./AuthkitAppSetting-Ds7mYFV5.js";
19
19
  import { A as d4, a as p4, b as f4, c as u4, d as h4, e as _4, f as g4, _ as L4, g as m4, O as F4, h as w4, P as y4, i as M4, j as x4, k as v4, R as Z4, S as V4, l as U4, m as H4, n as E4, o as k4, p as S4, q as A4 } from "./AuthkitGithubBinding-LVDS1PNQ.js";
@@ -34,7 +34,7 @@ import { C as H7, a as E7 } from "./CollapseItem-DUzZA6tx.js";
34
34
  import { C as S7, E as A7 } from "./CustomTable-BT-cnhLR.js";
35
35
  import { M as b7, a as D7 } from "./Menu-Cy2ZPeaz.js";
36
36
  import { P as B7, u as O7, a as T7, b as I7, v as $7 } from "./PaySubscriptions-D3g1OhiA.js";
37
- import { P as R7, a as j7, b as z7, c as W7, p as q7, r as K7 } from "./PricingPlans-ClKLdoVv.js";
37
+ import { P as R7, a as j7, b as z7, c as W7, p as q7, r as K7 } from "./PricingPlans-DXea7rl0.js";
38
38
  import { R as Y7 } from "./ReferrerReferees-BxmZ1w_L.js";
39
39
  import { _ as X7 } from "./Upload.vue_vue_type_script_setup_true_lang-DLKSHzxG.js";
40
40
  import { U as t5, a as o5, b as a5, c as s5, d as i5, _ as n5, e as r5, f as c5, g as C5, h as l5, i as d5, j as p5, k as f5, l as u5, m as h5 } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-C7mV8kGe.js";
package/dist/pay.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { P as e, u as t, a as n, b as u, v as r } from "./PaySubscriptions-D3g1OhiA.js";
2
- import { P, a as o, b as S, c as p, p as A, r as m } from "./PricingPlans-ClKLdoVv.js";
3
- import { u as c, a as l } from "./useSubscriptionCheckout-CfFdAhTR.js";
2
+ import { P, a as o, b as S, c as p, p as A, r as m } from "./PricingPlans-DXea7rl0.js";
3
+ import { u as c, a as l } from "./useSubscriptionCheckout-BjPiHSjA.js";
4
4
  import { I as g, P as y, R as _, c as b, u as f, a as B, b as C } from "./useBillingStatusOptions-CAsu1hrf.js";
5
5
  export {
6
6
  g as INVOICE_STATUS_FALLBACK,