diff --git a/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java b/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java
index 5b288b0aa8..79fd7d769e 100644
--- a/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java
+++ b/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java
@@ -81,8 +81,17 @@ public class XWecomServer {
return wecomXpackService.getQrParam();
}
+ @GetMapping("/callBackWithoutLogin")
+ public ModelAndView callBackWithoutLogin(@RequestParam("code") String code,@RequestParam("state") String state) {
+ return privateCallBack(code, state, true);
+ }
+
@GetMapping("/callBack")
public ModelAndView callBack(@RequestParam("code") String code, @RequestParam("state") String state) {
+ return privateCallBack(code, state, false);
+ }
+
+ private ModelAndView privateCallBack(String code, String state, Boolean withoutLogin) {
ModelAndView modelAndView = new ModelAndView("redirect:/");
HttpServletResponse response = ServletUtils.response();
WecomXpackService wecomXpackService = null;
@@ -123,6 +132,12 @@ public class XWecomServer {
Cookie cookie_token = new Cookie("Authorization", token);
cookie_token.setPath("/");
+ if (withoutLogin) {
+ Cookie platformCookie = new Cookie("inOtherPlatform", "true");
+ platformCookie.setPath("/");
+ response.addCookie(platformCookie);
+ }
+
response.addCookie(cookie_token);
} catch (Exception e) {
diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js
index 57e03c64c3..587b472952 100644
--- a/frontend/src/api/user.js
+++ b/frontend/src/api/user.js
@@ -116,6 +116,13 @@ export function wecomStatus() {
})
}
+export function wecomQrParams() {
+ return request({
+ url: '/plugin/wecom/getQrParam',
+ method: 'post'
+ })
+}
+
export function dingtalkStatus() {
return request({
url: '/api/auth/isOpenDingtalk',
diff --git a/frontend/src/views/DeAutoLogin.vue b/frontend/src/views/DeAutoLogin.vue
index 1f7495e24d..f09f646744 100644
--- a/frontend/src/views/DeAutoLogin.vue
+++ b/frontend/src/views/DeAutoLogin.vue
@@ -23,6 +23,15 @@
component-name="LKSWithoutLogin"
/>
+