Commit 1bce2fea authored by wangqinghua's avatar wangqinghua

主题教育

parent 969bc66e
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://47.103.33.196:8080/wisdomgroup"
"proxyUrl": "http://47.103.35.216:8080/wisdomgroup"
}
]
}
#Fri May 31 10:49:01 CST 2019
#Fri May 31 16:58:49 CST 2019
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0
renamed.0=classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex
......@@ -330,6 +330,7 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
background-color: rgba(0, 0, 0, .4);
z-index: 99999;
//签到
.mask-content {
position: absolute;
top: 20%;
......@@ -370,6 +371,7 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
}
}
//政治生日
.mask-content-bir {
position: absolute;
top: 20%;
......@@ -379,6 +381,15 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
background-color: #fff;
border-radius: 5px;
.close {
position: absolute;
top: 0px;
right: 10px;
color: #ffffff;
font-size: 2.5rem;
z-index: 1;
}
.title {
background-color: #e12724;
color: #ffffff;
......@@ -402,6 +413,28 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
border-bottom-right-radius: 5px;
}
}
//主题教育
.mask-content-edu {
position: absolute;
top: 20%;
left: 10%;
width: 80%;
height: 300px;
border-radius: 5px;
background: url(../assets/imgs/home/edu_mask.png) repeat;
background-size: cover;
.close {
position: absolute;
top: 0px;
right: 10px;
color: #ffffff;
font-size: 2.5rem;
z-index: 1;
}
}
}
a[disabled], button[disabled], [ion-button][disabled],
......
src/assets/imgs/loading.gif

3.36 MB | W: | H:

src/assets/imgs/loading.gif

3.36 MB | W: | H:

src/assets/imgs/loading.gif
src/assets/imgs/loading.gif
src/assets/imgs/loading.gif
src/assets/imgs/loading.gif
  • 2-up
  • Swipe
  • Onion skin
<!--主题教育-->
<div *ngIf="isEdu" class="signMask" (click)="closeEdu()">
<div class="mask-content-bir" (click)="stop($event)">
<p class="title">主题教育</p>
<div class="mask-button">
<button class="submit-btn submit">查看详情</button>
</div>
<div class="mask-content-edu" >
<ion-icon class="close" name="close"></ion-icon>
</div>
</div>
......@@ -6,7 +6,7 @@ import { Component } from '@angular/core';
})
export class EducationComponent {
isEdu:Boolean = false;
isEdu:Boolean = true;
constructor() {
console.log('Hello EducationComponent Component');
......
......@@ -22,7 +22,7 @@
<!-- <img style="height: 160px;" [src]="url + item.path" alt="">-->
<!-- </div>-->
<div *ngIf="item.resourceType == 3">
<video width="100%" height="100%" [src]="url + item.path" controls="controls" preload="metadata">
<video width="100%" height="100%" [src]="url + item.path+ '#t=0.1' " controls="controls" preload="metadata">
您的浏览器不支持 html5。
</video>
</div>
......
......@@ -158,7 +158,7 @@ page-stuff-detail {
.comment-item {
.contact-img{
border-radius: 100px;
border-radius: 50%;
width: 75%;
text-align: center;
margin-top: 8px;
......
......@@ -56,6 +56,7 @@ export class StuffDetailPage {
this.footerView = true;
}, 300)
//增加浏览量
// this.initVideo();
}
//获取文章信息
......@@ -71,6 +72,35 @@ export class StuffDetailPage {
)
}
initVideo(){
const scale = 0.8;
const video = document.querySelectorAll('video');
for(let i = 0;i < video.length ;i++){
((num)=> {
console.log(num);
video[i].addEventListener('dataLoad', function(e) {
console.log(e)
// let canvas = document.createElement('canvas');
// canvas.width = 300 * scale;
// canvas.height = 120 * scale;
// canvas.getContext('2d').drawImage(e.target,0,0,canvas.width,canvas.height);
// e.target.setAttribute("poster",canvas.toDataURL("image/png"));
}, false)
})(i);
}
// video.addEventListener('dataLoad',function(){
// //创建一个画布
// var canvas = document.createElement('canvas');
// canvas.width = video.style.width*scal;
// canvas.height = video.style.height*scal;
// //绘制图片
// canvas.getContentext('2d').drawImage(video,0,0,canvas.width,canvas.height);
// //设置标签的poster属性
// viseo.setAttribute("poster",canvas.toDataURL("image/png"));
//
// });
}
ionViewWillLeave() {
this.footerView = false;
}
......
......@@ -21,7 +21,7 @@ page-personInfo {
.img {
width: 50px;
border-radius: 5px;
border-radius: 50%;
}
.info {
......
......@@ -35,7 +35,8 @@
<div class="swiper-wrapper">
<ng-container *ngIf="slidersItems.length > 0">
<div class="swiper-slide" *ngFor="let item of slidersItems;">
<img [src]="picture+item.imgUrl" class="slide-image" [alt]="item.title">
<img *ngIf="item.static" [src]="item.imgUrl" class="slide-image">
<img *ngIf="!item.static" [src]="picture+item.imgUrl" class="slide-image" [alt]="item.title">
</div>
</ng-container>
</div>
......@@ -189,3 +190,5 @@
<span>发视频</span></div>
</div>
</div>
<education></education>
......@@ -35,145 +35,149 @@ export class DiscoverPage {
//9廉政格言,10纪检提示,11风险排查,12警示教育,13支部活动,14党建联建,15结对帮扶,
tabsList = [
{
"name": "机关党委", "type": 5, "indexParent": 0, "children": [
"name": "最新", "type": 0, "indexParent": 0, "children": [
{
"name": "通知公告",
"type": 5,
"indexChildren": '02'
"name": "最新发布",
"type": 0,
"indexChildren": '01'
},
{
"name": "党建动态",
"type": 6,
"indexChildren": '03'
]
},
{
"name": "工作提示",
"type": 7,
"indexChildren": '04'
},
"name": "主题教育", "type": 3, "indexParent": 1, "children": [
{
"name": "党务参考",
"type": 8,
"indexChildren": '05'
}
]
"name": "中央精神",
"type": 3,
"indexChildren": '11'
},
{
"name": "支部风采", "type": 13, "indexParent": 1, "children": [
{
"name": "支部活动",
"type": 13,
"name": "本市部署",
"type": 4,
"indexChildren": '12'
},
{
"name": "党建联建",
"type": 14,
"name": "机关动态",
"type": 6,
"indexChildren": '13'
},
{
"name": "结对帮扶",
"type": 15,
"name": "学习心得",
"type": 21,
"indexChildren": '14'
}
},
{
"name": "学习资料",
"type": 16,
"indexChildren": '15'
},
]
},
{
"name": "主题教育", "type": 3, "indexParent": 2, "children": [
"name": "机关党委", "type": 5, "indexParent": 2, "children": [
{
"name": "中央精神",
"type": 3,
"name": "通知公告",
"type": 5,
"indexChildren": '21'
},
{
"name": "本市部署",
"type": 4,
"name": "党建动态",
"type": 6,
"indexChildren": '22'
},
{
"name": "机关动态",
"type": 6,
"name": "工作提示",
"type": 7,
"indexChildren": '23'
},
{
"name": "学习心得",
"type": 21,
"name": "党务参考",
"type": 8,
"indexChildren": '24'
}
]
},
{
"name": "学习资料",
"type": 16,
"indexChildren": '25'
"name": "支部风采", "type": 13, "indexParent": 3, "children": [
{
"name": "支部活动",
"type": 13,
"indexChildren": '32'
},
{
"name": "党建联建",
"type": 14,
"indexChildren": '33'
},
{
"name": "结对帮扶",
"type": 15,
"indexChildren": '34'
}
]
},
{
"name": "党风廉政", "type": 9, "indexParent": 3, "children": [
"name": "党风廉政", "type": 9, "indexParent": 4, "children": [
{
"name": "廉政格言",
"type": 9,
"indexChildren": '31'
"indexChildren": '41'
},
{
"name": "纪检提示",
"type": 10,
"indexChildren": '32'
"indexChildren": '42'
},
{
"name": "风险排查",
"type": 11,
"indexChildren": '33'
"indexChildren": '43'
},
{
"name": "警示教育",
"type": 12,
"indexChildren": '34'
"indexChildren": '44'
}
]
},
{
"name": "互动交流", "type": 21, "indexParent": 4, "children": [
"name": "互动交流", "type": 21, "indexParent": 5, "children": [
{
"name": "学思践悟",
"type": 21,
"indexChildren": '41'
"indexChildren": '51'
},
{
"name": "话题讨论",
"type": 22,
"indexChildren": '42'
"indexChildren": '52'
},
// {
// "name": "我要出题",
// "type": 23,
// "indexChildren": '34'
// },
{
"name": "你问我答",
"type": 24,
"indexChildren": '45'
"indexChildren": '55'
}]
},
{
"name": "知识拓展", "type": 16, "indexParent": 5, "children": [
"name": "知识拓展", "type": 16, "indexParent": 6, "children": [
{
"name": "视频资料",
"type": 16,
"indexChildren": '51'
"indexChildren": '61'
},
{
"name": "组工咨询",
"type": 17,
"indexChildren": '52'
"indexChildren": '62'
},
{
"name": "工具书籍",
"type": 18,
"indexChildren": '53'
"indexChildren": '63'
},
{
"name": "综合知识",
"type": 19,
"indexChildren": '54'
"indexChildren": '64'
},
]
}
......@@ -181,6 +185,7 @@ export class DiscoverPage {
childrenList = [];
plateType; //分类
relateTopicedu; //是否主题教育 1 是 0否
isManyPlate = null;
picture: string = AppGlobal.domain + '/wisdomgroup';
slidersItems = [];
......@@ -206,6 +211,13 @@ export class DiscoverPage {
swiper;
swiperImg;
eduObj = {
"static": "true",
"plateType": "20",
"title": "不忘初心,牢记使命",
"imgUrl": "./assets/imgs/home/edu_banner.png"
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public commonSer: CommonService, public renderer: Renderer2,
public zone: NgZone,
......@@ -221,8 +233,8 @@ export class DiscoverPage {
ionViewDidLoad() {
this.initSwiper();
this.getBanner();
this.slideList.length = 5;
this.changeParent(this.tabsList[1]);
this.slideList.length = 7;
this.changeParent(this.tabsList[0]);
this.scrollHeight();
}
......@@ -230,7 +242,6 @@ export class DiscoverPage {
const height = this.topHeight.nativeElement.offsetHeight;
this.content.ionScroll.subscribe(($event) => {
this.zone.run(() => {
console.log(height + ":" + this.content.scrollTop);
if (this.content.scrollTop > height) {
this.renderer.addClass(this.fixedTab.nativeElement, 'tabs-fixed-scroll')
} else {
......@@ -253,7 +264,7 @@ export class DiscoverPage {
slideChangeTransitionEnd: function () {
that.swiper.update();
that.changeParent(that.tabsList[this.activeIndex]);
},
}
}
});
that.swiperImg = new Swiper('#swiper-slide', {
......@@ -272,6 +283,17 @@ export class DiscoverPage {
that.slideTitle = that.slidersItems[this.activeIndex].title;
that.swiperImg.update();
},
click: function () {
const item = that.slidersItems[this.activeIndex];
if (item.static == "true") {
that.swiperImg.slideTo(0, 500);
return false;
}
if (item.plateType == 20) return false;
that.navCtrl.push(StuffDetailPage, {
id: item.id
})
},
}
});
}
......@@ -295,7 +317,7 @@ export class DiscoverPage {
})
}
this.slidersItems = res.data.list;
this.slideTitle = this.slidersItems[this.slidersItems.length - 1].title;
this.slidersItems.push(this.eduObj);
}
)
}
......@@ -334,6 +356,7 @@ export class DiscoverPage {
e.imgUrl = e.attachments[0].path;
}
});
console.log(this.indexParent);
this.swiper.slideTo(this.indexParent, 500);
this.slideList[this.indexParent] = this.newList;
}
......@@ -343,6 +366,7 @@ export class DiscoverPage {
//子级选择
changeChildren(item) {
this.indexChildren = item.indexChildren;
this.isManyPlate = this.indexChildren == 25 ? 1 : null;
if (this.indexChildren == 45) {
this.getQuestion();
return false;
......@@ -356,6 +380,7 @@ export class DiscoverPage {
'plateType': item.type,
'resourceType': 1,
'relateTopicedu': this.relateTopicedu,
'isManyPlate': this.isManyPlate
}
};
this.tabsSer.stuffPage(data).subscribe(
......@@ -417,7 +442,6 @@ export class DiscoverPage {
//上拉加载
doInfinite(infiniteScroll) {
console.log('infiniteScroll');
if (this.totalNum < this.slideList[this.toIndex].length + 1) {
console.log('没有数据了');
infiniteScroll.enable(false);
......
......@@ -156,6 +156,7 @@
<!--政治生日-->
<div *ngIf="isBir" class="signMask" (click)="closeBir()">
<div class="mask-content-bir" (click)="stop($event)">
<ion-icon class="close" (click)="closeBir()" name="close"></ion-icon>
<p class="title">政治生日</p>
<div class="record-content">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="main-color">{{partyObj?.name}}</span>同志,欢迎您,今天是<span
......
......@@ -46,18 +46,12 @@ export class HomePage {
//所属板块类型:
//1党章党规,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,8党务参考
//9廉政格言,10纪检提示,11风险排查,12警示教育,13支部活动,14党建联建,15结对帮扶
// tabsList = [
// {name: "党章党规", type: 1, index: 0},
// {name: "系列讲话", type: 2, index: 1},
// {name: "中央精神", type: 3, index: 2},
// {name: "本市部署", type: 4, index: 3}
// ];
tabsList = [
{name: "最新", type: 0, index: 0},
{name: "系列讲话", type: 2, index: 1},
{name: "党章党规", type: 1, index: 2},
{name: "中央精神", type: 3, index: 3},
{name: "本市部署", type: 4, index: 4}
{name: "系列讲话", type: 2, index: 0},
{name: "党章党规", type: 1, index: 1},
{name: "中央精神", type: 3, index: 2},
{name: "本市部署", type: 4, index: 3}
];
isSign = false; //签到弹窗
isBir = false; //政治生日弹窗
......@@ -91,11 +85,13 @@ export class HomePage {
mineInfo;
username;
constructor(public navCtrl: NavController, public datePipe: DatePipe,
public commonSer: CommonService, public emitSer: EmitService,
public zone: NgZone, public tabSer: TabsService,
public renderer: Renderer2,
private swiper: SwiperComponent,private videoPlayer:VideoPlayer,
private swiper: SwiperComponent, private videoPlayer: VideoPlayer,
public appService: AppService, public http: Http, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) {
......@@ -126,7 +122,6 @@ export class HomePage {
ionViewDidLoad() {
this.initSwiper();
this.itemWidth = window.screen.width / 4;
console.log(this.tabsParent.nativeElement.children[0].children[0].offsetWidth);
this.spanWidth = this.tabsParent.nativeElement.children[0].children[0].offsetWidth; //文字宽度
this.tips.nativeElement.style.width = this.spanWidth + 'px';
this.tips1.nativeElement.style.width = this.spanWidth + 'px';
......@@ -141,13 +136,13 @@ export class HomePage {
let that = this;
that.swiperImg = new Swiper('#swiper-container', {
speed: 1000,
autoplay:{
autoplay: {
delay: 3000,
disableOnInteraction: false,
},//可选选项,自动滑动
observer: true,
observeParents: true,
observeSlideChildren:true,
observeSlideChildren: true,
loop: true,
on: {
slideChangeTransitionEnd: function () {
......@@ -155,6 +150,13 @@ export class HomePage {
that.slideTitle = that.slidersItems[this.activeIndex].title;
that.swiperImg.update();
},
click: function () {
const item = that.slidersItems[this.activeIndex];
if (item.plateType == 20) return false;
that.navCtrl.push(StuffDetailPage, {
id: item.id
})
},
}
});
this.swiperArticle = new Swiper('#swiper-article', {
......@@ -163,7 +165,7 @@ export class HomePage {
autoplay: false,//可选选项,自动滑动
observer: true,
observeParents: true,
observeSlideChildren:true,
observeSlideChildren: true,
loop: false,
on: {
slideChangeTransitionEnd: function () {
......@@ -174,7 +176,6 @@ export class HomePage {
})
}
scrollHeight() {
const height = this.topHeight.nativeElement.offsetHeight + 48;
this.content.ionScroll.subscribe(($event) => {
......@@ -266,7 +267,7 @@ export class HomePage {
obj: {
"resourceType": 2, //1标题图片,2推荐轮播图,3视频
"isRecommend": 1, //推荐(1是0否)
"plateType":2,
"plateType": 2,
}
};
this.tabsSer.stuffPage(data).subscribe(
......@@ -279,7 +280,6 @@ export class HomePage {
})
}
this.slidersItems = res.data.list;
this.slideTitle = this.slidersItems[this.slidersItems.length -1].title;
}
)
}
......@@ -345,15 +345,6 @@ export class HomePage {
})
}
//查看文章详情 轮播图
goToDetailBySlide() {
// const index = this.slides.toArray()[0].realIndex;
// if (this.slidersItems[index].plateType == 20) return false;
// this.navCtrl.push(StuffDetailPage, {
// id: this.slidersItems[index].id
// })
}
//前往
goTo(page) {
this.navCtrl.push(page);
......
......@@ -9,7 +9,8 @@ page-mine {
.mine-item {
padding: 1rem 0;
img{
border-radius: 5px;
border-radius: 50%;
width: 70px;
}
}
......
......@@ -254,7 +254,7 @@ export class ServePage {
let data = Number(res.json());
this.noticeTips = data;
if (data > 0) {
this.badge.set(data);
// this.badge.set(data);
} else {
this.badge.clear();
}
......
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