Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
party-build-cloud
Commits
01942776
Commit
01942776
authored
Apr 26, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到发布
parent
500b0360
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
166 additions
and
60 deletions
+166
-60
config.xml
config.xml
+1
-1
__content__.json
...ild/intermediates/transforms/dex/release/__content__.json
+2
-2
app.component.ts
src/app/app.component.ts
+17
-3
app.scss
src/app/app.scss
+10
-0
discover.html
src/pages/tabs/discover/discover.html
+2
-2
discover.ts
src/pages/tabs/discover/discover.ts
+15
-1
home.html
src/pages/tabs/home/home.html
+11
-8
home.scss
src/pages/tabs/home/home.scss
+3
-0
home.ts
src/pages/tabs/home/home.ts
+40
-4
mine.html
src/pages/tabs/mine/mine.html
+2
-2
mine.ts
src/pages/tabs/mine/mine.ts
+15
-1
notice.ts
src/pages/tabs/notice/notice.ts
+9
-5
serve.html
src/pages/tabs/serve/serve.html
+3
-3
serve.ts
src/pages/tabs/serve/serve.ts
+31
-24
tabs.service.ts
src/pages/tabs/tabs.service.ts
+5
-4
No files found.
config.xml
View file @
01942776
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"io.ionic.partyCloud.starter.test"
version=
"0.0.
5
"
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.
6
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<name>
部机关党建云(测试)
</name>
<name>
部机关党建云(测试)
</name>
<description>
An awesome Ionic/Cordova app.
</description>
<description>
An awesome Ionic/Cordova app.
</description>
<author
email=
"hi@ionicframework"
href=
"http://ionicframework.com/"
>
Ionic Framework Team
</author>
<author
email=
"hi@ionicframework"
href=
"http://ionicframework.com/"
>
Ionic Framework Team
</author>
...
...
platforms/android/app/build/intermediates/transforms/dex/release/__content__.json
View file @
01942776
[{
"name"
:
"main"
,
"index"
:
0
,
"scopes"
:[
"PROJECT"
,
"EXTERNAL_LIBRARIES"
,
"SUB_PROJECTS"
],
"types"
:[
"DEX"
],
"format"
:
"DIRECTORY"
,
"present"
:
true
}]
[{
"name"
:
"main"
,
"index"
:
0
,
"scopes"
:[
"EXTERNAL_LIBRARIES"
,
"SUB_PROJECTS"
,
"PROJECT"
],
"types"
:[
"DEX"
],
"format"
:
"DIRECTORY"
,
"present"
:
true
}]
\ No newline at end of file
\ No newline at end of file
src/app/app.component.ts
View file @
01942776
...
@@ -12,6 +12,7 @@ import {Response} from "@angular/http";
...
@@ -12,6 +12,7 @@ import {Response} from "@angular/http";
import
{
TabsPage
}
from
"../pages/tabs/tabs"
;
import
{
TabsPage
}
from
"../pages/tabs/tabs"
;
import
{
Geolocation
}
from
"@ionic-native/geolocation"
;
import
{
Geolocation
}
from
"@ionic-native/geolocation"
;
import
{
AppService
}
from
"../service/http.service"
;
import
{
AppService
}
from
"../service/http.service"
;
import
{
EmitService
}
from
"../provide/emit.service"
;
@
Component
({
@
Component
({
templateUrl
:
'app.html'
templateUrl
:
'app.html'
...
@@ -31,8 +32,7 @@ export class MyApp {
...
@@ -31,8 +32,7 @@ export class MyApp {
appUpdateService
:
AppUpdateService
,
appUpdateService
:
AppUpdateService
,
appVersion
:
AppVersion
,
appVersion
:
AppVersion
,
private
geolocation
:
Geolocation
,
private
geolocation
:
Geolocation
,
badge
:
Badge
,
public
emitSer
:
EmitService
,
// public navCtrl: NavController,
public
storage
:
Storage
,
public
storage
:
Storage
,
public
appService
:
AppService
)
{
public
appService
:
AppService
)
{
platform
.
ready
().
then
(()
=>
{
platform
.
ready
().
then
(()
=>
{
...
@@ -88,7 +88,7 @@ export class MyApp {
...
@@ -88,7 +88,7 @@ export class MyApp {
}
else
{
}
else
{
this
.
rootPage
=
LoginPage
;
this
.
rootPage
=
LoginPage
;
}
}
this
.
getNoRead
();
}
}
else
{
else
{
this
.
rootPage
=
LoginPage
;
this
.
rootPage
=
LoginPage
;
...
@@ -96,4 +96,18 @@ export class MyApp {
...
@@ -96,4 +96,18 @@ export class MyApp {
});
});
}
}
getNoRead
(){
this
.
appService
.
ObserverHttpPost
(
"/wisdomgroup/modules/message/findAllActivityForAppWithXQ"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
let
data
=
res
.
json
();
let
num
=
0
;
data
.
forEach
(
e
=>
{
if
(
e
.
isRead
==
0
)
num
++
;
})
this
.
emitSer
.
eventEmit
.
emit
(
num
);
},
error
=>
{
}
);
}
}
}
src/app/app.scss
View file @
01942776
@import
"../theme/icon"
;
@import
"../theme/icon"
;
@import
"../theme/style"
;
@import
"../theme/style"
;
@import
"../assets/iconfont/iconfont"
;
@import
"../assets/iconfont/iconfont"
;
html
{
font-family
:
"Noto Sans CJK SC"
,
"Source Han Sans CN"
;
}
//html,ion-app.ios{
//html,ion-app.ios{
// font-family: "webfont",serif !important;
// font-family: "webfont",serif !important;
// font-style: normal;
// font-style: normal;
...
@@ -304,6 +307,13 @@ p {
...
@@ -304,6 +307,13 @@ p {
height
:
50%
;
height
:
50%
;
overflow
:
scroll
;
overflow
:
scroll
;
}
}
.close
{
position
:
absolute
;
top
:
5px
;
right
:
10px
;
color
:
#666666
;
font-size
:
2
.5rem
;
}
}
}
}
}
a
[
disabled
],
button
[
disabled
],
[
ion-button
][
disabled
],
a
[
disabled
],
button
[
disabled
],
[
ion-button
][
disabled
],
...
...
src/pages/tabs/discover/discover.html
View file @
01942776
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
</button>
</button>
</ion-buttons>
</ion-buttons>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
icon-only
class=
"toolbar-icon"
>
<button
ion-button
icon-only
(
click
)="
goToNotice
()"
class=
"toolbar-icon"
>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<span
class=
"num"
>
2
</span>
<span
*
ngIf=
"noReadNum > 0"
class=
"num"
>
{{noReadNum}}
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
</ion-navbar>
</ion-navbar>
...
...
src/pages/tabs/discover/discover.ts
View file @
01942776
...
@@ -4,6 +4,8 @@ import {SearchNewPage} from "../../home-pages/search-new/search-new";
...
@@ -4,6 +4,8 @@ import {SearchNewPage} from "../../home-pages/search-new/search-new";
import
{
TabsService
}
from
"../tabs.service"
;
import
{
TabsService
}
from
"../tabs.service"
;
import
{
StuffDetailPage
}
from
"../../home-pages/stuff-detail/stuff-detail"
;
import
{
StuffDetailPage
}
from
"../../home-pages/stuff-detail/stuff-detail"
;
import
{
PublishPage
}
from
"../../discover-pages/publish/publish"
;
import
{
PublishPage
}
from
"../../discover-pages/publish/publish"
;
import
{
EmitService
}
from
"../../../provide/emit.service"
;
import
{
NoticePage
}
from
"../notice/notice"
;
@
IonicPage
()
@
IonicPage
()
...
@@ -27,8 +29,15 @@ export class DiscoverPage {
...
@@ -27,8 +29,15 @@ export class DiscoverPage {
index
=
0
;
index
=
0
;
isSign
=
false
;
isSign
=
false
;
newList
;
//新闻列表
newList
;
//新闻列表
noReadNum
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
tabsSer
:
TabsService
)
{
public
tabsSer
:
TabsService
,
public
emitSer
:
EmitService
)
{
// 接收发射过来的数据
this
.
emitSer
.
eventEmit
.
subscribe
((
value
:
any
)
=>
{
if
(
!
isNaN
(
value
)){
this
.
noReadNum
=
value
;
}
});
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
...
@@ -76,4 +85,9 @@ export class DiscoverPage {
...
@@ -76,4 +85,9 @@ export class DiscoverPage {
this
.
navCtrl
.
push
(
PublishPage
);
this
.
navCtrl
.
push
(
PublishPage
);
}
}
//消息提醒页面
goToNotice
(){
this
.
navCtrl
.
push
(
NoticePage
);
}
}
}
src/pages/tabs/home/home.html
View file @
01942776
...
@@ -10,14 +10,17 @@
...
@@ -10,14 +10,17 @@
<ion-icon
class=
"search-icon"
name=
"search"
></ion-icon>
<ion-icon
class=
"search-icon"
name=
"search"
></ion-icon>
</ion-buttons>
</ion-buttons>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
icon-only
(
click
)="
isSign =
true"
class=
"toolbar-signUp"
>
<button
ion-button
icon-only
*
ngIf=
"signObj.isSign == 'no'"
(
click
)="
signNow
()"
class=
"toolbar-signUp"
>
<span
class=
"signUp-span"
>
签到
</span>
<span
class=
"signUp-span"
>
签到
</span>
</button>
<button
ion-button
icon-only
*
ngIf=
"signObj.isSign == 'yes'"
class=
"toolbar-signUp"
>
<span
class=
"signUp-span"
>
已签到
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
icon-only
class=
"toolbar-icon"
>
<button
ion-button
icon-only
(
click
)="
goToNotice
()"
class=
"toolbar-icon"
>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<span
class=
"num"
>
2
</span>
<span
*
ngIf=
"noReadNum > 0"
class=
"num"
>
{{noReadNum}}
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
</ion-navbar>
</ion-navbar>
...
@@ -26,7 +29,7 @@
...
@@ -26,7 +29,7 @@
<div
style=
"height: 160px"
>
<div
style=
"height: 160px"
>
<ion-slides
#
slides
*
ngIf=
"slidersItems.length>0"
pager
loop=
"true"
autoplay=
"2000"
speed=
"1500"
>
<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
)"
>
<img
src=
"{{picture+item.pictureId}}"
class=
"slide-image"
(
click
)="
go
ToDetail
(
item
)"
>
<p
class=
"slides-title"
>
{{item.title}}
</p>
<p
class=
"slides-title"
>
{{item.title}}
</p>
</ion-slide>
</ion-slide>
</ion-slides>
</ion-slides>
...
@@ -70,12 +73,12 @@
...
@@ -70,12 +73,12 @@
</ion-content>
</ion-content>
<div
*
ngIf=
"isSign"
class=
"signMask"
>
<div
*
ngIf=
"isSign"
class=
"signMask"
>
<div
class=
"mask-content"
>
<div
class=
"mask-content"
>
<ion-icon
class=
"close"
(
click
)="
isSign =
false"
name=
"close"
></ion-icon>
<div
class=
"record-conten"
>
<div
class=
"record-conten"
>
"进入新时代,国际国内形势发生广泛而深刻的变化,改革发展面临着新形势新任务新挑战,
{{signObj.text}}
我们要抓住机遇、迎接挑战,关键在于高举新时代改革开放旗帜,继续全面深化改革。"
</div>
</div>
<div
class=
"mask-button"
>
<div
class=
"mask-button"
>
<button
class=
"submit-btn submit"
(
click
)="
signUp
()"
>
签到
</button>
<button
*
ngIf=
"signObj.isSign == 'no'"
[
disabled
]="
disabledClick
"
class=
"submit-btn submit"
(
click
)="
signUp
()"
>
签到{{signText}}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
src/pages/tabs/home/home.scss
View file @
01942776
...
@@ -156,6 +156,9 @@ page-home {
...
@@ -156,6 +156,9 @@ page-home {
width
:
50%
;
width
:
50%
;
height
:
35px
;
height
:
35px
;
}
}
a
[
disabled
],
button
[
disabled
],
[
ion-button
][
disabled
]
{
opacity
:
.4
;
}
}
}
}
}
src/pages/tabs/home/home.ts
View file @
01942776
...
@@ -20,6 +20,7 @@ import {TextToSpeech} from "@ionic-native/text-to-speech";
...
@@ -20,6 +20,7 @@ import {TextToSpeech} from "@ionic-native/text-to-speech";
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
SearchNewPage
}
from
"../../home-pages/search-new/search-new"
;
import
{
SearchNewPage
}
from
"../../home-pages/search-new/search-new"
;
import
{
StuffDetailPage
}
from
"../../home-pages/stuff-detail/stuff-detail"
;
import
{
StuffDetailPage
}
from
"../../home-pages/stuff-detail/stuff-detail"
;
import
{
EmitService
}
from
"../../../provide/emit.service"
;
declare
var
Swiper
;
declare
var
Swiper
;
...
@@ -42,20 +43,33 @@ export class HomePage {
...
@@ -42,20 +43,33 @@ export class HomePage {
isSign
=
false
;
isSign
=
false
;
newList
=
[];
newList
=
[];
noReadNum
;
signObj
=
{
'text'
:
''
,
'isSign'
:
''
};
//签到参数
disabledClick
=
true
;
signText
;
签到倒计时
constructor
(
public
navCtrl
:
NavController
,
public
tts
:
TextToSpeech
,
constructor
(
public
navCtrl
:
NavController
,
public
tts
:
TextToSpeech
,
public
commonSer
:
CommonService
,
public
commonSer
:
CommonService
,
public
emitSer
:
EmitService
,
public
appService
:
AppService
,
public
http
:
Http
,
private
calendar
:
Calendar
,
public
storage
:
Storage
,
public
appService
:
AppService
,
public
http
:
Http
,
private
calendar
:
Calendar
,
public
storage
:
Storage
,
public
badge
:
Badge
,
public
tabsSer
:
TabsService
)
{
public
badge
:
Badge
,
public
tabsSer
:
TabsService
)
{
// 接收发射过来的数据
this
.
emitSer
.
eventEmit
.
subscribe
((
value
:
any
)
=>
{
if
(
!
isNaN
(
value
)){
this
.
noReadNum
=
value
;
}
});
}
}
ionViewDidLoad
(){
ionViewDidLoad
(){
this
.
tabsSer
.
getBanner
().
subscribe
(
this
.
tabsSer
.
signNow
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
s
lidersItems
=
res
;
this
.
s
ignObj
=
res
.
data
;
}
}
)
)
this
.
change
(
0
);
this
.
change
(
0
);
...
@@ -114,6 +128,22 @@ export class HomePage {
...
@@ -114,6 +128,22 @@ export class HomePage {
)
)
}
}
//签到
signNow
(){
this
.
isSign
=
true
;
let
totalTime
=
5
;
this
.
signText
=
'(倒计时'
+
totalTime
+
's)'
;
let
clock
=
window
.
setInterval
(()
=>
{
totalTime
--
;
this
.
signText
=
'(倒计时'
+
totalTime
+
's)'
;
if
(
totalTime
<
0
)
{
this
.
signText
=
''
;
window
.
clearInterval
(
clock
);
this
.
disabledClick
=
false
;
}
},
1000
)
}
//查看文章详情
//查看文章详情
goToDetail
(
item
){
goToDetail
(
item
){
this
.
navCtrl
.
push
(
StuffDetailPage
,{
this
.
navCtrl
.
push
(
StuffDetailPage
,{
...
@@ -126,4 +156,10 @@ export class HomePage {
...
@@ -126,4 +156,10 @@ export class HomePage {
this
.
navCtrl
.
push
(
SearchNewPage
);
this
.
navCtrl
.
push
(
SearchNewPage
);
}
}
//消息提醒页面
goToNotice
(){
this
.
navCtrl
.
push
(
NoticePage
);
}
}
}
src/pages/tabs/mine/mine.html
View file @
01942776
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
</button>
</button>
</ion-buttons>
</ion-buttons>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
icon-only
class=
"toolbar-icon"
>
<button
ion-button
icon-only
(
click
)="
goToNotice
()"
class=
"toolbar-icon"
>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<span
class=
"num"
>
2
</span>
<span
*
ngIf=
"noReadNum > 0"
class=
"num"
>
{{noReadNum}}
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
</ion-navbar>
</ion-navbar>
...
...
src/pages/tabs/mine/mine.ts
View file @
01942776
...
@@ -15,6 +15,8 @@ import {AppUpdateService} from "../../../service/appUpdate.service";
...
@@ -15,6 +15,8 @@ import {AppUpdateService} from "../../../service/appUpdate.service";
import
{
MyDutyPage
}
from
"../../mine/my-duty/my-duty"
;
import
{
MyDutyPage
}
from
"../../mine/my-duty/my-duty"
;
import
{
MySurveyPage
}
from
"../../home/mySurvey/my-survey/my-survey"
;
import
{
MySurveyPage
}
from
"../../home/mySurvey/my-survey/my-survey"
;
import
{
TabsService
}
from
"../tabs.service"
;
import
{
TabsService
}
from
"../tabs.service"
;
import
{
EmitService
}
from
"../../../provide/emit.service"
;
import
{
NoticePage
}
from
"../notice/notice"
;
@
Component
({
@
Component
({
...
@@ -32,16 +34,23 @@ export class MinePage {
...
@@ -32,16 +34,23 @@ export class MinePage {
picUrl
;
picUrl
;
mineInfo
;
mineInfo
;
noReadNum
;
constructor
(
public
navCtrl
:
NavController
,
constructor
(
public
navCtrl
:
NavController
,
private
appCtrl
:
App
,
private
appCtrl
:
App
,
private
alertCtrl
:
AlertController
,
private
alertCtrl
:
AlertController
,
public
navParams
:
NavParams
,
public
navParams
:
NavParams
,
public
tabSer
:
TabsService
,
public
tabSer
:
TabsService
,
public
appService
:
AppService
,
public
appService
:
AppService
,
public
emitSer
:
EmitService
,
public
storage
:
Storage
,
public
app
:
App
,
public
storage
:
Storage
,
public
app
:
App
,
private
appUpdateService
:
AppUpdateService
,
private
appUpdateService
:
AppUpdateService
,
private
appVersion
:
AppVersion
)
{
private
appVersion
:
AppVersion
)
{
// 接收发射过来的数据
this
.
emitSer
.
eventEmit
.
subscribe
((
value
:
any
)
=>
{
if
(
!
isNaN
(
value
)){
this
.
noReadNum
=
value
;
}
});
}
}
ionViewWillEnter
()
{
ionViewWillEnter
()
{
...
@@ -128,4 +137,9 @@ export class MinePage {
...
@@ -128,4 +137,9 @@ export class MinePage {
goDuty
()
{
goDuty
()
{
this
.
navCtrl
.
push
(
"MyDutyPage"
);
this
.
navCtrl
.
push
(
"MyDutyPage"
);
}
}
//消息提醒页面
goToNotice
(){
this
.
navCtrl
.
push
(
NoticePage
);
}
}
}
src/pages/tabs/notice/notice.ts
View file @
01942776
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
Response
}
from
"@angular/http"
;
import
{
Response
}
from
"@angular/http"
;
import
{
AppService
}
from
"../../../service/http.service"
;
import
{
AppService
}
from
"../../../service/http.service"
;
import
{
Badge
}
from
"@ionic-native/badge"
;
import
{
Badge
}
from
"@ionic-native/badge"
;
import
{
EmitService
}
from
"../../../provide/emit.service"
;
@
IonicPage
()
@
IonicPage
()
...
@@ -13,12 +14,14 @@ import {Badge} from "@ionic-native/badge";
...
@@ -13,12 +14,14 @@ import {Badge} from "@ionic-native/badge";
export
class
NoticePage
{
export
class
NoticePage
{
noticeList
;
noticeList
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
,
public
badge
:
Badge
)
{
public
emitSer
:
EmitService
,
public
appService
:
AppService
,
public
badge
:
Badge
)
{
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
appService
.
ObserverHttpPost
(
"/wisdomgroup/modules/message/findAllActivityForAppWithXQ"
,
null
)
this
.
appService
.
ObserverHttpPost
(
"/wisdomgroup/modules/message/findAllActivityForAppWithXQ"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
.
subscribe
((
res
:
Response
)
=>
{
let
data
=
res
.
json
();
let
data
=
res
.
json
();
this
.
noticeList
=
data
;
this
.
noticeList
=
data
;
...
@@ -29,10 +32,11 @@ export class NoticePage {
...
@@ -29,10 +32,11 @@ export class NoticePage {
}
}
//增加阅读记录
//增加阅读记录
addRecodings
(){
addRecodings
()
{
this
.
appService
.
ObserverHttpGet
(
"/wisdomgroup/modules/message/addRecodings"
,
null
)
this
.
appService
.
ObserverHttpGet
(
"/wisdomgroup/modules/message/addRecodings"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
.
subscribe
((
res
:
Response
)
=>
{
this
.
badge
.
clear
();
this
.
badge
.
clear
();
this
.
emitSer
.
eventEmit
.
emit
(
0
);
},
error
=>
{
},
error
=>
{
}
}
);
);
...
...
src/pages/tabs/serve/serve.html
View file @
01942776
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
</button>
</button>
</ion-buttons>
</ion-buttons>
<ion-buttons
end
>
<ion-buttons
end
>
<button
ion-button
icon-only
class=
"toolbar-icon"
>
<button
ion-button
icon-only
(
click
)="
goToNotice
()"
class=
"toolbar-icon"
>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<ion-icon
class=
"icon-youjian iconfont"
></ion-icon>
<span
class=
"num"
>
2
</span>
<span
*
ngIf=
"noReadNum > 0"
class=
"num"
>
{{noReadNum}}
</span>
</button>
</button>
</ion-buttons>
</ion-buttons>
</ion-navbar>
</ion-navbar>
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
</div>
</div>
</div>
</div>
<div
class=
"item3"
style=
"padding-top: 0px;"
>
<div
class=
"item3"
style=
"padding-top: 0px;"
>
<div
class=
"item3-2"
style=
"background-color:#f8f8f8;"
(
click
)="
go
t
oNotice
()"
>
<div
class=
"item3-2"
style=
"background-color:#f8f8f8;"
(
click
)="
go
T
oNotice
()"
>
<div
class=
"card3"
style=
"width: 15%;"
>
<div
class=
"card3"
style=
"width: 15%;"
>
<span
*
ngIf=
"hasNew.message == 1"
class=
"img-tips"
></span>
<span
*
ngIf=
"hasNew.message == 1"
class=
"img-tips"
></span>
<img
src=
"./assets/imgs/home/icon-mail.png"
>
<img
src=
"./assets/imgs/home/icon-mail.png"
>
...
...
src/pages/tabs/serve/serve.ts
View file @
01942776
...
@@ -18,6 +18,7 @@ import {Badge} from '@ionic-native/badge';
...
@@ -18,6 +18,7 @@ import {Badge} from '@ionic-native/badge';
import
{
TabsService
}
from
"../tabs.service"
;
import
{
TabsService
}
from
"../tabs.service"
;
import
{
TextToSpeech
}
from
"@ionic-native/text-to-speech"
;
import
{
TextToSpeech
}
from
"@ionic-native/text-to-speech"
;
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
CommonService
}
from
"../../../provide/common.service"
;
import
{
EmitService
}
from
"../../../provide/emit.service"
;
@
IonicPage
()
@
IonicPage
()
...
@@ -30,11 +31,11 @@ export class ServePage {
...
@@ -30,11 +31,11 @@ export class ServePage {
@
ViewChild
(
Slides
)
slides
:
Slides
;
@
ViewChild
(
Slides
)
slides
:
Slides
;
hasNew
=
{
hasNew
=
{
activity
:
0
,
activity
:
0
,
notice
:
0
,
notice
:
0
,
premanager
:
0
,
premanager
:
0
,
message
:
0
,
message
:
0
,
test
:
0
,
test
:
0
,
};
};
//日历
//日历
...
@@ -67,11 +68,18 @@ export class ServePage {
...
@@ -67,11 +68,18 @@ export class ServePage {
noticeTips
;
noticeTips
;
role
;
role
;
noReadNum
;
constructor
(
public
navCtrl
:
NavController
,
public
tts
:
TextToSpeech
,
constructor
(
public
navCtrl
:
NavController
,
public
tts
:
TextToSpeech
,
public
commonSer
:
Common
Service
,
public
commonSer
:
CommonService
,
public
emitSer
:
Emit
Service
,
public
appService
:
AppService
,
public
http
:
Http
,
private
calendar
:
Calendar
,
public
storage
:
Storage
,
public
appService
:
AppService
,
public
http
:
Http
,
private
calendar
:
Calendar
,
public
storage
:
Storage
,
public
badge
:
Badge
,
public
tabsSer
:
TabsService
)
{
public
badge
:
Badge
,
public
tabsSer
:
TabsService
)
{
// 接收发射过来的数据
this
.
emitSer
.
eventEmit
.
subscribe
((
value
:
any
)
=>
{
if
(
!
isNaN
(
value
))
{
this
.
noReadNum
=
value
;
}
});
}
}
...
@@ -171,12 +179,6 @@ export class ServePage {
...
@@ -171,12 +179,6 @@ export class ServePage {
})
})
}
}
//消息通知
gotoNotice
()
{
this
.
navCtrl
.
setRoot
(
NoticePage
);
this
.
navCtrl
.
parent
.
select
(
2
);
}
//外出报备跳转
//外出报备跳转
goOutGoingReportAboutAll
()
{
goOutGoingReportAboutAll
()
{
this
.
navCtrl
.
push
(
"OutGoingReportPage"
,
{
this
.
navCtrl
.
push
(
"OutGoingReportPage"
,
{
...
@@ -189,7 +191,7 @@ export class ServePage {
...
@@ -189,7 +191,7 @@ export class ServePage {
this
.
navCtrl
.
push
(
page
);
this
.
navCtrl
.
push
(
page
);
}
}
readBook
()
{
readBook
()
{
this
.
tts
.
speak
({
text
:
"你好,欢迎,向前走10米,路口右转,执行10米,在左转"
,
locale
:
'zh-CN'
})
this
.
tts
.
speak
({
text
:
"你好,欢迎,向前走10米,路口右转,执行10米,在左转"
,
locale
:
'zh-CN'
})
.
then
(()
=>
{
.
then
(()
=>
{
console
.
log
(
'Success'
);
console
.
log
(
'Success'
);
...
@@ -201,38 +203,38 @@ export class ServePage {
...
@@ -201,38 +203,38 @@ export class ServePage {
/**
/**
* 获取是否有新的信息
* 获取是否有新的信息
*/
*/
getHasNew
()
{
getHasNew
()
{
//获取是否有新活动
//获取是否有新活动
this
.
tabsSer
.
hasNewActivity
().
subscribe
(
this
.
tabsSer
.
hasNewActivity
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
hasNew
.
activity
=
res
;
this
.
hasNew
.
activity
=
res
;
}
}
)
)
//获取是否有新通知
//获取是否有新通知
this
.
tabsSer
.
hasNewNotice
().
subscribe
(
this
.
tabsSer
.
hasNewNotice
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
hasNew
.
notice
=
res
;
this
.
hasNew
.
notice
=
res
;
}
}
)
)
//获取是否有新通知
//获取是否有新通知
this
.
tabsSer
.
hasNewMessage
().
subscribe
(
this
.
tabsSer
.
hasNewMessage
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
hasNew
.
message
=
res
;
this
.
hasNew
.
message
=
res
;
}
}
)
)
//获取是否有新报备
//获取是否有新报备
this
.
tabsSer
.
hasNewPremanager
().
subscribe
(
this
.
tabsSer
.
hasNewPremanager
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
hasNew
.
premanager
=
res
;
this
.
hasNew
.
premanager
=
res
;
}
}
)
)
//获取是否有新问卷
//获取是否有新问卷
this
.
tabsSer
.
hasNewTest
().
subscribe
(
this
.
tabsSer
.
hasNewTest
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
hasNew
.
test
=
res
;
this
.
hasNew
.
test
=
res
;
}
}
)
)
...
@@ -263,7 +265,7 @@ export class ServePage {
...
@@ -263,7 +265,7 @@ export class ServePage {
//2.参加活动日期
//2.参加活动日期
this
.
tabsSer
.
appOrderCal
().
subscribe
(
this
.
tabsSer
.
appOrderCal
().
subscribe
(
(
order
)
=>
{
(
order
)
=>
{
order
.
forEach
(
event
=>
{
order
.
forEach
(
event
=>
{
this
.
newArr
.
push
({
this
.
newArr
.
push
({
date
:
new
Date
(
event
.
batch
.
batchGoDate
),
date
:
new
Date
(
event
.
batch
.
batchGoDate
),
...
@@ -273,7 +275,7 @@ export class ServePage {
...
@@ -273,7 +275,7 @@ export class ServePage {
});
});
this
.
tabsSer
.
appPreCal
().
subscribe
(
this
.
tabsSer
.
appPreCal
().
subscribe
(
(
pre
)
=>
{
(
pre
)
=>
{
pre
.
forEach
(
event
=>
{
pre
.
forEach
(
event
=>
{
this
.
newArr
.
push
({
this
.
newArr
.
push
({
date
:
new
Date
(
event
.
formshTime
),
date
:
new
Date
(
event
.
formshTime
),
...
@@ -295,7 +297,7 @@ export class ServePage {
...
@@ -295,7 +297,7 @@ export class ServePage {
date
:
year
+
'/'
+
month
+
'/01'
date
:
year
+
'/'
+
month
+
'/01'
};
};
this
.
tabsSer
.
getMyScheduleOnMonth
(
data
).
subscribe
(
this
.
tabsSer
.
getMyScheduleOnMonth
(
data
).
subscribe
(
(
schedule
)
=>
{
(
schedule
)
=>
{
for
(
let
i
=
0
;
i
<
schedule
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
schedule
.
length
;
i
++
)
{
const
ev
=
{
const
ev
=
{
date
:
new
Date
(
schedule
[
i
].
dutyDate
),
date
:
new
Date
(
schedule
[
i
].
dutyDate
),
...
@@ -305,7 +307,7 @@ export class ServePage {
...
@@ -305,7 +307,7 @@ export class ServePage {
this
.
newArr
.
push
(
ev
);
this
.
newArr
.
push
(
ev
);
}
}
this
.
tabsSer
.
getFestivalAboutMonth
(
data
).
subscribe
(
this
.
tabsSer
.
getFestivalAboutMonth
(
data
).
subscribe
(
(
festival
)
=>
{
(
festival
)
=>
{
festival
.
forEach
(
event
=>
{
festival
.
forEach
(
event
=>
{
const
data
=
{
const
data
=
{
date
:
new
Date
(
event
.
date
),
date
:
new
Date
(
event
.
date
),
...
@@ -358,6 +360,11 @@ export class ServePage {
...
@@ -358,6 +360,11 @@ export class ServePage {
this
.
loadEvent
(
e
.
newMonth
.
years
,
e
.
newMonth
.
months
);
this
.
loadEvent
(
e
.
newMonth
.
years
,
e
.
newMonth
.
months
);
}
}
//消息提醒页面
goToNotice
()
{
this
.
navCtrl
.
push
(
NoticePage
);
}
}
}
//定义星期实体
//定义星期实体
...
...
src/pages/tabs/tabs.service.ts
View file @
01942776
...
@@ -118,8 +118,8 @@ export class TabsService{
...
@@ -118,8 +118,8 @@ export class TabsService{
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/stuff/updateNumByType'
,
data
);
return
this
.
http
.
post
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/stuff/updateNumByType'
,
data
);
}
}
//
//
是否签到
signNow
():
Observable
<
any
>
{
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/wisdomgroup/modules/twissign/signNow'
);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment