This commit is contained in:
2024-03-30 21:06:43 +08:00
parent 2b0c6f780c
commit 79feb3d159
4 changed files with 91 additions and 42 deletions

View File

@ -0,0 +1,12 @@
import request from "@/api/request.js"
//获取健康档案Key
export function getHealthKey(cardNo) {
return request({
url: `/applet/signinfo/getHealthKey/${cardNo}`,
method: 'get',
header: {
region: uni.getStorageSync('region'),
}
})
}

View File

@ -44,7 +44,7 @@
<view class="item flexitem">
<view class="left">
医生
{{list.dutyDoctorName?list.dutyDoctorName:''}}
{{list.userName?list.userName:''}}
</view>
<view class="right" @tap="goseekadvicefrom">
<image src="@/static/pagesB/zixun.png" mode=""></image>
@ -195,7 +195,7 @@
this.list.rescindReason = null
this.list.crowdsName = this.list.crowdsName.split(',')
this.list.packagesName = this.list.packagesName.split(',')
getHospitalPersonInfo(res.data.dutyDoctorNo, '1').then(resp => {
getHospitalPersonInfo(res.data.userNo, '1').then(resp => {
this.formdata.doctorName = resp.data.personName
this.formdata.doctorId = resp.data.id
})

View File

@ -0,0 +1,33 @@
<template>
<view>
<web-view :src="src"></web-view>
</view>
</template>
<script>
import {
getHealthKey
} from '@/api/pagesC/H5Healthrecord/index.js'
export default {
data() {
return {
src: '',
};
},
onLoad() {
this.info();
},
methods: {
info() {
getHealthKey(uni.getStorageSync('userinfo').cardNo).then(res => {
this.src = 'https://qmjk.jiankangdongying.cn/html/gzd/jkda/expLogin.html?key=' + res.data +
'&dyfs=14'
})
},
}
}
</script>
<style lang="scss">
</style>

View File

@ -173,9 +173,9 @@
// });
},
onLoad(options) {
if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
this.scoket();
}
// if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
// this.scoket();
// }
this.baseurl = baseurl;
// uni.closeSocket()
this.currentItem = JSON.parse(options.item)
@ -195,39 +195,39 @@
methods: {
messagescoket() {
const that = this
// this.SOCKETURL = socketurl + this.currentItem.patientId
// this.socketOpen = false
this.SOCKETURL = socketurl + this.currentItem.patientId
this.socketOpen = false
try {
// uni.connectSocket({
// url: that.SOCKETURL
// })
// uni.onSocketOpen(res => {
// console.log('webScoket', res);
// that.socketOpen = true
// that.reset()
// })
// uni.onSocketError(err => {
// console.log('webScoket', err);
// if (err && err.code != 1000) {
// setTimeout(() => {
// that.socketOpen = true
// uni.connectSocket({
// url: that.SOCKETURL
// })
// }, 1000)
// }
// })
// uni.onSocketClose(err => {
// console.log('webScoket', err);
// if (err && err.code !== 1000) {
// setTimeout(() => {
// that.socketOpen = true
// uni.connectSocket({
// url: that.SOCKETURL
// })
// }, 1000)
// }
// })
uni.connectSocket({
url: that.SOCKETURL
})
uni.onSocketOpen(res => {
console.log('webScoket连接已打开', res);
that.socketOpen = true
that.reset()
})
uni.onSocketError(err => {
console.log('webScoket连接打开失败', err);
if (err && err.code != 1000) {
setTimeout(() => {
that.socketOpen = true
uni.connectSocket({
url: that.SOCKETURL
})
}, 3000)
}
})
uni.onSocketClose(err => {
console.log('webScoket连接关闭', err);
if (err && err.code !== 1000) {
setTimeout(() => {
that.socketOpen = true
uni.connectSocket({
url: that.SOCKETURL
})
}, 3000)
}
})
uni.onSocketMessage(res => {
console.log("webScoket监听收到的信息", res);
that.getPageHistory()
@ -254,7 +254,7 @@
})
}
})
}, 1000)
}, 3000)
},
lookimage(item) {
uni.previewImage({
@ -410,7 +410,8 @@
sendTime: new Date(),
content: '您好,正在努力联系您的家庭医生,请稍等...',
sourcePlatform: 'APPLET',
autoResponder: 'AUTORESPONDER'
autoResponder: 'AUTORESPONDER',
sendWho: '1'
}
sendMessage(obj).then(res => {
if (res.code == 200) {
@ -466,7 +467,8 @@
messageType: 2,
sendTime: new Date(),
content: fileurls.fileUrl,
sourcePlatform: 'APPLET'
sourcePlatform: 'APPLET',
sendWho: '1'
}
sendMessage(obj).then(respp => {
if (respp.code == 200) {
@ -527,7 +529,8 @@
messageType: 1,
sendTime: new Date(),
content: that.formData.content,
sourcePlatform: 'APPLET'
sourcePlatform: 'APPLET',
sendWho: '1'
}
that.formData.content = '' //
sendMessage(obj).then(res => {
@ -560,7 +563,8 @@
// messageType: 1,
// sendTime: new Date(),
// // messageType: (0 1 2 3 4 5 6 )
// content: message
// content: message,
// sendWho: '1'
// }
// sendMessage(obj).then(res => {
// setTimeout(() => {