Fix(AI):[#3681]AI对话点击手机侧边返回按钮,会回到小程序首页
This commit is contained in:
+22
-5
@@ -15,6 +15,14 @@
|
|||||||
title="云灵AI智能助手"
|
title="云灵AI智能助手"
|
||||||
@click-left="clickBackHandle"
|
@click-left="clickBackHandle"
|
||||||
/>
|
/>
|
||||||
|
<page-container
|
||||||
|
:show="true"
|
||||||
|
:overlay="false"
|
||||||
|
:z-index="1"
|
||||||
|
@beforeleave="pageContainerBeforeleave"
|
||||||
|
>
|
||||||
|
遮罩层,用于监听实体键返回
|
||||||
|
</page-container>
|
||||||
<view
|
<view
|
||||||
id="fixTbabarBody"
|
id="fixTbabarBody"
|
||||||
:style="{
|
:style="{
|
||||||
@@ -256,11 +264,6 @@ export default {
|
|||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.closeWsFn()
|
this.closeWsFn()
|
||||||
if (this.chatNumber) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/aiChat/views/index?click=1&back=1'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createdCallbak() {
|
createdCallbak() {
|
||||||
@@ -305,6 +308,20 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.createNewHandle()
|
this.createNewHandle()
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
pageContainerBeforeleave() {
|
||||||
|
console.log(22222)
|
||||||
|
if (!this.chatNumber) {
|
||||||
|
if (getCurrentPages().length > 1) {
|
||||||
|
uni.navigateBack()
|
||||||
|
} else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/home/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.createNewHandle()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user