Commit 248cedd9 by sunchao

解决合并的dev和master时package-lock.json冲突

parents 505ea290 57a12a21
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
"jspdf": "^2.3.0", "jspdf": "^2.3.0",
"ng-zorro-antd-mobile": "^0.12.5", "ng-zorro-antd-mobile": "^0.12.5",
"ngx-echarts": "^3.2.0", "ngx-echarts": "^3.2.0",
"ngx-ueditor": "^2.1.3",
"node-sass": "^4.14.1",
"rxjs": "~6.3.3", "rxjs": "~6.3.3",
"save": "^2.4.0", "save": "^2.4.0",
"signature_pad": "^3.0.0-beta.4", "signature_pad": "^3.0.0-beta.4",
...@@ -39,7 +41,7 @@ ...@@ -39,7 +41,7 @@
"zone.js": "~0.8.26" "zone.js": "~0.8.26"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.13.0", "@angular-devkit/build-angular": "^0.13.10",
"@angular/cli": "^7.3.9", "@angular/cli": "^7.3.9",
"@angular/compiler-cli": "~7.2.0", "@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0", "@angular/language-service": "~7.2.0",
......
...@@ -26,6 +26,21 @@ export class LifeCommonService { ...@@ -26,6 +26,21 @@ export class LifeCommonService {
} }
/** /**
* url中的参数
* @param name
* @returns {any}
*/
getQueryString(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
const r = decodeURIComponent(window.location.search).substr(1).match(reg);
if (r != null) {
return r[2];
}
return null;
}
/**
* 检测操作系统 * 检测操作系统
*/ */
checkOs() { checkOs() {
...@@ -110,14 +125,16 @@ export class LifeCommonService { ...@@ -110,14 +125,16 @@ export class LifeCommonService {
this.metaService.updateTag({ content: description }, 'name=description'); this.metaService.updateTag({ content: description }, 'name=description');
} }
// 分享
wxShare(title: string, desc: string, link: string, imgUrl: string) { wxShare(title: string, desc: string, link: string, imgUrl: string) {
const _this = this;
const shareData = { const shareData = {
title: title, // 分享标题 title: title, // 分享标题
desc: desc, // 分享描述 desc: desc, // 分享描述
link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: imgUrl, // 分享图标 imgUrl: imgUrl, // 分享图标
success: () => { success: () => {
this.shareStatusPublish(0); _this.shareStatusPublish(0);
} }
}; };
wx.ready(() => { // 需在用户可能点击分享按钮前就先调用 wx.ready(() => { // 需在用户可能点击分享按钮前就先调用
...@@ -511,4 +528,38 @@ export class LifeCommonService { ...@@ -511,4 +528,38 @@ export class LifeCommonService {
const taxNo_reg = /[a-zA-Z0-9]{5,20}/; const taxNo_reg = /[a-zA-Z0-9]{5,20}/;
return taxNo_reg.test(val); return taxNo_reg.test(val);
} }
//截取字符串英文字母算半个字符
getTwenty(str, len) {
if (!str) return "";
if (len <= 0) return "";
var templen = 0;
for (var i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 255) {
templen += 2;
} else {
templen++;
}
if (templen == len) {
return str.substring(0, i + 1) + '...';
} else if (templen > len) {
return str.substring(0, i) + '...';
}
}
return str;
}
//判断是否为空
isEmpty(date) {
if (
date == null ||
date == undefined ||
date == "" ||
date == "null" ||
date == []
) {
return "暂无";
}
return date;
}
} }
<div id="js_article" class="rich_media" [ngStyle]="{'margin-bottom':deviceType == '3' ? '68px' : '10px'}">
<div class="rich_media_inner">
<div id="page-content" class="rich_media_area_primary">
<div class="rich_media_area_primary_inner">
<div id="img-content" class="rich_media_wrp">
<h2 class="rich_media_title" id="activity-name">
{{articleInfo?.title}}
</h2>
<div id="meta_content" class="rich_media_meta_list">
<span class="rich_media_meta rich_media_meta_nickname" id="profileBt" (click)="jumpTo()">
<a href="javascript:void(0);" id="js_name">{{articleInfo?.author}}</a>
</span>
<em id="publish_time"
class="rich_media_meta rich_media_meta_text">{{(articleInfo?.updatedAt).substr(0,10)}}</em>
</div>
<div class="agentInfoContainer" *ngIf="agentInfo" style="margin: 0 0 15px 0;">
<div style="display: flex">
<div class="portrait">
<img
[src]="agentInfo.headImagePath ? agentInfo.headImagePath : 'assets/images/icons/meng.png'" alt="经纪人头像"
class="img-circle">
</div>
<div class="agentInfo">
<p style="font-size: 18px;font-weight: 700; color: #333; letter-spacing: 1px;">{{this.agentInfo.agentName}}</p>
<p>{{this.agentInfo.insurerBranchName}}</p>
<p><a href="tel:{{this.agentInfo.mobileNo}}" style="color: #646464;">{{this.agentInfo.mobileNo}}</a></p>
</div>
</div>
<div class="qrcode">
<img [src]="agentInfo.qrCodePath ? agentInfo.qrCodePath : 'assets/images/online.jpg'" alt="经纪人二维码"
class="img-thumbnail">
</div>
</div>
<!-- <div class="rich_media_content " id="js_content" style="visibility: visible;" [ngStyle]="{'min-height':shareCode && !state ? '550px':'inherit'}"> -->
<div class="rich_media_content " id="js_content" style="visibility: visible;">
<div [innerHTML]="articleInfo?.fileContent | safeHtml">
</div>
</div>
</div>
</div>
</div>
</div>
<!--经纪人名片-->
<div class="agentInfoContainer" *ngIf="agentInfo">
<div style="display: flex">
<div class="portrait">
<img
[src]="agentInfo.headImagePath ? agentInfo.headImagePath : 'assets/images/icons/meng.png'" alt="经纪人头像"
class="img-circle">
</div>
<div class="agentInfo">
<p style="font-size: 18px;font-weight: 700; color: #333; letter-spacing: 1px;">{{this.agentInfo.agentName}}</p>
<p>{{this.agentInfo.insurerBranchName}}</p>
<p><a href="tel:{{this.agentInfo.mobileNo}}" style="color: #646464;">{{this.agentInfo.mobileNo}}</a></p>
</div>
</div>
<div class="qrcode">
<img [src]="agentInfo.qrCodePath ? agentInfo.qrCodePath : 'assets/images/online.jpg'" alt="经纪人二维码"
class="img-thumbnail">
</div>
</div>
</div>
<div class="shareCus" (click)="share()" *ngIf="this.lifeCommonService.checkDeviceType() == 3">
<span style="font-size: 20px;">分享</span>
</div>
<!--分享引导页-->
<div class="shareGuidePage" *ngIf="shareAbled" (click)="shareAbled=false">
<div class="guideBox">
<i class="iconfont icon-yindaojiantou"></i>
<div class="tips">
<p>请点击右上角菜单</p>
<p>分享给朋友</p>
</div>
</div>
</div>
<div #payForm hidden></div>
// .rich_media {
// padding-bottom: 68px;
// }
.rich_media_area_primary {
background-color: #fff;
}
.rich_media_area_primary {
padding: 20px 16px 12px;
padding: calc(20px + constant(safe-area-inset-top)) calc(16px + constant(safe-area-inset-right)) 12px calc(16px + constant(safe-area-inset-left));
padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
}
.rich_media_inner {
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
.rich_media_title {
font-size: 22px;
line-height: 1.4;
margin-bottom: 14px;
.rich_media_meta_list {
position: relative;
z-index: 1;
margin-bottom: 22px;
line-height: 20px;
font-size: 0;
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
}
.rich_media_meta_nickname {
position: relative;
}
.rich_media_meta {
display: inline-block;
vertical-align: middle;
margin: 0 10px 10px 0;
font-size: 15px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
a {
color: #576b95;
text-decoration: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
}
.rich_media_meta_list em {
font-style: normal;
}
.rich_media_meta_text {
color: rgba(0, 0, 0, 0.3);
}
.rich_media_meta {
display: inline-block;
vertical-align: middle;
margin: 0 10px 10px 0;
font-size: 15px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.agentInfoContainer {
display: flex;
justify-content: space-between;
padding: 8px;
box-shadow: 0 3px 12px 0 rgba(0, 0, 0, 0.2);
margin: 0 8px;
.portrait {
width: 80px;
margin-right: 15px;
}
.qrcode {
width: 75px;
}
}
.shareCus {
position: fixed;
width: 100%;
height: 48px;
line-height: 48px;
bottom: 0;
left: 0;
background: #ff9700;
text-align: center;
letter-spacing: 1px;
color: #fff;
font-size: 15px;
font-weight: bold;
}
.shareGuidePage {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
color: #fff;
display: flex;
justify-content: flex-end;
z-index: 100000;
background: rgba(0, 0, 0, 0.8);
.guideBox {
margin: 20px auto;
.iconfont {
position: absolute;
right: 8%;
font-size: 40px;
top: 2px;
font-weight: bold;
}
.tips {
margin-top: 60%;
p {
font-size: 18px;
margin-top: 10px;
text-align: center;
letter-spacing: 1px;
}
}
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ArticleDetailComponent } from './article-detail.component';
describe('ArticleDetailComponent', () => {
let component: ArticleDetailComponent;
let fixture: ComponentFixture<ArticleDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ArticleDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ArticleDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, OnInit, ElementRef, ViewChild} from '@angular/core';
import {MyService} from '../../my/my.service';
import {LifeCommonService} from '../../common/life-common.service';
import {Subscription} from "rxjs/index";
import {OnDestroy} from "@angular/core";
import {ActivatedRoute, Router} from "@angular/router";
import * as uuid from 'uuid';
declare const wx: any;
@Component({
selector: 'ydlife-article-detail',
templateUrl: './article-detail.component.html',
styleUrls: ['./article-detail.component.scss']
})
export class ArticleDetailComponent implements OnInit, OnDestroy {
@ViewChild('payForm') payForm: ElementRef;
articleInfo: any;
lifeCustomerInfo: any;
paymentForm: any;
customerId: number;
agentInfo: any;
shareAbled: boolean = false;
subscription: Subscription;
articleId: number;
shareCode: string;
articleShareCodeSaveInfo: any;
sharePractitionerInfo: any;
deviceType:string;
state:string;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, public router: Router, public activatedRoute: ActivatedRoute) {
// this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
// this.shareAbled = !(status == '0');
// });
}
ngOnInit() {
this.articleId = this.activatedRoute.snapshot.params['id'];
this.shareCode = this.activatedRoute.snapshot.queryParams['shareCode'];
this.state = this.lifeCommonService.getQueryString('state')
// if (this.activatedRoute.snapshot.queryParams['shareCode'] && this.state) {
// this.practitionerFileSharingList(null, this.shareCode);
// } else if(this.activatedRoute.snapshot.queryParams['shareCode']){
// this.articleTrackSave();
// }else{this.practitionerFileSharingList(this.articleId, null);
// }
if (this.activatedRoute.snapshot.queryParams['shareCode']) {
this.practitionerFileSharingList(null, this.shareCode);
this.articleTrackSave();
} else {
this.practitionerFileSharingList(this.articleId, null);
}
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
if (this.lifeCustomerInfo) {
this.customerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['customerId'];
this.agentInfo = {
headImagePath: this.lifeCustomerInfo.practitionerBasicInfo.headImagePath,
agentName: this.lifeCustomerInfo.practitionerBasicInfo.name,
insurerBranchName: this.lifeCustomerInfo.practitionerBasicInfo.insurerBranchName,
qrCodePath: this.lifeCustomerInfo.practitionerBasicInfo.qrCodePath,
mobileNo: this.lifeCustomerInfo.mobileNo
};
} else {
this.customerId = null;
}
this.deviceType = this.lifeCommonService.checkDeviceType();
}
ngOnDestroy() {
this.articleTrackSave();
sessionStorage.removeItem('articleTrackId');
}
// 从后台获取到获取微信code的URL
getWxUserInfo(trackId) {
this.myService.getWxUserInfo(trackId).subscribe(res => {
if (res['success']) {
this.paymentForm = res['data'].paymentForm;
this.getOrPost(this.paymentForm.action, this.paymentForm.param, this.paymentForm.charset, this.paymentForm.actionType);
}
})
}
// 点击分享
share() {
this.shareAbled = true;
this.articleShareCodeSave();
setTimeout(() => {
this.shareAbled = false;
}, 6000);
}
// 通过文章ID或者分享码查询文章详情
practitionerFileSharingList(id, shareCode) {
this.myService.practitionerFileSharingList({
shareCode: shareCode,
id: id,
practitionerFileShares: {pageNum: 1, pageSize: 5}
}).subscribe(res => {
this.articleInfo = res['data'].practitionerFileShares.list['0'];
this.sharePractitionerInfo = res['data'].sharePractitionerInfo;
if (this.sharePractitionerInfo) {
this.agentInfo = {
headImagePath: this.sharePractitionerInfo.headImagePath,
agentName: this.sharePractitionerInfo.name,
insurerBranchName: this.sharePractitionerInfo.insurerBranchName,
qrCodePath: this.sharePractitionerInfo.qrCodePath,
mobileNo: this.sharePractitionerInfo.mobileNo
};
}
});
}
// 保存文章code
articleShareCodeSave() {
this.articleShareCodeSaveInfo = {
itemId: this.articleId,
shareCode: uuid.v4(),
practitionerId: this.lifeCustomerInfo ? this.lifeCustomerInfo.practitionerId : this.sharePractitionerInfo.practitionerId,
customerId: this.lifeCustomerInfo ? this.lifeCustomerInfo.customerId : this.sharePractitionerInfo.customerId,
os: this.lifeCommonService.checkOs(),
channel: 1,
url: window.location.href
};
this.lifeCommonService.wxShare(this.articleInfo.title, this.lifeCommonService.getTwenty(this.articleInfo.digest,38), `${window.location.origin}${window.location.pathname}?shareCode=${this.articleShareCodeSaveInfo.shareCode}`, this.articleInfo.coverUrl);
this.myService.articleShareCodeSave(this.articleShareCodeSaveInfo).subscribe(res => {
// console.log(res);
});
}
// 保存客户痕迹:
// 有id就是出 没id就是进
articleTrackSave() {
const param = {
id: sessionStorage.getItem('articleTrackId') ? sessionStorage.getItem('articleTrackId') : null,
shareCode: this.shareCode,
nickname: null,
gender: null,
imagePath: null,
deviceType: this.lifeCommonService.checkDeviceType()
};
this.myService.articleTrackSave(param).subscribe(res => {
sessionStorage.setItem('articleTrackId', res['data']['id']);
if (this.lifeCommonService.getQueryString('state') != '1') {
this.getWxUserInfo(res['data']['id']);
}
})
}
// 判断是get请求还是post请求进行支付请求
getOrPost(action, params, charset, actionType) {
let url = '';
let paramHTML = '';
let hiddenContent = '';
if (actionType.toLowerCase() === 'get') {
url = action;
if (params) {
for (let i = 0; i < params.length; i++) {
url += '&' + params[i].name + '=' + params[i].value;
}
}
window.location.href = url;
} else if (actionType.toLowerCase() === 'post') {
if (params) {
for (let i = 0; i < params.length; i++) {
paramHTML += '<input type="text" value="' + params[i].value + '" name="' + params[i].name + '" hidden>'
}
}
hiddenContent +=
'<form action="' + action + '"method="post" accept-charset="' + charset + '" onsubmit="document.charset=\'' + charset + '\';">'
+ paramHTML
+ '<button type="submit" id="submit" hidden></button>'
+ '</form>';
this.payForm.nativeElement.innerHTML = hiddenContent;
document.getElementById('submit').click();
}
}
jumpTo(){
window.location.href = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU4MDYxMDA3NA==#wechat_redirect'
}
}
<div class="wrapper">
<ul style="background: #f6f6f6;">
<li>头像</li>
<li>昵称</li>
<li>性别</li>
<li>阅读时间</li>
</ul>
<ul *ngFor="let readerItem of readerList">
<li>
<div class="headimg">
<img src="{{getDefaultHead(readerItem.imagePath)}}" alt="头像">
</div>
</li>
<li>{{lifeCommonService.isEmpty(readerItem.nickName)}}</li>
<li>{{getGender(readerItem.gender)}}</li>
<li>{{readerItem.trackInTime.substr(5,11)}}</li>
</ul>
</div>
\ No newline at end of file
.wrapper{
ul{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
li{
height: 45px;
line-height: 45px;
color: #333333;
width: 28%;
text-align: center;
overflow: hidden;
.headimg{
width: 45px;
height: 45px;
text-align: center;
margin: 0 auto;
overflow: hidden;
border-radius: 50%;
img{
border-radius: 50%;
}
}
}
li:nth-child(1){
width: 18%;
}
li:nth-child(2){
text-align: left;
width: 30%;
}
li:nth-child(3){
width: 10%;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ArticleReadComponent } from './article-read.component';
describe('ArticleReadComponent', () => {
let component: ArticleReadComponent;
let fixture: ComponentFixture<ArticleReadComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ArticleReadComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ArticleReadComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from '../../my/my.service';
import { ActivatedRoute, Router } from "@angular/router";
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-article-read',
templateUrl: './article-read.component.html',
styleUrls: ['./article-read.component.scss']
})
export class ArticleReadComponent implements OnInit {
articleId:any;
practitionerId:any;
readerList:Array<any>;
constructor( public activatedRoute: ActivatedRoute,
private myService: MyService,
public lifeCommonService: LifeCommonService,
private router: Router) { }
ngOnInit() {
this.articleId = this.activatedRoute.snapshot.params['id'];
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.articleTrackQuery();
}
articleTrackQuery(){
this.myService.articleTrackQuery(this.practitionerId,this.articleId).subscribe((res)=>{
if(res['success']){
this.readerList = res['data']['articleTrackQueryInfos'];
}
})
}
//获取默认头像
getDefaultHead(headImagePath){
if(!headImagePath){
return 'assets/images/icons/meng.png';
}else{
return headImagePath;
}
}
//判断性别
getGender(sex){
if(!sex){
return '暂无'
}else{
return sex==1?'男':'女'
}
}
}
<div class="salesWrapper">
<ul class="tab">
<li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)"
[ngClass]="{selected:mdDropOptionId==titleItem.id}">
<div style="position: relative;">
<h3>{{titleItem.dropOptionName}}
</h3>
</div>
</li>
</ul>
<div class="article_wrapper">
<ul *ngIf="articleList?.length>0">
<li *ngFor="let articleItem of articleList" >
<div class="left" (click)="articleDetail(articleItem)">
<div class="title">{{articleItem.title}}</div>
<div class="digest">{{lifeCommonService.getTwenty(articleItem.digest,46)}}</div>
<div class="updateAt" style="font-size: 12px;color:#8a8a8a;margin-top: 3px;">{{articleItem.updatedAt}}</div>
</div>
<div class="right" (click)="articleDetail(articleItem)">
<img [src]="articleItem.coverUrl">
</div>
<div class="read">
<span>总阅读量:{{articleItem.totalNum}}</span>
<div (click)="whoRead(articleItem)">
<span>个人分享阅读量:{{articleItem.num}}</span>
<span class="iconfont icon-ar-r"></span>
</div>
</div>
</li>
<div class="more" *ngIf="paginationInfo?.pageNum<totalPage" (click)="lookMore()">
查看更多
</div>
</ul>
</div>
<div *ngIf="!articleList?.length" style="text-align: center;margin-top: 50px;">
暂无文章
</div>
</div>
.salesWrapper{
width: 100%;
height: 100%;
overflow: auto;
background: #f5f5f5;
.tab {
display: flex;
list-style: none;
justify-content: space-around;
background:#fff;
margin-bottom: 10px;
li {
line-height: 50px;
height: 50px;
text-align: center;
h3 {
font-weight: normal;
font-size: 16px;
}
}
li.selected {
border-bottom: 3px #e10d0d solid;
h3{
color: #e10d0d;
}
}
}
.article_wrapper{
background: #fff;
ul{
padding: 10px 15px;
li{
display: flex;
justify-content: space-between;
border-bottom: 1px #dbdbdb solid;
padding: 15px 0;
flex-wrap: wrap;
.right{
width: 40%;
margin-bottom: 10px;
img{
border-radius: 8px;
}
}
.left{
width: 55%;
margin-bottom: 10px;
.title{
color: #333333;
font-size: 16px;
margin-bottom: 8px;
}
.digest{
color: #666666;
width:100%;
}
}
.read{
font-size: 15px;
display: flex;
justify-content: space-between;
align-items: baseline;
width: 100%;
}
}
li:last-child{
border-bottom: 0;
}
}
.more{
margin-top: 10px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ArticleComponent } from './article.component';
describe('ArticleComponent', () => {
let component: ArticleComponent;
let fixture: ComponentFixture<ArticleComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ArticleComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ArticleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from '../../my/my.service';
import { LifeCommonService } from '../../common/life-common.service';
import { Router,ActivatedRoute } from '@angular/router';
import { ModalService, ToastService } from 'ng-zorro-antd-mobile';
@Component({
selector: 'ydlife-article',
templateUrl: './article.component.html',
styleUrls: ['./article.component.scss']
})
export class ArticleComponent implements OnInit {
titleList:Array<any>;
mdDropOptionId:any;
paginationInfo:any;
articleList:Array<any>;
totalPage:number;
practitionerId:any;
constructor(private myService:MyService,
public lifeCommonService:LifeCommonService,
private router:Router,
private _modal: ModalService,
private _toast: ToastService,
public activatedRoute: ActivatedRoute) {
this.paginationInfo = {
pageNum: 1,
pageSize: 5
}
}
ngOnInit() {
this.mdDropOptionId = this.activatedRoute.snapshot.params['mdDropOptionId'];
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.dropOptionsQuery();
}
dropOptionsQuery() {
this.myService.dropOptionsQuery({ code: "practitioner_sharing_file_type" })
.subscribe((res) => {
if (res["success"]) {
this.titleList =res["data"]["dropMasterInfoList"][0]["dropOptionsInfoList"];
if(this.mdDropOptionId!='null'){
this.selectTab(this.mdDropOptionId)
}else{
this.mdDropOptionId = this.titleList[0]['id'];
this.practitionerFileSharingList(null);
}
}
});
}
selectTab(id) {
this.mdDropOptionId = id;
this.router.navigate(['/article', this.mdDropOptionId], {replaceUrl: true});
this.paginationInfo = {
pageNum: 1,
pageSize: 5
}
this.practitionerFileSharingList(null);
}
//文章查询列表
practitionerFileSharingList(flag){
const param = {
mdDropOptionId:this.mdDropOptionId,
practitionerFileShares:this.paginationInfo,
practitionerId:this.practitionerId
}
this.myService.practitionerFileSharingList(param).subscribe((res)=>{
if(res['success']){
if(flag == null){
this.articleList = res['data']['practitionerFileShares']['list'];
}else{
this.articleList = this.articleList.concat(res['data']['practitionerFileShares']['list'])
}
this.paginationInfo.pageNum = res['data']['practitionerFileShares']['pageNum'];//当前页
this.totalPage = res['data']['practitionerFileShares']['pages'];//总页数
}else{
}
})
}
lookMore(){
this.paginationInfo.pageNum ++;
this.practitionerFileSharingList('flag');
}
//设置缓存并跳转到文章详情
articleDetail(articleItem){
this.router.navigate(['/articleDetail',articleItem.id]);
}
whoRead(articleItem){
if(articleItem.num > 0){
this.router.navigate(['/article_read',articleItem.id])
}else{
const toast = ToastService.show('暂时无人阅读您分享的文章!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
return;
}
}
}
...@@ -94,7 +94,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -94,7 +94,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 13, subtitle: '我的商机', icon: 'line', path: '', routerLink: 'business',showSubMenu:true }, { no: 13, subtitle: '我的商机', icon: 'line', path: '', routerLink: 'business',showSubMenu:true },
{ no: 9, subtitle: '执业证书', icon: 'card', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}?source=0`, routerLink: '',showSubMenu:true }, { no: 9, subtitle: '执业证书', icon: 'card', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}?source=0`, routerLink: '',showSubMenu:true },
{ no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true }, { no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
{ no: 7, subtitle: '文章分享', icon: 'article', path: `https://${window.location.host}/discovery`, routerLink: '' ,showSubMenu:true}, { no: 7, subtitle: '文章分享', icon: 'article', path: '', routerLink: 'article/null' ,showSubMenu:true},
{ no: 3, subtitle: '产品海报', icon: 'poster_p', path: '/salesDetail', routerLink: 'material',showSubMenu:true }, { no: 3, subtitle: '产品海报', icon: 'poster_p', path: '/salesDetail', routerLink: 'material',showSubMenu:true },
], ],
isShow: true isShow: true
...@@ -221,7 +221,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -221,7 +221,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
mobileNo: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['mobileNo'], mobileNo: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['mobileNo'],
time: time, time: time,
platform: platform, platform: platform,
type: type type: type,
isPersonal:0
} }
if (time == 1) { if (time == 1) {
this.leftWidth = '15%'; this.leftWidth = '15%';
...@@ -317,10 +318,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -317,10 +318,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
if (res['success']) { if (res['success']) {
this.isShow = true; this.isShow = true;
sessionStorage.setItem('isTeamleader', '1'); sessionStorage.setItem('isTeamleader', '1');
sessionStorage.setItem('subordinateSystemName', res['data']['subordinateSystemName']) sessionStorage.setItem('subordinateSystemName', res['data']['subordinateSystemName']);
} else { } else {
this.isShow = false; this.isShow = false;
sessionStorage.setItem('isTeamleader', '0') sessionStorage.setItem('isTeamleader', '0');
} }
}) })
} }
......
...@@ -49,6 +49,9 @@ import { SuggestionComponent } from './suggestion/suggestion.component'; ...@@ -49,6 +49,9 @@ import { SuggestionComponent } from './suggestion/suggestion.component';
import { EmployeeSalaryComponent } from './application-process/employee-salary/employee-salary.component'; import { EmployeeSalaryComponent } from './application-process/employee-salary/employee-salary.component';
import { HistoricalRankComponent } from './historical-rank/historical-rank.component'; import { HistoricalRankComponent } from './historical-rank/historical-rank.component';
import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component'; import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component';
import { ArticleComponent } from './article/article.component';
import { ArticleDetailComponent } from './article-detail/article-detail.component';
import { ArticleReadComponent } from './article-read/article-read.component';
const myRoutes: Routes = [ const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] }, { path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
...@@ -104,7 +107,10 @@ const myRoutes: Routes = [ ...@@ -104,7 +107,10 @@ const myRoutes: Routes = [
{ path: 'my_application',component:MyApplicationComponent,data: [{ title: '我的报聘' }],canActivate:[AuthGuard]}, { path: 'my_application',component:MyApplicationComponent,data: [{ title: '我的报聘' }],canActivate:[AuthGuard]},
{ path: 'suggestion',component:SuggestionComponent,data: [{ title: '问题反馈' }],canActivate:[AuthGuard]}, { path: 'suggestion',component:SuggestionComponent,data: [{ title: '问题反馈' }],canActivate:[AuthGuard]},
{ path: 'historical_rank', component: HistoricalRankComponent, canActivate: [AuthGuard] }, { path: 'historical_rank', component: HistoricalRankComponent, canActivate: [AuthGuard] },
{ path: 'team_area',component:TeamAreaPanelComponent, canActivate: [AuthGuard]} { path: 'team_area',component:TeamAreaPanelComponent, canActivate: [AuthGuard]},
{ path: 'article/:mdDropOptionId', component:ArticleComponent},
{ path: 'articleDetail/:id',component:ArticleDetailComponent},
{ path: 'article_read/:id',component:ArticleReadComponent,canActivate:[AuthGuard]}
]; ];
@NgModule({ @NgModule({
......
...@@ -59,16 +59,22 @@ import { SuggestionComponent } from './suggestion/suggestion.component'; ...@@ -59,16 +59,22 @@ import { SuggestionComponent } from './suggestion/suggestion.component';
import { EmployeeSalaryComponent } from './application-process/employee-salary/employee-salary.component'; import { EmployeeSalaryComponent } from './application-process/employee-salary/employee-salary.component';
import { HistoricalRankComponent } from './historical-rank/historical-rank.component'; import { HistoricalRankComponent } from './historical-rank/historical-rank.component';
import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component'; import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component';
import { ArticleComponent } from './article/article.component';
import { ArticleDetailComponent } from './article-detail/article-detail.component';
//富文本编辑器
import { UEditorModule } from 'ngx-ueditor';
import { ArticleReadComponent } from './article-read/article-read.component';
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent],
imports: [ imports: [
CommonModule, CommonModule,
LifeCommonModule, LifeCommonModule,
MyRoutingModule, MyRoutingModule,
NgZorroAntdMobileModule, NgZorroAntdMobileModule,
NgxEchartsModule, NgxEchartsModule,
SignaturePadModule SignaturePadModule,
UEditorModule
], ],
entryComponents: [ModalServiceComponent, ToastComponent], entryComponents: [ModalServiceComponent, ToastComponent],
providers: [ providers: [
......
...@@ -352,7 +352,7 @@ export class MyService { ...@@ -352,7 +352,7 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//PEP得分查询 //PEP得分查询
queryPEPScore(param){ queryPEPScore(param){
const url = this.ydapi + '/practitioner/queryPEPScore'; const url = this.ydapi + '/practitioner/queryPEPScore';
...@@ -598,4 +598,47 @@ export class MyService { ...@@ -598,4 +598,47 @@ export class MyService {
const url = this.ydapi + "/practitioner/canSeeSalaryList/" + params ; const url = this.ydapi + "/practitioner/canSeeSalaryList/" + params ;
return this.http.get(url); return this.http.get(url);
} }
//文章查询列表
practitionerFileSharingList(param){
const url = this.ydapi + '/agms/practitionerFileSharingList';
return this.http.post(url, JSON.stringify(param)).pipe((res)=>{
return res;
});
}
/**
* 获取微信用户的详细信息
*/
getWxUserInfo(trackId) {
const url = this.API + '/getWxUserInfo';
const cs = {trackId:trackId};
return this.http.post(url, cs).pipe((res)=>{
return res;
});
}
//保存文章code
articleShareCodeSave(param){
const url = this.ydapi + '/practitionerArticle/articleShareCodeSave';
return this.http.post(url, JSON.stringify(param)).pipe((res)=>{
return res;
});
}
//保存客户痕迹
articleTrackSave(param){
const url = this.ydapi + '/practitionerArticle/articleTrackSave';
return this.http.post(url, JSON.stringify(param)).pipe((res)=>{
return res;
});
}
//用户信息跟踪
articleTrackQuery(practitionerId,sharingId){
const url = this.ydapi + '/practitionerArticle/articleTrackQuery?practitionerId=' + practitionerId + '&sharingId=' + sharingId;
return this.http.get(url).pipe((res)=>{
return res;
});
}
} }
...@@ -55,7 +55,8 @@ export class SalesRankComponent implements OnInit { ...@@ -55,7 +55,8 @@ export class SalesRankComponent implements OnInit {
mobileNo: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['mobileNo'], mobileNo: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['mobileNo'],
time: time, time: time,
platform: platform, platform: platform,
type: type type: type,
isPersonal:1
} }
this.myService.rank(param).subscribe((res) => { this.myService.rank(param).subscribe((res) => {
if (res['success']) { if (res['success']) {
......
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
{{i+1}} {{i+1}}
</li> </li>
<li class="name">{{performanceItem.name}}</li> <li class="name">{{performanceItem.name}}</li>
<li class="fyp remark">¥{{performanceItem.fyp | number: "1.0-2"}}</li> <li class="fyp remark">¥{{performanceItem.fyp | number: "1.2-2"}}</li>
<li class="fyc remark">¥{{performanceItem.fyc | number: "1.0-2"}}</li> <li class="fyc remark">¥{{performanceItem.fyc | number: "1.2-2"}}</li>
<li class="count remark">{{performanceItem.count}}</li> <li class="count remark">{{performanceItem.count}}</li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file

16.9 KB | W: | H:

18.6 KB | W: | H:

src/assets/images/icons/meng.png
src/assets/images/icons/meng.png
src/assets/images/icons/meng.png
src/assets/images/icons/meng.png
  • 2-up
  • Swipe
  • Onion skin
/*弹出对话框页面样式组件
*/
/*reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
outline: 0;
font-size: 100%;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*module
*/
body {
background-color: #fff;
font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA;
color: #646464;
}
/*tab*/
.tabhead {
position: relative;
z-index: 10;
}
.tabhead span {
display: inline-block;
padding: 0 5px;
height: 30px;
border: 1px solid #ccc;
background: url("images/dialog-title-bg.png") repeat-x;
text-align: center;
line-height: 30px;
cursor: pointer;
*margin-right: 5px;
}
.tabhead span.focus {
height: 31px;
border-bottom: none;
background: #fff;
}
.tabbody {
position: relative;
top: -1px;
margin: 0 auto;
border: 1px solid #ccc;
}
/*button*/
a.button {
display: block;
text-align: center;
line-height: 24px;
text-decoration: none;
height: 24px;
width: 95px;
border: 0;
color: #838383;
background: url(../../themes/default/images/icons-all.gif) no-repeat;
}
a.button:hover {
background-position: 0 -30px;
}
\ No newline at end of file
/*可以在这里添加你自己的css*/
.edui-default .edui-colorpicker-nocolor {
border: none;
}
.rich_media_content .list-paddingleft-1, .rich_media_content .list-paddingleft-2, .rich_media_content .list-paddingleft-3 {
padding-left: 2.2em;
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" /> <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="viewport" content="width=device-width" />
<meta name="keywords" content="银盾保险在线,健康保险,出国旅行保险,户外运动保险,意外保险,国内旅行保险,留学游学保险,邮轮保险"> <meta name="keywords" content="银盾保险在线,健康保险,出国旅行保险,户外运动保险,意外保险,国内旅行保险,留学游学保险,邮轮保险">
<meta name="description" content="银盾保险在线,提供全球多家知名保险公司产品网上投保,甄选并推荐最适合您的保险产品。" /> <meta name="description" content="银盾保险在线,提供全球多家知名保险公司产品网上投保,甄选并推荐最适合您的保险产品。" />
<title>银盾保险经纪</title> <title>银盾保险经纪</title>
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
<link rel="stylesheet" href="./assets/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="./assets/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./assets/LCalendar/LCalendar.css"> <link rel="stylesheet" href="./assets/LCalendar/LCalendar.css">
<link rel="stylesheet" href="./assets/laydate/theme/default/laydate.css"> <link rel="stylesheet" href="./assets/laydate/theme/default/laydate.css">
<link rel="stylesheet" href="./assets/ueditor/themes/default/dialogbase.css">
<link rel="stylesheet" href="./assets/ueditor/themes/iframe.css">
<style> <style>
.index_footer{ .index_footer{
min-width: 320px; min-width: 320px;
...@@ -89,6 +91,16 @@ ...@@ -89,6 +91,16 @@
} }
var token = getToken(); var token = getToken();
function getQueryString(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
const r = decodeURIComponent(window.location.search).substr(1).match(reg);
if (r != null) {
return r[2];
}
return null;
}
var shareCode = getQueryString('shareCode');
const initialize = function () { const initialize = function () {
let loading = document.getElementById("adv"); let loading = document.getElementById("adv");
loading.style.display = 'block'; loading.style.display = 'block';
...@@ -104,7 +116,13 @@ ...@@ -104,7 +116,13 @@
//页面刷新的时候不出现 //页面刷新的时候不出现
if (window.name == "") { if (window.name == "") {
window.name = "isReload"; // 在首次进入页面时我们可以给window.name设置一个固定值 window.name = "isReload"; // 在首次进入页面时我们可以给window.name设置一个固定值
initialize(); if(shareCode){
let loading = document.getElementById("adv");
loading.style.display = 'none';
}else{
initialize();
}
} else if (window.name == "isReload") { } else if (window.name == "isReload") {
let loading = document.getElementById("adv"); let loading = document.getElementById("adv");
loading.style.display = 'none'; loading.style.display = 'none';
......
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