Commit 79cde799 authored by wangqinghua's avatar wangqinghua

2019-4-28日提交

parent 956aa5a8
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
......@@ -40,11 +40,13 @@
<ion-col col-2 class="middle-left">
<img src="./assets/imgs/flag.png">
</ion-col>
<ion-col col-10 class="middle-right">
<span class="main-color">{{partyObj?.name}}</span>,欢迎您,今天是 <span
class="main-color">{{partyObj?.now | date:'yyyy年MM月dd日'}}</span>
今天是您加入中国共产党的 <span class="main-color">{{partyObj?.partytime}}</span>天,希望您不忘初心,牢记使命,
永远奋斗。
<ion-col col-10 class="middle-right">
<div #lineChangeEle id="party-bir">
<div><span class="main-color">{{partyObj?.name}}</span>同志,欢迎您,</div>
<div>今天是<span class="main-color">{{partyObj?.now | date:'yyyy年MM月dd日'}}</span></div>
<div>是您加入中国共产党的第<span class="main-color">{{partyObj?.partytime}}</span>天,</div>
<div>希望您不忘初心,牢记使命,永远奋斗。</div>
</div>
</ion-col>
</ion-row>
</div>
......
......@@ -3,6 +3,7 @@ page-home {
width: 100%;
height: 200px;
}
.slide-image {
width: 100%;
height: 200px;
......@@ -52,7 +53,7 @@ page-home {
color: #ffffff;
}
.searchbar-ios.searchbar-left-aligned .searchbar-input{
.searchbar-ios.searchbar-left-aligned .searchbar-input {
padding-left: 24px;
}
......@@ -76,7 +77,8 @@ page-home {
width: 1px;
background-color: #fff;
}
ion-icon.iconfont{
ion-icon.iconfont {
color: #ffffff;
font-size: 1.5rem;
line-height: .1;
......@@ -90,6 +92,7 @@ page-home {
font-size: 1.5rem;
line-height: 1.6rem;
font-weight: 400;
ion-row {
padding: .5rem 0;
-webkit-border-radius: 5px;
......@@ -102,11 +105,13 @@ page-home {
display: flex;
align-items: center;
justify-content: center;
img{
img {
width: 2.5rem;
}
}
.middle-right{
.middle-right {
line-height: 2.2rem;
}
}
......@@ -163,9 +168,17 @@ page-home {
width: 50%;
height: 35px;
}
a[disabled], button[disabled], [ion-button][disabled]{
a[disabled], button[disabled], [ion-button][disabled] {
opacity: .4;
}
}
#party-bir {
height: 33px;
overflow: hidden;
font-size: 14px;
line-height: 33px;
}
}
......@@ -13,7 +13,6 @@ import {OutGoingReportEditPage} from "../../home/report/outGoingReportEdit/outGo
import {AnnouncementViewPage} from '../../home/announcement/announcementView/announcementView';
import {CalendarComponentOptions, DayConfig} from "ion2-calendar";
import {NoticePage} from "../notice/notice";
import {monthCh, weekDay} from "../../../app/main";
import {Badge} from '@ionic-native/badge';
import {TabsService} from "../tabs.service";
import {TextToSpeech} from "@ionic-native/text-to-speech";
......@@ -33,6 +32,7 @@ declare var Swiper;
export class HomePage {
@ViewChild(Slides) slides: Slides;
@ViewChild('tips') tips: ElementRef;
@ViewChild('lineChangeEle') lineChangeEle: ElementRef;
@ViewChild('tabSpan') tabSpan: ElementRef;
picture: string = AppGlobal.domain +'/wisdomgroup';
......@@ -55,6 +55,12 @@ export class HomePage {
slideTitle;
move_h = 33; //移动高度
scorllStep = 1;
scrollTime = 60 ;
stopTime = 1000;
tmpH = 0;
constructor(public navCtrl: NavController, public tts: TextToSpeech,
public commonSer: CommonService, public emitSer: EmitService,
......@@ -66,6 +72,38 @@ export class HomePage {
this.noReadNum = value;
}
});
}
lineChange(){
let child_div = this.lineChangeEle.nativeElement.children;
setTimeout( ()=> {
if(child_div.length > 0){
this.start();
}
},10);
}
start(){
if(this.tmpH < this.move_h){// tmpH = 0 ; move_h = 33
this.tmpH += this.scorllStep;//scorllStep = 1
if(this.tmpH >this.move_h){
this.tmpH = this.move_h;
}
this.lineChangeEle.nativeElement.scrollTop = this.tmpH;
setTimeout( ()=>{
this.start()
},this.scrollTime);//stopTime = 3000 ; scrollTime = 30 每移动一个单位延时30ms
}else{
this.tmpH = 0;
this.lineChangeEle.nativeElement.appendChild(this.lineChangeEle.nativeElement.children[0]);
// this.lineChangeEle.nativeElement.scrollTop = 0;
setTimeout( ()=>{
this.start()
},this.stopTime);//stopTime = 3000 ; scrollTime = 30 每移动一个单位延时30ms
}
}
......@@ -78,6 +116,7 @@ export class HomePage {
this.change(0);
this.getBanner();
this.getInfo();
this.lineChange();
}
//获取轮播图
......@@ -93,7 +132,7 @@ export class HomePage {
this.slidersItems = res.data;
this.slidersItems.forEach(e => {
if(e.title.length > 16){
e.title = e.title.substr(0,17) +'...';
e.title = e.title.substr(0,14) +'...';
}
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
......@@ -154,11 +193,11 @@ export class HomePage {
//签到
signUp() {
this.signObj.isSign = 'yes';
this.tabsSer.sign().subscribe(
(res) => {
this.isSign = false;
if (res.errcode == '1000') {
this.signObj.isSign = 'yes';
this.commonSer.toast('签到成功');
} else {
this.commonSer.toast(res.errmsg);
......
......@@ -94,7 +94,7 @@
<ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/xtsz.png" alt="">
</ion-col>
<ion-col class="group-right" col-10>
<ion-col class="group-right" style="border-bottom: 0px" col-10>
<span>设置</span>
<ion-icon name="ios-arrow-forward"></ion-icon>
</ion-col>
......
......@@ -43,8 +43,19 @@ page-mine {
align-items: center;
justify-content: center;
}
.group-right {
display: flex;
flex-flow: row;
align-items: center;
border-bottom: 1px solid #eee;
ion-icon {
margin-left: auto;
}
}
ion-row{
padding-top: .6rem;
padding-bottom: .6rem;
}
img{
width: 2.5rem;
......@@ -63,17 +74,6 @@ page-mine {
}
}
.group-right {
display: flex;
flex-flow: row;
align-items: center;
border-bottom: 1px solid #eee;
ion-icon {
margin-left: auto;
}
}
.red-span-round{
background-color: #fee7e7;
border: 1px solid #e12724;
......
......@@ -15,8 +15,8 @@ export class AppGlobal {
//接口基地址
// static domain = "http://101.89.112.92:80"; //正式环境
// static domain = "http://180.168.156.212:2931"; //测试环境
// static domain = "http://47.103.35.216:8080"; //阿里云地址
static domain = ""; //本地环境
static domain = "http://47.103.35.216:8080"; //阿里云地址
// static domain = ""; //本地环境
//图片地址
......
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