@huyooo/ui 0.12.2 → 0.13.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.
- package/dist/CustomTable-BBcd4nNL.js +278 -0
- package/dist/PaySubscriptions-Bxh35MKo.js +1280 -0
- package/dist/PricingPlans-BRJPtzFK.js +405 -0
- package/dist/{ReferrerReferees-DhS91Ulf.js → ReferrerReferees-Hh88qOrp.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-_BUbnxAH.js +521 -0
- package/dist/{WidthContainer-ektCstwj.js → WidthContainer-CjKGJYG4.js} +2 -2
- package/dist/common/paymentReturn.d.ts +9 -0
- package/dist/common.js +2 -2
- package/dist/components/Pay/PaymentReturnPage.vue.d.ts +7 -0
- package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +2 -0
- package/dist/composables/Billing/useBillingPlans.d.ts +39 -0
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +52 -0
- package/dist/composables/Billing/usePaymentReturn.d.ts +33 -0
- package/dist/composables/UserMenu/useUserMenu.d.ts +1 -1
- package/dist/main.js +154 -147
- package/dist/pay.d.ts +3 -0
- package/dist/pay.js +15 -8
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/user.js +1 -1
- package/dist/utils/billingFetch.d.ts +1 -0
- package/package.json +1 -1
- package/dist/CustomTable-BUkwlbzN.js +0 -272
- package/dist/PaySubscriptions-DS4kJNb_.js +0 -531
- package/dist/PricingPlans-CfW_mv5_.js +0 -279
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-9cF5hBYc.js +0 -508
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { defineComponent as f, openBlock as r, createElementBlock as p, toDisplayString as U, createCommentVNode as k, createVNode as d, unref as s, createBlock as _, withCtx as v, createTextVNode as $, createElementVNode as l, ref as h, computed as A, onMounted as J, Fragment as F, renderSlot as C, normalizeClass as K, watch as x } from "vue";
|
|
5
|
+
import { Avatar as L, Button as D, Dropdown as Q } from "@arco-design/web-vue";
|
|
6
|
+
import { u as R } from "./useAuthkitUsersProfile-CoQceogN.js";
|
|
7
|
+
import { u as y } from "./useUserMenu-ClPBlvaM.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { u as W, f as Z } from "./apiClients-B8bOvWw_.js";
|
|
12
|
+
import { u as ee, o as ne, P as te } from "./PaySubscriptions-Bxh35MKo.js";
|
|
13
|
+
import { C as se } from "./Clipboard-k0jtK4CJ.js";
|
|
14
|
+
import { A as ae } from "./AuthkitAppSetting-p_ZzaAK3.js";
|
|
15
|
+
import { d as oe } from "./FeedbackModal-9CNnFC6B.js";
|
|
16
|
+
import { M as re } from "./MessageHandle-BZBT7Ii1.js";
|
|
17
|
+
import { R as ie } from "./ReferrerReferees-Hh88qOrp.js";
|
|
18
|
+
import { Icon as j } from "@iconify/vue";
|
|
19
|
+
const le = {
|
|
20
|
+
class: "UserAvatar"
|
|
21
|
+
}, ue = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "UserAvatar__nickname"
|
|
24
|
+
}, ce = /* @__PURE__ */ f({
|
|
25
|
+
__name: "UserAvatar",
|
|
26
|
+
props: {
|
|
27
|
+
nickname: {
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
avatar: {
|
|
31
|
+
default: ""
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(e) {
|
|
35
|
+
return (n, o) => (r(), p("div", le, [e.nickname ? (r(), p("span", ue, U(e.nickname), 1)) : k("", !0), d(s(L), {
|
|
36
|
+
"image-url": e.avatar,
|
|
37
|
+
size: 32,
|
|
38
|
+
"object-fit": "cover"
|
|
39
|
+
}, null, 8, ["image-url"])]));
|
|
40
|
+
}
|
|
41
|
+
}), de = /* @__PURE__ */ M(ce, [["__scopeId", "data-v-cda7eee7"]]), pe = /* @__PURE__ */ f({
|
|
42
|
+
__name: "UserSignInButton",
|
|
43
|
+
setup(e) {
|
|
44
|
+
const {
|
|
45
|
+
open: n
|
|
46
|
+
} = W();
|
|
47
|
+
return (o, t) => (r(), _(s(D), {
|
|
48
|
+
type: "primary",
|
|
49
|
+
class: "UserSignInButton",
|
|
50
|
+
onClick: t[0] || (t[0] = (a) => s(n)())
|
|
51
|
+
}, {
|
|
52
|
+
default: v(() => [...t[1] || (t[1] = [$("登陆", -1)])]),
|
|
53
|
+
_: 1
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}), fe = /* @__PURE__ */ M(pe, [["__scopeId", "data-v-449a105c"]]), me = {}, _e = {
|
|
57
|
+
class: "UserMenuDivider",
|
|
58
|
+
role: "separator"
|
|
59
|
+
};
|
|
60
|
+
function ve(e, n) {
|
|
61
|
+
return r(), p("div", _e);
|
|
62
|
+
}
|
|
63
|
+
const ge = /* @__PURE__ */ M(me, [["render", ve], ["__scopeId", "data-v-c7d18d97"]]), be = {
|
|
64
|
+
class: "UserBasicInformation"
|
|
65
|
+
}, Ue = {
|
|
66
|
+
class: "UserBasicInformation__extra"
|
|
67
|
+
}, ke = {
|
|
68
|
+
class: "UserBasicInformation__nickname"
|
|
69
|
+
}, ye = {
|
|
70
|
+
class: "UserBasicInformation__email"
|
|
71
|
+
}, Ie = {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: "UserBasicInformation__referrer"
|
|
74
|
+
}, $e = /* @__PURE__ */ f({
|
|
75
|
+
__name: "UserBasicInformation",
|
|
76
|
+
props: {
|
|
77
|
+
nickname: {
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
email: {
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
avatarUrl: {
|
|
84
|
+
default: ""
|
|
85
|
+
},
|
|
86
|
+
referrerId: {
|
|
87
|
+
default: ""
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
setup(e) {
|
|
91
|
+
return (n, o) => (r(), p("div", be, [d(s(L), {
|
|
92
|
+
"image-url": e.avatarUrl,
|
|
93
|
+
size: 42,
|
|
94
|
+
"object-fit": "cover"
|
|
95
|
+
}, null, 8, ["image-url"]), l("div", Ue, [l("span", ke, U(e.nickname), 1), l("span", ye, U(e.email), 1), e.referrerId ? (r(), p("span", Ie, [l("span", null, "我的邀请码:" + U(e.referrerId), 1), d(se, {
|
|
96
|
+
value: e.referrerId,
|
|
97
|
+
message: "邀请码复制成功"
|
|
98
|
+
}, null, 8, ["value"])])) : k("", !0)])]));
|
|
99
|
+
}
|
|
100
|
+
}), Be = /* @__PURE__ */ M($e, [["__scopeId", "data-v-cc49789c"]]), Me = {
|
|
101
|
+
class: "UserSubscriptionBaseInformation"
|
|
102
|
+
}, Se = {
|
|
103
|
+
class: "UserSubscriptionBaseInformation__row"
|
|
104
|
+
}, he = {
|
|
105
|
+
class: "UserSubscriptionBaseInformation__info"
|
|
106
|
+
}, Ae = {
|
|
107
|
+
class: "UserSubscriptionBaseInformation__plan"
|
|
108
|
+
}, Ce = {
|
|
109
|
+
key: 0
|
|
110
|
+
}, xe = {
|
|
111
|
+
key: 1,
|
|
112
|
+
class: "UserSubscriptionBaseInformation__points"
|
|
113
|
+
}, we = {
|
|
114
|
+
key: 2,
|
|
115
|
+
class: "UserSubscriptionBaseInformation__pending"
|
|
116
|
+
}, Pe = /* @__PURE__ */ f({
|
|
117
|
+
__name: "UserSubscriptionBaseInformation",
|
|
118
|
+
props: {
|
|
119
|
+
currentVersionName: {
|
|
120
|
+
default: ""
|
|
121
|
+
},
|
|
122
|
+
expireDate: {
|
|
123
|
+
default: ""
|
|
124
|
+
},
|
|
125
|
+
pointsBalance: {},
|
|
126
|
+
pendingInvoiceTotal: {},
|
|
127
|
+
loading: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: !1
|
|
130
|
+
},
|
|
131
|
+
canUpgrade: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: !1
|
|
134
|
+
},
|
|
135
|
+
actionLabel: {
|
|
136
|
+
default: "升级"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
emits: ["upgradeHandle", "payHandle", "pointsHandle"],
|
|
140
|
+
setup(e, {
|
|
141
|
+
emit: n
|
|
142
|
+
}) {
|
|
143
|
+
const o = n;
|
|
144
|
+
return (t, a) => (r(), p("div", Me, [l("div", Se, [l("div", he, [a[3] || (a[3] = l("span", {
|
|
145
|
+
class: "UserSubscriptionBaseInformation__label"
|
|
146
|
+
}, "当前权益:", -1)), l("span", Ae, U(e.currentVersionName), 1)]), e.canUpgrade ? (r(), _(s(D), {
|
|
147
|
+
key: 0,
|
|
148
|
+
type: "primary",
|
|
149
|
+
size: "mini",
|
|
150
|
+
class: "UserSubscriptionBaseInformation__upgrade",
|
|
151
|
+
loading: e.loading,
|
|
152
|
+
onClick: a[0] || (a[0] = (c) => o("upgradeHandle"))
|
|
153
|
+
}, {
|
|
154
|
+
default: v(() => [$(U(e.actionLabel), 1)]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["loading"])) : k("", !0)]), e.expireDate ? (r(), p("span", Ce, "有效期至: " + U(e.expireDate), 1)) : k("", !0), typeof e.pointsBalance == "number" ? (r(), p("div", xe, [l("span", null, "积分余额: " + U(e.pointsBalance), 1), d(s(D), {
|
|
157
|
+
type: "text",
|
|
158
|
+
size: "mini",
|
|
159
|
+
class: "UserSubscriptionBaseInformation__pointsAction",
|
|
160
|
+
loading: e.loading,
|
|
161
|
+
onClick: a[1] || (a[1] = (c) => o("pointsHandle"))
|
|
162
|
+
}, {
|
|
163
|
+
default: v(() => [...a[4] || (a[4] = [$(" 充值 ", -1)])]),
|
|
164
|
+
_: 1
|
|
165
|
+
}, 8, ["loading"])])) : k("", !0), typeof e.pendingInvoiceTotal == "number" && e.pendingInvoiceTotal > 0 ? (r(), p("div", we, [a[6] || (a[6] = l("span", {
|
|
166
|
+
class: "UserSubscriptionBaseInformation__warning"
|
|
167
|
+
}, " 有待支付订阅账单 ", -1)), d(s(D), {
|
|
168
|
+
type: "primary",
|
|
169
|
+
status: "warning",
|
|
170
|
+
size: "mini",
|
|
171
|
+
class: "UserSubscriptionBaseInformation__pay",
|
|
172
|
+
loading: e.loading,
|
|
173
|
+
onClick: a[2] || (a[2] = (c) => o("payHandle"))
|
|
174
|
+
}, {
|
|
175
|
+
default: v(() => [...a[5] || (a[5] = [$(" 去支付 ", -1)])]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["loading"])])) : k("", !0)]));
|
|
178
|
+
}
|
|
179
|
+
}), De = /* @__PURE__ */ M(Pe, [["__scopeId", "data-v-f183ed7e"]]), He = /* @__PURE__ */ f({
|
|
180
|
+
__name: "UserMenuHeader",
|
|
181
|
+
props: {
|
|
182
|
+
showSubscription: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: !0
|
|
185
|
+
},
|
|
186
|
+
currentVersionName: {
|
|
187
|
+
default: ""
|
|
188
|
+
},
|
|
189
|
+
expireDate: {
|
|
190
|
+
default: ""
|
|
191
|
+
},
|
|
192
|
+
canUpgrade: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: !0
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
setup(e) {
|
|
198
|
+
const n = e, {
|
|
199
|
+
userProfile: o
|
|
200
|
+
} = R(), {
|
|
201
|
+
openSubscriptions: t
|
|
202
|
+
} = y(), {
|
|
203
|
+
entitlement: a,
|
|
204
|
+
pointsBalance: c,
|
|
205
|
+
pendingInvoice: i,
|
|
206
|
+
loading: g,
|
|
207
|
+
refresh: I
|
|
208
|
+
} = ee(), S = h(0), B = A(() => a.value), P = A(() => {
|
|
209
|
+
var m, b;
|
|
210
|
+
return n.currentVersionName ? n.currentVersionName : ((m = B.value) == null ? void 0 : m.type) === "trial" ? "免费试用" : ((b = B.value) == null ? void 0 : b.productName) || "未订阅";
|
|
211
|
+
}), u = A(() => {
|
|
212
|
+
var m;
|
|
213
|
+
return n.expireDate || ((m = B.value) == null ? void 0 : m.endAt) || "";
|
|
214
|
+
}), H = A(() => {
|
|
215
|
+
var m, b;
|
|
216
|
+
return ((m = B.value) == null ? void 0 : m.type) === "trial" ? S.value > 0 ? "升级" : "" : ((b = B.value) == null ? void 0 : b.type) === "subscription" ? S.value > 1 ? "修改订阅" : "" : S.value > 0 ? "订阅" : "";
|
|
217
|
+
}), X = A(() => n.canUpgrade && !!H.value);
|
|
218
|
+
function Y() {
|
|
219
|
+
ne();
|
|
220
|
+
}
|
|
221
|
+
async function q() {
|
|
222
|
+
const {
|
|
223
|
+
data: m
|
|
224
|
+
} = await Z.products.listActive.post();
|
|
225
|
+
S.value = Array.isArray(m) ? m.length : 0;
|
|
226
|
+
}
|
|
227
|
+
return J(() => {
|
|
228
|
+
n.showSubscription && (I(), q());
|
|
229
|
+
}), (m, b) => {
|
|
230
|
+
var N, V, O, T, z, E;
|
|
231
|
+
return r(), p(F, null, [d(Be, {
|
|
232
|
+
"avatar-url": (N = s(o)) == null ? void 0 : N.avatarUrl,
|
|
233
|
+
nickname: (V = s(o)) == null ? void 0 : V.nickname,
|
|
234
|
+
email: (O = s(o)) == null ? void 0 : O.email,
|
|
235
|
+
"referrer-id": (T = s(o)) == null ? void 0 : T.referrerId
|
|
236
|
+
}, null, 8, ["avatar-url", "nickname", "email", "referrer-id"]), e.showSubscription ? (r(), _(De, {
|
|
237
|
+
key: 0,
|
|
238
|
+
"current-version-name": P.value,
|
|
239
|
+
"expire-date": u.value,
|
|
240
|
+
"points-balance": (z = s(c)) == null ? void 0 : z.totalPoints,
|
|
241
|
+
"pending-invoice-total": (E = s(i)) == null ? void 0 : E.total,
|
|
242
|
+
loading: s(g),
|
|
243
|
+
"can-upgrade": X.value,
|
|
244
|
+
"action-label": H.value,
|
|
245
|
+
onUpgradeHandle: Y,
|
|
246
|
+
onPayHandle: b[0] || (b[0] = (G) => s(t)({
|
|
247
|
+
target: "invoices"
|
|
248
|
+
})),
|
|
249
|
+
onPointsHandle: b[1] || (b[1] = (G) => s(t)({
|
|
250
|
+
target: "points"
|
|
251
|
+
}))
|
|
252
|
+
}, null, 8, ["current-version-name", "expire-date", "points-balance", "pending-invoice-total", "loading", "can-upgrade", "action-label"])) : k("", !0)], 64);
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
}), Re = {
|
|
256
|
+
class: "UserMenu__content"
|
|
257
|
+
}, Ne = {
|
|
258
|
+
class: "UserMenu__header"
|
|
259
|
+
}, Ve = /* @__PURE__ */ f({
|
|
260
|
+
__name: "UserMenu",
|
|
261
|
+
props: {
|
|
262
|
+
position: {
|
|
263
|
+
default: "br"
|
|
264
|
+
},
|
|
265
|
+
dropdownOffsetX: {
|
|
266
|
+
default: "0"
|
|
267
|
+
},
|
|
268
|
+
dropdownOffsetY: {
|
|
269
|
+
default: "0"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
setup(e) {
|
|
273
|
+
const {
|
|
274
|
+
userProfile: n,
|
|
275
|
+
isLoggedIn: o
|
|
276
|
+
} = R(), {
|
|
277
|
+
isOpen: t,
|
|
278
|
+
setOpen: a
|
|
279
|
+
} = y(), c = A({
|
|
280
|
+
get: () => t.value,
|
|
281
|
+
set: (i) => a(i)
|
|
282
|
+
});
|
|
283
|
+
return (i, g) => s(o) ? (r(), _(s(Q), {
|
|
284
|
+
key: 1,
|
|
285
|
+
"popup-visible": c.value,
|
|
286
|
+
"onUpdate:popupVisible": g[0] || (g[0] = (I) => c.value = I),
|
|
287
|
+
class: "UserMenu",
|
|
288
|
+
position: e.position,
|
|
289
|
+
"popup-max-height": !1,
|
|
290
|
+
"popup-style": {
|
|
291
|
+
"--user-menu-translate-x": e.dropdownOffsetX ?? "0",
|
|
292
|
+
"--user-menu-translate-y": e.dropdownOffsetY ?? "0"
|
|
293
|
+
}
|
|
294
|
+
}, {
|
|
295
|
+
content: v(() => [l("div", Re, [l("div", Ne, [C(i.$slots, "header", {
|
|
296
|
+
user: s(n)
|
|
297
|
+
}, () => [d(He)], !0)]), i.$slots.items ? (r(), _(ge, {
|
|
298
|
+
key: 0
|
|
299
|
+
})) : k("", !0), C(i.$slots, "items", {}, void 0, !0)])]),
|
|
300
|
+
default: v(() => [C(i.$slots, "trigger", {
|
|
301
|
+
user: s(n)
|
|
302
|
+
}, () => {
|
|
303
|
+
var I;
|
|
304
|
+
return [d(de, {
|
|
305
|
+
avatar: (I = s(n)) == null ? void 0 : I.avatarUrl
|
|
306
|
+
}, null, 8, ["avatar"])];
|
|
307
|
+
}, !0)]),
|
|
308
|
+
_: 3
|
|
309
|
+
}, 8, ["popup-visible", "position", "popup-style"])) : (r(), _(fe, {
|
|
310
|
+
key: 0
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
}), fn = /* @__PURE__ */ M(Ve, [["__scopeId", "data-v-bbd2c44f"]]), Oe = ["disabled"], Te = {
|
|
314
|
+
class: "UserMenuItem__label"
|
|
315
|
+
}, ze = {
|
|
316
|
+
key: 0,
|
|
317
|
+
class: "UserMenuItem__icon"
|
|
318
|
+
}, Ee = /* @__PURE__ */ f({
|
|
319
|
+
__name: "UserMenuItem",
|
|
320
|
+
props: {
|
|
321
|
+
icon: {
|
|
322
|
+
default: void 0
|
|
323
|
+
},
|
|
324
|
+
danger: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: !1
|
|
327
|
+
},
|
|
328
|
+
disabled: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: !1
|
|
331
|
+
},
|
|
332
|
+
closeOnClick: {
|
|
333
|
+
type: Boolean,
|
|
334
|
+
default: !0
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
emits: ["click"],
|
|
338
|
+
setup(e, {
|
|
339
|
+
emit: n
|
|
340
|
+
}) {
|
|
341
|
+
const o = e, t = n, {
|
|
342
|
+
close: a
|
|
343
|
+
} = y();
|
|
344
|
+
function c(i) {
|
|
345
|
+
i.stopPropagation(), !o.disabled && (o.closeOnClick && a(), t("click", i));
|
|
346
|
+
}
|
|
347
|
+
return (i, g) => (r(), p("button", {
|
|
348
|
+
type: "button",
|
|
349
|
+
class: K(["UserMenuItem", {
|
|
350
|
+
"is-danger": e.danger,
|
|
351
|
+
"is-disabled": e.disabled
|
|
352
|
+
}]),
|
|
353
|
+
disabled: e.disabled,
|
|
354
|
+
onClick: c
|
|
355
|
+
}, [l("span", Te, [C(i.$slots, "default", {}, void 0, !0)]), i.$slots.icon || e.icon ? (r(), p("span", ze, [C(i.$slots, "icon", {}, () => [e.icon ? (r(), _(s(j), {
|
|
356
|
+
key: 0,
|
|
357
|
+
icon: e.icon,
|
|
358
|
+
width: 16,
|
|
359
|
+
height: 16
|
|
360
|
+
}, null, 8, ["icon"])) : k("", !0)], !0)])) : k("", !0)], 10, Oe));
|
|
361
|
+
}
|
|
362
|
+
}), w = /* @__PURE__ */ M(Ee, [["__scopeId", "data-v-d357ac04"]]), mn = /* @__PURE__ */ f({
|
|
363
|
+
__name: "UserMenuModals",
|
|
364
|
+
setup(e) {
|
|
365
|
+
const {
|
|
366
|
+
settingTrigger: n,
|
|
367
|
+
subscriptionsTrigger: o,
|
|
368
|
+
subscriptionsOptions: t,
|
|
369
|
+
messagesTrigger: a,
|
|
370
|
+
feedbackTrigger: c,
|
|
371
|
+
invitationsTrigger: i
|
|
372
|
+
} = y(), g = h(null), I = h(null), S = h(null), B = h(null), P = h(null);
|
|
373
|
+
return x(n, () => {
|
|
374
|
+
var u;
|
|
375
|
+
(u = g.value) == null || u.setData(null, !0);
|
|
376
|
+
}), x(o, () => {
|
|
377
|
+
var u;
|
|
378
|
+
(u = I.value) == null || u.setData(t.value, !0);
|
|
379
|
+
}), x(a, () => {
|
|
380
|
+
var u;
|
|
381
|
+
(u = S.value) == null || u.openNotification();
|
|
382
|
+
}), x(c, () => {
|
|
383
|
+
var u;
|
|
384
|
+
(u = B.value) == null || u.setData(!0);
|
|
385
|
+
}), x(i, () => {
|
|
386
|
+
var u;
|
|
387
|
+
(u = P.value) == null || u.setData(!0);
|
|
388
|
+
}), (u, H) => (r(), p(F, null, [d(ae, {
|
|
389
|
+
ref_key: "appSettingRef",
|
|
390
|
+
ref: g
|
|
391
|
+
}, null, 512), d(te, {
|
|
392
|
+
ref_key: "paySubsRef",
|
|
393
|
+
ref: I
|
|
394
|
+
}, null, 512), d(re, {
|
|
395
|
+
ref_key: "messageHandleRef",
|
|
396
|
+
ref: S
|
|
397
|
+
}, null, 512), d(oe, {
|
|
398
|
+
ref_key: "feedbackModalRef",
|
|
399
|
+
ref: B
|
|
400
|
+
}, null, 512), d(ie, {
|
|
401
|
+
ref_key: "refereesRef",
|
|
402
|
+
ref: P
|
|
403
|
+
}, null, 512)], 64));
|
|
404
|
+
}
|
|
405
|
+
}), Fe = {
|
|
406
|
+
class: "UserAccountMenu"
|
|
407
|
+
}, Le = {
|
|
408
|
+
class: "UserAccountMenu__avatar"
|
|
409
|
+
}, je = {
|
|
410
|
+
class: "UserAccountMenu__meta"
|
|
411
|
+
}, Xe = {
|
|
412
|
+
class: "UserAccountMenu__name"
|
|
413
|
+
}, Ye = {
|
|
414
|
+
class: "UserAccountMenu__email"
|
|
415
|
+
}, qe = /* @__PURE__ */ f({
|
|
416
|
+
__name: "UserAccountMenu",
|
|
417
|
+
setup(e) {
|
|
418
|
+
const {
|
|
419
|
+
userProfile: n
|
|
420
|
+
} = R(), {
|
|
421
|
+
toggle: o
|
|
422
|
+
} = y();
|
|
423
|
+
return (t, a) => {
|
|
424
|
+
var c, i;
|
|
425
|
+
return r(), p("div", Fe, [l("div", Le, [C(t.$slots, "avatar", {}, void 0, !0)]), l("div", je, [l("div", Xe, U(((c = s(n)) == null ? void 0 : c.nickname) || ""), 1), l("div", Ye, U(((i = s(n)) == null ? void 0 : i.email) || ""), 1)]), l("div", {
|
|
426
|
+
class: "UserAccountMenu__arrow",
|
|
427
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
|
428
|
+
(...g) => s(o) && s(o)(...g))
|
|
429
|
+
}, [d(s(j), {
|
|
430
|
+
icon: "lucide:chevrons-up-down"
|
|
431
|
+
})])]);
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
}), _n = /* @__PURE__ */ M(qe, [["__scopeId", "data-v-cc0eb033"]]), vn = /* @__PURE__ */ f({
|
|
435
|
+
__name: "UserMenuMessageItem",
|
|
436
|
+
setup(e) {
|
|
437
|
+
const {
|
|
438
|
+
openMessages: n
|
|
439
|
+
} = y();
|
|
440
|
+
return (o, t) => (r(), _(w, {
|
|
441
|
+
icon: "lucide:chevron-right",
|
|
442
|
+
onClick: s(n)
|
|
443
|
+
}, {
|
|
444
|
+
default: v(() => [...t[0] || (t[0] = [$("消息中心", -1)])]),
|
|
445
|
+
_: 1
|
|
446
|
+
}, 8, ["onClick"]));
|
|
447
|
+
}
|
|
448
|
+
}), gn = /* @__PURE__ */ f({
|
|
449
|
+
__name: "UserMenuSettingItem",
|
|
450
|
+
setup(e) {
|
|
451
|
+
const {
|
|
452
|
+
openSetting: n
|
|
453
|
+
} = y();
|
|
454
|
+
return (o, t) => (r(), _(w, {
|
|
455
|
+
icon: "lucide:user-round",
|
|
456
|
+
onClick: s(n)
|
|
457
|
+
}, {
|
|
458
|
+
default: v(() => [...t[0] || (t[0] = [$("用户信息", -1)])]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 8, ["onClick"]));
|
|
461
|
+
}
|
|
462
|
+
}), bn = /* @__PURE__ */ f({
|
|
463
|
+
__name: "UserMenuSubscriptionItem",
|
|
464
|
+
setup(e) {
|
|
465
|
+
const {
|
|
466
|
+
openSubscriptions: n
|
|
467
|
+
} = y();
|
|
468
|
+
return (o, t) => (r(), _(w, {
|
|
469
|
+
icon: "lucide:chevron-right",
|
|
470
|
+
onClick: t[0] || (t[0] = (a) => s(n)())
|
|
471
|
+
}, {
|
|
472
|
+
default: v(() => [...t[1] || (t[1] = [$("订阅与积分", -1)])]),
|
|
473
|
+
_: 1
|
|
474
|
+
}));
|
|
475
|
+
}
|
|
476
|
+
}), Un = /* @__PURE__ */ f({
|
|
477
|
+
__name: "UserMenuFeedbackItem",
|
|
478
|
+
setup(e) {
|
|
479
|
+
const {
|
|
480
|
+
openFeedback: n
|
|
481
|
+
} = y();
|
|
482
|
+
return (o, t) => (r(), _(w, {
|
|
483
|
+
icon: "lucide:chevron-right",
|
|
484
|
+
onClick: s(n)
|
|
485
|
+
}, {
|
|
486
|
+
default: v(() => [...t[0] || (t[0] = [$("系统反馈", -1)])]),
|
|
487
|
+
_: 1
|
|
488
|
+
}, 8, ["onClick"]));
|
|
489
|
+
}
|
|
490
|
+
}), kn = /* @__PURE__ */ f({
|
|
491
|
+
__name: "UserMenuInvitationsItem",
|
|
492
|
+
setup(e) {
|
|
493
|
+
const {
|
|
494
|
+
openInvitations: n
|
|
495
|
+
} = y();
|
|
496
|
+
return (o, t) => (r(), _(w, {
|
|
497
|
+
icon: "lucide:chevron-right",
|
|
498
|
+
onClick: s(n)
|
|
499
|
+
}, {
|
|
500
|
+
default: v(() => [...t[0] || (t[0] = [$("邀请", -1)])]),
|
|
501
|
+
_: 1
|
|
502
|
+
}, 8, ["onClick"]));
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
export {
|
|
506
|
+
_n as U,
|
|
507
|
+
Un as _,
|
|
508
|
+
de as a,
|
|
509
|
+
Be as b,
|
|
510
|
+
fn as c,
|
|
511
|
+
ge as d,
|
|
512
|
+
He as e,
|
|
513
|
+
kn as f,
|
|
514
|
+
w as g,
|
|
515
|
+
vn as h,
|
|
516
|
+
mn as i,
|
|
517
|
+
gn as j,
|
|
518
|
+
bn as k,
|
|
519
|
+
fe as l,
|
|
520
|
+
De as m
|
|
521
|
+
};
|
|
@@ -10,7 +10,7 @@ import { b as Q, f as X, w as G, a as Y, c as Z, d as ee, e as ye } from "./useS
|
|
|
10
10
|
import "./useUploadCos-DTMIoW7p.js";
|
|
11
11
|
import { useRouter as te, useRoute as ne } from "vue-router";
|
|
12
12
|
import "./useUserMenu-ClPBlvaM.js";
|
|
13
|
-
import { U as ke, c as oe, h as se, k as ae, _ as re, f as ie, j as ue, d as le, g as K, i as ce } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-
|
|
13
|
+
import { U as ke, c as oe, h as se, k as ae, _ as re, f as ie, j as ue, d as le, g as K, i as ce } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-_BUbnxAH.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { Icon as R } from "@iconify/vue";
|
|
16
16
|
import "./Clipboard-k0jtK4CJ.js";
|
|
@@ -22,7 +22,7 @@ import "./CollapseItem-DUzZA6tx.js";
|
|
|
22
22
|
/* empty css */
|
|
23
23
|
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
|
-
import "./CustomTable-
|
|
25
|
+
import "./CustomTable-BBcd4nNL.js";
|
|
26
26
|
import "./index-D56hUMeD.js";
|
|
27
27
|
import { L as de } from "./Logo-D7fyXyB-.js";
|
|
28
28
|
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 与 billing-server 约定的支付宝 page 支付回跳 path */
|
|
2
|
+
export declare const PAYMENT_RETURN_PATH = "/Pay/Return";
|
|
3
|
+
export type PaymentReturnScene = 'subscription' | 'recharge' | 'agreement';
|
|
4
|
+
export declare function parsePaymentReturnQuery(query: Record<string, unknown>): {
|
|
5
|
+
scene: PaymentReturnScene | null;
|
|
6
|
+
orderId: string | null;
|
|
7
|
+
returnTo: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare function resolvePaymentReturnTarget(query: Record<string, unknown>, defaultReturnTo: string): string;
|
package/dist/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-
|
|
1
|
+
import { A as s, a as o, C as r, D as t, G as p, H as n, b as l, S as m, W as u } from "./WidthContainer-CjKGJYG4.js";
|
|
2
2
|
import { C as d, a as f } from "./CollapseItem-DUzZA6tx.js";
|
|
3
|
-
import { C as x, E as b } from "./CustomTable-
|
|
3
|
+
import { C as x, E as b } from "./CustomTable-BBcd4nNL.js";
|
|
4
4
|
import { L } from "./Logo-D7fyXyB-.js";
|
|
5
5
|
import { M as g, a as A } from "./Menu-Cy2ZPeaz.js";
|
|
6
6
|
export {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
defaultReturnTo?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
defaultReturnTo: string;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -10,9 +10,11 @@ type __VLS_Props = {
|
|
|
10
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
11
|
upgradeHandle: () => any;
|
|
12
12
|
payHandle: () => any;
|
|
13
|
+
pointsHandle: () => any;
|
|
13
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
15
|
onUpgradeHandle?: (() => any) | undefined;
|
|
15
16
|
onPayHandle?: (() => any) | undefined;
|
|
17
|
+
onPointsHandle?: (() => any) | undefined;
|
|
16
18
|
}>, {
|
|
17
19
|
loading: boolean;
|
|
18
20
|
currentVersionName: string;
|
|
@@ -46,6 +46,19 @@ export interface BillingSubscription {
|
|
|
46
46
|
currentPeriodStart?: string;
|
|
47
47
|
currentPeriodEnd: string | null;
|
|
48
48
|
cancelAtPeriodEnd: boolean;
|
|
49
|
+
pendingChange?: {
|
|
50
|
+
type: string;
|
|
51
|
+
productId: string;
|
|
52
|
+
productName?: string;
|
|
53
|
+
priceId: string;
|
|
54
|
+
priceNickname?: string;
|
|
55
|
+
interval?: string;
|
|
56
|
+
intervalCount?: number;
|
|
57
|
+
unitAmount?: number;
|
|
58
|
+
currency?: string;
|
|
59
|
+
requestedAt?: string | null;
|
|
60
|
+
effectiveAt?: string | null;
|
|
61
|
+
} | null;
|
|
49
62
|
trialStart?: string | null;
|
|
50
63
|
trialEnd: string | null;
|
|
51
64
|
canceledAt?: string | null;
|
|
@@ -162,6 +175,19 @@ export declare function useBillingPlans(defaultInterval?: BillingInterval | Bill
|
|
|
162
175
|
currentPeriodStart?: string | undefined;
|
|
163
176
|
currentPeriodEnd: string | null;
|
|
164
177
|
cancelAtPeriodEnd: boolean;
|
|
178
|
+
pendingChange?: {
|
|
179
|
+
type: string;
|
|
180
|
+
productId: string;
|
|
181
|
+
productName?: string | undefined;
|
|
182
|
+
priceId: string;
|
|
183
|
+
priceNickname?: string | undefined;
|
|
184
|
+
interval?: string | undefined;
|
|
185
|
+
intervalCount?: number | undefined;
|
|
186
|
+
unitAmount?: number | undefined;
|
|
187
|
+
currency?: string | undefined;
|
|
188
|
+
requestedAt?: string | null | undefined;
|
|
189
|
+
effectiveAt?: string | null | undefined;
|
|
190
|
+
} | null | undefined;
|
|
165
191
|
trialStart?: string | null | undefined;
|
|
166
192
|
trialEnd: string | null;
|
|
167
193
|
canceledAt?: string | null | undefined;
|
|
@@ -180,6 +206,19 @@ export declare function useBillingPlans(defaultInterval?: BillingInterval | Bill
|
|
|
180
206
|
currentPeriodStart?: string | undefined;
|
|
181
207
|
currentPeriodEnd: string | null;
|
|
182
208
|
cancelAtPeriodEnd: boolean;
|
|
209
|
+
pendingChange?: {
|
|
210
|
+
type: string;
|
|
211
|
+
productId: string;
|
|
212
|
+
productName?: string | undefined;
|
|
213
|
+
priceId: string;
|
|
214
|
+
priceNickname?: string | undefined;
|
|
215
|
+
interval?: string | undefined;
|
|
216
|
+
intervalCount?: number | undefined;
|
|
217
|
+
unitAmount?: number | undefined;
|
|
218
|
+
currency?: string | undefined;
|
|
219
|
+
requestedAt?: string | null | undefined;
|
|
220
|
+
effectiveAt?: string | null | undefined;
|
|
221
|
+
} | null | undefined;
|
|
183
222
|
trialStart?: string | null | undefined;
|
|
184
223
|
trialEnd: string | null;
|
|
185
224
|
canceledAt?: string | null | undefined;
|