Refactor(云灵AI):ws连接使用uid拼接,兼容APP登录没有获取到unionId
This commit is contained in:
@@ -372,7 +372,7 @@ export const chatMixins = {
|
|||||||
const _this = this
|
const _this = this
|
||||||
console.log('------------------创建连接')
|
console.log('------------------创建连接')
|
||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
|
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json'
|
'content-type': 'application/json'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ export const chatMixinsV2 = {
|
|||||||
const _this = this
|
const _this = this
|
||||||
console.log('------------------创建连接')
|
console.log('------------------创建连接')
|
||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
|
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json'
|
'content-type': 'application/json'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user