| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import { v as defineComponent, r as ref, B as createElementBlock, E as createBaseVNode, C as createVNode, D as withCtx, aA as useRouter, ak as resolveComponent, y as openBlock, M as createTextVNode } from "./vue-dev.7a51ac2d.js";
- import { u as useAuthStore } from "./index-dev.bb5c7162.js";
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-dev.cc2b3d55.js";
- import "./element-dev.26a170ea.js";
- import "./utils-dev.be08a1a2.js";
- const _hoisted_1 = { class: "login-container" };
- const _hoisted_2 = { class: "login-box" };
- const _hoisted_3 = { class: "login-content" };
- const _sfc_main = /* @__PURE__ */ defineComponent({
- __name: "Login",
- setup(__props) {
- const router = useRouter();
- const authStore = useAuthStore();
- const loading = ref(false);
- const handleSSOLogin = () => {
- loading.value = true;
- window.location.href = "/auth/login";
- };
- if (authStore.isAuthenticated) {
- router.push("/dashboard");
- }
- return (_ctx, _cache) => {
- const _component_Key = resolveComponent("Key");
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_button = resolveComponent("el-button");
- return openBlock(), createElementBlock("div", _hoisted_1, [
- createBaseVNode("div", _hoisted_2, [
- _cache[2] || (_cache[2] = createBaseVNode("div", { class: "login-header" }, [
- createBaseVNode("h1", null, "子系统示例"),
- createBaseVNode("p", null, "请通过SSO认证中心登录")
- ], -1)),
- createBaseVNode("div", _hoisted_3, [
- createVNode(_component_el_button, {
- type: "primary",
- size: "large",
- loading: loading.value,
- onClick: handleSSOLogin,
- class: "sso-login-btn"
- }, {
- default: withCtx(() => [
- createVNode(_component_el_icon, null, {
- default: withCtx(() => [
- createVNode(_component_Key)
- ]),
- _: 1
- }),
- _cache[0] || (_cache[0] = createTextVNode(" 通过SSO登录 ", -1))
- ]),
- _: 1
- }, 8, ["loading"]),
- _cache[1] || (_cache[1] = createBaseVNode("div", { class: "login-info" }, [
- createBaseVNode("p", null, "点击上方按钮将跳转到SSO认证中心进行登录"),
- createBaseVNode("p", null, "登录成功后将自动返回本系统")
- ], -1))
- ])
- ])
- ]);
- };
- }
- });
- const Login_vue_vue_type_style_index_0_scoped_6812616a_lang = "";
- const Login = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6812616a"]]);
- export {
- Login as default
- };
- //# sourceMappingURL=Login-dev.6b0c82e3.js.map
|