xg
This commit is contained in:
parent
2b0c6f780c
commit
79feb3d159
12
api/pagesC/H5Healthrecord/index.js
Normal file
12
api/pagesC/H5Healthrecord/index.js
Normal 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'),
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -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
|
||||
})
|
||||
|
||||
33
pagesC/H5Healthrecord/H5Healthrecord.vue
Normal file
33
pagesC/H5Healthrecord/H5Healthrecord.vue
Normal 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>
|
||||
@ -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(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user