客服:组件初步抽离

This commit is contained in:
puhui999
2024-06-07 11:29:01 +08:00
parent 561529b01e
commit 3355f5e853
5 changed files with 314 additions and 230 deletions
+2 -7
View File
@@ -304,12 +304,7 @@ export function useChatWebSocket(socketConfig) {
// 用户id,获取token
const getUserToken = async (id) => {
const res = await chat.unifiedToken();
if (res.error === 0) {
uni.setStorageSync('socketUserToken', res.data.token);
// SocketIo && SocketIo.connected && socketLogin(res.data.token)
}
return res;
return uni.getStorageSync('token');
};
// 用户登录
@@ -818,4 +813,4 @@ export function useChatWebSocket(socketConfig) {
showTime,
formatTime,
};
}
}