From 22bc912a9e5dcec1dc1337a476815e40346dab5b Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 25 Oct 2022 15:48:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=A1=AB=E5=86=99=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E8=B4=A6=E5=8F=B7=E4=BF=A1=E6=81=AF=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018837 --user=李玉号 【系统设置】个人信息-第三方账号-填写第三方账号信息-校验报404 https://www.tapd.cn/55049933/s/1276411 --- framework/sdk-parent/frontend/src/api/user.js | 2 +- .../src/components/personal/PersonRouter.vue | 6 ++--- .../src/components/personal/PersonSetting.vue | 4 ++-- .../BasePersonalRelateController.java | 23 +++++++++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java diff --git a/framework/sdk-parent/frontend/src/api/user.js b/framework/sdk-parent/frontend/src/api/user.js index 77709a7415..18fe6cd51e 100644 --- a/framework/sdk-parent/frontend/src/api/user.js +++ b/framework/sdk-parent/frontend/src/api/user.js @@ -30,7 +30,7 @@ export function updatePassword(data) { } export function handleAuth(param) { - return post('issues/user/auth', param) + return post('/personal/relate/issues/user/auth', param); } export function getSystemTheme() { diff --git a/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue b/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue index cbf7785493..e0a63866f3 100644 --- a/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue +++ b/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue @@ -55,7 +55,7 @@ import JiraUserInfo from "./JiraUserInfo"; import AzureDevopsUserInfo from "./AzureDevopsUserInfo"; import {getIntegrationService} from "../../api/workspace"; import {useUserStore} from "@/store"; -import {getUserInfo, getWsAndPj} from "../../api/user"; +import {handleAuth as _handleAuth,getUserInfo, getWsAndPj} from "../../api/user"; const userStore = useUserStore(); @@ -142,9 +142,9 @@ export default { } param.workspaceId = getCurrentWorkspaceId(); param.platform = type; - this.$parent.result = this.$post("issues/user/auth", param, () => { + this.$parent.result = _handleAuth(param).then(() => { this.$success(this.$t('organization.integration.verified')); - }); + }) }, getPlatformInfo(row) { let orgId = getCurrentWorkspaceId(); diff --git a/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue b/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue index aaf92f8a10..93043899b8 100644 --- a/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue +++ b/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue @@ -100,7 +100,7 @@ import {getIntegrationService} from "../../api/workspace"; import ZentaoUserInfo from "./ZentaoUserInfo"; import AzureDevopsUserInfo from "./AzureDevopsUserInfo"; import {useUserStore} from "@/store"; -import {handleAuth, updateInfo, updatePassword} from "../../api/user"; +import {handleAuth as _handleAuth, updateInfo, updatePassword} from "../../api/user"; const userStore = useUserStore(); @@ -302,7 +302,7 @@ export default { let param = {...this.currentPlatformInfo}; param.workspaceId = getCurrentWorkspaceId(); param.platform = type; - this.$parent.result = handleAuth(param) + this.$parent.result = _handleAuth(param) .then(() => { this.$success(this.$t('organization.integration.verified')); }); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java new file mode 100644 index 0000000000..25789ed4aa --- /dev/null +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java @@ -0,0 +1,23 @@ +package io.metersphere.controller; + +import io.metersphere.commons.constants.MicroServiceName; +import io.metersphere.service.MicroService; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@RequestMapping("/personal/relate") +public class BasePersonalRelateController { + + @Resource + private MicroService microService; + + @PostMapping("/issues/user/auth") + public void userAuth(@RequestBody Object obj) { + microService.postForData(MicroServiceName.TEST_TRACK, "/issues/user/auth", obj); + } +}