This commit is contained in:
weipengfei 2024-05-30 18:06:08 +08:00
parent ac9ad60128
commit 8ead6c2002
4 changed files with 11 additions and 10 deletions

View File

@ -1,7 +1,7 @@
VITE_NOW_TYPE = 'dist' VITE_NOW_TYPE = 'dist'
VITE_PUSH_URL = 'ws://192.168.1.22:8787' # VITE_PUSH_URL = 'ws://192.168.1.22:8787'
VITE_BASE_URL = 'http://192.168.1.22:8546' # VITE_BASE_URL = 'http://192.168.1.22:8546'
# VITE_PUSH_URL ='wss://erp.lihaink.cn/pull' VITE_PUSH_URL ='wss://erp.lihaink.cn/pull'
# VITE_BASE_URL = 'https://erp.lihaink.cn' VITE_BASE_URL = 'https://erp.lihaink.cn'

View File

@ -39,11 +39,11 @@ const newOrder = (e) => {
}); });
}; };
// setTimeout(() => { setTimeout(() => {
// newOrder({ newOrder({
// msg: "", msg: "您有一笔新的订单",
// }); });
// }, 3000); }, 2000);
const navTo = (name) => { const navTo = (name) => {
router.push({ name }); router.push({ name });

View File

@ -32,7 +32,7 @@ request.interceptors.request.use(
request.interceptors.response.use( request.interceptors.response.use(
response => { 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({ ElMessage({
message: response.data.msg, message: response.data.msg,
type: 'error', type: 'error',

View File

@ -124,6 +124,7 @@ onMounted(() => {
}); });
onUnmounted(()=>{ onUnmounted(()=>{
mitt.off("update-c-order-detail"); mitt.off("update-c-order-detail");
mitt.off("new_order");
}) })
</script> </script>