fix : 测试字典接口没加token

This commit is contained in:
2024-10-08 23:11:58 +08:00
parent 0aff2a5fab
commit 88b1052f14
3 changed files with 17 additions and 17 deletions

View File

@@ -64,9 +64,9 @@ const handleShowDeadLine=(recordObj,data)=>{
}
const initWebSocket = () => {
try {
// const wsUrl=setWsUrl(`/ws/text/${token}`)
const wsUrl=setWsUrl(`/ws/text/${token}`)
// const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}`
const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
// const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
socket = new WebSocket(wsUrl)
// 2. ws.send()给服务器发送信息
//连接发生错误的回调方法

View File

@@ -1,25 +1,25 @@
import Cookies from "js-cookie";
export const getToken = () => {
return localStorage.getItem('Authorization')
return Cookies.get('Authorization')
}
export const setToken = (token) => {
return localStorage.setItem('Authorization', token)
return Cookies.set('Authorization', token)
}
export const removeToken = () => {
console.info("🚀 ~method:removeToken -----",)
debugger
// return localStorage.removeItem('Authorization')
return Cookies.remove('Authorization')
}
export const getAuthInfo = () => {
return localStorage.getItem('authinfo')
return Cookies.get('authinfo')
}
export const setAuthInfo = (info) => {
return localStorage.setItem('authinfo', info)
return Cookies.set('authinfo', info)
}
export const removeAuthInfo = () => {
return localStorage.removeItem('authinfo')
return Cookies.remove('authinfo')
}

View File

@@ -74,13 +74,13 @@ const tableConfig = reactive({
label: '电话拨打状态',
align: 'center',
showOverflowTooltip: false,
// currentRender: ({ row, index }) => {
// if (row.callState !== null) {
// return (<PointTag dictType={'call_status'} value={row.callState} />)
// } else {
// return '--'
// }
// }
currentRender: ({ row, index }) => {
if (row.callState !== null) {
return (<PointTag dictType={'call_status'} value={row.callState} />)
} else {
return '--'
}
}
},
{
prop: 'workOrderTime',