@@ -4,11 +4,11 @@ VITE_CLI_PORT = 8080
VITE_SERVER_PORT = 8222
VITE_BASE_API = /api
VITE_FILE_API = /api
-VITE_BASE_PATH = http://192.168.110.218
+VITE_BASE_PATH = http://192.168.254.190
VITE_POSITION = close
VITE_EDITOR = webstorm
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
// 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP
-//VITE_BASE_PATH = http://106.52.134.22
+//VITE_BASE_PATH = http://192.168.254.190
@@ -2,7 +2,7 @@ ENV = 'production'
VITE_CLI_PORT = 8222
VITE_SERVER_PORT = 443
-VITE_BASE_API = /api
-VITE_FILE_API = /api
+VITE_BASE_API = /
+VITE_FILE_API = /
#下方修改为你的线上ip
-VITE_BASE_PATH = http://106.52.134.22
@@ -335,14 +335,15 @@ const addDevice = () => {
// sn不能重复
const isRepeatSn = (sn) => {
+ let number = 0
for (let i = 0; i < regionData.value.length; i++) {
for (let j = 0; j < regionData.value[i].devices.length; j++) {
if (regionData.value[i].devices[j].sn === sn) {
- return true
+ number = number + 1
}
- return false
+ return number === 2;
//编辑
@@ -16,7 +16,7 @@ export default defineConfig({
// port: 4000,
proxy: {
'/api': {
- target: 'http://106.52.134.22:8222',
+ target: 'http://127.0.0.1:8222',
// secure: false, // 请求是否为https
changeOrigin: true,
rewrite:(path)=>path.replace(/^\/api/,'') //api替换为'',