Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-ces
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
wisdom-ces
Commits
54c4cd17
Commit
54c4cd17
authored
Apr 07, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common.service
query结构调整
parent
80daba30
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
35 deletions
+51
-35
learning-explain.html
...ages/home/learning/learning-explain/learning-explain.html
+1
-1
learning-explain.ts
src/pages/home/learning/learning-explain/learning-explain.ts
+1
-1
home.ts
src/pages/tabs/home/home.ts
+23
-31
tabs.service.ts
src/pages/tabs/tabs.service.ts
+25
-1
common.service.ts
src/service/common.service.ts
+1
-1
No files found.
src/pages/home/learning/learning-explain/learning-explain.html
View file @
54c4cd17
...
...
@@ -9,6 +9,6 @@
<ion-content>
<p
class=
"explain margin-top-100"
>
本次答题共计{{item?.questionCount}}题,满分{{item?.fullMarks}}分
</p>
<p
class=
"explain margin-top-20"
>
限时{{item?.timeLimit}}分钟
</p>
<p
class=
"explain margin-top-20"
>
限时{{item?.timeLimit
/ 60
}}分钟
</p>
<button
class=
"submit-btn submit"
(
click
)="
goToDO
()"
>
开始答题
</button>
</ion-content>
src/pages/home/learning/learning-explain/learning-explain.ts
View file @
54c4cd17
...
...
@@ -16,7 +16,7 @@ export class LearningExplainPage {
item
=
{
questionCount
:
0
,
fullMarks
:
'0'
,
timeLimit
:
'0'
,
timeLimit
:
0
,
testId
:
null
};
//测试对象
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
...
...
src/pages/tabs/home/home.ts
View file @
54c4cd17
...
...
@@ -278,10 +278,9 @@ export class HomePage {
let
month
=
date
.
getMonth
()
+
1
;
//2.参加活动日期
this
.
appService
.
ObserverHttpGetOption
(
"/wisdomgroup/modules/order/appOrderCal"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
let
response
=
res
.
json
();
response
.
forEach
(
event
=>
{
this
.
tabsSer
.
appOrderCal
().
subscribe
(
(
order
)
=>
{
order
.
forEach
(
event
=>
{
this
.
newArr
.
push
({
date
:
new
Date
(
event
.
batch
.
batchGoDate
),
disable
:
true
,
...
...
@@ -289,24 +288,21 @@ export class HomePage {
})
});
//3.离沪日期
this
.
appService
.
ObserverHttpGetOption
(
"/wisdomgroup/modules/userpre/appPreCal"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
let
response
=
res
.
json
();
response
.
forEach
(
event
=>
{
this
.
tabsSer
.
appPreCal
().
subscribe
(
(
pre
)
=>
{
pre
.
forEach
(
event
=>
{
this
.
newArr
.
push
({
date
:
new
Date
(
event
.
formshTime
),
disable
:
true
,
cssClass
:
'dayOff4'
})
});
},
error
=>
{
});
this
.
loadEvent
(
year
,
month
);
},
error
=>
{
});
this
.
loadEvent
(
year
,
month
);
}
)
}
);
}
loadEvent
(
year
,
month
)
{
...
...
@@ -314,23 +310,19 @@ export class HomePage {
const
data
=
{
date
:
year
+
'/'
+
month
+
'/01'
};
this
.
appService
.
ObserverHttpGetOption
(
"/wisdomgroup/schedule/app/getMyScheduleOnMonth"
,
data
)
.
subscribe
((
res
:
Response
)
=>
{
let
response
=
res
.
json
();
for
(
let
i
=
0
;
i
<
response
.
length
;
i
++
)
{
const
data
=
{
date
:
new
Date
(
response
[
i
].
dutyDate
),
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
(
data
);
this
.
newArr
.
push
(
ev
);
}
//1.获取节假日
this
.
appService
.
ObserverHttpGetOption
(
"/wisdomgroup/workCalendar/getFestivalAboutMonth"
,
data
)
.
subscribe
((
res
)
=>
{
let
data
=
res
.
json
();
data
.
forEach
(
event
=>
{
this
.
tabsSer
.
getFestivalAboutMonth
(
data
).
subscribe
(
(
festival
)
=>
{
festival
.
forEach
(
event
=>
{
const
data
=
{
date
:
new
Date
(
event
.
date
),
disable
:
true
,
...
...
@@ -339,10 +331,10 @@ export class HomePage {
this
.
newArr
.
push
(
data
);
});
this
.
setCalendar
(
year
,
month
);
});
},
error
=>
{
}
);
)
}
)
}
...
...
src/pages/tabs/tabs.service.ts
View file @
54c4cd17
...
...
@@ -8,7 +8,30 @@ import {CommonService} from "../../service/common.service";
export
class
TabsService
{
constructor
(
private
http
:
HttpClient
,
private
commonSer
:
CommonService
){}
//获取权限
getRoles
():
Observable
<
any
>
{
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/wisdomgroup/app/getRoles'
,
);
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/wisdomgroup/app/getRoles'
,
);
}
//获取参加活动的日期
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'
);
}
//每月值班信息
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
));
}
}
\ No newline at end of file
src/service/common.service.ts
View file @
54c4cd17
...
...
@@ -11,7 +11,7 @@ export class CommonService{
* @param data json格式的数据
* @returns {string}
*/
static
toQuery
(
data
){
toQuery
(
data
){
let
str
=
''
;
for
(
let
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
...
...
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