feat: 咨询消息轮询优化 — Web 自动刷新 + 患者端聊天详情页
Web 端: - ConsultationDetail 添加 10s 自动轮询新消息(after_id 增量拉取) - consultations API 补充 after_id 参数 小程序患者端: - 新增 consultation service 消息 API(listMessages/sendMessage/markSessionRead) - 新增聊天详情页(8s 轮询 + 发送消息 + 自动标记已读) - 咨询列表页点击跳转详情页(替换"即将上线"占位)
This commit is contained in:
@@ -70,8 +70,8 @@ export default function Consultation() {
|
||||
});
|
||||
});
|
||||
|
||||
const handleTapSession = (_session: ConsultationSession) => {
|
||||
Taro.showToast({ title: '即将上线', icon: 'none' });
|
||||
const handleTapSession = (session: ConsultationSession) => {
|
||||
Taro.navigateTo({ url: `/pages/consultation/detail/index?id=${session.id}` });
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -93,7 +93,7 @@ export default function Consultation() {
|
||||
<View className='consultation-empty'>
|
||||
<Text className='consultation-empty-icon'>💬</Text>
|
||||
<Text className='consultation-empty-text'>暂无咨询记录</Text>
|
||||
<Text className='consultation-empty-hint'>在线咨询功能即将上线,敬请期待</Text>
|
||||
<Text className='consultation-empty-hint'>发起咨询后即可在这里与医生交流</Text>
|
||||
</View>
|
||||
) : (
|
||||
<View className='consultation-list'>
|
||||
|
||||
Reference in New Issue
Block a user