fix(auth, config): 修复sso接口请求并调整开发环境配置
修正sso回调接口的请求路径,添加base/v1前缀
将dev环境的接口地址切换为测试环境HTTPS地址
调整响应结果判断逻辑,移除isSuccess检查
临时注释JSON解析代码以方便调试
| | |
| | | dev: { |
| | | // url: 'http://localhost:3000', |
| | | // url: 'http://221.182.45.100:8000', |
| | | url: 'http://rt-admin.test.xiaopeng.local', |
| | | // url: 'https://rt-api.deploy-test.xiaopeng.com', |
| | | // url: 'http://rt-admin.test.xiaopeng.local', |
| | | url: 'https://rt-api.deploy-test.xiaopeng.com', |
| | | }, |
| | | production: { |
| | | url: 'https://rt-admin.deploy-test.xiaopeng.com', |
| | |
| | | } |
| | | |
| | | export function fetchSsoCallback(params: { code: string, state: string }) { |
| | | const method = request.Get<Service.ResponseResult<Api.Login.Info>>('/account/ssoAuthSdk/sysLogin', { params }) |
| | | const method = request.Get<Service.ResponseResult<Api.Login.Info>>('/account/base/v1/ssoAuthSdk/sysLogin', { params }) |
| | | method.meta = { |
| | | authRole: null, |
| | | } |
| | |
| | | |
| | | // 返回json数据 |
| | | const apiData = await response.json() |
| | | // const apiData = await response.json() |
| | | // 请求成功 |
| | | if (apiData[_backendConfig.codeKey] === _backendConfig.successCode) |
| | | return handleServiceResult(apiData) |
| | |
| | | const result = await fetchSsoCallback({ code, state }) |
| | | console.log('[dashboard] /account/ssoAuthSdk/sysLogin', result) |
| | | |
| | | if (!result.isSuccess || !result.data) { |
| | | if (!result.data) { |
| | | console.warn('[dashboard] /account/ssoAuthSdk/sysLogin failed', result) |
| | | return true |
| | | } |