diff --git a/frontend/src/views/login/xpack/Handler.vue b/frontend/src/views/login/xpack/Handler.vue
index 046cffd5..a8d7347f 100644
--- a/frontend/src/views/login/xpack/Handler.vue
+++ b/frontend/src/views/login/xpack/Handler.vue
@@ -445,6 +445,39 @@ const wecomLogin = () => {
}, 1500)
})
}
+const larksuiteLogin = () => {
+ const urlParams = getUrlParams()
+ urlParams['redirect_uri'] = encodeURIComponent(getSQLBotAddr())
+ request
+ .post('/system/platform/sso/9', urlParams)
+ .then((res: any) => {
+ const token = res.access_token
+ // const platform_info = res.platform_info
+ if (token && isPlatformClient()) {
+ wsCache.set('sqlbot-platform-client', true)
+ }
+ userStore.setToken(token)
+ userStore.setExp(res.exp)
+ userStore.setTime(Date.now())
+ userStore.setPlatformInfo({
+ flag: 'larksuite',
+ // data: platform_info ? JSON.stringify(platform_info) : '',
+ origin: 9,
+ })
+ const queryRedirectPath = getCurLocation()
+ router.push({ path: queryRedirectPath })
+ })
+ .catch((e: any) => {
+ userStore.setToken('')
+ setTimeout(() => {
+ // logoutHandler(true, true)
+ platformLoginMsg.value = e?.message || e
+ setTimeout(() => {
+ window.location.href = getSQLBotAddr() + window.location.hash
+ }, 2000)
+ }, 1500)
+ })
+}
const larkLogin = () => {
const urlParams = getUrlParams()
urlParams['redirect_uri'] = encodeURIComponent(getSQLBotAddr())
@@ -689,6 +722,8 @@ onMounted(() => {
wecomLogin()
} else if (state?.includes('dingtalk')) {
dingtalkLogin()
+ } else if (state?.includes('larksuite')) {
+ larksuiteLogin()
} else if (state?.includes('lark')) {
larkLogin()
} else {
diff --git a/frontend/src/views/login/xpack/LarksuiteQr.vue b/frontend/src/views/login/xpack/LarksuiteQr.vue
new file mode 100644
index 00000000..ae38b911
--- /dev/null
+++ b/frontend/src/views/login/xpack/LarksuiteQr.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
diff --git a/frontend/src/views/login/xpack/QrTab.vue b/frontend/src/views/login/xpack/QrTab.vue
index 96d0926a..bbffaae7 100644
--- a/frontend/src/views/login/xpack/QrTab.vue
+++ b/frontend/src/views/login/xpack/QrTab.vue
@@ -57,7 +57,7 @@ import logo_dingtalk from '@/assets/svg/logo_dingtalk.svg'
import logo_lark from '@/assets/svg/logo_lark.svg'
import { ref } from 'vue'
import LarkQr from './LarkQr.vue'
-/* import LarksuiteQr from './LarksuiteQr.vue' */
+import LarksuiteQr from './LarksuiteQr.vue'
import DingtalkQr from './DingtalkQr.vue'
import WecomQr from './WecomQr.vue'
import { propTypes } from '@/utils/propTypes'
diff --git a/frontend/src/views/system/platform/PlatformInfo.vue b/frontend/src/views/system/platform/PlatformInfo.vue
index ecefe258..16d02da9 100644
--- a/frontend/src/views/system/platform/PlatformInfo.vue
+++ b/frontend/src/views/system/platform/PlatformInfo.vue
@@ -142,7 +142,7 @@ const edit = () => {
editor?.value.edit(data)
}
const validate = () => {
- if (info.value?.agent_id && info.value?.corpsecret) {
+ if (info.value) {
validateHandler()
}
}
diff --git a/frontend/src/views/system/platform/index.vue b/frontend/src/views/system/platform/index.vue
index f070ba0e..53455121 100644
--- a/frontend/src/views/system/platform/index.vue
+++ b/frontend/src/views/system/platform/index.vue
@@ -29,7 +29,7 @@ const loadData = () => {
item.config = JSON.parse(item.config)
return item
})
- .filter((card: any) => card.type < 9)
+ .filter((card: any) => card.type < 10)
})
}
onMounted(() => {
@@ -66,6 +66,8 @@ onMounted(() => {
border-radius: 12px;
border: 1px solid #dee0e3;
+ min-height: fit-content;
+ height: auto;
}
.not-first {
margin-top: 16px;