Commit 2041eb8c authored by wangqinghua's avatar wangqinghua

删除 网络错误

parent ad9e8103
...@@ -166,6 +166,7 @@ ionic cordova plugin add cordova-plugin-badge ...@@ -166,6 +166,7 @@ ionic cordova plugin add cordova-plugin-badge
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup" "proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
"proxyUrl": "http://10.10.200.11:8080/wisdomgroup" "proxyUrl": "http://10.10.200.11:8080/wisdomgroup"
http://10.10.200.105:8080
如果build android 报错了请在platforms/build.gradle里面的最后添加如下代码: 如果build android 报错了请在platforms/build.gradle里面的最后添加如下代码:
configurations.all { configurations.all {
......
...@@ -50,7 +50,6 @@ export class ActivitySearchPage { ...@@ -50,7 +50,6 @@ export class ActivitySearchPage {
this.appService.popToastView('已保存该用户不参加','middle',1500); this.appService.popToastView('已保存该用户不参加','middle',1500);
this.searchUser(); this.searchUser();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -27,8 +27,7 @@ export class ActivityTrackPage { ...@@ -27,8 +27,7 @@ export class ActivityTrackPage {
let resultback = res.json(); let resultback = res.json();
this.activityList = resultback this.activityList = resultback
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<ion-navbar> <ion-navbar>
<ion-title>选择批次</ion-title> <ion-title>选择批次</ion-title>
<ion-buttons start> <ion-buttons start>
<button ion-button (click)="dismiss()"> <button ion-button (click)="cancel()">
<span ion-text class="color-fff" >取消</span> <span ion-text class="color-fff" >取消</span>
</button> </button>
</ion-buttons> </ion-buttons>
...@@ -18,10 +18,18 @@ ...@@ -18,10 +18,18 @@
<ion-content padding> <ion-content padding>
<ion-list radio-group [(ngModel)]="block" > <p>
<ng-container *ngIf="blockList.length > 0">
(最多可报
<span *ngIf="applyCount == 0 || !applyCount">{{ blockList.length}}</span>
<span *ngIf="applyCount != 0">{{applyCount}}</span>
个批次)
</ng-container>
</p>
<ion-list >
<ion-item *ngFor="let item of blockList;let i = index;" > <ion-item *ngFor="let item of blockList;let i = index;" >
<ion-label>{{item.batchName}}</ion-label> <ion-label>{{item.batchName}}</ion-label>
<ion-radio checked="false" value="{{i}}"></ion-radio> <ion-checkbox [(ngModel)]="item.check" ></ion-checkbox>
</ion-item> </ion-item>
</ion-list> </ion-list>
</ion-content> </ion-content>
page-block-modal { page-block-modal {
.item-ios,
.list-ios > .item-block:last-child, .list-ios > .item-wrapper:last-child .item-block{
border-top: 1px solid #dadada;
}
.list-ios .item-block .item-inner{
border: none;
}
} }
import { Component } from '@angular/core'; import {Component} from '@angular/core';
import { NavController, NavParams, ViewController} from 'ionic-angular'; import {NavController, NavParams, ViewController} from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
@Component({ @Component({
selector: 'page-block-modal', selector: 'page-block-modal',
templateUrl: 'block-modal.html', templateUrl: 'block-modal.html',
}) })
export class BlockModalPage { export class BlockModalPage {
blockList; blockList = [];
block; block;
constructor(public navCtrl: NavController, public navParams: NavParams, applyCount;
public viewCtrl: ViewController) {
}
ionViewDidLoad() { constructor(public navCtrl: NavController, public navParams: NavParams,
this.blockList = this.navParams.get('blockList'); public viewCtrl: ViewController,public appService:AppService) {
console.log(this.blockList); }
}
ionViewDidLoad() {
this.blockList = this.navParams.get('blockList');
this.applyCount = this.navParams.get('applyCount');
this.blockList.forEach(res=>{
res.check = false;
})
}
dismiss() { dismiss() {
this.viewCtrl.dismiss(this.blockList[this.block]);
let selectBatch = [];
console.log(selectBatch.length);
this.blockList.forEach(res=>{
if(res.check == true){
selectBatch.push(res);
}
});
if(this.applyCount > 0){
if(selectBatch.length > this.applyCount){
this.appService.popToastView('超过报名批次','middle',1500);
return false;
}
}
this.viewCtrl.dismiss(selectBatch);
}
cancel(){
this.viewCtrl.dismiss();
} }
} }
...@@ -84,7 +84,6 @@ export class JoinDetailPage { ...@@ -84,7 +84,6 @@ export class JoinDetailPage {
this.getList(); this.getList();
this.allPerson = this.items.length; this.allPerson = this.items.length;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -102,22 +101,6 @@ export class JoinDetailPage { ...@@ -102,22 +101,6 @@ export class JoinDetailPage {
}); });
} }
//未报名
noSign() {
// this.type = '2';
this.items = [];
this.isNoSignFlag = false;
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/notSignActivityList", {activityid: this.acitivityid})
.subscribe((res: Response) => {
let resultback = res.json();
// this.items = resultback;
this.notSign = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//已报名 //已报名
sign() { sign() {
// this.type = '3'; // this.type = '3';
...@@ -128,25 +111,6 @@ export class JoinDetailPage { ...@@ -128,25 +111,6 @@ export class JoinDetailPage {
let resultback = res.json(); let resultback = res.json();
this.signList = resultback; this.signList = resultback;
}, error => { }, error => {
this.appService.alert('网络异常!');
}
);
}
//不参加
notJoin() {
this.isNoSignFlag = true;
// this.type = '4';
this.notJoinService();
}
notJoinService() {
this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activityNon/", this.acitivityid)
.subscribe((res: Response) => {
// this.items = res.json().data;
this.noJoin = this.items.length;
}, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -176,14 +140,24 @@ export class JoinDetailPage { ...@@ -176,14 +140,24 @@ export class JoinDetailPage {
msg.present(); msg.present();
this.signAllService(); this.signAllService();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
//取消报名 //取消报名
cancelSignUp(item){ cancelSignUp(item){
this.appService.alert('确定取消该活动报名',(res)=>{
const data = {
'userid':item.id,
'id':''
}
this.appService.ObserverHttpGet("/wisdomgroup/modules/order/deleteOrder", data).
subscribe((res)=>{
this.appService.popToastView('取消报名成功!','middle',1500);
this.sign();
this.signAllService();
})
})
} }
search() { search() {
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
<ion-label>报名用户</ion-label> <ion-label>报名用户</ion-label>
<span class="lettr-space-1" item-right>{{personInfo?.name}}</span> <span class="lettr-space-1" item-right>{{personInfo?.name}}</span>
</ion-item> </ion-item>
<div>
<span>
</span>
</div>
<ion-item class="margin-top-10"> <ion-item class="margin-top-10">
<span>携带人数</span> <span>携带人数</span>
<span class="com" float-right> <span class="com" float-right>
......
...@@ -19,6 +19,7 @@ export class ReplaceApplyPage { ...@@ -19,6 +19,7 @@ export class ReplaceApplyPage {
activity; //活动信息 activity; //活动信息
batchList; //批次列表 batchList; //批次列表
item; //批次信息 item; //批次信息
selectBatchList; //选择的批次列表
itemName = '请选择批次'; itemName = '请选择批次';
//报名信息 //报名信息
...@@ -54,7 +55,6 @@ export class ReplaceApplyPage { ...@@ -54,7 +55,6 @@ export class ReplaceApplyPage {
this.activity = res.json(); this.activity = res.json();
this.batchList = this.activity.batchList; this.batchList = this.activity.batchList;
}, (error) => { }, (error) => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -80,11 +80,18 @@ export class ReplaceApplyPage { ...@@ -80,11 +80,18 @@ export class ReplaceApplyPage {
//选择批次 //选择批次
selectblock() { selectblock() {
let modal = this.modalCtrl.create(BlockModalPage, {blockList: this.batchList}); let modal = this.modalCtrl.create(BlockModalPage, {blockList: this.batchList,applyCount:this.activity.applyCount});
modal.onDidDismiss(res => { modal.onDidDismiss(res => {
let minPerNumber = 5;
if (res) { if (res) {
this.item = res; this.selectBatchList = res;
this.itemName = res.batchName; this.selectBatchList.forEach((data)=>{
if(minPerNumber > data.batchPerNumber){
minPerNumber = data.batchPerNumber;
this.item = data;
}
});
this.itemName = '已选择';
} }
}); });
modal.present(); modal.present();
...@@ -135,7 +142,6 @@ export class ReplaceApplyPage { ...@@ -135,7 +142,6 @@ export class ReplaceApplyPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
import { Component } from '@angular/core'; import {Component} from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, ToastController, Events } from 'ionic-angular'; import {IonicPage, NavController, NavParams, AlertController, ToastController, Events} from 'ionic-angular';
import { MyActivityListPage } from '../../mine/myActivityList/myActivityList'; import {MyActivityListPage} from '../../mine/myActivityList/myActivityList';
import { Http, Response } from '@angular/http'; import {Http, Response} from '@angular/http';
import { Storage } from '@ionic/storage'; import {Storage} from '@ionic/storage';
import { AppService, AppGlobal } from '../../../service/appHttpService'; import {AppService, AppGlobal} from '../../../service/appHttpService';
import {ActivityConfirmPage} from "../activityConfirm/activityConfirm"; import {ActivityConfirmPage} from "../activityConfirm/activityConfirm";
import {MinePage} from "../../tabs/mine/mine"; import {MinePage} from "../../tabs/mine/mine";
import {ActivityDetailPage} from "../activityDetail/activityDetail"; import {ActivityDetailPage} from "../activityDetail/activityDetail";
@IonicPage() @IonicPage()
@Component({ @Component({
selector: 'page-activityApply', selector: 'page-activityApply',
templateUrl: 'activityApply.html', templateUrl: 'activityApply.html',
}) })
export class ActivityApplyPage { export class ActivityApplyPage {
picture: string; picture: string;
isLoad:boolean = false; isLoad: boolean = false;
//batches: object[]; //所有批次信息 //batches: object[]; //所有批次信息
batches: Array<String>[]; batches: Array<String>[];
activity = { activity = {
activityName:'', activityName: '',
batchList:[], batchList: [],
id:'', id: '',
applyCount:null //批次数量限制 applyCount: null //批次数量限制
}; //活动信息 }; //活动信息
item = { item = {
batchName:'', batchName: '',
batchPerNumber:null, batchPerNumber: null,
activityId:'', activityId: '',
id:'', id: '',
batchLimitNumber:null, batchLimitNumber: null,
hasSignUpCount:null hasSignUpCount: null
}; };
role = { role = {
loginName:'' loginName: ''
}; //角色信息 }; //角色信息
onebatch:Array<String>; onebatch: Array<String>;
onebatchSurplusQuota: number; //某批次剩余报名名额 onebatchSurplusQuota: number; //某批次剩余报名名额
//报名订单 //报名订单
order = { order = {
Orderid: '', //订单id Orderid: '', //订单id
Personnumber: 0, //携带人数 Personnumber: 0, //携带人数
Orderbz: '', //报名备注 Orderbz: '', //报名备注
Activityid: '', //关联活动id Activityid: '', //关联活动id
Batchid: '', //关联批次id Batchid: '', //关联批次id
orderbz_end:'' batchlist:''
}; };
//页面报名保存展示 //页面报名保存展示
isCover: boolean = false; isCover: boolean = false;
//活动详情显示 //活动详情显示
introduce: string; introduce: string;
//选中的批次的id,默认第一个id //选中的批次的id,默认第一个id
isSelected: string; isSelected: string;
//报名成功 //报名成功
isSuccess: boolean = false; isSuccess: boolean = false;
//报名失败 //报名失败
isError: boolean = false; isError: boolean = false;
activityType: Array<String> = ['未知', '体检', '疗休养', '培训', '工会活动']; activityType: Array<String> = ['未知', '体检', '疗休养', '培训', '工会活动'];
//活动须知 //活动须知
noticeArry: object[]; noticeArry: object[];
pageflag: boolean = false; pageflag: boolean = false;
constructor(public navCtrl: NavController, constructor(public navCtrl: NavController,
public navParams: NavParams,public storage: Storage, public navParams: NavParams, public storage: Storage,
public alertCtrl: AlertController, public alertCtrl: AlertController,
public http: Http, public http: Http,
public appService: AppService, public appService: AppService,
public toast: ToastController, public toast: ToastController,
// public keyboard: Keyboard, // public keyboard: Keyboard,
public event: Events, ) { public event: Events,) {
}
//活动介绍限定一行17个字符串,两行57个字符串,多余以省略号代替
subIntroduce(str: string) {
if (!str) this.introduce = '';
if (str.length <= 17) this.introduce = str;
if (str.length > 17 && str.length <= 25) this.introduce = str.substr(0, 17) + "...";
if (str.length > 25 && str.length <= 42) this.introduce = str;
if (str.length > 42) this.introduce = str.substr(0, 42) + "...";
}
//初始化显示活动列表
ionViewDidEnter(): void {
this.activity = this.navParams.get("activity");
this.item = this.navParams.get('item');
this.order.Activityid = this.activity.id;
// //获取角色
this.storage.get("user").then((value) => {
this.role = value;
});
}
//切换批次其对应活动说明也发生改变
showBatchDetails(onebatchDetail) {
console.log(onebatchDetail.batchSetAddress);
this.onebatch = onebatchDetail;
this.order.Batchid = this.onebatch["id"]; //改变批次时,更改工单关联的批次id
this.isSelected = this.onebatch["id"]; //选中批次的id
this.noticeArry = this.onebatch["batchNotice"].split("\r\n");
}
//携带人数 数字加减
add() {
console.log("1:"+this.order.Personnumber);
if(this.order.Personnumber < this.item.batchPerNumber){
this.order.Personnumber++;
} }
}
next() { //活动介绍限定一行17个字符串,两行57个字符串,多余以省略号代替
if (this.order.Personnumber >= 1) { subIntroduce(str: string) {
this.order.Personnumber--; if (!str) this.introduce = '';
if (str.length <= 17) this.introduce = str;
if (str.length > 17 && str.length <= 25) this.introduce = str.substr(0, 17) + "...";
if (str.length > 25 && str.length <= 42) this.introduce = str;
if (str.length > 42) this.introduce = str.substr(0, 42) + "...";
} }
}
//具体介绍
hidden() {
this.isCover = false;
}
show() {
this.isCover = true;
}
condirmAlert(){
this.appService.alert('确定提交该活动订单?',(res)=>{
this.confirmOrder();
})
}
//报名 //初始化显示活动列表
confirmOrder() { ionViewDidEnter(): void {
//验证信息: this.activity = this.navParams.get("activity");
/**0.对于暂未有批次的。 this.item = this.navParams.get('item');
1.判断携带人数是否超过限额人数。 this.order.Activityid = this.activity.id;
leaveNum: 剩余人数 // //获取角色
applyNum:报名批次数量 this.storage.get("user").then((value) => {
**/ this.role = value;
let leaveNum = this.item.batchLimitNumber - this.item.hasSignUpCount; });
let applyNum = 0; }
this.activity.batchList.forEach((res)=>{
if(res.order){
console.log(res.order);
applyNum ++;
}
});
//报名次数 applyCount 1,2,3,4,5,0-> 不限
if(this.activity.applyCount > 0){
if(applyNum >= this.activity.applyCount){
this.appService.popToastView("提交失败,报名批次达到上限",'middle',1000);
return;
}else if (Number(this.order.Personnumber +1) > Number(leaveNum)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数",'middle',1000);
return;
}else{
this.submitOrder();
}
} else { //报名(新增)
this.submitOrder();
}
}
//报名操作
commitSignUpOrder() {
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order)
.subscribe((res: Response) => {
if (true) {
this.isSuccess = true;
setTimeout(() => {
console.log("报名成功");
this.isSuccess = false;
//this.navCtrl.setRoot("MyActivityListPage");
this.navCtrl.push("MyActivityListPage");
}, 1000);
} else {
//切换批次其对应活动说明也发生改变
showBatchDetails(onebatchDetail) {
console.log(onebatchDetail.batchSetAddress);
this.onebatch = onebatchDetail;
this.order.Batchid = this.onebatch["id"]; //改变批次时,更改工单关联的批次id
this.isSelected = this.onebatch["id"]; //选中批次的id
this.noticeArry = this.onebatch["batchNotice"].split("\r\n");
}
//携带人数 数字加减
add() {
console.log("1:" + this.order.Personnumber);
if (this.order.Personnumber < this.item.batchPerNumber) {
this.order.Personnumber++;
} }
}, error => { }
this.appService.alert('网络异常!');
}
);
}
next() {
if (this.order.Personnumber >= 1) {
this.order.Personnumber--;
}
}
//具体介绍
hidden() {
this.isCover = false;
}
doRefresh(refresher) { show() {
setTimeout(() => { this.isCover = true;
this.ionViewDidEnter(); }
console.log('Async operation has ended');
refresher.complete();
}, 2000);
}
submitOrder(){ condirmAlert() {
// return false; this.appService.alert('确定提交该活动订单?', (res) => {
this.confirmOrder();
})
}
//报名
confirmOrder() {
//验证信息:
/**0.对于暂未有批次的。
1.判断携带人数是否超过限额人数。
leaveNum: 剩余人数
applyNum:报名批次数量
**/
let leaveNum = this.item.batchLimitNumber - this.item.hasSignUpCount;
let applyNum = 0;
this.activity.batchList.forEach((res) => {
if (res.order) {
console.log(res.order);
applyNum++;
}
});
//报名次数 applyCount 1,2,3,4,5,0-> 不限
if (this.activity.applyCount > 0) {
if (applyNum >= this.activity.applyCount) {
this.appService.popToastView("提交失败,报名批次达到上限", 'middle', 1000);
return;
} else if (Number(this.order.Personnumber + 1) > Number(leaveNum)) {
this.appService.popToastView("报名人数超过了该批次的剩余人数", 'middle', 1000);
return;
} else {
this.submitOrder();
}
} else { //报名(新增)
this.submitOrder();
}
}
//报名操作
commitSignUpOrder() {
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order)
.subscribe((res: Response) => {
if (true) {
this.isSuccess = true;
setTimeout(() => {
console.log("报名成功");
this.isSuccess = false;
//this.navCtrl.setRoot("MyActivityListPage");
this.navCtrl.push("MyActivityListPage");
}, 1000);
} else {
}
}, error => {
}
);
}
submitOrder() {
this.order.Batchid = this.item.id; this.order.Batchid = this.item.id;
this.order.Activityid = this.item.activityId; this.order.Activityid = this.item.activityId;
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/create", this.order) this.order.batchlist = this.item.id + ',';
console.log(this.order);
this.appService.ObserverHttpPostOption("/wisdomgroup/modules/order/create", this.order)
.subscribe((res: Response) => { .subscribe((res: Response) => {
if (true) { if (true) {
this.isSuccess = true; this.isSuccess = true;
//清空 插入 //清空 插入
this.navCtrl.push("ActivityDetailPage",{id:this.item.activityId}); this.navCtrl.push("ActivityDetailPage", {id: this.item.activityId});
} else { } else {
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -162,7 +162,6 @@ export class ActivityConfirmPage { ...@@ -162,7 +162,6 @@ export class ActivityConfirmPage {
//失败 //失败
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
...@@ -220,7 +219,6 @@ export class ActivityConfirmPage { ...@@ -220,7 +219,6 @@ export class ActivityConfirmPage {
//失败 //失败
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -26,6 +26,7 @@ export class ActivityDetailPage { ...@@ -26,6 +26,7 @@ export class ActivityDetailPage {
isCover: boolean = false; isCover: boolean = false;
//活动详情显示 //活动详情显示
introduce: string; introduce: string;
hasOrder = false;
constructor(public navCtrl: NavController, constructor(public navCtrl: NavController,
...@@ -60,10 +61,11 @@ export class ActivityDetailPage { ...@@ -60,10 +61,11 @@ export class ActivityDetailPage {
} else { // } else { //
this.batchList[i].signUp = true; this.batchList[i].signUp = true;
} }
console.log(this.batchList); if( this.batchList[i].order ){
this.hasOrder = true;
}
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -97,6 +99,12 @@ export class ActivityDetailPage { ...@@ -97,6 +99,12 @@ export class ActivityDetailPage {
//不参加 //不参加
sayNo() { sayNo() {
if(this.hasOrder){
this.appService.popToastView('您已报名,请先取消报名再点击','middle',1500);
return false;
}
const confirm = this.alertCtrl.create({ const confirm = this.alertCtrl.create({
title: '确定不参加该活动?', title: '确定不参加该活动?',
buttons: [ buttons: [
...@@ -113,7 +121,6 @@ export class ActivityDetailPage { ...@@ -113,7 +121,6 @@ export class ActivityDetailPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -141,7 +148,6 @@ export class ActivityDetailPage { ...@@ -141,7 +148,6 @@ export class ActivityDetailPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -43,7 +43,6 @@ export class ActivityListPage { ...@@ -43,7 +43,6 @@ export class ActivityListPage {
console.log("activityListData------->",data); console.log("activityListData------->",data);
this.items =data; this.items =data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -84,7 +83,6 @@ export class ActivityListPage { ...@@ -84,7 +83,6 @@ export class ActivityListPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -80,7 +80,7 @@ page-batch-detail { ...@@ -80,7 +80,7 @@ page-batch-detail {
.content-button{ .content-button{
position: fixed; position: fixed;
bottom: 0; bottom: 6px;
left: 0; left: 0;
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -89,6 +89,7 @@ export class BatchDetailPage { ...@@ -89,6 +89,7 @@ export class BatchDetailPage {
} }
//立即报名
goApply(){ goApply(){
console.log(this.activity); console.log(this.activity);
this.navCtrl.push('ActivityApplyPage',{ this.navCtrl.push('ActivityApplyPage',{
...@@ -111,19 +112,20 @@ export class BatchDetailPage { ...@@ -111,19 +112,20 @@ export class BatchDetailPage {
let data = res.json(); let data = res.json();
this.navCtrl.push('ActivityConfirmPage',{activity:data.activity,order:data}); this.navCtrl.push('ActivityConfirmPage',{activity:data.activity,order:data});
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
cancelOrder(): void { cancelOrder(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/order/deleteOrder", { "id": this.batch.order.orderid }) const data = {
'id':this.batch.order.orderid +','
}
this.appService.ObserverHttpGetOption("/wisdomgroup/modules/order/deleteOrder", data)
.subscribe((res: Response) => { .subscribe((res: Response) => {
//let data = res.json(); //let data = res.json();
this.appService.alert('报名已取消!'); this.appService.alert('报名已取消!');
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
......
...@@ -53,7 +53,6 @@ export class OrderDetailPage { ...@@ -53,7 +53,6 @@ export class OrderDetailPage {
this.appService.alert('报名已取消!'); this.appService.alert('报名已取消!');
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
......
...@@ -42,7 +42,6 @@ export class OrderEditPage { ...@@ -42,7 +42,6 @@ export class OrderEditPage {
.subscribe((res :Response) => { .subscribe((res :Response) => {
this.batchList = res.json().batchList; this.batchList = res.json().batchList;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -81,7 +80,6 @@ export class OrderEditPage { ...@@ -81,7 +80,6 @@ export class OrderEditPage {
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -51,7 +51,6 @@ export class AnnouncementPage { ...@@ -51,7 +51,6 @@ export class AnnouncementPage {
this.allNotice = data; this.allNotice = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -62,7 +61,6 @@ export class AnnouncementPage { ...@@ -62,7 +61,6 @@ export class AnnouncementPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -77,7 +75,6 @@ export class AnnouncementPage { ...@@ -77,7 +75,6 @@ export class AnnouncementPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -33,7 +33,6 @@ export class AnnouncementViewPage { ...@@ -33,7 +33,6 @@ export class AnnouncementViewPage {
let src = this.notice.noticeContent.split('src="'); let src = this.notice.noticeContent.split('src="');
this.noticeContent = src.join('src="'+AppGlobal.pictureNotice); this.noticeContent = src.join('src="'+AppGlobal.pictureNotice);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -145,8 +145,7 @@ export class ChooseAddressPage { ...@@ -145,8 +145,7 @@ export class ChooseAddressPage {
//this.appService.alert(JSON.stringify(this.areaAll)); //this.appService.alert(JSON.stringify(this.areaAll));
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
...@@ -161,7 +160,6 @@ export class ChooseAddressPage { ...@@ -161,7 +160,6 @@ export class ChooseAddressPage {
this.outerAreaAll = data; this.outerAreaAll = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -190,8 +188,7 @@ export class ChooseAddressPage { ...@@ -190,8 +188,7 @@ export class ChooseAddressPage {
this.isSearch = true; this.isSearch = true;
this.searchAreaAll = data; this.searchAreaAll = data;
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
......
...@@ -40,7 +40,6 @@ export class AddBlockPage { ...@@ -40,7 +40,6 @@ export class AddBlockPage {
this.appService.popToastView('创建成功!', 'middle', 1500); this.appService.popToastView('创建成功!', 'middle', 1500);
this.navCtrl.pop(); this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -71,7 +71,6 @@ export class ContactListPage { ...@@ -71,7 +71,6 @@ export class ContactListPage {
element["hasgeneralpersonsflag"] = true; element["hasgeneralpersonsflag"] = true;
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -85,7 +84,6 @@ export class ContactListPage { ...@@ -85,7 +84,6 @@ export class ContactListPage {
callback(data == null ? "[]" : data); callback(data == null ? "[]" : data);
}) })
.catch(error => { .catch(error => {
this.appService.alert('网络异常!');
}); });
} }
...@@ -116,7 +114,6 @@ export class ContactListPage { ...@@ -116,7 +114,6 @@ export class ContactListPage {
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -147,7 +144,6 @@ export class ContactListPage { ...@@ -147,7 +144,6 @@ export class ContactListPage {
this.generalContactPersons.push(element["id"]); this.generalContactPersons.push(element["id"]);
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -87,7 +87,6 @@ export class ContractPersoninfoPage { ...@@ -87,7 +87,6 @@ export class ContractPersoninfoPage {
this.abbreviation = this.contactPersonInfo.abbreviation; this.abbreviation = this.contactPersonInfo.abbreviation;
this.telephone = this.contactPersonInfo.telephone; this.telephone = this.contactPersonInfo.telephone;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -112,7 +111,6 @@ export class ContractPersoninfoPage { ...@@ -112,7 +111,6 @@ export class ContractPersoninfoPage {
} }
//this.navCtrl.pop(); //this.navCtrl.pop();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -130,7 +128,6 @@ export class ContractPersoninfoPage { ...@@ -130,7 +128,6 @@ export class ContractPersoninfoPage {
this.getPersonInfo(); this.getPersonInfo();
this.appService.popToastView('移除常用联系人成功!', 'middle', 2000); this.appService.popToastView('移除常用联系人成功!', 'middle', 2000);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -169,7 +166,6 @@ export class ContractPersoninfoPage { ...@@ -169,7 +166,6 @@ export class ContractPersoninfoPage {
this.getPersonInfo(); this.getPersonInfo();
this.edit = false; this.edit = false;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -32,7 +32,6 @@ export class MyBlockPage { ...@@ -32,7 +32,6 @@ export class MyBlockPage {
let data = res.json(); let data = res.json();
this.ownerList = data.data.list; this.ownerList = data.data.list;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -24,7 +24,6 @@ export class SelectBlockPage { ...@@ -24,7 +24,6 @@ export class SelectBlockPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -41,8 +41,7 @@ export class JoinPersonsPage { ...@@ -41,8 +41,7 @@ export class JoinPersonsPage {
console.log("canyurenyuan :"+data); console.log("canyurenyuan :"+data);
this.items = data; this.items = data;
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
......
...@@ -97,7 +97,6 @@ export class LoginPage { ...@@ -97,7 +97,6 @@ export class LoginPage {
}, error => { }, error => {
if (loading) loading.dismiss(); if (loading) loading.dismiss();
//this.appService.alert('系统错误!'); //this.appService.alert('系统错误!');
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -110,7 +110,6 @@ export class MyActivityListPage { ...@@ -110,7 +110,6 @@ export class MyActivityListPage {
} }
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -144,8 +143,7 @@ export class MyActivityListPage { ...@@ -144,8 +143,7 @@ export class MyActivityListPage {
//this.waitgoOrderCount = this.waitGoOrder.length; //this.waitgoOrderCount = this.waitGoOrder.length;
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
...@@ -225,8 +223,7 @@ export class MyActivityListPage { ...@@ -225,8 +223,7 @@ export class MyActivityListPage {
//失败 //失败
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
...@@ -286,8 +283,7 @@ export class MyActivityListPage { ...@@ -286,8 +283,7 @@ export class MyActivityListPage {
//失败 //失败
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
......
...@@ -74,7 +74,6 @@ export class MyReportPage { ...@@ -74,7 +74,6 @@ export class MyReportPage {
} }
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -81,8 +81,7 @@ export class ModifyPasswordPage { ...@@ -81,8 +81,7 @@ export class ModifyPasswordPage {
//退出到登录页 //退出到登录页
this.navCtrl.setRoot("LoginPage"); this.navCtrl.setRoot("LoginPage");
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
} }
...@@ -92,8 +91,7 @@ export class ModifyPasswordPage { ...@@ -92,8 +91,7 @@ export class ModifyPasswordPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
} }
...@@ -58,7 +58,6 @@ export class OperationListPage { ...@@ -58,7 +58,6 @@ export class OperationListPage {
this.hasmore = false; this.hasmore = false;
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
return this.operations; return this.operations;
...@@ -130,7 +129,6 @@ export class OperationListPage { ...@@ -130,7 +129,6 @@ export class OperationListPage {
callback(data == null ? "[]" : data); callback(data == null ? "[]" : data);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
return this.tempOperations; return this.tempOperations;
......
...@@ -90,7 +90,6 @@ export class EditPersonInfoPage { ...@@ -90,7 +90,6 @@ export class EditPersonInfoPage {
callback(data == null ? "[]" : data); callback(data == null ? "[]" : data);
}) })
.catch(error => { .catch(error => {
this.appService.alert('网络异常!');
}); });
} }
...@@ -134,7 +133,6 @@ export class EditPersonInfoPage { ...@@ -134,7 +133,6 @@ export class EditPersonInfoPage {
this.navCtrl.pop(); this.navCtrl.pop();
}) })
.catch(error => { .catch(error => {
this.appService.alert('网络异常!');
}); });
} }
......
...@@ -71,7 +71,6 @@ export class OutGoingReportPage { ...@@ -71,7 +71,6 @@ export class OutGoingReportPage {
console.log(data); console.log(data);
this.PremanagerList = data; this.PremanagerList = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -83,7 +82,6 @@ export class OutGoingReportPage { ...@@ -83,7 +82,6 @@ export class OutGoingReportPage {
let data = res.json(); let data = res.json();
this.PremanagerList = data; this.PremanagerList = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -103,7 +101,6 @@ export class OutGoingReportPage { ...@@ -103,7 +101,6 @@ export class OutGoingReportPage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -69,27 +69,32 @@ export class OutGoingReportDetailPage { ...@@ -69,27 +69,32 @@ export class OutGoingReportDetailPage {
this.temp_userpre.premanagerImg = this.premanager.uploadPic; this.temp_userpre.premanagerImg = this.premanager.uploadPic;
this.temp_userpre.premanagerIntroduce = this.premanager.managerDesc; this.temp_userpre.premanagerIntroduce = this.premanager.managerDesc;
//编辑初始化:查询 //编辑初始化:查询
if(this.premanager["reported"]){//已报备 const data= {
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",{premanagerId:this.premanager.id.toString()}) premanagerId:this.premanager.id,
userId:null
};
if(this.navParams.get('userId')){
data.userId = this.navParams.get('userId');
}
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",data)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let result = res.json(); if( res ){
this.temp_userpre.id = result.id; //临时-id let result = res.json();
if(result.isorFromsh == 1){ //离沪 this.temp_userpre.id = result.id; //临时-id
this.temp_userpre.managerDesc = result.userpreDesc; if(result.isorFromsh == 1){ //离沪
this.temp_userpre.leaveDate = result.formshTime; this.temp_userpre.managerDesc = result.userpreDesc;
this.temp_userpre.backDate = result.comeshTime; this.temp_userpre.leaveDate = result.formshTime;
this.allselectedCity = result.areaList; //地点回显 this.temp_userpre.backDate = result.comeshTime;
//将原保存的地点放入storage中 this.allselectedCity = result.areaList; //地点回显
this.storage.set("cityList",this.allselectedCity); //将原保存的地点放入storage中
} this.storage.set("cityList",this.allselectedCity);
}
}
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
}else{
//报备
}
//这个操作是拿出放在storage中城市地点的集合放在 当前页面的临时temp_city中 //这个操作是拿出放在storage中城市地点的集合放在 当前页面的临时temp_city中
this.storage.get("cityList").then((value)=>{ this.storage.get("cityList").then((value)=>{
...@@ -194,6 +199,5 @@ export class OutGoingReportDetailPage { ...@@ -194,6 +199,5 @@ export class OutGoingReportDetailPage {
this.storage.set('temp_userpre',this.temp_userpre); this.storage.set('temp_userpre',this.temp_userpre);
this.navCtrl.push("OutGoingReportEditPage"); this.navCtrl.push("OutGoingReportEditPage");
} }
} }
...@@ -60,7 +60,7 @@ export class OutGoingReportEditPage { ...@@ -60,7 +60,7 @@ export class OutGoingReportEditPage {
public storage: Storage) { public storage: Storage) {
//当前页面----个人报备1页面 //当前页面----个人报备1页面
//this.gettemp_userprePre(); this.gettemp_userprePre();
} }
ngOnInit(): void { ngOnInit(): void {
...@@ -69,6 +69,7 @@ export class OutGoingReportEditPage { ...@@ -69,6 +69,7 @@ export class OutGoingReportEditPage {
this.storage.get("premanager").then((value) => { this.storage.get("premanager").then((value) => {
if (value != null && value != '') { if (value != null && value != '') {
this.premanager = value; this.premanager = value;
console.log(this.premanager);
//加载报备的图片 //加载报备的图片
this.picture = AppGlobal.picture + this.premanager["uploadPic"]; this.picture = AppGlobal.picture + this.premanager["uploadPic"];
//加载报备详细说明 //加载报备详细说明
...@@ -77,10 +78,17 @@ export class OutGoingReportEditPage { ...@@ -77,10 +78,17 @@ export class OutGoingReportEditPage {
this.temp_endTime = this.premanager["endTime"]; //报备截止时间 this.temp_endTime = this.premanager["endTime"]; //报备截止时间
// if (this.premanager["reported"]) { //已报备--修改操作, // if (this.premanager["reported"]) { //已报备--修改操作,
const data = {
premanagerId: value.id,
userId:null
};
if(this.navParams.get('userid')){
data.userId = this.navParams.get('userid');
}
//编辑初始化:查询 //编辑初始化:查询
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre", {premanagerId: value.id}) this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre", data)
.subscribe((res: Response) => { .subscribe((res: Response) => {
if(res.json()){ if(res){
let result = res.json(); let result = res.json();
this.userpre.id = result["id"]; //保存-id this.userpre.id = result["id"]; //保存-id
//离沪勾选 //离沪勾选
...@@ -111,7 +119,6 @@ export class OutGoingReportEditPage { ...@@ -111,7 +119,6 @@ export class OutGoingReportEditPage {
} }
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
// } // }
...@@ -203,7 +210,10 @@ export class OutGoingReportEditPage { ...@@ -203,7 +210,10 @@ export class OutGoingReportEditPage {
editReport() { editReport() {
this.storage.remove("city"); this.storage.remove("city");
this.navCtrl.push("OutGoingReportDetailPage", {premanager: this.premanager}); this.navCtrl.push("OutGoingReportDetailPage", {
premanager: this.premanager,
userId:this.navParams.get('userid')
});
} }
//提交报备 //提交报备
...@@ -262,7 +272,6 @@ export class OutGoingReportEditPage { ...@@ -262,7 +272,6 @@ export class OutGoingReportEditPage {
this.appService.popToastView(resultback.msg, 'middle', 1000); this.appService.popToastView(resultback.msg, 'middle', 1000);
} }
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -78,8 +78,7 @@ export class OutGoingReportViewPage { ...@@ -78,8 +78,7 @@ export class OutGoingReportViewPage {
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); }
}
); );
} }
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<ion-list> <ion-list>
<ion-item *ngFor="let item of items"> <ion-item *ngFor="let item of items">
<div class="group"> <div class="group" style="position: relative">
<div class="inner-group"> <div class="inner-group">
<ng-container *ngIf="item?.picUrl && item?.picUrl != ''"> <ng-container *ngIf="item?.picUrl && item?.picUrl != ''">
<img src="{{picture+item.picUrl}}" class="contact-img"> <img src="{{picture+item.picUrl}}" class="contact-img">
...@@ -50,14 +50,21 @@ ...@@ -50,14 +50,21 @@
</div> </div>
</div> </div>
<div> <div>
<p> <p text-right>
<button disabled ion-button round class="btn color1" *ngIf="type == 1">未报备</button> <button disabled ion-button round class="btn color1" *ngIf="type == 1">未报备</button>
<ng-container *ngIf="type == 2">
<button (click)="editReport(item)" ion-button round class=" cancelBtn">修改报备</button><br><br>
</ng-container>
<button disabled ion-button round class="btn color2" *ngIf="type == 2">离沪</button> <button disabled ion-button round class="btn color2" *ngIf="type == 2">离沪</button>
<ng-container *ngIf="type == 3">
<button (click)="editReport(item)" ion-button round class=" cancelBtn" >修改报备</button><br><br>
</ng-container>
<button disabled ion-button round class="btn color3" *ngIf="type == 3">不离沪</button> <button disabled ion-button round class="btn color3" *ngIf="type == 3">不离沪</button>
</p> </p>
<p *ngIf="type == 1" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p> <p *ngIf="type == 1" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
</div> </div>
</div> </div>
</ion-item> </ion-item>
</ion-list> </ion-list>
......
...@@ -155,5 +155,9 @@ page-reportDetail { ...@@ -155,5 +155,9 @@ page-reportDetail {
a[disabled], button[disabled], [ion-button][disabled]{ a[disabled], button[disabled], [ion-button][disabled]{
opacity: 1; opacity: 1;
} }
.cancelBtn{
background-color: #34b4fc;
border-radius: 3px;
}
} }
...@@ -53,7 +53,6 @@ export class ReportDetailPage { ...@@ -53,7 +53,6 @@ export class ReportDetailPage {
this.items = data; this.items = data;
this.type = 1; this.type = 1;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -66,7 +65,6 @@ export class ReportDetailPage { ...@@ -66,7 +65,6 @@ export class ReportDetailPage {
console.log(data); console.log(data);
this.itemsOfLeave = data; this.itemsOfLeave = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -79,7 +77,6 @@ export class ReportDetailPage { ...@@ -79,7 +77,6 @@ export class ReportDetailPage {
console.log(data); console.log(data);
this.itemsOfNotLeave = data; this.itemsOfNotLeave = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -100,18 +97,27 @@ export class ReportDetailPage { ...@@ -100,18 +97,27 @@ export class ReportDetailPage {
//协助报备 //协助报备
goReport(item) { goReport(item) {
this.storage.remove("temp_userpre"); this.storage.remove("temp_userpre");
this.storage.remove("managerId"); this.storage.remove("managerId");
this.storage.remove("city"); this.storage.remove("city");
this.storage.remove("cityList"); this.storage.remove("cityList");
this.storage.remove("person"); this.storage.remove("person");
this.storage.set('premanager', this.premanager); this.storage.set('premanager', this.premanager);
this.storage.set('person', item); this.storage.set('person', item);
this.navCtrl.push('OutGoingReportEditPage', {premanager: this.premanager}); this.navCtrl.push('OutGoingReportEditPage', {premanager: this.premanager});
} }
editReport(item){
this.storage.remove("temp_userpre");
this.storage.remove("managerId");
this.storage.remove("city");
this.storage.remove("cityList");
this.storage.remove("person");
this.storage.set('premanager', this.premanager);
this.storage.set('person', item);
this.navCtrl.push('OutGoingReportEditPage', {premanager: this.premanager,userid:item.id});
}
search(){ search(){
this.navCtrl.push('ReportSearchPage',{id:this.id,'premanager':this.premanager}); this.navCtrl.push('ReportSearchPage',{id:this.id,'premanager':this.premanager});
......
...@@ -28,7 +28,6 @@ export class ReportTrackPage { ...@@ -28,7 +28,6 @@ export class ReportTrackPage {
let data = res.json(); let data = res.json();
this.all = data; this.all = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -52,7 +52,6 @@ export class ContactPage { ...@@ -52,7 +52,6 @@ export class ContactPage {
} }
this.organizations.splice(flag, 1); this.organizations.splice(flag, 1);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -68,7 +67,6 @@ export class ContactPage { ...@@ -68,7 +67,6 @@ export class ContactPage {
let data = res.json(); let data = res.json();
this.ownerList = data.data.list; this.ownerList = data.data.list;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -124,7 +124,6 @@ export class HomePage { ...@@ -124,7 +124,6 @@ export class HomePage {
this.appService.ObserverHttpGet("/wisdomgroup/modules/common/file/getBanner", {}).subscribe((res: Response) => { this.appService.ObserverHttpGet("/wisdomgroup/modules/common/file/getBanner", {}).subscribe((res: Response) => {
this.slidersItems = res.json(); this.slidersItems = res.json();
}, error => { }, error => {
this.appService.alert('网络异常!');
}) })
//初始化统计未读通知 //初始化统计未读通知
...@@ -228,7 +227,6 @@ export class HomePage { ...@@ -228,7 +227,6 @@ export class HomePage {
let data = res.json(); let data = res.json();
callback(data == null ? "[]" : data); callback(data == null ? "[]" : data);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -290,7 +288,6 @@ export class HomePage { ...@@ -290,7 +288,6 @@ export class HomePage {
let data = res.json(); let data = res.json();
this.hasNewActivity = data; this.hasNewActivity = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -302,7 +299,6 @@ export class HomePage { ...@@ -302,7 +299,6 @@ export class HomePage {
let data = res.json(); let data = res.json();
this.hasNewNotice = data; this.hasNewNotice = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -314,7 +310,6 @@ export class HomePage { ...@@ -314,7 +310,6 @@ export class HomePage {
let data = res.json(); let data = res.json();
this.hasNewMessage = data; this.hasNewMessage = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -326,7 +321,6 @@ export class HomePage { ...@@ -326,7 +321,6 @@ export class HomePage {
let data = res.json(); let data = res.json();
this.hasNewPremanager = data; this.hasNewPremanager = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -376,11 +370,9 @@ export class HomePage { ...@@ -376,11 +370,9 @@ export class HomePage {
}) })
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
}); });
this.loadEvent(year, month); this.loadEvent(year, month);
}, error => { }, error => {
this.appService.alert('网络异常!');
}); });
...@@ -418,7 +410,6 @@ export class HomePage { ...@@ -418,7 +410,6 @@ export class HomePage {
this.setCalendar(year,month); this.setCalendar(year,month);
}); });
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
......
...@@ -130,7 +130,6 @@ export class MinePage { ...@@ -130,7 +130,6 @@ export class MinePage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -24,7 +24,6 @@ export class NoticePage { ...@@ -24,7 +24,6 @@ export class NoticePage {
this.noticeList = data; this.noticeList = data;
this.addRecodings(); this.addRecodings();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -35,7 +34,6 @@ export class NoticePage { ...@@ -35,7 +34,6 @@ export class NoticePage {
.subscribe((res: Response) => { .subscribe((res: Response) => {
this.badge.clear(); this.badge.clear();
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
...@@ -96,7 +96,6 @@ export class TabsPage { ...@@ -96,7 +96,6 @@ export class TabsPage {
// .subscribe((res: Response) => { // .subscribe((res: Response) => {
// this.role = res.json(); // this.role = res.json();
// }, error => { // }, error => {
// this.appService.alert('网络异常!');
// } // }
// ); // );
// }); // });
......
...@@ -46,7 +46,6 @@ export class WorkbenchPage { ...@@ -46,7 +46,6 @@ export class WorkbenchPage {
let data = res.json(); let data = res.json();
this.reportCount = data; this.reportCount = data;
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
...@@ -69,7 +68,6 @@ export class WorkbenchPage { ...@@ -69,7 +68,6 @@ export class WorkbenchPage {
//this.storage.set("role",this.role); //this.storage.set("role",this.role);
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
}); });
......
...@@ -120,7 +120,6 @@ export class VersionPage { ...@@ -120,7 +120,6 @@ export class VersionPage {
let data = res.json(); let data = res.json();
this.navCtrl.push('LoginPage'); this.navCtrl.push('LoginPage');
}, error => { }, error => {
this.appService.alert('网络异常!');
} }
); );
} }
......
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