@huyooo/ui 0.4.4 → 0.4.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-CufEYL2W.js +1815 -0
- package/dist/AuthkitAuthorize-DnvypjyO.js +250 -0
- package/dist/CollapseItem-Cw1vcdLu.js +57 -0
- package/dist/CustomTable-Cd6RiAPX.js +1337 -0
- package/dist/FeedbackFeedBackItem-DYUIzqYg.js +526 -0
- package/dist/FeedbackFeedBackModal-DKgZZ8OR.js +1731 -0
- package/dist/LandingPageToc-BkL7mxo7.js +1555 -0
- package/dist/Menu-2SePYCYT.js +115 -0
- package/dist/MessageHandle-C9nSNw5A.js +867 -0
- package/dist/MessageMenu-x26lfAeK.js +114 -0
- package/dist/PaySubscriptions-CFKM4gyf.js +278 -0
- package/dist/ReferrerReferees-q8H-v-Hq.js +185 -0
- package/dist/Upload.vue_vue_type_script_setup_true_lang-DqfW_OJJ.js +96 -0
- package/dist/UserPanel-azycBFZP.js +511 -0
- package/dist/WidthContainer-D795bWdT.js +128 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/authkit.d.ts +32 -0
- package/dist/authkit.js +36 -0
- package/dist/common.d.ts +24 -0
- package/dist/common.js +39 -0
- package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +104 -0
- package/dist/components/Feedback/FeedbackFeedBack.vue.d.ts +53 -0
- package/dist/components/Feedback/FeedbackFeedBackItem.vue.d.ts +32 -0
- package/dist/components/Feedback/FeedbackFloatButton.vue.d.ts +42 -0
- package/dist/components/Gradientbackground.vue.d.ts +1 -1
- package/dist/components/LandingPage/LandingPageAbout.vue.d.ts +2 -0
- package/dist/components/LandingPage/LandingPageAside.vue.d.ts +2 -0
- package/dist/components/LandingPage/LandingPageBlockHeader.vue.d.ts +18 -0
- package/dist/components/LandingPage/LandingPageBlockLayout.vue.d.ts +41 -0
- package/dist/components/LandingPage/LandingPageBrandInfo.vue.d.ts +47 -0
- package/dist/components/LandingPage/LandingPageButton.vue.d.ts +20 -0
- package/dist/components/LandingPage/LandingPageContact.vue.d.ts +29 -0
- package/dist/components/LandingPage/LandingPageContactForm.vue.d.ts +2 -0
- package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageCta.vue.d.ts +25 -0
- package/dist/components/LandingPage/LandingPageDescription.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageDivider.vue.d.ts +2 -0
- package/dist/components/LandingPage/LandingPageFAQ.vue.d.ts +13 -0
- package/dist/components/LandingPage/LandingPageFeatures.vue.d.ts +16 -0
- package/dist/components/LandingPage/LandingPageFeatures2.vue.d.ts +13 -0
- package/dist/components/LandingPage/LandingPageFooter.vue.d.ts +2 -0
- package/dist/components/LandingPage/LandingPageFooterLayout.vue.d.ts +19 -0
- package/dist/components/LandingPage/LandingPageHero.vue.d.ts +49 -0
- package/dist/components/LandingPage/LandingPageLink.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageLinkGroup.vue.d.ts +22 -0
- package/dist/components/LandingPage/LandingPageListItem.vue.d.ts +7 -0
- package/dist/components/LandingPage/LandingPageLogo.vue.d.ts +53 -0
- package/dist/components/LandingPage/LandingPageLogos.vue.d.ts +14 -0
- package/dist/components/LandingPage/LandingPageMission.vue.d.ts +10 -0
- package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +31 -0
- package/dist/components/LandingPage/LandingPagePriceGroup.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPagePricingGrid.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageSections.vue.d.ts +23 -0
- package/dist/components/LandingPage/LandingPageShowcase.vue.d.ts +26 -0
- package/dist/components/LandingPage/LandingPageStats.vue.d.ts +16 -0
- package/dist/components/LandingPage/LandingPageSteps.vue.d.ts +33 -0
- package/dist/components/LandingPage/LandingPageSubTitle.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageTabs.vue.d.ts +32 -0
- package/dist/components/LandingPage/LandingPageTeamInfo.vue.d.ts +6 -0
- package/dist/components/LandingPage/LandingPageTeamList.vue.d.ts +9 -0
- package/dist/components/LandingPage/LandingPageTestimonial.vue.d.ts +13 -0
- package/dist/components/LandingPage/LandingPageTips.vue.d.ts +23 -0
- package/dist/components/LandingPage/LandingPageTitle.vue.d.ts +17 -0
- package/dist/components/LandingPage/LandingPageToc.vue.d.ts +2 -0
- package/dist/components/Message/MessageCustomTabs.vue.d.ts +44 -0
- package/dist/components/{MessageCenter/MessageCenterHandle.vue.d.ts → Message/MessageHandle.vue.d.ts} +5 -5
- package/dist/components/Message/MessageMenu.vue.d.ts +27 -0
- package/dist/components/Message/MessageMenuItem.vue.d.ts +44 -0
- package/dist/components/Upload/Upload.vue.d.ts +80 -0
- package/dist/components/User/UserBasicInformation.vue.d.ts +1 -1
- package/dist/components/User/UserPanel.vue.d.ts +23 -23
- package/dist/composables/Authkit/{useAppsAuthPageInfo.d.ts → useAuthkitAppsAuthPageInfo.d.ts} +1 -1
- package/dist/composables/Authkit/{useAuth.d.ts → useAuthkitAuth.d.ts} +1 -1
- package/dist/composables/Authkit/{useAuthModal.d.ts → useAuthkitAuthModal.d.ts} +1 -1
- package/dist/composables/Authkit/{useCreateAndUpdate.d.ts → useAuthkitCreateAndUpdate.d.ts} +1 -1
- package/dist/composables/Authkit/{useOAuth.d.ts → useAuthkitOAuth.d.ts} +1 -1
- package/dist/composables/Authkit/useAuthkitProps.d.ts +7 -0
- package/dist/composables/Authkit/{useUsersProfile.d.ts → useAuthkitUsersProfile.d.ts} +2 -2
- package/dist/composables/Upload/{useCos.d.ts → useUploadCos.d.ts} +1 -1
- package/dist/composables.d.ts +12 -0
- package/dist/composables.js +21 -0
- package/dist/feedback.d.ts +14 -0
- package/dist/feedback.js +17 -0
- package/dist/index-Cr5RQSnA.js +73 -0
- package/dist/index.js +153 -98959
- package/dist/landingPage.d.ts +42 -0
- package/dist/landingPage.js +45 -0
- package/dist/main.d.ts +13 -42
- package/dist/message.d.ts +17 -0
- package/dist/message.js +22 -0
- package/dist/pay.d.ts +1 -0
- package/dist/pay.js +4 -0
- package/dist/plugin-vue_export-helper-LjDO2Zua.js +19 -0
- package/dist/referrer.d.ts +1 -0
- package/dist/referrer.js +4 -0
- package/dist/style.css +1 -1
- package/dist/styles.d.ts +1 -0
- package/dist/styles.js +4 -0
- package/dist/upload.d.ts +2 -0
- package/dist/upload.js +6 -0
- package/dist/useActiveDoc-BWHkOJhJ.js +39 -0
- package/dist/useAuthkitCreateAndUpdate-BpPW409v.js +25 -0
- package/dist/useAuthkitProps-ZAjekGnM.js +287 -0
- package/dist/useMessageNotifications-lmP0vJDM.js +105 -0
- package/dist/useTableHandle-DKUIdSSh.js +69 -0
- package/dist/useUploadCos-DpOqkozy.js +7395 -0
- package/dist/useUserPanelProps-Dt9zkMJw.js +14 -0
- package/dist/user.d.ts +7 -0
- package/dist/user.js +10 -0
- package/package.json +75 -23
- package/dist/composables/Authkit/useProps.d.ts +0 -7
- package/dist/api/{MessageCenter → Message}/ChangelogNotifications.d.ts +0 -0
- package/dist/api/{MessageCenter → Message}/EventNotifications.d.ts +0 -0
- package/dist/api/{MessageCenter → Message}/MessageNotifications.d.ts +0 -0
- package/dist/api/{MessageCenter → Message}/NoticeNotifications.d.ts +0 -0
- package/dist/components/Authkit/AppSetting/{EmailBinding.vue.d.ts → AuthkitEmailBinding.vue.d.ts} +0 -0
- package/dist/components/Authkit/AppSetting/{EmailVerify.vue.d.ts → AuthkitEmailVerify.vue.d.ts} +0 -0
- package/dist/components/Authkit/AppSetting/{GithubBinding.vue.d.ts → AuthkitGithubBinding.vue.d.ts} +0 -0
- package/dist/components/Authkit/AppSetting/{PasswordUpdate.vue.d.ts → AuthkitPasswordUpdate.vue.d.ts} +0 -0
- package/dist/components/Authkit/AppSetting/{PersonalInformation.vue.d.ts → AuthkitPersonalInformation.vue.d.ts} +0 -0
- package/dist/components/Authkit/AppSetting/{SetPassword.vue.d.ts → AuthkitSetPassword.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{AuthContainer.vue.d.ts → AuthkitAuthContainer.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{Title.vue.d.ts → AuthkitAuthTitle.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{EmailUpdate.vue.d.ts → AuthkitEmailUpdate.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{OAuthItem.vue.d.ts → AuthkitOAuthItem.vue.d.ts} +1 -1
- package/dist/components/Authkit/Auth/{OAuthList.vue.d.ts → AuthkitOAuthList.vue.d.ts} +1 -1
- package/dist/components/Authkit/Auth/{PasswordAuth.vue.d.ts → AuthkitPasswordAuth.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{PasswordUpdateAndVerify.vue.d.ts → AuthkitPasswordUpdateAndVerify.vue.d.ts} +2 -2
- package/dist/components/Authkit/Auth/{ResetPassword.vue.d.ts → AuthkitResetPassword.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{ServiceAgreementAndPrivacyProtection.vue.d.ts → AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{SignIn.vue.d.ts → AuthkitSignIn.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{SignUp.vue.d.ts → AuthkitSignUp.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{SwitchSignIn.vue.d.ts → AuthkitSwitchSignIn.vue.d.ts} +0 -0
- package/dist/components/Authkit/Auth/{SwitchSignUpOrResetPassword.vue.d.ts → AuthkitSwitchSignUpOrResetPassword.vue.d.ts} +0 -0
- package/dist/components/Authkit/{AppSetting.vue.d.ts → AuthkitAppSetting.vue.d.ts} +2 -2
- package/dist/components/Authkit/{Auth.vue.d.ts → AuthkitAuth.vue.d.ts} +0 -0
- package/dist/components/Authkit/{AuthModal.vue.d.ts → AuthkitAuthModal.vue.d.ts} +4 -4
- package/dist/components/Authkit/{SendVerifyCode.vue.d.ts → AuthkitSendVerifyCode.vue.d.ts} +0 -0
- package/dist/components/Feedback/{BubbleEnd.vue.d.ts → FeedbackBubbleEnd.vue.d.ts} +0 -0
- package/dist/components/Feedback/{BubbleStart.vue.d.ts → FeedbackBubbleStart.vue.d.ts} +0 -0
- package/dist/components/Feedback/{Clipboard.vue.d.ts → FeedbackClipboard.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/CustomTabs.vue.d.ts → Feedback/FeedbackCustomTabs.vue.d.ts} +0 -0
- package/dist/components/Feedback/{FeedBackDetails.vue.d.ts → FeedbackFeedBackDetails.vue.d.ts} +0 -0
- package/dist/components/Feedback/{FeedBackFrom.vue.d.ts → FeedbackFeedBackFrom.vue.d.ts} +0 -0
- package/dist/components/Feedback/{FeedBackList.vue.d.ts → FeedbackFeedBackList.vue.d.ts} +0 -0
- package/dist/components/Feedback/{FeedBackModal.vue.d.ts → FeedbackFeedBackModal.vue.d.ts} +2 -2
- package/dist/components/Feedback/{Refresh.vue.d.ts → FeedbackRefresh.vue.d.ts} +0 -0
- package/dist/components/Feedback/{Screenshots.vue.d.ts → FeedbackScreenshots.vue.d.ts} +0 -0
- package/dist/components/{Pay/PricingGrid.vue.d.ts → LandingPage/LandingPageCard.vue.d.ts} +0 -0
- package/dist/components/{FooterContact.vue.d.ts → LandingPage/LandingPageFooterContact.vue.d.ts} +0 -0
- package/dist/components/{Pay/PricingCard.vue.d.ts → LandingPage/LandingPagePricingCard.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/AppMessage.vue.d.ts → Message/MessageAppMessage.vue.d.ts} +2 -2
- package/dist/components/{MessageCenter/ChangelogNotifications.vue.d.ts → Message/MessageChangelogNotifications.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/ChangelogNotificationsDetails.vue.d.ts → Message/MessageChangelogNotificationsDetails.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/Details.vue.d.ts → Message/MessageDetails.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/EventNotifications.vue.d.ts → Message/MessageEventNotifications.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/EventNotificationsDetails.vue.d.ts → Message/MessageEventNotificationsDetails.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/InfiniteLoading.vue.d.ts → Message/MessageInfiniteLoading.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter → Message}/MessageList.vue.d.ts +0 -0
- package/dist/components/{MessageCenter/MessageNotifications.vue.d.ts → Message/MessageNoticeNotifications.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/NoticeNotificationsDetails.vue.d.ts → Message/MessageNoticeNotificationsDetails.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter/NoticeNotifications.vue.d.ts → Message/MessageNotifications.vue.d.ts} +0 -0
- package/dist/components/{MessageCenter → Message}/MessageTabs.vue.d.ts +0 -0
- package/dist/components/Pay/{Subscriptions.vue.d.ts → PaySubscriptions.vue.d.ts} +2 -2
- /package/dist/components/Referrer/{Referees.vue.d.ts → ReferrerReferees.vue.d.ts} +0 -0
- /package/dist/components/User/{SubscriptionBaseInformation.vue.d.ts → UserSubscriptionBaseInformation.vue.d.ts} +0 -0
|
@@ -0,0 +1,1815 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { defineComponent as k, createBlock as y, openBlock as g, unref as e, withCtx as c, createElementVNode as w, toDisplayString as L, createVNode as o, computed as R, createElementBlock as U, createCommentVNode as S, createTextVNode as z, ref as h, onMounted as N, onUnmounted as se, withDirectives as ve, vShow as ge, useSlots as _e, renderSlot as ne, normalizeStyle as D, isRef as ae, normalizeClass as he, Fragment as W } from "vue";
|
|
5
|
+
import { Button as $, Divider as ye, Form as B, FormItem as I, Input as C, Link as E, Modal as le, Avatar as oe, Textarea as be, Message as O, Alert as T } from "@arco-design/web-vue";
|
|
6
|
+
import { U as K, u as Z, b as we, c as ze, e as Se, f as ie, g as ke, a as J, h as Ae, i as Ie } from "./useAuthkitProps-ZAjekGnM.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { Icon as Pe } from "@iconify/vue";
|
|
9
|
+
import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { u as Ue } from "./useUploadCos-DpOqkozy.js";
|
|
14
|
+
import { _ as Ve, g as Ce, i as $e } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
15
|
+
import { api as F } from "@huyooo/api";
|
|
16
|
+
import { M as xe } from "./Menu-2SePYCYT.js";
|
|
17
|
+
import { u as qe } from "./useAuthkitCreateAndUpdate-BpPW409v.js";
|
|
18
|
+
function re() {
|
|
19
|
+
return F({
|
|
20
|
+
url: "/restfulApi/OAuth/github/login",
|
|
21
|
+
method: "get"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function Re() {
|
|
25
|
+
re().then(({
|
|
26
|
+
data: n
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
redirectUri: a
|
|
30
|
+
} = n;
|
|
31
|
+
console.log(a, "redirectUri"), window.location = a;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function Te() {
|
|
35
|
+
}
|
|
36
|
+
function Le() {
|
|
37
|
+
}
|
|
38
|
+
function Be() {
|
|
39
|
+
return {
|
|
40
|
+
githubAuth: Re,
|
|
41
|
+
googleAuth: Te,
|
|
42
|
+
microsoftAuth: Le
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const H = /* @__PURE__ */ k({
|
|
46
|
+
__name: "AuthkitOAuthItem",
|
|
47
|
+
props: {
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: !0
|
|
51
|
+
},
|
|
52
|
+
icon: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: !0,
|
|
55
|
+
default: () => ""
|
|
56
|
+
},
|
|
57
|
+
label: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: !0,
|
|
60
|
+
default: () => ""
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
emits: [],
|
|
64
|
+
setup(n, {
|
|
65
|
+
emit: a
|
|
66
|
+
}) {
|
|
67
|
+
const r = n;
|
|
68
|
+
return (i, m) => (g(), y(e($), {
|
|
69
|
+
class: "OAuthItem",
|
|
70
|
+
type: "primary",
|
|
71
|
+
size: r.size
|
|
72
|
+
}, {
|
|
73
|
+
icon: c(() => [o(e(Pe), {
|
|
74
|
+
icon: r.icon
|
|
75
|
+
}, null, 8, ["icon"])]),
|
|
76
|
+
default: c(() => [w("span", null, L(r.label), 1)]),
|
|
77
|
+
_: 1
|
|
78
|
+
}, 8, ["size"]));
|
|
79
|
+
}
|
|
80
|
+
}), Ee = {
|
|
81
|
+
class: "OAuthList"
|
|
82
|
+
}, Oe = {
|
|
83
|
+
class: "OAuthList"
|
|
84
|
+
}, Ne = /* @__PURE__ */ k({
|
|
85
|
+
__name: "AuthkitOAuthList",
|
|
86
|
+
props: {
|
|
87
|
+
size: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: () => "large"
|
|
90
|
+
},
|
|
91
|
+
appId: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: () => ""
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
setup(n) {
|
|
97
|
+
const {
|
|
98
|
+
appsData: a
|
|
99
|
+
} = K(), r = n, {
|
|
100
|
+
githubAuth: i,
|
|
101
|
+
googleAuth: m,
|
|
102
|
+
microsoftAuth: u
|
|
103
|
+
} = Be(), t = R(() => !(!a.value.oauth.google.enabled && !a.value.oauth.microsoft.enabled && !a.value.oauth.github.enabled && !a.value.oauth.wechat.enabled));
|
|
104
|
+
return (d, _) => (g(), U("div", Ee, [t.value ? (g(), y(e(ye), {
|
|
105
|
+
key: 0,
|
|
106
|
+
orientation: "center"
|
|
107
|
+
}, {
|
|
108
|
+
default: c(() => _[0] || (_[0] = [z("OAuth登陆")])),
|
|
109
|
+
_: 1,
|
|
110
|
+
__: [0]
|
|
111
|
+
})) : S("", !0), w("div", Oe, [e(a).oauth.github.enabled ? (g(), y(H, {
|
|
112
|
+
key: 0,
|
|
113
|
+
icon: "mdi:github",
|
|
114
|
+
label: "Github",
|
|
115
|
+
size: r.size,
|
|
116
|
+
onClick: e(i)
|
|
117
|
+
}, null, 8, ["size", "onClick"])) : S("", !0), e(a).oauth.google.enabled ? (g(), y(H, {
|
|
118
|
+
key: 1,
|
|
119
|
+
icon: "mdi:google",
|
|
120
|
+
label: "Google",
|
|
121
|
+
size: r.size,
|
|
122
|
+
onClick: e(m)
|
|
123
|
+
}, null, 8, ["size", "onClick"])) : S("", !0), e(a).oauth.microsoft.enabled ? (g(), y(H, {
|
|
124
|
+
key: 2,
|
|
125
|
+
icon: "mdi:microsoft",
|
|
126
|
+
label: "Microsoft",
|
|
127
|
+
size: r.size,
|
|
128
|
+
onClick: e(u)
|
|
129
|
+
}, null, 8, ["size", "onClick"])) : S("", !0)])]));
|
|
130
|
+
}
|
|
131
|
+
}), Fe = /* @__PURE__ */ P(Ne, [["__scopeId", "data-v-7c6620c0"]]);
|
|
132
|
+
function Ge(n) {
|
|
133
|
+
return F({
|
|
134
|
+
url: "/restfulApi/verify/email",
|
|
135
|
+
method: "post",
|
|
136
|
+
data: n
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function Q(n) {
|
|
140
|
+
return F({
|
|
141
|
+
url: "/restfulApi/verify/email/retry",
|
|
142
|
+
method: "post",
|
|
143
|
+
data: n
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function Me(n) {
|
|
147
|
+
return F({
|
|
148
|
+
url: "/restfulApi/verify/password",
|
|
149
|
+
method: "post",
|
|
150
|
+
data: n
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
const He = /* @__PURE__ */ k({
|
|
154
|
+
__name: "AuthkitSendVerifyCode",
|
|
155
|
+
props: {
|
|
156
|
+
size: {
|
|
157
|
+
type: String,
|
|
158
|
+
required: !0
|
|
159
|
+
},
|
|
160
|
+
loading: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
required: !0,
|
|
163
|
+
default: () => !1
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
emits: ["send"],
|
|
167
|
+
setup(n, {
|
|
168
|
+
expose: a,
|
|
169
|
+
emit: r
|
|
170
|
+
}) {
|
|
171
|
+
const i = r, m = n, u = h(!1);
|
|
172
|
+
let t;
|
|
173
|
+
const d = h(0), _ = R(() => d.value.toString().padStart(2, "0")), s = R(() => d.value > 0), l = () => {
|
|
174
|
+
u.value && (d.value <= 0 ? (clearInterval(t), u.value = !1) : d.value--);
|
|
175
|
+
};
|
|
176
|
+
function p() {
|
|
177
|
+
i("send");
|
|
178
|
+
}
|
|
179
|
+
function f() {
|
|
180
|
+
d.value = 60, u.value = !0, t && clearInterval(t), t = setInterval(l, 1e3);
|
|
181
|
+
}
|
|
182
|
+
return N(() => {
|
|
183
|
+
}), a({
|
|
184
|
+
startCountFn: f
|
|
185
|
+
}), se(() => {
|
|
186
|
+
t && clearInterval(t);
|
|
187
|
+
}), (v, b) => (g(), y(e($), {
|
|
188
|
+
class: "OAuthItem",
|
|
189
|
+
type: "primary",
|
|
190
|
+
size: m.size,
|
|
191
|
+
disabled: s.value,
|
|
192
|
+
loading: m.loading,
|
|
193
|
+
onClick: p
|
|
194
|
+
}, {
|
|
195
|
+
default: c(() => [b[0] || (b[0] = w("span", null, " 发送验证码", -1)), ve(w("span", {
|
|
196
|
+
class: "verify-code-timer"
|
|
197
|
+
}, L(`(${_.value})`), 513), [[ge, s.value]])]),
|
|
198
|
+
_: 1,
|
|
199
|
+
__: [0]
|
|
200
|
+
}, 8, ["size", "disabled", "loading"]));
|
|
201
|
+
}
|
|
202
|
+
}), X = /* @__PURE__ */ P(He, [["__scopeId", "data-v-2883dc6d"]]), je = {
|
|
203
|
+
class: "content"
|
|
204
|
+
}, De = {
|
|
205
|
+
class: "sendVerifyCodeItem"
|
|
206
|
+
}, We = {
|
|
207
|
+
class: "handle"
|
|
208
|
+
}, Ke = /* @__PURE__ */ k({
|
|
209
|
+
__name: "AuthkitPasswordUpdateAndVerify",
|
|
210
|
+
props: {
|
|
211
|
+
size: {
|
|
212
|
+
type: String,
|
|
213
|
+
required: !0
|
|
214
|
+
},
|
|
215
|
+
loading: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
required: !0,
|
|
218
|
+
default: () => !0
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
emits: ["signIn", "submit"],
|
|
222
|
+
setup(n, {
|
|
223
|
+
emit: a
|
|
224
|
+
}) {
|
|
225
|
+
const r = a, i = n, m = h(), u = h(!1), t = h(), d = h({
|
|
226
|
+
email: void 0,
|
|
227
|
+
userToken: void 0,
|
|
228
|
+
emailVerifyId: void 0,
|
|
229
|
+
password: void 0,
|
|
230
|
+
confirmPassword: void 0
|
|
231
|
+
});
|
|
232
|
+
async function _() {
|
|
233
|
+
t.value.validateField(["email"]).then((l) => {
|
|
234
|
+
console.log(l, "value2121"), l || (u.value = !0, Q({
|
|
235
|
+
email: d.value.email
|
|
236
|
+
}).then(({
|
|
237
|
+
data: p
|
|
238
|
+
}) => {
|
|
239
|
+
u.value = !1, d.value.emailVerifyId = p.emailVerifyId, m.value.startCountFn();
|
|
240
|
+
}).catch(() => {
|
|
241
|
+
u.value = !1;
|
|
242
|
+
}));
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
async function s() {
|
|
246
|
+
t.value.validate().then((l) => {
|
|
247
|
+
l || r("submit", d.value);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return (l, p) => (g(), U("div", je, [o(e(B), {
|
|
251
|
+
ref_key: "formRef",
|
|
252
|
+
ref: t,
|
|
253
|
+
model: d.value,
|
|
254
|
+
size: i.size,
|
|
255
|
+
"auto-label-width": ""
|
|
256
|
+
}, {
|
|
257
|
+
default: c(() => [o(e(I), {
|
|
258
|
+
field: "email",
|
|
259
|
+
label: "邮箱",
|
|
260
|
+
"hide-label": "",
|
|
261
|
+
rules: [{
|
|
262
|
+
required: !0,
|
|
263
|
+
message: "请输入邮箱"
|
|
264
|
+
}, {
|
|
265
|
+
type: "email",
|
|
266
|
+
message: "请输入有效的邮箱"
|
|
267
|
+
}]
|
|
268
|
+
}, {
|
|
269
|
+
default: c(() => [o(e(C), {
|
|
270
|
+
modelValue: d.value.email,
|
|
271
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => d.value.email = f),
|
|
272
|
+
placeholder: "请输入邮箱"
|
|
273
|
+
}, null, 8, ["modelValue"])]),
|
|
274
|
+
_: 1
|
|
275
|
+
}), o(e(I), {
|
|
276
|
+
field: "userToken",
|
|
277
|
+
label: "验证码",
|
|
278
|
+
"hide-label": "",
|
|
279
|
+
rules: [{
|
|
280
|
+
required: !0,
|
|
281
|
+
message: "请输入验证码"
|
|
282
|
+
}]
|
|
283
|
+
}, {
|
|
284
|
+
default: c(() => [w("div", De, [o(e(C), {
|
|
285
|
+
modelValue: d.value.userToken,
|
|
286
|
+
"onUpdate:modelValue": p[1] || (p[1] = (f) => d.value.userToken = f),
|
|
287
|
+
placeholder: "请输入验证码"
|
|
288
|
+
}, null, 8, ["modelValue"]), o(X, {
|
|
289
|
+
ref_key: "SendVerifyCodeRef",
|
|
290
|
+
ref: m,
|
|
291
|
+
size: i.size,
|
|
292
|
+
loading: u.value,
|
|
293
|
+
style: {
|
|
294
|
+
"margin-left": "10px"
|
|
295
|
+
},
|
|
296
|
+
onSend: _
|
|
297
|
+
}, null, 8, ["size", "loading"])])]),
|
|
298
|
+
_: 1
|
|
299
|
+
}), o(e(I), {
|
|
300
|
+
field: "password",
|
|
301
|
+
label: "密码",
|
|
302
|
+
"hide-label": "",
|
|
303
|
+
rules: [{
|
|
304
|
+
required: !0,
|
|
305
|
+
message: "密码请输入"
|
|
306
|
+
}, {
|
|
307
|
+
minLength: 10,
|
|
308
|
+
message: "密码不能少于10字符"
|
|
309
|
+
}]
|
|
310
|
+
}, {
|
|
311
|
+
default: c(() => [o(e(C), {
|
|
312
|
+
modelValue: d.value.password,
|
|
313
|
+
"onUpdate:modelValue": p[2] || (p[2] = (f) => d.value.password = f),
|
|
314
|
+
placeholder: "请输入密码",
|
|
315
|
+
type: "password",
|
|
316
|
+
autocomplete: ""
|
|
317
|
+
}, null, 8, ["modelValue"])]),
|
|
318
|
+
_: 1
|
|
319
|
+
}), o(e(I), {
|
|
320
|
+
field: "confirmPassword",
|
|
321
|
+
label: "确认密码",
|
|
322
|
+
"hide-label": "",
|
|
323
|
+
rules: [{
|
|
324
|
+
required: !0,
|
|
325
|
+
message: "请输入确认密码"
|
|
326
|
+
}, {
|
|
327
|
+
minLength: 10,
|
|
328
|
+
message: "确认密码不能少于10字符"
|
|
329
|
+
}, {
|
|
330
|
+
validator: (f, v) => {
|
|
331
|
+
f !== d.value.password ? v("两次密码输入不一致,请重新输入") : v();
|
|
332
|
+
}
|
|
333
|
+
}]
|
|
334
|
+
}, {
|
|
335
|
+
default: c(() => [o(e(C), {
|
|
336
|
+
modelValue: d.value.confirmPassword,
|
|
337
|
+
"onUpdate:modelValue": p[3] || (p[3] = (f) => d.value.confirmPassword = f),
|
|
338
|
+
placeholder: "请输入确认密码密码",
|
|
339
|
+
type: "password",
|
|
340
|
+
autocomplete: ""
|
|
341
|
+
}, null, 8, ["modelValue"])]),
|
|
342
|
+
_: 1
|
|
343
|
+
}, 8, ["rules"]), w("div", We, [o(e($), {
|
|
344
|
+
type: "primary",
|
|
345
|
+
loading: i.loading,
|
|
346
|
+
long: "",
|
|
347
|
+
size: i.size,
|
|
348
|
+
onClick: s
|
|
349
|
+
}, {
|
|
350
|
+
default: c(() => p[4] || (p[4] = [z(" 提交 ")])),
|
|
351
|
+
_: 1,
|
|
352
|
+
__: [4]
|
|
353
|
+
}, 8, ["loading", "size"])])]),
|
|
354
|
+
_: 1
|
|
355
|
+
}, 8, ["model", "size"])]));
|
|
356
|
+
}
|
|
357
|
+
}), Ze = /* @__PURE__ */ P(Ke, [["__scopeId", "data-v-3e79c0eb"]]), Je = {
|
|
358
|
+
class: "SwitchSignIn"
|
|
359
|
+
}, Qe = /* @__PURE__ */ k({
|
|
360
|
+
__name: "AuthkitSwitchSignIn",
|
|
361
|
+
emits: ["switchSignIn"],
|
|
362
|
+
setup(n, {
|
|
363
|
+
emit: a
|
|
364
|
+
}) {
|
|
365
|
+
const r = a;
|
|
366
|
+
function i() {
|
|
367
|
+
r("switchSignIn");
|
|
368
|
+
}
|
|
369
|
+
return (m, u) => (g(), U("div", Je, [w("span", null, [u[1] || (u[1] = w("span", null, "已经有账号?", -1)), o(e(E), {
|
|
370
|
+
style: {
|
|
371
|
+
padding: "0px"
|
|
372
|
+
},
|
|
373
|
+
onClick: i
|
|
374
|
+
}, {
|
|
375
|
+
default: c(() => u[0] || (u[0] = [z("去登陆")])),
|
|
376
|
+
_: 1,
|
|
377
|
+
__: [0]
|
|
378
|
+
})])]));
|
|
379
|
+
}
|
|
380
|
+
}), ue = /* @__PURE__ */ P(Qe, [["__scopeId", "data-v-fc1d3903"]]), Xe = {
|
|
381
|
+
class: "ResetPassword"
|
|
382
|
+
}, Ye = /* @__PURE__ */ k({
|
|
383
|
+
__name: "AuthkitResetPassword",
|
|
384
|
+
props: {
|
|
385
|
+
size: {
|
|
386
|
+
type: String,
|
|
387
|
+
required: !0,
|
|
388
|
+
default: () => "large"
|
|
389
|
+
},
|
|
390
|
+
loading: {
|
|
391
|
+
type: Boolean,
|
|
392
|
+
required: !0,
|
|
393
|
+
default: () => !0
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
emits: ["switchSignIn", "submit"],
|
|
397
|
+
setup(n, {
|
|
398
|
+
emit: a
|
|
399
|
+
}) {
|
|
400
|
+
const r = a, i = n;
|
|
401
|
+
function m() {
|
|
402
|
+
console.log(2121221), r("switchSignIn");
|
|
403
|
+
}
|
|
404
|
+
async function u() {
|
|
405
|
+
r("submit");
|
|
406
|
+
}
|
|
407
|
+
return (t, d) => (g(), U("div", Xe, [o(Ze, {
|
|
408
|
+
loading: n.loading,
|
|
409
|
+
size: i.size,
|
|
410
|
+
onSubmit: u
|
|
411
|
+
}, null, 8, ["loading", "size"]), o(ue, {
|
|
412
|
+
onSwitchSignIn: m
|
|
413
|
+
})]));
|
|
414
|
+
}
|
|
415
|
+
}), et = /* @__PURE__ */ P(Ye, [["__scopeId", "data-v-0a6b6c07"]]), tt = {
|
|
416
|
+
class: "ServiceAgreementAndPrivacyProtection"
|
|
417
|
+
}, it = /* @__PURE__ */ k({
|
|
418
|
+
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
419
|
+
emits: ["toUserServiceAgreement", "toPrivacyPolicy"],
|
|
420
|
+
setup(n, {
|
|
421
|
+
emit: a
|
|
422
|
+
}) {
|
|
423
|
+
const r = a;
|
|
424
|
+
function i() {
|
|
425
|
+
r("toUserServiceAgreement");
|
|
426
|
+
}
|
|
427
|
+
function m() {
|
|
428
|
+
r("toPrivacyPolicy");
|
|
429
|
+
}
|
|
430
|
+
return (u, t) => (g(), U("div", tt, [t[2] || (t[2] = w("span", null, " 注册登陆即表示同意", -1)), o(e(E), {
|
|
431
|
+
onClick: i
|
|
432
|
+
}, {
|
|
433
|
+
default: c(() => t[0] || (t[0] = [z("用户服务协议")])),
|
|
434
|
+
_: 1,
|
|
435
|
+
__: [0]
|
|
436
|
+
}), t[3] || (t[3] = w("span", null, " 和 ", -1)), o(e(E), {
|
|
437
|
+
onClick: m
|
|
438
|
+
}, {
|
|
439
|
+
default: c(() => t[1] || (t[1] = [z("隐私协议")])),
|
|
440
|
+
_: 1,
|
|
441
|
+
__: [1]
|
|
442
|
+
})]));
|
|
443
|
+
}
|
|
444
|
+
}), st = /* @__PURE__ */ P(it, [["__scopeId", "data-v-18e831ec"]]), nt = {
|
|
445
|
+
class: "content"
|
|
446
|
+
}, at = {
|
|
447
|
+
class: "handle"
|
|
448
|
+
}, lt = /* @__PURE__ */ k({
|
|
449
|
+
__name: "AuthkitPasswordAuth",
|
|
450
|
+
props: {
|
|
451
|
+
size: {
|
|
452
|
+
type: String,
|
|
453
|
+
required: !0
|
|
454
|
+
},
|
|
455
|
+
loading: {
|
|
456
|
+
type: Boolean,
|
|
457
|
+
required: !0,
|
|
458
|
+
default: () => !0
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
emits: ["submit"],
|
|
462
|
+
setup(n, {
|
|
463
|
+
emit: a
|
|
464
|
+
}) {
|
|
465
|
+
const r = a, i = n;
|
|
466
|
+
async function m(_, s) {
|
|
467
|
+
const l = await Me({
|
|
468
|
+
password: _
|
|
469
|
+
});
|
|
470
|
+
l || s("密码验证请求出错!");
|
|
471
|
+
const {
|
|
472
|
+
isValidate: p,
|
|
473
|
+
message: f
|
|
474
|
+
} = l.data;
|
|
475
|
+
p || s(f), s();
|
|
476
|
+
}
|
|
477
|
+
const u = h(), t = h({
|
|
478
|
+
email: void 0,
|
|
479
|
+
password: void 0
|
|
480
|
+
});
|
|
481
|
+
async function d() {
|
|
482
|
+
u.value.validate().then((_) => {
|
|
483
|
+
_ || r("submit", t.value);
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
return (_, s) => (g(), U("div", nt, [o(e(B), {
|
|
487
|
+
ref_key: "formRef",
|
|
488
|
+
ref: u,
|
|
489
|
+
model: t.value,
|
|
490
|
+
size: i.size,
|
|
491
|
+
"auto-label-width": ""
|
|
492
|
+
}, {
|
|
493
|
+
default: c(() => [o(e(I), {
|
|
494
|
+
field: "email",
|
|
495
|
+
label: "邮箱",
|
|
496
|
+
"hide-label": "",
|
|
497
|
+
rules: [{
|
|
498
|
+
required: !0,
|
|
499
|
+
message: "请输入邮箱"
|
|
500
|
+
}, {
|
|
501
|
+
type: "email",
|
|
502
|
+
message: "请输入有效的邮箱"
|
|
503
|
+
}]
|
|
504
|
+
}, {
|
|
505
|
+
default: c(() => [o(e(C), {
|
|
506
|
+
modelValue: t.value.email,
|
|
507
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value.email = l),
|
|
508
|
+
placeholder: "请输入邮箱"
|
|
509
|
+
}, null, 8, ["modelValue"])]),
|
|
510
|
+
_: 1
|
|
511
|
+
}), o(e(I), {
|
|
512
|
+
field: "password",
|
|
513
|
+
label: "密码",
|
|
514
|
+
"hide-label": "",
|
|
515
|
+
rules: [{
|
|
516
|
+
required: !0,
|
|
517
|
+
message: "请输入密码"
|
|
518
|
+
}, {
|
|
519
|
+
validator: m
|
|
520
|
+
}]
|
|
521
|
+
}, {
|
|
522
|
+
default: c(() => [o(e(C), {
|
|
523
|
+
modelValue: t.value.password,
|
|
524
|
+
"onUpdate:modelValue": s[1] || (s[1] = (l) => t.value.password = l),
|
|
525
|
+
placeholder: "请输入密码",
|
|
526
|
+
type: "password"
|
|
527
|
+
}, null, 8, ["modelValue"])]),
|
|
528
|
+
_: 1
|
|
529
|
+
}, 8, ["rules"]), w("div", at, [o(e($), {
|
|
530
|
+
type: "primary",
|
|
531
|
+
loading: i.loading,
|
|
532
|
+
long: "",
|
|
533
|
+
size: i.size,
|
|
534
|
+
onClick: d
|
|
535
|
+
}, {
|
|
536
|
+
default: c(() => s[2] || (s[2] = [z(" 登陆 ")])),
|
|
537
|
+
_: 1,
|
|
538
|
+
__: [2]
|
|
539
|
+
}, 8, ["loading", "size"])])]),
|
|
540
|
+
_: 1
|
|
541
|
+
}, 8, ["model", "size"])]));
|
|
542
|
+
}
|
|
543
|
+
}), ot = /* @__PURE__ */ P(lt, [["__scopeId", "data-v-c9ba960d"]]), rt = {
|
|
544
|
+
class: "SwitchSignUpOrResetPassword"
|
|
545
|
+
}, ut = /* @__PURE__ */ k({
|
|
546
|
+
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
547
|
+
emits: ["switchSignUp", "switchResetPassword"],
|
|
548
|
+
setup(n, {
|
|
549
|
+
emit: a
|
|
550
|
+
}) {
|
|
551
|
+
const r = a;
|
|
552
|
+
function i() {
|
|
553
|
+
r("switchSignUp");
|
|
554
|
+
}
|
|
555
|
+
function m() {
|
|
556
|
+
r("switchResetPassword");
|
|
557
|
+
}
|
|
558
|
+
return (u, t) => (g(), U("div", rt, [w("span", null, [t[1] || (t[1] = w("span", null, " 还没有账户?", -1)), o(e(E), {
|
|
559
|
+
style: {
|
|
560
|
+
padding: "0px"
|
|
561
|
+
},
|
|
562
|
+
onClick: i
|
|
563
|
+
}, {
|
|
564
|
+
default: c(() => t[0] || (t[0] = [z("去注册?")])),
|
|
565
|
+
_: 1,
|
|
566
|
+
__: [0]
|
|
567
|
+
})]), o(e(E), {
|
|
568
|
+
style: {
|
|
569
|
+
padding: "0px"
|
|
570
|
+
},
|
|
571
|
+
onClick: m
|
|
572
|
+
}, {
|
|
573
|
+
default: c(() => t[2] || (t[2] = [z(" 忘记密码?")])),
|
|
574
|
+
_: 1,
|
|
575
|
+
__: [2]
|
|
576
|
+
})]));
|
|
577
|
+
}
|
|
578
|
+
}), dt = /* @__PURE__ */ P(ut, [["__scopeId", "data-v-14e3aab2"]]), ct = {
|
|
579
|
+
class: "SignIn"
|
|
580
|
+
}, mt = /* @__PURE__ */ k({
|
|
581
|
+
__name: "AuthkitSignIn",
|
|
582
|
+
props: {
|
|
583
|
+
size: {
|
|
584
|
+
type: String,
|
|
585
|
+
required: !0
|
|
586
|
+
},
|
|
587
|
+
loading: {
|
|
588
|
+
type: Boolean,
|
|
589
|
+
required: !0,
|
|
590
|
+
default: () => !0
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
594
|
+
setup(n, {
|
|
595
|
+
emit: a
|
|
596
|
+
}) {
|
|
597
|
+
const r = a, i = n, m = _e(), u = R(() => !!m.OAuth);
|
|
598
|
+
function t() {
|
|
599
|
+
r("switchSignUp");
|
|
600
|
+
}
|
|
601
|
+
function d() {
|
|
602
|
+
r("switchResetPassword");
|
|
603
|
+
}
|
|
604
|
+
async function _(s) {
|
|
605
|
+
console.log(s, "datadatadata"), r("submit", s);
|
|
606
|
+
}
|
|
607
|
+
return (s, l) => (g(), U("div", ct, [S("", !0), o(ot, {
|
|
608
|
+
loading: i.loading,
|
|
609
|
+
size: i.size,
|
|
610
|
+
onSubmit: _
|
|
611
|
+
}, null, 8, ["loading", "size"]), u.value ? ne(s.$slots, "OAuth", {
|
|
612
|
+
key: 1
|
|
613
|
+
}, void 0, !0) : S("", !0), o(dt, {
|
|
614
|
+
onSwitchSignUp: t,
|
|
615
|
+
onSwitchResetPassword: d
|
|
616
|
+
})]));
|
|
617
|
+
}
|
|
618
|
+
}), ft = /* @__PURE__ */ P(mt, [["__scopeId", "data-v-6f09c116"]]), pt = {
|
|
619
|
+
class: "content"
|
|
620
|
+
}, vt = {
|
|
621
|
+
class: "sendVerifyCodeItem"
|
|
622
|
+
}, gt = {
|
|
623
|
+
class: "handle"
|
|
624
|
+
}, _t = /* @__PURE__ */ k({
|
|
625
|
+
__name: "AuthkitEmailUpdate",
|
|
626
|
+
props: {
|
|
627
|
+
size: {
|
|
628
|
+
type: String,
|
|
629
|
+
required: !0
|
|
630
|
+
},
|
|
631
|
+
loading: {
|
|
632
|
+
type: Boolean,
|
|
633
|
+
required: !0,
|
|
634
|
+
default: () => !0
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
emits: ["submit"],
|
|
638
|
+
setup(n, {
|
|
639
|
+
emit: a
|
|
640
|
+
}) {
|
|
641
|
+
const r = a, i = n, m = h(), u = h(!1), t = h(), d = h({
|
|
642
|
+
email: void 0,
|
|
643
|
+
userToken: void 0,
|
|
644
|
+
emailVerifyId: void 0,
|
|
645
|
+
password: void 0,
|
|
646
|
+
confirmPassword: void 0
|
|
647
|
+
});
|
|
648
|
+
async function _() {
|
|
649
|
+
t.value.validateField(["email"]).then((l) => {
|
|
650
|
+
console.log(l, "value2121"), l || (u.value = !0, Q({
|
|
651
|
+
email: d.value.email
|
|
652
|
+
}).then(({
|
|
653
|
+
data: p
|
|
654
|
+
}) => {
|
|
655
|
+
d.value.emailVerifyId = p.emailVerifyId, u.value = !1, m.value.startCountFn();
|
|
656
|
+
}).catch(() => {
|
|
657
|
+
u.value = !1;
|
|
658
|
+
}));
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
async function s() {
|
|
662
|
+
t.value.validate().then((l) => {
|
|
663
|
+
l || r("submit", d.value);
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
return (l, p) => (g(), U("div", pt, [o(e(B), {
|
|
667
|
+
ref_key: "formRef",
|
|
668
|
+
ref: t,
|
|
669
|
+
model: d.value,
|
|
670
|
+
size: i.size,
|
|
671
|
+
"auto-label-width": ""
|
|
672
|
+
}, {
|
|
673
|
+
default: c(() => [o(e(I), {
|
|
674
|
+
field: "email",
|
|
675
|
+
label: "邮箱",
|
|
676
|
+
"hide-label": "",
|
|
677
|
+
rules: [{
|
|
678
|
+
required: !0,
|
|
679
|
+
message: "请输入邮箱"
|
|
680
|
+
}, {
|
|
681
|
+
type: "email",
|
|
682
|
+
message: "请输入有效的邮箱"
|
|
683
|
+
}]
|
|
684
|
+
}, {
|
|
685
|
+
default: c(() => [o(e(C), {
|
|
686
|
+
modelValue: d.value.email,
|
|
687
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => d.value.email = f),
|
|
688
|
+
placeholder: "请输入邮箱"
|
|
689
|
+
}, null, 8, ["modelValue"])]),
|
|
690
|
+
_: 1
|
|
691
|
+
}), o(e(I), {
|
|
692
|
+
field: "userToken",
|
|
693
|
+
label: "验证码",
|
|
694
|
+
"hide-label": "",
|
|
695
|
+
rules: [{
|
|
696
|
+
required: !0,
|
|
697
|
+
message: "请输入验证码"
|
|
698
|
+
}]
|
|
699
|
+
}, {
|
|
700
|
+
default: c(() => [w("div", vt, [o(e(C), {
|
|
701
|
+
modelValue: d.value.userToken,
|
|
702
|
+
"onUpdate:modelValue": p[1] || (p[1] = (f) => d.value.userToken = f),
|
|
703
|
+
placeholder: "请输入验证码"
|
|
704
|
+
}, null, 8, ["modelValue"]), o(X, {
|
|
705
|
+
ref_key: "SendVerifyCodeRef",
|
|
706
|
+
ref: m,
|
|
707
|
+
size: i.size,
|
|
708
|
+
loading: u.value,
|
|
709
|
+
style: {
|
|
710
|
+
"margin-left": "10px"
|
|
711
|
+
},
|
|
712
|
+
onSend: _
|
|
713
|
+
}, null, 8, ["size", "loading"])])]),
|
|
714
|
+
_: 1
|
|
715
|
+
}), o(e(I), {
|
|
716
|
+
field: "password",
|
|
717
|
+
label: "密码",
|
|
718
|
+
"hide-label": "",
|
|
719
|
+
rules: [{
|
|
720
|
+
required: !0,
|
|
721
|
+
message: "密码请输入"
|
|
722
|
+
}, {
|
|
723
|
+
minLength: 10,
|
|
724
|
+
message: "密码不能少于10字符"
|
|
725
|
+
}]
|
|
726
|
+
}, {
|
|
727
|
+
default: c(() => [o(e(C), {
|
|
728
|
+
modelValue: d.value.password,
|
|
729
|
+
"onUpdate:modelValue": p[2] || (p[2] = (f) => d.value.password = f),
|
|
730
|
+
placeholder: "请输入密码",
|
|
731
|
+
type: "password"
|
|
732
|
+
}, null, 8, ["modelValue"])]),
|
|
733
|
+
_: 1
|
|
734
|
+
}), o(e(I), {
|
|
735
|
+
field: "confirmPassword",
|
|
736
|
+
label: "确认密码",
|
|
737
|
+
"hide-label": "",
|
|
738
|
+
rules: [{
|
|
739
|
+
required: !0,
|
|
740
|
+
message: "请输入确认密码"
|
|
741
|
+
}, {
|
|
742
|
+
minLength: 10,
|
|
743
|
+
message: "确认密码不能少于10字符"
|
|
744
|
+
}, {
|
|
745
|
+
validator: (f, v) => {
|
|
746
|
+
f !== d.value.password ? v("两次密码输入不一致,请重新输入") : v();
|
|
747
|
+
}
|
|
748
|
+
}]
|
|
749
|
+
}, {
|
|
750
|
+
default: c(() => [o(e(C), {
|
|
751
|
+
modelValue: d.value.confirmPassword,
|
|
752
|
+
"onUpdate:modelValue": p[3] || (p[3] = (f) => d.value.confirmPassword = f),
|
|
753
|
+
placeholder: "请输入确认密码密码",
|
|
754
|
+
type: "password"
|
|
755
|
+
}, null, 8, ["modelValue"])]),
|
|
756
|
+
_: 1
|
|
757
|
+
}, 8, ["rules"]), w("div", gt, [o(e($), {
|
|
758
|
+
type: "primary",
|
|
759
|
+
loading: i.loading,
|
|
760
|
+
long: "",
|
|
761
|
+
size: i.size,
|
|
762
|
+
onClick: s
|
|
763
|
+
}, {
|
|
764
|
+
default: c(() => p[4] || (p[4] = [z(" 提交 ")])),
|
|
765
|
+
_: 1,
|
|
766
|
+
__: [4]
|
|
767
|
+
}, 8, ["loading", "size"])])]),
|
|
768
|
+
_: 1
|
|
769
|
+
}, 8, ["model", "size"])]));
|
|
770
|
+
}
|
|
771
|
+
}), de = /* @__PURE__ */ P(_t, [["__scopeId", "data-v-91c7ee6b"]]), ht = {
|
|
772
|
+
class: "SignUp"
|
|
773
|
+
}, yt = /* @__PURE__ */ k({
|
|
774
|
+
__name: "AuthkitSignUp",
|
|
775
|
+
props: {
|
|
776
|
+
size: {
|
|
777
|
+
type: String,
|
|
778
|
+
required: !0
|
|
779
|
+
},
|
|
780
|
+
loading: {
|
|
781
|
+
type: Boolean,
|
|
782
|
+
required: !0,
|
|
783
|
+
default: () => !0
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
emits: ["switchSignIn", "submit"],
|
|
787
|
+
setup(n, {
|
|
788
|
+
emit: a
|
|
789
|
+
}) {
|
|
790
|
+
const r = a, i = n;
|
|
791
|
+
function m() {
|
|
792
|
+
console.log(2121221), r("switchSignIn");
|
|
793
|
+
}
|
|
794
|
+
async function u(t) {
|
|
795
|
+
r("submit", t);
|
|
796
|
+
}
|
|
797
|
+
return (t, d) => (g(), U("div", ht, [o(de, {
|
|
798
|
+
size: i.size,
|
|
799
|
+
loading: n.loading,
|
|
800
|
+
onSubmit: u
|
|
801
|
+
}, null, 8, ["size", "loading"]), o(ue, {
|
|
802
|
+
onSwitchSignIn: m
|
|
803
|
+
})]));
|
|
804
|
+
}
|
|
805
|
+
}), bt = /* @__PURE__ */ P(yt, [["__scopeId", "data-v-3e0c04dc"]]), wt = ["src"], zt = /* @__PURE__ */ k({
|
|
806
|
+
__name: "AuthkitAuthTitle",
|
|
807
|
+
props: {
|
|
808
|
+
size: {
|
|
809
|
+
type: [String, Number],
|
|
810
|
+
required: !1,
|
|
811
|
+
default: 30
|
|
812
|
+
},
|
|
813
|
+
fontSize: {
|
|
814
|
+
type: Number,
|
|
815
|
+
required: !1,
|
|
816
|
+
default: 18
|
|
817
|
+
},
|
|
818
|
+
lineHeight: {
|
|
819
|
+
type: Number,
|
|
820
|
+
required: !1,
|
|
821
|
+
default: 60
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
setup(n) {
|
|
825
|
+
const a = n, r = `${a.size}px`, i = `${a.fontSize}px`, m = `${a.lineHeight}px`, {
|
|
826
|
+
currentView: u
|
|
827
|
+
} = Z(), {
|
|
828
|
+
appsData: t
|
|
829
|
+
} = K(), d = R(() => u.value === "signIn" ? `${t.value.name}登录` : u.value === "signUp" ? `${t.value.name}账号注册` : u.value === "resetPassword" ? `${t.value.name}密码重置` : "");
|
|
830
|
+
return (_, s) => (g(), U("div", {
|
|
831
|
+
class: "Title",
|
|
832
|
+
style: D({
|
|
833
|
+
fontSize: i,
|
|
834
|
+
lineHeight: m
|
|
835
|
+
})
|
|
836
|
+
}, [e(t).applicationLogoUrl ? (g(), U("img", {
|
|
837
|
+
key: 0,
|
|
838
|
+
src: e(t).applicationLogoUrl,
|
|
839
|
+
srcset: "",
|
|
840
|
+
style: D({
|
|
841
|
+
width: r
|
|
842
|
+
})
|
|
843
|
+
}, null, 12, wt)) : S("", !0), w("span", null, L(d.value), 1), ne(_.$slots, "default", {}, void 0, !0)], 4));
|
|
844
|
+
}
|
|
845
|
+
}), ce = /* @__PURE__ */ P(zt, [["__scopeId", "data-v-8255764a"]]), St = {
|
|
846
|
+
class: "Auth"
|
|
847
|
+
}, kt = {
|
|
848
|
+
class: "body"
|
|
849
|
+
}, At = /* @__PURE__ */ k({
|
|
850
|
+
__name: "AuthkitAuth",
|
|
851
|
+
props: {
|
|
852
|
+
size: {
|
|
853
|
+
type: String,
|
|
854
|
+
required: !0
|
|
855
|
+
},
|
|
856
|
+
showTitle: {
|
|
857
|
+
type: Boolean,
|
|
858
|
+
default: () => !0
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
862
|
+
setup(n, {
|
|
863
|
+
emit: a
|
|
864
|
+
}) {
|
|
865
|
+
const r = n, i = a, {
|
|
866
|
+
signInSubmit: m,
|
|
867
|
+
signUpSubmit: u,
|
|
868
|
+
resetPasswordSubmit: t,
|
|
869
|
+
currentView: d,
|
|
870
|
+
authSignInLoading: _,
|
|
871
|
+
authSignUpLoading: s,
|
|
872
|
+
resetPasswordLoading: l,
|
|
873
|
+
switchSignUp: p,
|
|
874
|
+
switchResetPassword: f,
|
|
875
|
+
switchSignIn: v
|
|
876
|
+
} = Z(), {
|
|
877
|
+
appsAuthPageInfoApi: b
|
|
878
|
+
} = K();
|
|
879
|
+
function q() {
|
|
880
|
+
i("toPrivacyPolicy");
|
|
881
|
+
}
|
|
882
|
+
function V() {
|
|
883
|
+
i("toUserServiceAgreement");
|
|
884
|
+
}
|
|
885
|
+
return b(), (A, x) => (g(), U("div", St, [n.showTitle ? (g(), y(ce, {
|
|
886
|
+
key: 0,
|
|
887
|
+
size: 32,
|
|
888
|
+
"font-size": 20
|
|
889
|
+
})) : S("", !0), w("div", kt, [e(d) === "signIn" ? (g(), y(ft, {
|
|
890
|
+
key: 0,
|
|
891
|
+
size: r.size,
|
|
892
|
+
loading: e(_),
|
|
893
|
+
onSwitchSignUp: e(p),
|
|
894
|
+
onSwitchResetPassword: e(f),
|
|
895
|
+
onSubmit: e(m)
|
|
896
|
+
}, {
|
|
897
|
+
OAuth: c(() => [o(Fe, {
|
|
898
|
+
size: r.size
|
|
899
|
+
}, null, 8, ["size"])]),
|
|
900
|
+
_: 1
|
|
901
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword", "onSubmit"])) : e(d) === "signUp" ? (g(), y(bt, {
|
|
902
|
+
key: 1,
|
|
903
|
+
size: r.size,
|
|
904
|
+
loading: e(s),
|
|
905
|
+
onSwitchSignIn: e(v),
|
|
906
|
+
onSubmit: e(u)
|
|
907
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn", "onSubmit"])) : e(d) === "resetPassword" ? (g(), y(et, {
|
|
908
|
+
key: 2,
|
|
909
|
+
size: r.size,
|
|
910
|
+
loading: e(l),
|
|
911
|
+
onSwitchSignIn: e(v),
|
|
912
|
+
onSubmit: e(t)
|
|
913
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn", "onSubmit"])) : S("", !0), o(st, {
|
|
914
|
+
onToPrivacyPolicy: q,
|
|
915
|
+
onToUserServiceAgreement: V
|
|
916
|
+
})])]));
|
|
917
|
+
}
|
|
918
|
+
}), It = /* @__PURE__ */ P(At, [["__scopeId", "data-v-865d3320"]]), Pt = /* @__PURE__ */ k({
|
|
919
|
+
__name: "AuthkitAuthModal",
|
|
920
|
+
props: {
|
|
921
|
+
size: {
|
|
922
|
+
type: String,
|
|
923
|
+
required: !0
|
|
924
|
+
},
|
|
925
|
+
appId: {
|
|
926
|
+
type: String,
|
|
927
|
+
default: () => ""
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
emits: ["confirm", "close", "toPrivacyPolicy", "toUserServiceAgreement"],
|
|
931
|
+
setup(n, {
|
|
932
|
+
emit: a
|
|
933
|
+
}) {
|
|
934
|
+
const {
|
|
935
|
+
addSignInCallback: r
|
|
936
|
+
} = Z(), {
|
|
937
|
+
show: i
|
|
938
|
+
} = we(), m = n, u = a;
|
|
939
|
+
function t(_) {
|
|
940
|
+
_(!0);
|
|
941
|
+
}
|
|
942
|
+
function d() {
|
|
943
|
+
i.value = !1, u("close");
|
|
944
|
+
}
|
|
945
|
+
return r(() => {
|
|
946
|
+
i.value = !1;
|
|
947
|
+
}), (_, s) => (g(), y(e(le), {
|
|
948
|
+
visible: e(i),
|
|
949
|
+
"onUpdate:visible": s[0] || (s[0] = (l) => ae(i) ? i.value = l : null),
|
|
950
|
+
footer: !1,
|
|
951
|
+
"mask-closable": !1,
|
|
952
|
+
"title-align": "center",
|
|
953
|
+
"unmount-on-close": "",
|
|
954
|
+
width: "auto",
|
|
955
|
+
"modal-class": "SignInModalClass",
|
|
956
|
+
onBeforeOk: t,
|
|
957
|
+
onClose: d
|
|
958
|
+
}, {
|
|
959
|
+
title: c(() => [o(ce)]),
|
|
960
|
+
default: c(() => [o(It, {
|
|
961
|
+
"show-title": !1,
|
|
962
|
+
size: m.size
|
|
963
|
+
}, null, 8, ["size"])]),
|
|
964
|
+
_: 1
|
|
965
|
+
}, 8, ["visible"]));
|
|
966
|
+
}
|
|
967
|
+
}), fi = /* @__PURE__ */ P(Pt, [["__scopeId", "data-v-a22ae615"]]), Ut = k({
|
|
968
|
+
name: "IconCamera",
|
|
969
|
+
props: {
|
|
970
|
+
size: {
|
|
971
|
+
type: [Number, String]
|
|
972
|
+
},
|
|
973
|
+
strokeWidth: {
|
|
974
|
+
type: Number,
|
|
975
|
+
default: 4
|
|
976
|
+
},
|
|
977
|
+
strokeLinecap: {
|
|
978
|
+
type: String,
|
|
979
|
+
default: "butt",
|
|
980
|
+
validator: (n) => ["butt", "round", "square"].includes(n)
|
|
981
|
+
},
|
|
982
|
+
strokeLinejoin: {
|
|
983
|
+
type: String,
|
|
984
|
+
default: "miter",
|
|
985
|
+
validator: (n) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(n)
|
|
986
|
+
},
|
|
987
|
+
rotate: Number,
|
|
988
|
+
spin: Boolean
|
|
989
|
+
},
|
|
990
|
+
emits: {
|
|
991
|
+
click: (n) => !0
|
|
992
|
+
},
|
|
993
|
+
setup(n, {
|
|
994
|
+
emit: a
|
|
995
|
+
}) {
|
|
996
|
+
const r = Ce("icon"), i = R(() => [r, `${r}-camera`, {
|
|
997
|
+
[`${r}-spin`]: n.spin
|
|
998
|
+
}]), m = R(() => {
|
|
999
|
+
const t = {};
|
|
1000
|
+
return n.size && (t.fontSize = $e(n.size) ? `${n.size}px` : n.size), n.rotate && (t.transform = `rotate(${n.rotate}deg)`), t;
|
|
1001
|
+
});
|
|
1002
|
+
return {
|
|
1003
|
+
cls: i,
|
|
1004
|
+
innerStyle: m,
|
|
1005
|
+
onClick: (t) => {
|
|
1006
|
+
a("click", t);
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
}), Vt = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
1011
|
+
function Ct(n, a, r, i, m, u) {
|
|
1012
|
+
return g(), U("svg", {
|
|
1013
|
+
viewBox: "0 0 48 48",
|
|
1014
|
+
fill: "none",
|
|
1015
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1016
|
+
stroke: "currentColor",
|
|
1017
|
+
class: he(n.cls),
|
|
1018
|
+
style: D(n.innerStyle),
|
|
1019
|
+
"stroke-width": n.strokeWidth,
|
|
1020
|
+
"stroke-linecap": n.strokeLinecap,
|
|
1021
|
+
"stroke-linejoin": n.strokeLinejoin,
|
|
1022
|
+
onClick: a[0] || (a[0] = (...t) => n.onClick && n.onClick(...t))
|
|
1023
|
+
}, a[1] || (a[1] = [w("path", {
|
|
1024
|
+
d: "m33 12-1.862-3.724A.5.5 0 0 0 30.691 8H17.309a.5.5 0 0 0-.447.276L15 12m16 14a7 7 0 1 1-14 0 7 7 0 0 1 14 0ZM7 40h34a1 1 0 0 0 1-1V13a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1Z"
|
|
1025
|
+
}, null, -1)]), 14, Vt);
|
|
1026
|
+
}
|
|
1027
|
+
var j = /* @__PURE__ */ Ve(Ut, [["render", Ct]]);
|
|
1028
|
+
const $t = Object.assign(j, {
|
|
1029
|
+
install: (n, a) => {
|
|
1030
|
+
var r;
|
|
1031
|
+
const i = (r = a == null ? void 0 : a.iconPrefix) != null ? r : "";
|
|
1032
|
+
n.component(i + j.name, j);
|
|
1033
|
+
}
|
|
1034
|
+
}), xt = {
|
|
1035
|
+
class: "handle"
|
|
1036
|
+
}, qt = /* @__PURE__ */ k({
|
|
1037
|
+
__name: "AuthkitPersonalInformation",
|
|
1038
|
+
props: {
|
|
1039
|
+
size: {
|
|
1040
|
+
type: String,
|
|
1041
|
+
required: !0
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
emits: ["submit"],
|
|
1045
|
+
setup(n, {
|
|
1046
|
+
emit: a
|
|
1047
|
+
}) {
|
|
1048
|
+
const {
|
|
1049
|
+
appId: r,
|
|
1050
|
+
bucketId: i,
|
|
1051
|
+
prefixUrl: m,
|
|
1052
|
+
bucket: u,
|
|
1053
|
+
region: t
|
|
1054
|
+
} = ze(), d = a, _ = n, s = h({
|
|
1055
|
+
id: void 0,
|
|
1056
|
+
nickname: "",
|
|
1057
|
+
description: "",
|
|
1058
|
+
avatar: "",
|
|
1059
|
+
avatarUrl: ""
|
|
1060
|
+
}), l = h(!1), p = h(), f = h(!1);
|
|
1061
|
+
function v() {
|
|
1062
|
+
f.value = !0, Se().then(({
|
|
1063
|
+
data: V
|
|
1064
|
+
}) => {
|
|
1065
|
+
f.value = !1, s.value.id = V.id, s.value.nickname = V.nickname, s.value.description = V.description, s.value.avatar = V.avatar, s.value.avatarUrl = V.avatarUrl;
|
|
1066
|
+
}).catch(() => {
|
|
1067
|
+
f.value = !1;
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
function b() {
|
|
1071
|
+
p.value.validate().then((V) => {
|
|
1072
|
+
if (!V) {
|
|
1073
|
+
f.value = !0;
|
|
1074
|
+
const A = {
|
|
1075
|
+
id: s.value.id,
|
|
1076
|
+
nickname: s.value.nickname,
|
|
1077
|
+
description: s.value.description,
|
|
1078
|
+
avatar: s.value.avatar
|
|
1079
|
+
};
|
|
1080
|
+
ie(A).then(({
|
|
1081
|
+
data: x
|
|
1082
|
+
}) => {
|
|
1083
|
+
f.value = !1, O.success("更新成功"), s.value.avatarUrl = x.avatarUrl, d("submit");
|
|
1084
|
+
}).catch(() => {
|
|
1085
|
+
f.value = !1;
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
v();
|
|
1091
|
+
const q = () => {
|
|
1092
|
+
const {
|
|
1093
|
+
uploadFile: V
|
|
1094
|
+
} = Ue({
|
|
1095
|
+
appId: r.value,
|
|
1096
|
+
bucketId: i.value,
|
|
1097
|
+
baseURL: m.value,
|
|
1098
|
+
bucket: u.value,
|
|
1099
|
+
region: t.value
|
|
1100
|
+
}), A = document.createElement("input");
|
|
1101
|
+
A.type = "file", A.accept = "image/*", A.style.display = "none", document.body.append(A), A.addEventListener("change", async (x) => {
|
|
1102
|
+
var te;
|
|
1103
|
+
const ee = (te = x.target.files) == null ? void 0 : te[0];
|
|
1104
|
+
if (ee) {
|
|
1105
|
+
l.value = !0;
|
|
1106
|
+
try {
|
|
1107
|
+
V({
|
|
1108
|
+
file: ee,
|
|
1109
|
+
onFileFinish(M, Zt, fe) {
|
|
1110
|
+
l.value = !0;
|
|
1111
|
+
const pe = {
|
|
1112
|
+
id: s.value.id,
|
|
1113
|
+
nickname: s.value.nickname,
|
|
1114
|
+
description: s.value.description,
|
|
1115
|
+
avatar: fe.Key
|
|
1116
|
+
};
|
|
1117
|
+
ie(pe).then(() => {
|
|
1118
|
+
l.value = !1, O.success("更新成功"), v(), d("submit");
|
|
1119
|
+
}).catch(() => {
|
|
1120
|
+
l.value = !1;
|
|
1121
|
+
});
|
|
1122
|
+
},
|
|
1123
|
+
onError(M) {
|
|
1124
|
+
console.error("上传图片失败"), l.value = !1;
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
} catch (M) {
|
|
1128
|
+
console.error("上传图片失败", M), l.value = !1;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
A.remove();
|
|
1132
|
+
}), A.click();
|
|
1133
|
+
};
|
|
1134
|
+
return (V, A) => (g(), y(e(B), {
|
|
1135
|
+
ref_key: "formRef",
|
|
1136
|
+
ref: p,
|
|
1137
|
+
model: s.value,
|
|
1138
|
+
"auto-label-width": "",
|
|
1139
|
+
size: _.size
|
|
1140
|
+
}, {
|
|
1141
|
+
default: c(() => [o(e(I), {
|
|
1142
|
+
field: "avatar",
|
|
1143
|
+
label: "头像",
|
|
1144
|
+
rules: [{
|
|
1145
|
+
required: !1,
|
|
1146
|
+
message: "请上传头像"
|
|
1147
|
+
}]
|
|
1148
|
+
}, {
|
|
1149
|
+
default: c(() => [o(e(oe), {
|
|
1150
|
+
"image-url": s.value.avatarUrl,
|
|
1151
|
+
size: 42,
|
|
1152
|
+
"trigger-icon-style": {
|
|
1153
|
+
color: "#3491FA"
|
|
1154
|
+
},
|
|
1155
|
+
onClick: q
|
|
1156
|
+
}, {
|
|
1157
|
+
"trigger-icon": c(() => [o(e($t))]),
|
|
1158
|
+
_: 1
|
|
1159
|
+
}, 8, ["image-url"])]),
|
|
1160
|
+
_: 1
|
|
1161
|
+
}), o(e(I), {
|
|
1162
|
+
field: "nickname",
|
|
1163
|
+
label: "昵称",
|
|
1164
|
+
rules: [{
|
|
1165
|
+
required: !1,
|
|
1166
|
+
message: "请输入昵称"
|
|
1167
|
+
}]
|
|
1168
|
+
}, {
|
|
1169
|
+
default: c(() => [o(e(C), {
|
|
1170
|
+
modelValue: s.value.nickname,
|
|
1171
|
+
"onUpdate:modelValue": A[0] || (A[0] = (x) => s.value.nickname = x),
|
|
1172
|
+
placeholder: "请输入昵称"
|
|
1173
|
+
}, null, 8, ["modelValue"])]),
|
|
1174
|
+
_: 1
|
|
1175
|
+
}), o(e(I), {
|
|
1176
|
+
field: "description",
|
|
1177
|
+
label: "简介",
|
|
1178
|
+
rules: [{
|
|
1179
|
+
required: !1,
|
|
1180
|
+
message: "请输入描述"
|
|
1181
|
+
}]
|
|
1182
|
+
}, {
|
|
1183
|
+
default: c(() => [o(e(be), {
|
|
1184
|
+
modelValue: s.value.description,
|
|
1185
|
+
"onUpdate:modelValue": A[1] || (A[1] = (x) => s.value.description = x),
|
|
1186
|
+
placeholder: "请输入描述",
|
|
1187
|
+
"allow-clear": "",
|
|
1188
|
+
"auto-size": {
|
|
1189
|
+
minRows: 5
|
|
1190
|
+
}
|
|
1191
|
+
}, null, 8, ["modelValue"])]),
|
|
1192
|
+
_: 1
|
|
1193
|
+
}), o(e(I), {
|
|
1194
|
+
field: "",
|
|
1195
|
+
label: "",
|
|
1196
|
+
rules: []
|
|
1197
|
+
}, {
|
|
1198
|
+
default: c(() => [w("div", xt, [o(e($), {
|
|
1199
|
+
type: "primary",
|
|
1200
|
+
loading: f.value,
|
|
1201
|
+
onClick: b
|
|
1202
|
+
}, {
|
|
1203
|
+
default: c(() => A[2] || (A[2] = [z(" 提交 ")])),
|
|
1204
|
+
_: 1,
|
|
1205
|
+
__: [2]
|
|
1206
|
+
}, 8, ["loading"])])]),
|
|
1207
|
+
_: 1
|
|
1208
|
+
})]),
|
|
1209
|
+
_: 1
|
|
1210
|
+
}, 8, ["model", "size"]));
|
|
1211
|
+
}
|
|
1212
|
+
}), Rt = /* @__PURE__ */ P(qt, [["__scopeId", "data-v-5a1cf51b"]]);
|
|
1213
|
+
function me(n, a = 3) {
|
|
1214
|
+
const r = n.indexOf("@");
|
|
1215
|
+
if (r > 1) {
|
|
1216
|
+
const i = n.slice(0, a), m = n.slice(r);
|
|
1217
|
+
return i + "***" + m;
|
|
1218
|
+
}
|
|
1219
|
+
return n;
|
|
1220
|
+
}
|
|
1221
|
+
const Tt = {
|
|
1222
|
+
class: "sendVerifyCodeItem"
|
|
1223
|
+
}, Lt = {
|
|
1224
|
+
class: "handle"
|
|
1225
|
+
}, Bt = /* @__PURE__ */ k({
|
|
1226
|
+
__name: "AuthkitEmailVerify",
|
|
1227
|
+
props: {
|
|
1228
|
+
email: {
|
|
1229
|
+
type: String,
|
|
1230
|
+
required: !0,
|
|
1231
|
+
default: () => ""
|
|
1232
|
+
},
|
|
1233
|
+
size: {
|
|
1234
|
+
type: String,
|
|
1235
|
+
required: !0
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
emits: ["next"],
|
|
1239
|
+
setup(n, {
|
|
1240
|
+
emit: a
|
|
1241
|
+
}) {
|
|
1242
|
+
const r = a, i = n, m = R(() => me(i.email)), u = h(), t = h(!1), d = h(!1), _ = h(), s = h({
|
|
1243
|
+
userToken: void 0,
|
|
1244
|
+
emailVerifyId: void 0
|
|
1245
|
+
});
|
|
1246
|
+
async function l() {
|
|
1247
|
+
t.value = !0, Q({
|
|
1248
|
+
email: i.email
|
|
1249
|
+
}).then(({
|
|
1250
|
+
data: f
|
|
1251
|
+
}) => {
|
|
1252
|
+
s.value.emailVerifyId = f.emailVerifyId, t.value = !1, u.value.startCountFn();
|
|
1253
|
+
}).catch(() => {
|
|
1254
|
+
t.value = !1;
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
async function p() {
|
|
1258
|
+
_.value.validate(["userToken"]).then((f) => {
|
|
1259
|
+
if (!f) {
|
|
1260
|
+
d.value = !0;
|
|
1261
|
+
const v = {
|
|
1262
|
+
email: i.email,
|
|
1263
|
+
userToken: s.value.userToken,
|
|
1264
|
+
emailVerifyId: s.value.emailVerifyId
|
|
1265
|
+
};
|
|
1266
|
+
Ge(v).then(() => {
|
|
1267
|
+
d.value = !1, r("next");
|
|
1268
|
+
}).catch(() => {
|
|
1269
|
+
d.value = !1;
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
return (f, v) => (g(), y(e(B), {
|
|
1275
|
+
ref_key: "formRef",
|
|
1276
|
+
ref: _,
|
|
1277
|
+
model: s.value,
|
|
1278
|
+
"auto-label-width": "",
|
|
1279
|
+
size: i.size
|
|
1280
|
+
}, {
|
|
1281
|
+
default: c(() => [o(e(I), {
|
|
1282
|
+
field: "email",
|
|
1283
|
+
label: "邮箱",
|
|
1284
|
+
rules: [{
|
|
1285
|
+
required: !1,
|
|
1286
|
+
message: "请输入邮箱"
|
|
1287
|
+
}, {
|
|
1288
|
+
type: "email",
|
|
1289
|
+
message: "请输入有效的邮箱"
|
|
1290
|
+
}]
|
|
1291
|
+
}, {
|
|
1292
|
+
default: c(() => [z(L(m.value), 1)]),
|
|
1293
|
+
_: 1
|
|
1294
|
+
}), o(e(I), {
|
|
1295
|
+
field: "userToken",
|
|
1296
|
+
label: "验证码",
|
|
1297
|
+
"hide-label": "",
|
|
1298
|
+
rules: [{
|
|
1299
|
+
required: !0,
|
|
1300
|
+
message: "请输入验证码"
|
|
1301
|
+
}]
|
|
1302
|
+
}, {
|
|
1303
|
+
default: c(() => [w("div", Tt, [o(e(C), {
|
|
1304
|
+
modelValue: s.value.userToken,
|
|
1305
|
+
"onUpdate:modelValue": v[0] || (v[0] = (b) => s.value.userToken = b),
|
|
1306
|
+
placeholder: "请输入验证码"
|
|
1307
|
+
}, null, 8, ["modelValue"]), o(X, {
|
|
1308
|
+
ref_key: "SendVerifyCodeRef",
|
|
1309
|
+
ref: u,
|
|
1310
|
+
size: i.size,
|
|
1311
|
+
loading: t.value,
|
|
1312
|
+
style: {
|
|
1313
|
+
"margin-left": "10px"
|
|
1314
|
+
},
|
|
1315
|
+
onSend: l
|
|
1316
|
+
}, null, 8, ["size", "loading"])])]),
|
|
1317
|
+
_: 1
|
|
1318
|
+
}), o(e(I), {
|
|
1319
|
+
field: "",
|
|
1320
|
+
label: "",
|
|
1321
|
+
rules: []
|
|
1322
|
+
}, {
|
|
1323
|
+
default: c(() => [w("div", Lt, [o(e($), {
|
|
1324
|
+
loading: d.value,
|
|
1325
|
+
type: "primary",
|
|
1326
|
+
onClick: p
|
|
1327
|
+
}, {
|
|
1328
|
+
default: c(() => v[1] || (v[1] = [z(" 提交 ")])),
|
|
1329
|
+
_: 1,
|
|
1330
|
+
__: [1]
|
|
1331
|
+
}, 8, ["loading"])])]),
|
|
1332
|
+
_: 1
|
|
1333
|
+
})]),
|
|
1334
|
+
_: 1
|
|
1335
|
+
}, 8, ["model", "size"]));
|
|
1336
|
+
}
|
|
1337
|
+
}), Y = /* @__PURE__ */ P(Bt, [["__scopeId", "data-v-89ebb370"]]), Et = {
|
|
1338
|
+
class: "handle"
|
|
1339
|
+
}, Ot = /* @__PURE__ */ k({
|
|
1340
|
+
__name: "AuthkitPasswordUpdate",
|
|
1341
|
+
props: {
|
|
1342
|
+
size: {
|
|
1343
|
+
type: String,
|
|
1344
|
+
required: !0
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
emits: ["submit"],
|
|
1348
|
+
setup(n, {
|
|
1349
|
+
emit: a
|
|
1350
|
+
}) {
|
|
1351
|
+
const r = a, i = h(!1), m = h(), u = n, t = h({
|
|
1352
|
+
password: void 0,
|
|
1353
|
+
confirmPassword: void 0
|
|
1354
|
+
});
|
|
1355
|
+
async function d() {
|
|
1356
|
+
m.value.validate().then((_) => {
|
|
1357
|
+
if (!_) {
|
|
1358
|
+
const s = {
|
|
1359
|
+
password: t.value.password
|
|
1360
|
+
};
|
|
1361
|
+
ke(s).then(() => {
|
|
1362
|
+
i.value = !1, r("submit");
|
|
1363
|
+
}).catch(() => {
|
|
1364
|
+
i.value = !1;
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
return (_, s) => (g(), y(e(B), {
|
|
1370
|
+
ref_key: "formRef",
|
|
1371
|
+
ref: m,
|
|
1372
|
+
model: t.value,
|
|
1373
|
+
"auto-label-width": "",
|
|
1374
|
+
size: u.size
|
|
1375
|
+
}, {
|
|
1376
|
+
default: c(() => [o(e(I), {
|
|
1377
|
+
field: "password",
|
|
1378
|
+
label: "密码",
|
|
1379
|
+
"hide-label": "",
|
|
1380
|
+
rules: [{
|
|
1381
|
+
required: !0,
|
|
1382
|
+
message: "密码请输入"
|
|
1383
|
+
}, {
|
|
1384
|
+
minLength: 10,
|
|
1385
|
+
message: "密码不能少于10字符"
|
|
1386
|
+
}]
|
|
1387
|
+
}, {
|
|
1388
|
+
default: c(() => [o(e(C), {
|
|
1389
|
+
modelValue: t.value.password,
|
|
1390
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value.password = l),
|
|
1391
|
+
placeholder: "请输入密码",
|
|
1392
|
+
type: "password"
|
|
1393
|
+
}, null, 8, ["modelValue"])]),
|
|
1394
|
+
_: 1
|
|
1395
|
+
}), o(e(I), {
|
|
1396
|
+
field: "confirmPassword",
|
|
1397
|
+
label: "确认密码",
|
|
1398
|
+
"hide-label": "",
|
|
1399
|
+
rules: [{
|
|
1400
|
+
required: !0,
|
|
1401
|
+
message: "请输入确认密码"
|
|
1402
|
+
}, {
|
|
1403
|
+
minLength: 10,
|
|
1404
|
+
message: "确认密码不能少于10字符"
|
|
1405
|
+
}, {
|
|
1406
|
+
validator: (l, p) => {
|
|
1407
|
+
l !== t.value.password ? p("两次密码输入不一致,请重新输入") : p();
|
|
1408
|
+
}
|
|
1409
|
+
}]
|
|
1410
|
+
}, {
|
|
1411
|
+
default: c(() => [o(e(C), {
|
|
1412
|
+
modelValue: t.value.confirmPassword,
|
|
1413
|
+
"onUpdate:modelValue": s[1] || (s[1] = (l) => t.value.confirmPassword = l),
|
|
1414
|
+
placeholder: "请输入确认密码密码",
|
|
1415
|
+
type: "password"
|
|
1416
|
+
}, null, 8, ["modelValue"])]),
|
|
1417
|
+
_: 1
|
|
1418
|
+
}, 8, ["rules"]), o(e(I), {
|
|
1419
|
+
field: "",
|
|
1420
|
+
label: "",
|
|
1421
|
+
rules: []
|
|
1422
|
+
}, {
|
|
1423
|
+
default: c(() => [w("div", Et, [o(e($), {
|
|
1424
|
+
type: "primary",
|
|
1425
|
+
loading: i.value,
|
|
1426
|
+
onClick: d
|
|
1427
|
+
}, {
|
|
1428
|
+
default: c(() => s[2] || (s[2] = [z(" 提交 ")])),
|
|
1429
|
+
_: 1,
|
|
1430
|
+
__: [2]
|
|
1431
|
+
}, 8, ["loading"])])]),
|
|
1432
|
+
_: 1
|
|
1433
|
+
})]),
|
|
1434
|
+
_: 1
|
|
1435
|
+
}, 8, ["model", "size"]));
|
|
1436
|
+
}
|
|
1437
|
+
}), Nt = /* @__PURE__ */ P(Ot, [["__scopeId", "data-v-3a76b542"]]), Ft = /* @__PURE__ */ k({
|
|
1438
|
+
__name: "AuthkitSetPassword",
|
|
1439
|
+
props: {
|
|
1440
|
+
size: {
|
|
1441
|
+
type: String,
|
|
1442
|
+
required: !0
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
setup(n) {
|
|
1446
|
+
const {
|
|
1447
|
+
userProfile: a,
|
|
1448
|
+
loading: r,
|
|
1449
|
+
fetchUserProfile: i
|
|
1450
|
+
} = J(), m = h("hidden"), u = n;
|
|
1451
|
+
function t(s) {
|
|
1452
|
+
m.value = s;
|
|
1453
|
+
}
|
|
1454
|
+
function d() {
|
|
1455
|
+
O.success("密码修改成功"), m.value = "hidden", i();
|
|
1456
|
+
}
|
|
1457
|
+
function _() {
|
|
1458
|
+
m.value = "update";
|
|
1459
|
+
}
|
|
1460
|
+
return N(() => {
|
|
1461
|
+
a.value || i();
|
|
1462
|
+
}), (s, l) => {
|
|
1463
|
+
var p, f, v, b;
|
|
1464
|
+
return g(), U(W, null, [!((p = e(a)) != null && p.email) && !((f = e(a)) != null && f.phone) ? (g(), y(e(T), {
|
|
1465
|
+
key: 0,
|
|
1466
|
+
title: "去绑定邮箱"
|
|
1467
|
+
}, {
|
|
1468
|
+
action: c(() => [o(e($), {
|
|
1469
|
+
size: u.size,
|
|
1470
|
+
type: "primary",
|
|
1471
|
+
onClick: l[0] || (l[0] = (q) => t("update"))
|
|
1472
|
+
}, {
|
|
1473
|
+
default: c(() => l[2] || (l[2] = [z(" 去绑定邮箱 ")])),
|
|
1474
|
+
_: 1,
|
|
1475
|
+
__: [2]
|
|
1476
|
+
}, 8, ["size"])]),
|
|
1477
|
+
default: c(() => [l[3] || (l[3] = z(" 请先去绑定邮箱或者手机号码,才能设置密码 "))]),
|
|
1478
|
+
_: 1,
|
|
1479
|
+
__: [3]
|
|
1480
|
+
})) : S("", !0), (v = e(a)) != null && v.email && m.value === "hidden" ? (g(), y(e(T), {
|
|
1481
|
+
key: 1,
|
|
1482
|
+
title: "更改密码"
|
|
1483
|
+
}, {
|
|
1484
|
+
action: c(() => [o(e($), {
|
|
1485
|
+
size: u.size,
|
|
1486
|
+
type: "primary",
|
|
1487
|
+
onClick: l[1] || (l[1] = (q) => t("verify"))
|
|
1488
|
+
}, {
|
|
1489
|
+
default: c(() => l[4] || (l[4] = [z("更改密码")])),
|
|
1490
|
+
_: 1,
|
|
1491
|
+
__: [4]
|
|
1492
|
+
}, 8, ["size"])]),
|
|
1493
|
+
default: c(() => [l[5] || (l[5] = z(" 为了账户安全修改密码前会先验证身份 "))]),
|
|
1494
|
+
_: 1,
|
|
1495
|
+
__: [5]
|
|
1496
|
+
})) : S("", !0), m.value === "update" ? (g(), y(Nt, {
|
|
1497
|
+
key: 2,
|
|
1498
|
+
size: u.size,
|
|
1499
|
+
loading: e(r),
|
|
1500
|
+
onSubmit: d
|
|
1501
|
+
}, null, 8, ["size", "loading"])) : S("", !0), m.value === "verify" ? (g(), y(Y, {
|
|
1502
|
+
key: 3,
|
|
1503
|
+
size: u.size,
|
|
1504
|
+
email: (b = e(a)) == null ? void 0 : b.email,
|
|
1505
|
+
onNext: _
|
|
1506
|
+
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
}), Gt = /* @__PURE__ */ k({
|
|
1510
|
+
__name: "AuthkitEmailBinding",
|
|
1511
|
+
props: {
|
|
1512
|
+
size: {
|
|
1513
|
+
type: String,
|
|
1514
|
+
required: !0
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
setup(n) {
|
|
1518
|
+
const {
|
|
1519
|
+
userProfile: a,
|
|
1520
|
+
loading: r,
|
|
1521
|
+
fetchUserProfile: i
|
|
1522
|
+
} = J(), m = h("hidden"), u = n;
|
|
1523
|
+
function t(s) {
|
|
1524
|
+
m.value = s;
|
|
1525
|
+
}
|
|
1526
|
+
function d(s) {
|
|
1527
|
+
r.value = !0;
|
|
1528
|
+
const l = {
|
|
1529
|
+
email: s.email,
|
|
1530
|
+
userToken: s.userToken,
|
|
1531
|
+
emailVerifyId: s.emailVerifyId,
|
|
1532
|
+
password: s.password
|
|
1533
|
+
};
|
|
1534
|
+
Ae(l).then(() => {
|
|
1535
|
+
r.value = !1, O.success("绑定成功"), m.value = "hidden", i();
|
|
1536
|
+
}).catch(() => {
|
|
1537
|
+
r.value = !1;
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
function _() {
|
|
1541
|
+
m.value = "update";
|
|
1542
|
+
}
|
|
1543
|
+
return N(() => {
|
|
1544
|
+
a.value || i();
|
|
1545
|
+
}), (s, l) => {
|
|
1546
|
+
var p, f, v;
|
|
1547
|
+
return g(), U(W, null, [!((p = e(a)) != null && p.email) && m.value === "hidden" ? (g(), y(e(T), {
|
|
1548
|
+
key: 0,
|
|
1549
|
+
title: "绑定邮箱"
|
|
1550
|
+
}, {
|
|
1551
|
+
action: c(() => [o(e($), {
|
|
1552
|
+
size: u.size,
|
|
1553
|
+
type: "primary",
|
|
1554
|
+
onClick: l[0] || (l[0] = (b) => t("update"))
|
|
1555
|
+
}, {
|
|
1556
|
+
default: c(() => l[2] || (l[2] = [z(" 绑定邮箱 ")])),
|
|
1557
|
+
_: 1,
|
|
1558
|
+
__: [2]
|
|
1559
|
+
}, 8, ["size"])]),
|
|
1560
|
+
default: c(() => [l[3] || (l[3] = z(" 您还未绑定邮箱,请点击绑定邮箱 "))]),
|
|
1561
|
+
_: 1,
|
|
1562
|
+
__: [3]
|
|
1563
|
+
})) : S("", !0), (f = e(a)) != null && f.email && m.value === "hidden" ? (g(), y(e(T), {
|
|
1564
|
+
key: 1,
|
|
1565
|
+
title: "更改邮箱"
|
|
1566
|
+
}, {
|
|
1567
|
+
action: c(() => [o(e($), {
|
|
1568
|
+
size: u.size,
|
|
1569
|
+
type: "primary",
|
|
1570
|
+
onClick: l[1] || (l[1] = (b) => t("verify"))
|
|
1571
|
+
}, {
|
|
1572
|
+
default: c(() => l[4] || (l[4] = [z(" 更改邮箱 ")])),
|
|
1573
|
+
_: 1,
|
|
1574
|
+
__: [4]
|
|
1575
|
+
}, 8, ["size"])]),
|
|
1576
|
+
default: c(() => {
|
|
1577
|
+
var b;
|
|
1578
|
+
return [z(L(`您绑定的邮箱为${e(me)((b = e(a)) == null ? void 0 : b.email)}`) + " ", 1)];
|
|
1579
|
+
}),
|
|
1580
|
+
_: 1
|
|
1581
|
+
})) : S("", !0), m.value === "update" ? (g(), y(de, {
|
|
1582
|
+
key: 2,
|
|
1583
|
+
loading: e(r),
|
|
1584
|
+
size: u.size,
|
|
1585
|
+
onSubmit: d
|
|
1586
|
+
}, null, 8, ["loading", "size"])) : S("", !0), m.value === "verify" ? (g(), y(Y, {
|
|
1587
|
+
key: 3,
|
|
1588
|
+
size: u.size,
|
|
1589
|
+
email: (v = e(a)) == null ? void 0 : v.email,
|
|
1590
|
+
onNext: _
|
|
1591
|
+
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
}), Mt = /* @__PURE__ */ P(Gt, [["__scopeId", "data-v-de66f30f"]]), Ht = /* @__PURE__ */ k({
|
|
1595
|
+
__name: "AuthkitGithubBinding",
|
|
1596
|
+
props: {
|
|
1597
|
+
size: {
|
|
1598
|
+
type: String,
|
|
1599
|
+
required: !0
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
setup(n) {
|
|
1603
|
+
const {
|
|
1604
|
+
userProfile: a,
|
|
1605
|
+
fetchUserProfile: r
|
|
1606
|
+
} = J(), i = h("hidden"), m = h(!1);
|
|
1607
|
+
let u;
|
|
1608
|
+
const t = n;
|
|
1609
|
+
function d(f) {
|
|
1610
|
+
i.value = f;
|
|
1611
|
+
}
|
|
1612
|
+
function _() {
|
|
1613
|
+
re().then(({
|
|
1614
|
+
data: f
|
|
1615
|
+
}) => {
|
|
1616
|
+
const {
|
|
1617
|
+
redirectUri: v
|
|
1618
|
+
} = f;
|
|
1619
|
+
m.value = !0, window.open(v, "_blank");
|
|
1620
|
+
});
|
|
1621
|
+
}
|
|
1622
|
+
function s() {
|
|
1623
|
+
Ie().then(() => {
|
|
1624
|
+
O.success("解绑成功"), i.value = "hidden", r();
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
function l() {
|
|
1628
|
+
i.value === "bind" && (i.value = "hidden", _()), i.value === "unbind" && s();
|
|
1629
|
+
}
|
|
1630
|
+
function p() {
|
|
1631
|
+
m.value && r();
|
|
1632
|
+
}
|
|
1633
|
+
return N(() => {
|
|
1634
|
+
a.value || r(), u = setInterval(p, 1e3);
|
|
1635
|
+
}), se(() => {
|
|
1636
|
+
u && clearInterval(u);
|
|
1637
|
+
}), (f, v) => {
|
|
1638
|
+
var b, q, V;
|
|
1639
|
+
return g(), U(W, null, [!((b = e(a)) != null && b.github) && i.value === "hidden" ? (g(), y(e(T), {
|
|
1640
|
+
key: 0,
|
|
1641
|
+
title: "绑定GitHUb"
|
|
1642
|
+
}, {
|
|
1643
|
+
action: c(() => [o(e($), {
|
|
1644
|
+
size: t.size,
|
|
1645
|
+
type: "primary",
|
|
1646
|
+
onClick: v[0] || (v[0] = (A) => d("bind"))
|
|
1647
|
+
}, {
|
|
1648
|
+
default: c(() => v[2] || (v[2] = [z(" 绑定GitHUb ")])),
|
|
1649
|
+
_: 1,
|
|
1650
|
+
__: [2]
|
|
1651
|
+
}, 8, ["size"])]),
|
|
1652
|
+
default: c(() => [v[3] || (v[3] = z(" 请尚未绑定GitHub,请点击绑定GitHUb "))]),
|
|
1653
|
+
_: 1,
|
|
1654
|
+
__: [3]
|
|
1655
|
+
})) : S("", !0), (q = e(a)) != null && q.github && i.value === "hidden" ? (g(), y(e(T), {
|
|
1656
|
+
key: 1,
|
|
1657
|
+
title: "解绑GitHub"
|
|
1658
|
+
}, {
|
|
1659
|
+
action: c(() => [o(e($), {
|
|
1660
|
+
size: t.size,
|
|
1661
|
+
type: "primary",
|
|
1662
|
+
onClick: v[1] || (v[1] = (A) => d("unbind"))
|
|
1663
|
+
}, {
|
|
1664
|
+
default: c(() => v[4] || (v[4] = [z(" 解绑GitHUb ")])),
|
|
1665
|
+
_: 1,
|
|
1666
|
+
__: [4]
|
|
1667
|
+
}, 8, ["size"])]),
|
|
1668
|
+
default: c(() => {
|
|
1669
|
+
var A, x, G;
|
|
1670
|
+
return [w("span", null, L(`您绑定的账号为 ${(x = (A = e(a)) == null ? void 0 : A.github) == null ? void 0 : x.login}`), 1), o(e(oe), {
|
|
1671
|
+
"image-url": (G = e(a)) == null ? void 0 : G.avatar,
|
|
1672
|
+
size: 42
|
|
1673
|
+
}, null, 8, ["image-url"])];
|
|
1674
|
+
}),
|
|
1675
|
+
_: 1
|
|
1676
|
+
})) : S("", !0), i.value === "bind" || i.value === "unbind" ? (g(), y(Y, {
|
|
1677
|
+
key: 2,
|
|
1678
|
+
size: t.size,
|
|
1679
|
+
email: (V = e(a)) == null ? void 0 : V.email,
|
|
1680
|
+
onNext: l
|
|
1681
|
+
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
}), jt = {
|
|
1685
|
+
class: "content"
|
|
1686
|
+
}, Dt = {
|
|
1687
|
+
class: "left"
|
|
1688
|
+
}, Wt = {
|
|
1689
|
+
class: "right"
|
|
1690
|
+
}, Kt = /* @__PURE__ */ k({
|
|
1691
|
+
__name: "AuthkitAppSetting",
|
|
1692
|
+
emits: ["confirm", "cancel"],
|
|
1693
|
+
setup(n, {
|
|
1694
|
+
expose: a,
|
|
1695
|
+
emit: r
|
|
1696
|
+
}) {
|
|
1697
|
+
const i = r;
|
|
1698
|
+
function m() {
|
|
1699
|
+
i("cancel");
|
|
1700
|
+
}
|
|
1701
|
+
const u = h("large"), t = h(["PersonalInformation"]), d = h([{
|
|
1702
|
+
name: "个人信息",
|
|
1703
|
+
path: "PersonalInformation",
|
|
1704
|
+
meta: {
|
|
1705
|
+
icon: "mingcute:user-edit-fill"
|
|
1706
|
+
},
|
|
1707
|
+
children: []
|
|
1708
|
+
}, {
|
|
1709
|
+
name: "账户管理",
|
|
1710
|
+
path: "AccountManage",
|
|
1711
|
+
meta: {
|
|
1712
|
+
icon: "mingcute:badge-fill"
|
|
1713
|
+
},
|
|
1714
|
+
children: [{
|
|
1715
|
+
name: "邮箱",
|
|
1716
|
+
path: "EmailBinding",
|
|
1717
|
+
meta: {
|
|
1718
|
+
icon: "ic:baseline-email"
|
|
1719
|
+
}
|
|
1720
|
+
}, {
|
|
1721
|
+
name: "密码",
|
|
1722
|
+
path: "SetPassword",
|
|
1723
|
+
meta: {
|
|
1724
|
+
icon: "mdi:password"
|
|
1725
|
+
}
|
|
1726
|
+
}]
|
|
1727
|
+
}, {
|
|
1728
|
+
name: "第三方账户",
|
|
1729
|
+
icon: "Menus/Space/Message/Index",
|
|
1730
|
+
path: "AccountBinding",
|
|
1731
|
+
children: [
|
|
1732
|
+
{
|
|
1733
|
+
name: "GitHub",
|
|
1734
|
+
path: "GithubBinding",
|
|
1735
|
+
meta: {
|
|
1736
|
+
icon: "bi:github"
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
// {
|
|
1740
|
+
// name: '微信',
|
|
1741
|
+
// icon: 'Menus/Space/Message/NoticeNotifications',
|
|
1742
|
+
// path: 'NoticeNotifications',
|
|
1743
|
+
// },
|
|
1744
|
+
]
|
|
1745
|
+
}]);
|
|
1746
|
+
function _(f, v) {
|
|
1747
|
+
const b = f.path;
|
|
1748
|
+
console.log(b, v, "lokokoko"), t.value = [b];
|
|
1749
|
+
}
|
|
1750
|
+
const {
|
|
1751
|
+
changeType: s,
|
|
1752
|
+
show: l
|
|
1753
|
+
} = qe(i);
|
|
1754
|
+
function p(f, v) {
|
|
1755
|
+
console.log(f), l.value = v, s.value = "编辑";
|
|
1756
|
+
}
|
|
1757
|
+
return a({
|
|
1758
|
+
setData: p
|
|
1759
|
+
}), (f, v) => (g(), y(e(le), {
|
|
1760
|
+
visible: e(l),
|
|
1761
|
+
"onUpdate:visible": v[1] || (v[1] = (b) => ae(l) ? l.value = b : null),
|
|
1762
|
+
"unmount-on-close": "",
|
|
1763
|
+
"body-class": "AppSettingbodyClass",
|
|
1764
|
+
"mask-closable": !1,
|
|
1765
|
+
footer: !1,
|
|
1766
|
+
width: "700px",
|
|
1767
|
+
onCancel: m
|
|
1768
|
+
}, {
|
|
1769
|
+
title: c(() => v[2] || (v[2] = [z(" 系统设置 ")])),
|
|
1770
|
+
default: c(() => [w("div", jt, [w("div", Dt, [o(xe, {
|
|
1771
|
+
"selected-keys": t.value,
|
|
1772
|
+
"onUpdate:selectedKeys": v[0] || (v[0] = (b) => t.value = b),
|
|
1773
|
+
menus: d.value,
|
|
1774
|
+
onChange: _
|
|
1775
|
+
}, null, 8, ["selected-keys", "menus"])]), w("div", Wt, [t.value[0] === "PersonalInformation" ? (g(), y(Rt, {
|
|
1776
|
+
key: 0,
|
|
1777
|
+
size: u.value
|
|
1778
|
+
}, null, 8, ["size"])) : S("", !0), t.value[0] === "EmailBinding" ? (g(), y(Mt, {
|
|
1779
|
+
key: 1,
|
|
1780
|
+
size: u.value
|
|
1781
|
+
}, null, 8, ["size"])) : S("", !0), t.value[0] === "SetPassword" ? (g(), y(Ft, {
|
|
1782
|
+
key: 2,
|
|
1783
|
+
size: u.value
|
|
1784
|
+
}, null, 8, ["size"])) : S("", !0), t.value[0] === "GithubBinding" ? (g(), y(Ht, {
|
|
1785
|
+
key: 3,
|
|
1786
|
+
size: u.value
|
|
1787
|
+
}, null, 8, ["size"])) : S("", !0)])])]),
|
|
1788
|
+
_: 1
|
|
1789
|
+
}, 8, ["visible"]));
|
|
1790
|
+
}
|
|
1791
|
+
}), pi = /* @__PURE__ */ P(Kt, [["__scopeId", "data-v-e9f9426e"]]);
|
|
1792
|
+
export {
|
|
1793
|
+
It as A,
|
|
1794
|
+
de as E,
|
|
1795
|
+
Fe as O,
|
|
1796
|
+
Ze as P,
|
|
1797
|
+
et as R,
|
|
1798
|
+
X as S,
|
|
1799
|
+
H as _,
|
|
1800
|
+
fi as a,
|
|
1801
|
+
pi as b,
|
|
1802
|
+
ce as c,
|
|
1803
|
+
ft as d,
|
|
1804
|
+
bt as e,
|
|
1805
|
+
ot as f,
|
|
1806
|
+
ue as g,
|
|
1807
|
+
dt as h,
|
|
1808
|
+
st as i,
|
|
1809
|
+
Rt as j,
|
|
1810
|
+
Y as k,
|
|
1811
|
+
Ht as l,
|
|
1812
|
+
Ft as m,
|
|
1813
|
+
Mt as n,
|
|
1814
|
+
Nt as o
|
|
1815
|
+
};
|