Commit 5a1efb59 by Chao Sun

每页显示上一步和下一步&取消1秒后自动跳转

parent 037cc589
.ageContent { .ageContent {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 1em;
} }
.ageContent li.liWrapper { .ageContent li.liWrapper {
width: 100%; width: 100%;
height: 60px;
line-height: 60px;
border-bottom: 1px solid #dcdcdc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 5em; margin-bottom: 3em;
}
li.liWrapper img{
width: 65px;
height: 65px;
margin: 0 auto;
} }
.ageContent li div.item{ .ageContent li div.item{
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
margin: .5em auto;
}
.ageContent li div.item div{
width: 42%;
text-align: right;
margin:0 4%;
font-size: 16px;
}
.ageContent li div.item div:nth-child(2){
color: #5566e9;
font-size: 36px;
text-align: left;
font-weight: bold;
margin-left: 6%;
margin-right: 0;
} }
.ageContent li span b { .ageContent li span b {
...@@ -56,7 +73,7 @@ ...@@ -56,7 +73,7 @@
.ageWrapper{ .ageWrapper{
position: relative; position: relative;
} }
.ageWrapper #dot{ /* .ageWrapper #dot{
position: absolute; position: absolute;
height: 35px; height: 35px;
width: 1px; width: 1px;
...@@ -73,30 +90,50 @@ ...@@ -73,30 +90,50 @@
top: -4px; top: -4px;
position: absolute; position: absolute;
left: -4px; left: -4px;
} */
.ageWrapper input[type="range"]{
-webkit-appearance: none; /*去除默认样式*/
background:#e9e9e9;
height: 10px;
border-radius: 40px;
} }
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;/*去除默认样式*/
cursor: default;
top: 0;
height: 30px;
width: 30px;
transform: translateY(0px);
background: #ffffff;
border-radius:50%;
border: 6px solid #5566e9;
position: relative;
z-index: 200;
box-shadow: 0px 3px 8px 5px #d2d8ff;;
}
.age{ .age{
width: 100%; width: 100%;
height: 10px; height: 10px;
display: flex; display: flex;
/* justify-content: space-between; */ /* justify-content: space-between; */
/* border-top: 1px #d5d5d5 solid; */
} }
.age li{ .age li{
width: 1.6666%; width: 1.612903%;
height: 8px; height: 8px;
border-left: 1px #d5d5d5 solid;
position: relative;
}
.age li:nth-child(10n+1){
height: 20px;
position: relative; position: relative;
width: 1.6666%;
border-left: 1px #d5d5d5 solid;
} }
.age li span{ .age li span{
position: absolute; position: absolute;
top: 20px; top: 25px;
left: -8px; left:-8px;
}
.age.childage li{
width: 5.88235%;
}
.age.childage li span{
left:4px;
} }
<div class="layout"> <div class="layout">
<div class="content" style="position: relative;"> <div class="content">
<div class="questionTitle"> <div class="questionTitle">
<div class="titleName">{{ curPageData?.pageName }}</div> <div class="titleName">{{ curPageData?.pageName }}</div>
<div class="page">2/{{this.totalPage}}</div> <div class="page">2/{{this.totalPage}}</div>
</div> </div>
<div class="subTitle">(准确年龄才可以精确计算保费)</div> <div class="subTitle">(准确年龄才可以精确计算保费)</div>
<ul class="ageContent"> <ul class="ageContent">
<li class="liWrapper" *ngFor="let optionsList of this.curPageData?.questions; index as i"> <li class="liWrapper" *ngFor="let optionsList of this.curPageData?.questions; index as i"
<div class="item"> style="position: relative;">
<div>{{ optionsList.questionName }}</div> <img src="assets/images/icon2.png"
<h2 style="text-align: center;margin-bottom: 0;">{{value2}}</h2> *ngIf="(type==2 || type==4) && (optionsList.questionId ==2 || optionsList.questionId ==3)">
<b (click)="showToast(optionsList)" style="width:35%;text-align: center;float: right"> <img src="assets/images/child.png" *ngIf="(type==3 || type==4) && (optionsList.questionId ==4)">
<span style="width:20%;text-align: center;">{{ optionsList.optionName}}</span> <img src="assets/images/icon.png" *ngIf="(type==1) && (optionsList.questionId ==2)">
<span style="width:10%;text-align: center;float: right">&gt;</span> <img src="assets/images/icon3.png" *ngIf="(type==3) && (optionsList.questionId ==2)">
</b> <div class="item" style="height: 50px;line-height: 50px;">
<div class="questionName">{{ optionsList.questionName }}</div>
<div>{{optionsList.optionName}}</div>
</div> </div>
<div class="item ageWrapper"> <div class="item ageWrapper">
<div id="dot" [ngStyle]="{'left': (value2-20)/60*100 + '%'}"> <!--家长年龄部分-->
<span></span> <input type="range" min='18' max="80" (ngModelChange)="selectedAge(optionsList,optionsList['options'])"
</div> [(ngModel)]="optionsList.optionName" *ngIf="(optionsList.questionId ==2 || optionsList.questionId ==3)"
<input style="height:35px;position: absolute; opacity: 0; left: 0;width: '100%';top: 58%;z-index: 2; " style="position: absolute; opacity: 1; left: 0;width: '100%';top: 0;z-index: 2; " />
type="range" [(ngModel)]="value2" (ngModelChange)="selectAge($event)" min="20" max="80" step="1" /> <input type="range" min='0' max="17" (ngModelChange)="selectedAge(optionsList,optionsList['options'])"
<!-- <div style="text-align: center;font-size: 36px;color:#5566e9;">{{value2}}</div> [(ngModel)]="optionsList.optionName" *ngIf=" (optionsList.questionId ==4)"
<nz-slider [(ngModel)]="value2" [nzDisabled]="disabled" [nzMin]='20' [nzMax]="80" [nzTipFormatter]="null" style="position: absolute; opacity: 1; left: 0;width: '100%';top: 0;z-index: 2; " />
(ngModelChange)="selectAge($event)"> <ul class="age" *ngIf="optionsList.questionId ==2 || optionsList.questionId ==3">
</nz-slider> --> <li><span>18</span></li>
<ul class="age"> <li></li>
<li><span>20</span></li> <li></li>
<li></li> <li></li>
<li></li> <li></li>
<li></li> <li></li>
...@@ -87,11 +89,35 @@ ...@@ -87,11 +89,35 @@
<li></li> <li></li>
<li><span>80</span></li> <li><span>80</span></li>
</ul> </ul>
<ul class="age childage" *ngIf="optionsList.questionId ==4">
<li><span>0</span></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li><span>5</span></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li><span>10</span></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li><span>15</span></li>
<li></li>
<li></li>
</ul>
</div> </div>
<span style="color: #4446e2;position: absolute;right: 5%;bottom:26%;font-size: 18px;font-weight: bold;"
*ngIf="(optionsList.questionId==4) && !optionsList.questionSubId" (click)="addChild()"
[ngClass]="{'disabled':totalChildLimitCount<=0}">添加孩子</span>
<!-- <span style="color: #4446e2;position: absolute;right: 5%;bottom:26%;font-size: 18px;font-weight: bold;"
*ngIf="(optionsList.questionId==4) && (optionsList.questionSubId==1||optionsList.questionSubId==2)"
(click)="deleteChild(optionsList.questionSubId)" [ngClass]="{'disabled':totalChildLimitCount>=2}">删除孩子</span> -->
</li> </li>
<span style="color: #4446e2;position: absolute;top: 61%;right: 5%;" *ngIf="!(type==1||type==2)"
(click)="addChild()" [ngClass]="{'disabled':totalChildLimitCount<=0}"
[ngStyle]="{top:type==3?'39%':'61%'}">添加孩子</span>
</ul> </ul>
<!-- <div class="addChild" (click)="addChild()" *ngIf="!(type==1||type==2)" <!-- <div class="addChild" (click)="addChild()" *ngIf="!(type==1||type==2)"
[ngClass]="{'disabled':totalChildLimitCount<=0}"> [ngClass]="{'disabled':totalChildLimitCount<=0}">
...@@ -102,21 +128,9 @@ ...@@ -102,21 +128,9 @@
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;" (click)="before()"> <div (click)="before()">
<!-- &lt; --> <!-- &lt; -->
上一步 上一步
</div> </div>
<div class="next" (click)="next()"> 下一步</div> <div class="next" (click)="next()" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }"> 下一步</div>
</div>
<div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast()">
</div>
<div class="toastContent" *ngIf="isShow">
<ul>
<li *ngFor="let options of curQues.options" [ngClass]="{ selected: options['selected']}"
(click)="selectedAge(options);">
{{ options.optionName }}
</li>
</ul>
<!--<div>{{curQues|json}}</div>-->
</div> </div>
\ No newline at end of file
...@@ -11,7 +11,6 @@ export class AgeComponent implements OnInit { ...@@ -11,7 +11,6 @@ export class AgeComponent implements OnInit {
// 家庭结构 // 家庭结构
type: any; type: any;
curPageData: any; curPageData: any;
isShow: boolean;
curQues: any; curQues: any;
pageAnswers: any; pageAnswers: any;
...@@ -24,9 +23,8 @@ export class AgeComponent implements OnInit { ...@@ -24,9 +23,8 @@ export class AgeComponent implements OnInit {
nextBtn: boolean = false; nextBtn: boolean = false;
targetObj: any = {}; targetObj: any = {};
disabled: boolean; disabled: boolean;
value2: number = 25;
marks: any;
totalPage: any; totalPage: any;
deviceType: any;
constructor(private commonService: CommonService, private router: Router, private route: ActivatedRoute) { constructor(private commonService: CommonService, private router: Router, private route: ActivatedRoute) {
/** /**
* 1:单身贵族 * 1:单身贵族
...@@ -43,21 +41,16 @@ export class AgeComponent implements OnInit { ...@@ -43,21 +41,16 @@ export class AgeComponent implements OnInit {
pageId: '', pageId: '',
questions: [], questions: [],
}; };
this.marks = {
20: '20',
30: '30',
40: '40',
50: '50',
60: '60',
70: '70',
80: '80'
};
} }
ngOnInit() { ngOnInit() {
this.deviceType = this.checkDeviceType();
this.disabled = false; this.disabled = false;
this.value2 = 25;
this.lastQuestions = this.commonService.todosCopy.filter(item => item.pageId == 3).pop(); this.lastQuestions = this.commonService.todosCopy.filter(item => item.pageId == 3).pop();
this.surveyInfo();
}
surveyInfo() {
this.commonService.surveyInfo().then(res => { this.commonService.surveyInfo().then(res => {
this.curPageData = res['data']['survey']['pages'].filter(item => item.pageId === 3).pop(); this.curPageData = res['data']['survey']['pages'].filter(item => item.pageId === 3).pop();
this.pageAnswers.pageId = this.curPageData['pageId']; this.pageAnswers.pageId = this.curPageData['pageId'];
...@@ -86,8 +79,7 @@ export class AgeComponent implements OnInit { ...@@ -86,8 +79,7 @@ export class AgeComponent implements OnInit {
if (Object.keys(option).indexOf('optionId') > -1) { if (Object.keys(option).indexOf('optionId') > -1) {
this.targetObj = option; this.targetObj = option;
} }
this.showToast(this.curPageData['questions'][j]) this.selectedAge(this.curPageData['questions'][j], this.targetObj);
this.selectedAge(this.targetObj);
}); });
} }
} }
...@@ -98,13 +90,17 @@ export class AgeComponent implements OnInit { ...@@ -98,13 +90,17 @@ export class AgeComponent implements OnInit {
} }
}); });
} }
selectAge(e) {
console.log(e)
this.value2 = e;
}
// 选择年龄 // 选择年龄
selectedAge(options) { selectedAge(questions, options) {
this.curQues = questions;
if (options) {
for (let n = 0; n < options.length; n++) {
if (this.curQues.optionName == options[n]['optionName']) {
options = options[n];
}
}
}
const question = { const question = {
questionId: this.curQues.questionId, questionId: this.curQues.questionId,
questionSubId: this.curQues.questionSubId, questionSubId: this.curQues.questionSubId,
...@@ -137,7 +133,6 @@ export class AgeComponent implements OnInit { ...@@ -137,7 +133,6 @@ export class AgeComponent implements OnInit {
} }
this.pageAnswers.questions.push(question); this.pageAnswers.questions.push(question);
this.commonService.addAnswer(this.pageAnswers); this.commonService.addAnswer(this.pageAnswers);
this.closeToast();
if (this.curPageData['questions'].length == this.pageAnswers.questions.length) { if (this.curPageData['questions'].length == this.pageAnswers.questions.length) {
this.nextBtn = true; this.nextBtn = true;
} else { } else {
...@@ -145,23 +140,6 @@ export class AgeComponent implements OnInit { ...@@ -145,23 +140,6 @@ export class AgeComponent implements OnInit {
} }
} }
showToast(question) {
this.isShow = true;
this.curQues = question;
for (let i = 0; i < question['options'].length; i++) {
if (question.optionName == question['options'][i].optionName) {
question['options'][i]['selected'] = true
} else {
question['options'][i]['selected'] = false
}
}
}
closeToast() {
this.isShow = false;
}
// 增加孩子 // 增加孩子
addChild() { addChild() {
this.totalChildLimitCount--; this.totalChildLimitCount--;
...@@ -182,6 +160,20 @@ export class AgeComponent implements OnInit { ...@@ -182,6 +160,20 @@ export class AgeComponent implements OnInit {
this.totalPage = Number(this.totalPage) + 1; this.totalPage = Number(this.totalPage) + 1;
} }
//删除孩子
deleteChild(questionSubId) {
this.totalChildLimitCount++;
if (this.totalChildLimitCount >= 3) {
return;
}
if (this.question['questionSubId'] == questionSubId) {
this.curPageData['questions'] = this.curPageData['questions'].filter(item => item.questionSubId != questionSubId)
this.question.questionSubId = --this.questionSubId;
this.commonService.removeAnswer(this.curPageData['questions'])
}
this.totalPage = Number(this.totalPage) - 1;
}
// 根据家庭结构处理展示数据 // 根据家庭结构处理展示数据
handleData(questionId) { handleData(questionId) {
for (let m = 0; m < this.curPageData['questions'].length; m++) { for (let m = 0; m < this.curPageData['questions'].length; m++) {
...@@ -207,4 +199,22 @@ export class AgeComponent implements OnInit { ...@@ -207,4 +199,22 @@ export class AgeComponent implements OnInit {
before() { before() {
this.commonService.before(); this.commonService.before();
} }
/**
* 检测设备信息
* deviceType:PC为1,移动端为2,微信为3
*/
checkDeviceType() {
let deviceType = null;
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
deviceType = 3;
} else {
deviceType = 2;
}
} else {
deviceType = 1;
}
return deviceType;
}
} }
...@@ -19,8 +19,6 @@ export class AppComponent implements OnInit { ...@@ -19,8 +19,6 @@ export class AppComponent implements OnInit {
window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime(); window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime();
} }
}, 300) }, 300)
console.log(this.commonService.getQueryString('t_reload'))
let customerId = this.commonService.getQueryString('customerId'); let customerId = this.commonService.getQueryString('customerId');
const double12_customerInfo = localStorage.getItem('double12_customerInfo') ? JSON.parse(localStorage.getItem('double12_customerInfo')) : null; const double12_customerInfo = localStorage.getItem('double12_customerInfo') ? JSON.parse(localStorage.getItem('double12_customerInfo')) : null;
if (double12_customerInfo) { if (double12_customerInfo) {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;" (click)="before()">上一步</div> <div (click)="before()">上一步</div>
<div class="next" (click)="next()"> 下一步</div> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -94,20 +94,16 @@ export class ChildrenHealthComponent implements OnInit { ...@@ -94,20 +94,16 @@ export class ChildrenHealthComponent implements OnInit {
this.nextBtn = false; this.nextBtn = false;
} }
this.commonService.addAnswer(this.pageAnswers); this.commonService.addAnswer(this.pageAnswers);
if (!isReturn) { // if (!isReturn) {
if (option.optionId == 99) { // if (option.optionId == 99) {
this.next(); // this.next();
} // }
} // }
} }
// 获取所有用户选择的健康选项 // 获取所有用户选择的健康选项
getOptions(nonDiseaseOptionId, option) { getOptions(nonDiseaseOptionId, option) {
for ( for (let i = 0; i < this.curPageData["questions"][0]["options"].length; i++) {
let i = 0;
i < this.curPageData["questions"][0]["options"].length;
i++
) {
if (option.optionId == nonDiseaseOptionId && option["selected"]) { if (option.optionId == nonDiseaseOptionId && option["selected"]) {
this.curPageData["questions"][0]["options"][i]["selected"] = false; this.curPageData["questions"][0]["options"][i]["selected"] = false;
if ( if (
...@@ -183,25 +179,17 @@ export class ChildrenHealthComponent implements OnInit { ...@@ -183,25 +179,17 @@ export class ChildrenHealthComponent implements OnInit {
// 下一步 // 下一步
next() { next() {
this.curPage = Number(this.curPage) + 1; this.curPage = Number(this.curPage) + 1;
const age = this.commonService.todosCopy const age = this.commonService.todosCopy.filter(item => item.pageId == 3).pop();
.filter(item => item.pageId == 3) this.childTotalCount = age["questions"].filter(item => item.questionId == 4).length;
.pop();
this.childTotalCount = age["questions"].filter(
item => item.questionId == 4
).length;
if (this.nextBtn) { if (this.nextBtn) {
this.id = this.route.snapshot.params["childId"]; this.id = this.route.snapshot.params["childId"];
// 查看有几个孩子,一个直接跳到疾病页,多个跳多个孩子页 // 查看有几个孩子,一个直接跳到疾病页,多个跳多个孩子页
if (this.id < parseInt(this.childTotalCount, 0)) { if (this.id < parseInt(this.childTotalCount, 0)) {
this.router.navigate(["/children_health", parseInt(this.id, 0) + 1], { this.router.navigate(["/children_health", parseInt(this.id, 0) + 1], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: this.curPage } });
queryParams: { type: this.type, totalPage: this.totalPage, curPage: this.curPage }
});
this.nextBtn = false; this.nextBtn = false;
this.surveyInfo(); this.surveyInfo();
} else { } else {
this.router.navigate(["/disease"], { this.router.navigate(["/disease"], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: this.curPage } });
queryParams: { type: this.type, totalPage: this.totalPage, curPage: this.curPage }
});
} }
} else { } else {
return; return;
......
...@@ -169,6 +169,7 @@ export class CommonService { ...@@ -169,6 +169,7 @@ export class CommonService {
* 添加一个答案 * 添加一个答案
*/ */
addAnswer(todo) { addAnswer(todo) {
console.log(todo)
for (let i = 0; i < this.todos.length; i++) { for (let i = 0; i < this.todos.length; i++) {
if (this.todos[i].pageId == todo.pageId) { if (this.todos[i].pageId == todo.pageId) {
const index = this.todos.indexOf(this.todos[i]); const index = this.todos.indexOf(this.todos[i]);
...@@ -182,6 +183,11 @@ export class CommonService { ...@@ -182,6 +183,11 @@ export class CommonService {
return this; return this;
} }
//删除答案
removeAnswer(todo) {
console.log(todo)
}
/** /**
* 获取验证码 * 获取验证码
* @param verticalCode * @param verticalCode
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;" (click)="before()">上一步</div> <div style="color: #4242dd;" (click)="before()">上一步</div>
<div class="next" (click)="next()"> 下一步 </div> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -144,11 +144,11 @@ export class DiseaseComponent implements OnInit { ...@@ -144,11 +144,11 @@ export class DiseaseComponent implements OnInit {
this.nextBtn = false; this.nextBtn = false;
} }
this.commonService.addAnswer(this.pageAnswers); this.commonService.addAnswer(this.pageAnswers);
if (!isReturn) { // if (!isReturn) {
if (option.optionId == 111) { // if (option.optionId == 111) {
this.next(); // this.next();
} // }
} // }
} }
// 根据type区分单选多选 // 根据type区分单选多选
...@@ -164,7 +164,7 @@ export class DiseaseComponent implements OnInit { ...@@ -164,7 +164,7 @@ export class DiseaseComponent implements OnInit {
if (this.nextBtn == true) { if (this.nextBtn == true) {
this.router.navigate(['/smoke'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } }) this.router.navigate(['/smoke'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } })
} else { } else {
return return;
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex: 0 0 50%; flex: 0 0 50%;
margin-bottom: 23%; margin-bottom: 18%;
} }
.option_item li .imgBox { .option_item li .imgBox {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="titleName">{{ curPageData?.pageName }}</div> <div class="titleName">{{ curPageData?.pageName }}</div>
<div class="page">1/{{this.totalPage}}</div> <div class="page">1/{{this.totalPage}}</div>
</div> </div>
<ul class="option_item" style="margin-top: 20%;"> <ul class="option_item" style="margin-top: 8%;">
<li *ngFor="let options of curPageData?.questions[0]['options']" (click)="selectedFamily(options)"> <li *ngFor="let options of curPageData?.questions[0]['options']" (click)="selectedFamily(options)">
<div class="imgBox"> <div class="imgBox">
<img [ngClass]="{ selected: options['selected'] }" src="assets/images/icon{{ options.optionId }}.png" <img [ngClass]="{ selected: options['selected'] }" src="assets/images/icon{{ options.optionId }}.png"
...@@ -17,8 +17,9 @@ ...@@ -17,8 +17,9 @@
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()"> <div (click)="before()">
上一步 上一步
</div> </div>
<div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步</div> --> <!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步</div> -->
</div> </div>
\ No newline at end of file
...@@ -95,9 +95,9 @@ export class FamilyComponent implements OnInit { ...@@ -95,9 +95,9 @@ export class FamilyComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
this.next(); // this.next();
} // }
} }
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;" (click)="before()">上一步</div> <div (click)="before()">上一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步</div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
<div class="next" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -100,7 +100,6 @@ export class HealthComponent implements OnInit { ...@@ -100,7 +100,6 @@ export class HealthComponent implements OnInit {
} }
} }
} }
} }
} }
}) })
...@@ -135,14 +134,14 @@ export class HealthComponent implements OnInit { ...@@ -135,14 +134,14 @@ export class HealthComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
if (this.id == 1 && option.optionId == 67) { // if (this.id == 1 && option.optionId == 67) {
this.next(); // this.next();
} // }
if (this.id == 2 && option.optionId == 83) { // if (this.id == 2 && option.optionId == 83) {
this.next(); // this.next();
} // }
} // }
} }
// 获取所有用户选择的健康选项 // 获取所有用户选择的健康选项
...@@ -174,9 +173,7 @@ export class HealthComponent implements OnInit { ...@@ -174,9 +173,7 @@ export class HealthComponent implements OnInit {
if (this.type == 2 || this.type == 4) { if (this.type == 2 || this.type == 4) {
this.router.navigate(['/spouse_health'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } }); this.router.navigate(['/spouse_health'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } });
} else if (this.type == 3) { } else if (this.type == 3) {
this.router.navigate(['/children_health', 1], { this.router.navigate(['/children_health', 1], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } });
queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 }
});
} else if (this.type == 1) { } else if (this.type == 1) {
this.router.navigate(['/disease'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } }); this.router.navigate(['/disease'], { queryParams: { type: this.type, totalPage: this.totalPage, curPage: Number(this.curPage) + 1 } });
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()">上一步</div> <div (click)="before()">上一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步 </div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -111,9 +111,9 @@ export class IncomeComponent implements OnInit { ...@@ -111,9 +111,9 @@ export class IncomeComponent implements OnInit {
this.nextBtn = false; this.nextBtn = false;
} }
} }
if (!isReturn) { // if (!isReturn) {
this.next() // this.next()
} // }
} }
next() { next() {
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()"> <div (click)="before()">
上一步 上一步
<!-- &lt; -->
</div> </div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步 </div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
\ No newline at end of file
...@@ -67,7 +67,6 @@ export class JobComponent implements OnInit { ...@@ -67,7 +67,6 @@ export class JobComponent implements OnInit {
this.targetObj = option this.targetObj = option
} }
this.selectedJob(this.targetObj, 'isReturn'); this.selectedJob(this.targetObj, 'isReturn');
}); });
} }
} }
...@@ -87,7 +86,6 @@ export class JobComponent implements OnInit { ...@@ -87,7 +86,6 @@ export class JobComponent implements OnInit {
this.targetObj = option; this.targetObj = option;
} }
this.selectedJob(this.targetObj, 'isReturn'); this.selectedJob(this.targetObj, 'isReturn');
}); });
} }
} }
...@@ -123,9 +121,9 @@ export class JobComponent implements OnInit { ...@@ -123,9 +121,9 @@ export class JobComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
this.next() // this.next()
} // }
} }
// 下一步 // 下一步
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()">上一步</div> <div style="color: #4242dd;width: 100%;" (click)="before()">上一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next(null)"> 下一步</div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next(null)"> 下一步</div>
</div> </div>
<div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast();"> <div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast();">
......
...@@ -176,9 +176,9 @@ export class LiveComponent implements OnInit { ...@@ -176,9 +176,9 @@ export class LiveComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
this.next(null); // this.next(null);
} // }
} }
next(type) { next(type) {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()">上一步</div> <div (click)="before()">上一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步 </div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -100,9 +100,9 @@ export class LoanComponent implements OnInit { ...@@ -100,9 +100,9 @@ export class LoanComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
this.next() // this.next()
} // }
} }
next() { next() {
......
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;" (click)="before()">上一步</div> <div style="color: #4242dd;" (click)="before()">上一步</div>
<div class="next" (click)="next()"> 下一步 </div> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -99,9 +99,9 @@ export class SmokingComponent implements OnInit { ...@@ -99,9 +99,9 @@ export class SmokingComponent implements OnInit {
} else { } else {
this.nextBtn = false; this.nextBtn = false;
} }
if (!isReturn) { // if (!isReturn) {
this.next(); // this.next();
} // }
} }
getManyAnswer(option, lastFlag, isReturn?: any) { getManyAnswer(option, lastFlag, isReturn?: any) {
...@@ -143,11 +143,11 @@ export class SmokingComponent implements OnInit { ...@@ -143,11 +143,11 @@ export class SmokingComponent implements OnInit {
this.nextBtn = false; this.nextBtn = false;
} }
this.commonService.addAnswer(this.pageAnswers); this.commonService.addAnswer(this.pageAnswers);
if (!isReturn) { // if (!isReturn) {
if (option.optionId == 117) { // if (option.optionId == 117) {
this.next(); // this.next();
} // }
} // }
} }
checkFun(option) { checkFun(option) {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
</div> </div>
<div class="content_footer"> <div class="content_footer">
<div style="color: #4242dd;width: 100%;" (click)="before()">上一步</div> <div (click)="before()">上一步</div>
<!-- <div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步 </div> --> <div class="next" [ngStyle]="{ opacity: nextBtn == false ? '0.8' : '1' }" (click)="next()"> 下一步</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -109,9 +109,9 @@ export class SocialSecurityComponent implements OnInit { ...@@ -109,9 +109,9 @@ export class SocialSecurityComponent implements OnInit {
this.nextBtn = false; this.nextBtn = false;
} }
} }
if (!isReturn) { // if (!isReturn) {
this.next() // this.next()
} // }
} }
next() { next() {
......
...@@ -91,7 +91,8 @@ ol li { ...@@ -91,7 +91,8 @@ ol li {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
padding: 10px 8px; padding: 10px 8px;
background: #fff; background: #fff;
height:calc(100% - 60px) height:calc(100% - 60px);
border-radius: 8px 8px 0 0;
} }
.content.healthContent::-webkit-scrollbar-track-piece { .content.healthContent::-webkit-scrollbar-track-piece {
...@@ -190,6 +191,9 @@ ol li { ...@@ -190,6 +191,9 @@ ol li {
/* .content_footer div.next { /* .content_footer div.next {
color: #8a8a8a; color: #8a8a8a;
} */ } */
.content_footer div:nth-child(1){
color: #4242dd;
}
.content_footer div.next { .content_footer div.next {
color: #fff; color: #fff;
background: #4242dd; background: #4242dd;
......
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