Commit 08313f90 authored by wangqinghua's avatar wangqinghua

icon

parent b4f8dff6
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.0.7" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.0.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......@@ -95,4 +95,6 @@
<engine name="ios" spec="4.5.5" />
<engine name="browser" spec="5.0.4" />
<engine name="android" spec="7.0.0" />
<plugin name="phonegap-plugin-mobile-accessibility" spec="~1.0.5-dev" />
<plugin name="cordova-plugin-camera" spec="~4.0.3" />
</widget>
......@@ -106,6 +106,11 @@
"resolved": "https://registry.npmjs.org/@ionic-native/calendar/-/calendar-4.11.0.tgz",
"integrity": "sha512-9sF4QmTMiCJKEHqMgaCjOIZvzbfUNJqU+pkAGIZmFcUZBigHQuostSJKObT36yYuWeGMseamWJY3oV8on5tMOQ=="
},
"@ionic-native/camera": {
"version": "4.20.0",
"resolved": "http://r.cnpmjs.org/@ionic-native/camera/download/@ionic-native/camera-4.20.0.tgz",
"integrity": "sha1-2yNkl/iAvRuDLkIjSF+Zh1/txXA="
},
"@ionic-native/core": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-4.4.0.tgz",
......@@ -136,6 +141,11 @@
"resolved": "https://registry.npmjs.org/@ionic-native/keyboard/-/keyboard-4.6.0.tgz",
"integrity": "sha512-jWFCj/3XyTjm3gi4DaGOkF3rXjDz10v9GGAnFgfataFWc6awRqzNzkCtu98HEbJFstDmAFQMrmXkXR5hGmXNmA=="
},
"@ionic-native/mobile-accessibility": {
"version": "4.20.0",
"resolved": "http://r.cnpmjs.org/@ionic-native/mobile-accessibility/download/@ionic-native/mobile-accessibility-4.20.0.tgz",
"integrity": "sha1-Dj9r+gfIrqsPDKn4dcYpTOO9gXU="
},
"@ionic-native/splash-screen": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-4.4.0.tgz",
......
......@@ -290,6 +290,71 @@ module.exports = [
"clobbers": [
"cordova.plugins.Downloader"
]
},
{
"id": "cordova-plugin-network-information.network",
"file": "plugins/cordova-plugin-network-information/www/network.js",
"pluginId": "cordova-plugin-network-information",
"clobbers": [
"navigator.connection",
"navigator.network.connection"
]
},
{
"id": "cordova-plugin-network-information.Connection",
"file": "plugins/cordova-plugin-network-information/www/Connection.js",
"pluginId": "cordova-plugin-network-information",
"clobbers": [
"Connection"
]
},
{
"id": "phonegap-plugin-mobile-accessibility.mobile-accessibility",
"file": "plugins/phonegap-plugin-mobile-accessibility/www/mobile-accessibility.js",
"pluginId": "phonegap-plugin-mobile-accessibility",
"clobbers": [
"window.MobileAccessibility"
]
},
{
"id": "phonegap-plugin-mobile-accessibility.MobileAccessibilityNotifications",
"file": "plugins/phonegap-plugin-mobile-accessibility/www/MobileAccessibilityNotifications.js",
"pluginId": "phonegap-plugin-mobile-accessibility",
"clobbers": [
"MobileAccessibilityNotifications"
]
},
{
"id": "cordova-plugin-camera.Camera",
"file": "plugins/cordova-plugin-camera/www/CameraConstants.js",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"Camera"
]
},
{
"id": "cordova-plugin-camera.CameraPopoverOptions",
"file": "plugins/cordova-plugin-camera/www/CameraPopoverOptions.js",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"CameraPopoverOptions"
]
},
{
"id": "cordova-plugin-camera.camera",
"file": "plugins/cordova-plugin-camera/www/Camera.js",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"navigator.camera"
]
},
{
"id": "cordova-plugin-camera.CameraPopoverHandle",
"file": "plugins/cordova-plugin-camera/www/CameraPopoverHandle.js",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"CameraPopoverHandle"
]
}
];
module.exports.metadata =
......@@ -310,7 +375,10 @@ module.exports.metadata =
"cordova-plugin-statusbar": "2.4.2",
"cordova.plugins.diagnostic": "2.0.0",
"cordova-plugin-tts": "0.2.3",
"integrator-cordova-plugin-downloader": "0.0.1"
"integrator-cordova-plugin-downloader": "0.0.1",
"cordova-plugin-network-information": "2.0.2-dev",
"phonegap-plugin-mobile-accessibility": "1.0.5-dev",
"cordova-plugin-camera": "4.0.3"
};
// BOTTOM OF METADATA
});
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.smart19.starter" version="4.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>智汇19号</name>
<widget id="io.ionic.partyCloud.starter.test" version="0.0.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
......
......@@ -306,6 +306,75 @@ module.exports = [
"clobbers": [
"cordova.plugins.Downloader"
]
},
{
"file": "plugins/cordova-plugin-network-information/www/network.js",
"id": "cordova-plugin-network-information.network",
"pluginId": "cordova-plugin-network-information",
"clobbers": [
"navigator.connection",
"navigator.network.connection"
]
},
{
"file": "plugins/cordova-plugin-network-information/www/Connection.js",
"id": "cordova-plugin-network-information.Connection",
"pluginId": "cordova-plugin-network-information",
"clobbers": [
"Connection"
]
},
{
"file": "plugins/cordova-plugin-network-information/src/browser/network.js",
"id": "cordova-plugin-network-information.NetworkInfoProxy",
"pluginId": "cordova-plugin-network-information",
"runs": true
},
{
"file": "plugins/phonegap-plugin-mobile-accessibility/www/mobile-accessibility.js",
"id": "phonegap-plugin-mobile-accessibility.mobile-accessibility",
"pluginId": "phonegap-plugin-mobile-accessibility",
"clobbers": [
"window.MobileAccessibility"
]
},
{
"file": "plugins/phonegap-plugin-mobile-accessibility/www/MobileAccessibilityNotifications.js",
"id": "phonegap-plugin-mobile-accessibility.MobileAccessibilityNotifications",
"pluginId": "phonegap-plugin-mobile-accessibility",
"clobbers": [
"MobileAccessibilityNotifications"
]
},
{
"file": "plugins/cordova-plugin-camera/www/CameraConstants.js",
"id": "cordova-plugin-camera.Camera",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"Camera"
]
},
{
"file": "plugins/cordova-plugin-camera/www/CameraPopoverOptions.js",
"id": "cordova-plugin-camera.CameraPopoverOptions",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"CameraPopoverOptions"
]
},
{
"file": "plugins/cordova-plugin-camera/www/Camera.js",
"id": "cordova-plugin-camera.camera",
"pluginId": "cordova-plugin-camera",
"clobbers": [
"navigator.camera"
]
},
{
"file": "plugins/cordova-plugin-camera/src/browser/CameraProxy.js",
"id": "cordova-plugin-camera.CameraProxy",
"pluginId": "cordova-plugin-camera",
"runs": true
}
];
module.exports.metadata =
......@@ -326,7 +395,10 @@ module.exports.metadata =
"cordova-plugin-statusbar": "2.4.2",
"cordova.plugins.diagnostic": "2.0.0",
"cordova-plugin-tts": "0.2.3",
"integrator-cordova-plugin-downloader": "0.0.1"
"integrator-cordova-plugin-downloader": "0.0.1",
"cordova-plugin-network-information": "2.0.2-dev",
"phonegap-plugin-mobile-accessibility": "1.0.5-dev",
"cordova-plugin-camera": "4.0.3"
}
// BOTTOM OF METADATA
});
\ No newline at end of file
......@@ -13,6 +13,7 @@ import {TabsPage} from "../pages/tabs/tabs";
import {Geolocation} from "@ionic-native/geolocation";
import {AppService} from "../service/http.service";
import {EmitService} from "../provide/emit.service";
import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
@Component({
templateUrl: 'app.html'
......@@ -34,6 +35,7 @@ export class MyApp {
private geolocation: Geolocation,
public emitSer:EmitService,
public storage: Storage,
public mobileAccess:MobileAccessibility,
public appService: AppService) {
platform.ready().then(() => {
......@@ -43,6 +45,9 @@ export class MyApp {
this.statusBar.backgroundColorByHexString('#e12724');
this.statusBar.styleLightContent();
//
this.mobileAccess.usePreferredTextZoom(false);
//检测是否需要更新
appVersion.getVersionNumber().then((version: string) => {
appUpdateService.compariVersion().subscribe(res => {
......
......@@ -39,6 +39,8 @@ import {SearchNewPageModule} from "../pages/home-pages/search-new/search-new.mod
import {StuffDetailPageModule} from "../pages/home-pages/stuff-detail/stuff-detail.module";
import {HomeService} from "../pages/home/home.service";
import {PublishPageModule} from "../pages/discover-pages/publish/publish.module";
import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
import {Camera} from "@ionic-native/camera";
@NgModule({
declarations: [
......@@ -94,6 +96,8 @@ import {PublishPageModule} from "../pages/discover-pages/publish/publish.module"
Calendar,
Badge,
TextToSpeech,
MobileAccessibility,
Camera,
Geolocation,
DatePipe,
LearnService,
......
......@@ -3,6 +3,7 @@
@import "../assets/iconfont/iconfont";
html{
font-family: "Noto Sans CJK SC", "Source Han Sans CN";
font-size: 10px !important;
}
//html,ion-app.ios{
// font-family: "webfont",serif !important;
......
src/assets/imgs/home/icon-bbgz.png

2.51 KB | W: | H:

src/assets/imgs/home/icon-bbgz.png

2.53 KB | W: | H:

src/assets/imgs/home/icon-bbgz.png
src/assets/imgs/home/icon-bbgz.png
src/assets/imgs/home/icon-bbgz.png
src/assets/imgs/home/icon-bbgz.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-hdgz.png

2.58 KB | W: | H:

src/assets/imgs/home/icon-hdgz.png

2.2 KB | W: | H:

src/assets/imgs/home/icon-hdgz.png
src/assets/imgs/home/icon-hdgz.png
src/assets/imgs/home/icon-hdgz.png
src/assets/imgs/home/icon-hdgz.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-lhbb.png

2.93 KB | W: | H:

src/assets/imgs/home/icon-lhbb.png

3.24 KB | W: | H:

src/assets/imgs/home/icon-lhbb.png
src/assets/imgs/home/icon-lhbb.png
src/assets/imgs/home/icon-lhbb.png
src/assets/imgs/home/icon-lhbb.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-mail.png

1.73 KB | W: | H:

src/assets/imgs/home/icon-mail.png

1.69 KB | W: | H:

src/assets/imgs/home/icon-mail.png
src/assets/imgs/home/icon-mail.png
src/assets/imgs/home/icon-mail.png
src/assets/imgs/home/icon-mail.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-more.png

2.1 KB | W: | H:

src/assets/imgs/home/icon-more.png

2.39 KB | W: | H:

src/assets/imgs/home/icon-more.png
src/assets/imgs/home/icon-more.png
src/assets/imgs/home/icon-more.png
src/assets/imgs/home/icon-more.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-wjgl.png

2.69 KB | W: | H:

src/assets/imgs/home/icon-wjgl.png

2.75 KB | W: | H:

src/assets/imgs/home/icon-wjgl.png
src/assets/imgs/home/icon-wjgl.png
src/assets/imgs/home/icon-wjgl.png
src/assets/imgs/home/icon-wjgl.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-xxcs.png

1.99 KB | W: | H:

src/assets/imgs/home/icon-xxcs.png

2.89 KB | W: | H:

src/assets/imgs/home/icon-xxcs.png
src/assets/imgs/home/icon-xxcs.png
src/assets/imgs/home/icon-xxcs.png
src/assets/imgs/home/icon-xxcs.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/home/icon-zbhb.png

2.76 KB | W: | H:

src/assets/imgs/home/icon-zbhb.png

2.94 KB | W: | H:

src/assets/imgs/home/icon-zbhb.png
src/assets/imgs/home/icon-zbhb.png
src/assets/imgs/home/icon-zbhb.png
src/assets/imgs/home/icon-zbhb.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/mine/czjl.png

1.7 KB | W: | H:

src/assets/imgs/mine/czjl.png

1.95 KB | W: | H:

src/assets/imgs/mine/czjl.png
src/assets/imgs/mine/czjl.png
src/assets/imgs/mine/czjl.png
src/assets/imgs/mine/czjl.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/mine/wdbb.png

1.45 KB | W: | H:

src/assets/imgs/mine/wdbb.png

1.87 KB | W: | H:

src/assets/imgs/mine/wdbb.png
src/assets/imgs/mine/wdbb.png
src/assets/imgs/mine/wdbb.png
src/assets/imgs/mine/wdbb.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/mine/wdhd.png

1.28 KB | W: | H:

src/assets/imgs/mine/wdhd.png

1.61 KB | W: | H:

src/assets/imgs/mine/wdhd.png
src/assets/imgs/mine/wdhd.png
src/assets/imgs/mine/wdhd.png
src/assets/imgs/mine/wdhd.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/mine/wdwj.png

1.26 KB | W: | H:

src/assets/imgs/mine/wdwj.png

1.65 KB | W: | H:

src/assets/imgs/mine/wdwj.png
src/assets/imgs/mine/wdwj.png
src/assets/imgs/mine/wdwj.png
src/assets/imgs/mine/wdwj.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/imgs/mine/wdzb.png

1.39 KB | W: | H:

src/assets/imgs/mine/wdzb.png

1.71 KB | W: | H:

src/assets/imgs/mine/wdzb.png
src/assets/imgs/mine/wdzb.png
src/assets/imgs/mine/wdzb.png
src/assets/imgs/mine/wdzb.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,18 +18,22 @@
<ion-item>
<ion-label class="main-color">选择板块</ion-label>
<ion-select [(ngModel)]="obj.type" cancelText="取消" okText="确定">
<ion-option value="1">机关党委</ion-option>
<ion-option value="2">机关党委</ion-option>
<ion-option value="3">机关党委</ion-option>
<ion-option value="4">机关党委</ion-option>
<ion-option value="5">机关党委</ion-option>
<ion-option value="6">机关党委</ion-option>
<ion-option *ngFor="let type of plateList" [value]="type.id">{{type.name}}</ion-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label class="main-color">发布范围</ion-label>
<ion-select [(ngModel)]="obj.publishRange" cancelText="取消" okText="确定" placeholder="请选择发布范围">
<ion-option *ngFor="let item of group" [value]="item.id">{{item.groupName}}</ion-option>
</ion-select>
</ion-item>
<ion-item>
<button (click)="selectPicture"></button>
</ion-item>
<ion-item>
<ion-input [(ngModel)]="obj.title" placeholder="请输入内容标题"></ion-input>
</ion-item>
<ion-item>
<textarea [(ngModel)]="obj.content" class="content-textarea" placeholder="请在此输入内容标题"></textarea>
<textarea [(ngModel)]="obj.content" class="content-textarea" placeholder="请在此输入发布内容"></textarea>
</ion-item>
</ion-content>
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {CommonService} from "../../../provide/common.service";
import {TabsService} from "../../tabs/tabs.service";
import {Storage} from "@ionic/storage";
import {Camera,CameraOptions} from "@ionic-native/camera";
@IonicPage()
@Component({
......@@ -9,26 +12,73 @@ import {CommonService} from "../../../provide/common.service";
})
export class PublishPage {
//1党规党章,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示, 8党务参考,9廉政格言,10纪检提示,11风险排查,12警示教育,13支部活动,14党建联建,15结对帮扶
plateList = [
{name:'党规党章',id:'1'},{name:'系列讲话',id:'2'},{name:'中央精神',id:'3'},{name:'本市部署',id:'4'},{name:'通知公告',id:'5'},
{name:'党建动态',id:'6'},{name:'工作提示',id:'7'},{name:'党务参考',id:'8'},{name:'廉政格言',id:'9'},{name:'纪检提示',id:'10'},
{name:'风险排查',id:'11'},{name:'警示教育',id:'12'},{name:'支部活动',id:'13'},{name:'党建联建',id:'14'},{name:'结对帮扶',id:'15'},
];
obj = {
type:1,
type:'1',
title:'',
content:'',
}
constructor(public navCtrl: NavController, public navParams: NavParams,
public commonSer:CommonService) {
publishRange:''
};
group; //用户组
userid; //当前登录人的id
constructor(public navCtrl: NavController, public navParams: NavParams,public storage:Storage,
public camera:Camera,
public commonSer:CommonService,public tabSer:TabsService) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad PublishPage');
this.storage.get("userLoginInfo").then((value) => {
this.userid = value.userid;
})
//获取用户组
this.tabSer.getGroup().subscribe(
(res)=>{
this.group = res.list;
}
)
}
//选择图片
selectPicture(){
const options: CameraOptions = {
quality: 30,
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE
}
this.camera.getPicture(options).then((imagedata)=>{
let base64Image = 'data:image/jpeg;base64,' + imagedata;
alert(base64Image);
})
}
//发布
publish(){
const data = {
title:this.obj.title,
plateType:this.obj.type,
source:'上海市委组织部',
publishStatus:'1',
content:this.obj.content,
publishRange:this.obj.publishRange,
submitter:this.userid,
stuffType:1
}
this.commonSer.alert('确定提交审核当前内容?',()=>{
this.tabSer.stuffSave(data).subscribe(
(res)=>{
this.commonSer.toast('已提交审核')
setTimeout(()=>{
this.navCtrl.pop()
},1000)
}
)
})
}
......
......@@ -17,6 +17,21 @@
<div class="stuff-content">
<p [innerHTML]="stuffObj?.content"></p>
</div>
<div class="stuff-attachments">
<ng-container *ngFor="let item of attachments">
<div style="height: 160px;" *ngIf="item.resourceType == 2 || item.resourceType == 1">
<img style="height: 160px;" [src]="url + item.path" alt="">
</div>
<div *ngIf="item.resourceType == 3">
<video width="100%" height="100%" [src]="url + item.path" controls="controls">
您的浏览器不支持 html5。
</video>
</div>
</ng-container>
<ng-container *ngFor="let item of attachments">
</ng-container>
</div>
</div>
<div class="stuff-comment">
<p class="comment-title">评论</p>
......
......@@ -29,6 +29,9 @@ page-stuff-detail {
color: #888888;
}
}
.stuff-content{
line-height: 2.8rem;
}
}
}
......
......@@ -4,6 +4,7 @@ import {TabsService} from "../../tabs/tabs.service";
import {Storage} from "@ionic/storage";
import {CommonService} from "../../../provide/common.service";
import {DomSanitizer} from "@angular/platform-browser";
import {AppGlobal} from "../../../service/http.service";
@IonicPage()
@Component({
......@@ -21,6 +22,10 @@ export class StuffDetailPage {
footerView: boolean;
comment: boolean = false;
url = AppGlobal.domain +'/wisdomgroup';
attachments; //附件
constructor(public navCtrl: NavController, public navParams: NavParams,public sanitizer: DomSanitizer,
public tabSer: TabsService, public storage: Storage, public commonSer: CommonService) {
}
......@@ -45,6 +50,7 @@ export class StuffDetailPage {
this.tabSer.stuffInfo(this.stuffId).subscribe(
(res) => {
this.stuffObj = res.data;
this.attachments = res.data.attachments;
let con = this.stuffObj.content.replace(/\r?\n/g, "<br />");
this.stuffObj.content = this.sanitizer.bypassSecurityTrustHtml(con);
}
......
......@@ -7,22 +7,22 @@
<ion-content>
<div class="item2-2">
<div class="card" (click)="goActivity()">
<img src="./assets/imgs/home/icon-bm.png" alt="">
<img src="./assets/imgs/home/icon-hdbm.png" alt="">
<label class="label2-2">活动报名</label>
<img class="new-logo" *ngIf="hasNewActivity==1" src="./assets/imgs/new.png">
<img class="new-logo" *ngIf="hasNew.activity == 1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goAnnouncement()">
<img src="./assets/imgs/home/icon-tz.png" alt="">
<img src="./assets/imgs/home/icon-tzgg.png" alt="">
<label class="label2-2">通知公告</label>
<img class="new-logo" *ngIf="hasNewNotice==1" src="./assets/imgs/new.png">
<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="hasNewPremanager==1" src="./assets/imgs/new.png">
<img class="new-logo" *ngIf="hasNew.premanager == 1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goDuty()">
<img src="./assets/imgs/home/icon-zb.png" alt="">
<img src="./assets/imgs/home/icon-zbqk.png" alt="">
<label class="label2-2">值班情况</label>
</div>
<ng-container *ngIf="role == 1 || role == 2 || role == 3">
......@@ -36,7 +36,7 @@
</div>
</ng-container>
<div class="card" (click)="goToMySurvey()">
<img src="./assets/imgs/home/icon-wjtc.png" alt="">
<img src="./assets/imgs/home/icon-wjdc.png" alt="">
<label class="label2-2">问卷调查</label>
</div>
<ng-container *ngIf="role == 3">
......@@ -45,6 +45,17 @@
<label class="label2-2 more2-2">问卷管理</label>
</div>
</ng-container>
<div class="card" (click)="goTo('LearningListPage')">
<img src="./assets/imgs/home/icon-xxcs.png">
<label class="label2-2 more2-2">学习测试</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">
<label class="label2-2 more2-2">测试管理</label>
</div>
</ng-container>
<ng-container *ngIf="role == 3 || role == 4">
<div class="card" (click)="replayManage()">
<img src="./assets/imgs/home/icon-zbhb.png" alt="">
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {Response} from "@angular/http";
import {AppService} from "../../../service/http.service";
import {ListPage} from "../surveyManage/list/list";
import {ChangeApplyListPage} from "../manageDuty/change-apply-list/change-apply-list";
import {MySurveyPage} from "../mySurvey/my-survey/my-survey";
import {SurveryPage} from "../mySurvey/survery/survery";
import {TabsService} from "../../tabs/tabs.service";
@IonicPage()
@Component({
......@@ -15,16 +16,64 @@ import {SurveryPage} from "../mySurvey/survery/survery";
export class MoreAppPage {
role;
hasNew = {
activity: 0,
notice: 0,
premanager: 0,
message: 0,
test: 0,
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
public appService: AppService,public tabsSer:TabsService) {
}
ionViewDidLoad() {
this.getRole();
}
/**
* 获取是否有新的信息
*/
getHasNew() {
//获取是否有新活动
this.tabsSer.hasNewActivity().subscribe(
(res) => {
this.hasNew.activity = res;
}
)
//获取是否有新通知
this.tabsSer.hasNewNotice().subscribe(
(res) => {
this.hasNew.notice = res;
}
)
//获取是否有新通知
this.tabsSer.hasNewMessage().subscribe(
(res) => {
this.hasNew.message = res;
}
)
//获取是否有新报备
this.tabsSer.hasNewPremanager().subscribe(
(res) => {
this.hasNew.premanager = res;
}
)
//获取是否有新问卷
this.tabsSer.hasNewTest().subscribe(
(res) => {
this.hasNew.test = res;
}
)
}
//获取权限
getRole(){
getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json();
}, error => {
......@@ -33,15 +82,13 @@ export class MoreAppPage {
}
//问卷调查
goToSurveyManage(){
goToSurveyManage() {
this.navCtrl.push('ListPage');
}
//活动
goActivity() {
this.navCtrl.push('ActivityListPage', {
});
this.navCtrl.push('ActivityListPage', {});
}
goAnnouncement() {
......@@ -56,24 +103,29 @@ export class MoreAppPage {
}
//报备跟踪
goReportTrack(){
goReportTrack() {
this.navCtrl.push("ReportTrackPage");
}
//值班情况
goDuty(){
goDuty() {
this.navCtrl.push("DutyPage");
}
goToMySurvey(){
goToMySurvey() {
this.navCtrl.push('SurveryPage');
}
goActivityTrack(){
goActivityTrack() {
this.navCtrl.push("ActivityTrackPage");
}
replayManage(){
replayManage() {
this.navCtrl.push('ChangeApplyListPage');
}
//前往
goTo(page) {
this.navCtrl.push(page);
}
}
......@@ -26,22 +26,24 @@
</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;">
<img src="{{picture+item.pictureId}}" class="slide-image" (click)="goToDetail(item)">
<p class="slides-title">{{item.title}}</p>
<div style="height: 200px">
<ion-slides (ionSlideDidChange)="slideChange($event)" #slides *ngIf="slidersItems.length>0" pager loop="true"
autoplay="2000" speed="1500">
<ion-slide style="height:200px;width: 100%;" *ngFor="let item of slidersItems;">
<img src="{{picture+item.imgUrl}}" class="slide-image" (click)="goToDetail(item)">
</ion-slide>
</ion-slides>
</div>
<p class="slides-title">{{slideTitle}} <span class="main-color" float-end>1<span style="font-size: 1.5rem;font-weight: 400;">/{{slidersItems.length}}</span></span></p>
<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>天,希望您不忘初心,牢记使命,
<span class="main-color">{{partyObj?.name}}</span>,欢迎您,今天是 <span
class="main-color">{{partyObj?.now | date:'yyyy年MM月dd日'}}</span>
今天是您加入中国共产党的 <span class="main-color">{{partyObj?.partytime}}</span>天,希望您不忘初心,牢记使命,
永远奋斗。
</ion-col>
</ion-row>
......@@ -56,6 +58,7 @@
</div>
<div class="main-news">
<ng-container *ngFor="let new of newList;">
<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}}</p>
......@@ -65,10 +68,22 @@
</p>
</ion-col>
<ion-col col-4 class="news-right">
<img src="./assets/imgs/demo.png">
<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}}</p>
<p class="news-end">
<span>{{new.source}}</span>
<span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container>
</div>
</ion-content>
<div *ngIf="isSign" class="signMask">
......@@ -78,7 +93,8 @@
{{signObj.text}}
</div>
<div class="mask-button">
<button *ngIf="signObj.isSign == 'no'" [disabled]="disabledClick" class="submit-btn submit" (click)="signUp()">签到{{signText}}</button>
<button *ngIf="signObj.isSign == 'no'" [disabled]="disabledClick" class="submit-btn submit"
(click)="signUp()">签到{{signText}}</button>
</div>
</div>
</div>
page-home {
ion-slides {
width: 100%;
height: 160px;
height: 200px;
}
.slide-image {
width: 100%;
height: 160px;
height: 200px;
}
.swiper-container {
height: 160px;
height: 200px;
width: 100%;
overflow-y: auto;
}
.slides-title {
position: absolute;
bottom: 0;
left: 0;
font-size: 1.5rem;
color: #fff;
color: #333;
width: 100%;
background-color: rgba(153, 153, 153, 0.5);
text-align: left;
padding: 3px 15px;
height: 2rem;
line-height: 2rem;
padding: 0 1rem;
font-size: 1.8rem;
font-weight: 500;
}
//头部搜索
......@@ -90,7 +90,6 @@ page-home {
font-size: 1.5rem;
line-height: 1.6rem;
font-weight: 400;
ion-row {
padding: .5rem 0;
-webkit-border-radius: 5px;
......@@ -103,6 +102,9 @@ page-home {
display: flex;
align-items: center;
justify-content: center;
img{
width: 2.5rem;
}
}
}
}
......@@ -123,6 +125,7 @@ page-home {
align-self: flex-start;
font-weight: bold;
width: 100%;
margin-bottom: 1.2rem;
}
.news-end {
......
......@@ -35,10 +35,10 @@ export class HomePage {
@ViewChild('tips') tips: ElementRef;
@ViewChild('tabSpan') tabSpan: ElementRef;
picture: string = AppGlobal.picture;
picture: string = AppGlobal.domain +'/wisdomgroup';
slidersItems = [];
noticeList = [];
tabsList = [{name: "党规党章",}, {name: "系列讲话",}, {name: "中央精神",},{name:"本市部署"}];
tabsList = [{name: "党规党章",}, {name: "系列讲话",}, {name: "中央精神",}, {name: "本市部署"}];
index = 0;
isSign = false;
......@@ -46,56 +46,80 @@ export class HomePage {
noReadNum;
signObj = {
'text':'',
'isSign':''
'text': '',
'isSign': ''
}; //签到参数
disabledClick = true;
signText; 签到倒计时
signText; //签到倒计时
partyObj; //政治生日
slideTitle;
constructor(public navCtrl: NavController,public tts:TextToSpeech,
public commonSer:CommonService,public emitSer:EmitService,
constructor(public navCtrl: NavController, public tts: TextToSpeech,
public commonSer: CommonService, public emitSer: EmitService,
public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) {
// 接收发射过来的数据
this.emitSer.eventEmit.subscribe((value: any) => {
if(!isNaN(value)){
if (!isNaN(value)) {
this.noReadNum = value;
}
});
}
ionViewDidLoad(){
ionViewDidLoad() {
this.tabsSer.signNow().subscribe(
(res)=>{
(res) => {
this.signObj = res.data;
}
);
//初始化日期
this.appService.ObserverHttpGet("/wisdomgroup/modules/common/file/getBanner", {}).subscribe((res: Response) => {
this.slidersItems = res.json();
}, error => {
})
this.change(0);
this.getBanner();
this.getInfo();
}
//获取轮播图
getBanner(){
getBanner() {
const data = {
obj:{
resourceType:2,
isRecommend:1,
obj: {
resourceType: 2,
isRecommend: 1,
}
}
this.tabsSer.stuffPage(data).subscribe(
(res)=>{
(res) => {
this.slidersItems = res.data;
this.slidersItems.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
}
})
console.log(this.slidersItems);
}
)
}
//slideChange
slideChange(e) {
let index = this.slides.getActiveIndex();
if (index == this.slidersItems.length + 1) index = 1
this.slideTitle = this.slidersItems[index - 1].title;
}
//获取党员生日
getInfo() {
this.storage.get("userLoginInfo").then((value) => {
let userid = value.userid;
this.tabsSer.getInfo(userid).subscribe(
(res) => {
this.partyObj = res.apiResult.data;
}
);
})
}
//所属板块类型(1党规党章,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,
// * 8党务参考,9廉政格言,10纪检提示,11风险排查,12警示教育,13支部活动,14党建联建,15结对帮扶)
change(index) {
......@@ -103,30 +127,38 @@ export class HomePage {
let spanWidth = this.tabSpan.nativeElement.offsetWidth; //文字宽度
this.tips.nativeElement.style.width = this.tabSpan.nativeElement.offsetWidth + 'px';
// 自身div的一半 - 滑块的一半
this.tips.nativeElement.style.left = itemWidth * (index)+ (itemWidth - spanWidth)/2 + 'px';
this.tips.nativeElement.style.left = itemWidth * (index) + (itemWidth - spanWidth) / 2 + 'px';
this.index = index;
const data = {
pageSize:1,
pageCount:100,
obj:{
'plateType':index +1
pageSize: 1,
pageCount: 100,
obj: {
'plateType': index + 1,
resourceType: 1
}
}
this.tabsSer.stuffPage(data).subscribe(
(res)=>{
(res) => {
this.newList = res.data;
this.newList.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
}
})
console.log(this.newList);
}
)
}
//签到
signUp(){
signUp() {
this.tabsSer.sign().subscribe(
(res)=>{
(res) => {
this.isSign = false;
if(res.errcode == '1000'){
if (res.errcode == '1000') {
this.signObj.isSign = 'yes';
this.commonSer.toast('签到成功');
}else{
} else {
this.commonSer.toast(res.errmsg);
}
}
......@@ -134,13 +166,13 @@ export class HomePage {
}
//签到
signNow(){
signNow() {
this.isSign = true;
let totalTime = 5;
this.signText = '(倒计时'+ totalTime + 's)';
this.signText = '(倒计时' + totalTime + 's)';
let clock = window.setInterval(() => {
totalTime--;
this.signText = '(倒计时'+ totalTime + 's)';
this.signText = '(倒计时' + totalTime + 's)';
if (totalTime < 0) {
this.signText = '';
window.clearInterval(clock);
......@@ -150,20 +182,20 @@ export class HomePage {
}
//查看文章详情
goToDetail(item){
this.navCtrl.push(StuffDetailPage,{
id:item.id
goToDetail(item) {
this.navCtrl.push(StuffDetailPage, {
id: item.id
})
}
//前往搜索页面
goToSearch(){
goToSearch() {
this.navCtrl.push(SearchNewPage);
}
//消息提醒页面
goToNotice(){
goToNotice() {
this.navCtrl.push(NoticePage);
}
......
......@@ -29,12 +29,15 @@
<p class="address">{{mineInfo?.orgName}}</p>
</ion-col>
<ion-col col-4 class="text-right">
<span class="red-span-round">党支部书记</span>
<span class="red-span-round">{{mineInfo?.post}}</span>
</ion-col>
</ion-row>
</ion-grid>
</div>
<p class="score">党建积分:{{mineInfo?.total}}</p>
<p class="score">党建积分:
<ng-container *ngIf="mineInfo?.total">{{mineInfo?.total}}</ng-container>
<ng-container *ngIf="!mineInfo?.total">0</ng-container>
</p>
</div>
</div>
<div class="group-box">
......@@ -89,7 +92,7 @@
<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="">
<img src="./assets/imgs/mine/xtsz.png" alt="">
</ion-col>
<ion-col class="group-right" col-10>
<span>设置</span>
......
......@@ -37,8 +37,13 @@ page-mine {
.group-box {
background-color: #fff;
.group-left{
display: flex;
align-items: center;
justify-content: center;
}
img{
width: 3rem;
width: 2.5rem;
}
}
......
......@@ -23,60 +23,45 @@
</ion-slides>
</div>
<div class="item2" style="padding: 0px;">
<div class="item2" style="padding: 0px;margin-top: .5rem">
<div class="item2-2">
<div class="card" (click)="goTo('ActivityListPage')">
<img src="./assets/imgs/home/icon-bm.png" alt="">
<img src="./assets/imgs/home/icon-txl.png" >
<label class="label2-2">通讯录</label>
<img class="new-logo" *ngIf="hasNew.activity==1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goTo('ActivityListPage')">
<img src="./assets/imgs/home/icon-hdbm.png" >
<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="">
<img src="./assets/imgs/home/icon-tzgg.png" >
<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="">
<img src="./assets/imgs/home/icon-lhbb.png" >
<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="">
<img src="./assets/imgs/home/icon-zbqk.png" >
<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="">
<img src="./assets/imgs/home/icon-wjdc.png" >
<label class="label2-2 more2-2">问卷调查</label>
</div>
<div class="card" (click)="goTo('LearningListPage')">
<img src="./assets/imgs/home/icon-xxcs.png" alt="">
<img src="./assets/imgs/home/icon-xxcs.png" >
<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>
</ng-container>
<div class="card" (click)="goTo('MoreAppPage')">
<img src="./assets/imgs/home/icon-more.png" alt="">
<img src="./assets/imgs/home/icon-more.png" >
<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;">
......
......@@ -88,10 +88,10 @@ page-serve {
.new-logo {
position: absolute;
width: 25px;
height: 12px;
width: 20px;
height: 10px;
top: -3px;
right: -1px;
right: 6px;
}
.icon3 {
......
......@@ -6,120 +6,138 @@ import {AppGlobal} from "../../service/http.service";
import {CommonService} from "../../provide/common.service";
@Injectable()
export class TabsService{
export class TabsService {
constructor(
private http:HttpClient, //该请求 将结果转为json
private commonSer:CommonService,
private https:Http, //该请求不转json
){}
private http: HttpClient, //该请求 将结果转为json
private commonSer: CommonService,
private https: Http, //该请求不转json
) {
}
//登录
loginpost(data): Observable<any>{
return this.http.post(AppGlobal.domain+'/wisdomgroup/app/loginpost?'+this.commonSer.toQuery(data),null)
loginpost(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/app/loginpost?' + this.commonSer.toQuery(data), null)
}
//消息提示
findAllActivityForAppWithXQ(): Observable<any>{
return this.http.get(AppGlobal.domain+'/wisdomgroup/modules/message/findAllActivityForAppWithXQ')
findAllActivityForAppWithXQ(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/message/findAllActivityForAppWithXQ')
}
//获取轮播图
getBanner(): Observable<any>{
return this.http.get(AppGlobal.domain+'/wisdomgroup/modules/common/file/getBanner')
getBanner(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/getBanner')
}
//获取权限
getRoles(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/app/getRoles', );
getRoles(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/app/getRoles',);
}
//获取参加活动的日期
appOrderCal(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/order/appOrderCal');
appOrderCal(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/order/appOrderCal');
}
//获取离沪日期
appPreCal(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/userpre/appPreCal');
appPreCal(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/userpre/appPreCal');
}
//每月值班信息
getMyScheduleOnMonth(data): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/schedule/app/getMyScheduleOnMonth?'+this.commonSer.toQuery(data));
getMyScheduleOnMonth(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/schedule/app/getMyScheduleOnMonth?' + this.commonSer.toQuery(data));
}
//获取节假日
getFestivalAboutMonth(data): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/workCalendar/getFestivalAboutMonth?'+this.commonSer.toQuery(data));
getFestivalAboutMonth(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/workCalendar/getFestivalAboutMonth?' + this.commonSer.toQuery(data));
}
//获取是否有新的活动
hasNewActivity(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/activity/hasNewActivity');
hasNewActivity(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/activity/hasNewActivity');
}
//获取是否有新的通知
hasNewNotice(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/notice/hasNewNotice');
hasNewNotice(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/notice/hasNewNotice');
}
//获取是否有新信息
hasNewMessage(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/message/hasNewMessage');
hasNewMessage(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/message/hasNewMessage');
}
//获取是否有新信息
hasNewPremanager(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/premanager/hasNewPremanager');
hasNewPremanager(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/premanager/hasNewPremanager');
}
//获取是否有新的问卷
hasNewTest(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/learnTest/hasNewTest');
hasNewTest(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/learnTest/hasNewTest');
}
//问卷已读
testAddRecodings(): Observable<any>{
return this.https.get(AppGlobal.domain +'/wisdomgroup/modules/learnTest/addRecodings');
testAddRecodings(): Observable<any> {
return this.https.get(AppGlobal.domain + '/wisdomgroup/modules/learnTest/addRecodings');
}
//活动已读
activityAddRecodings(): Observable<any>{
return this.https.get(AppGlobal.domain +'/wisdomgroup/modules/activity/addRecodings');
activityAddRecodings(): Observable<any> {
return this.https.get(AppGlobal.domain + '/wisdomgroup/modules/activity/addRecodings');
}
//下载文件
downFile(data): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/common/file/download/'+data,{responseType: 'blob'});
downFile(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/download/' + data, {responseType: 'blob'});
}
//新闻列表
stuffPage(data): Observable<any>{
return this.http.post(AppGlobal.domain +'/wisdomgroup/modules/stuff/page',data);
stuffPage(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/page', data);
}
//签到
sign(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/twissign/sign');
sign(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/twissign/sign');
}
//查询积分
getUserIntegral(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/integral/getUserIntegral');
getUserIntegral(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/integral/getUserIntegral');
}
//查看文章详情
stuffInfo(params): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/stuff/info/'+params);
stuffInfo(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/stuff/info/' + params);
}
//查看文章详情
updateNumByType(data): Observable<any>{
return this.http.post(AppGlobal.domain +'/wisdomgroup/modules/stuff/updateNumByType',data);
updateNumByType(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/updateNumByType', data);
}
//是否签到
signNow(): Observable<any>{
return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/twissign/signNow');
signNow(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/twissign/signNow');
}
getInfo(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/auth4/user/getInfo/' + params);
}
//文章发布
stuffSave(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/save', data);
}
//获取用户组
getGroup(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/sysmanagement/usergroup/search.ajax');
}
}
\ No newline at end of file
import {EventEmitter, Injectable} from '@angular/core';
import { Injectable} from '@angular/core';
import {Platform, ToastController, App, NavController, Tabs} from 'ionic-angular';
import {EmitService} from "./emit.service";
......@@ -11,24 +11,21 @@ export class BackButtonService {
// 1.false 正常返回上一层,2.true,禁止返回上一层,3.result,返回列表页面
isDo = 'false';
//构造函数 依赖注入
constructor(public platform: Platform,
public appCtrl: App, public eventEmitSer: EmitService,
public toastCtrl: ToastController) {
// 接收发射过来的数据
this.eventEmitSer.eventEmit.subscribe((value: any) => {
if(isNaN(value)){ //value为数字 代表消息
this.isDo = value;
}
});
}
//注册方法
registerBackButtonAction(tabRef: Tabs): void {
//registerBackButtonAction是系统自带的方法
this.platform.registerBackButtonAction(() => {
//获取NavController
let activeNav: NavController = this.appCtrl.getActiveNavs()[0];
//如果可以返回上一页,则执行pop
if (activeNav.canGoBack()) {
if (this.isDo === 'false') { //正常返回
......@@ -41,7 +38,7 @@ export class BackButtonService {
} else {
if (tabRef == null || tabRef._selectHistory[tabRef._selectHistory.length - 1] === tabRef.getByIndex(0).id) {
//执行退出
// this.showExit();
this.showExit();
} else {
//选择首页第一个的标签
tabRef.select(0);
......
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