Fix(AI):[#3702]历史对话下方缺少“开启新对话”按钮,增加一个开启新对话按钮
This commit is contained in:
@@ -136,6 +136,17 @@
|
|||||||
}"
|
}"
|
||||||
class="page-to-bottom"
|
class="page-to-bottom"
|
||||||
>
|
>
|
||||||
|
<view
|
||||||
|
class="new-chat"
|
||||||
|
@click="createNewHandle"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/aiChat/icon-05.png'"
|
||||||
|
class="btn-icon"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
开启新对话
|
||||||
|
</view>
|
||||||
<image
|
<image
|
||||||
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
|
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
|
||||||
:src="webUrl + '/aiChat/down.png'"
|
:src="webUrl + '/aiChat/down.png'"
|
||||||
@@ -236,6 +247,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
return prompt
|
return prompt
|
||||||
|
},
|
||||||
|
// 创建新会话
|
||||||
|
createNewHandle() {
|
||||||
|
uni.setStorageSync('addNewChat', '1')
|
||||||
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
:z-index="1"
|
:z-index="1"
|
||||||
@beforeleave="pageContainerBeforeleave"
|
@beforeleave="pageContainerBeforeleave"
|
||||||
>
|
>
|
||||||
|
<view style="opacity: 0;"></view>
|
||||||
遮罩层,用于监听实体键返回
|
遮罩层,用于监听实体键返回
|
||||||
</page-container>
|
</page-container>
|
||||||
<view
|
<view
|
||||||
@@ -262,6 +263,15 @@ export default {
|
|||||||
topicList: []
|
topicList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
const addNewChat = uni.getStorageSync('addNewChat') === '1'
|
||||||
|
// 从历史界面点击新增对话
|
||||||
|
if (addNewChat && this.chatNumber) {
|
||||||
|
console.log(addNewChat)
|
||||||
|
uni.removeStorageSync('addNewChat')
|
||||||
|
this.createNewHandle()
|
||||||
|
}
|
||||||
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.closeWsFn()
|
this.closeWsFn()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user