Commit c5a3660a authored by wangqinghua's avatar wangqinghua

上传进度

parent ab1071c7
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://47.103.35.216:8080/wisdomgroup"
"proxyUrl": "http://192.168.2.235:8080/wisdomgroup"
}
]
}
\ No newline at end of file
}
This diff is collapsed.
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":303},"path":"app-debug.apk","properties":{"packageId":"io.ionic.partyCloud.starter.test","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":305},"path":"app-debug.apk","properties":{"packageId":"io.ionic.partyCloud.starter.test","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
......@@ -176,7 +176,7 @@ document.getElementById(id).style.display = 'none';
<span class="mdl-layout-title">Lint Report: 1 error</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation mdl-layout--large-screen-only">
Check performed at Wed May 15 17:47:29 CST 2019 </nav>
Check performed at Mon May 20 10:39:15 CST 2019 </nav>
</div>
</header>
<div class="mdl-layout__drawer">
......
......@@ -175,7 +175,6 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
width: 100%;
.tabs-parent {
position: relative;
margin-bottom: .5rem;
font-size: 1.7rem;
white-space: nowrap;
background-color: #fff1f0;
......@@ -210,7 +209,7 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
#tips,.tips {
position: absolute;
bottom: 0px;
bottom: 1px;
height: 2px;
width: 3rem;
background-color: #e12724;
......@@ -394,7 +393,7 @@ a[disabled], button[disabled], [ion-button][disabled],
font-size: 2.5rem;
}
50%{
font-size: 3.5rem;
font-size: 4.2rem;
}
100%{
font-size: 2.5rem;
......@@ -429,4 +428,4 @@ a[disabled], button[disabled], [ion-button][disabled],
}
}
}
}
\ No newline at end of file
}
......@@ -5,8 +5,11 @@
</ion-slide>
</ion-slides>
</div>
<p class="slides-title" *ngIf="slidersItems.length>0">
{{slideTitle}}<span class="slide-index" float-end>
<div class="slides-title" *ngIf="slidersItems.length>0">
<div class="slide-content">
{{slideTitle}}
</div>
<span class="slide-index">
<span>{{slideIndex}}</span><span>/{{slidersItems.length}}</span>
</span>
</p>
\ No newline at end of file
</div>
......@@ -43,8 +43,18 @@ slide {
padding: 0 1rem;
font-size: 1.4rem;
font-weight: 500;
position: relative;
font-family: "Microsoft YaHei";
.slide-content{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
width: 93%;
}
.slide-index{
position: absolute;
top: 2px;
right: 10px;
color: #e42417;
font-weight: 400;
span:first-child{
......
......@@ -39,9 +39,6 @@ export class SlideComponent implements AfterViewInit{
this.slidersItems = res.data.list;
if(this.slidersItems.length > 0){
this.slidersItems.forEach(e => {
if (e.title.length > 16) {
e.title = e.title.substr(0, 20) + '...';
}
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
}
......
......@@ -111,7 +111,7 @@ export class PublishPage {
const option: FileUploadOptions = {
httpMethod: 'POST',
headers: {
'Accept': 'application/json', //不加入 发生错误!!
'Accept': 'application/json',
},
fileName:'image.png'
};
......@@ -198,6 +198,11 @@ export class PublishPage {
uploadLoading.dismiss();
this.commonSer.toast('上传错误');
});
fileTransfer.onProgress((listener)=>{
let per =<any> (listener.loaded / listener.total) *100;
per = Math.round(per*Math.pow(10,2))/Math.pow(10,2)
uploadLoading.setContent('上传中...' + per + '%' );
})
}
//发布
......@@ -231,7 +236,7 @@ export class PublishPage {
plateType: this.obj.type,
source: '上海市委组织部',
publishStatus: '2', //已提交
content: content,
content: `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` + content,
publishRange: this.obj.publishRange,
submitter: this.userid,
stuffType: this.type === 'image'?1:2, //图片 1 视频 2
......@@ -249,7 +254,6 @@ export class PublishPage {
})
}
check(){
if(!this.obj.title){
this.commonSer.toast('请输入文章标题!');
......@@ -290,7 +294,7 @@ export class PublishPage {
title:this.obj.title,
source: '上海市委组织部',
publishTime:new Date().getTime(),
content:content,
content:`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` + content ,
attachments:this.fileList,
}
this.navCtrl.push('PreviewPage',{
......
......@@ -101,7 +101,7 @@ export class PersonInfoPage {
const option: FileUploadOptions = {
httpMethod: 'post',
headers: {
'Accept': 'application/json', //不加入 发生错误!!
'Accept': 'application/json',
},
fileName:'image.png'
};
......@@ -133,6 +133,11 @@ export class PersonInfoPage {
uploadLoading.dismiss();
this.commonSer.toast('上传错误');
});
fileTransfer.onProgress((listener)=>{
let per =<any> (listener.loaded / listener.total) *100;
per = Math.round(per*Math.pow(10,2))/Math.pow(10,2)
uploadLoading.setContent('上传中...' + per + '%' );
})
}
goBack() {
......
......@@ -6,6 +6,12 @@
<ion-icon class="search-icon" name="search"></ion-icon>
</button>
</ion-buttons>
<ion-buttons>
积分
</ion-buttons>
<ion-buttons>
庆华
</ion-buttons>
<ion-buttons end>
<button ion-button icon-only (click)="signNow()" class="toolbar-signUp">
<span class="signUp-span">
......@@ -22,6 +28,7 @@
</ion-buttons>
</ion-navbar>
</ion-header>
<ion-content overflow-scroll="false">
<ion-refresher (ionRefresh)="doRefresh($event)">
<ion-refresher-content pullingText="下拉刷新"
......@@ -47,8 +54,8 @@
<slide (done)="goToDetail($event)"></slide>
</div>
<!--true 隐藏 false 显示-->
<div [hidden]="isScroll" class="news-content">
<div class="tabs-parent">
<div [hidden]="isScroll" class="news-content parent">
<div class="tabs-parent parent">
<div *ngFor="let item of tabsList;let i = index" (click)="change(item)" class="tabs-children">
<span #tabSpan [ngClass]="{'selectTab':index == i}">{{item.name}}</span>
</div>
......@@ -57,8 +64,8 @@
</div>
<!--固定 false -->
<div [hidden]="!isScroll" ion-fixed class="news-content ion-fixed">
<div class="tabs-parent">
<div [hidden]="!isScroll" ion-fixed class="news-content ion-fixed parent">
<div class="tabs-parent parent">
<div *ngFor="let item of tabsList;let i = index" (click)="change(item)" class="tabs-children">
<span #tabSpan1 [ngClass]="{'selectTab':index == i}">{{item.name}}</span>
</div>
......
......@@ -111,6 +111,12 @@ page-home {
.news-content.ion-fixed{
margin: 0;
}
.parent.tabs-parent{
background-color: #fff1f0;
}
.parent.news-content{
background-color: #fff1f0;
}
.ion-fixed + ion-slides{
margin-top: 2rem;
}
......
import {Component, ElementRef, ViewChild, NgZone, Renderer2, Input} from '@angular/core';
import {NavController, IonicPage, Slides, Content, InfiniteScrollContent} from 'ionic-angular';
import {NavController, IonicPage, Slides, Content, InfiniteScrollContent, FabList, FabContainer} from 'ionic-angular';
import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service';
import {Storage} from '@ionic/storage';
......@@ -22,7 +22,6 @@ import {SlideComponent} from "../../../components/slide/slide";
})
export class HomePage {
@ViewChild(Slides) slides1: Slides;
@ViewChild(Content) content: Content;
@ViewChild('tips') tips: ElementRef;
......@@ -47,10 +46,11 @@ export class HomePage {
// {name: "本市部署", type: 4, index: 3}
// ];
tabsList = [
{name: "系列讲话", type: 2, index: 0},
{name: "党章党规", type: 1, index: 1},
{name: "中央精神", type: 3, index: 2},
{name: "本市部署", type: 4, index: 3}
{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}
];
isSign = false; //签到弹窗
isBir = false; //政治生日弹窗
......@@ -68,6 +68,7 @@ export class HomePage {
partyObj; //政治生日
plateType;
isRecent = 1; //0 否 1是
index = 0;
slideList = [];
......@@ -105,6 +106,7 @@ export class HomePage {
);
}
ionViewDidLoad() {
this.change(this.tabsList[0]);
this.itemWidth = window.screen.width / 4;
......@@ -134,6 +136,11 @@ export class HomePage {
this.loadMore = true;
// this.infiniteScrollContent.inf.enable(true);
this.index = item.index;
if(item.type == 0){
this.isRecent = 1;
}else{
this.isRecent = 0;
}
// 自身div的一半 - 滑块的一半
this.tips.nativeElement.style.left = this.itemWidth * (this.index) + (this.itemWidth - this.spanWidth) / 2 + 'px';
this.tips1.nativeElement.style.left = this.itemWidth * (this.index) + (this.itemWidth - this.spanWidth) / 2 + 'px';
......@@ -141,6 +148,7 @@ export class HomePage {
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
isRecent:this.isRecent,
obj: {
'plateType': this.plateType,
'resourceType': 1
......@@ -238,6 +246,7 @@ export class HomePage {
//签到倒计时
signNow() {
if(this.signObj.isSign == 'no') this.disabledClick = true;
this.isSign = true;
let totalTime = 5;
this.signText = '(倒计时' + totalTime + 's)';
......@@ -281,6 +290,7 @@ export class HomePage {
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
isRecent:this.isRecent,
obj: {
'plateType': this.plateType,
'resourceType': 1
......@@ -312,6 +322,7 @@ export class HomePage {
const data = {
pageNum: 1,
pageCount: this.pageCount,
isRecent:this.isRecent,
obj: {
'plateType': this.plateType,
'resourceType': 1
......
......@@ -15,9 +15,9 @@ export class AppGlobal {
//接口基地址
// static domain = "http://101.89.112.92:80"; //正式环境
// static domain = "http://192.168.2.235:8080"; //测试环境
// static domain = "http://47.103.33.196:8080"; //阿里云测试地址
static domain = "http://47.103.33.196:8080"; //阿里云测试地址
// static domain = "http://47.103.35.216:8080"; //阿里云正式地址
static domain = ""; //本地环境/
// static domain = ""; //本地环境
//图片地址
// static picture = AppGlobal.domain + "/wisdomgroup/manager/getIcon/"; //正式地址
......
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