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
e5024e9b
Commit
e5024e9b
authored
Oct 23, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居民端小程序 1.小程序对接
parent
f7a1bb7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
ResidentWX.vue
src/residentWX/ResidentWX.vue
+23
-11
No files found.
src/residentWX/ResidentWX.vue
View file @
e5024e9b
<
template
>
<
template
>
<van-config-provider
:theme-vars=
"themeVars"
>
<van-config-provider
:theme-vars=
'themeVars'
>
<div
class=
"h-full resident-home"
>
<div
class=
'h-full resident-home'
>
<router-view
v-slot=
"
{ Component }"
>
<router-view
v-slot=
'
{ Component }'
>
<Transition
name=
"route"
mode=
"out-in"
>
<Transition
name=
'route'
mode=
'out-in'
>
<component
:is=
"Component"
v-if=
"visible"
/>
<component
:is=
'Component'
v-if=
'visible'
/>
</Transition>
</Transition>
</router-view>
</router-view>
</div>
</div>
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
<
script
>
<
script
>
import
{
getDict
,
getResidentByInfo
}
from
'@/api/base.js'
import
{
getDict
,
getResidentByInfo
}
from
'@/api/base.js'
import
{
useStore
}
from
'./store/index.js'
import
{
useStore
}
from
'./store/index.js'
import
{
getQueryVariable
}
from
'@/utils/common'
import
{
showNotify
}
from
'vant'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -40,7 +42,7 @@ export default {
...
@@ -40,7 +42,7 @@ export default {
fieldLabelColor
:
'#262626'
,
fieldLabelColor
:
'#262626'
,
cellBorderColor
:
'#d9d9d9'
,
cellBorderColor
:
'#d9d9d9'
,
// 进度条
// 进度条
sliderActiveBackground
:
'#54CCBD'
,
sliderActiveBackground
:
'#54CCBD'
}
}
}
}
},
},
...
@@ -56,15 +58,25 @@ export default {
...
@@ -56,15 +58,25 @@ export default {
console
.
log
(
this
.
visible
)
console
.
log
(
this
.
visible
)
const
res
=
await
getDict
()
const
res
=
await
getDict
()
this
.
store
.
$patch
({
dict
:
res
.
data
||
{}
})
this
.
store
.
$patch
({
dict
:
res
.
data
||
{}
})
const
user
=
await
getResidentByInfo
({
idCard
:
'21100319900901301X'
})
let
idCard
=
getQueryVariable
(
'idCard'
)
this
.
store
.
$patch
({
userInfo
:
user
.
data
||
{}
})
if
(
idCard
)
{
const
user
=
await
getResidentByInfo
({
idCard
:
idCard
})
if
(
!
user
.
data
)
{
showNotify
({
type
:
'warning'
,
message
:
'未获取慢病信息'
,
duration
:
0
})
return
}
this
.
store
.
$patch
({
userInfo
:
user
.
data
||
{}
})
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
user
.
data
))
}
else
{
let
user
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'userInfo'
))
this
.
store
.
$patch
({
userInfo
:
user
.
data
||
{}
})
}
this
.
visible
=
true
this
.
visible
=
true
}
},
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
'less'
scoped
>
</
style
>
</
style
>
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