From 88b1052f1424dec05ebc249d1a31a1cebf874fa5 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:11:58 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97=E5=85=B8?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/liveCall/index.vue | 4 ++--
src/utils/auth.js | 16 ++++++++--------
src/views/home/index.vue | 14 +++++++-------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/components/liveCall/index.vue b/src/components/liveCall/index.vue
index c1c64db..9bc7e06 100644
--- a/src/components/liveCall/index.vue
+++ b/src/components/liveCall/index.vue
@@ -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()给服务器发送信息
//连接发生错误的回调方法
diff --git a/src/utils/auth.js b/src/utils/auth.js
index ccfc84c..a5e2d41 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -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')
}
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 01b8371..730561b 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -74,13 +74,13 @@ const tableConfig = reactive({
label: '电话拨打状态',
align: 'center',
showOverflowTooltip: false,
- // currentRender: ({ row, index }) => {
- // if (row.callState !== null) {
- // return ()
- // } else {
- // return '--'
- // }
- // }
+ currentRender: ({ row, index }) => {
+ if (row.callState !== null) {
+ return ()
+ } else {
+ return '--'
+ }
+ }
},
{
prop: 'workOrderTime',