diff --git a/framework/sdk-parent/frontend/src/App.vue b/framework/sdk-parent/frontend/src/App.vue index e1d5294c2b..b6fdc5a22f 100644 --- a/framework/sdk-parent/frontend/src/App.vue +++ b/framework/sdk-parent/frontend/src/App.vue @@ -67,7 +67,7 @@ export default { if (state.split('#')[0] === 'fit2cloud-lark-suite-qr' && state.split('#')[1] === "/") { this.loading = true; try { - axios.get("/sso/callback/lark?lark_suite="+code).then((response) => { + axios.get("/sso/callback/lark_suite?code="+code).then((response) => { const weComCallback = response.data.data; const userStore = useUserStore() // 删除缓存 diff --git a/system-setting/frontend/src/business/system/setting/QrCodeConfig.vue b/system-setting/frontend/src/business/system/setting/QrCodeConfig.vue index b54363a7cd..17f5661a85 100644 --- a/system-setting/frontend/src/business/system/setting/QrCodeConfig.vue +++ b/system-setting/frontend/src/business/system/setting/QrCodeConfig.vue @@ -236,15 +236,30 @@ export default { this.loading = true; try { if (key === 'WE_COM') { - await validateWeComConfig(this.weComInfo); + validateWeComConfig(this.weComInfo).then(res => { + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + }); } else if (key === 'DING_TALK') { - await validateDingTalkConfig(this.dingTalkInfo); + validateDingTalkConfig(this.dingTalkInfo).then(res => { + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + }); } else if (key === 'LARK') { - await validateLarkConfig(this.larkInfo); + validateLarkConfig(this.larkInfo).then(res => { + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + }); } else if (key === 'LARK_SUITE') { - await validateLarkSuiteConfig(this.larkInfo); + await validateLarkSuiteConfig(this.larkInfo).then(res => { + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + }); } - this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); } catch (error) { if (key === 'WE_COM') { await closeValidateWeCom(); @@ -274,15 +289,22 @@ export default { }; try { if (key === 'WE_COM') { - await enableWeCom(params); + await enableWeCom(params).then(res => { + this.$message.success(this.$t(message)); + }); } else if (key === 'DING_TALK') { - await enableDingTalk(params); + await enableDingTalk(params).then(res => { + this.$message.success(this.$t(message)); + }); } else if (key === 'LARK') { - await enableLark(params); + await enableLark(params).then(res => { + this.$message.success(this.$t(message)); + }); } else if (key === 'LARK_SUITE') { - await enableLarkSuite(params); + await enableLarkSuite(params).then(res => { + this.$message.success(this.$t(message)); + }); } - this.$message.success(this.$t(message)); this.loadList(); } catch (error) { // eslint-disable-next-line no-console diff --git a/system-setting/frontend/src/business/system/setting/dingTalkModal.vue b/system-setting/frontend/src/business/system/setting/dingTalkModal.vue index b33506862f..e1cf528177 100644 --- a/system-setting/frontend/src/business/system/setting/dingTalkModal.vue +++ b/system-setting/frontend/src/business/system/setting/dingTalkModal.vue @@ -118,6 +118,9 @@ export default { this.loading = validateDingTalkConfig(this.dingTalkForm).then(res => { this.dingTalkForm.valid = true; this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + this.dingTalkForm.valid = false; }); } else { console.log('error submit!!'); diff --git a/system-setting/frontend/src/business/system/setting/larkModal.vue b/system-setting/frontend/src/business/system/setting/larkModal.vue index 9bf055b833..57eedd5f6c 100644 --- a/system-setting/frontend/src/business/system/setting/larkModal.vue +++ b/system-setting/frontend/src/business/system/setting/larkModal.vue @@ -114,9 +114,13 @@ export default { if (valid) { this.loading = true; try { - validateLarkConfig(this.weComForm); - this.larkForm.valid = true; - this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + validateLarkConfig(this.weComForm).then(res => { + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + this.larkForm.valid = true; + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + this.larkForm.valid = false; + }); } catch (error) { this.larkForm.valid = false; // eslint-disable-next-line no-console diff --git a/system-setting/frontend/src/business/system/setting/larkSuiteModal.vue b/system-setting/frontend/src/business/system/setting/larkSuiteModal.vue index 0ac85b06f3..c2d68748ec 100644 --- a/system-setting/frontend/src/business/system/setting/larkSuiteModal.vue +++ b/system-setting/frontend/src/business/system/setting/larkSuiteModal.vue @@ -115,9 +115,13 @@ export default { if (valid) { this.loading = true; try { - validateLarkSuiteConfig(this.larkSuiteForm); - this.larkForm.valid = true; - this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + validateLarkSuiteConfig(this.larkSuiteForm).then(res => { + this.larkForm.valid = true; + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + this.larkForm.valid = false; + }); } catch (error) { this.larkForm.valid = false; // eslint-disable-next-line no-console diff --git a/system-setting/frontend/src/business/system/setting/weComModal.vue b/system-setting/frontend/src/business/system/setting/weComModal.vue index 2274b465de..57996d5faa 100644 --- a/system-setting/frontend/src/business/system/setting/weComModal.vue +++ b/system-setting/frontend/src/business/system/setting/weComModal.vue @@ -119,9 +119,13 @@ export default { if (valid) { this.loading = true; try { - validateWeComConfig(this.weComForm); - this.weComForm.valid = true; - this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + validateWeComConfig(this.weComForm).then(res => { + this.weComForm.valid = true; + this.$message.success(this.$t('qrcode.service_testLinkStatusTip')); + }).catch(e => { + this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip')); + this.weComForm.valid = false; + }); } catch (error) { this.weComForm.valid = false; // eslint-disable-next-line no-console diff --git a/system-setting/frontend/src/i18n/lang/en-US.js b/system-setting/frontend/src/i18n/lang/en-US.js index c24d04211a..be7fcb1268 100644 --- a/system-setting/frontend/src/i18n/lang/en-US.js +++ b/system-setting/frontend/src/i18n/lang/en-US.js @@ -45,6 +45,7 @@ const message = { service_resetConfigTip: 'Reset successful!', service_testLink: 'test connection', service_testLinkStatusTip: 'Test connection successful!', + service_testLinkStatusErrorTip: 'Test connection error!', service_enableSuccess: 'Activated successfully', service_closeSuccess: 'Disabled successfully', service_edit: 'edit', diff --git a/system-setting/frontend/src/i18n/lang/zh-CN.js b/system-setting/frontend/src/i18n/lang/zh-CN.js index 5a7f74fb7d..f5bd8ae716 100644 --- a/system-setting/frontend/src/i18n/lang/zh-CN.js +++ b/system-setting/frontend/src/i18n/lang/zh-CN.js @@ -45,6 +45,7 @@ const message = { service_resetConfigTip: '重置成功!', service_testLink: '测试连接', service_testLinkStatusTip: '测试连接成功!', + service_testLinkStatusErrorTip: '测试连接失败!', service_enableSuccess: '启用成功', service_closeSuccess: '禁用成功', service_edit: '编辑', diff --git a/system-setting/frontend/src/i18n/lang/zh-TW.js b/system-setting/frontend/src/i18n/lang/zh-TW.js index e934e72055..9c8a44f4e0 100644 --- a/system-setting/frontend/src/i18n/lang/zh-TW.js +++ b/system-setting/frontend/src/i18n/lang/zh-TW.js @@ -45,6 +45,7 @@ const message = { service_resetConfigTip: '重置成功!', service_testLink: '測試連接', service_testLinkStatusTip: '測試連接成功!', + service_testLinkStatusErrorTip: '測試連接失敗!', service_enableSuccess: '啟用成功', service_closeSuccess: '停用成功', service_edit: '編輯',