Fix(AI):[#3681]AI对话点击手机侧边返回按钮,会回到小程序首页
This commit is contained in:
@@ -68,17 +68,6 @@ export const chatMixins = {
|
|||||||
}
|
}
|
||||||
}.bind(this)).exec()
|
}.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() {
|
onUnload() {
|
||||||
this.closeWsFn()
|
this.closeWsFn()
|
||||||
// console.log('在页面卸载时取消监听')
|
// console.log('在页面卸载时取消监听')
|
||||||
|
|||||||
@@ -193,6 +193,17 @@ export default {
|
|||||||
this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle
|
this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle
|
||||||
this.init()
|
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: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -256,6 +256,25 @@ export default {
|
|||||||
settingInfo: {},
|
settingInfo: {},
|
||||||
topicList: []
|
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: {
|
methods: {
|
||||||
createdCallbak() {
|
createdCallbak() {
|
||||||
|
|||||||
Reference in New Issue
Block a user