@@ -12,5 +12,4 @@ VITE_APP_GLOB_BASE_API = '' | |||
VITE_AUTHORITY = 'http://192.168.11.11:8090' | |||
VITE_CLIENT_ID = 'tuoheng-pilot-admin' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | |||
VITE_REDIRECT_URI = 'http://192.168.11.11:7011/login' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' |
@@ -13,7 +13,6 @@ VITE_APP_GLOB_BASE_API = '/api-local' | |||
# mock base api | |||
VITE_APP_GLOB_BASE_API_MOCK = '/api-mock' | |||
VITE_AUTHORITY = 'https://oidc.test.t-aaron.com' | |||
VITE_AUTHORITY = 'https://login-test.t-aaron.com' | |||
VITE_CLIENT_ID = 'tuoheng-pilot-admin' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | |||
VITE_REDIRECT_URI = 'http://192.168.12.8:3050/login' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' |
@@ -12,5 +12,4 @@ VITE_APP_GLOB_BASE_API = '' | |||
VITE_AUTHORITY = 'https://oidc.t-aaron.com' | |||
VITE_CLIENT_ID = 'tuoheng-pilot-admin' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | |||
VITE_REDIRECT_URI = 'https://pilot.t-aaron.com/login' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' |
@@ -5,12 +5,11 @@ VITE_PUBLIC_PATH = '/' | |||
VITE_APP_USE_MOCK = false | |||
# proxy | |||
VITE_PROXY = [["","http://192.168.11.241:9089"]] | |||
VITE_PROXY = [["","http://106.15.120.154:9089"]] | |||
# base api | |||
VITE_APP_GLOB_BASE_API = '' | |||
VITE_AUTHORITY = 'https://oidc.test.t-aaron.com' | |||
VITE_AUTHORITY = 'https://login-test.t-aaron.com' | |||
VITE_CLIENT_ID = 'tuoheng-pilot-admin' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | |||
VITE_REDIRECT_URI = 'http://192.168.11.241:9089/login' | |||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' |
@@ -22,7 +22,7 @@ | |||
securityJsCode: 'eb839debb422cd65cc598664067ee7d8' | |||
} | |||
</script> | |||
<style type="text/css"> | |||
<!-- <style type="text/css"> | |||
.amap-logo { | |||
display: none; | |||
opacity: 0 !important; | |||
@@ -31,7 +31,7 @@ | |||
.amap-copyright { | |||
opacity: 0; | |||
} | |||
</style> | |||
</style> --> | |||
</head> | |||
<body> |
@@ -16,6 +16,8 @@ export function setupInterceptor(service) { | |||
if (userInfo) { | |||
const { token_type, access_token } = userInfo | |||
config.headers.Authorization = `${token_type} ${access_token}` | |||
const { VITE_CLIENT_ID } = import.meta.env | |||
config.headers['Client-Id'] = VITE_CLIENT_ID | |||
return config | |||
} else { | |||
signoutRedirect() |
@@ -4,7 +4,7 @@ let oidcManager = null | |||
export const initServe = () => { | |||
if (oidcManager) return oidcManager | |||
const { VITE_AUTHORITY, VITE_CLIENT_ID, VITE_CLIENT_SECRET, VITE_REDIRECT_URI } = import.meta.env | |||
const { VITE_AUTHORITY, VITE_CLIENT_ID, VITE_CLIENT_SECRET } = import.meta.env | |||
oidcManager = new UserManager({ | |||
/* 认证服务器 */ | |||
authority: VITE_AUTHORITY, | |||
@@ -12,8 +12,8 @@ export const initServe = () => { | |||
client_id: VITE_CLIENT_ID, | |||
client_secret: VITE_CLIENT_SECRET, | |||
/* 回调客户端页面 */ | |||
redirect_uri: VITE_REDIRECT_URI, | |||
post_logout_redirect_uri: VITE_REDIRECT_URI, | |||
redirect_uri: `${window.location.origin}/login`, | |||
post_logout_redirect_uri: `${window.location.origin}/login`, | |||
response_type: 'code', | |||
/* 授权范围 */ | |||
scope: 'openid profile', |
@@ -281,8 +281,6 @@ const startFly = () => { | |||
pilotStart({ id: data.id }).then(({ code, msg }) => { | |||
if (code === 0) { | |||
emit('close') | |||
} else { | |||
$message.error(msg) | |||
} | |||
}) | |||
} | |||
@@ -299,8 +297,6 @@ const endFly = () => { | |||
pilotEnd({ id: data.id }).then(({ code, msg }) => { | |||
if (code === 0) { | |||
emit('close') | |||
} else { | |||
$message.error(msg) | |||
} | |||
}) | |||
} |
@@ -78,7 +78,7 @@ | |||
@positive-click="userForm.patrolLocation = startVal" | |||
@negative-click="showStart = false" | |||
> | |||
<map-comp @mapEmit="startHandle" /> | |||
<map-comp v-if="showStart" @mapEmit="startHandle" /> | |||
</n-modal> | |||
<n-modal | |||
@@ -91,7 +91,7 @@ | |||
@positive-click="userForm.endValue = endVal" | |||
@negative-click="showEnd = false" | |||
> | |||
<map-comp @mapEmit="endHandle" /> | |||
<map-comp v-if="showEnd" @mapEmit="endHandle" /> | |||
</n-modal> | |||
</template> |