提交 884e6d2d 编写于 作者: DCloud_JSON's avatar DCloud_JSON

Update chat.vue

上级 89f39862
......@@ -411,18 +411,19 @@
setTimeout(() => {
this.$refs["chat-input"]?.focus()
}, 100)
}
const {is_temp,friend_uid} = this.conversation
if(is_temp && friend_uid){
// 为了避免在web端刷新页面之后,本地单聊临时会话丢失,将地址栏中的会话id参数替换为好友的uid,以此来确保在刷新页面之后,本地能够再次创建临时会话。
const {route:path,options} = getCurrentPages().pop()
delete options.conversation_id
options.user_id = friend_uid
let paramSrt
for (const key in options) {
paramSrt = `${key}=${options[key]}`
}else{
const {is_temp,friend_uid} = this.conversation
if(is_temp && friend_uid){
// 为了避免在web端刷新页面之后,本地单聊临时会话丢失,将地址栏中的会话id参数替换为好友的uid,以此来确保在刷新页面之后,本地能够再次创建临时会话。
const {route:path,options} = getCurrentPages().pop()
delete options.conversation_id
options.user_id = friend_uid
let paramSrt
for (const key in options) {
paramSrt = `${key}=${options[key]}`
}
history.replaceState(null, '', `/#/${path}?${paramSrt}`)
}
history.replaceState(null, '', `/#/${path}?${paramSrt}`)
}
// #endif
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册