Compare commits

..

No commits in common. "8efb54dd522f4596468d6343f97c6de05b8e11f0" and "a007ab5550dccc8050c9d849ef756c9b5ca38508" have entirely different histories.

7 changed files with 64 additions and 26 deletions

View File

@ -1,9 +1,11 @@
# 测试环境
# 开发环境本地只启动前端项目依赖开发环境后端、APP
NODE_ENV=production
VITE_DEV=true
# 请求路径 测试环境
# 请求路径
# VITE_BASE_URL='http://192.168.0.66:48080'
# VITE_BASE_URL='http://192.168.0.189:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
@ -34,4 +36,4 @@ VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
VITE_APP_CAPTCHA_ENABLE=false
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@ -1,12 +1,12 @@
# 本地开发环境
# 本地开发环境本地启动所有项目前端、后端、APP时使用不依赖外部环境
NODE_ENV=development
VITE_DEV=true
# 请求路径
# VITE_BASE_URL='http://10.10.7.132:48080'
VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.100.15:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -3,8 +3,8 @@ NODE_ENV=production
VITE_DEV=false
# 请求路径 生产环境
VITE_BASE_URL='http://10.10.5.5:48080'
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
@ -31,4 +31,4 @@ VITE_OUT_DIR=dist-prod
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'
VITE_GOVIEW_URL='http://127.0.0.1:3000'

34
.env.stage Normal file
View File

@ -0,0 +1,34 @@
# 预发布环境:只在打包时使用
NODE_ENV=production
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
# 接口地址
VITE_API_URL=/admin-api
# 是否删除debugger
VITE_DROP_DEBUGGER=true
# 是否删除console.log
VITE_DROP_CONSOLE=true
# 是否sourcemap
VITE_SOURCEMAP=false
# 打包路径
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
# 输出路径
VITE_OUT_DIR=dist-stage
# 商城H5会员端域名
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@ -12,6 +12,7 @@
"build:local": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build",
"build:dev": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode dev",
"build:test": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode test",
"build:stage": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode stage",
"build:prod": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode prod",
"serve:dev": "vite preview --mode dev",
"serve:prod": "vite preview --mode prod",

View File

@ -869,6 +869,8 @@ const carDbClick = (item, index) => {
carDialogRef.value.open(JSON.parse(JSON.stringify(item)))
}
defineExpose({ getMapData, computedRatio }) // open
onMounted(() => {
document.addEventListener('fullscreenchange', handleFullscreenChange)
document.addEventListener('webkitfullscreenchange', handleFullscreenChange)
@ -879,7 +881,7 @@ onMounted(() => {
robotListTimerRef.value = setInterval(() => {
if (document.hidden) return //
getRobotByFloorAndAreaList()
}, 10000)
}, 20000)
//
document.addEventListener('visibilitychange', () => {
@ -888,20 +890,28 @@ onMounted(() => {
}
})
})
onUnmounted(() => {
document.removeEventListener('fullscreenchange', handleFullscreenChange)
document.removeEventListener('webkitfullscreenchange', handleFullscreenChange)
document.removeEventListener('mozfullscreenchange', handleFullscreenChange)
document.removeEventListener('MSFullscreenChange', handleFullscreenChange)
clearTheTimer()
//
if (robotListTimerRef.value) {
clearInterval(robotListTimerRef.value)
robotListTimerRef.value = null
}
if (wsConnection.value) {
wsConnection.value.disconnect()
wsConnection.value = null
}
//
testCarList.value = []
robotByFloorAndAreaList.value = []
})
onBeforeUnmount(() => {
clearTheTimer()
})
const clearTheTimer = () => {
//
if (robotListTimerRef.value) {
clearInterval(robotListTimerRef.value)
@ -922,9 +932,7 @@ const clearTheTimer = () => {
//
testCarList.value = []
robotByFloorAndAreaList.value = []
}
defineExpose({ getMapData, computedRatio, clearTheTimer }) // open
})
</script>
<style lang="scss" scoped>

View File

@ -171,13 +171,6 @@ const { query } = useRoute() // 查询参数
onMounted(() => {
getList()
})
onUnmounted(() => {
indexPageRef.value && indexPageRef.value.clearTheTimer()
})
onBeforeUnmount(() => {
indexPageRef.value && indexPageRef.value.clearTheTimer()
})
</script>
<style lang="scss" scoped>