Commit 33e0a93f authored by wangqinghua's avatar wangqinghua

login

parent 55191b1c
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://101.89.112.92:80/wisdomgroup"
"proxyUrl": "http://47.103.35.216:8080/wisdomgroup"
}
]
}
\ No newline at end of file
platforms/android/app/src/main/res/mipmap-hdpi/icon.png

3.33 KB | W: | H:

platforms/android/app/src/main/res/mipmap-hdpi/icon.png

5.49 KB | W: | H:

platforms/android/app/src/main/res/mipmap-hdpi/icon.png
platforms/android/app/src/main/res/mipmap-hdpi/icon.png
platforms/android/app/src/main/res/mipmap-hdpi/icon.png
platforms/android/app/src/main/res/mipmap-hdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
platforms/android/app/src/main/res/mipmap-ldpi/icon.png

1.74 KB | W: | H:

platforms/android/app/src/main/res/mipmap-ldpi/icon.png

2.09 KB | W: | H:

platforms/android/app/src/main/res/mipmap-ldpi/icon.png
platforms/android/app/src/main/res/mipmap-ldpi/icon.png
platforms/android/app/src/main/res/mipmap-ldpi/icon.png
platforms/android/app/src/main/res/mipmap-ldpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
platforms/android/app/src/main/res/mipmap-mdpi/icon.png

2.28 KB | W: | H:

platforms/android/app/src/main/res/mipmap-mdpi/icon.png

3.16 KB | W: | H:

platforms/android/app/src/main/res/mipmap-mdpi/icon.png
platforms/android/app/src/main/res/mipmap-mdpi/icon.png
platforms/android/app/src/main/res/mipmap-mdpi/icon.png
platforms/android/app/src/main/res/mipmap-mdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
platforms/android/app/src/main/res/mipmap-xhdpi/icon.png

4.41 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xhdpi/icon.png

8.03 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png

6.78 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png

13.2 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png

9.67 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png

18.8 KB | W: | H:

platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png
platforms/android/app/src/main/res/mipmap-xxxhdpi/icon.png
  • 2-up
  • Swipe
  • Onion skin
resources/icon.png

86.8 KB | W: | H:

resources/icon.png

70.4 KB | W: | H:

resources/icon.png
resources/icon.png
resources/icon.png
resources/icon.png
  • 2-up
  • Swipe
  • Onion skin
2c3fc936a7667a90275e56d7c6c32ef5
\ No newline at end of file
b27a9654b61f960b7ffc65645f8be36e
\ No newline at end of file
src/assets/imgs/logo.png

86.8 KB | W: | H:

src/assets/imgs/logo.png

55.9 KB | W: | H:

src/assets/imgs/logo.png
src/assets/imgs/logo.png
src/assets/imgs/logo.png
src/assets/imgs/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,7 +9,7 @@ page-login {
}
.login-box{
padding-top: 3rem;
background-color: #f0f1f2;
height: 100%
}
......
......@@ -7,6 +7,7 @@ import { Storage } from '@ionic/storage';
import { AppService } from '../../service/http.service';
import {LoginService} from "./login.service";
import {TabsService} from "../tabs/tabs.service";
@IonicPage()
......@@ -33,7 +34,7 @@ export class LoginPage {
private loadingCtrl: LoadingController,
public http: Http,private loginSer:LoginService,
public appService: AppService,
public render: Renderer,
public tabSer: TabsService,
public elementRef:ElementRef) {
}
......@@ -80,26 +81,26 @@ export class LoginPage {
enableBackdropDismiss: true //点击页面其他地方则关闭 正在登录
});
loading.present();
this.appService.ObserverHttpPost("/wisdomgroup/app/loginpost", this.user)
.subscribe((res: Response) => {
console.log(this.user)
this.tabSer.loginpost(this.user).subscribe(
(res)=>{
loading.dismiss();
this.submitted = true;
let data = res.json();
if (data["code"] == '200') {
if (res["code"] == '200') {
//将当前登录用户存进缓存,便于后期逻辑操作
this.storage.set('user', data.data);
this.user.userid = data.data.id;
this.storage.set('user', res.data);
this.user.userid = res.data.id;
this.storage.set('userLoginInfo',this.user);
return this.navCtrl.setRoot(TabsPage, { "user": this.user });
} else {
this.appService.alert('手机号或密码错误!');
return this.navCtrl.setRoot(LoginPage);
}
}, error => {
},
(err)=>{
if (loading) loading.dismiss();
//this.appService.alert('系统错误!');
}
);
)
}
//忘记密码
forgetPassword():void{
......
<ion-header>
<ion-navbar>
<ion-title text-center>智汇19号</ion-title>
<ion-buttons start>
<button ion-button icon-only>
<img class="toolbar-img" src="./assets/imgs/logo.png">
</button>
</ion-buttons>
<ion-buttons center (click)="goToSearch()">
<ion-searchbar class="toolbar-search" placeholder="搜索"></ion-searchbar>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-only (click)="isSign = true" class="toolbar-signUp">
<span class="signUp-span" >签到</span>
</button>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-only class="toolbar-icon">
<ion-icon name="mail"></ion-icon>
<span class="num">2</span>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
<ion-content>
<div style="height: 160px">
<ion-slides #slides *ngIf="slidersItems.length>0" pager loop="true" autoplay="2000" speed="1500">
<ion-slide style="height:160px;width: 100%;position: relative" *ngFor="let item of slidersItems">
<ion-slide style="height:160px;width: 100%;position: relative" *ngFor="let item of slidersItems;">
<img src="{{picture+item.pictureId}}" class="slide-image" (click)="go(item)">
<p class="slides-title">{{item.title}}</p>
</ion-slide>
</ion-slides>
</div>
<div class="item2" style="padding: 0px;">
<div class="item2-2">
<div class="card" (click)="goTo('ActivityListPage')">
<img src="./assets/imgs/home/icon-bm.png" alt="">
<label class="label2-2">活动报名</label>
<img class="new-logo" *ngIf="hasNew.activity==1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goTo('AnnouncementPage')">
<img src="./assets/imgs/home/icon-tz.png" alt="">
<label class="label2-2">通知公告</label>
<img class="new-logo" *ngIf="hasNew.notice==1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goOutGoingReportAboutAll()">
<img src="./assets/imgs/home/icon-lhbb.png" alt="">
<label class="label2-2">离沪报备</label>
<img class="new-logo" *ngIf="hasNew.premanager==1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goTo('DutyPage')">
<img src="./assets/imgs/home/icon-zb.png" alt="">
<label class="label2-2">值班情况</label>
</div>
<ng-container *ngIf="role == 2 || role == 1 || role == 3">
<div class="card" (click)="goTo('ActivityTrackPage')">
<img src="./assets/imgs/home/icon-hdgz.png" alt="">
<label class="label2-2">活动跟踪</label>
</div>
<div class="card" (click)="goTo('ReportTrackPage')">
<img src="./assets/imgs/home/icon-bbgz.png" alt="">
<label class="label2-2">报备跟踪</label>
</div>
</ng-container>
<div class="card" (click)="goTo('SurveryPage')">
<img src="./assets/imgs/home/icon-wjtc.png" alt="">
<label class="label2-2 more2-2">问卷调查</label>
</div>
<div class="card" (click)="goTo('LearningListPage')">
<img src="./assets/imgs/home/icon-xxcs.png" alt="">
<label class="label2-2 more2-2 main-color">学习测试</label>
<img class="new-logo" *ngIf="hasNew.test==1" src="./assets/imgs/new.png">
</div>
<ng-container *ngIf="role == 3">
<div class="card" (click)="goTo('LearnManagePage')">
<img src="./assets/imgs/home/icon-ccgl.png" alt="">
<label class="label2-2 more2-2">测试管理</label>
</div>
<div class="home-middle-tips">
<ion-row>
<ion-col col-2 class="middle-left">
<img src="./assets/imgs/flag.png">
</ion-col>
<ion-col col-10 class="middle-right">
<span class="main-color">王小红</span>,欢迎您,今天是 <span class="main-color">2019年4月22日</span>
今天是您加入中国共产党的 <span class="main-color">520</span>天,希望您不忘初心,牢记使命,
永远奋斗。
</ion-col>
</ion-row>
</div>
<div class="news-content">
<div class="tabs-parent">
<div *ngFor="let item of tabsList;let i = index" (click)="change(i)" class="tabs-children">
<span [style.color]="index == i ? '#e12724':''">{{item.name}}</span>
</div>
<span #tips id="tips"></span>
</div>
</div>
<div class="main-news">
<ng-container *ngFor="let new of newList;">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-8 class="news-left">
<p class="news-title">{{new.title}}</p>
<p class="news-end">
<span>{{new.source}}</span>
<span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
<ion-col col-4 class="news-right">
<img src="./assets/imgs/demo.png">
</ion-col>
</ion-row>
</ng-container>
<div class="card" (click)="goTo('MoreAppPage')">
<img src="./assets/imgs/home/icon-more.png" alt="">
<label class="label2-2 more2-2">更多应用</label>
</div>
<!--<div class="card" (click)="readBook()">-->
<!--<img src="./assets/imgs/home/icon-more.png" alt="">-->
<!--<label class="label2-2 more2-2">阅读</label>-->
<!--</div>-->
</div>
</div>
<div class="item3" style="padding-top: 0px;">
<div class="item3-2" style="background-color:#f8f8f8;" (click)="gotoNotice()">
<div class="card3" style="width: 15%;">
<span *ngIf="hasNew.message == 1" class="img-tips"></span>
<img src="./assets/imgs/home/icon-mail.png" >
</div>
<div class="card3" style="width: 75%;">
<div class="card3-item" *ngFor="let item of noticeList;">
<span *ngIf="noticeTips > 0" class="tips"></span>
<span class="color-996">{{item.title}}</span>
{{item.content}}
</div>
</div>
<div class="card3" style="width: 10%;color: #999999;font-size: 1.6rem">
<ion-icon name="ios-arrow-forward" class="icon-right"></ion-icon>
</div>
</ion-content>
<div *ngIf="isSign" class="signMask">
<div class="mask-content">
<div class="record-conten">
"进入新时代,国际国内形势发生广泛而深刻的变化,改革发展面临着新形势新任务新挑战,
我们要抓住机遇、迎接挑战,关键在于高举新时代改革开放旗帜,继续全面深化改革。"
</div>
<div class="mask-button">
<button class="submit-btn submit" (click)="signUp()">签到</button>
</div>
<div class="calen-tab">
日程表:<span class="calen1">休息日</span> <span class="calen2">参加活动</span>
<span class="calen3">值班</span><span class="calen4">离沪</span>
</div>
<ion-calendar #calendar
[(ngModel)]="date"
(onChange)="onChange($event)"
(monthChange)="monChange($event)"
[options]="optionsMulti"
type="'js-date'"
[format]="'YYYY-MM-DD'">
</ion-calendar>
</ion-content>
<div class="cover" *ngIf="isWait" (click)="cancleWait()">
<img src="./assets/imgs/development.jpg" class="wait">
</div>
page-home {
ion-slides{
ion-slides {
width: 100%;
height: 160px;
}
.slide-image{
width: 100%;
height: 160px;
}
.swiper-container{
height: 160px;
width: 100%;
}
.item2,.item3,.item4,.item5{
background-color: #f1f1f1;
padding: 5px 0px;
.toolbar .searchbar-ios .searchbar-input{
background-color: #e12724;
border-bottom: 1px solid #fff;
border-radius: 0px;
}
.item2-1,.item3-1,.item4-1,.item5-1{
font-size: 10px;
background-color: #ffffff;
padding-top: 15px;
}
.icon2{
color: aqua;
margin-left: 6px;
font-size: 16px;
}
.common_applications{
color: #666666;
font-size: 16px;
}
.item2-2,.item3-2,.item4-2,.item5-2{
background-color: #ffffff;
//box-shadow:0px 5px 5px #b5cef7;
padding-bottom: 8px;
.searchbar-ios .searchbar-input::-webkit-input-placeholder{
color: #ffffff;
}
.item2-2,.item3-2{
display: flex;
flex-direction: row;
flex-wrap:wrap;
align-content: space-between;
justify-content: left;
box-sizing: border-box;
}
.card3-item{
margin: 3px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width:100%;
}
.card{
height: 100%;
width: 20%;
display: inline-flex;
flex-direction: column;
// flex-direction: center;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin:2.5%;
position: relative;
}
.card img:first-child{
width: 50%;
}
.icon2-2{
color: #488afe;
font-size: 40px;
.slide-image {
width: 100%;
height: 160px;
}
.label2-2{
color: #666666
.swiper-container {
height: 160px;
width: 100%;
}
.new-logo{
.slides-title {
position: absolute;
width: 25px;
height: 12px;
top: -3px;
right: -1px;
}
.icon3{
color: #f3a035;
margin-left: 6px;
font-size: 16px;
}
.daily_reminder{
color: #666666;
font-size: 16px;
}
.more{
float: right;
color: #666666;
margin-right: 10px;
}
.item3-2{
padding-top: 8px;
bottom: 0;
left: 0;
font-size: 1.5rem;
color: #fff;
width: 100%;
background-color: rgba(153, 153, 153, 0.5);
text-align: left;
padding: 3px 15px;
}
.card3{
display: inline-flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
padding:3px;
.toolbar-signUp {
.signUp-span {
color: #fff;
border: 1px solid #fff;
font-size: 1.3rem;
padding: 2px 5px;
border-radius: 4px;
position: relative;
font-size: 1.2rem;
}
.img-tips{
position: absolute;
padding: 4px;
background-color: red;
border-radius: 50%;
right: 10px;
top: 12px;
}
.label3-1{
font-size: 20px;
color: #f26d3a;
}
.color-996{
color: #fb9662;
}
.tips{
display: inline-block;
padding: 2px;
background-color: #fb9662;
border-radius: 50%;
vertical-align: middle;
margin-right: 5px;
}
.label3-2{
font-size: 12px;
color: #666666;
margin-right: 1rem;
}
.duty_arrangements{
color: #666666;
font-size: 16px;
.signUp-span::after {
content: '';
position: absolute;
right: -10px;
top: -1px;
height: 1.5rem;
width: 1px;
background-color: #fff;
}
.icon4{
color: #46b553;
margin-left: 6px;
font-size: 16px;
}
.item4-title{
text-align: center;
.toolbar-search{
color: #ffffff;
}
.group{
text-align: center;
//中间
.home-middle-tips{
padding: 1rem;
font-size: 1.5rem;
line-height: 1.6rem;
font-weight: 400;
ion-row{
padding: .5rem 0;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
box-shadow: -5px 0px 5px 1px #f2f2f2, 0px -5px 5px 1px #f2f2f2, 5px 0px 5px 1px #f2f2f2, 0px 5px 5px 1px #f2f2f2;
background-color: #fff;
.middle-left{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.card4{
height: 100%;
// width: 66px;
display: inline-flex;
flex-direction: column;
// flex-direction: center;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
margin: 0 10px;
// background-color: #e0e9fa;
padding: 8px 3px;
}
.card4-2{
line-height: 20px;
width: 20px;
height: 20px;
border-radius: 20px;
}
.selected{
background-color: #5c91ed;
}
.operation_record{
color: #666666;
font-size: 16px;
}
.icon5{
color: #f57746;
margin-left: 6px;
font-size: 16px;
}
.card5-1{
font-size: 13px;
margin-left: 10px;
}
.card5-1-1{
color: #5c91ed;
}
.time{
font-size: 8px;
color: #666666;
float: right;
margin-right: 10px;
}
.header-img{
width: 100%;
height: 25%;
}
//tej
.common-menu{
background-color:#6299fa;
width: 55px;
height: 55px;
border-radius:5px;
margin-bottom:5px;
text-align: center;
color: #fff;
font-weight: bolder;
font-size: 16px;
// width:58px;
// height:58px;
//新闻区
.main-news{
padding: 0 1rem;
.news-item{
padding: .8rem 0;
.news-left{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.common-menu-count{
font-size: 13px;
color:#fff;
background-color: #f36b35;
width: 24px;
height: 24px;
border-radius:50%;
position: absolute;
text-align: center;
line-height:24px;
left:43px;
top:-6px;
}
//
.cover{
position: relative;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 100;
}
.wait{
width: 80%;
margin: 100px 10% 0 10%;
}
.time_home{
font-size: 10px;
color: #666666;
float: right;
margin-right: 10px;
}
.slides-title{
position: absolute;
bottom: 0;
left: 0;
font-size: 1.5rem;
color: #fff;
flex-flow: row wrap;
min-height: 100%;
.news-title{
align-self: flex-start;
font-weight: bold;
width: 100%;
background-color: rgba(153,153,153,0.5);
text-align: left;
padding: 3px 15px;
}
.calen-tab{
margin: 16px 16px 0px 16px;
padding-bottom: 10px;
border-bottom: 1px solid #dddddd;
font-size: 1.3rem;
.news-end{
align-self: flex-end;
color: #999999;
span{
margin-right: 1rem;
}
.calen1,
.calen2,
.calen3,
.calen4{
position: relative;
margin-left:1.8rem;
}
.calen1::after,
.calen2::after,
.calen3::after,
.calen4::after{
content: '';
position: absolute;
top: 23%;
left: -13px;
width:8px;
height:8px;
border-radius:50%;
}
.calen1::after{
border:1px solid #ddd;
}
.calen2::after{
background-color: #41afef;
.news-right{
img{
border-radius: .5rem;
}
.calen3::after{
background-color: #f53d3d;
}
.calen4::after{
background-color: #f7ce53;
}
ion-calendar-month button.days-btn.dayOff1{
border: 1px solid #dddddd;
.news-item + .news-item{
border-top: 1px solid #eeeeee;
}
ion-calendar-month button.days-btn.dayOff2{
background-color: #41afef;
border: 1px solid #41afef;
}
ion-calendar-month button.days-btn.dayOff3{
background-color: #f53d3d;
border: 1px solid #f53d3d;
}
ion-calendar-month button.days-btn.dayOff4{
background-color: #f7ce53;
border: 1px solid #f7ce53;
}
ion-calendar-month .primary .days .dayOff2 p,
ion-calendar-month .primary .days .dayOff3 p,
ion-calendar-month .primary .days .dayOff4 p{
color: white;
}
ion-calendar-month .primary .dayOff1.today p{
color: #333333;
}
button[disabled]{
opacity: 1;
}
}
import {Component, ViewChild} from '@angular/core';
import {Component, ElementRef, ViewChild} from '@angular/core';
import {NavController, IonicPage, Slides} from 'ionic-angular';
import {ActivityListPage} from "../../home/activity/activityList/activityList";
import {Http, Response} from '@angular/http';
......@@ -18,6 +18,8 @@ import {Badge} from '@ionic-native/badge';
import {TabsService} from "../tabs.service";
import {TextToSpeech} from "@ionic-native/text-to-speech";
import {CommonService} from "../../../provide/common.service";
import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
declare var Swiper;
......@@ -29,45 +31,17 @@ declare var Swiper;
export class HomePage {
@ViewChild(Slides) slides: Slides;
@ViewChild('tips') tips: ElementRef;
hasNew = {
activity:0,
notice:0,
premanager:0,
message:0,
test:0,
};
//日历
date: string;
type: 'string';
optionsMulti: CalendarComponentOptions;
newArr: DayConfig[] = [];
//未读通知
NoticeNotreadCount = '0';
//尚未报备
PremanagerNotdoCount = '0';
//是否显示正在开发中
isWait: boolean = false;
picture: string = AppGlobal.picture;
slidersItems = [];
noticeList = [];
tabsList = [{name: "党规党章",}, {name: "系列讲话",}, {name: "中央精神",},{name:"本市部署"}];
index = 0;
isSign = false;
picture: string = AppGlobal.picture;
newList = [];
operations: Array<string>;
//当前年份
year;
//当前月份
month;
//当前第几周
weekNo;
noticeTips;
role;
constructor(public navCtrl: NavController,public tts:TextToSpeech,
public commonSer:CommonService,
......@@ -76,295 +50,60 @@ export class HomePage {
}
ngOnInit(): void {
this.appService.ObserverHttpGet("/wisdomgroup/modules/message/findAllActivityForAppWithXQ", null).subscribe((res: Response) => {
this.noticeList = res.json().slice(0, 2);
}, error => {
this.appService.alert('系统错误!');
});
}
ionViewDidEnter() {
//获取权限
this.getRole();
//获取消息数量
this.getNewCount();
//获取日历
this.getCalendar();
}
ionViewWillEnter() {
this.slidersItems = [];
this.getHasNew();
//初始化日期
this.appService.ObserverHttpGet("/wisdomgroup/modules/common/file/getBanner", {}).subscribe((res: Response) => {
this.slidersItems = res.json();
}, error => {
})
}
ionViewDidLeave() {
this.newArr = [];
if (this.slides) {
this.slides.stopAutoplay();
}
}
//获取权限
getRole() {
this.tabsSer.getRoles().subscribe(
(res) => {
this.role = res
},
error => {
this.appService.alert('系统错误!');
ionViewDidLoad(){
this.tabsSer.getBanner().subscribe(
(res)=>{
this.slidersItems = res;
}
)
this.change(0);
}
wait() {
this.isWait = true;
}
cancleWait() {
this.isWait = false;
}
go(item) {
if (item.type == 1) {
this.getActivity(item.id);
} else if (item.type == 2) {
this.getPremanager(item.id);
} else if (item.type == 3) {
this.navCtrl.push("AnnouncementViewPage", {
id: item.id
});
}
}
//获取活动ById
getActivity(id) {
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/appFindById", {id: id})
.toPromise()
.then(res => {
let activity = res.json();
this.navCtrl.push('ActivityDetailPage', {id: activity.id});
})
.catch(error => {
});
}
//获取报备
getPremanager(id) {
this.storage.remove("temp_userpre");
this.storage.remove("managerId");
this.storage.remove("city");
this.storage.remove("cityList");
this.storage.remove("person");
this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/findById", {id: id}).subscribe((res) => {
let premanager = res.json();
this.storage.set("premanager", premanager);
this.navCtrl.push("OutGoingReportEditPage");
})
}
//消息通知
gotoNotice() {
this.navCtrl.setRoot(NoticePage);
this.navCtrl.parent.select(2);
}
//外出报备跳转
goOutGoingReportAboutAll() {
this.navCtrl.push("OutGoingReportPage", {
type: 1
});
//所属板块类型(1党规党章,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,
// * 8党务参考,9廉政格言,10纪检提示,11风险排查,12警示教育,13支部活动,14党建联建,15结对帮扶)
change(index) {
let itemWidth = window.screen.width / 4;
// 自身div的一半 - 滑块的一半
this.tips.nativeElement.style.left = itemWidth * index + itemWidth / 2 - this.tips.nativeElement.offsetWidth / 2 + 'px';
this.index = index;
const data = {
pageSize:1,
pageCount:100,
obj:{
'plateType':index +1
}
//前往
goTo(page) {
this.navCtrl.push(page);
}
readBook(){
this.tts.speak({text: "你好,欢迎,向前走10米,路口右转,执行10米,在左转", locale: 'zh-CN'})
.then(() => {
console.log('Success');
}).catch((reason: any) => {
console.error('Error', reason);
});
}
/**
* 获取是否有新的信息
*/
getHasNew(){
//获取是否有新活动
this.tabsSer.hasNewActivity().subscribe(
this.tabsSer.stuffPage(data).subscribe(
(res)=>{
this.hasNew.activity = res;
this.newList = res.data;
}
)
//获取是否有新通知
this.tabsSer.hasNewNotice().subscribe(
(res)=>{
this.hasNew.notice = res;
}
)
//获取是否有新通知
this.tabsSer.hasNewMessage().subscribe(
(res)=>{
this.hasNew.message = res;
}
)
//获取是否有新报备
this.tabsSer.hasNewPremanager().subscribe(
signUp(){
this.tabsSer.sign().subscribe(
(res)=>{
this.hasNew.premanager = res;
this.isSign = false;
if(res.errcode == '1000'){
this.commonSer.toast('签到成功');
}else{
this.commonSer.toast(res.errmsg);
}
)
//获取是否有新问卷
this.tabsSer.hasNewTest().subscribe(
(res)=>{
this.hasNew.test = res;
}
)
}
//获取所有未读消息的数量--->设置角标
getNewCount() {
this.appService.ObserverHttpGetData('/wisdomgroup/modules/activity/hasNewCount', null)
.subscribe((res) => {
let data = Number(res.json());
this.noticeTips = data;
console.log(this.noticeTips)
if (data > 0) {
this.badge.set(data);
} else {
this.badge.clear();
}
//查看文章详情
goToDetail(item){
this.navCtrl.push(StuffDetailPage,{
id:item.id
})
}
//日历
getCalendar() {
this.newArr = [];
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
//2.参加活动日期
this.tabsSer.appOrderCal().subscribe(
(order)=>{
order.forEach(event => {
this.newArr.push({
date: new Date(event.batch.batchGoDate),
disable: true,
cssClass: 'dayOff2'
})
});
this.tabsSer.appPreCal().subscribe(
(pre)=>{
pre.forEach(event => {
this.newArr.push({
date: new Date(event.formshTime),
disable: true,
cssClass: 'dayOff4'
})
});
this.loadEvent(year, month);
goToSearch(){
this.navCtrl.push(SearchNewPage);
}
)
}
);
}
loadEvent(year, month) {
//5.获取每月值班信息
const data = {
date: year + '/' + month + '/01'
};
this.tabsSer.getMyScheduleOnMonth(data).subscribe(
(schedule)=>{
for (let i = 0; i < schedule.length; i++) {
const ev = {
date: new Date(schedule[i].dutyDate),
disable: true,
cssClass: 'dayOff3'
};
this.newArr.push(ev);
}
this.tabsSer.getFestivalAboutMonth(data).subscribe(
(festival)=>{
festival.forEach(event => {
const data = {
date: new Date(event.date),
disable: true,
cssClass: 'dayOff1'
};
this.newArr.push(data);
});
this.setCalendar(year, month);
}
)
}
)
}
setCalendar(year, month) {
let date = new Date();
//4.每月的周末
let d = new Date(year, month, 0).getDate();
for (let i = 1; i < d + 1; i++) {
date.setFullYear(year, month - 1, i);
let day = date.getDay();
if (day == 6 || day == 0) {
const data = {
date: new Date(year, month - 1, i),
disable: true,
cssClass: 'dayOff1'
};
this.newArr.push(data);
}
}
this.optionsMulti = {
pickMode: 'multi',
monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay,
monthPickerFormat: monthCh,
weekStart: 0,
disableWeeks: [0, 1, 2, 3, 4, 5, 6],
daysConfig: this.newArr
};
}
onChange(e) {
}
//月份改变
monChange(e) {
this.loadEvent(e.newMonth.years, e.newMonth.months);
}
}
//定义星期实体
export class Week {
id: number;
title: string;
date: number;
isToday: boolean = false;
}
<ion-header>
<ion-navbar>
<ion-title text-center>个人中心</ion-title>
<ion-buttons start>
<button ion-button icon-only>
<img class="toolbar-img" src="./assets/imgs/logo.png">
</button>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-only class="toolbar-icon">
<ion-icon name="mail"></ion-icon>
<span class="num">2</span>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
......@@ -11,24 +21,24 @@
<ion-grid>
<ion-row>
<ion-col col-3>
<img *ngIf="user.userDetail?.user?.picUrl == ''" src="./assets/imgs/head.png" class="head-photo">
<img *ngIf="user.userDetail?.user?.picUrl != ''" src="{{picture+user.userDetail?.user?.picUrl}}" class="head-photo">
<img *ngIf="picUrl == ''" src="./assets/imgs/head.png" class="head-photo">
<img *ngIf="picUrl != ''" src="{{picture+picUrl}}" class="head-photo">
</ion-col>
<ion-col class="mine-info" col-5>
<p class="mine-name">{{user?.userName}}</p>
<p class="address">{{orgName}}</p>
<p class="address">{{mineInfo?.orgName}}</p>
</ion-col>
<ion-col col-4>
<ion-col col-4 class="text-right">
<span class="red-span-round">党支部书记</span>
</ion-col>
</ion-row>
</ion-grid>
</div>
<p class="score">党建积分:20</p>
<p class="score">党建积分:{{mineInfo?.total}}</p>
</div>
</div>
<div class="group-box">
<ion-grid>
<ion-grid class="padding-0-10">
<ion-row (click)="myActivityList()">
<ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdhd.png" alt="">
......@@ -76,7 +86,7 @@
</ion-row>
</ion-grid>
<div class="space"></div>
<ion-grid>
<ion-grid class="padding-0-10">
<ion-row (click)="goSet()">
<ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/set.png" alt="">
......
......@@ -14,6 +14,7 @@ page-mine {
display: flex;
flex-flow: row wrap;
min-height: 100%;
padding-left: 1rem;
.mine-name {
align-self: flex-start;
......
......@@ -14,6 +14,7 @@ import {AppVersion} from '@ionic-native/app-version';
import {AppUpdateService} from "../../../service/appUpdate.service";
import {MyDutyPage} from "../../mine/my-duty/my-duty";
import {MySurveyPage} from "../../home/mySurvey/my-survey/my-survey";
import {TabsService} from "../tabs.service";
@Component({
......@@ -22,38 +23,42 @@ import {MySurveyPage} from "../../home/mySurvey/my-survey/my-survey";
})
export class MinePage {
user: any;
user;
orgName: '';
gender: object;
version: string = '';
isLatest: boolean = true;
picture: string = AppGlobal.picture;
picUrl;
mineInfo;
constructor(public navCtrl: NavController,
private appCtrl: App,
private alertCtrl: AlertController,
public navParams: NavParams,
public tabSer:TabsService,
public appService: AppService,
public storage: Storage,public app:App,
private appUpdateService: AppUpdateService,
private appVersion: AppVersion) {
this.orgNameInfo();
}
ionViewWillEnter() {
this.getversion();
}
orgNameInfo(): void {
this.user = this.storage.get("user").then((value) => {
this.user = value;
this.picUrl = this.user.userDetail.user.picUrl;
console.log(value)
this.gender = this.user.userDetail.user.gender;
this.getOrgName(this.user.id, result => {
let data = result;
this.orgName = data["orgName"];
});
});
this.getversion();
this.tabSer.getUserIntegral().subscribe(
(res)=>{
this.mineInfo = res.data;
}
)
}
getOrgName(id, callback?): any {
this.appService.ObserverHttpPost("/wisdomgroup/app/getOrgName", {"userid": id})
......@@ -90,36 +95,6 @@ export class MinePage {
this.navCtrl.push('MySurveyPage');
}
logout() {
this.alertCtrl.create({
message: "确认退出登录?",
buttons: [
{
text: '取消',
role: 'cancel'
},
{
text: '确定',
handler: () => {
// this.appService.ObserverHttpGet("/wisdomgroup/app/logout",null)
// .subscribe((res: Response) => {
// this.appCtrl.getRootNav().setRoot(LoginPage)
// }, error => {
// this.appService.alert('系统错误!');
// })
//退出登陆,将缓存中的用户注销,跳转到登陆页面。
this.storage.get("user").then((value) => {
});
this.storage.remove("user");
this.storage.remove("userLoginInfo");
this.logoutApp();
this.appCtrl.getRootNav().setRoot(LoginPage)
}
}]
}).present();
}
//后台退出
logoutApp() {
this.appService.ObserverHttpGet("/wisdomgroup/app/logout", null)
......@@ -130,11 +105,6 @@ export class MinePage {
);
}
//版本信息
currentVersion() {
this.navCtrl.push("VersionPage");
}
//获取最新版本信息
getversion() {
//检测是否需要更新
......
......@@ -15,7 +15,8 @@ export class AppGlobal {
//接口基地址
// static domain = "http://101.89.112.92:80"; //正式环境
// static domain = "http://180.168.156.212:2931"; //测试环境
static domain = ""; //本地环境
static domain = "http://47.103.35.216:8080"; //阿里云地址
// static domain = ""; //本地环境
//图片地址
......
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