Commit 6a8794fa by Chao Sun

收入页

parent fc6ff67b
@@ -1,46 +0,0 @@
.ageContent {
display: flex;
flex-wrap: wrap;
......
......@@ -35,11 +35,11 @@ const routes: Routes = [
}, {
path: 'job',
component: JobComponent,
data: [{type: 1}]
data: [{id: 1}]
}, {
path: 'spouse_job',
component: JobComponent,
data: [{type: 2}]
data: [{id: 2}]
}
, {
path: 'income',
......
<p>
children-health works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="jobContent">
<li
class="selected"
*ngFor="let options of this.curPageData?.questions[0]['options']"
[ngClass]="{ selected: options['selected'] == true }"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-children-health',
......@@ -6,10 +7,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./children-health.component.css']
})
export class ChildrenHealthComponent implements OnInit {
constructor() { }
curPageData:Array<any>;
constructor(
private commonService: CommonService
) { }
ngOnInit() {
this.surveyInfo()
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['12']
console.log(this.curPageData)
}
})
}
}
<p>
disease works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle hospitalTitle">
{{ this.curPageData?.pageName }}
</div>
<ul class="jobContent">
<li
*ngFor="let options of this.curPageData?.questions[0]['options']"
[ngClass]="{ selected: options['selected'] == true }"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-disease',
......@@ -6,10 +7,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./disease.component.css']
})
export class DiseaseComponent implements OnInit {
constructor() { }
curPageData:Array<any>;
constructor(
private commonService: CommonService
) { }
ngOnInit() {
this.surveyInfo()
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['13']
console.log(this.curPageData)
}
})
}
}
......@@ -46,6 +46,6 @@ export class FamilyComponent implements OnInit {
// 下一步
next() {
this.router.navigate(['/age'], {queryParams: {type: this.selectedOptionId}});
this.router.navigate(['/job'], {queryParams: {type: this.selectedOptionId}});
}
}
<p>
health works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="jobContent">
<li
*ngFor="let options of this.curPageData?.questions[0]['options']"
[ngClass]="{ selected: options['selected'] == true }"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-health',
......@@ -6,10 +7,19 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./health.component.css']
})
export class HealthComponent implements OnInit {
constructor() { }
curPageData:Array<any>;
constructor(private commonService: CommonService) { }
ngOnInit() {
this.surveyInfo()
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['10']
console.log(this.curPageData)
}
})
}
}
<p>
income works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="twoContent">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="income">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[0].options"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle" *ngIf="hasMate">
{{ this.curPageData?.questions[1]['questionName']}}
</div>
<ul class="income" *ngIf="hasMate">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[1]['options']"
>
{{ options.optionName }}
</li>
</ul>
</div>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-income',
......@@ -6,10 +7,21 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./income.component.css']
})
export class IncomeComponent implements OnInit {
constructor() { }
hasMate:boolean;
curPageData:Array<any>;
constructor(private commonService: CommonService) { }
ngOnInit() {
this.surveyInfo()
this.hasMate = true;
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['6']
console.log(this.curPageData)
}
})
}
}
......@@ -6,10 +6,15 @@
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[0].options"
>
(click)="selectedJob(options)"
>
{{ options.optionName }}
</li>
</ul>
</div>
</div>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }" (click)="next()"> 下一步 </div>
</div>
import {Component, OnInit} from '@angular/core';
import {CommonService} from '../common.service';
import {Router,ActivatedRoute} from "@angular/router";
@Component({
selector: 'app-job',
templateUrl: './job.component.html',
......@@ -7,20 +8,80 @@ import {CommonService} from '../common.service';
})
export class JobComponent implements OnInit {
curPageData: Array<any>;
constructor(private commonService: CommonService) {
pageAnswers: any;
selectedOptionId: any;
type: any;
id:any;
constructor(private commonService: CommonService,
private router: Router,
private route: ActivatedRoute) {
/**
* 1:单身贵族
* 2:二人世界
* 3:独立带娃
* 4:多口之家
* @type {any}
*/
/**
* 1:您的工作
* 2: 配偶的工作
* @id
* */
this.type = this.route.snapshot.queryParams['type'];
this.id = this.route.snapshot['data']['0']['id'];
console.log(this.id)
this.pageAnswers = {
pageId: '',
questions: [{
questionId: '',
questionName: '',
options: [{optionId: '', optionName: '', optionOrder: '', selected: ''}]
}],
};
}
ngOnInit() {
// this.surveyInfo();
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data'].survey.pages['3'];
console.log(this.curPageData);
if(this.id==1){
this.curPageData = res['data'].survey.pages['3'];
}else{
this.curPageData = res['data'].survey.pages['4'];
}
console.log(this.curPageData)
}
});
}
selectedJob(option){
console.log(this.curPageData['pageId'])
this.selectedOptionId = option.optionId;
option.selected = true;
this.pageAnswers = {
pageId: this.curPageData['pageId'],
questions: [{
questionId: this.curPageData['questions']['0']['questionId'],
questionName: this.curPageData['questions']['0']['questionName'],
options: [option]
}],
};
this.commonService.addAnswer(this.pageAnswers);
console.log(this.pageAnswers)
console.log(this.commonService.todos)
}
// 下一步
next() {
//如果是二人世界或是多口之家跳转到配偶页
//先判断当前页是您的页还是配偶页
if(this.id == 1){
if(this.type ==2 || this.type==4){
this.router.navigate(['/spouse_job'],{queryParams:{type:this.type}})
}else{
this.router.navigate(['/transit1'],{queryParams:{type:this.type}})
}
}else{
this.router.navigate(['/transit1'],{queryParams:{type:this.type}})
}
}
}
<p>
live works!
</p>
<div class="container">
<div class="layout ">
<div class="content">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="cityContent">
<li
*ngFor="let provinces of this.provinceList"
[ngClass]="{ selected: provinces['selected'] == true }"
(click)="showToast(); selectProvince(provinces)"
>
{{ provinces.provinceAbbr }}
</li>
</ul>
<div class="address" *ngIf="this.showAddress">
{{ this.strAddress }}
</div>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
<div class="toastWrapper toast" *ngIf="isShow" (click)="closeToast();">
</div>
<div class="toastContent city" *ngIf="isShow">
<div class="live">所在地区</div>
<div class="province">
<span>{{ this.provinceName }}</span>
</div>
<ul class="city">
<li
*ngFor="let city of this.cityList"
(click)="closeToast(); selectCity(city);"
>
{{ city.cityName }}
</li>
</ul>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import { CommonService } from '../common.service'
@Component({
selector: 'app-live',
......@@ -6,10 +7,73 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./live.component.css']
})
export class LiveComponent implements OnInit {
constructor() { }
curPageData: Array<any>
provinceList: Array<any>
isShow: boolean
provinceId: number
provinceName: string
cityList: Array<any>
//页面是否显示地址
showAddress: boolean
//入参地址
address: Object
//页面地址
strAddress: string
constructor(
private commonService: CommonService
) { }
ngOnInit() {
this.surveyInfo()
this.showAddress = false;
}
surveyInfo() {
//获取问题
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['15']
}
})
//获取省份
this.commonService.provinceqry({ insurerId: 11 }).then(res => {
if (res['success']) {
this.provinceList = res['data'].provinceList
}
})
}
showToast() {
this.isShow = true
}
selectProvince(option) {
// console.log(this.selectedProvinceObj)
this.provinceName = option.provinceName
this.provinceId = option.provinceId
this.getCityqry()
}
closeToast() {
this.isShow = false
}
getCityqry() {
const param = {
insurerId: 11,
provinceId: this.provinceId
}
this.commonService.getCityqry(param).then(res => {
if (res['success']) {
this.cityList = res['data'].cityList
// console.log(this.cityList)
}
})
}
selectCity(e) {
this.showAddress = true
this.strAddress = this.provinceName + e.cityName
this.address = {
customerInput: this.provinceName + ',' + e.cityName
}
}
}
<p>
loan works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="income">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[0]['options']"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle">
{{ this.curPageData?.questions[1]['questionName'] }}
</div>
<ul class="income">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[1]['options']"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-loan',
......@@ -6,10 +7,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./loan.component.css']
})
export class LoanComponent implements OnInit {
constructor() { }
curPageData:Array<any>;
hasMate:boolean;
constructor(private commonService: CommonService) { }
ngOnInit() {
this.surveyInfo()
this.hasMate = true;
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['7']
console.log(this.curPageData)
}
})
}
}
<p>
smoking works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle smokeTitle">
{{ this.curPageData?.pageName }}
</div>
<ul class="jobContent">
<li
*ngFor="let options of this.curPageData?.questions[0]['options']"
[ngClass]="{ selected: options['selected'] == true }"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-smoking',
......@@ -6,10 +7,21 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./smoking.component.css']
})
export class SmokingComponent implements OnInit {
curPageData:Array<any>;
constructor(
private commonService: CommonService
constructor() { }
) { }
ngOnInit() {
this.surveyInfo()
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['14']
console.log(this.curPageData)
}
})
}
}
<p>
social-security works!
</p>
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData?.questions[0]['questionName'] }}
</div>
<ul class="jobContent">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[0]['options']"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle" *ngIf="hasMate">
{{ this.curPageData?.questions[1]['questionName'] }}
</div>
<ul class="jobContent" *ngIf="hasMate">
<li
[ngClass]="{ selected: options['selected'] == true }"
*ngFor="let options of this.curPageData?.questions[1]['options']"
>
{{ options.optionName }}
</li>
</ul>
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
</div>
import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service';
@Component({
selector: 'app-social-security',
......@@ -6,10 +7,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./social-security.component.css']
})
export class SocialSecurityComponent implements OnInit {
constructor() { }
curPageData:Array<any>;
hasMate:boolean;
constructor(private commonService: CommonService) { }
ngOnInit() {
this.surveyInfo()
this.hasMate = true;
}
surveyInfo() {
this.commonService.surveyInfo().then(res => {
if (res['success']) {
this.curPageData = res['data']['survey'].pages['8']
console.log(this.curPageData)
}
})
}
}
<p>
transit1 works!
</p>
<div class="limbo">
<div class="title">
<img src="assets/images/bg_6.png" />
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
<p>
transit2 works!
</p>
<div class="limbo">
<div class="title">
<img src="assets/images/bg_10.png" />
</div>
<div class="content_footer">
<div style="color: #8a8a8a;">&lt;</div>
<div [ngStyle]="{ color: nextBtn == false ? '#8a8a8a' : '#ec2d37' }"> 下一步 </div>
</div>
</div>
<p>
transit3 works!
</p>
<div class="limbo">
<div class="title">
<img src="assets/images/bg_17.png" />
</div>
<div class="footer" style="margin-top: 10%;" (click)="getHref()">
<div>我知道了</div>
</div>
</div>
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