fix(chat): 修复聊天页 const 变量重新赋值导致真机调试编译失败
userID 不含 patient 前缀时要补前缀,需要重新赋值,改为 let。 模拟器只在执行到这行时才报错;真机调试打包时 SWC 直接拒绝整个小程序。
This commit is contained in:
@@ -610,7 +610,7 @@ const { proxy } = getCurrentInstance()
|
||||
patientLeaveNotified = false;
|
||||
console.log('进入onMounted:', options);
|
||||
const app = getApp();
|
||||
const userID = options.userID|| app.globalData.userID;
|
||||
let userID = options.userID|| app.globalData.userID;
|
||||
if(!userID.includes('patient')){
|
||||
userID='patient_'+userID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user