Commit 2a96dd52 by Sweet Zhang

问卷样式修改

parent cac833d5
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));
}
}
}
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;
......
......@@ -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; */
}
......
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