From 40f632d42fe96fa7aefd9f4df253d4170b88a0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Tue, 12 Sep 2023 14:31:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E3=80=91API=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PC/InterFace.Dash/public/config.js | 7 ++++--- PC/InterFace.Dash/src/App.vue | 1 - PC/InterFace.Dash/src/api/wms-auth.js | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/PC/InterFace.Dash/public/config.js b/PC/InterFace.Dash/public/config.js index d6c1dc0..05f36f0 100644 --- a/PC/InterFace.Dash/public/config.js +++ b/PC/InterFace.Dash/public/config.js @@ -1,7 +1,8 @@ // dev_win -window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60021' -window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60021' -window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60020' +window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60012' +window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60020' +// window.SITE_CONFIG['baseApi'] = 'http://192.168.0.190:60078'//http://dev.ccwin-in.com:60022 +// window.SITE_CONFIG['authApi'] = 'http://192.168.0.190:60065'//http://dev.ccwin-in.com:60020 window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097' //是否登录配置信息【loginName】 window.SITE_CONFIG['isConfigLogin'] = false diff --git a/PC/InterFace.Dash/src/App.vue b/PC/InterFace.Dash/src/App.vue index 876d99d..a19d843 100644 --- a/PC/InterFace.Dash/src/App.vue +++ b/PC/InterFace.Dash/src/App.vue @@ -10,7 +10,6 @@ export default { } localStorage.setItem('baseApi',window.SITE_CONFIG['baseApi']) localStorage.setItem('authApi',window.SITE_CONFIG['authApi']) -localStorage.setItem('loginApi',window.SITE_CONFIG['loginApi']) // localStorage.setItem('userApi',window.SITE_CONFIG['userApi']) localStorage.setItem('businessApi',window.SITE_CONFIG['businessApi']) localStorage.setItem('isConfigLogin',window.SITE_CONFIG['isConfigLogin']) diff --git a/PC/InterFace.Dash/src/api/wms-auth.js b/PC/InterFace.Dash/src/api/wms-auth.js index 4b74e0b..8b96a19 100644 --- a/PC/InterFace.Dash/src/api/wms-auth.js +++ b/PC/InterFace.Dash/src/api/wms-auth.js @@ -1,6 +1,7 @@ import request from '@/utils/request' -let authApi = localStorage.getItem('authApi') + '/api' -let loginApi = localStorage.getItem('loginApi') +let baseApi = localStorage.getItem('baseApi') + '/api' +let authUrl = localStorage.getItem('authApi') +let authApi = authUrl + '/api' export function logout() { return request({ @@ -14,7 +15,7 @@ export function logout() { // 登录 export function login(data) { return request({ - url: loginApi + '/CustAccount/login', + url: authUrl + '/CustAccount/login', method: 'post', data }) @@ -35,7 +36,7 @@ export function token(data) { // 通过token获取用户信息(单点登录) export function getUsersByToken(token) { return request({ - url: loginApi + '/connect/userinfo', + url: authUrl + '/connect/userinfo', method: 'get', Token:token }) @@ -53,7 +54,7 @@ export function getUsersByUserName(name) { export function getInterfaceBoard() { return request({ method:'get', - url: authApi + '/abp/application-localization', + url: baseApi + '/abp/application-localization', params:{ CultureName:localStorage.getItem('browserLanguage'), OnlyDynamics:false @@ -66,7 +67,7 @@ export function getInterfaceBoard() { export function getDefinitionMenu(IncludeTypes) { return request({ method:'get', - url: authApi + '/abp/application-configuration', + url: baseApi + '/abp/application-configuration', params:{IncludeLocalizationResources:true} }) } @@ -75,7 +76,7 @@ export function getDefinitionMenu(IncludeTypes) { export async function getApiDefinition() { return request({ method:'get', - url: authApi + '/abp/api-definition', + url: baseApi + '/abp/api-definition', params:{IncludeTypes:true} }) } @@ -85,6 +86,7 @@ export async function getApiDefinition() { export function getPageListRoles(data) { return request({ url: authApi + '/identity/roles', + // url: 'http://192.168.0.190:44330/Identity/Roles', method: 'get', params: data })