fix(HomePage): 添加外部用户ID校验防止空值错误
当externalUserId为空时,添加校验逻辑并提示用户重新进入页面,避免后续发送消息时出现错误
This commit is contained in:
@@ -198,6 +198,10 @@ const sendFormLink = async () => {
|
|||||||
alert('企业微信功能尚未准备好,请稍等片刻...')
|
alert('企业微信功能尚未准备好,请稍等片刻...')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!externalUserId.value) {
|
||||||
|
alert('无法获取用户信息,请重新进入页面')
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await ww.sendChatMessage({
|
await ww.sendChatMessage({
|
||||||
msgtype: 'news',
|
msgtype: 'news',
|
||||||
|
|||||||
Reference in New Issue
Block a user