Commit 6707b9e2 authored by wangqinghua's avatar wangqinghua

api update

parent c2837c03
<ion-content> <ion-content>
<div class="padding-20-10"> <div class="padding-20-10">
<p class="title">{{title}}
<ion-icon (click)="dismiss()" class="close" name="close"></ion-icon>
</p>
<ion-row> <ion-row>
<ion-col col-4 *ngFor="let item of list" (click)="chooseItem(item)"> <ion-col col-4 *ngFor="let item of list" (click)="chooseItem(item)">
<div class="item-style" [ngClass]="type == item.type?'select':''"> <div class="item-style" [ngClass]="type == item.type?'select':''">
...@@ -7,6 +10,5 @@ ...@@ -7,6 +10,5 @@
</div> </div>
</ion-col> </ion-col>
</ion-row> </ion-row>
<button style="margin-top: 50px" class="margin-5" small color="danger" ion-button (click)="dismiss()">确定</button>
</div> </div>
</ion-content> </ion-content>
filter { filter {
.item-style{ .item-style {
text-align: center; text-align: center;
background-color: #f2f2f2; background-color: #f2f2f2;
border-radius: 6px; border-radius: 6px;
padding: 4px 2px; padding: 4px 2px;
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
} }
.select{
.select {
background-color: #fdf8f2; background-color: #fdf8f2;
border: 1px solid #fdf8f2; border: 1px solid #fdf8f2;
color: #e42417; color: #e42417;
} }
.title {
text-align: center;
margin-bottom: 20px;
position: relative;
font-family: SourceHanSans-Bold;
font-size: 2rem;
font-weight: 300;
}
.close {
font-size: 4rem;
position: absolute;
right: 10px;
top: -12px;
font-weight: bold;
color: #666;
}
} }
...@@ -13,6 +13,7 @@ import {NavParams, ViewController} from "ionic-angular"; ...@@ -13,6 +13,7 @@ import {NavParams, ViewController} from "ionic-angular";
export class FilterComponent { export class FilterComponent {
list = []; list = [];
title; //标题
choose; choose;
type; type;
...@@ -21,6 +22,7 @@ export class FilterComponent { ...@@ -21,6 +22,7 @@ export class FilterComponent {
private viewCtrl: ViewController) { private viewCtrl: ViewController) {
this.list = this.params.get("list"); this.list = this.params.get("list");
this.type = this.params.get("type"); this.type = this.params.get("type");
this.title = this.params.get("title");
console.log(this.type); console.log(this.type);
} }
......
...@@ -100,7 +100,7 @@ export class GoodsCollectPage { ...@@ -100,7 +100,7 @@ export class GoodsCollectPage {
//打开过滤条件 //打开过滤条件
fliter() { fliter() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.typeList, type: this.obj.type}, { let modal = this.modalCtrl.create(FilterComponent, {list: this.typeList, type: this.obj.type,title: '物品分类'}, {
enterAnimation: 'modal-from-right-enter', enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave' leaveAnimation: 'modal-from-right-leave'
}); });
......
This diff is collapsed.
...@@ -103,7 +103,7 @@ export class VistorRegisterPage { ...@@ -103,7 +103,7 @@ export class VistorRegisterPage {
//取消预定 //取消预定
removeItem(item) { removeItem(item) {
this.serveSer.cancelApply(item.id).subscribe( this.serveSer.cancelVisitor(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
this.commonSer.toast('取消预定成功'); this.commonSer.toast('取消预定成功');
......
...@@ -187,6 +187,7 @@ export class DiscoverPage { ...@@ -187,6 +187,7 @@ export class DiscoverPage {
"plateType": null, //分类 "plateType": null, //分类
"parentName": null, "parentName": null,
"childrenName": null, "childrenName": null,
"branchId": null
}; };
resourceType = 1; //1 标题图片 2 轮播图 3 视频 resourceType = 1; //1 标题图片 2 轮播图 3 视频
relatePlateType; //关联主题教育 relatePlateType; //关联主题教育
...@@ -273,7 +274,13 @@ export class DiscoverPage { ...@@ -273,7 +274,13 @@ export class DiscoverPage {
getBranch() { getBranch() {
this.tabsSer.getBranchList().subscribe( this.tabsSer.getBranchList().subscribe(
(res) => { (res) => {
this.branchList = res.data; this.branchList = res.data.map(e => {
const d = {
type: e.id,
name: e.name
};
return d;
});
} }
) )
} }
...@@ -409,7 +416,8 @@ export class DiscoverPage { ...@@ -409,7 +416,8 @@ export class DiscoverPage {
obj: { obj: {
'plateType': this.obj.plateType, 'plateType': this.obj.plateType,
'resourceType': this.resourceType, 'resourceType': this.resourceType,
"relatePlateType": this.relatePlateType "relatePlateType": this.relatePlateType,
"branchId": this.obj.branchId
} }
}; };
this.tabsSer.stuffPage(data).subscribe( this.tabsSer.stuffPage(data).subscribe(
...@@ -632,7 +640,11 @@ export class DiscoverPage { ...@@ -632,7 +640,11 @@ export class DiscoverPage {
//多模块 //多模块
moreTab() { moreTab() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.tabsList, type: this.obj.plateType}, { let modal = this.modalCtrl.create(FilterComponent, {
list: this.tabsList,
type: this.obj.plateType,
title: '我的频道'
}, {
enterAnimation: 'modal-from-right-enter', enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave' leaveAnimation: 'modal-from-right-leave'
}); });
...@@ -645,7 +657,11 @@ export class DiscoverPage { ...@@ -645,7 +657,11 @@ export class DiscoverPage {
} }
moreParty() { moreParty() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.branchList, type: this.obj.plateType}, { let modal = this.modalCtrl.create(FilterComponent, {
list: this.branchList,
type: this.obj.plateType,
title: '党支部'
}, {
enterAnimation: 'modal-from-right-enter', enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave' leaveAnimation: 'modal-from-right-leave'
}); });
......
...@@ -442,7 +442,7 @@ export class HomePage { ...@@ -442,7 +442,7 @@ export class HomePage {
//多模块 //多模块
moreTab() { moreTab() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.tabsList, type: this.plateType}, { let modal = this.modalCtrl.create(FilterComponent, {list: this.tabsList, type: this.plateType, title: '我的频道'}, {
enterAnimation: 'modal-from-right-enter', enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave' leaveAnimation: 'modal-from-right-leave'
}); });
......
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