fix(扫码登录): 修复一些bug
This commit is contained in:
parent
06f4e4d999
commit
ea33ca4670
|
@ -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()
|
||||
// 删除缓存
|
||||
|
|
|
@ -236,15 +236,30 @@ export default {
|
|||
this.loading = true;
|
||||
try {
|
||||
if (key === 'WE_COM') {
|
||||
await validateWeComConfig(this.weComInfo);
|
||||
} else if (key === 'DING_TALK') {
|
||||
await validateDingTalkConfig(this.dingTalkInfo);
|
||||
} else if (key === 'LARK') {
|
||||
await validateLarkConfig(this.larkInfo);
|
||||
} else if (key === 'LARK_SUITE') {
|
||||
await validateLarkSuiteConfig(this.larkInfo);
|
||||
}
|
||||
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') {
|
||||
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') {
|
||||
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).then(res => {
|
||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
||||
}).catch(e => {
|
||||
this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip'));
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
if (key === 'WE_COM') {
|
||||
await closeValidateWeCom();
|
||||
|
@ -274,15 +289,22 @@ export default {
|
|||
};
|
||||
try {
|
||||
if (key === 'WE_COM') {
|
||||
await enableWeCom(params);
|
||||
} else if (key === 'DING_TALK') {
|
||||
await enableDingTalk(params);
|
||||
} else if (key === 'LARK') {
|
||||
await enableLark(params);
|
||||
} else if (key === 'LARK_SUITE') {
|
||||
await enableLarkSuite(params);
|
||||
}
|
||||
await enableWeCom(params).then(res => {
|
||||
this.$message.success(this.$t(message));
|
||||
});
|
||||
} else if (key === 'DING_TALK') {
|
||||
await enableDingTalk(params).then(res => {
|
||||
this.$message.success(this.$t(message));
|
||||
});
|
||||
} else if (key === 'LARK') {
|
||||
await enableLark(params).then(res => {
|
||||
this.$message.success(this.$t(message));
|
||||
});
|
||||
} else if (key === 'LARK_SUITE') {
|
||||
await enableLarkSuite(params).then(res => {
|
||||
this.$message.success(this.$t(message));
|
||||
});
|
||||
}
|
||||
this.loadList();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -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!!');
|
||||
|
|
|
@ -114,9 +114,13 @@ export default {
|
|||
if (valid) {
|
||||
this.loading = true;
|
||||
try {
|
||||
validateLarkConfig(this.weComForm);
|
||||
this.larkForm.valid = true;
|
||||
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
|
||||
|
|
|
@ -115,9 +115,13 @@ export default {
|
|||
if (valid) {
|
||||
this.loading = true;
|
||||
try {
|
||||
validateLarkSuiteConfig(this.larkSuiteForm);
|
||||
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
|
||||
|
|
|
@ -119,9 +119,13 @@ export default {
|
|||
if (valid) {
|
||||
this.loading = true;
|
||||
try {
|
||||
validateWeComConfig(this.weComForm);
|
||||
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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -45,6 +45,7 @@ const message = {
|
|||
service_resetConfigTip: '重置成功!',
|
||||
service_testLink: '测试连接',
|
||||
service_testLinkStatusTip: '测试连接成功!',
|
||||
service_testLinkStatusErrorTip: '测试连接失败!',
|
||||
service_enableSuccess: '启用成功',
|
||||
service_closeSuccess: '禁用成功',
|
||||
service_edit: '编辑',
|
||||
|
|
|
@ -45,6 +45,7 @@ const message = {
|
|||
service_resetConfigTip: '重置成功!',
|
||||
service_testLink: '測試連接',
|
||||
service_testLinkStatusTip: '測試連接成功!',
|
||||
service_testLinkStatusErrorTip: '測試連接失敗!',
|
||||
service_enableSuccess: '啟用成功',
|
||||
service_closeSuccess: '停用成功',
|
||||
service_edit: '編輯',
|
||||
|
|
Loading…
Reference in New Issue