Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
folacin-front
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
ynby
folacin-front
Commits
91fb54e1
Commit
91fb54e1
authored
Feb 12, 2025
by
罗成兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置文件
parent
25e0aeb7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
21 deletions
+108
-21
index.js
folacin-app/src/router/index.js
+2
-1
index.vue
folacin-app/src/views/index/index.vue
+97
-0
provideUnit.vue
folacin-app/src/views/provideUnit/provideUnit.vue
+3
-19
questionAnswer.vue
folacin-app/src/views/questionAnswer/questionAnswer.vue
+6
-1
No files found.
folacin-app/src/router/index.js
View file @
91fb54e1
...
@@ -4,7 +4,8 @@ import VueRouter from 'vue-router'
...
@@ -4,7 +4,8 @@ import VueRouter from 'vue-router'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
routes
=
[
const
routes
=
[
{
path
:
'/'
,
name
:
'provideUnit'
,
component
:
()
=>
import
(
'../views/provideUnit/provideUnit.vue'
),
meta
:
{
keepAlive
:
true
,}},
{
path
:
'/'
,
name
:
'index'
,
component
:
()
=>
import
(
'../views/index/index.vue'
),
meta
:
{
keepAlive
:
true
,}},
{
path
:
'/provideUnit'
,
name
:
'provideUnit'
,
component
:
()
=>
import
(
'../views/provideUnit/provideUnit.vue'
),
meta
:
{
keepAlive
:
true
,}},
{
path
:
'/receiveApply'
,
name
:
'receiveApply'
,
component
:
()
=>
import
(
'../views/receiveApply/receiveApply.vue'
),
meta
:
{
keepAlive
:
true
,
isBack
:
false
,}},
{
path
:
'/receiveApply'
,
name
:
'receiveApply'
,
component
:
()
=>
import
(
'../views/receiveApply/receiveApply.vue'
),
meta
:
{
keepAlive
:
true
,
isBack
:
false
,}},
{
path
:
'/informedConsentForm'
,
name
:
'informedConsentForm'
,
component
:
()
=>
import
(
'../views/informedConsentForm/informedConsentForm.vue'
),},
{
path
:
'/informedConsentForm'
,
name
:
'informedConsentForm'
,
component
:
()
=>
import
(
'../views/informedConsentForm/informedConsentForm.vue'
),},
{
path
:
'/applyRecord'
,
name
:
'applyRecord'
,
component
:
()
=>
import
(
'../views/applyRecord/applyRecord.vue'
),
meta
:
{
keepAlive
:
true
,
isBack
:
false
}},
{
path
:
'/applyRecord'
,
name
:
'applyRecord'
,
component
:
()
=>
import
(
'../views/applyRecord/applyRecord.vue'
),
meta
:
{
keepAlive
:
true
,
isBack
:
false
}},
...
...
folacin-app/src/views/index/index.vue
0 → 100644
View file @
91fb54e1
<
template
>
<div>
<div
v-if=
"msg"
>
<br><br><br><br><br>
<van-empty
image=
"error"
:description=
"msg"
/>
<van-button
style=
"margin-left: 10%;width: 80%"
round
type=
"danger"
color=
"#EC808D"
@
click=
"handleBack()"
>
返回
</van-button>
</div>
</div>
</
template
>
<
script
>
import
{
callMobile
,
isIOSWebKit
}
from
'@/utils/common'
;
import
{
Dialog
}
from
'vant'
;
export
default
{
components
:
{},
data
()
{
return
{
msg
:
null
,
scrollPosition
:
0
,
}
},
created
()
{
let
vm
=
this
;
window
[
'init'
]
=
(
result
)
=>
{
vm
.
initUserInfo
(
result
);
vm
.
showMsg
();
};
window
[
'qrcodeContent'
]
=
(
result
)
=>
{
vm
.
scanQRCallBack
(
result
);
};
},
mounted
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
userInfo
=
{
account
:
'18487125843'
,
token
:
'7de354fd8be1484cacbc41e96fe88d7e'
,
userId
:
'11133351501171512'
,
};
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
userInfo
));
this
.
showMsg
();
}
else
{
let
query
=
this
.
$route
.
query
;
let
userInfo
=
{
account
:
query
.
account
,
token
:
query
.
token
,
userId
:
query
.
userId
,
};
if
(
!
userInfo
.
userId
&&
!
userInfo
.
account
)
{
this
.
msg
=
"用户信息获取失败!"
callMobile
(
'init'
,
{});
}
else
{
if
(
!
userInfo
.
userId
||
!
userInfo
.
account
)
{
this
.
msg
=
"用户信息获取失败!"
return
;
}
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
userInfo
));
this
.
showMsg
();
}
}
},
activated
()
{
window
.
scrollTo
(
0
,
this
.
scrollPosition
);
},
methods
:
{
handleBack
()
{
callMobile
(
'goIndex'
,
{});
},
initUserInfo
(
val
)
{
let
ios
=
isIOSWebKit
();
if
(
ios
)
{
window
.
sessionStorage
.
setItem
(
'userInfo'
,
val
);
}
else
{
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
val
));
}
},
showMsg
(){
Dialog
.
alert
({
title
:
'温馨提示'
,
message
:
'备孕妇女从孕前3个月,坚持每天服用0.4mg叶酸或含叶酸的复合维生素至少到怀孕满3个月,可预防胎儿神经管缺陷的发生,还能减少唇腭裂、先心病、早产等风险。特殊情况妇女如肥胖、糖尿病等要加量。'
,
confirmButtonText
:
"好的,知道了"
}).
then
(()
=>
{
this
.
$router
.
push
(
'provideUnit'
);
});
}
},
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
scrollPosition
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
next
();
},
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
\ No newline at end of file
folacin-app/src/views/provideUnit/provideUnit.vue
View file @
91fb54e1
...
@@ -45,31 +45,15 @@ export default {
...
@@ -45,31 +45,15 @@ export default {
}
}
},
},
created
()
{
created
()
{
Dialog
.
alert
({
title
:
'温馨提示'
,
message
:
'备孕妇女从孕前3个月,坚持每天服用0.4mg叶酸或含叶酸的复合维生素至少到怀孕满3个月,可预防胎儿神经管缺陷的发生,还能减少唇腭裂、先心病、早产等风险。特殊情况妇女如肥胖、糖尿病等要加量。'
,
confirmButtonText
:
"好的,知道了"
}).
then
(()
=>
{
});
let
vm
=
this
;
let
vm
=
this
;
window
[
'init'
]
=
(
result
)
=>
{
//
window['init'] = (result) => {
vm
.
initUserInfo
(
result
);
//
vm.initUserInfo(result);
};
//
};
window
[
'qrcodeContent'
]
=
(
result
)
=>
{
window
[
'qrcodeContent'
]
=
(
result
)
=>
{
vm
.
scanQRCallBack
(
result
);
vm
.
scanQRCallBack
(
result
);
};
};
},
},
mounted
()
{
mounted
()
{
if
(
process
.
env
.
NODE_ENV
==
"dev"
)
{
let
userInfo
=
{
account
:
'18487125843'
,
token
:
'7de354fd8be1484cacbc41e96fe88d7e'
,
userId
:
'11133351501171512'
,
};
window
.
sessionStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
userInfo
));
}
else
{
callMobile
(
'init'
,
{});
}
this
.
getProvideUnitList
();
this
.
getProvideUnitList
();
},
},
activated
()
{
activated
()
{
...
...
folacin-app/src/views/questionAnswer/questionAnswer.vue
View file @
91fb54e1
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
<
script
>
<
script
>
import
{
getUserInfoLast
}
from
'@/axios/api'
import
{
getUserInfoLast
}
from
'@/axios/api'
import
{
Notify
}
from
'vant'
;
export
default
{
export
default
{
name
:
"questionAnswer"
,
name
:
"questionAnswer"
,
...
@@ -83,8 +84,12 @@ export default {
...
@@ -83,8 +84,12 @@ export default {
this
.
$router
.
push
(
'provideUnit'
);
this
.
$router
.
push
(
'provideUnit'
);
},
},
getLastRecord
()
{
getLastRecord
()
{
let
userInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
))
if
(
!
userInfo
){
Notify
({
type
:
'warning'
,
message
:
'用户信息获取失败!'
});
return
}
this
.
$toast
.
open
();
this
.
$toast
.
open
();
let
userInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
));
getUserInfoLast
(
userInfo
.
userId
).
then
(
res
=>
{
getUserInfoLast
(
userInfo
.
userId
).
then
(
res
=>
{
if
(
res
.
code
===
'SUCCESS'
)
{
if
(
res
.
code
===
'SUCCESS'
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
...
...
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