修改地址

main
suixy 2 months ago
parent 1cd29af790
commit 2324ae2630

@ -4,7 +4,7 @@ import { ElMessage } from "element-plus";
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
const service = axios.create({ const service = axios.create({
baseURL: '/dev-api', timeout: 100000 baseURL: import.meta.env.MODE === 'development' ? '/dev-api' : 'https://192.168.1.123:5000', timeout: 100000
}); });
service.interceptors.request.use(config => { service.interceptors.request.use(config => {

@ -1168,7 +1168,7 @@ import {
getLocalPositionRelativeToP4, getLocalPositionRelativeToP4,
parseTime parseTime
} from '@/utils/tool' } from '@/utils/tool'
const formUrl = 'http://192.168.1.123:5000/' const formUrl = 'https://192.168.1.123:5000/'
const router = useRouter() const router = useRouter()
const date1 = ref([]) const date1 = ref([])
@ -1350,7 +1350,7 @@ const table1Current1 = (e,) => {
// ws // ws
const getSocket = () => { const getSocket = () => {
const socket = new WebSocket("ws://192.168.1.123:7789/ws"); const socket = new WebSocket("wss://192.168.1.123:7789/ws");
socket.addEventListener("open", () => { socket.addEventListener("open", () => {
console.log("✅ WebSocket 连接成功"); console.log("✅ WebSocket 连接成功");
@ -2640,8 +2640,9 @@ watch(() => JSON.stringify([tableData1.value, areaPoints.value]), (oldVal, newVa
</script> </script>
<style lang="less"> <style lang="less">
.app-container { .app-container {
width: 1080px; width: 100%;
min-width: 1080px; //width: 1080px;
//min-width: 1080px;
height: 100vh; height: 100vh;
margin: 0 auto; margin: 0 auto;
} }
@ -2696,6 +2697,7 @@ watch(() => JSON.stringify([tableData1.value, areaPoints.value]), (oldVal, newVa
.left { .left {
display: inline-block; display: inline-block;
height: calc(100vh - 80px); height: calc(100vh - 80px);
min-height: 56vw;
width: 34%; width: 34%;
vertical-align: top; vertical-align: top;
position: relative; position: relative;
@ -2719,6 +2721,7 @@ watch(() => JSON.stringify([tableData1.value, areaPoints.value]), (oldVal, newVa
padding: 20px 20px 0 20px; padding: 20px 20px 0 20px;
display: inline-block; display: inline-block;
height: calc(100vh - 80px - 20px); height: calc(100vh - 80px - 20px);
min-height: 56vw;
width: calc(66% - 40px); width: calc(66% - 40px);
background-color: #F6F7FB; background-color: #F6F7FB;
overflow: auto; overflow: auto;

@ -9,7 +9,9 @@ export default defineConfig({
host: '0.0.0.0', port: 5173, open: true, proxy: { host: '0.0.0.0', port: 5173, open: true, proxy: {
'/dev-api': { '/dev-api': {
// target: 'http://192.168.1.123:5000', // target: 'http://192.168.1.123:5000',
target: 'http://192.168.0.103:5000', // target: 'http://192.168.0.105:5000',
// target: 'http://192.168.0.13:5000',
target: 'https://192.168.1.123:5000',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
secure: false, secure: false,

Loading…
Cancel
Save