Commit 9349474d by zeyang

1.完成报聘相关页面及接口联调

parent 3008b676
......@@ -83,11 +83,18 @@ export class AppComponent implements OnInit, OnDestroy {
// 控制首页浮标显示与否和底部菜单
this.isShowIndexBtn = event.url.indexOf('/login') < 0;
this.iconShowFlag = !!localStorage.getItem('lifeCustomerInfo');
if((event.url.indexOf('/activityDetail') >=0 && event.url.indexOf('shareCode') >=0)
|| event.url.indexOf('/aiofp')>=0
){
this.iconShowFlag=false;
}
if(event.url.indexOf('/material/')>=0
|| event.url.indexOf('/inviter')>=0
|| event.url.indexOf('/register')>=0
|| event.url.indexOf('/invitees')>=0
|| event.url.indexOf('/video/')>=0
|| (event.url.indexOf('/activityDetail') >=0 && event.url.indexOf('shareCode') >=0)
|| event.url.indexOf('/aiofp')>=0
){
this.isShowIndexBtn = false;
}
......
<div class="content" id="content">
<div class="imgBox">
<img src="assets/images/activity/activityTitle.png">
<div class="agentBox" *ngIf="agentInfo">
<div class="headImagePath">
<img style="width: 40px;border-radius: 200px;" [src]="agentInfo.headImagePath ? agentInfo.headImagePath : 'assets/images/icons/meng.png'" alt="经纪人头像">
</div>
<div class="agentName">
<span style="color:#ff9700">{{agentInfo.agentName}}</span>邀请您一起
</div>
</div>
<div id="tabBox" class="tabBox">
<div *ngFor="let item of tabList" [ngClass]="item.select?'tabItemXz':'tabItem'" (click)="selectTab(item)">
{{item.name}}
</div>
</div>
</div>
<div id="tab1" class="imgBox">
<img src="assets/images/activity/activity01.png">
<div class="buttonBox" (click)="c_aiofp()">
点击了解AIOFP
</div>
</div>
<div id="tab2" class="imgBox"><img src="assets/images/activity/activity02.png"></div>
<div id="tab3" class="imgBox"><img src="assets/images/activity/activity03.png"></div>
<div id="tab4" class="imgBox"><img src="assets/images/activity/activity04.png"></div>
<div id="tab5" class="imgBox"><img src="assets/images/activity/activity05.png"></div>
<div id="tab6" class="imgBox"><img src="assets/images/activity/activity06.png"></div>
<div class="imgBox">
<img src="assets/images/activity/activity07.png">
<div (click)="c_guanw()" class="buttonBox" style="left: 8.5%;bottom:20%;padding: 2px 10px;">
银盾官网了解更多
</div>
</div>
<div class="shareBox" id="shareBox">
<div (click)="share()" style="color: #000;text-align: center;">
<span style="font-size: 20px;" class="iconfont icon-zhuanfaxian" ></span>
<div >
分享
</div>
</div>
<div class="knowButtonBox">
<div class="knowButton" (click)="isShowSubmitBox=true">
了解考察
</div>
</div>
</div>
<div class="submitBox" *ngIf="isShowSubmitBox">
<div class="closeButton">
<span (click)="isShowSubmitBox=false" style="font-size: 24px;color: #b0b0b0;" class="iconfont icon-guanbi" ></span>
</div>
<div class="submitBoxTitle">了解考察</div>
<div class="submitBoxContent">
<div class="line">
<div class="lineLabel">姓名</div>
<div class="lineValue"><input [(ngModel)]="reName" style="border: 0px;background-color: rgba(246, 246, 246, 1);text-align: right;width: 100%;" type="text" placeholder="请输入姓名" ></div>
</div>
<div class="line">
<div class="lineLabel">电话</div>
<div class="lineValue"><input [(ngModel)]="mobileNo" style="border: 0px;background-color: rgba(246, 246, 246, 1);text-align: right;width: 100%;" type="number" placeholder="请输入手机号"></div>
</div>
</div>
<div class="submitButtonBox">
<div class="submitButton" (click)="c_submit()" >
提交申请
</div>
</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>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<div #payForm hidden></div>
.content{
background-color: #071999;
padding-bottom: 50px;
position: relative;
height: 100%;
overflow: auto;
.submitBox{
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
background-color: #fff;
width: 100%;
font-size: 18px;
color: #000;
border-radius:15px 15px 0 0;
.closeButton{
text-align: right;
padding-top: 7px;
padding-right: 10px;
margin-bottom: -10px;
}
.submitBoxTitle{
border-bottom: 1px solid #eee;
padding: 0 20px 2px;
}
.submitBoxContent{
padding:15px 20px 0;
font-size: 16px;
.line{
background-color: rgba(246, 246, 246, 1);
border-radius: 10px;
padding:10px 15px;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
.lineValue{
flex-grow: 0.8;
}
input::placeholder {
font-size: 16px;
}
}
}
.submitButtonBox{
width: 100%;
.submitButton{
text-align: center;
color: #fff;
font-size: 20px;
background: linear-gradient(90deg, rgba(224, 168, 98, 1) 0%, rgba(228, 176, 110, 1) 52.08%, rgba(224, 168, 98, 1) 100%);
padding: 8px 0;
border-radius: 200px;
margin:20px 50px 40px ;
}
}
}
.shareBox{
z-index: 99;
position: fixed;
bottom: 0;
left: 0;
display: flex;
background-color: #fff;
width: 100%;
padding: 5px 25px;
align-items: center;
.knowButtonBox{
flex-grow: 1;
text-align: center;
color: #fff;
font-size: 20px;
background: linear-gradient(90deg, rgba(224, 168, 98, 1) 0%, rgba(228, 176, 110, 1) 52.08%, rgba(224, 168, 98, 1) 100%);
padding: 8px 0;
border-radius: 200px;
margin-left: 30px;
}
}
.tabBox{
display: flex;
flex-direction: row;
align-items: center;
overflow-x: scroll;
width: 100%;
padding: 2% 3.2%;
position: absolute;
bottom: 4%;
}
.tabBoxXd{
display: flex;
flex-direction: row;
align-items: center;
overflow-x: scroll;
width: 100%;
padding:2% 3.2% 4% 3.2%;
position: fixed;
top: 0%;
background-color: #071999;
z-index: 9999;
}
.tabBox::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.tabBoxXd::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.tabItem{
margin: 0 0.5%;
color: #736253;
background-color: #fff;
border-radius: 200px;
flex:0 0 70px;
text-align: center;
padding: 4px 0;
}
.tabItemXz{
position: relative;
margin: 0 0.5%;
color: #fff;
background-color: #e0a862;
border-radius: 200px;
flex:0 0 70px;
text-align: center;
padding: 4px 0;
}
.tabItemXz::before{
position: absolute;
content: "";
width: 0;
height: 0;
left:40%;
bottom:-45%;
border: 0.5rem solid transparent;
border-top-color: #e0a862;
}
.imgBox{
position: relative;
width: 100%;
.agentBox{
position: absolute;
right: 3%;
top: 5%;
display: flex;
align-items: center;
.agentName{
background-color: #fff;
color: #000;
font-size: 14px;
padding: 0px 10px 0 15px;
border-radius:0 20px 20px 0;
height: 25px;
line-height: 25px;
z-index: 99;
}
.headImagePath{
border-radius: 200px;
overflow: hidden;
background-color: #fff;
padding: 4px;
margin-right:-15px;
z-index: 999;
}
}
.buttonBox{
position: absolute;
bottom: 5%;
background: linear-gradient(90deg, rgba(224, 168, 98, 1) 0%, rgba(228, 176, 110, 1) 52.08%, rgba(224, 168, 98, 1) 100%);
color: #fff;
left: 28%;
padding: 5px 25px;
border-radius: 200px;
font-size: 16px;
letter-spacing: 1.5px;
animation: scale 1s linear forwards infinite;
}
}
}
@keyframes scale {
0% {
transform: scale(1);
}
50% {
transform: scale(1.15);
}
100% {
transform: scale(1);
}
}
.shareCus {
position: fixed;
width: 100%;
height: 48px;
line-height: 48px;
bottom: 70px;
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 { ActivityDetailComponent } from './activity-detail.component';
describe('ActivityDetailComponent', () => {
let component: ActivityDetailComponent;
let fixture: ComponentFixture<ActivityDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ActivityDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ActivityDetailComponent);
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-activity-detail',
templateUrl: './activity-detail.component.html',
styleUrls: ['./activity-detail.component.scss']
})
export class ActivityDetailComponent implements OnInit, OnDestroy {
@ViewChild('payForm') payForm : ElementRef;//控制弹框
toastDialog: boolean;
toastInfo: any;
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;
offsetTop:any;
scrollTop:any;
tab1DistanceTop:any;
tab2DistanceTop:any;
tab3DistanceTop:any;
tab4DistanceTop:any;
tab5DistanceTop:any;
tab6DistanceTop:any;
//是否显示提交申请盒子
isShowSubmitBox:any = false;
//姓名
reName : string;
//电话
mobileNo : number;
constructor(private myService : MyService, public lifeCommonService : LifeCommonService, public router : Router, public activatedRoute : ActivatedRoute) {
// this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
// this.shareAbled = !(status == '0');
// });
}
public tabList = [
{ key: 'tab1', name: '项目介绍', link: '/', select: true, },
{ key: 'tab2', name: '发展路径', link: '/', select: false, },
{ key: 'tab3', name: '创业收获', link: '/', select: false, },
{ key: 'tab4', name: '创业投入', link: '/', select: false, },
{ key: 'tab5', name: '创业付出', link: '/', select: false, },
{ key: 'tab6', name: '银盾支持', link: '/', select: false, },
]
ngOnInit() {
this.articleId = this.activatedRoute.snapshot.params['id'];
this.shareCode = this.lifeCommonService.getQueryString('shareCode');
this.state = this.lifeCommonService.getQueryString('state');
//检测浏览器刷新
window.onbeforeunload = () => {
//清除sessionStorage值
sessionStorage.removeItem('articleTrackId')
}
if (this.shareCode) {
this.practitionerFileSharingList(null, this.shareCode);
if (!this.state) {
this.articleTrackSave();
}
} else {
document.getElementById("shareBox").style.bottom=70+'px';
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();
let windowH = window.outerHeight;
document.getElementById("content").style.height=windowH+'px';
let bindhandleScroll = this.handleScroll.bind(this);
document.addEventListener('scroll',bindhandleScroll, true);
}
ngOnDestroy() {
if (this.shareCode && this.state == '1') {
this.articleTrackSave();
sessionStorage.removeItem('articleTrackId');
}
document.removeEventListener('scroll', this.handleScroll, true);
}
handleScroll() {
// this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
this.scrollTop=document.getElementById("content").scrollTop;
if(!this.offsetTop){
this.offsetTop = document.getElementById("tabBox").offsetTop;
}
if (this.scrollTop > this.offsetTop) {
document.getElementById("tabBox").classList.add('tabBoxXd');
document.getElementById("tabBox").classList.remove('tabBox');
} else {
document.getElementById("tabBox").classList.add('tabBox');
document.getElementById("tabBox").classList.remove('tabBoxXd');
}
//获取六张图片的距离顶部高度
if(!this.tab1DistanceTop){
this.tab1DistanceTop = document.getElementById("tab1").offsetTop;
}
if(!this.tab2DistanceTop){
this.tab2DistanceTop = document.getElementById("tab2").offsetTop;
}
if(!this.tab3DistanceTop){
this.tab3DistanceTop = document.getElementById("tab3").offsetTop;
}
if(!this.tab4DistanceTop){
this.tab4DistanceTop = document.getElementById("tab4").offsetTop;
}
if(!this.tab5DistanceTop){
this.tab5DistanceTop = document.getElementById("tab5").offsetTop;
}
if(!this.tab6DistanceTop){
this.tab6DistanceTop = document.getElementById("tab6").offsetTop;
}
if (this.scrollTop+300 >= this.tab1DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[0].select = true;
}
if (this.scrollTop+300 >= this.tab2DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[1].select = true;
}
if (this.scrollTop+300 >= this.tab3DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[2].select = true;
}
if (this.scrollTop+300 >= this.tab4DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[3].select = true;
}
if (this.scrollTop+300 >= this.tab5DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[4].select = true;
}
if (this.scrollTop+300 >= this.tab6DistanceTop) {
this.tabList.map(item => item.select = false);
this.tabList[5].select = true;
}
}
c_guanw(){
location.href='https://www.ydinsurance.cn/';
}
c_submit(){
if(!this.reName){
console.log(1);
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg:'请输入姓名!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.lifeCommonService.mobileNoValid(this.mobileNo)) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '输入手机号码错误',
timeout: 3000,
align: 'center'
};
return;
}
let param = {
name:this.reName,
mobileNo:this.mobileNo,
remark:'互联网新增员信息',
practitionerId:this.sharePractitionerInfo.practitionerId
}
this.myService.wxUrlRecruit(param).subscribe(res => {
if (res['success']) {
this.isShowSubmitBox=false;
this.reName='';
this.mobileNo=null;
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '感谢您的关注,我们会尽快与您联系',
timeout: 3000,
align: 'center'
};
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
return;
}
})
}
c_aiofp(){
document.removeEventListener('scroll', this.handleScroll, true);
this.router.navigate(['/aiofp']);
}
// 从后台获取到获取微信code的URL
getWxUserInfo(trackId:any) {
this.myService.getWxUserInfo(trackId+'&type=activity').subscribe(res => {
if (res['success']) {
this.paymentForm = res['data'].paymentForm;
this.getOrPost(this.paymentForm.action, this.paymentForm.param, this.paymentForm.charset, this.paymentForm.actionType);
}
})
}
selectTab(item) {
document.getElementById(item.key).scrollIntoView({ behavior: 'smooth',block:'center' });
}
// 点击分享
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 },
itemType: '2'
}).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.agentInfo.agentName+this.articleInfo.digest, 38), `${window.location.origin}${window.location.pathname}?shareCode=${this.articleShareCodeSaveInfo.shareCode}`, this.articleInfo.coverUrl);
this.myService.articleShareCodeSave(this.articleShareCodeSaveInfo).subscribe(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'
}
}
\ No newline at end of file
<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="activityList?.length>0">
<li *ngFor="let activityItem of activityList" >
<div class="left" (click)="activityDetail(activityItem)">
<div class="title">{{activityItem.title}}</div>
<div class="digest">{{lifeCommonService.getTwenty(activityItem.digest,46)}}</div>
<div class="updateAt" style="font-size: 12px;color:#8a8a8a;margin-top: 3px;">{{activityItem.updatedAt}}</div>
</div>
<div class="right" (click)="activityDetail(activityItem)">
<img [src]="activityItem.coverUrl">
</div>
<div class="read">
<span>总阅读量:{{activityItem.totalNum}}</span>
<div (click)="whoRead(activityItem)">
<span>个人分享阅读量:{{activityItem.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="!activityList?.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 { ActivityComponent } from './activity.component';
describe('ActivityComponent', () => {
let component: ActivityComponent;
let fixture: ComponentFixture<ActivityComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ActivityComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ActivityComponent);
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-activity',
templateUrl: './activity.component.html',
styleUrls: ['./activity.component.scss']
})
export class ActivityComponent implements OnInit {
titleList:Array<any>;
mdDropOptionId:any;
paginationInfo:any;
activityList: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_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(['/activity', 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,
itemType:'2'
}
this.myService.practitionerFileSharingList(param).subscribe((res)=>{
if(res['success']){
if(flag == null){
this.activityList = res['data']['practitionerFileShares']['list'];
}else{
this.activityList = this.activityList.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');
}
//设置缓存并跳转到文章详情
activityDetail(activityItem){
this.router.navigate(['/activityDetail',activityItem.id]);
}
whoRead(activityItem){
if(activityItem.num > 0){
this.router.navigate(['/activity_read',activityItem.id])
}else{
const toast = ToastService.show('暂时无人阅读您分享的文章!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
return;
}
}
}
<div class="content" id="content">
<div class="imgBox">
<img src="assets/images/activity/aiofp.png">
</div>
</div>
.content{
background-color: #071999;
padding-bottom: 50px;
overflow: auto;
.imgBox{
position: relative;
width: 100%;
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AiofpComponent } from './aiofp.component';
describe('AiofpComponent', () => {
let component: AiofpComponent;
let fixture: ComponentFixture<AiofpComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AiofpComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AiofpComponent);
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 { OnDestroy } from "@angular/core";
import { Router } from "@angular/router";
@Component({
selector: 'ydlife-aiofp',
templateUrl: './aiofp.component.html',
styleUrls: ['./aiofp.component.scss']
})
export class AiofpComponent implements OnInit, OnDestroy {
constructor(private myService : MyService, public lifeCommonService : LifeCommonService, public router : Router,) {
// this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
// this.shareAbled = !(status == '0');
// });
}
ngOnInit() {
let windowH = window.outerHeight;
document.getElementById("content").style.height=windowH+'px';
}
ngOnDestroy() {
}
}
\ No newline at end of file
......@@ -67,7 +67,8 @@ export class MoreFeaturesComponent implements OnInit,OnDestroy {
{no:5,name:'产品海报',icon:'productPoster',link:'/material',path:'',isOpen:true,isShow:true},
{no:6,name:'文章分享',icon:'articleShare',link:'/article/null',path:'',isOpen:true,isShow:true},
{no:7,name:'AI保险医生',icon:'aiDoctor',link:'',path:`https://${window.location.host}/questionnaire/#/index?campaign=AIRobot&task=AItask1&customerId=${this.lifeCustomerInfo.customerId}`,isOpen:true,isShow:true},
{no:36,name:'遗嘱服务',icon:'will_grey',link:'',path:'',isOpen:false},
// {no:36,name:'遗嘱服务',icon:'will_grey',link:'',path:'',isOpen:false},
{no:37,name:'活动分享',icon:'articleShare',link:'/activity/null',path:'',isOpen:true,isShow:true},
]},
{key:'01',title:'保单服务',subItems:[
{no:8,name:'我的保单',icon:'policyLists',link:'/salesDetail',path:'',isOpen:true,isShow:true},
......
......@@ -50,6 +50,10 @@ import { EmployeeSalaryComponent } from './application-process/employee-salary/e
import { HistoricalRankComponent } from './historical-rank/historical-rank.component';
import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component';
import { ArticleComponent } from './article/article.component';
import { ActivityComponent } from './activity/activity.component';
import { ActivityDetailComponent } from './activity-detail/activity-detail.component';
import { AiofpComponent } from './aiofp/aiofp.component';
import { ArticleDetailComponent } from './article-detail/article-detail.component';
import { ArticleReadComponent } from './article-read/article-read.component';
import { SalaryDetailComponent } from './salary-detail/salary-detail.component';
......@@ -151,8 +155,11 @@ const myRoutes: Routes = [
{ path: 'suggestion',component:SuggestionComponent,data: [{ title: '问题反馈' }],canActivate:[AuthGuard]},
{ path: 'historical_rank', component: HistoricalRankComponent, canActivate: [AuthGuard] ,data:[{title:'往期历史'}]},
{ path: 'team_area',component:TeamAreaPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}]},
{ path: 'article/:mdDropOptionId', component:ArticleComponent,data:[{title:'文章分享'}]},
{ path: 'article/:mdDropOptionId', component:ArticleComponent,data:[{title:'文章分享'}]},
{ path: 'articleDetail/:id',component:ArticleDetailComponent,data:[{title:'文章分享'}]},
{ path: 'activity/:mdDropOptionId', component:ActivityComponent,data:[{title:'活动分享'}]},
{ path: 'activityDetail/:id',component:ActivityDetailComponent,data:[{title:'加入银盾创投计划'}]},
{ path: 'aiofp',component:AiofpComponent,data:[{title:'AIOFO'}]},
{ path: 'article_read/:id',component:ArticleReadComponent,canActivate:[AuthGuard],data:[{title:'文章分享'}]},
{ path: 'salary_detail',component:SalaryDetailComponent,canActivate:[AuthGuard],data:[{title:'薪资详情'}]},
{ path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard],data:[{title:'薪资详情'}]},
......
......@@ -62,6 +62,10 @@ import { HistoricalRankComponent } from './historical-rank/historical-rank.compo
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 { ActivityComponent } from './activity/activity.component';
import { ActivityDetailComponent } from './activity-detail/activity-detail.component';
import { AiofpComponent } from './aiofp/aiofp.component';
//富文本编辑器
import { UEditorModule } from 'ngx-ueditor';
import { ArticleReadComponent } from './article-read/article-read.component';
......@@ -102,7 +106,7 @@ import { SecondsTransferPipe } from '../seconds-transfer.pipe';
import { MyManagementComponent } from './my-management/my-management.component';
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe,SafeResourceUrlPipe, 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,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent,MyCustomerComponent, CustomerRelationComponent, MyCustomerPolicyComponent, UnderwritingKnowledgeComponent, MyQuestionComponent, AskComponent, MenuItemComponent, MemberListComponent, ENoticeComponent, ENoticeSignComponent, RenewalReminderComponent, RenewalReminderDetailComponent, JointSalesComponent, JointSaleDetailComponent, IntegrationComponent, IntegrationDetailComponent, IntegrationRuleComponent, VideoComponent, QrcodeUploadComponent, NewsDetailComponent, MoreFeaturesComponent, MineComponent, YdCollegeComponent, MyTrainingComponent, TrainingRecordsComponent, CourseDetailComponent,SecondsTransferPipe, MyManagementComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe,SafeResourceUrlPipe, 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,ActivityComponent,ActivityDetailComponent,AiofpComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent,MyCustomerComponent, CustomerRelationComponent, MyCustomerPolicyComponent, UnderwritingKnowledgeComponent, MyQuestionComponent, AskComponent, MenuItemComponent, MemberListComponent, ENoticeComponent, ENoticeSignComponent, RenewalReminderComponent, RenewalReminderDetailComponent, JointSalesComponent, JointSaleDetailComponent, IntegrationComponent, IntegrationDetailComponent, IntegrationRuleComponent, VideoComponent, QrcodeUploadComponent, NewsDetailComponent, MoreFeaturesComponent, MineComponent, YdCollegeComponent, MyTrainingComponent, TrainingRecordsComponent, CourseDetailComponent,SecondsTransferPipe, MyManagementComponent],
imports: [
CommonModule,
LifeCommonModule,
......
......@@ -646,6 +646,14 @@ export class MyService {
return res;
});
}
//登记报聘
wxUrlRecruit(param){
const url = this.ydapi + '/practitioner/wxUrlRecruit';
return this.http.post(url,JSON.stringify(param)).pipe((res)=>{
return res;
});
}
//佣金列表
querySalaryDetail(param){
......
......@@ -127,7 +127,7 @@
}
//页面刷新的时候不出现
if (window.name == "") {
if(window.location.pathname != '/ydLife/identify' && window.location.href.indexOf('preFlag=AGMS') < 0 && window.location.href.indexOf('reminder_detail') < 0){
if(window.location.pathname != '/ydLife/identify' && window.location.href.indexOf('preFlag=AGMS') < 0 && window.location.href.indexOf('reminder_detail') < 0 && window.location.href.indexOf('activityDetail') < 0 ){
window.name = "isReload"; // 在首次进入页面时我们可以给window.name设置一个固定值
initialize();
setTimeout(()=>{getknowledgeQry()});
......
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