Commit 20253d7f authored by wangqinghua's avatar wangqinghua

视频不同时播放

parent cf6ad0f0
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.3.10" 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.11" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name> <name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
...@@ -156,11 +156,6 @@ ...@@ -156,11 +156,6 @@
"resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-4.4.0.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-4.4.0.tgz",
"integrity": "sha512-ZLlIdNh9XpA+XrOJ+Bt0hHxxhpE/bLzv77CBLIYb7twYrsK4QU5d43PtCLQeOqBz7ZX2SPMea+84Kt4mrsY1gQ==" "integrity": "sha512-ZLlIdNh9XpA+XrOJ+Bt0hHxxhpE/bLzv77CBLIYb7twYrsK4QU5d43PtCLQeOqBz7ZX2SPMea+84Kt4mrsY1gQ=="
}, },
"@ionic-native/video-player": {
"version": "4.20.0",
"resolved": "http://r.cnpmjs.org/@ionic-native/video-player/download/@ionic-native/video-player-4.20.0.tgz",
"integrity": "sha1-LzbvKBjR9Z7JKUs9OMss+Asf8Ms="
},
"@ionic/app-scripts": { "@ionic/app-scripts": {
"version": "3.1.8", "version": "3.1.8",
"resolved": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.1.8.tgz", "resolved": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.1.8.tgz",
...@@ -6604,7 +6599,7 @@ ...@@ -6604,7 +6599,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"requires": { "requires": {
"dezalgo": "^1.0.2" "dezalgo": "1.0.3"
} }
}, },
"block-stream": { "block-stream": {
...@@ -6684,8 +6679,8 @@ ...@@ -6684,8 +6679,8 @@
"version": "1.0.3", "version": "1.0.3",
"bundled": true, "bundled": true,
"requires": { "requires": {
"asap": "^2.0.0", "asap": "2.0.3",
"wrappy": "1" "wrappy": "1.0.2"
}, },
"dependencies": { "dependencies": {
"asap": { "asap": {
...@@ -6727,10 +6722,10 @@ ...@@ -6727,10 +6722,10 @@
"version": "1.0.10", "version": "1.0.10",
"bundled": true, "bundled": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "4.1.6",
"inherits": "~2.0.0", "inherits": "2.0.3",
"mkdirp": ">=0.5 0", "mkdirp": "0.5.1",
"rimraf": "2" "rimraf": "2.5.4"
} }
}, },
"fstream-npm": { "fstream-npm": {
...@@ -6941,7 +6936,7 @@ ...@@ -6941,7 +6936,7 @@
"version": "3.0.6", "version": "3.0.6",
"bundled": true, "bundled": true,
"requires": { "requires": {
"abbrev": "1" "abbrev": "1.0.9"
} }
}, },
"normalize-git-url": { "normalize-git-url": {
...@@ -7199,13 +7194,13 @@ ...@@ -7199,13 +7194,13 @@
"version": "4.0.3", "version": "4.0.3",
"bundled": true, "bundled": true,
"requires": { "requires": {
"debuglog": "^1.0.1", "debuglog": "1.0.1",
"graceful-fs": "^4.1.2", "graceful-fs": "4.1.6",
"read-package-json": "^2.0.0", "read-package-json": "2.0.4",
"readdir-scoped-modules": "^1.0.0", "readdir-scoped-modules": "1.0.2",
"semver": "2 || 3 || 4 || 5", "semver": "5.1.0",
"slide": "~1.1.3", "slide": "1.1.6",
"util-extend": "^1.0.1" "util-extend": "1.0.1"
}, },
"dependencies": { "dependencies": {
"debuglog": { "debuglog": {
...@@ -7216,10 +7211,10 @@ ...@@ -7216,10 +7211,10 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"requires": { "requires": {
"debuglog": "^1.0.1", "debuglog": "1.0.1",
"dezalgo": "^1.0.0", "dezalgo": "1.0.3",
"graceful-fs": "^4.1.2", "graceful-fs": "4.1.6",
"once": "^1.3.0" "once": "1.4.0"
} }
}, },
"util-extend": { "util-extend": {
...@@ -7817,9 +7812,9 @@ ...@@ -7817,9 +7812,9 @@
"version": "2.2.1", "version": "2.2.1",
"bundled": true, "bundled": true,
"requires": { "requires": {
"block-stream": "*", "block-stream": "0.0.9",
"fstream": "^1.0.2", "fstream": "1.0.10",
"inherits": "2" "inherits": "2.0.3"
} }
}, },
"text-table": { "text-table": {
...@@ -7899,9 +7894,9 @@ ...@@ -7899,9 +7894,9 @@
"version": "1.1.4", "version": "1.1.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "4.1.6",
"imurmurhash": "^0.1.4", "imurmurhash": "0.1.4",
"slide": "^1.1.5" "slide": "1.1.6"
} }
} }
} }
...@@ -10467,6 +10462,11 @@ ...@@ -10467,6 +10462,11 @@
} }
} }
}, },
"videogular2": {
"version": "6.0.1",
"resolved": "http://r.cnpmjs.org/videogular2/download/videogular2-6.0.1.tgz",
"integrity": "sha1-RhpPj2M9yiSUOATUSRCXKZneeZo="
},
"vlq": { "vlq": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
"@ionic-native/mobile-accessibility": "^4.20.0", "@ionic-native/mobile-accessibility": "^4.20.0",
"@ionic-native/splash-screen": "^4.20.0", "@ionic-native/splash-screen": "^4.20.0",
"@ionic-native/status-bar": "4.4.0", "@ionic-native/status-bar": "4.4.0",
"@ionic-native/video-player": "^4.20.0",
"@ionic/storage": "2.1.3", "@ionic/storage": "2.1.3",
"cordova": "^6.5.0", "cordova": "^6.5.0",
"cordova-android": "7.0.0", "cordova-android": "7.0.0",
...@@ -59,6 +58,7 @@ ...@@ -59,6 +58,7 @@
"rxjs": "^5.5.12", "rxjs": "^5.5.12",
"sw-toolbox": "3.6.0", "sw-toolbox": "3.6.0",
"vconsole": "^3.3.0", "vconsole": "^3.3.0",
"videogular2": "^6.0.1",
"zone.js": "0.8.18" "zone.js": "0.8.18"
}, },
"devDependencies": { "devDependencies": {
...@@ -90,4 +90,4 @@ ...@@ -90,4 +90,4 @@
"android" "android"
] ]
} }
} }
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="310" android:versionName="0.3.10" package="io.ionic.partyCloud.starter.test" xmlns:android="http://schemas.android.com/apk/res/android"> <manifest android:hardwareAccelerated="true" android:versionCode="311" android:versionName="0.3.11" package="io.ionic.partyCloud.starter.test" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true"> <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
......
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.3.10" 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.11" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="Keyboard"> <feature name="Keyboard">
<param name="android-package" onload="true" value="io.ionic.keyboard.IonicKeyboard" /> <param name="android-package" onload="true" value="io.ionic.keyboard.IonicKeyboard" />
</feature> </feature>
......
...@@ -42,7 +42,6 @@ import {MobileAccessibility} from "@ionic-native/mobile-accessibility"; ...@@ -42,7 +42,6 @@ import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
import {Camera} from "@ionic-native/camera"; import {Camera} from "@ionic-native/camera";
import {ProposalPageModule} from "../pages/mine-pages/proposal/proposal.module"; import {ProposalPageModule} from "../pages/mine-pages/proposal/proposal.module";
import {MineService} from "../pages/mine-pages/mine.service"; import {MineService} from "../pages/mine-pages/mine.service";
import {VideoPlayer} from "@ionic-native/video-player";
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -101,7 +100,6 @@ import {VideoPlayer} from "@ionic-native/video-player"; ...@@ -101,7 +100,6 @@ import {VideoPlayer} from "@ionic-native/video-player";
MobileAccessibility, MobileAccessibility,
Camera, Camera,
Geolocation, Geolocation,
VideoPlayer,
DatePipe, DatePipe,
LearnService, LearnService,
LearnManageService, LearnManageService,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -5,6 +5,8 @@ import {ReplyComponent} from './reply/reply'; ...@@ -5,6 +5,8 @@ import {ReplyComponent} from './reply/reply';
import {CommentComponent} from './comment/comment'; import {CommentComponent} from './comment/comment';
import {SwiperComponent} from './swiper/swiper'; import {SwiperComponent} from './swiper/swiper';
import {EducationComponent} from './education/education'; import {EducationComponent} from './education/education';
import {VideoiComponent} from './videoi/videoi';
import { VideoListComponent } from './video-list/video-list';
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -12,18 +14,21 @@ import {EducationComponent} from './education/education'; ...@@ -12,18 +14,21 @@ import {EducationComponent} from './education/education';
ReplyComponent, ReplyComponent,
CommentComponent, CommentComponent,
SwiperComponent, SwiperComponent,
EducationComponent EducationComponent,
VideoiComponent,
VideoListComponent
], ],
imports: [ imports: [
IonicPageModule, IonicPageModule,
], ],
exports: [ exports: [
SlideListComponent, SlideListComponent,
ReplyComponent, ReplyComponent,
CommentComponent, CommentComponent,
SwiperComponent, SwiperComponent,
EducationComponent EducationComponent,
VideoiComponent,
VideoListComponent
], ],
providers: [ providers: [
SlideListComponent, SlideListComponent,
......
...@@ -2,56 +2,59 @@ ...@@ -2,56 +2,59 @@
<html lang="zh" dir="ltr"> <html lang="zh" dir="ltr">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>部机关党建云平台</title> <title>部机关党建云平台</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<!-- <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> --> <!-- <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> -->
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no"> <meta name="msapplication-tap-highlight" content="no">
<!--<script src="http://webapi.amap.com/maps?v=1.3&key=4ad6cba9ebd3b7b002919cf6ef8d2fd1"></script>--> <!--<script src="http://webapi.amap.com/maps?v=1.3&key=4ad6cba9ebd3b7b002919cf6ef8d2fd1"></script>-->
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico"> <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="stylesheet" href="assets/swiper/swiper-4.1.6.min.css"> <link rel="stylesheet" href="assets/swiper/swiper-4.1.6.min.css">
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7"> <meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios --> <!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- cordova.js required for cordova apps (remove if not needed) --> <!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script> <script src="cordova.js"></script>
<!-- un-comment this code to enable service worker <!-- un-comment this code to enable service worker
<script> <script>
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js') navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed')) .then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err)); .catch(err => console.error('Error', err));
} }
</script>--> </script>-->
<link href="build/main.css" rel="stylesheet"> <link href="build/main.css" rel="stylesheet">
</head> </head>
<body> <body>
<!-- Ionic's root component and where the app will load --> <!-- Ionic's root component and where the app will load -->
<ion-app></ion-app> <ion-app></ion-app>
<!-- The polyfills js is generated during the build process --> <!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script> <script src="build/polyfills.js"></script>
<!-- The vendor js is generated during the build process <!-- The vendor js is generated during the build process
It contains all of the dependencies in node_modules --> It contains all of the dependencies in node_modules -->
<script src="build/vendor.js"></script> <script src="build/vendor.js"></script>
<!-- The main bundle js is generated during the build process --> <!-- The main bundle js is generated during the build process -->
<script src="build/main.js"></script> <script src="build/main.js"></script>
</body> </body>
<script src="assets/swiper/swiper-4.1.6.min.js"></script> <script src="assets/swiper/swiper-4.1.6.min.js"></script>
<script src="assets/jwplayer/jwplayer.js"></script>
<script src="assets/jwplayer/jwpsrv.js"></script>
<script src="assets/jwplayer/jwplayer.html5.js"></script>
</html> </html>
\ No newline at end of file
<ion-header> <ion-header>
<ion-navbar> <ion-navbar>
<ion-title></ion-title> <ion-title></ion-title>
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<div class="stuff"> <div class="stuff">
<div class="stuff-container"> <div class="stuff-container">
<div class="stuff-title"> <div class="stuff-title">
{{stuffObj?.title}} {{stuffObj?.title}}
</div>
<div class="stuff-info">
<span class="info-publisher">{{stuffObj?.source}}</span>
<span class="info-time">{{stuffObj?.publishTime | date:'yyyy-MM-dd'}}</span>
</div>
<div class="stuff-content">
<p [innerHTML]="stuffObj?.content"></p>
</div>
<div class="stuff-attachments">
<ng-container *ngFor="let item of attachments">
<!-- <div style="height: 160px;" *ngIf="item.resourceType == 1">-->
<!-- <img style="height: 160px;" [src]="url + item.path" alt="">-->
<!-- </div>-->
<div *ngIf="item.resourceType == 3">
<video width="100%" height="100%" [src]="url + item.path+ '#t=0.1' " controls="controls" preload="metadata">
您的浏览器不支持 html5。
</video>
</div> </div>
</ng-container> <div class="stuff-info">
<ng-container *ngFor="let item of attachments"> <span class="info-publisher">{{stuffObj?.source}}</span>
</ng-container> <span class="info-time">{{stuffObj?.publishTime | date:'yyyy-MM-dd'}}</span>
</div> </div>
</div> <div class="stuff-content">
<div class="stuff-comment"> <p [innerHTML]="stuffObj?.content"></p>
<p class="comment-title">评论</p> </div>
<div *ngFor="let comment of stuffObj?.commentInfos" class="comment-item"> <div class="stuff-attachments">
<ion-row> <ng-container *ngFor="let item of attachments">
<ion-col col-2> <div *ngIf="item.resourceType == 3">
<ng-container *ngIf="comment?.picUrl && comment?.picUrl != ''"> <videoi [inputValue]="url + item.path+ '#t=0.1'"></videoi>
<img src="{{picture+comment.picUrl}}" class="contact-img"> </div>
</ng-container> </ng-container>
<ng-container *ngIf="!comment?.picUrl || comment?.picUrl == ''"> <ng-container *ngFor="let item of attachments">
<img src="./assets/imgs/man.png" class="contact-img" *ngIf="comment.userGender =='1'||comment.userGender==null"> </ng-container>
<img src="./assets/imgs/woman.png" class="contact-img" *ngIf="comment.userGender =='0'"> </div>
</ng-container> </div>
</ion-col> <div class="stuff-comment">
<ion-col col-10 style="border-bottom: 1px solid #eee;"> <p class="comment-title">评论</p>
<p class="comment-info"> <div *ngFor="let comment of stuffObj?.commentInfos" class="comment-item">
{{comment.username}} <ion-row>
</p> <ion-col col-2>
<p class="commnet-content"> <ng-container *ngIf="comment?.picUrl && comment?.picUrl != ''">
{{comment.content}} <img src="{{picture+comment.picUrl}}" class="contact-img">
</p> </ng-container>
<p class="comment-time"> <ng-container *ngIf="!comment?.picUrl || comment?.picUrl == ''">
{{comment.createTime | date:'yyyy-MM-dd'}} <span>·</span> <img src="./assets/imgs/man.png" class="contact-img"
<span class="repear" (click)="openMask(comment)">回复</span> *ngIf="comment.userGender =='1'||comment.userGender==null">
<span *ngIf="comment.replyNum > 0" class="repear" (click)="commentSearch(comment)">查看回复({{comment.replyNum}})</span> <img src="./assets/imgs/woman.png" class="contact-img" *ngIf="comment.userGender =='0'">
</p> </ng-container>
</ion-col> </ion-col>
</ion-row> <ion-col col-10 style="border-bottom: 1px solid #eee;">
</div> <p class="comment-info">
{{comment.username}}
</p>
<p class="commnet-content">
{{comment.content}}
</p>
<p class="comment-time">
{{comment.createTime | date:'yyyy-MM-dd'}} <span>·</span>
<span class="repear" (click)="openMask(comment)">回复</span>
<span *ngIf="comment.replyNum > 0" class="repear"
(click)="commentSearch(comment)">查看回复({{comment.replyNum}})</span>
</p>
</ion-col>
</ion-row>
</div>
</div>
</div> </div>
</div>
</ion-content> </ion-content>
<div *ngIf="footerView" class="stuff-footer"> <div *ngIf="footerView" class="stuff-footer">
<ion-row> <ion-row>
<ion-col col-6>
<div class="input" (click)="openComment()">欢迎发表你的观点</div>
</ion-col>
<ion-col col-2>
<ion-icon name="chatboxes"></ion-icon>
<span class="tip-num">{{countObj?.commentCount}}</span>
</ion-col>
<ion-col col-2 (click)="collectionHandle()">
<ion-icon #collection [ngClass]="countObj?.collection == true?'main-color':''" name="heart"></ion-icon>
<span class="tip-num">{{countObj?.collectionCount}}</span>
</ion-col>
<ion-col col-2 (click)="likeHandle()">
<ion-icon #like [ngClass]="countObj?.like == true?'main-color':''" name="thumbs-up"></ion-icon>
<span class="tip-num">{{countObj?.likeCount}}</span>
</ion-col>
</ion-row>
</div>
<div class="error-text" *ngIf="reply">
<div class="error-flex">
<div class="padding-10">
<textarea [(ngModel)]="replyContent" class="content-textarea" placeholder="{{replyText}}"></textarea>
</div>
<div class="error-footer">
<ion-row>
<ion-col col-6> <ion-col col-6>
<button (click)="replyHandle()" class="sure">发布</button> <div class="input" (click)="openComment()">欢迎发表你的观点</div>
</ion-col> </ion-col>
<ion-col col-6> <ion-col col-2>
<button (click)="cancel()" class="cancel">取消</button> <ion-icon name="chatboxes"></ion-icon>
<span class="tip-num">{{countObj?.commentCount}}</span>
</ion-col>
<ion-col col-2 (click)="collectionHandle()">
<ion-icon #collection [ngClass]="countObj?.collection == true?'main-color':''" name="heart"></ion-icon>
<span class="tip-num">{{countObj?.collectionCount}}</span>
</ion-col>
<ion-col col-2 (click)="likeHandle()">
<ion-icon #like [ngClass]="countObj?.like == true?'main-color':''" name="thumbs-up"></ion-icon>
<span class="tip-num">{{countObj?.likeCount}}</span>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div>
<div class="error-text" *ngIf="reply">
<div class="error-flex">
<div class="padding-10">
<textarea [(ngModel)]="replyContent" class="content-textarea" placeholder="{{replyText}}"></textarea>
</div>
<div class="error-footer">
<ion-row>
<ion-col col-6>
<button (click)="replyHandle()" class="sure">发布</button>
</ion-col>
<ion-col col-6>
<button (click)="cancel()" class="cancel">取消</button>
</ion-col>
</ion-row>
</div>
</div> </div>
</div>
</div> </div>
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular'; import { IonicPageModule } from 'ionic-angular';
import { StuffDetailPage } from './stuff-detail'; import { StuffDetailPage } from './stuff-detail';
import {ComponentsModule} from "../../../components/components.module";
@NgModule({ @NgModule({
declarations: [ declarations: [
StuffDetailPage, StuffDetailPage,
], ],
imports: [ imports: [
IonicPageModule.forChild(StuffDetailPage), IonicPageModule.forChild(StuffDetailPage),
], ComponentsModule,
],
}) })
export class StuffDetailPageModule {} export class StuffDetailPageModule {}
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
<div class="swiper-slide"> <div class="swiper-slide">
<ion-content> <ion-content>
<div class="search-content"> <div class="search-content">
<ng-container *ngFor="let item of new"> <ng-container *ngFor="let item of new;">
<div *ngIf="obj.childrenName != '你问我答'" class="search-item" (click)="goToDetail(item)"> <div *ngIf="obj.childrenName != '你问我答'" class="search-item" (click)="goToDetail(item)" >
<p class="item-info"> <p class="item-info">
<span class="item-source">{{item.source}}</span> <span class="item-source">{{item.source}}</span>
<span>{{item.publishTime | date:'yyyy-MM-dd'}}</span> <span>{{item.publishTime | date:'yyyy-MM-dd'}}</span>
...@@ -132,8 +132,8 @@ ...@@ -132,8 +132,8 @@
<ion-icon *ngIf="new.topTime" <ion-icon *ngIf="new.topTime"
class="icon-fire iconfont"></ion-icon> class="icon-fire iconfont"></ion-icon>
</p> </p>
<div (click)="clickVideo($event)"> <div>
<video width="100%" height="100%" <video width="100%" height="100%" (play)="clickVideo($event)"
controls="controls" preload="metadata" muted="muted"> controls="controls" preload="metadata" muted="muted">
<source [src]="picture +item.path+ '#t=0.1' "> <source [src]="picture +item.path+ '#t=0.1' ">
您的浏览器不支持 html5。 您的浏览器不支持 html5。
......
import {Component, ElementRef, NgZone, Renderer2, ViewChild} from '@angular/core'; import {Component, ElementRef, HostListener, NgZone, Renderer2, ViewChild} from '@angular/core';
import {Content, InfiniteScrollContent, IonicPage, NavController, NavParams, Slide, Slides} from 'ionic-angular'; import {Content, InfiniteScrollContent, IonicPage, NavController, NavParams, Slide, Slides} from 'ionic-angular';
import {SearchNewPage} from "../../home-pages/search-new/search-new"; import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {TabsService} from "../tabs.service"; import {TabsService} from "../tabs.service";
...@@ -516,7 +516,6 @@ export class DiscoverPage { ...@@ -516,7 +516,6 @@ export class DiscoverPage {
) )
} }
//前往搜索页面 //前往搜索页面
goToSearch() { goToSearch() {
this.navCtrl.push(SearchNewPage); this.navCtrl.push(SearchNewPage);
...@@ -558,7 +557,15 @@ export class DiscoverPage { ...@@ -558,7 +557,15 @@ export class DiscoverPage {
this.navCtrl.push('SelectTypePage', {type: 'issue'}); this.navCtrl.push('SelectTypePage', {type: 'issue'});
} }
//列表视频不同时播放
clickVideo(e) { clickVideo(e) {
console.log(e); const videoArr = document.querySelectorAll("video");
for (let i = 0; i < videoArr.length; i++) {
if (videoArr[i] != e.target) {
videoArr[i].pause();
}
}
} }
} }
...@@ -3,18 +3,13 @@ import {NavController, IonicPage, Slides, Content, InfiniteScrollContent, FabLis ...@@ -3,18 +3,13 @@ import {NavController, IonicPage, Slides, Content, InfiniteScrollContent, FabLis
import {Http, Response} from '@angular/http'; import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service'; import {AppService, AppGlobal} from '../../../service/http.service';
import {Storage} from '@ionic/storage'; import {Storage} from '@ionic/storage';
import {NoticePage} from "../notice/notice";
import {Badge} from '@ionic-native/badge'; import {Badge} from '@ionic-native/badge';
import {TabsService} from "../tabs.service"; import {TabsService} from "../tabs.service";
import {CommonService} from "../../../provide/common.service"; import {CommonService} from "../../../provide/common.service";
import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail"; import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
import {EmitService} from "../../../provide/emit.service"; import {EmitService} from "../../../provide/emit.service";
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {SlideListComponent} from "../../../components/slide-list/slide-list";
import {interval} from "rxjs/observable/interval";
import {SwiperComponent} from "../../../components/swiper/swiper"; import {SwiperComponent} from "../../../components/swiper/swiper";
import {VideoPlayer} from "@ionic-native/video-player";
declare let Swiper: any; declare let Swiper: any;
...@@ -90,7 +85,6 @@ export class HomePage { ...@@ -90,7 +85,6 @@ export class HomePage {
public commonSer: CommonService, public emitSer: EmitService, public commonSer: CommonService, public emitSer: EmitService,
public zone: NgZone, public tabSer: TabsService, public zone: NgZone, public tabSer: TabsService,
public renderer: Renderer2, public renderer: Renderer2,
private swiper: SwiperComponent, private videoPlayer: VideoPlayer,
public appService: AppService, public http: Http, public storage: Storage, public appService: AppService, public http: Http, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) { public badge: Badge, public tabsSer: TabsService) {
......
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