Commit 201dffed authored by gengchunlei's avatar gengchunlei

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents 5e182446 f1b2c653
...@@ -9,3 +9,8 @@ export function getServiceDoc(params) { ...@@ -9,3 +9,8 @@ export function getServiceDoc(params) {
export function getAccount(idCard) { export function getAccount(idCard) {
return fetchBase({ url: `/chronic-resident/v1/chronic-resident-im/refresh-token/${idCard}`, loading: true }) return fetchBase({ url: `/chronic-resident/v1/chronic-resident-im/refresh-token/${idCard}`, loading: true })
} }
// 获取聊天信息
export function getSessionInfo(accountId) {
return fetchBase({ url: `/chronic-resident/v1/chronic-resident-im/doctorInfo/${accountId}`, loading: true })
}
...@@ -240,6 +240,10 @@ const defaultForm = (info = {}) => { ...@@ -240,6 +240,10 @@ const defaultForm = (info = {}) => {
highTags: undefined, highTags: undefined,
latelyDiagnoseDate: undefined, latelyDiagnoseDate: undefined,
latelyScreenDate:undefined, latelyScreenDate:undefined,
// 当前人群-显示type=CP00181
groupsArrays: undefined,
// 当前人群-查询
groups: undefined,
} }
Reflect.ownKeys(form).forEach(key => { Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) { if (info[key] != undefined) {
......
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
if (this.step === 1) { if (this.step === 1) {
this.recordForm = {} this.recordForm = {}
this.checkInfo = {} this.checkInfo = {}
this.recordForm.doctorId = this.doctorId
} }
}, },
onClose() { onClose() {
......
...@@ -580,8 +580,11 @@ export default { ...@@ -580,8 +580,11 @@ export default {
font-size: 12px; font-size: 12px;
position: absolute; position: absolute;
bottom: -12px; bottom: -12px;
left: -100px; // left: -100px;
right: 0; right: 0;
width: 100vw;
overflow: hidden;
white-space: nowrap;
} }
table { table {
text-align: left; text-align: left;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
import { useStore } from '@/residentWX/store' import { useStore } from '@/residentWX/store'
import { getServiceDoc } from '@/api/residentWX/nim.js' import { getServiceDoc } from '@/api/residentWX/nim.js'
import { showFailToast } from 'vant' import { showFailToast } from 'vant'
import { getSessionInfo } from '@/api/residentWX/nim.js'
export default { export default {
inject:['showNav', 'isResidentInfo'], inject:['showNav', 'isResidentInfo'],
...@@ -85,6 +86,21 @@ export default { ...@@ -85,6 +86,21 @@ export default {
this.doctorList = doctorList this.doctorList = doctorList
this.orgList = ['咨询过的专家'].concat(orgList) this.orgList = ['咨询过的专家'].concat(orgList)
this.activeOrg = this.orgList[0] this.activeOrg = this.orgList[0]
// 获取咨询过的医生列表
this.loadRecord()
})
},
loadRecord() {
getSessionInfo(this.userInfo.idCard).then(res =>{
console.log('getSessionInfo', res)
const result = res.data || []
const array = []
result.forEach(e => {
const item = this.doctorList.find(i => e.idCard === i.identityCard)
item && array.push(item)
})
this.recordList = array
}) })
}, },
onOrgChange(item) { onOrgChange(item) {
......
...@@ -92,7 +92,6 @@ export default { ...@@ -92,7 +92,6 @@ export default {
accountId: '', accountId: '',
token: '', token: '',
msgs: [], msgs: [],
nim: null,
// 输入的信息 // 输入的信息
inputValue: '', inputValue: '',
// 是否已连接 // 是否已连接
...@@ -113,6 +112,11 @@ export default { ...@@ -113,6 +112,11 @@ export default {
] ]
} }
}, },
setup() {
return {
nim: null
}
},
computed: { computed: {
userInfo() { userInfo() {
return this.store.userInfo return this.store.userInfo
...@@ -176,13 +180,17 @@ export default { ...@@ -176,13 +180,17 @@ export default {
}, },
onmsg: (msg) => { onmsg: (msg) => {
console.log('收到新消息===========>', msg); console.log('收到新消息===========>', msg);
this.msgs.push(msg) if (msg.from === this.targetId) {
this.toBottom() this.msgs.push(msg)
this.toBottom()
}
}, },
onofflinemsgs: (obj) => { onofflinemsgs: (obj) => {
console.log('收到离线消息===========>', obj); console.log('收到离线消息===========>', obj);
this.msgs.push(...obj.msgs) if (obj.to === this.targetId) {
this.toBottom() this.msgs.push(...obj.msgs)
this.toBottom()
}
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment