feat:完善缓存相关

This commit is contained in:
陈淳
2023-04-19 13:39:55 +08:00
parent cb75196455
commit 654c7d650a
10 changed files with 214 additions and 14 deletions

View File

@@ -13,7 +13,8 @@ export default {
baseUrl: '',
init(url) {
const connection = new signalR.HubConnectionBuilder()
.withUrl(url, { accessTokenFactory: () => getToken() })
.withUrl(url, {
headers: { Authorization: `Bearer ${getToken()}` }})
.withAutomaticReconnect()//自动重新连接
.configureLogging(signalR.LogLevel.Information)
.build();