阶段性代码提交
This commit is contained in:
parent
63000c55f1
commit
3b31338238
|
|
@ -11,7 +11,7 @@ VITE_APP_CLIENT_SECRET = 'NjHifmmB41rH6bJTd4A7RA=='
|
||||||
|
|
||||||
#程璐
|
#程璐
|
||||||
#VITE_APP_API_BASE_URL=http://192.168.12.117:9060/airport/
|
#VITE_APP_API_BASE_URL=http://192.168.12.117:9060/airport/
|
||||||
VITE_APP_API_BASE_URL= https://virtualplane-test.t-aaron.com
|
VITE_APP_API_BASE_URL= https://virtualplane-test.t-aaron.com/airport
|
||||||
#VITE_APP_API_BASE_URL=https://airport-develop.t-aaron.com:3443
|
#VITE_APP_API_BASE_URL=https://airport-develop.t-aaron.com:3443
|
||||||
# VUE_APP_API_BASE_URL=https://airport.t-aaron.com/airport/
|
# VUE_APP_API_BASE_URL=https://airport.t-aaron.com/airport/
|
||||||
# VUE_APP_API_BASE_URL=https://airportdev.t-aaron.com/airport/
|
# VUE_APP_API_BASE_URL=https://airportdev.t-aaron.com/airport/
|
||||||
|
|
@ -27,8 +27,4 @@ VITE_APP_AUTHORITY =https://login-test.t-aaron.com
|
||||||
#令牌
|
#令牌
|
||||||
#VUE_APP_OUT_AUTHORITY = 'https://oidc-develop.t-aaron.com:3443'
|
#VUE_APP_OUT_AUTHORITY = 'https://oidc-develop.t-aaron.com:3443'
|
||||||
|
|
||||||
# 机场大屏跳转地址
|
|
||||||
VITE_APP_ASURL = 'https://airport-screen-test.t-aaron.com'
|
|
||||||
|
|
||||||
# 低空
|
|
||||||
VITE_APP_BUSINESS ='http://192.168.14.12:8082'
|
|
||||||
|
|
|
||||||
|
|
@ -4,42 +4,42 @@ import axios from 'axios'
|
||||||
//机场查询
|
//机场查询
|
||||||
export function queryAirportApi(params) {
|
export function queryAirportApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/airportStatus/index`,
|
url: `/api/airportStatus/index?airportId=${params.airportId}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//无人机查询
|
//无人机查询(暂时没用)
|
||||||
export function queryDroneApi(params) {
|
export function queryDroneApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/drone/getDroneList`,
|
url: `/api/drone/getDroneList`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//电池查询
|
//电池查询(暂时没用)
|
||||||
export function queryBatteryApi(params) {
|
export function queryBatteryApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/batteryRecord/queryBatteryBaseInfoList`,
|
url: `/api/batteryRecord/queryBatteryBaseInfoList`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//航线查询
|
//航线查询(暂时没用)
|
||||||
// api/airlineFile/getAirlineFileListByAirportId?airportId=67
|
// api/airlineFile/getAirlineFileListByAirportId?airportId=67
|
||||||
export function queryAirLineApi(params) {
|
export function queryAirLineApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `api/airlineFile/getAirlineFileListByAirportId`,
|
url: `api/airlineFile/getAirlineFileListByAirportId?airportId=${params.airportId}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//无人机飞前自检
|
//无人机飞前自检
|
||||||
export function beforeCheckApi(params) {
|
export function beforeCheckApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/airportLog/virtualCockpit/progressBar`,
|
url: `/api/airportLog/virtualCockpit/progressBar?airportId=${params.airportId}&taskId=${params.taskId}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取航线文件
|
//获取航线文件
|
||||||
|
|
@ -131,6 +131,6 @@ export function getweatherApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/airportLog/getCallback`,
|
url: `/api/airportLog/getCallback`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
data: params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
|
||||||
const queryParams = new URLSearchParams(window.location.search)
|
const queryParams = new URLSearchParams(window.location.search)
|
||||||
const access_token = queryParams.get('access_token')
|
const access_token = queryParams.get('access_token')
|
||||||
const token_type = queryParams.get('token_type')
|
const token_type = queryParams.get('token_type')
|
||||||
const airporId = queryParams.get('airporId')
|
const airporId = queryParams.get('airportId')
|
||||||
|
|
||||||
let oidcSession = {
|
let oidcSession = {
|
||||||
access_token: access_token,
|
access_token: access_token,
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,11 @@ import router from '@/router'
|
||||||
import { useSettingStore } from '@/stores/setting.js'
|
import { useSettingStore } from '@/stores/setting.js'
|
||||||
|
|
||||||
// request是一个axios实例,每一个实例你都可以单独定制它的baseURL,超时时间,请求头和一些其他配置项。
|
// request是一个axios实例,每一个实例你都可以单独定制它的baseURL,超时时间,请求头和一些其他配置项。
|
||||||
const baseUrl = import.meta.env.VITE_APP_API_BASE_URL + '/airport/admin' //接口统一域名
|
//const baseUrl = import.meta.env.VITE_APP_API_BASE_URL + 'airport/admin' //接口统一域名
|
||||||
// const baseUrl = '/airport/admin' //接口统一域名
|
//const baseUrl = 'https://virtualplane-test.t-aaron.com/airport/admin' //接口统一域名
|
||||||
// const baseUrl = '/airport/admin'
|
const baseUrl = '/airport/admin'
|
||||||
|
|
||||||
// 设置统一的url
|
// 设置统一的url
|
||||||
// axios.defaults.baseURL = '/airport/admin'
|
// axios.defaults.baseURL = '/airport/admin'
|
||||||
|
|
||||||
const instance = axios.create({
|
const instance = axios.create({
|
||||||
baseURL: baseUrl,
|
baseURL: baseUrl,
|
||||||
timeout: 60 * 1000, //设置超时
|
timeout: 60 * 1000, //设置超时
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ const queryAirLine_AirPort = async () => {
|
||||||
let params = {
|
let params = {
|
||||||
airportId: window.iframe_AirPortID, //67 1011
|
airportId: window.iframe_AirPortID, //67 1011
|
||||||
}
|
}
|
||||||
|
|
||||||
let res = await Promise.allSettled([queryAirportApi(params), queryAirLineApi(params)])
|
let res = await Promise.allSettled([queryAirportApi(params), queryAirLineApi(params)])
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if (res[0].value.code == 0) {
|
if (res[0].value.code == 0) {
|
||||||
|
|
@ -185,6 +186,7 @@ const queryAirPort = async () => {
|
||||||
let params = {
|
let params = {
|
||||||
airportId: window.iframe_AirPortID,
|
airportId: window.iframe_AirPortID,
|
||||||
}
|
}
|
||||||
|
console.log(params)
|
||||||
|
|
||||||
let res = await queryAirportApi(params)
|
let res = await queryAirportApi(params)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
@ -192,7 +194,7 @@ const queryAirPort = async () => {
|
||||||
airPortSocketStore.ceurrentAirPortData = currentAirPortInfo.value
|
airPortSocketStore.ceurrentAirPortData = currentAirPortInfo.value
|
||||||
// console.log(currentAirPortInfo.value)
|
// console.log(currentAirPortInfo.value)
|
||||||
|
|
||||||
currentAirPortInfo.value.status = 2
|
// currentAirPortInfo.value.status = 2
|
||||||
|
|
||||||
if (currentAirPortStatus.value != Number(currentAirPortInfo.value.status)) {
|
if (currentAirPortStatus.value != Number(currentAirPortInfo.value.status)) {
|
||||||
currentAirPortStatus.value = Number(currentAirPortInfo.value.status)
|
currentAirPortStatus.value = Number(currentAirPortInfo.value.status)
|
||||||
|
|
|
||||||
|
|
@ -109,15 +109,19 @@ export default ({ command, mode }) => {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8080,
|
port: 8080,
|
||||||
cors: true,
|
cors: true,
|
||||||
http: true,
|
|
||||||
open: false, //不自动开启
|
open: false, //不自动开启
|
||||||
proxy: {
|
proxy: {
|
||||||
'/airport': {
|
'/airport': {
|
||||||
target: env.VITE_APP_API_BASE_URL,
|
target: env.VITE_APP_API_BASE_URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
logLeve: 'debug', //输出真实的地址
|
logLeve: 'debug', //输出真实的地址
|
||||||
rewrite: {
|
rewrite: (path) => path.replace(/^\/airport/, ''),
|
||||||
'^/airport': '',
|
//获取真实的转发地址
|
||||||
|
bypass(req, res, options) {
|
||||||
|
const proxyURL = options.target + options.rewrite(req.url)
|
||||||
|
console.log('proxyURL', proxyURL)
|
||||||
|
req.headers['x-req-proxyURL'] = proxyURL // 设置未生效
|
||||||
|
res.setHeader('x-req-proxyURL', proxyURL) // 设置响应头可以看到
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue