修改地址

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';
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 => {

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

@ -9,7 +9,9 @@ export default defineConfig({
host: '0.0.0.0', port: 5173, open: true, proxy: {
'/dev-api': {
// 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,
ws: true,
secure: false,

Loading…
Cancel
Save