fix:添加userID

lu_quan_dev
han 8 months ago
parent 81c97c5086
commit e8fa5cbdfd
  1. 9
      subPageC/Ai/index.vue

@ -117,6 +117,7 @@
openid: undefined,
appid: undefined,
},
nowUserId:null
}
},
onUnload() {
@ -150,8 +151,8 @@
userInfo.refreshToken = newRefreshToken;
store.commit('setUserInfo', userInfo)
this.Token = newAccessToken
this.nowUserId = response.data.userId
this.getUserInfo(response.data.userId)
this.connectWs()
})
.catch(error => {
store.commit('setUserInfo', null)
@ -183,7 +184,8 @@
"identity": this.generateRandomString(8),
"userId": userId
};
console.log(this.querUserInfo)
console.log('querUserInfo',this.querUserInfo)
this.connectWs()
},
// websocket
connectWs() {
@ -302,7 +304,8 @@
//
sendMsg() {
const $this = this
this.getUserInfo()
console.log('$this.nowUserId',$this.nowUserId)
this.getUserInfo($this.nowUserId)
this.list.push({
content: this.content,
userType: 'friend',

Loading…
Cancel
Save