@huyooo/ui 2.1.15 → 2.1.18

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,17 +2,17 @@
2
2
  import "./userMenuModal-D-nDaYqM.js";
3
3
  import "./apiClients-CWSwNzGk.js";
4
4
  /* empty css */
5
- import { defineComponent as V, computed as w, onMounted as J, onUnmounted as oe, openBlock as t, createElementBlock as n, createElementVNode as i, unref as e, createBlock as z, toDisplayString as a, createVNode as p, withCtx as h, createTextVNode as B, resolveDirective as ce, withDirectives as ue, normalizeClass as I, Fragment as C, renderList as T, createCommentVNode as P } from "vue";
6
- import { Spin as X, Button as R, Message as de } from "@arco-design/web-vue";
5
+ import { defineComponent as Q, computed as w, onMounted as Y, onUnmounted as oe, openBlock as t, createElementBlock as n, createElementVNode as i, unref as e, createBlock as V, toDisplayString as a, createVNode as p, withCtx as h, createTextVNode as B, resolveDirective as ce, withDirectives as ue, normalizeClass as I, Fragment as C, renderList as T, createCommentVNode as f } from "vue";
6
+ import { Spin as J, Button as R, Message as de } from "@arco-design/web-vue";
7
7
  import { useRoute as _e, useRouter as ge } from "vue-router";
8
8
  import { a as Pe } from "./PaySubscriptions-pEZtjp1g.js";
9
- import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { L as me, a as fe, b as pe } from "./LandingPageSectionHeader-3hiuw6G0.js";
11
- import { Icon as Y } from "@iconify/vue";
11
+ import { Icon as j } from "@iconify/vue";
12
12
  import { u as ve, a as ye } from "./useSubscriptionCheckout-CZZLk_1d.js";
13
13
  import { u as he } from "./useEnsureAuthenticated-RZ1DflLz.js";
14
- const _t = "/Pay/Return";
15
- function Q(r) {
14
+ const dt = "/Pay/Return";
15
+ function M(r) {
16
16
  const d = typeof r.scene == "string" ? r.scene : null, o = typeof r.orderId == "string" ? r.orderId : null, c = typeof r.returnTo == "string" ? r.returnTo.trim() : null, g = c != null && c.startsWith("/") && !c.startsWith("//") ? c : null;
17
17
  return d !== "subscription" && d !== "recharge" && d !== "agreement" ? {
18
18
  scene: null,
@@ -27,7 +27,7 @@ function Q(r) {
27
27
  function ke(r, d) {
28
28
  const {
29
29
  returnTo: o
30
- } = Q(r);
30
+ } = M(r);
31
31
  return o || d;
32
32
  }
33
33
  const be = {
@@ -46,7 +46,7 @@ const be = {
46
46
  }, Be = {
47
47
  key: 4,
48
48
  class: "payment-return-actions"
49
- }, Re = /* @__PURE__ */ V({
49
+ }, Re = /* @__PURE__ */ Q({
50
50
  __name: "PaymentReturnPage",
51
51
  props: {
52
52
  defaultReturnTo: {
@@ -71,14 +71,14 @@ const be = {
71
71
  }
72
72
  async function N() {
73
73
  const {
74
- scene: m,
74
+ scene: P,
75
75
  orderId: l
76
- } = Q(o.query);
77
- if (!m || !l) {
76
+ } = M(o.query);
77
+ if (!P || !l) {
78
78
  de.error("支付参数无效");
79
79
  return;
80
80
  }
81
- const k = await D(m, l);
81
+ const k = await D(P, l);
82
82
  if (k.error) {
83
83
  u.value = "failed", v.value = k.message || "确认支付失败";
84
84
  return;
@@ -91,23 +91,23 @@ const be = {
91
91
  }
92
92
  v.value = k.message || "等待支付确认...";
93
93
  }
94
- return J(() => {
94
+ return Y(() => {
95
95
  const {
96
- scene: m,
96
+ scene: P,
97
97
  orderId: l
98
- } = Q(o.query);
99
- if (!m || !l) {
98
+ } = M(o.query);
99
+ if (!P || !l) {
100
100
  u.value = "failed", v.value = "缺少支付回跳参数";
101
101
  return;
102
102
  }
103
- if (m === "agreement") {
103
+ if (P === "agreement") {
104
104
  u.value = "success", v.value = "签约流程已完成,正在返回...", window.setTimeout(() => {
105
105
  c.replace(g());
106
106
  }, 1200);
107
107
  return;
108
108
  }
109
- A(m, l);
110
- }), oe(F), (m, l) => (t(), n("div", be, [i("div", Ie, [e(u) === "loading" ? (t(), z(e(X), {
109
+ A(P, l);
110
+ }), oe(F), (P, l) => (t(), n("div", be, [i("div", Ie, [e(u) === "loading" ? (t(), V(e(J), {
111
111
  key: 0,
112
112
  size: 36
113
113
  })) : e(u) === "success" ? (t(), n("div", Ce, "✓")) : (t(), n("div", Te, "!")), i("h1", null, a(S.value), 1), i("p", null, a(e(v)), 1), e(u) === "loading" ? (t(), n("div", we, [p(e(R), {
@@ -130,7 +130,7 @@ const be = {
130
130
  _: 1
131
131
  })]))])]));
132
132
  }
133
- }), gt = /* @__PURE__ */ H(Re, [["__scopeId", "data-v-65b534f9"]]), Le = /* @__PURE__ */ V({
133
+ }), _t = /* @__PURE__ */ z(Re, [["__scopeId", "data-v-65b534f9"]]), Le = /* @__PURE__ */ Q({
134
134
  __name: "PricingFAQ",
135
135
  props: {
136
136
  title: {
@@ -172,7 +172,7 @@ const be = {
172
172
  question: "使用订阅服务有什么限制?",
173
173
  answer: "请按正常业务场景使用服务,禁止共享、转售订阅或用于违法违规场景。严重滥用可能导致服务受限或账户终止。"
174
174
  }], o = r, c = w(() => o.faqItems ?? d);
175
- return (g, u) => (t(), z(me, {
175
+ return (g, u) => (t(), V(me, {
176
176
  class: "PricingFAQ"
177
177
  }, {
178
178
  BlockHeader: h(() => [p(pe, {
@@ -186,7 +186,7 @@ const be = {
186
186
  _: 1
187
187
  }));
188
188
  }
189
- }), Pt = /* @__PURE__ */ H(Le, [["__scopeId", "data-v-fcab2f05"]]), Se = {
189
+ }), gt = /* @__PURE__ */ z(Le, [["__scopeId", "data-v-fcab2f05"]]), Se = {
190
190
  class: "PricingPlans"
191
191
  }, $e = {
192
192
  class: "PricingPlans__trialMain"
@@ -218,30 +218,26 @@ const be = {
218
218
  }, Ve = {
219
219
  class: "PricingPlans__badgeRow"
220
220
  }, ze = {
221
- class: "PricingPlans__header"
221
+ class: "PricingPlans__offer"
222
222
  }, He = {
223
- class: "PricingPlans__price"
223
+ class: "PricingPlans__header"
224
224
  }, Ge = {
225
+ class: "PricingPlans__price"
226
+ }, Ke = {
225
227
  key: 0,
226
228
  class: "PricingPlans__originalPrice"
227
- }, Ke = {
228
- class: "PricingPlans__amount"
229
229
  }, Oe = {
230
- class: "PricingPlans__cycle"
230
+ class: "PricingPlans__amount"
231
231
  }, Ue = {
232
- key: 0,
233
- class: "PricingPlans__promotion"
232
+ class: "PricingPlans__cycle"
234
233
  }, We = {
235
- key: 1,
236
- class: "PricingPlans__summary"
237
- }, je = {
238
234
  class: "PricingPlans__featureGroups"
239
- }, Ye = {
235
+ }, je = {
240
236
  class: "PricingPlans__features"
241
- }, Je = {
237
+ }, Ye = {
242
238
  key: 3,
243
239
  class: "PricingPlans__empty"
244
- }, Xe = /* @__PURE__ */ V({
240
+ }, Je = /* @__PURE__ */ Q({
245
241
  __name: "PricingPlans",
246
242
  props: {
247
243
  appName: {
@@ -268,52 +264,52 @@ const be = {
268
264
  isRecommendedPlan: S,
269
265
  isFreePlan: $,
270
266
  isPlanActionDisabled: N,
271
- getDisplayPrice: m,
267
+ getDisplayPrice: P,
272
268
  getDisplayOriginalPrice: l,
273
269
  getDisplayCycle: k,
274
- getPromotionLabel: G,
275
- getBadgeLabels: Z,
276
- getButtonLabel: ee,
277
- getPlanSummary: K,
278
- getFeatureGroups: O,
279
- loadCurrentSubscription: U,
270
+ getPromotionLabel: H,
271
+ getBadgeLabels: X,
272
+ getButtonLabel: Z,
273
+ getPlanSummary: ee,
274
+ getFeatureGroups: G,
275
+ loadCurrentSubscription: K,
280
276
  refresh: te
281
277
  } = ve(d.defaultInterval), b = w(() => {
282
278
  if (!g.value)
283
- for (const f of o.value) {
284
- const _ = f.prices.find((x) => x.type === "free");
279
+ for (const m of o.value) {
280
+ const _ = m.prices.find((x) => x.type === "free");
285
281
  if (_)
286
282
  return {
287
- ...f,
283
+ ...m,
288
284
  features: _.features ?? [],
289
285
  selectedPrice: _
290
286
  };
291
287
  }
292
- }), q = w(() => c.value.filter((f) => !$(f))), ne = w(() => !!localStorage.getItem("jwtToken")), W = w(() => !!F.value), {
288
+ }), q = w(() => c.value.filter((m) => !$(m))), ne = w(() => !!localStorage.getItem("jwtToken")), O = w(() => !!F.value), {
293
289
  checkout: se,
294
290
  isCheckingOut: ie
295
291
  } = ye({
296
292
  currentSubscription: g,
297
- refreshCurrentSubscription: U
293
+ refreshCurrentSubscription: K
298
294
  }), {
299
295
  ensureAuthenticated: re
300
296
  } = he();
301
- function ae(f) {
302
- return f === 1 ? "适合团队协作与更高频使用" : "适合个人和轻量团队使用";
297
+ function ae(m) {
298
+ return m === 1 ? "适合团队协作与更高频使用" : "适合个人和轻量团队使用";
303
299
  }
304
- function j(f) {
305
- return O(f.features).flatMap((_) => _.items).slice(0, 3);
300
+ function U(m) {
301
+ return G(m.features).flatMap((_) => _.items);
306
302
  }
307
303
  function le() {
308
304
  re(() => {
309
- U();
305
+ K();
310
306
  });
311
307
  }
312
- return J(() => {
308
+ return Y(() => {
313
309
  te();
314
- }), (f, _) => {
310
+ }), (m, _) => {
315
311
  const x = ce("motion-slide-top");
316
- return t(), n("section", Se, [ue((t(), z(e(X), {
312
+ return t(), n("section", Se, [ue((t(), V(e(J), {
317
313
  loading: e(u),
318
314
  tip: "数据加载中",
319
315
  class: "PricingPlans__spin"
@@ -321,44 +317,48 @@ const be = {
321
317
  default: h(() => [b.value ? (t(), n("article", {
322
318
  key: 0,
323
319
  class: I(["PricingPlans__trial", {
324
- "is-current": W.value
320
+ "is-current": O.value
325
321
  }])
326
- }, [i("div", $e, [i("div", qe, [i("h2", null, a(b.value.name), 1), i("p", null, a(b.value.description || e(K)(b.value, 0)), 1), j(b.value).length ? (t(), n("ul", Ae, [(t(!0), n(C, null, T(j(b.value), (s) => (t(), n("li", {
322
+ }, [i("div", $e, [i("div", qe, [i("h2", null, a(b.value.name), 1), i("p", null, a(b.value.description || e(ee)(b.value, 0)), 1), U(b.value).length ? (t(), n("ul", Ae, [(t(!0), n(C, null, T(U(b.value), (s) => (t(), n("li", {
327
323
  key: s.title
328
- }, [p(e(Y), {
324
+ }, [p(e(j), {
329
325
  icon: "mingcute:check-circle-fill",
330
326
  class: "PricingPlans__trialFeatureIcon"
331
- }), i("span", null, a(s.title), 1)]))), 128))])) : P("", !0)]), ne.value ? W.value ? (t(), n("div", De, " 已开通 ")) : P("", !0) : (t(), n("div", Fe, [p(e(R), {
327
+ }), i("span", null, a(s.title), 1)]))), 128))])) : f("", !0)]), ne.value ? O.value ? (t(), n("div", De, " 已开通 ")) : f("", !0) : (t(), n("div", Fe, [p(e(R), {
332
328
  size: "large",
333
329
  class: "PricingPlans__trialButton",
334
330
  onClick: le
335
331
  }, {
336
332
  default: h(() => [..._[0] || (_[0] = [B(" 免费注册 ", -1)])]),
337
333
  _: 1
338
- })]))])], 2)) : P("", !0), q.value.length ? (t(), n("div", Ne, [e(L).length > 1 ? (t(), n("div", xe, [(t(!0), n(C, null, T(e(L), (s) => (t(), n("button", {
334
+ })]))])], 2)) : f("", !0), q.value.length ? (t(), n("div", Ne, [e(L).length > 1 ? (t(), n("div", xe, [(t(!0), n(C, null, T(e(L), (s) => (t(), n("button", {
339
335
  key: s.value,
340
336
  type: "button",
341
337
  class: I(["PricingPlans__toggleItem", {
342
338
  "is-active": e(v) === s.value
343
339
  }]),
344
- onClick: (E) => e(A)(s.value)
345
- }, [i("span", null, a(s.label), 1), s.badge ? (t(), n("span", Me, a(s.badge), 1)) : P("", !0)], 10, Ee))), 128))])) : P("", !0), r.note ? (t(), n("p", Qe, a(r.note), 1)) : P("", !0)])) : P("", !0), q.value.length ? (t(), n("div", {
340
+ onClick: (W) => e(A)(s.value)
341
+ }, [i("span", null, a(s.label), 1), s.badge ? (t(), n("span", Me, a(s.badge), 1)) : f("", !0)], 10, Ee))), 128))])) : f("", !0), r.note ? (t(), n("p", Qe, a(r.note), 1)) : f("", !0)])) : f("", !0), q.value.length ? (t(), n("div", {
346
342
  key: 2,
347
343
  class: I(["PricingPlans__grid", {
348
344
  "PricingPlans__grid--compact": q.value.length <= 2
349
345
  }])
350
- }, [(t(!0), n(C, null, T(q.value, (s, E) => (t(), n("article", {
346
+ }, [(t(!0), n(C, null, T(q.value, (s, W) => (t(), n("article", {
351
347
  key: s.id,
352
348
  class: I(["PricingPlans__card", {
353
349
  "is-recommended": e(S)(s),
354
350
  "is-current": e(D)(s)
355
351
  }])
356
- }, [i("div", Ve, [(t(!0), n(C, null, T(e(Z)(s), (y) => (t(), n("span", {
352
+ }, [i("div", Ve, [(t(!0), n(C, null, T(e(X)(s), (y) => (t(), n("span", {
357
353
  key: y.type,
358
354
  class: I(["PricingPlans__badge", `is-${y.type}`])
359
- }, a(y.label), 3))), 128))]), i("div", ze, [i("h2", null, a(s.name), 1), i("p", null, a(s.description || ae(E)), 1)]), i("div", He, [e(l)(s) ? (t(), n("span", Ge, " ¥" + a(e(l)(s)), 1)) : P("", !0), _[1] || (_[1] = i("span", {
355
+ }, a(y.label), 3))), 128))]), i("div", ze, [i("div", He, [i("h2", null, a(s.name), 1), i("p", null, a(s.description || ae(W)), 1)]), i("div", Ge, [e(l)(s) ? (t(), n("span", Ke, " ¥" + a(e(l)(s)), 1)) : f("", !0), _[1] || (_[1] = i("span", {
360
356
  class: "PricingPlans__currency"
361
- }, "¥", -1)), i("span", Ke, a(e(m)(s)), 1), i("span", Oe, a(e(k)(s)), 1)]), e(G)(s) ? (t(), n("p", Ue, a(e(G)(s)), 1)) : P("", !0), s.description ? P("", !0) : (t(), n("p", We, a(e(K)(s, E)), 1)), p(e(R), {
357
+ }, "¥", -1)), i("span", Oe, a(e(P)(s)), 1), i("span", Ue, a(e(k)(s)), 1)]), i("p", {
358
+ class: I(["PricingPlans__promotion", {
359
+ "is-empty": !e(H)(s)
360
+ }])
361
+ }, a(e(H)(s) || " "), 3), p(e(R), {
362
362
  long: "",
363
363
  size: "large",
364
364
  class: "PricingPlans__button",
@@ -367,32 +367,32 @@ const be = {
367
367
  disabled: e(N)(s),
368
368
  onClick: (y) => e(se)(s)
369
369
  }, {
370
- default: h(() => [B(a(e(ee)(s)), 1)]),
370
+ default: h(() => [B(a(e(Z)(s)), 1)]),
371
371
  _: 2
372
- }, 1032, ["type", "loading", "disabled", "onClick"]), _[2] || (_[2] = i("div", {
372
+ }, 1032, ["type", "loading", "disabled", "onClick"])]), _[2] || (_[2] = i("div", {
373
373
  class: "PricingPlans__divider"
374
- }, null, -1)), i("div", je, [(t(!0), n(C, null, T(e(O)(s.features), (y) => (t(), n("section", {
374
+ }, null, -1)), i("div", We, [(t(!0), n(C, null, T(e(G)(s.features), (y) => (t(), n("section", {
375
375
  key: y.title,
376
376
  class: "PricingPlans__featureGroup"
377
- }, [i("h3", null, a(y.title), 1), i("ul", Ye, [(t(!0), n(C, null, T(y.items, (M) => (t(), n("li", {
378
- key: M.title,
377
+ }, [i("h3", null, a(y.title), 1), i("ul", je, [(t(!0), n(C, null, T(y.items, (E) => (t(), n("li", {
378
+ key: E.title,
379
379
  class: I({
380
- "is-highlight": M.highlight
380
+ "is-highlight": E.highlight
381
381
  })
382
- }, [p(e(Y), {
382
+ }, [p(e(j), {
383
383
  icon: "mingcute:check-circle-fill",
384
384
  class: "PricingPlans__featureIcon"
385
- }), i("span", null, a(M.title), 1)], 2))), 128))])]))), 128))])], 2))), 128))], 2)) : !b.value && !e(u) ? (t(), n("div", Je, " 当前暂无可订阅方案 ")) : P("", !0)]),
385
+ }), i("span", null, a(E.title), 1)], 2))), 128))])]))), 128))])], 2))), 128))], 2)) : !b.value && !e(u) ? (t(), n("div", Ye, " 当前暂无可订阅方案 ")) : f("", !0)]),
386
386
  _: 1
387
387
  }, 8, ["loading"])), [[x]])]);
388
388
  };
389
389
  }
390
- }), mt = /* @__PURE__ */ H(Xe, [["__scopeId", "data-v-6b191dd8"]]);
390
+ }), Pt = /* @__PURE__ */ z(Je, [["__scopeId", "data-v-438004ac"]]);
391
391
  export {
392
- _t as P,
393
- gt as a,
394
- Pt as b,
395
- mt as c,
396
- Q as p,
392
+ dt as P,
393
+ _t as a,
394
+ gt as b,
395
+ Pt as c,
396
+ M as p,
397
397
  ke as r
398
398
  };
package/dist/main.js CHANGED
@@ -32,7 +32,7 @@ import { C as h7, a as g7 } from "./CollapseItem-DUzZA6tx.js";
32
32
  import { C as m7, E as L7 } from "./CustomTable-BY0oHLXc.js";
33
33
  import { M as w7, a as y7 } from "./Menu-uCexrsKP.js";
34
34
  import { P as x7, u as v7, a as Z7, v as V7 } from "./PaySubscriptions-pEZtjp1g.js";
35
- import { P as U7, a as E7, b as k7, c as S7, p as A7, r as G7 } from "./PricingPlans-tnOpIihF.js";
35
+ import { P as U7, a as E7, b as k7, c as S7, p as A7, r as G7 } from "./PricingPlans-CHC05fhu.js";
36
36
  import { useBillingSubscriptionSummary as P7 } from "./useBillingSubscriptionSummary-BC3G0N4t.js";
37
37
  import { R as B7 } from "./ReferrerReferees-t5s4LzbY.js";
38
38
  import { _ as T7 } from "./Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js";
package/dist/pay.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { P as e, u as t, a as n, v as r } from "./PaySubscriptions-pEZtjp1g.js";
2
- import { P as i, a as o, b as P, c as p, p as m, r as c } from "./PricingPlans-tnOpIihF.js";
2
+ import { P as i, a as o, b as P, c as p, p as m, r as c } from "./PricingPlans-CHC05fhu.js";
3
3
  import { u as g, a as y } from "./useSubscriptionCheckout-CZZLk_1d.js";
4
4
  import { useBillingSubscriptionSummary as R } from "./useBillingSubscriptionSummary-BC3G0N4t.js";
5
5
  import { c as b, u as x, a as v, b as O } from "./useBillingStatusOptions-C6edto7H.js";