Commit 77bba691 authored by wangqinghua's avatar wangqinghua

我的发布

我的收藏
parent e58cc90a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://47.103.33.196:8080/wisdomgroup" "proxyUrl": "http://192.168.2.235:8080/wisdomgroup"
} }
] ]
} }
\ No newline at end of file
#Tue May 14 17:13:00 CST 2019 #Wed May 15 13:05:04 CST 2019
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0 base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0
renamed.0=classes.dex renamed.0=classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex
...@@ -395,4 +395,29 @@ a[disabled], button[disabled], [ion-button][disabled], ...@@ -395,4 +395,29 @@ a[disabled], button[disabled], [ion-button][disabled],
text-align: center; text-align: center;
color: #999; color: #999;
padding-bottom: 5px; padding-bottom: 5px;
}
//相机的actionsheet
.cameraAction {
.action-sheet-wrapper{
.action-sheet-container{
padding: 0;
.action-sheet-group{
border-radius: 0px;
.action-sheet-button{
color: #444444;
min-height: 4rem;
padding: 10px;
font-size: 1.8rem;
}
}
.action-sheet-group.action-sheet-group-cancel {
margin-bottom: 0;
.action-sheet-button{
color: #333333;
font-weight: 500;
}
}
}
}
} }
\ No newline at end of file
...@@ -73,5 +73,29 @@ page-publish { ...@@ -73,5 +73,29 @@ page-publish {
max-height: 100px; max-height: 100px;
} }
} }
}
//文章发布的actionsheet
.stuffAction {
.action-sheet-wrapper{
.action-sheet-container{
padding: 0;
.action-sheet-group{
border-radius: 0px;
.action-sheet-button{
color: #e42417;
min-height: 4rem;
padding: 10px;
font-size: 1.8rem;
}
}
.action-sheet-group.action-sheet-group-cancel {
margin-bottom: 0;
.action-sheet-button{
color: #444444;
font-weight: 500;
}
}
}
}
color: #e42417;
} }
...@@ -66,6 +66,7 @@ export class PublishPage { ...@@ -66,6 +66,7 @@ export class PublishPage {
tackePic() { tackePic() {
const actionSheet = this.actionSheetCtrl.create({ const actionSheet = this.actionSheetCtrl.create({
cssClass:'cameraAction',
buttons: [ buttons: [
{ {
text: '拍照', text: '拍照',
...@@ -255,7 +256,7 @@ export class PublishPage { ...@@ -255,7 +256,7 @@ export class PublishPage {
return false; return false;
} }
if(!this.obj.content){ if(!this.obj.content){
this.commonSer.toast('请输入内容!'); this.commonSer.toast('请输入发布内容!');
return false; return false;
} }
return true; return true;
...@@ -265,6 +266,7 @@ export class PublishPage { ...@@ -265,6 +266,7 @@ export class PublishPage {
handle(){ handle(){
const actionSheet = this.actionSheetCtrl.create({ const actionSheet = this.actionSheetCtrl.create({
title: '', title: '',
cssClass:'stuffAction',
buttons: [ buttons: [
{ {
text: '预览', text: '预览',
......
import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } } import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } //上传头像 imageUpload(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', data); } //获取个人头像 showImgByFileid(data): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/' + data); } }
\ No newline at end of file \ No newline at end of file
......
...@@ -8,6 +8,38 @@ ...@@ -8,6 +8,38 @@
</ion-header> </ion-header>
<ion-content padding> <ion-content>
<div class="main-news">
<ng-container *ngFor="let new of collectionList;">
<ng-container *ngIf="new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-8 class="news-left">
<p class="news-title">
{{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p>
<p class="news-end">
<span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
<ion-col col-4 class="news-right">
<img src="{{picture+new.imgUrl}}">
</ion-col>
</ion-row>
</ng-container>
<ng-container *ngIf="!new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-12 class="news-left">
<p class="news-title">
{{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p>
<p class="news-end">
<span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container>
</div>
</ion-content> </ion-content>
page-my-collection { page-my-collection {
//新闻区
.main-news {
padding: 0 1rem;
text-align: left;
.news-item {
padding: .8rem 0;
.news-left {
display: flex;
flex-flow: row wrap;
min-height: 100%;
.news-title {
align-self: flex-start;
font-weight: bold;
width: 100%;
margin-bottom: .6rem;
color: #333333;
font-size: 1.6rem;
font-family: SourceHanSans-Bold;
position: relative;
.icon-fire{
position: absolute;
top: 3px;
left: -14px;
font-size: 1.5rem;
color: #e42417;
}
}
.news-end {
color: #989898;
}
}
.news-right {
text-align: center;
img {
border-radius: .5rem;
height: 60px;
}
}
}
.news-item + .news-item {
border-top: 1px solid #eeeeee;
}
}
} }
import { Component } from '@angular/core'; import {Component} from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {MineService} from "../mine.service"; import {MineService} from "../mine.service";
import {AppGlobal} from "../../../service/http.service"; import {AppGlobal} from "../../../service/http.service";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
@IonicPage() @IonicPage()
@Component({ @Component({
selector: 'page-my-collection', selector: 'page-my-collection',
templateUrl: 'my-collection.html', templateUrl: 'my-collection.html',
}) })
export class MyCollectionPage { export class MyCollectionPage {
pageNum = 1; pageNum = 1;
pageCount = AppGlobal.pageCount; pageCount = AppGlobal.pageCount;
constructor(public navCtrl: NavController, public navParams: NavParams, collectionList = [];
public mineSer:MineService) { picture: string = AppGlobal.domain + '/wisdomgroup';
}
ionViewDidLoad() { constructor(public navCtrl: NavController, public navParams: NavParams,
this.getList(); public mineSer: MineService) {
} }
getList(){ ionViewDidEnter() {
const data = { this.getList();
pageNum:this.pageNum, }
pageCount:this.pageCount
};
this.mineSer.myCollection(data).subscribe(
(res)=>{
} getList() {
) const data = {
} pageNum: this.pageNum,
pageCount: this.pageCount
};
this.mineSer.myCollection(data).subscribe(
(res) => {
this.collectionList = res.data.list;
}
)
}
//查看文章详情
goToDetail(item) {
this.navCtrl.push(StuffDetailPage, {
id: item.id
})
}
} }
...@@ -7,6 +7,38 @@ ...@@ -7,6 +7,38 @@
</ion-header> </ion-header>
<ion-content padding> <ion-content>
<div class="main-news">
<ng-container *ngFor="let new of publicList;">
<ng-container *ngIf="new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-8 class="news-left">
<p class="news-title">
{{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p>
<p class="news-end">
<span>发布时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
<ion-col col-4 class="news-right">
<img src="{{picture+new.imgUrl}}">
</ion-col>
</ion-row>
</ng-container>
<ng-container *ngIf="!new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-12 class="news-left">
<p class="news-title">
{{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p>
<p class="news-end">
<span>发布时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container>
</div>
</ion-content> </ion-content>
page-my-publish { page-my-publish {
//新闻区
.main-news {
padding: 0 1rem;
text-align: left;
.news-item {
padding: .8rem 0;
.news-left {
display: flex;
flex-flow: row wrap;
min-height: 100%;
.news-title {
align-self: flex-start;
font-weight: bold;
width: 100%;
margin-bottom: .6rem;
color: #333333;
font-size: 1.6rem;
font-family: SourceHanSans-Bold;
position: relative;
.icon-fire{
position: absolute;
top: 3px;
left: -14px;
font-size: 1.5rem;
color: #e42417;
}
}
.news-end {
color: #989898;
}
}
.news-right {
text-align: center;
img {
border-radius: .5rem;
height: 60px;
}
}
}
.news-item + .news-item {
border-top: 1px solid #eeeeee;
}
}
} }
...@@ -2,6 +2,7 @@ import { Component } from '@angular/core'; ...@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppGlobal} from "../../../service/http.service"; import {AppGlobal} from "../../../service/http.service";
import {MineService} from "../mine.service"; import {MineService} from "../mine.service";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
/** /**
* Generated class for the MyPublishPage page. * Generated class for the MyPublishPage page.
...@@ -17,8 +18,10 @@ import {MineService} from "../mine.service"; ...@@ -17,8 +18,10 @@ import {MineService} from "../mine.service";
}) })
export class MyPublishPage { export class MyPublishPage {
pageNum; pageNum = 1;
pageCount = AppGlobal.pageCount; pageCount = AppGlobal.pageCount;
publicList = [];
picture: string = AppGlobal.domain + '/wisdomgroup';
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public mineSer:MineService) { public mineSer:MineService) {
} }
...@@ -32,10 +35,17 @@ export class MyPublishPage { ...@@ -32,10 +35,17 @@ export class MyPublishPage {
pageNum:this.pageNum, pageNum:this.pageNum,
pageCount:this.pageCount pageCount:this.pageCount
}; };
this.mineSer.myCollection(data).subscribe( this.mineSer.myPublish(data).subscribe(
(res)=>{ (res)=>{
this.publicList = res.data.list;
} }
) )
} }
//查看文章详情
goToDetail(item) {
this.navCtrl.push(StuffDetailPage, {
id: item.id
})
}
} }
...@@ -7,6 +7,8 @@ import {AppGlobal, AppService} from "../../../../service/http.service"; ...@@ -7,6 +7,8 @@ import {AppGlobal, AppService} from "../../../../service/http.service";
import {EditPersonInfoPage} from '../editPersonInfo/editPersonInfo'; import {EditPersonInfoPage} from '../editPersonInfo/editPersonInfo';
import {FileTransferObject, FileUploadOptions, FileTransfer} from "@ionic-native/file-transfer"; import {FileTransferObject, FileUploadOptions, FileTransfer} from "@ionic-native/file-transfer";
import {CommonService} from "../../../../provide/common.service"; import {CommonService} from "../../../../provide/common.service";
import {TabsService} from "../../../tabs/tabs.service";
import {MineService} from "../../../mine-pages/mine.service";
@IonicPage() @IonicPage()
...@@ -24,13 +26,13 @@ export class PersonInfoPage { ...@@ -24,13 +26,13 @@ export class PersonInfoPage {
picture: string = AppGlobal.picture; picture: string = AppGlobal.picture;
constructor(public navCtrl: NavController,public camera:Camera,public commonSer:CommonService, constructor(public navCtrl: NavController,public camera:Camera,public commonSer:CommonService,
public storage: Storage,public actionSheetCtrl:ActionSheetController, public storage: Storage,public actionSheetCtrl:ActionSheetController,public tabSer:TabsService,
public mineSer:MineService,
public appService: AppService,public loadingCtrl:LoadingController, public appService: AppService,public loadingCtrl:LoadingController,
public toast: ToastController,public transfer: FileTransfer,) { public toast: ToastController,public transfer: FileTransfer,) {
} }
//ionViewDidLoad():void{
ionViewWillEnter(): void { ionViewWillEnter(): void {
this.user = this.storage.get("user").then((value) => { this.user = this.storage.get("user").then((value) => {
this.user = value; this.user = value;
...@@ -39,6 +41,11 @@ export class PersonInfoPage { ...@@ -39,6 +41,11 @@ export class PersonInfoPage {
let data = result; let data = result;
this.orgName = data["orgName"]; this.orgName = data["orgName"];
}); });
this.mineSer.showImgByFileid(this.user.userDetail.user.picUrl).subscribe(
(res)=>{
}
)
}); });
} }
...@@ -65,6 +72,7 @@ export class PersonInfoPage { ...@@ -65,6 +72,7 @@ export class PersonInfoPage {
//选择头像 //选择头像
tackePic() { tackePic() {
const actionSheet = this.actionSheetCtrl.create({ const actionSheet = this.actionSheetCtrl.create({
cssClass:'cameraAction',
buttons: [ buttons: [
{ {
text: '拍照', text: '拍照',
...@@ -127,7 +135,7 @@ export class PersonInfoPage { ...@@ -127,7 +135,7 @@ export class PersonInfoPage {
}); });
uploadLoading.present(); uploadLoading.present();
const fileTransfer: FileTransferObject = this.transfer.create(); const fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/upload1', options).then( fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', options).then(
(res) => { (res) => {
uploadLoading.dismiss(); uploadLoading.dismiss();
this.commonSer.toast('上传成功'); this.commonSer.toast('上传成功');
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyPublishPage')"> <ion-row (click)="goTo('MyPublishPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdzb.png" alt=""> <img src="./assets/imgs/mine/wdfb.png" alt="">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的发布</span> <span>我的发布</span>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyCollectionPage')"> <ion-row (click)="goTo('MyCollectionPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdzb.png" alt=""> <img src="./assets/imgs/mine/wdsc.png" alt="">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的收藏</span> <span>我的收藏</span>
......
...@@ -8,6 +8,9 @@ page-mine { ...@@ -8,6 +8,9 @@ page-mine {
background-color: #fff; background-color: #fff;
.mine-item { .mine-item {
padding: 1rem 0; padding: 1rem 0;
img{
border-radius: 5px;
}
} }
.mine-info { .mine-info {
......
...@@ -124,7 +124,7 @@ export class TabsService { ...@@ -124,7 +124,7 @@ export class TabsService {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/twissign/signNow'); return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/twissign/signNow');
} }
//查询党员生日
getInfo(params): Observable<any> { getInfo(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/auth4/user/getInfo/' + params); return this.http.get(AppGlobal.domain + '/wisdomgroup/auth4/user/getInfo/' + params);
} }
......
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