Commit b94b70f6 authored by wangqinghua's avatar wangqinghua

轮播图页面 返回的问题

parent 3e1a11ac
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.3.1" 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.3.3" 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>
......
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.0.8" 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.3.2" 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>
......@@ -15,8 +15,9 @@
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="FadeSplashScreenDuration" value="500" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="ShowSplashScreenSpinner" value="false" />
</widget>
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {AfterViewInit, Component, ElementRef, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';
import {TabsService} from "../../pages/tabs/tabs.service";
import {AppGlobal} from "../../service/http.service";
import {App, NavController, Slides} from "ionic-angular";
......@@ -10,17 +10,16 @@ import {StuffDetailPage} from "../../pages/home-pages/stuff-detail/stuff-detail"
})
export class SlideComponent implements AfterViewInit{
@ViewChild(Slides) slides:Slides;
@Output() done = new EventEmitter<any>();
picture: string = AppGlobal.domain + '/wisdomgroup';
slideTitle;
slideIndex;
slidersItems = [];
private nav:NavController;
constructor(private tabsSer:TabsService,
private app:App
) {
this.nav = this.app.getRootNav();
}
ngAfterViewInit(){
......@@ -62,8 +61,6 @@ export class SlideComponent implements AfterViewInit{
goToDetail() {
const index = this.slides.realIndex;
if(this.slidersItems[index].plateType == 20) return false;
this.nav.push(StuffDetailPage, {
id: this.slidersItems[index].id
})
this.done.emit(this.slidersItems[index]);
}
}
......@@ -44,7 +44,7 @@
</ion-col>
</ion-row>
</div>
<slide></slide>
<slide (done)="goToDetail($event)"></slide>
</div>
<!--true 隐藏 false 显示-->
<div [hidden]="isScroll" class="news-content">
......
import {Component, ElementRef, ViewChild, NgZone, Renderer2} from '@angular/core';
import {Component, ElementRef, ViewChild, NgZone, Renderer2, Input} from '@angular/core';
import {NavController, IonicPage, Slides, Content, InfiniteScrollContent} from 'ionic-angular';
import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service';
......@@ -22,6 +22,7 @@ import {SlideComponent} from "../../../components/slide/slide";
})
export class HomePage {
@ViewChild(Slides) slides1: Slides;
@ViewChild(Content) content: Content;
@ViewChild('tips') tips: ElementRef;
......@@ -185,8 +186,10 @@ export class HomePage {
const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
const partyBir = localStorage.getItem('partyBir');
if (nowDay == partyBir) {
this.start();
this.isBir = false;
setTimeout(()=>{
this.start();
this.isBir = false;
},500)
} else {
this.isBir = true;
}
......@@ -206,6 +209,7 @@ export class HomePage {
let child_div = this.verticaLamp.nativeElement.children;
const scrollWidth = this.verticaLamp.nativeElement.offsetWidth;
const textWidth = child_div[0].offsetWidth;
console.log(textWidth);
let i = scrollWidth;
setInterval(() => {
......
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