Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songrui
frontend-h5
Commits
9640c31e
Commit
9640c31e
authored
5 months ago
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询过的专家
parent
f88228a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
nim.js
src/api/residentWX/nim.js
+5
-0
Index.vue
src/residentWX/nim/Index.vue
+16
-0
Session.vue
src/residentWX/nim/Session.vue
+5
-1
vue.config.js
vue.config.js
+4
-4
No files found.
src/api/residentWX/nim.js
View file @
9640c31e
...
...
@@ -9,3 +9,8 @@ export function getServiceDoc(params) {
export
function
getAccount
(
idCard
)
{
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
})
}
This diff is collapsed.
Click to expand it.
src/residentWX/nim/Index.vue
View file @
9640c31e
...
...
@@ -38,6 +38,7 @@
import
{
useStore
}
from
'@/residentWX/store'
import
{
getServiceDoc
}
from
'@/api/residentWX/nim.js'
import
{
showFailToast
}
from
'vant'
import
{
getSessionInfo
}
from
'@/api/residentWX/nim.js'
export
default
{
inject
:[
'showNav'
,
'isResidentInfo'
],
...
...
@@ -85,6 +86,21 @@ export default {
this
.
doctorList
=
doctorList
this
.
orgList
=
[
'咨询过的专家'
].
concat
(
orgList
)
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
)
{
...
...
This diff is collapsed.
Click to expand it.
src/residentWX/nim/Session.vue
View file @
9640c31e
...
...
@@ -92,7 +92,6 @@ export default {
accountId
:
''
,
token
:
''
,
msgs
:
[],
nim
:
null
,
// 输入的信息
inputValue
:
''
,
// 是否已连接
...
...
@@ -113,6 +112,11 @@ export default {
]
}
},
setup
()
{
return
{
nim
:
null
}
},
computed
:
{
userInfo
()
{
return
this
.
store
.
userInfo
...
...
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
9640c31e
...
...
@@ -39,12 +39,12 @@ module.exports = defineConfig({
}
},
'/chronic-resident'
:
{
// target: 'http://192.168.1.12
5:8903',
target
:
'https://beta-tumour.zmnyjk.com'
,
target
:
'http://192.168.1.10
5:8903'
,
//
target: 'https://beta-tumour.zmnyjk.com',
changOrigin
:
true
,
pathRewrite
:
{
//
'^/chronic-resident': '/',
'^/chronic-resident'
:
'/chronic-resident'
'^/chronic-resident'
:
'/'
,
//
'^/chronic-resident': '/chronic-resident'
}
}
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment