From d461ab496723b4fdd04fe9df3e61eebe43caf72c Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 25 九月 2023 16:06:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/page/login/userlogin.vue | 10 +++-------
Source/UBCS-WEB/src/api/system/user.js | 13 ++++++++-----
Source/UBCS-WEB/src/config/Decrypt.js | 3 ++-
Source/UBCS-WEB/src/page/login/sso.vue | 5 ++++-
4 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/system/user.js b/Source/UBCS-WEB/src/api/system/user.js
index 041d64c..c4440d9 100644
--- a/Source/UBCS-WEB/src/api/system/user.js
+++ b/Source/UBCS-WEB/src/api/system/user.js
@@ -161,12 +161,15 @@
}
//鍗曠偣鐧诲綍鎺ュ彛
export const ssoLogin =(empCode) => {
+ const params = new URLSearchParams();
+ console.log(empCode);
+ params.append('empCode', empCode);
return request({
url: '/api/ubcs-code/passwordFree/ssoLogin',
- method: 'get',
- params:{
- empCode
- }
+ method: 'post',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ },
+ data: params
})
}
-
diff --git a/Source/UBCS-WEB/src/config/Decrypt.js b/Source/UBCS-WEB/src/config/Decrypt.js
index dd0f735..a2217e9 100644
--- a/Source/UBCS-WEB/src/config/Decrypt.js
+++ b/Source/UBCS-WEB/src/config/Decrypt.js
@@ -12,10 +12,11 @@
const decryptedStr = decrypt.toString(enc.Utf8);
return decryptedStr;
}
+//鍔犲瘑 Vue 浠g爜
// const plaintext = 'your plaintext';
// const key = 'your encryption key';
// const iv = 'your initialization vector';
-//
+
// const encrypted = CryptoJS.AES.encrypt(plaintext, key, { iv: iv });
// const ciphertext = encrypted.toString();
// console.log('ciphertext',ciphertext)
diff --git a/Source/UBCS-WEB/src/page/login/sso.vue b/Source/UBCS-WEB/src/page/login/sso.vue
index 26e9510..0b83696 100644
--- a/Source/UBCS-WEB/src/page/login/sso.vue
+++ b/Source/UBCS-WEB/src/page/login/sso.vue
@@ -23,7 +23,10 @@
methods: {
onLoad() {
- this.PathString=this.$route.query.empCode;
+ //URL浼犻�掑弬鏁版椂 浼氬皢瀛楃涓蹭腑鐨� %2B 涔熷氨鏄�+鍙疯浆鎹负绌烘牸銆�
+ this.PathString = decodeURIComponent(this.$route.query.empCode.replace(/\s/g, '+'));
+ console.log(this.$route);
+ console.log(this.PathString);
this.$store.dispatch("LoginBySso", { PathString: this.PathString }).then((res) => {
console.log('res', res)
this.$router.push({ path: this.tagWel.value });
diff --git a/Source/UBCS-WEB/src/page/login/userlogin.vue b/Source/UBCS-WEB/src/page/login/userlogin.vue
index a368aa4..f5e40d6 100644
--- a/Source/UBCS-WEB/src/page/login/userlogin.vue
+++ b/Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -75,7 +75,7 @@
import {mapGetters} from "vuex";
import {info} from "@/api/system/tenant";
import {getTopUrl} from "@/util/util";
-import {oaSsos, updatePassword} from "@/api/system/user.js"
+import { updatePassword} from "@/api/system/user.js"
import {removeToken} from "@/util/auth";
import md5 from "js-md5";
@@ -300,17 +300,13 @@
props: [],
methods: {
ChandleLogin() {
- // this.$store.dispatch("LoginBySso").then((res) => {
- // console.log('res', res)
- // this.$router.push({path: this.tagWel.value});
- // })
- this.$router.push({path:'/sso'});
+ this.$router.push({ path: '/sso' });
},
closehandle() {
removeToken()
},
delok() {
- //鐐瑰嚮鍙栨秷鎴栬�厁 娓呴櫎token鍏抽棴寮圭獥 娓呴櫎token鍚庝細鑷姩閲嶆柊鑾峰彇鐢ㄦ埛淇℃伅 杩欓噷娌℃湁閲嶆柊璋冪敤鏂规硶锛屽洜涓轰笅闈㈤�昏緫鏈夌偣缁曪紝鎬曢噸鏂版帀鏈塨ug鐩存帴娓呴櫎token閲嶆柊鑾峰彇鐢ㄦ埛淇℃伅
+ //鐐瑰嚮鍙栨秷鎴栬�厁 娓呴櫎token鍏抽棴寮圭獥 娓呴櫎token鍚庝細鑷姩閲嶆柊鑾峰彇鐢ㄦ埛淇℃伅
this.dialogFormVisible = false;
removeToken()
},
--
Gitblit v1.9.3