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] === "/") {
|
if (state.split('#')[0] === 'fit2cloud-lark-suite-qr' && state.split('#')[1] === "/") {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
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 weComCallback = response.data.data;
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
// 删除缓存
|
// 删除缓存
|
||||||
|
|
|
@ -236,15 +236,30 @@ export default {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
if (key === 'WE_COM') {
|
if (key === 'WE_COM') {
|
||||||
await validateWeComConfig(this.weComInfo);
|
validateWeComConfig(this.weComInfo).then(res => {
|
||||||
} 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);
|
|
||||||
}
|
|
||||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
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) {
|
} catch (error) {
|
||||||
if (key === 'WE_COM') {
|
if (key === 'WE_COM') {
|
||||||
await closeValidateWeCom();
|
await closeValidateWeCom();
|
||||||
|
@ -274,15 +289,22 @@ export default {
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
if (key === 'WE_COM') {
|
if (key === 'WE_COM') {
|
||||||
await enableWeCom(params);
|
await enableWeCom(params).then(res => {
|
||||||
} else if (key === 'DING_TALK') {
|
|
||||||
await enableDingTalk(params);
|
|
||||||
} else if (key === 'LARK') {
|
|
||||||
await enableLark(params);
|
|
||||||
} else if (key === 'LARK_SUITE') {
|
|
||||||
await enableLarkSuite(params);
|
|
||||||
}
|
|
||||||
this.$message.success(this.$t(message));
|
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();
|
this.loadList();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|
|
@ -118,6 +118,9 @@ export default {
|
||||||
this.loading = validateDingTalkConfig(this.dingTalkForm).then(res => {
|
this.loading = validateDingTalkConfig(this.dingTalkForm).then(res => {
|
||||||
this.dingTalkForm.valid = true;
|
this.dingTalkForm.valid = true;
|
||||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
||||||
|
}).catch(e => {
|
||||||
|
this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip'));
|
||||||
|
this.dingTalkForm.valid = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('error submit!!');
|
console.log('error submit!!');
|
||||||
|
|
|
@ -114,9 +114,13 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
validateLarkConfig(this.weComForm);
|
validateLarkConfig(this.weComForm).then(res => {
|
||||||
this.larkForm.valid = true;
|
|
||||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
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) {
|
} catch (error) {
|
||||||
this.larkForm.valid = false;
|
this.larkForm.valid = false;
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|
|
@ -115,9 +115,13 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
validateLarkSuiteConfig(this.larkSuiteForm);
|
validateLarkSuiteConfig(this.larkSuiteForm).then(res => {
|
||||||
this.larkForm.valid = true;
|
this.larkForm.valid = true;
|
||||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
||||||
|
}).catch(e => {
|
||||||
|
this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip'));
|
||||||
|
this.larkForm.valid = false;
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.larkForm.valid = false;
|
this.larkForm.valid = false;
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|
|
@ -119,9 +119,13 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
validateWeComConfig(this.weComForm);
|
validateWeComConfig(this.weComForm).then(res => {
|
||||||
this.weComForm.valid = true;
|
this.weComForm.valid = true;
|
||||||
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
this.$message.success(this.$t('qrcode.service_testLinkStatusTip'));
|
||||||
|
}).catch(e => {
|
||||||
|
this.$message.error(this.$t('qrcode.service_testLinkStatusErrorTip'));
|
||||||
|
this.weComForm.valid = false;
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.weComForm.valid = false;
|
this.weComForm.valid = false;
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|
|
@ -45,6 +45,7 @@ const message = {
|
||||||
service_resetConfigTip: 'Reset successful!',
|
service_resetConfigTip: 'Reset successful!',
|
||||||
service_testLink: 'test connection',
|
service_testLink: 'test connection',
|
||||||
service_testLinkStatusTip: 'Test connection successful!',
|
service_testLinkStatusTip: 'Test connection successful!',
|
||||||
|
service_testLinkStatusErrorTip: 'Test connection error!',
|
||||||
service_enableSuccess: 'Activated successfully',
|
service_enableSuccess: 'Activated successfully',
|
||||||
service_closeSuccess: 'Disabled successfully',
|
service_closeSuccess: 'Disabled successfully',
|
||||||
service_edit: 'edit',
|
service_edit: 'edit',
|
||||||
|
|
|
@ -45,6 +45,7 @@ const message = {
|
||||||
service_resetConfigTip: '重置成功!',
|
service_resetConfigTip: '重置成功!',
|
||||||
service_testLink: '测试连接',
|
service_testLink: '测试连接',
|
||||||
service_testLinkStatusTip: '测试连接成功!',
|
service_testLinkStatusTip: '测试连接成功!',
|
||||||
|
service_testLinkStatusErrorTip: '测试连接失败!',
|
||||||
service_enableSuccess: '启用成功',
|
service_enableSuccess: '启用成功',
|
||||||
service_closeSuccess: '禁用成功',
|
service_closeSuccess: '禁用成功',
|
||||||
service_edit: '编辑',
|
service_edit: '编辑',
|
||||||
|
|
|
@ -45,6 +45,7 @@ const message = {
|
||||||
service_resetConfigTip: '重置成功!',
|
service_resetConfigTip: '重置成功!',
|
||||||
service_testLink: '測試連接',
|
service_testLink: '測試連接',
|
||||||
service_testLinkStatusTip: '測試連接成功!',
|
service_testLinkStatusTip: '測試連接成功!',
|
||||||
|
service_testLinkStatusErrorTip: '測試連接失敗!',
|
||||||
service_enableSuccess: '啟用成功',
|
service_enableSuccess: '啟用成功',
|
||||||
service_closeSuccess: '停用成功',
|
service_closeSuccess: '停用成功',
|
||||||
service_edit: '編輯',
|
service_edit: '編輯',
|
||||||
|
|
Loading…
Reference in New Issue