Commit e48ad740 by Chao Sun

初始化没有疾病

parent c97681d4
import {Component, OnInit} from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {CommonService} from '../common.service' import { CommonService } from '../common.service'
import {ActivatedRoute, Router} from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
@Component({ @Component({
selector: 'app-live', selector: 'app-live',
...@@ -36,20 +36,20 @@ export class LiveComponent implements OnInit { ...@@ -36,20 +36,20 @@ export class LiveComponent implements OnInit {
isDisease: boolean = true; isDisease: boolean = true;
// 不能进行自动评测 // 不能进行自动评测
autoEvaluationModal: boolean; autoEvaluationModal: boolean;
selfDisease: boolean = true; selfDisease: boolean = false;
spouseDisease: boolean = true; spouseDisease: boolean = false;
childrenDisease: boolean = true; childrenDisease: boolean = false;
constructor(private commonService: CommonService, constructor(private commonService: CommonService,
private router: Router, private router: Router,
private route: ActivatedRoute) { private route: ActivatedRoute) {
this.type = this.route.snapshot.queryParams['type']; this.type = this.route.snapshot.queryParams['type'];
this.pageAnswers = { this.pageAnswers = {
pageId: '', pageId: '',
questions: [{ questions: [{
questionId: '', questionId: '',
questionName: '', questionName: '',
options: [{optionId: '', optionName: '', optionOrder: '', selected: ''}] options: [{ optionId: '', optionName: '', optionOrder: '', selected: '' }]
}], }],
}; };
this.loginData = { this.loginData = {
...@@ -65,7 +65,7 @@ export class LiveComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class LiveComponent implements OnInit {
this.tipsFlag = false; this.tipsFlag = false;
this.lastQuestions = this.commonService.todosCopy.filter(item => item.pageId == 16).pop(); 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']) { if (res['success']) {
this.provinceList = res['data'].provinceList; this.provinceList = res['data'].provinceList;
} }
...@@ -234,7 +234,7 @@ export class LiveComponent implements OnInit { ...@@ -234,7 +234,7 @@ export class LiveComponent implements OnInit {
this.errorModal('手机号码输入有误'); this.errorModal('手机号码输入有误');
return; return;
} else if (this.loginData.mobileNo) { } 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']) { if (res['success']) {
this.sendBtnFlag = true; this.sendBtnFlag = true;
this.errorModal('发送成功'); this.errorModal('发送成功');
...@@ -278,7 +278,7 @@ export class LiveComponent implements OnInit { ...@@ -278,7 +278,7 @@ export class LiveComponent implements OnInit {
}).then(res => { }).then(res => {
if (res['success']) { if (res['success']) {
// 登录 // 登录
this.commonService.login({'mobileNo': this.loginData.mobileNo}).then(response => { this.commonService.login({ 'mobileNo': this.loginData.mobileNo }).then(response => {
if (response['success']) { if (response['success']) {
// 登录成功 // 登录成功
this.loginModalFlag = false; this.loginModalFlag = false;
......
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