@huyooo/ui 2.1.16 → 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,7 +2,7 @@
2
2
  import "./userMenuModal-D-nDaYqM.js";
3
3
  import "./apiClients-CWSwNzGk.js";
4
4
  /* empty css */
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 P } from "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
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";
@@ -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
76
  } = M(o.query);
77
- if (!m || !l) {
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;
@@ -93,21 +93,21 @@ const be = {
93
93
  }
94
94
  return Y(() => {
95
95
  const {
96
- scene: m,
96
+ scene: P,
97
97
  orderId: l
98
98
  } = M(o.query);
99
- if (!m || !l) {
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(), V(e(J), {
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), {
@@ -218,19 +218,18 @@ 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
234
  class: "PricingPlans__featureGroups"
236
235
  }, je = {
@@ -265,7 +264,7 @@ const be = {
265
264
  isRecommendedPlan: S,
266
265
  isFreePlan: $,
267
266
  isPlanActionDisabled: N,
268
- getDisplayPrice: m,
267
+ getDisplayPrice: P,
269
268
  getDisplayOriginalPrice: l,
270
269
  getDisplayCycle: k,
271
270
  getPromotionLabel: H,
@@ -277,16 +276,16 @@ const be = {
277
276
  refresh: te
278
277
  } = ve(d.defaultInterval), b = w(() => {
279
278
  if (!g.value)
280
- for (const f of o.value) {
281
- const _ = f.prices.find((x) => x.type === "free");
279
+ for (const m of o.value) {
280
+ const _ = m.prices.find((x) => x.type === "free");
282
281
  if (_)
283
282
  return {
284
- ...f,
283
+ ...m,
285
284
  features: _.features ?? [],
286
285
  selectedPrice: _
287
286
  };
288
287
  }
289
- }), q = w(() => c.value.filter((f) => !$(f))), ne = w(() => !!localStorage.getItem("jwtToken")), O = w(() => !!F.value), {
288
+ }), q = w(() => c.value.filter((m) => !$(m))), ne = w(() => !!localStorage.getItem("jwtToken")), O = w(() => !!F.value), {
290
289
  checkout: se,
291
290
  isCheckingOut: ie
292
291
  } = ye({
@@ -295,11 +294,11 @@ const be = {
295
294
  }), {
296
295
  ensureAuthenticated: re
297
296
  } = he();
298
- function ae(f) {
299
- return f === 1 ? "适合团队协作与更高频使用" : "适合个人和轻量团队使用";
297
+ function ae(m) {
298
+ return m === 1 ? "适合团队协作与更高频使用" : "适合个人和轻量团队使用";
300
299
  }
301
- function U(f) {
302
- return G(f.features).flatMap((_) => _.items).slice(0, 3);
300
+ function U(m) {
301
+ return G(m.features).flatMap((_) => _.items);
303
302
  }
304
303
  function le() {
305
304
  re(() => {
@@ -308,7 +307,7 @@ const be = {
308
307
  }
309
308
  return Y(() => {
310
309
  te();
311
- }), (f, _) => {
310
+ }), (m, _) => {
312
311
  const x = ce("motion-slide-top");
313
312
  return t(), n("section", Se, [ue((t(), V(e(J), {
314
313
  loading: e(u),
@@ -325,21 +324,21 @@ const be = {
325
324
  }, [p(e(j), {
326
325
  icon: "mingcute:check-circle-fill",
327
326
  class: "PricingPlans__trialFeatureIcon"
328
- }), i("span", null, a(s.title), 1)]))), 128))])) : P("", !0)]), ne.value ? O.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), {
329
328
  size: "large",
330
329
  class: "PricingPlans__trialButton",
331
330
  onClick: le
332
331
  }, {
333
332
  default: h(() => [..._[0] || (_[0] = [B(" 免费注册 ", -1)])]),
334
333
  _: 1
335
- })]))])], 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", {
336
335
  key: s.value,
337
336
  type: "button",
338
337
  class: I(["PricingPlans__toggleItem", {
339
338
  "is-active": e(v) === s.value
340
339
  }]),
341
340
  onClick: (W) => e(A)(s.value)
342
- }, [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", {
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", {
343
342
  key: 2,
344
343
  class: I(["PricingPlans__grid", {
345
344
  "PricingPlans__grid--compact": q.value.length <= 2
@@ -353,9 +352,13 @@ const be = {
353
352
  }, [i("div", Ve, [(t(!0), n(C, null, T(e(X)(s), (y) => (t(), n("span", {
354
353
  key: y.type,
355
354
  class: I(["PricingPlans__badge", `is-${y.type}`])
356
- }, a(y.label), 3))), 128))]), i("div", ze, [i("h2", null, a(s.name), 1), i("p", null, a(s.description || ae(W)), 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", {
357
356
  class: "PricingPlans__currency"
358
- }, "¥", -1)), i("span", Ke, a(e(m)(s)), 1), i("span", Oe, a(e(k)(s)), 1)]), e(H)(s) ? (t(), n("p", Ue, a(e(H)(s)), 1)) : P("", !0), 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), {
359
362
  long: "",
360
363
  size: "large",
361
364
  class: "PricingPlans__button",
@@ -366,7 +369,7 @@ const be = {
366
369
  }, {
367
370
  default: h(() => [B(a(e(Z)(s)), 1)]),
368
371
  _: 2
369
- }, 1032, ["type", "loading", "disabled", "onClick"]), _[2] || (_[2] = i("div", {
372
+ }, 1032, ["type", "loading", "disabled", "onClick"])]), _[2] || (_[2] = i("div", {
370
373
  class: "PricingPlans__divider"
371
374
  }, null, -1)), i("div", We, [(t(!0), n(C, null, T(e(G)(s.features), (y) => (t(), n("section", {
372
375
  key: y.title,
@@ -379,12 +382,12 @@ const be = {
379
382
  }, [p(e(j), {
380
383
  icon: "mingcute:check-circle-fill",
381
384
  class: "PricingPlans__featureIcon"
382
- }), i("span", null, a(E.title), 1)], 2))), 128))])]))), 128))])], 2))), 128))], 2)) : !b.value && !e(u) ? (t(), n("div", Ye, " 当前暂无可订阅方案 ")) : 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)]),
383
386
  _: 1
384
387
  }, 8, ["loading"])), [[x]])]);
385
388
  };
386
389
  }
387
- }), Pt = /* @__PURE__ */ z(Je, [["__scopeId", "data-v-b3658f38"]]);
390
+ }), Pt = /* @__PURE__ */ z(Je, [["__scopeId", "data-v-438004ac"]]);
388
391
  export {
389
392
  dt as P,
390
393
  _t as a,
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-J-CdbyZc.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-J-CdbyZc.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";