Fix(AI):[#3647]点击输入框,对话记录同步上移

This commit is contained in:
lifizer
2025-04-22 14:18:05 +08:00
parent 39a54efc27
commit 0d0b816fad
6 changed files with 9 additions and 48 deletions
-18
View File
@@ -134,9 +134,6 @@
:class="{
'focus': onFocus
}"
:style="{
'transform': 'translateY(-' + (keyboardHeight + 'px') + ')'
}"
class="page-to-bottom"
>
<image
@@ -184,26 +181,11 @@ export default {
}
},
onLoad(options) {
if (!options.click) {
uni.switchTab({ url: '/pages/home/index' })
return
}
this.chatNumber = options.chatNumber
this.pageTitle = options.title
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
+1 -15
View File
@@ -193,9 +193,6 @@
:class="{
'focus': onFocus
}"
:style="{
'transform': 'translateY(-' + (keyboardHeight + 'px') + ')'
}"
class="page-to-bottom"
>
<view
@@ -257,21 +254,10 @@ export default {
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({
uni.navigateTo({
url: '/aiChat/views/index?click=1&back=1'
})
}