This commit is contained in:
parent
a75534084b
commit
2473707200
|
@ -1,7 +1,10 @@
|
|||
VITE_NOW_TYPE = 'dist'
|
||||
|
||||
VITE_PUSH_URL = 'ws://192.168.1.22:8787'
|
||||
VITE_BASE_URL = 'http://192.168.1.22:8545'
|
||||
# VITE_PUSH_URL = 'ws://192.168.1.22:8787'
|
||||
# VITE_BASE_URL = 'http://192.168.1.22:8545'
|
||||
|
||||
# VITE_PUSH_URL ='wss://erp.lihaink.cn/pull'
|
||||
# VITE_BASE_URL = 'https://test-multi-store.lihaink.cn'
|
||||
# VITE_BASE_URL = 'https://test-multi-store.lihaink.cn'
|
||||
|
||||
VITE_PUSH_URL ='wss://multi-store.lihaink.cn/pull'
|
||||
VITE_BASE_URL = 'https://multi-store.lihaink.cn'
|
|
@ -27,7 +27,7 @@ user_channel.on('message', function (data) {
|
|||
mitt.emit('new_order', data?.content);
|
||||
}
|
||||
if(data?.content?.type=='platform_print'){
|
||||
mitt.emit('platform_print', data?.content?.data);
|
||||
mitt.emit('letPrintReceipt', data?.content?.data);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
|
|
|
@ -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 === -1 && (response.data.msg == '登录过期' || response.data.msg == '登录超时,请重新登录')) {
|
||||
ElMessage({
|
||||
message: response.data.msg,
|
||||
type: 'error',
|
||||
|
@ -42,7 +42,8 @@ request.interceptors.response.use(
|
|||
userStore.setUserInfo({});
|
||||
userStore.setToken('');
|
||||
router.push('/login');
|
||||
}, 700)
|
||||
}, 500)
|
||||
throw new Error(response.data.msg);
|
||||
}
|
||||
if (response.data.code === 400) {
|
||||
ElMessage({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref, onMounted, nextTick } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { captchaApi, login, info } from "@/api/user.js";
|
||||
import { useUserStore } from "@/store/user.js";
|
||||
|
@ -41,6 +41,9 @@ const onLogin = () => {
|
|||
};
|
||||
|
||||
onMounted(() => {
|
||||
// nextTick(() => {
|
||||
// accRef.value.focus();
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -54,7 +57,6 @@ onMounted(() => {
|
|||
ref="accRef"
|
||||
v-model="formLogin.account"
|
||||
placeholder="请输入账号"
|
||||
:autofocus="true"
|
||||
@keydown.enter="pwdRef.focus()"
|
||||
>
|
||||
<template #prefix>
|
||||
|
|
Loading…
Reference in New Issue