Browse Source

Merge branch 'release' of gitadmin/tuoheng_pilot_web into master

pull/85/head
zhangtao 1 year ago
parent
commit
787f7b4f80
10 changed files with 16 additions and 22 deletions
  1. +1
    -2
      .env.development
  2. +2
    -3
      .env.localhost
  3. +1
    -2
      .env.production
  4. +3
    -4
      .env.test
  5. +2
    -2
      index.html
  6. BIN
      src/assets/red.png
  7. +2
    -0
      src/utils/http/interceptors.js
  8. +3
    -3
      src/utils/oidc/index.js
  9. +0
    -4
      src/views/task-manage/components/DrawComp.vue
  10. +2
    -2
      src/views/task-manage/components/UserModal.vue

+ 1
- 2
.env.development View File



VITE_AUTHORITY = 'http://192.168.11.11:8090' VITE_AUTHORITY = 'http://192.168.11.11:8090'
VITE_CLIENT_ID = 'tuoheng-pilot-admin' VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_REDIRECT_URI = 'http://192.168.11.11:7011/login'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 2
- 3
.env.localhost View File

# mock base api # mock base api
VITE_APP_GLOB_BASE_API_MOCK = '/api-mock' 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_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_REDIRECT_URI = 'http://192.168.12.8:3050/login'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 1
- 2
.env.production View File



VITE_AUTHORITY = 'https://oidc.t-aaron.com' VITE_AUTHORITY = 'https://oidc.t-aaron.com'
VITE_CLIENT_ID = 'tuoheng-pilot-admin' VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_REDIRECT_URI = 'https://pilot.t-aaron.com/login'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 3
- 4
.env.test View File

VITE_APP_USE_MOCK = false VITE_APP_USE_MOCK = false


# proxy # proxy
VITE_PROXY = [["","http://192.168.11.241:9089"]]
VITE_PROXY = [["","http://106.15.120.154:9089"]]


# base api # base api
VITE_APP_GLOB_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_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_REDIRECT_URI = 'http://192.168.11.241:9089/login'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 2
- 2
index.html View File

securityJsCode: 'eb839debb422cd65cc598664067ee7d8' securityJsCode: 'eb839debb422cd65cc598664067ee7d8'
} }
</script> </script>
<style type="text/css">
<!-- <style type="text/css">
.amap-logo { .amap-logo {
display: none; display: none;
opacity: 0 !important; opacity: 0 !important;
.amap-copyright { .amap-copyright {
opacity: 0; opacity: 0;
} }
</style>
</style> -->
</head> </head>


<body> <body>

BIN
src/assets/red.png View File

Before After
Width: 36  |  Height: 34  |  Size: 1.3KB

+ 2
- 0
src/utils/http/interceptors.js View File

if (userInfo) { if (userInfo) {
const { token_type, access_token } = userInfo const { token_type, access_token } = userInfo
config.headers.Authorization = `${token_type} ${access_token}` config.headers.Authorization = `${token_type} ${access_token}`
const { VITE_CLIENT_ID } = import.meta.env
config.headers['Client-Id'] = VITE_CLIENT_ID
return config return config
} else { } else {
signoutRedirect() signoutRedirect()

+ 3
- 3
src/utils/oidc/index.js View File



export const initServe = () => { export const initServe = () => {
if (oidcManager) return oidcManager 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({ oidcManager = new UserManager({
/* 认证服务器 */ /* 认证服务器 */
authority: VITE_AUTHORITY, authority: VITE_AUTHORITY,
client_id: VITE_CLIENT_ID, client_id: VITE_CLIENT_ID,
client_secret: VITE_CLIENT_SECRET, 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', response_type: 'code',
/* 授权范围 */ /* 授权范围 */
scope: 'openid profile', scope: 'openid profile',

+ 0
- 4
src/views/task-manage/components/DrawComp.vue View File

pilotStart({ id: data.id }).then(({ code, msg }) => { pilotStart({ id: data.id }).then(({ code, msg }) => {
if (code === 0) { if (code === 0) {
emit('close') emit('close')
} else {
$message.error(msg)
} }
}) })
} }
pilotEnd({ id: data.id }).then(({ code, msg }) => { pilotEnd({ id: data.id }).then(({ code, msg }) => {
if (code === 0) { if (code === 0) {
emit('close') emit('close')
} else {
$message.error(msg)
} }
}) })
} }

+ 2
- 2
src/views/task-manage/components/UserModal.vue View File

@positive-click="userForm.patrolLocation = startVal" @positive-click="userForm.patrolLocation = startVal"
@negative-click="showStart = false" @negative-click="showStart = false"
> >
<map-comp @mapEmit="startHandle" />
<map-comp v-if="showStart" @mapEmit="startHandle" />
</n-modal> </n-modal>


<n-modal <n-modal
@positive-click="userForm.endValue = endVal" @positive-click="userForm.endValue = endVal"
@negative-click="showEnd = false" @negative-click="showEnd = false"
> >
<map-comp @mapEmit="endHandle" />
<map-comp v-if="showEnd" @mapEmit="endHandle" />
</n-modal> </n-modal>


</template> </template>

Loading…
Cancel
Save