This commit is contained in:
2023-12-11 17:14:54 +08:00
parent 213fdd197f
commit bf3216a92b

View File

@ -302,17 +302,18 @@
sendTime: new Date(),
content: this.formData.content
}
that.newsList.push({
senderName: that.currentItem.doctorName,
content: that.formData.content,
messageType: 1,
})
that.formData.content = '' //
sendMessage(obj).then(res => {
setTimeout(() => {
that.scrollTop = that.scrollTop + 1;
}, 100)
if (res.code != 200) {}
if (res.code == 200) {
that.newsList.push({
senderName: that.currentItem.doctorName,
content: that.formData.content,
messageType: 1,
})
setTimeout(() => {
that.scrollTop = that.scrollTop + 1;
}, 100)
}
})
// try {
// const that = this
@ -434,16 +435,6 @@
sizeType: ["compressed"],
success: (res) => {
that.showFunBtn = false;
setTimeout(() => {
let query = uni.createSelectorQuery().in(this);
//iddemo
query.select('.input-box').boundingClientRect(data => {
this.inputboxtop = data.height //
setTimeout(() => {
this.scrollTop = this.scrollTop + 1;
}, 200)
}).exec();
}, 300)
res.tempFilePaths.forEach(e => {
uni.uploadFile({
url: baseurl +
@ -463,12 +454,35 @@
sendTime: new Date(),
content: fileurls.fileUrl
}
that.newsList.push({
content: fileurls.fileUrl,
messageType: 2,
senderName: that.currentItem.doctorName,
sendMessage(obj).then(respp => {
if (respp.code == 200) {
that.newsList.push({
content: fileurls.fileUrl,
messageType: 2,
senderName: that.currentItem
.doctorName,
})
setTimeout(() => {
let query = uni
.createSelectorQuery().in(
that);
//iddemo
query.select('.input-box')
.boundingClientRect(
data => {
that.inputboxtop =
data
.height //
setTimeout(() => {
that.scrollTop =
that
.scrollTop +
1;
}, 200)
}).exec();
}, 300)
}
})
sendMessage(obj).then(respp => {})
}
})
})