From 3a718e10145b2761283308edc1699f7da969a759 Mon Sep 17 00:00:00 2001 From: x_z Date: Tue, 18 Oct 2022 22:04:44 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E5=8C=BB=E9=99=A2=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=A0=A1=E9=AA=8C=E6=8E=A5=E5=8F=A3=202.=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=A1=B5=E9=9D=A2=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/platform.js | 8 ++++++- src/views/sys/bindPlatform.vue | 43 +++++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/api/auth/platform.js b/src/api/auth/platform.js index cc3a184..f96f8f9 100644 --- a/src/api/auth/platform.js +++ b/src/api/auth/platform.js @@ -82,4 +82,10 @@ export function testPlatformConnection(query) { }) } - +export function testUserInfo(data) { + return axios({ + url: "/udims/platform/testUserInfo", + method: "post", + data: data + }); +} diff --git a/src/views/sys/bindPlatform.vue b/src/views/sys/bindPlatform.vue index 3f7f4e3..72749fe 100644 --- a/src/views/sys/bindPlatform.vue +++ b/src/views/sys/bindPlatform.vue @@ -146,11 +146,13 @@ - 账号验证 + + 账号验证 + @@ -162,7 +164,7 @@ { - this.$refs['editLogin'].resetFields(); this.$refs["editLogin"].clearValidate(); }); }, @@ -643,6 +648,7 @@ export default { type: "success", message: "关联成功" }); + this.targetPlatformEdit = true; this.cancelDialog(); } else { this.$message.error(response.message); @@ -668,7 +674,32 @@ export default { this.getTargetActions(); }, testUserInfo() { - + if (isBlank(this.editLogin.platformId)) { + this.$message.error("请选择自助平台"); + return; + } + if (isBlank(this.editLogin.platformUsername)) { + this.$message.error("请输入用户名"); + return; + } + if (isBlank(this.editLogin.platformPassword)) { + this.$message.error("请输入密码"); + return; + } + let data = { + platformId: this.editLogin.platformId, + username: this.editLogin.platformUsername, + password: this.editLogin.platformPassword + }; + testUserInfo(data).then((res) => { + if (res.code === 20000) { + this.targetPlatformEdit = false; + this.$message.success("验证成功"); + } else { + this.$message.error(res.message); + } + }).catch((error) => { + }); }, }, mounted() {