修改
This commit is contained in:
parent
5d223fdac6
commit
baec355ed8
@ -12,15 +12,16 @@
|
|||||||
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
|
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
|
||||||
<view class="snedItem" v-for="(item, index) in newsList" :key="index">
|
<view class="snedItem" v-for="(item, index) in newsList" :key="index">
|
||||||
<view class="ifSend" v-if="item.senderName == userName">
|
<view class="ifSend" v-if="item.senderName == userName">
|
||||||
<view class="sendBox" v-if="item.messageType==1">{{item.content}}</view>
|
<view class="sendBox" v-if="Number(item.messageType)==1">{{item.content}}</view>
|
||||||
<image v-if="item.messageType==2" :src="baseurl+item.content" class="snedItemimage" />
|
<image v-if="Number(item.messageType)==2" :src="baseurl+item.content" class="snedItemimage" />
|
||||||
<image class="head" src="@/static/docHead.png"></image>
|
<image class="head" src="@/static/docHead.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="doctorSend" v-else>
|
<view class="doctorSend" v-else>
|
||||||
<image class="head" src="@/static/headsculpture.png"></image>
|
<image class="head" src="@/static/headsculpture.png"></image>
|
||||||
<view class="">
|
<view class="">
|
||||||
<text>{{item.senderName}}</text>
|
<view class="sendBox" v-if="Number(item.messageType)==1">{{item.content}}</view>
|
||||||
<view class="sendBox" v-if="item.content">{{item.content}}</view>
|
<image v-if="Number(item.messageType)==2" :src="baseurl+item.content"
|
||||||
|
class="snedItemimage" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<video v-if="item.video" :src="item.video"></video>
|
<video v-if="item.video" :src="item.video"></video>
|
||||||
@ -85,7 +86,6 @@
|
|||||||
sendMessage,
|
sendMessage,
|
||||||
getChatRecord,
|
getChatRecord,
|
||||||
markRead,
|
markRead,
|
||||||
|
|
||||||
} from '@/api/seekadvicefrom/seekadvicefrom.js';
|
} from '@/api/seekadvicefrom/seekadvicefrom.js';
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
@ -158,7 +158,6 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(options, '888')
|
|
||||||
this.baseurl = baseurl;
|
this.baseurl = baseurl;
|
||||||
// uni.closeSocket()
|
// uni.closeSocket()
|
||||||
this.currentItem = JSON.parse(options.item)
|
this.currentItem = JSON.parse(options.item)
|
||||||
@ -214,12 +213,12 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
Read() {
|
Read() {
|
||||||
console.log(this.currentItem.doctorId,'888888888')
|
console.log(this.currentItem.doctorId, '888888888')
|
||||||
let markReadData = {
|
let markReadData = {
|
||||||
consultationId: this.currentItem.id,
|
consultationId: this.currentItem.id,
|
||||||
recipientId: Number(this.currentItem.doctorId),
|
recipientId: Number(this.currentItem.doctorId),
|
||||||
}
|
}
|
||||||
console.log(markReadData,'6')
|
console.log(markReadData, '6')
|
||||||
markRead(markReadData)
|
markRead(markReadData)
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -492,7 +491,7 @@
|
|||||||
that.newsList.push({
|
that.newsList.push({
|
||||||
senderName: that.currentItem.patientName,
|
senderName: that.currentItem.patientName,
|
||||||
content: JSON.parse(res.data).message,
|
content: JSON.parse(res.data).message,
|
||||||
messageType: JSON.parse(res.data).message
|
messageType: Number(JSON.parse(res.data).messageType)
|
||||||
})
|
})
|
||||||
that.Read()
|
that.Read()
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user