Fix(AI):[#3681]AI对话点击手机侧边返回按钮,会回到小程序首页
This commit is contained in:
@@ -68,17 +68,6 @@ export const chatMixins = {
|
||||
}
|
||||
}.bind(this)).exec()
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.click) {
|
||||
uni.switchTab({ url: '/pages/home/index' })
|
||||
return
|
||||
}
|
||||
// 监听键盘高度变化
|
||||
wx.onKeyboardHeightChange((res) => {
|
||||
console.log('监听键盘高度变化%s', res.height)
|
||||
this.keyboardHeight = res.height
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
// console.log('在页面卸载时取消监听')
|
||||
|
||||
@@ -193,6 +193,17 @@ export default {
|
||||
this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle
|
||||
this.init()
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.click) {
|
||||
uni.switchTab({ url: '/pages/home/index' })
|
||||
return
|
||||
}
|
||||
// 监听键盘高度变化
|
||||
wx.onKeyboardHeightChange((res) => {
|
||||
console.log('监听键盘高度变化%s', res.height)
|
||||
this.keyboardHeight = res.height
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loading = true
|
||||
|
||||
@@ -256,6 +256,25 @@ export default {
|
||||
settingInfo: {},
|
||||
topicList: []
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (!options.click) {
|
||||
uni.switchTab({ url: '/pages/home/index' })
|
||||
return
|
||||
}
|
||||
// 监听键盘高度变化
|
||||
wx.onKeyboardHeightChange((res) => {
|
||||
console.log('监听键盘高度变化%s', res.height)
|
||||
this.keyboardHeight = res.height
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
if (this.chatNumber) {
|
||||
uni.redirectTo({
|
||||
url: '/aiChat/views/index?click=1&back=1'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createdCallbak() {
|
||||
|
||||
Reference in New Issue
Block a user