Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allCampaign
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
allCampaign
Commits
2a96dd52
Commit
2a96dd52
authored
Nov 26, 2019
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问卷样式修改
parent
cac833d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
questionnaire/src/app/app.component.ts
+9
-4
questionnaire/src/app/live/live.component.ts
+11
-11
questionnaire/src/styles.css
+6
-0
No files found.
questionnaire/src/app/app.component.ts
View file @
2a96dd52
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"./common.service"
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"./common.service"
;
@
Component
({
selector
:
'app-root'
,
...
...
@@ -14,9 +14,14 @@ export class AppComponent implements OnInit {
ngOnInit
()
{
const
customerId
=
this
.
commonService
.
getQueryString
(
'customerId'
);
const
orderId
=
this
.
commonService
.
getQueryString
(
'orderId'
);
const
questionnaireSource
=
this
.
commonService
.
getQueryString
(
'source'
);
const
campaignInfo
=
{
campaignCode
:
this
.
commonService
.
getQueryString
(
'campaign'
),
campaignTaskCode
:
this
.
commonService
.
getQueryString
(
'task'
),
}
||
null
;
sessionStorage
.
setItem
(
'customerId'
,
customerId
);
sessionStorage
.
setItem
(
'orderId'
,
orderId
);
sessionStorage
.
setItem
(
'questionnaireSource'
,
questionnaireSource
);
if
(
!
campaignInfo
)
{
sessionStorage
.
setItem
(
'campaignInfo'
,
JSON
.
stringify
(
campaignInfo
));
}
}
}
questionnaire/src/app/live/live.component.ts
View file @
2a96dd52
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
'../common.service'
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
'../common.service'
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
@
Component
({
selector
:
'app-live'
,
...
...
@@ -38,15 +38,15 @@ export class LiveComponent implements OnInit {
autoEvaluationModal
:
boolean
;
constructor
(
private
commonService
:
CommonService
,
private
router
:
Router
,
private
route
:
ActivatedRoute
)
{
private
router
:
Router
,
private
route
:
ActivatedRoute
)
{
this
.
type
=
this
.
route
.
snapshot
.
queryParams
[
'type'
];
this
.
pageAnswers
=
{
pageId
:
''
,
questions
:
[{
questionId
:
''
,
questionName
:
''
,
options
:
[{
optionId
:
''
,
optionName
:
''
,
optionOrder
:
''
,
selected
:
''
}]
options
:
[{
optionId
:
''
,
optionName
:
''
,
optionOrder
:
''
,
selected
:
''
}]
}],
};
this
.
loginData
=
{
...
...
@@ -61,7 +61,7 @@ export class LiveComponent implements OnInit {
this
.
tipsFlag
=
false
;
this
.
lastQuestions
=
this
.
commonService
.
todosCopy
.
filter
(
item
=>
item
.
pageId
==
16
).
pop
();
// 获取省份
this
.
commonService
.
provinceqry
({
insurerId
:
11
}).
then
(
res
=>
{
this
.
commonService
.
provinceqry
({
insurerId
:
11
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
provinceList
=
res
[
'data'
].
provinceList
;
}
...
...
@@ -173,7 +173,7 @@ export class LiveComponent implements OnInit {
}
};
// questionnaireSource 为 1 表示 自动评测
if
(
sessionStorage
.
getItem
(
'questionnaireSource'
)
===
'double12'
)
{
if
(
!
sessionStorage
.
getItem
(
'campaignInfo'
)
)
{
if
(
!
param
||
!
param
.
survey
.
customerId
||
param
.
survey
.
customerId
===
'null'
||
param
.
survey
.
customerId
===
'undefined'
)
{
this
.
loginModalFlag
=
true
;
return
;
...
...
@@ -211,7 +211,7 @@ export class LiveComponent implements OnInit {
this
.
errorModal
(
'手机号码输入有误'
);
return
;
}
else
if
(
this
.
loginData
.
mobileNo
)
{
this
.
commonService
.
verificationCode
({
mobileNo
:
this
.
loginData
.
mobileNo
,
type
:
'1'
}).
then
(
res
=>
{
this
.
commonService
.
verificationCode
({
mobileNo
:
this
.
loginData
.
mobileNo
,
type
:
'1'
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
sendBtnFlag
=
true
;
this
.
errorModal
(
'发送成功'
);
...
...
@@ -232,7 +232,7 @@ export class LiveComponent implements OnInit {
}
}
//
注册
//
获取结果时登录
loginIn
()
{
this
.
commonService
.
compare
({
'mobileNo'
:
this
.
loginData
.
mobileNo
,
...
...
@@ -241,7 +241,7 @@ export class LiveComponent implements OnInit {
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
// 登录
this
.
commonService
.
login
({
'mobileNo'
:
this
.
loginData
.
mobileNo
}).
then
(
response
=>
{
this
.
commonService
.
login
({
'mobileNo'
:
this
.
loginData
.
mobileNo
}).
then
(
response
=>
{
if
(
response
[
'success'
])
{
// 登录成功
this
.
loginModalFlag
=
false
;
...
...
questionnaire/src/styles.css
View file @
2a96dd52
...
...
@@ -13,6 +13,9 @@ body {
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
"PingFang SC"
,
"Hiragino Sans GB"
,
"Microsoft YaHei"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
;
/* overflow: hidden; */
min-width
:
320px
;
max-width
:
640px
;
margin
:
0
auto
;
}
img
{
...
...
@@ -142,6 +145,9 @@ ol li {
position
:
fixed
;
bottom
:
0
;
background-color
:
#f6f6f6
;
min-width
:
320px
;
max-width
:
640px
;
margin
:
0
auto
;
/* padding-bottom: 15px; */
}
...
...
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