diff --git a/.env.development b/.env.development index 8a2f4db..23c6711 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ VITE_NOW_TYPE = 'dist' -VITE_PUSH_URL = 'ws://192.168.1.22:8787' -VITE_BASE_URL = 'http://192.168.1.22:8546' +# VITE_PUSH_URL = 'ws://192.168.1.22:8787' +# VITE_BASE_URL = 'http://192.168.1.22:8546' -# VITE_PUSH_URL ='wss://erp.lihaink.cn/pull' -# VITE_BASE_URL = 'https://erp.lihaink.cn' \ No newline at end of file +VITE_PUSH_URL ='wss://erp.lihaink.cn/pull' +VITE_BASE_URL = 'https://erp.lihaink.cn' \ No newline at end of file diff --git a/src/layout/myAside.vue b/src/layout/myAside.vue index 36eeca5..d811e80 100644 --- a/src/layout/myAside.vue +++ b/src/layout/myAside.vue @@ -39,11 +39,11 @@ const newOrder = (e) => { }); }; -// setTimeout(() => { -// newOrder({ -// msg: "您有一笔新的订单", -// }); -// }, 3000); +setTimeout(() => { + newOrder({ + msg: "您有一笔新的订单", + }); +}, 2000); const navTo = (name) => { router.push({ name }); diff --git a/src/utils/axios.js b/src/utils/axios.js index 2b1541c..bf9e8d8 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -32,7 +32,7 @@ request.interceptors.request.use( request.interceptors.response.use( response => { // 对响应数据做些什么,例如解析数据、统一处理错误等 - if (response.data.code === 401 || response.data.code === 40000 || (response.data.code === -1 && response.data.msg === '登录超时,请重新登录')) { + if (response.data.code === 401 || response.data.code === 40000 || (response.data.code === -1 && response.data.msg == '登录超时,请重新登录')) { ElMessage({ message: response.data.msg, type: 'error', diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index acf8c1a..81882b9 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -124,6 +124,7 @@ onMounted(() => { }); onUnmounted(()=>{ mitt.off("update-c-order-detail"); + mitt.off("new_order"); })