<template>
<view class="container">
<view class="bg-container">
<web-view :webview-styles="webviewStyles" :src="href"></web-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
href: 'http://192.168.1.55:3000/ui/chat/a87a2f1d702c15a0',
webviewStyles: {
progress: {
color: '#FF3333'
}
}
};
},
methods: {
}
}
</script>
<style lang="less">
.container {
font-size: 14px;
background-color: ghostwhite;
}
.bg-container {
height: 200px;
display: flex;
justify-content: center;
align-items: flex-end;
background-image: url('@/static/icon_index_top.png');
background-size: cover;
background-repeat: no-repeat;
}
</style>
在网页端打开是可以正常回答的,而将其使用web-view嵌套在小程序内进行提问,则问答不会即时显示,需要重新进入对话框后,才能看到刚才提问的回答,有什么解决方案可以解决嘛?
小程序接入 AI 可以看这篇
https://docs.cloudbase.net/ai/miniprogram-using
已解决,原因是: 模拟器调试不显示,而使用真机调试正常。
你好,我想问一下你这个对话页面是自己开发的吗还是找的开源页面
添加外部域名了没?