Commit 2a96dd52 by Sweet Zhang

问卷样式修改

parent cac833d5
import { Component, OnInit } from '@angular/core'; import {Component, OnInit} from '@angular/core';
import { CommonService } from "./common.service"; import {CommonService} from "./common.service";
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
...@@ -14,9 +14,14 @@ export class AppComponent implements OnInit { ...@@ -14,9 +14,14 @@ export class AppComponent implements OnInit {
ngOnInit() { ngOnInit() {
const customerId = this.commonService.getQueryString('customerId'); const customerId = this.commonService.getQueryString('customerId');
const orderId = this.commonService.getQueryString('orderId'); 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('customerId', customerId);
sessionStorage.setItem('orderId', orderId); sessionStorage.setItem('orderId', orderId);
sessionStorage.setItem('questionnaireSource', questionnaireSource); if (!campaignInfo) {
sessionStorage.setItem('campaignInfo', JSON.stringify(campaignInfo));
}
} }
} }
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',
...@@ -46,7 +46,7 @@ export class LiveComponent implements OnInit { ...@@ -46,7 +46,7 @@ export class LiveComponent implements OnInit {
questions: [{ questions: [{
questionId: '', questionId: '',
questionName: '', questionName: '',
options: [{ optionId: '', optionName: '', optionOrder: '', selected: '' }] options: [{optionId: '', optionName: '', optionOrder: '', selected: ''}]
}], }],
}; };
this.loginData = { this.loginData = {
...@@ -61,7 +61,7 @@ export class LiveComponent implements OnInit { ...@@ -61,7 +61,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;
} }
...@@ -173,7 +173,7 @@ export class LiveComponent implements OnInit { ...@@ -173,7 +173,7 @@ export class LiveComponent implements OnInit {
} }
}; };
// questionnaireSource 为 1 表示 自动评测 // questionnaireSource 为 1 表示 自动评测
if (sessionStorage.getItem('questionnaireSource') === 'double12') { if (!sessionStorage.getItem('campaignInfo')) {
if (!param || !param.survey.customerId || param.survey.customerId === 'null' || param.survey.customerId === 'undefined') { if (!param || !param.survey.customerId || param.survey.customerId === 'null' || param.survey.customerId === 'undefined') {
this.loginModalFlag = true; this.loginModalFlag = true;
return; return;
...@@ -211,7 +211,7 @@ export class LiveComponent implements OnInit { ...@@ -211,7 +211,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('发送成功');
...@@ -232,7 +232,7 @@ export class LiveComponent implements OnInit { ...@@ -232,7 +232,7 @@ export class LiveComponent implements OnInit {
} }
} }
// 注册 // 获取结果时登录
loginIn() { loginIn() {
this.commonService.compare({ this.commonService.compare({
'mobileNo': this.loginData.mobileNo, 'mobileNo': this.loginData.mobileNo,
...@@ -241,7 +241,7 @@ export class LiveComponent implements OnInit { ...@@ -241,7 +241,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;
......
...@@ -13,6 +13,9 @@ body { ...@@ -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, 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"; "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/* overflow: hidden; */ /* overflow: hidden; */
min-width: 320px;
max-width: 640px;
margin: 0 auto;
} }
img { img {
...@@ -142,6 +145,9 @@ ol li { ...@@ -142,6 +145,9 @@ ol li {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
background-color: #f6f6f6; background-color: #f6f6f6;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
/* padding-bottom: 15px; */ /* padding-bottom: 15px; */
} }
......
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