Commit 2813f6a9 by Sweet Zhang

ydLife初始化

parents
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
# YdLife
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.5.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ydLife": {
"root": "",
"sourceRoot": "src", // 源码根目录
"projectType": "application",
"prefix": "ydlife", // 使用`ng generate`命令时,自动为selector元数据的值添加的前缀名
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ydLife",
"index": "src/index.html", //指定首页文件,默认值是`index.html`
"main": "src/main.ts", // 指定应用的入门文件
"polyfills": "src/polyfills.ts", // 指定polyfill文件
"tsConfig": "src/tsconfig.app.json", // 指定tsconfig文件
"assets": [ // 记录资源文件夹,构建时复制到`outDir`指定的目录
"src/favicon.ico",
"src/assets"
],
"styles": [ // 引入全局样式,构建时会打包进来,常用于第三方库引入的样式
"src/assets/font/iconfont.css",
"src/assets/weui/weui.css",
"src/styles.scss"
],
"scripts": [],// 引入全局脚步,构建时会打包进来,常用于第三方库引入的脚本
"es5BrowserSupport": true
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"stage": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ydLife:build"
},
"configurations": {
"production": {
"browserTarget": "ydLife:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ydLife:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ydLife-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ydLife:serve"
},
"configurations": {
"production": {
"devServerTarget": "ydLife:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ydLife"
}
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
\ No newline at end of file
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to ydLife!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
\ No newline at end of file
File added
{
"name": "protest",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"core-js": "^2.5.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular/cli": "~7.3.5",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
import {AuthGuard} from './auth/auth.guard';
const routes: Routes = [
{path: '', redirectTo: '/my', pathMatch: 'full'},
{path: 'my', loadChildren: () => import('./my/my.module').then(mod => mod.MyModule), canLoad: [AuthGuard]},
{path: 'login', loadChildren: () => import('./auth/auth.module').then(mod => mod.AuthModule)},
{path: '**', component: PageNotFoundComponent},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {
}
<!--The content below is only a placeholder and can be replaced.-->
<router-outlet></router-outlet>
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'ydLife'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('ydLife');
});
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to ydLife!');
});
});
import {Component, OnInit} from '@angular/core';
import {AuthService} from "./auth/auth.service";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
constructor(private authService: AuthService) {
}
ngOnInit() {
this.authService.obtainToken().subscribe(res => {
if (res['success']) {
localStorage.setItem('lifeToken', res['data']['token']);
}
});
}
}
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
import {MyModule} from './my/my.module';
import {Router} from '@angular/router';
import {AuthModule} from './auth/auth.module';
import {HttpClientModule} from '@angular/common/http';
import {LifeCommonModule} from './common/life-common.module';
import {HashLocationStrategy, LocationStrategy} from "@angular/common";
@NgModule({
declarations: [
AppComponent,
PageNotFoundComponent
],
imports: [
BrowserModule,
MyModule,
AuthModule,
LifeCommonModule,
HttpClientModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
// // Diagnostic only: inspect router configuration
// constructor(router: Router) {
// // Use a custom replacer to display function names in the route configs
// const replacer = (key, value) => (typeof value === 'function') ? value.name : value;
//
// console.log('Routes: ', JSON.stringify(router.config, replacer, 2));
// }
// { provide: LocationStrategy, useClass: HashLocationStrategy }
}
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {LoginComponent} from './login/login.component';
const routes: Routes = [
{ path: '', component: LoginComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AuthRoutingModule { }
import { TestBed, async, inject } from '@angular/core/testing';
import { AuthGuard } from './auth.guard';
describe('AuthGuard', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [AuthGuard]
});
});
it('should ...', inject([AuthGuard], (guard: AuthGuard) => {
expect(guard).toBeTruthy();
}));
});
import {Injectable}from '@angular/core';
import {
CanActivate, Router,
ActivatedRouteSnapshot,
RouterStateSnapshot,
CanActivateChild,
NavigationExtras,
CanLoad, Route
} from '@angular/router';
import {AuthService}from './auth.service';
@Injectable({
providedIn: 'root',
})
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
constructor(private authService: AuthService, private router: Router) {
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
let url: string = state.url;
return this.checkLogin(url);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
return this.canActivate(route, state);
}
canLoad(route: Route): boolean {
let url = `/${route.path}`;
return this.checkLogin(url);
}
checkLogin(url: string): boolean {
const lifeCustomerInfo = localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
if (this.authService.isLoggedIn || (lifeCustomerInfo && lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId'])) {
return true;
}
// Store the attempted URL for redirecting
this.authService.redirectUrl = url;
// Navigate to the login page with extras
this.router.navigate(['/login']);
return false;
}
}
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AuthRoutingModule} from './auth-routing.module';
import {LoginComponent} from './login/login.component';
import {LifeCommonModule} from "../common/life-common.module";
@NgModule({
declarations: [LoginComponent],
imports: [
CommonModule,
LifeCommonModule,
AuthRoutingModule
]
})
export class AuthModule {
}
import { TestBed } from '@angular/core/testing';
import { AuthService } from './auth.service';
describe('AuthService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: AuthService = TestBed.get(AuthService);
expect(service).toBeTruthy();
});
});
import {Injectable} from '@angular/core';
import {Observable, of} from 'rxjs';
import {tap, delay} from 'rxjs/operators';
import {environment} from '../../environments/environment';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {retry} from 'rxjs/internal/operators';
@Injectable({
providedIn: 'root',
})
export class AuthService {
constructor(private http: HttpClient) {
}
private API = environment.BACKEND_URL_CONFIG_VALUE;
isLoggedIn = false;
// store the URL so we can redirect after logging in
redirectUrl: string;
// 经纪人登陆
login(loginInfo): Observable<any> {
const api = this.API + '/practitionerLogin';
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'X-Authorization': localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''
}
)
};
return this.http.post(api, JSON.stringify(loginInfo), httpOptions)
.pipe(
retry(3),
);
}
// 发送验证码
verificationCode(verticalCode) {
const url = this.API + '/verificationCode';
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'X-Authorization': localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''
}
)
};
return this.http
.post(url, JSON.stringify(verticalCode), httpOptions)
.pipe(
tap(response => response)
);
}
// 校验验证码
compare(compareCode) {
const url = this.API + '/checkVerificationCode';
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'X-Authorization': localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''
}
)
};
return this.http
.post(url, JSON.stringify(compareCode), httpOptions)
.pipe(
tap(response => response)
);
}
/**
* 获取TOKEN
*/
obtainToken() {
const url = this.API + '/authorize/obtainToken';
const ticketObj = {
ticket: 'life'
};
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json'
}
)
};
return this.http.post(url, JSON.stringify(ticketObj), httpOptions)
.pipe(
tap(response => {
return response;
})
);
}
}
<div class="page form_vcode js_show">
<div class="weui-form">
<div class="weui-form__text-area">
<img src="https://www.ydinsurance.cn/wp-content/uploads/2018/08/ydinsurance_logo.jpg" alt="">
</div>
<div class="weui-form__control-area">
<div class="weui-cells__group weui-cells__group_form">
<div class="weui-cells weui-cells_form">
<div class="weui-cell">
<div class="weui-cell__hd"><label class="weui-label">手机号</label></div>
<div class="weui-cell__bd">
<input class="weui-input" type="tel" maxlength="11" pattern="[0-9]*" placeholder="请输入手机号" name="mobileNo"
[(ngModel)]="userInfo.mobileNo">
</div>
</div>
<div class="weui-cell weui-cell_vcode">
<div class="weui-cell__hd"><label class="weui-label">验证码</label></div>
<div class="weui-cell__bd">
<input autofocus="" class="weui-input" type="tel" pattern="[0-9]*" id="js_input" placeholder="输入验证码"
maxlength="4" name="verificationCode" [(ngModel)]="userInfo.verificationCode">
</div>
<div class="weui-cell__ft">
<button class="weui-btn weui-btn_default weui-vcode-btn" (click)="verificationCode()">{{sendCodeHtml}}
</button>
</div>
</div>
</div>
</div>
</div>
<div class="weui-form__opr-area">
<a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" (click)="login()">确定</a>
</div>
</div>
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, OnDestroy, OnInit} from '@angular/core';
import {NavigationExtras, Router} from '@angular/router';
import {AuthService} from '../auth.service';
@Component({
selector: 'ydlife-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy {
MOBILE_REGEXP = /^(1)\d{10}$/;
sendCodeHtml: string = '获取验证码';
timer: any;
remainTimes: number = 60;
disabledSendBtn: boolean = false;
userInfo: any = {
mobileNo: null,
verificationCode: null
};
isNeedAlert: boolean;
dialogInfo: any;
constructor(public authService: AuthService, public router: Router) {
}
ngOnInit() {
}
ngOnDestroy() {
clearInterval(this.timer);
}
login() {
const compareInfo = {
mobileNo: this.userInfo.mobileNo,
verificationCode: this.userInfo.verificationCode,
expireTime: '3600'
};
if (this.MOBILE_REGEXP.test(this.userInfo.mobileNo) && this.userInfo.verificationCode && this.userInfo.verificationCode.length == 4) {
this.authService.compare(compareInfo).subscribe(res => {
if (res['success']) {
this.authService.login({mobileNo: this.userInfo.mobileNo}).subscribe((response) => {
if (response['success']) {
this.authService.isLoggedIn = true;
const lifeCustomerInfo = {...response.data, commonResult: null};
if (lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) {
localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo));
const redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
this.router.navigateByUrl(redirect);
} else {
this.openPopInfo('暂无查询资格');
}
} else {
this.openPopInfo(response['message']);
}
});
} else {
this.openPopInfo(res['message']);
}
});
} else {
this.openPopInfo('手机号或验证码不正确');
}
}
// 发送验证码
verificationCode() {
const verificationInfo = {
mobileNo: this.userInfo.mobileNo,
type: '1'
};
if (this.MOBILE_REGEXP.test(this.userInfo.mobileNo) && !this.disabledSendBtn) {
this.authService.verificationCode(verificationInfo).subscribe(res => {
if (res['success']) {
this.countDown();
} else {
this.openPopInfo(res['message']);
}
});
} else if (!this.MOBILE_REGEXP.test(this.userInfo.mobileNo)) {
this.openPopInfo('手机号不正确');
}
}
// 倒计时
countDown() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
this.remainTimes--;
this.sendCodeHtml = `${this.remainTimes}(S)`;
if (this.remainTimes <= 0) {
this.sendCodeHtml = '获取验证码';
this.remainTimes = 60;
this.disabledSendBtn = false;
clearInterval(this.timer);
}
}, 1000);
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: {value: message, align: 'center'},
footer: [{value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary'}],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
}
<div id="dialogs">
<!--BEGIN dialog1-->
<div class="js_dialog" id="iosDialog1">
<div class="weui-mask"></div>
<div class="weui-dialog">
<div class="weui-dialog__hd" *ngIf="dialogInfo.title"><strong
class="weui-dialog__title">{{dialogInfo.title}}</strong></div>
<div class="weui-dialog__bd" [ngStyle]="{'text-align':dialogInfo.content.align}">{{dialogInfo.content.value}}
</div>
<div class="weui-dialog__ft">
<a href="javascript:;" class="weui-dialog__btn" [ngClass]="footer.className"
*ngFor="let footer of dialogInfo.footer" (click)="sendInfo()">{{footer.value}}</a>
</div>
</div>
</div>
<!--END dialog1-->
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AlertComponent } from './alert.component';
describe('AlertComponent', () => {
let component: AlertComponent;
let fixture: ComponentFixture<AlertComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AlertComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AlertComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
@Component({
selector: 'ydlife-alert',
templateUrl: './alert.component.html',
styleUrls: ['./alert.component.scss']
})
export class AlertComponent implements OnInit {
@Input() dialogInfo: any;
@Output() popInfo = new EventEmitter();
constructor() {
this.dialogInfo = {
title: null,
content: {value: '弹窗内容', align: 'center'},
footer: [{value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary'}],
};
}
ngOnInit() {
}
sendInfo() {
this.popInfo.emit();
}
}
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AlertComponent} from './alert/alert.component';
import {FormsModule} from "@angular/forms";
@NgModule({
declarations: [AlertComponent],
imports: [
CommonModule,
FormsModule
],
exports: [
FormsModule,
AlertComponent
]
})
export class LifeCommonModule {
}
<div class="weui-panel">
<div class="weui-panel__hd">
<img src="https://www.zuihuibi.cn/wp-content/uploads/2013/03/关于我们2_01.jpg" alt="">
</div>
<div class="weui-panel__bd">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<a class="weui-cell weui-cell_access weui-cell_example" *ngFor="let menuItem of menuLists;" href="javascript:;" (click)="menuNavigation(menuItem)">
<div class="weui-cell__hd">
<i class="iconfont" [ngClass]="menuItem.icon"></i>
</div>
<div class="weui-cell__bd weui-cell_primary">
<p>{{menuItem.title}}</p>
</div>
<span class="weui-cell__ft"></span>
</a>
</div>
</div>
</div>
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
.weui-cell__hd {
i.iconfont {
background-image: -webkit-gradient(linear, left top, right bottom, from(#ff1c2b), to(#461415));
background-image: linear-gradient(to bottom right, #ff1c2b, #461415);
-webkit-background-clip: text;
color: transparent;
margin-right: 10px;
width: 35px;
height: 35px;
line-height: 35px;
text-align: center;
font-size: 26px;
}
}
.weui-panel__hd {
padding: 0;
width: 100%;
height: 115px;
img {
max-width: 100%;
height: 100%;
display: block;
}
}
@media(min-width: 768px) {
.weui-panel__hd {
height: 300px;
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MyCenterHomeComponent } from './my-center-home.component';
describe('MyCenterHomeComponent', () => {
let component: MyCenterHomeComponent;
let fixture: ComponentFixture<MyCenterHomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MyCenterHomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MyCenterHomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, OnInit} from '@angular/core';
import {Router} from "@angular/router";
@Component({
selector: 'ydlife-my-center-home',
templateUrl: './my-center-home.component.html',
styleUrls: ['./my-center-home.component.scss']
})
export class MyCenterHomeComponent implements OnInit {
menuLists: Array<any>;
isNeedAlert: boolean;
dialogInfo: any;
constructor(private router: Router) {
}
ngOnInit() {
this.menuLists = [
{no: 1, title: '重要公告', path: 'https://www.ydinsurance.cn/?page_id=13763', icon: 'icon-gonggao'},
{no: 2, title: '业绩资讯', path: '', icon: 'icon-icon-test'},
{no: 3, title: '我的客户', path: '', icon: 'icon-kehu'},
{no: 4, title: '保单查询', path: '', icon: 'icon-baodanyangben'},
{no: 5, title: '教育训练', path: '', icon: 'icon-jiaoyu'},
{no: 0, title: '退出登录', path: '', icon: 'icon-tuichu'},
];
}
// 菜单导航
menuNavigation(item) {
if (item.path) {
window.open(item.path);
} else if (item.no === 0) {
localStorage.removeItem('lifeCustomerInfo');
this.router.navigate(['/login']);
} else {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: {value: '即将开发,敬请期待!', align: 'center'},
footer: [{value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary'}],
};
}
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
}
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {MyCenterHomeComponent} from "./my-center-home/my-center-home.component";
import {AuthGuard} from "../auth/auth.guard";
const myRoutes: Routes = [
{
path: '',
component: MyCenterHomeComponent,
canActivate: [AuthGuard],
children: [
{
path: 'notice',
children: [
{ path: '', component: MyCenterHomeComponent }
]
}
]
}
];
@NgModule({
imports: [RouterModule.forChild(myRoutes)],
exports: [RouterModule]
})
export class MyRoutingModule {
}
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {MyRoutingModule} from './my-routing.module';
import {MyCenterHomeComponent} from './my-center-home/my-center-home.component';
import {LifeCommonModule} from "../common/life-common.module";
@NgModule({
declarations: [MyCenterHomeComponent],
imports: [
CommonModule,
LifeCommonModule,
MyRoutingModule
]
})
export class MyModule {
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageNotFoundComponent } from './page-not-found.component';
describe('PageNotFoundComponent', () => {
let component: PageNotFoundComponent;
let fixture: ComponentFixture<PageNotFoundComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageNotFoundComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageNotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ydlife-page-not-found',
templateUrl: './page-not-found.component.html',
styleUrls: ['./page-not-found.component.scss']
})
export class PageNotFoundComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1575361161159'); /* IE9 */
src: url('iconfont.eot?t=1575361161159#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAZQAAsAAAAAC/QAAAYBAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDXgqKPIgrATYCJAMcCxAABCAFhG0HZhsJChEVpBOT/TywbeF5rHWl97AIMyMjfSTtcz6Em/67XLAL2hIqLhMxZKYwEQmbw75DpmbQmbPv3gDYd64/wA/CR5ihPPvJoy8kXUfZS9ODbPtDP1lTXYpvKgyee1evGGCbmmymUKgJBUwKyAMaN2u3iGdxoeKcm7sDAcAQj1yQps3bWqEGDyYgOGP4EFc/qDMl+BY8gVqirFmVB/kUCqi5RdxNAJ/Y3yffoJioAQ4KCranjs5mA9EwpPtQSqVaqSedhy+2pwcwWAugAHIB8ACZX2uUQD0/1wpZ3d/kYQWghxoclCFdKCqUHBoaev+htLY2r2W9BHpuBxRY1wkCuq9/nhJUqMW4riElENJJBBRAKAoBDgglM9tFQ7EcBIveYwQo8KGU/XQJVXoVPQARIAcB8i+YuNQuScFBBQUIaEIRydTiOI3GaIw2uS1nFBWRaXbZY67rk0Sb1uMDJL+gs2bHqOf3RjiWuC1O7caT4KVTabotZ2KILDMGmGKZL127UY5RLF9Sp/BHrnFEwbskgiw/nU6mebYTMtBu9Xk2L49w2Howebt7R1OMSLx+kQg6y/UD0tbRBv82rWd6D4136bxL3DLbe6/kd0RFN0YZ253aLTsO3pXueR+471s3g/ne9Y7UR3/wZCy/6lSZ4ciZBMXq0z19W816ebtFsWRHxIY3IQ6zbmXsYiAW64LNBG+Wza82cyZG4bYsv9zLfrw523w6mqzYkYHz6zh4F/NslbbtZBM73Nu72uWNS5eJNv+WFcu7O5YQ22az1VeQb5p21kF+6clU/Uq3fkIweJcQxfr7THs5kKhcFSwzXHmYoJA3j/MctsjL1+yI2PGQ1NTYAwGrFMzy75KWmuHDxtRAoK6wFKvuHfD6DxLcyy2na/rtrmltkS3biRs+mSc1aJMCuWaYfZwvnHucGAw2OpW0+iUJ3gcJq7PrfFbv6NFB4YOaOcNcHTuO1zxjZeyZZnynTvZwu9UZNrGB7jZVf9evZ69xv8RPPPvrXdL119xkxUyWpqm3S1Ok7eop1q7K0NyqO9Qt9QCt8y5QnrReB93a+EYPLq/csygyQT354vMQ81/MZ2cRjXcWoEbQzkYYTaWpZo7+qMPdootD+UWdpkXFqE/Zc/NzNlizJyEcK9jLxGfcVNARbUgbUxtj6kwMSnYm25Ntzt6JxpukL7lptHOQ3VrT2cSzJm1fdK/4LrC835vUdmjY0PCab968YbfUn+d1emSOKWV1w9b8HqOR5nV82rHbpybNa/5Ew/YV367oW3dGvbN6U6xJjwujDZv6XJ54xbWpP1nQdWDB5j5HHKGJW9ALOdz1/URUllDjTeNToene6r2BHq2G7YoQTTdNTrK9+LS5TfXluJNNGl5uZGrW9NSfYnt00nDqcY/+p713rI5uX8D1GyPZCH+9Y2aT/vkxHWZ+mZj63+NNIacpbCi6GjPuj1jN0r1d78qC6fR0NqCBo/0Fe5X0ywOZnRBWtXBoZPMsYhs4ri2JbFbcBgPKUvr/3ZRzNeU5OkDg5jYXx7YZk6s0dGvbOLNIkVqOmQCAWvQs9y0AUIm7TUV9/w5T0r3cW6A2uo7Ow+F5UNNPZzY8utJ8ax9D3d/Uwpdj2BNtnUXEUYsHnPn5F2HG+qGwgH34OYepVPy0uWQCzSoM+EB9gQPAwAD8PKxheLE9sQgW4rcoFiNwUCEOKNRIRfG4XFBAQCkooUYDYMhBi7UFhGMsKAivAZCNeQgIjNgDHPQ4AxRG3ELxuOeggAXfgRJGQoHBTsI3KSCdoOLTm6BR9GAfEB3PJDT65DK/MeTRSMqxxH+UFD3QlHUx8oUzyjaWSNfQqhKQ8ASfaG84jgyLcI9Oy051uVQV1d1Q6XhaPaGJoFH0YB8QHc+kh9an0s9/Y8ijkZaGM9p/lBQnDk1ZA1BfwhnU8Fjy0zW0SvwENEjnCT6JHkceZFjqZ+rRadmt4V8uFRmIoMJy/+LpcR4HwMC2rSIcoYQnCqIkKqKGcnyOrsvnmzB5oZj01Rr2Zn6IxYLF+Rh4DsHwoY+q8JF3A3Z5tQIAAAA=') format('woff2'),
url('iconfont.woff?t=1575361161159') format('woff'),
url('iconfont.ttf?t=1575361161159') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1575361161159#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-tuichu:before {
content: "\e66a";
}
.icon-icon-test:before {
content: "\e619";
}
.icon-baodanyangben:before {
content: "\e6e5";
}
.icon-gonggao:before {
content: "\e734";
}
.icon-jiaoyu:before {
content: "\e60d";
}
.icon-kehu:before {
content: "\e622";
}
!function(s){var c,i='<svg><symbol id="icon-tuichu" viewBox="0 0 1024 1024"><path d="M952.532295 495.269967 767.686357 310.423005c-9.060353-9.060353-23.75196-9.060353-32.81743 0l-37.363979 37.362956c-9.060353 9.060353-9.060353 23.757077 0 32.81743l81.538061 81.538061L407.384337 462.141452c-12.812817 0-23.199375 10.386558-23.199375 23.199375l0 52.845579c0 12.815887 10.386558 23.204491 23.199375 23.204491l371.479593 0-81.538061 81.538061c-9.060353 9.060353-9.060353 23.757077 0 32.81743l37.368072 37.363979c9.060353 9.05933 23.75503 9.05933 32.815383 0l147.653875-147.653875c0-0.005117 0.005117-0.005117 0.005117-0.005117l37.368072-37.368072C961.592648 519.020904 961.592648 504.33032 952.532295 495.269967L952.532295 495.269967zM634.083499 64.754816l-499.803213 0c-38.441521 0-69.608358 31.166837-69.608358 69.608358l0 754.806002c0 38.446637 31.166837 69.608358 69.608358 69.608358l499.803213 0c38.441521 0 69.608358-31.16172 69.608358-69.608358l0-97.937566c0-12.811794-10.386558-23.204491-23.204491-23.204491l-50.29243 0c-12.812817 0-23.205515 10.392698-23.205515 23.204491l0 37.257555c0 34.328853 0 34.328853-34.791387 34.328853L195.199751 862.818017c-34.801621 0-34.801621 0.00614-34.801621-34.806737L160.39813 194.712657c0-34.900881-0.074701-34.802644 34.801621-34.802644l376.99726 0c34.798551 0 34.791387 0.285502 34.791387 34.329876l0 38.353516c0 12.815887 10.392698 23.204491 23.205515 23.204491l50.29243 0c12.817933 0 23.204491-10.388605 23.204491-23.204491L703.690834 134.363174C703.691857 95.921653 672.52502 64.754816 634.083499 64.754816L634.083499 64.754816zM634.083499 64.754816" ></path></symbol><symbol id="icon-icon-test" viewBox="0 0 1024 1024"><path d="M866.002035 478.07126c-16.551978 0-30.02585-13.604856-30.025851-30.331819V288.220331L549.311279 610.156554 336.915891 411.375232 180.300924 587.266218c-5.66093 6.39771-13.771655 10.063193-22.262026 10.063193-7.448646 0-14.582113-2.790556-20.094664-7.844666-5.958712-5.380544-9.434883-12.795421-9.865695-20.871353-0.413416-8.086166 2.301416-15.848966 7.647167-21.87317l197.349717-221.600027 212.362642 198.790532 253.213026-284.356326h-145.145752c-16.519232 0-29.958312-13.597693-29.958312-30.315447 0-16.71673 13.440104-30.322609 29.958312-30.322609h212.461903c2.052752 0 3.725858 0.471744 4.536317 0.694825l0.363273 0.099261 0.398066 0.058328c1.753947 0.239454 3.475148 0.521886 5.379521 1.257644 2.366907 0.943488 4.071735 2.119267 5.329379 2.979867l0.512676 0.314155c1.27504 0.686638 2.417049 1.348718 3.691066 2.540869l2.433422 2.656503c0.398066 0.554632 0.99363 1.457188 1.888 2.855025l0.346901 0.513699c0.811482 1.109264 1.737574 2.375094 2.466167 4.071736 0.794086 1.787716 1.108241 3.508917 1.242294 4.237511l0.14838 0.621147c0.595564 2.308579 1.091868 4.320399 1.142009 6.637164l0.115634 239.276618c0.001023 16.715707-13.43908 30.320563-29.958312 30.320563z m-707.964161 306.34513h707.964161c16.519232 0 29.958312 13.630439 29.958312 30.365588 0 16.700357-13.440104 30.283724-29.958312 30.283723h-707.964161c-16.551978 0-29.993105-13.582343-29.993104-30.283723 0.001023-16.73515 13.441127-30.365588 29.993104-30.365588z" ></path></symbol><symbol id="icon-baodanyangben" viewBox="0 0 1024 1024"><path d="M312.211233 527.986089h399.581627c13.240559 0 23.975041-10.734482 23.975041-23.97504 0-13.240559-10.734482-23.975041-23.975041-23.975041H312.211233c-13.240559 0-23.975041 10.734482-23.975041 23.975041 0 13.240559 10.734482 23.975041 23.975041 23.97504z m0-175.816284h399.581627c13.240559 0 23.975041-10.734482 23.975041-23.975041 0-13.240559-10.734482-23.975041-23.975041-23.975041H312.211233c-13.240559 0-23.975041 10.734482-23.975041 23.975041 0 13.241582 10.734482 23.975041 23.975041 23.975041z m175.815261 303.682487H312.211233c-13.240559 0-23.975041 10.734482-23.975041 23.975041s10.734482 23.975041 23.975041 23.975041h175.816284c13.240559 0 23.975041-10.734482 23.975041-23.975041s-10.735505-23.975041-23.976064-23.975041z m175.816285-47.950082c-48.550763 0-87.908142 39.35738-87.908143 87.908143 0 48.550763 39.35738 87.908142 87.908143 87.908142 48.550763 0 87.908142-39.35738 87.908142-87.908142 0-48.550763-39.35738-87.908142-87.908142-87.908143z m0 127.866203c-22.067598 0-39.95806-17.890462-39.958061-39.95806s17.890462-39.95806 39.958061-39.958061 39.95806 17.890462 39.95806 39.958061-17.889439 39.95806-39.95806 39.95806z m119.873158-607.367021H240.28304c-44.13622 0-79.916121 35.778878-79.916121 79.916121v607.364974c0 44.13622 35.779901 79.916121 79.916121 79.916121h543.432897c44.13622 0 79.916121-35.779901 79.91612-79.916121V208.317513c0-44.138266-35.779901-79.916121-79.91612-79.916121z m31.966039 687.282119c0 17.653055-14.312984 31.967062-31.967063 31.967062H240.28304c-17.653055 0-31.966039-14.312984-31.966039-31.967062V208.319559c0-17.653055 14.312984-31.967062 31.966039-31.967062h543.432897c17.653055 0 31.967062 14.312984 31.967062 31.967062v607.363952z" ></path></symbol><symbol id="icon-gonggao" viewBox="0 0 1024 1024"><path d="M494.4 171.2l-155.2 97.6C318.4 281.6 296 288 272 288h-76.8C131.2 288 80 339.2 80 401.6v225.6C80 696 136 752 204.8 752h89.6c24 0 46.4 6.4 67.2 19.2L496 852.8c9.6 6.4 20.8 9.6 33.6 9.6 35.2 0 64-28.8 64-64V225.6c0-11.2-3.2-24-9.6-33.6-20.8-30.4-59.2-40-89.6-20.8zM528 798.4l-134.4-81.6c-30.4-17.6-64-28.8-99.2-28.8h-89.6c-33.6 0-60.8-27.2-60.8-60.8V401.6c0-27.2 22.4-49.6 49.6-49.6H272c36.8 0 70.4-9.6 102.4-28.8l155.2-97.6v572.8zM912 480H720c-17.6 0-32 14.4-32 32s14.4 32 32 32h192c17.6 0 32-14.4 32-32s-14.4-32-32-32z m-12.8 272l-166.4-96c-16-9.6-35.2-3.2-43.2 11.2-9.6 16-3.2 35.2 11.2 43.2l166.4 96c16 9.6 35.2 3.2 43.2-11.2 9.6-14.4 4.8-33.6-11.2-43.2z m-168-384l166.4-96c16-9.6 20.8-28.8 11.2-43.2-9.6-16-28.8-20.8-43.2-11.2l-166.4 96c-16 9.6-20.8 28.8-11.2 43.2s28.8 20.8 43.2 11.2z" ></path></symbol><symbol id="icon-jiaoyu" viewBox="0 0 1024 1024"><path d="M899.357494 125.038268c-21.925896 0-29.234528 7.308632-29.234528 29.234528v730.863197c0 36.54316-29.234528 65.777688-65.777687 65.777687H234.271985c-36.54316 0-73.08632-29.234528-80.394951-65.777687v-73.08632c7.308632-36.54316 43.851792-58.469056 73.086319-58.469056h533.530134c21.925896 0 29.234528-7.308632 29.234528-29.234528V110.421004c0-65.777688-43.851792-109.629479-109.62948-109.629479H234.271985c-65.777688-7.308632-124.246743 36.54316-138.864007 109.629479v796.640885c14.617264 58.469056 65.777688 109.629479 124.246743 116.938111h577.381926c65.777688 0 116.938111-58.469056 131.555375-116.938111V146.964164c0-7.308632-21.925896-21.925896-29.234528-21.925896z" ></path></symbol><symbol id="icon-kehu" viewBox="0 0 1024 1024"><path d="M593.92 630.329s-34.133-9.102-43.236-13.653c-18.204-11.378-29.582-34.134-29.582-56.89 0-25.03 20.48-45.51 34.134-61.44 34.133-40.96 52.337-95.573 52.337-157.013 0-127.43-91.022-229.83-202.524-229.83S202.524 216.177 202.524 343.608c0 61.44 20.48 116.053 52.338 157.013 20.48 11.378 34.134 36.41 34.134 61.44 0 22.756-11.378 43.236-29.583 56.89v2.275c-2.275 0-4.55 2.275-4.55 2.275-11.379 6.827-22.756 11.378-36.41 11.378-86.47 29.582-159.289 75.093-202.524 131.982h2.275C6.827 782.792 2.276 800.996 2.276 819.2c0 54.613 45.51 100.124 102.4 100.124h600.746c59.165 0 104.676-43.235 104.676-100.124 0-22.756-9.102-43.236-20.48-61.44-43.236-56.889-111.502-100.124-195.698-127.431z m407.324 100.124c-38.684-47.786-97.848-88.746-172.942-111.502 0 0-29.582-6.827-38.684-11.378-15.93-11.377-25.031-29.582-25.031-50.062 0-22.755 18.204-40.96 29.582-52.338 29.582-36.409 47.787-84.195 47.787-138.809 0-111.502-79.645-204.8-179.77-204.8-15.928 0-31.857 2.276-45.51 6.827 34.133 50.062 52.337 109.227 52.337 175.218 0 70.542-25.03 138.809-68.266 195.698l-4.551 4.55v2.276c-4.552 4.551-11.378 11.378-13.654 18.205 0 2.275 0 2.275 2.276 2.275 4.55 2.276 11.378 4.551 18.204 4.551h2.276l9.102 4.552c93.298 29.582 172.942 81.92 225.28 147.91 22.756 29.583 36.409 63.716 36.409 100.125 0 20.48-4.551 36.409-11.378 54.613h65.991c52.338 0 93.298-38.684 93.298-88.746-2.276-25.031-9.102-43.236-22.756-59.165z m0 0" ></path></symbol></svg>',e=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var e=function(){document.removeEventListener("DOMContentLoaded",e,!1),c()};document.addEventListener("DOMContentLoaded",e,!1)}else document.attachEvent&&(n=c,o=s.document,l=!1,(i=function(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}t()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,t())});function t(){l||(l=!0,n())}var n,o,l,i}(function(){var c,e,t,n,o,l;(c=document.createElement("div")).innerHTML=i,i=null,(e=c.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",t=e,(n=document.body).firstChild?(o=t,(l=n.firstChild).parentNode.insertBefore(o,l)):n.appendChild(t))})}(window);
\ No newline at end of file
{
"id": "1541260",
"name": "YDLIFE",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "396487",
"name": "退出",
"font_class": "tuichu",
"unicode": "e66a",
"unicode_decimal": 58986
},
{
"icon_id": "1379993",
"name": "业绩",
"font_class": "icon-test",
"unicode": "e619",
"unicode_decimal": 58905
},
{
"icon_id": "1648078",
"name": "保单样本",
"font_class": "baodanyangben",
"unicode": "e6e5",
"unicode_decimal": 59109
},
{
"icon_id": "4933339",
"name": "公告",
"font_class": "gonggao",
"unicode": "e734",
"unicode_decimal": 59188
},
{
"icon_id": "7516895",
"name": "教育",
"font_class": "jiaoyu",
"unicode": "e60d",
"unicode_decimal": 58893
},
{
"icon_id": "11641888",
"name": "客户",
"font_class": "kehu",
"unicode": "e622",
"unicode_decimal": 58914
}
]
}
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="tuichu" unicode="&#58986;" d="M952.532295 316.730033 767.686357 501.576995c-9.060353 9.060353-23.75196 9.060353-32.81743 0l-37.363979-37.362956c-9.060353-9.060353-9.060353-23.757077 0-32.81743l81.538061-81.538061L407.384337 349.858548c-12.812817 0-23.199375-10.386558-23.199375-23.199375l0-52.845579c0-12.815887 10.386558-23.204491 23.199375-23.204491l371.479593 0-81.538061-81.538061c-9.060353-9.060353-9.060353-23.757077 0-32.81743l37.368072-37.363979c9.060353-9.05933 23.75503-9.05933 32.815383 0l147.653875 147.653875c0 0.005117 0.005117 0.005117 0.005117 0.005117l37.368072 37.368072C961.592648 292.979096 961.592648 307.66968 952.532295 316.730033L952.532295 316.730033zM634.083499 747.245184l-499.803213 0c-38.441521 0-69.608358-31.166837-69.608358-69.608358l0-754.806002c0-38.446637 31.166837-69.608358 69.608358-69.608358l499.803213 0c38.441521 0 69.608358 31.16172 69.608358 69.608358l0 97.937566c0 12.811794-10.386558 23.204491-23.204491 23.204491l-50.29243 0c-12.812817 0-23.205515-10.392698-23.205515-23.204491l0-37.257555c0-34.328853 0-34.328853-34.791387-34.328853L195.199751-50.818017c-34.801621 0-34.801621-0.00614-34.801621 34.806737L160.39813 617.287343c0 34.900881-0.074701 34.802644 34.801621 34.802644l376.99726 0c34.798551 0 34.791387-0.285502 34.791387-34.329876l0-38.353516c0-12.815887 10.392698-23.204491 23.205515-23.204491l50.29243 0c12.817933 0 23.204491 10.388605 23.204491 23.204491L703.690834 677.636826C703.691857 716.078347 672.52502 747.245184 634.083499 747.245184L634.083499 747.245184zM634.083499 747.245184" horiz-adv-x="1024" />
<glyph glyph-name="icon-test" unicode="&#58905;" d="M866.002035 417.92874c-16.551978 0-30.02585 13.604856-30.025851 30.331819V607.779669L549.311279 285.843446 336.915891 484.624768 180.300924 308.733782c-5.66093-6.39771-13.771655-10.063193-22.262026-10.063193-7.448646 0-14.582113 2.790556-20.094664 7.844666-5.958712 5.380544-9.434883 12.795421-9.865695 20.871353-0.413416 8.086166 2.301416 15.848966 7.647167 21.87317l197.349717 221.600027 212.362642-198.790532 253.213026 284.356326h-145.145752c-16.519232 0-29.958312 13.597693-29.958312 30.315447 0 16.71673 13.440104 30.322609 29.958312 30.322609h212.461903c2.052752 0 3.725858-0.471744 4.536317-0.694825l0.363273-0.099261 0.398066-0.058328c1.753947-0.239454 3.475148-0.521886 5.379521-1.257644 2.366907-0.943488 4.071735-2.119267 5.329379-2.979867l0.512676-0.314155c1.27504-0.686638 2.417049-1.348718 3.691066-2.540869l2.433422-2.656503c0.398066-0.554632 0.99363-1.457188 1.888-2.855025l0.346901-0.513699c0.811482-1.109264 1.737574-2.375094 2.466167-4.071736 0.794086-1.787716 1.108241-3.508917 1.242294-4.237511l0.14838-0.621147c0.595564-2.308579 1.091868-4.320399 1.142009-6.637164l0.115634-239.276618c0.001023-16.715707-13.43908-30.320563-29.958312-30.320563z m-707.964161-306.34513h707.964161c16.519232 0 29.958312-13.630439 29.958312-30.365588 0-16.700357-13.440104-30.283724-29.958312-30.283723h-707.964161c-16.551978 0-29.993105 13.582343-29.993104 30.283723 0.001023 16.73515 13.441127 30.365588 29.993104 30.365588z" horiz-adv-x="1024" />
<glyph glyph-name="baodanyangben" unicode="&#59109;" d="M312.211233 368.013911h399.581627c13.240559 0 23.975041 10.734482 23.975041 23.97504 0 13.240559-10.734482 23.975041-23.975041 23.975041H312.211233c-13.240559 0-23.975041-10.734482-23.975041-23.975041 0-13.240559 10.734482-23.975041 23.975041-23.97504z m0 175.816284h399.581627c13.240559 0 23.975041 10.734482 23.975041 23.975041 0 13.240559-10.734482 23.975041-23.975041 23.975041H312.211233c-13.240559 0-23.975041-10.734482-23.975041-23.975041 0-13.241582 10.734482-23.975041 23.975041-23.975041z m175.815261-303.682487H312.211233c-13.240559 0-23.975041-10.734482-23.975041-23.975041s10.734482-23.975041 23.975041-23.975041h175.816284c13.240559 0 23.975041 10.734482 23.975041 23.975041s-10.735505 23.975041-23.976064 23.975041z m175.816285 47.950082c-48.550763 0-87.908142-39.35738-87.908143-87.908143 0-48.550763 39.35738-87.908142 87.908143-87.908142 48.550763 0 87.908142 39.35738 87.908142 87.908142 0 48.550763-39.35738 87.908142-87.908142 87.908143z m0-127.866203c-22.067598 0-39.95806 17.890462-39.958061 39.95806s17.890462 39.95806 39.958061 39.958061 39.95806-17.890462 39.95806-39.958061-17.889439-39.95806-39.95806-39.95806z m119.873158 607.367021H240.28304c-44.13622 0-79.916121-35.778878-79.916121-79.916121v-607.364974c0-44.13622 35.779901-79.916121 79.916121-79.916121h543.432897c44.13622 0 79.916121 35.779901 79.91612 79.916121V687.682487c0 44.138266-35.779901 79.916121-79.91612 79.916121z m31.966039-687.282119c0-17.653055-14.312984-31.967062-31.967063-31.967062H240.28304c-17.653055 0-31.966039 14.312984-31.966039 31.967062V687.680441c0 17.653055 14.312984 31.967062 31.966039 31.967062h543.432897c17.653055 0 31.967062-14.312984 31.967062-31.967062v-607.363952z" horiz-adv-x="1024" />
<glyph glyph-name="gonggao" unicode="&#59188;" d="M494.4 724.8l-155.2-97.6C318.4 614.4 296 608 272 608h-76.8C131.2 608 80 556.8 80 494.4v-225.6C80 200 136 144 204.8 144h89.6c24 0 46.4-6.4 67.2-19.2L496 43.2c9.6-6.4 20.8-9.6 33.6-9.6 35.2 0 64 28.8 64 64V670.4c0 11.2-3.2 24-9.6 33.6-20.8 30.4-59.2 40-89.6 20.8zM528 97.6l-134.4 81.6c-30.4 17.6-64 28.8-99.2 28.8h-89.6c-33.6 0-60.8 27.2-60.8 60.8V494.4c0 27.2 22.4 49.6 49.6 49.6H272c36.8 0 70.4 9.6 102.4 28.8l155.2 97.6v-572.8zM912 416H720c-17.6 0-32-14.4-32-32s14.4-32 32-32h192c17.6 0 32 14.4 32 32s-14.4 32-32 32z m-12.8-272l-166.4 96c-16 9.6-35.2 3.2-43.2-11.2-9.6-16-3.2-35.2 11.2-43.2l166.4-96c16-9.6 35.2-3.2 43.2 11.2 9.6 14.4 4.8 33.6-11.2 43.2z m-168 384l166.4 96c16 9.6 20.8 28.8 11.2 43.2-9.6 16-28.8 20.8-43.2 11.2l-166.4-96c-16-9.6-20.8-28.8-11.2-43.2s28.8-20.8 43.2-11.2z" horiz-adv-x="1024" />
<glyph glyph-name="jiaoyu" unicode="&#58893;" d="M899.357494 770.961732c-21.925896 0-29.234528-7.308632-29.234528-29.234528v-730.863197c0-36.54316-29.234528-65.777688-65.777687-65.777687H234.271985c-36.54316 0-73.08632 29.234528-80.394951 65.777687v73.08632c7.308632 36.54316 43.851792 58.469056 73.086319 58.469056h533.530134c21.925896 0 29.234528 7.308632 29.234528 29.234528V785.578996c0 65.777688-43.851792 109.629479-109.62948 109.629479H234.271985c-65.777688 7.308632-124.246743-36.54316-138.864007-109.629479v-796.640885c14.617264-58.469056 65.777688-109.629479 124.246743-116.938111h577.381926c65.777688 0 116.938111 58.469056 131.555375 116.938111V749.035836c0 7.308632-21.925896 21.925896-29.234528 21.925896z" horiz-adv-x="1024" />
<glyph glyph-name="kehu" unicode="&#58914;" d="M593.92 265.671s-34.133 9.102-43.236 13.653c-18.204 11.378-29.582 34.134-29.582 56.89 0 25.03 20.48 45.51 34.134 61.44 34.133 40.96 52.337 95.573 52.337 157.013 0 127.43-91.022 229.83-202.524 229.83S202.524 679.823 202.524 552.392c0-61.44 20.48-116.053 52.338-157.013 20.48-11.378 34.134-36.41 34.134-61.44 0-22.756-11.378-43.236-29.583-56.89v-2.275c-2.275 0-4.55-2.275-4.55-2.275-11.379-6.827-22.756-11.378-36.41-11.378-86.47-29.582-159.289-75.093-202.524-131.982h2.275C6.827 113.208 2.276 95.004 2.276 76.8c0-54.613 45.51-100.124 102.4-100.124h600.746c59.165 0 104.676 43.235 104.676 100.124 0 22.756-9.102 43.236-20.48 61.44-43.236 56.889-111.502 100.124-195.698 127.431z m407.324-100.124c-38.684 47.786-97.848 88.746-172.942 111.502 0 0-29.582 6.827-38.684 11.378-15.93 11.377-25.031 29.582-25.031 50.062 0 22.755 18.204 40.96 29.582 52.338 29.582 36.409 47.787 84.195 47.787 138.809 0 111.502-79.645 204.8-179.77 204.8-15.928 0-31.857-2.276-45.51-6.827 34.133-50.062 52.337-109.227 52.337-175.218 0-70.542-25.03-138.809-68.266-195.698l-4.551-4.55v-2.276c-4.552-4.551-11.378-11.378-13.654-18.205 0-2.275 0-2.275 2.276-2.275 4.55-2.276 11.378-4.551 18.204-4.551h2.276l9.102-4.552c93.298-29.582 172.942-81.92 225.28-147.91 22.756-29.583 36.409-63.716 36.409-100.125 0-20.48-4.551-36.409-11.378-54.613h65.991c52.338 0 93.298 38.684 93.298 88.746-2.276 25.031-9.102 43.236-22.756 59.165z m0 0" horiz-adv-x="1024" />
</font>
</defs></svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
\ No newline at end of file
export const environment = {
production: true,
BACKEND_URL_CONFIG_VALUE: 'https://m.zuihuibi.cn/api',
ORIGINNAME: 'https://m.zuihuibi.cn',
BAIDU_TONGJI_CODE: '36b1eb7eec3b5dac9f97d887092b5b27'
};
/**
* Created by Sweet on 14/03/2018.
*/
export const environment = {
production: true,
BACKEND_URL_CONFIG_VALUE: 'https://mstage.zuihuibi.cn/api',
ORIGINNAME: 'https://mstage.zuihuibi.cn',
BAIDU_TONGJI_CODE: '84be9b9eaaca51048f32bb160ccad2e6'
};
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = {
production: false,
BACKEND_URL_CONFIG_VALUE: 'https://mdev.zuihuibi.cn/api',
ORIGINNAME: 'https://mdev.zuihuibi.cn',
BAIDU_TONGJI_CODE: 'e8fa107d82e0471d097d545225aeed64'
};
File added
<!doctype html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
<meta name="keywords" content="银盾保险在线,健康保险,出国旅行保险,户外运动保险,意外保险,国内旅行保险,留学游学保险,邮轮保险">
<meta name="description" content="银盾保险在线,提供全球多家知名保险公司产品网上投保,甄选并推荐最适合您的保险产品。"/>
<title>银盾保险经纪</title>
<base href="/">
<link rel="shortcut icon" href="https://www.ydinsurance.cn/wp-content/uploads/2018/04/favicon.gif"
type="image/x-icon"/>
</head>
<body>
<app-root></app-root>
</body>
</html>
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage/ydLife'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/* You can add global styles to this file, and also import other style files */
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"trailing-comma": false,
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
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