|
|
@@ -531,6 +531,22 @@ export default {
|
|
|
if (!this.ifOnLine()) {
|
|
|
return;
|
|
|
}
|
|
|
+ const rawMessageValue = this.messageValue;
|
|
|
+ if (typeof rawMessageValue !== 'string' && typeof rawMessageValue !== 'number') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '发送内容异常',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const messageValue = String(rawMessageValue).trim();
|
|
|
+ if (!messageValue) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '发送内容不能为空',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
try {
|
|
|
this.setData(
|
|
|
{
|
|
|
@@ -540,7 +556,7 @@ export default {
|
|
|
() => {
|
|
|
const patientData = Cache.get('patientData');
|
|
|
const userData = Cache.get('userData');
|
|
|
- let { messageValueFun: messageValue, admType, help } = this;
|
|
|
+ let { admType, help } = this;
|
|
|
let admID = patientData.admID;
|
|
|
let toUser = 'patient' + patientData.patID;
|
|
|
if (help) {
|