登录对接
This commit is contained in:
Generated
+4885
-425
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"screenfull": "^6.0.1",
|
||||
"vconsole": "^3.15.1",
|
||||
"video.js": "^7.20.3",
|
||||
"vue": "^3.2.25",
|
||||
"vue-router": "^4.0.13",
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import service from "../request.js";
|
||||
// 登录
|
||||
export function login(authCode) {
|
||||
return service({
|
||||
url: `/sso/login?code=${authCode}`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 获取组别列表
|
||||
export function getGroupList() {
|
||||
|
||||
+3
-1
@@ -14,7 +14,9 @@ import VMdEditor from "@kangc/v-md-editor";
|
||||
import vuepressTheme from "@kangc/v-md-editor/lib/theme/vuepress.js";
|
||||
import "@kangc/v-md-editor/lib/style/base-editor.css";
|
||||
import "@kangc/v-md-editor/lib/theme/style/vuepress.css";
|
||||
|
||||
import VConsole from "vconsole";
|
||||
// 或者使用配置参数来初始化,详情见文档
|
||||
const vConsole = new VConsole({ theme: "dark" });
|
||||
VMdEditor.use(vuepressTheme);
|
||||
const app = createApp(App);
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="login-container flx-center">
|
||||
<div class="login-box">
|
||||
<div class="login-left">
|
||||
<div class="title">人资薪资核算系统<span style="font-size: 14px">v1.7</span></div>
|
||||
<div class="title">
|
||||
人资薪资核算系统<span style="font-size: 14px">v1.7</span>
|
||||
</div>
|
||||
<div class="sub">用于自动管理核算人员工资</div>
|
||||
<img src="../../assets/login.png" alt="" />
|
||||
</div>
|
||||
@@ -21,6 +23,7 @@
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
// import { login, obtainUserInformationApi } from "../../api/modules/index";
|
||||
import { login } from "../../api/modules/index";
|
||||
import { ElMessage } from "element-plus";
|
||||
import dd from "dingtalk-jsapi";
|
||||
const router = useRouter();
|
||||
@@ -55,6 +58,7 @@ if (token) {
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: "ding03f8e88dde9b426835c2f4657eb6378f", //企业id
|
||||
onSuccess: function (info) {
|
||||
console.log(info);
|
||||
loginIn(info.code);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user