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
94c344ba
Commit
94c344ba
authored
Apr 08, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载附件
parent
e47f4bdd
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
75 additions
and
52 deletions
+75
-52
app.module.ts
src/app/app.module.ts
+2
-1
activityDetail.ts
src/pages/home/activity/activityDetail/activityDetail.ts
+13
-3
learning-do.module.ts
src/pages/home/learning/learning-do/learning-do.module.ts
+15
-11
learning-do.scss
src/pages/home/learning/learning-do/learning-do.scss
+13
-13
learning-do.ts
src/pages/home/learning/learning-do/learning-do.ts
+8
-6
learning-result.scss
src/pages/home/learning/learning-result/learning-result.scss
+6
-6
review-learn.scss
src/pages/home/learning/review-learn/review-learn.scss
+5
-5
review-result.scss
src/pages/home/learning/review-result/review-result.scss
+6
-6
tabs.service.ts
src/pages/tabs/tabs.service.ts
+5
-0
common.service.ts
src/service/common.service.ts
+2
-1
No files found.
src/app/app.module.ts
View file @
94c344ba
...
...
@@ -53,7 +53,8 @@ import {TabsService} from "../pages/tabs/tabs.service";
iconModel
:
'ios'
,
//icon显示图标为IOS版
mode
:
'ios'
,
//安卓和IOS的样式以IOS样式为准
modalEnter
:
'modal-slide-in'
,
modalLeave
:
'modal-slide-out'
modalLeave
:
'modal-slide-out'
,
swipeBackEnabled
:
false
}),
IonicStorageModule
.
forRoot
(),
TabsModule
,
...
...
src/pages/home/activity/activityDetail/activityDetail.ts
View file @
94c344ba
...
...
@@ -6,6 +6,8 @@ import {Http, Response} from '@angular/http';
import
{
AppService
,
AppGlobal
}
from
"../../../../service/appHttpService"
;
import
{
JoinDetailPage
}
from
'../../activity-track/joinDetail/joinDetail'
;
import
{
BatchDetailPage
}
from
"../batch-detail/batch-detail"
;
import
{
TabsService
}
from
"../../../tabs/tabs.service"
;
import
{
CommonService
}
from
"../../../../service/common.service"
;
@
IonicPage
()
@
Component
({
...
...
@@ -31,8 +33,8 @@ export class ActivityDetailPage {
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
alertCtrl
:
AlertController
,
public
http
:
Http
,
public
alertCtrl
:
AlertController
,
public
commonSer
:
CommonService
,
public
http
:
Http
,
public
tabSer
:
TabsService
,
public
appService
:
AppService
,
public
toast
:
ToastController
)
{
}
...
...
@@ -109,7 +111,6 @@ export class ActivityDetailPage {
//不参加
sayNo
()
{
if
(
this
.
hasOrder
){
this
.
appService
.
popToastView
(
'您已报名,请先取消报名再点击'
,
'middle'
,
1500
);
return
false
;
...
...
@@ -166,4 +167,13 @@ export class ActivityDetailPage {
confirm
.
present
();
}
//下载附件
downLoad
(
file
){
this
.
tabSer
.
downFile
(
file
.
id
).
subscribe
(
(
res
)
=>
{
this
.
commonSer
.
downloadFile
(
file
.
name
,
res
);
}
)
}
}
src/pages/home/learning/learning-do/learning-do.module.ts
View file @
94c344ba
import
{
NgModule
}
from
'@angular/core'
;
import
{
IonicPageModule
}
from
'ionic-angular'
;
import
{
LearningDoPage
}
from
'./learning-do'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
IonicPageModule
}
from
'ionic-angular'
;
import
{
LearningDoPage
}
from
'./learning-do'
;
import
{
PipesModule
}
from
"../../../../pipes/pipes.module"
;
@
NgModule
({
declarations
:
[
LearningDoPage
,
],
imports
:
[
PipesModule
,
IonicPageModule
.
forChild
(
LearningDoPage
),
],
declarations
:
[
LearningDoPage
,
],
imports
:
[
PipesModule
,
IonicPageModule
.
forChild
(
LearningDoPage
),
],
providers
:[
]
})
export
class
LearningDoPageModule
{}
export
class
LearningDoPageModule
{
}
src/pages/home/learning/learning-do/learning-do.scss
View file @
94c344ba
page-learning-do
{
.main-container
{
.main-container
{
height
:
calc
(
100%
-
8rem
);
background
:
#e6e8ed
url(../../../
../assets/imgs/learn/learning_background.png)
no-repeat
;
background
:
#e6e8ed
url(
../assets/imgs/learn/learning_background.png)
no-repeat
;
padding
:
1
.5rem
;
}
.swiper-slide
,
.slide-zoom
{
.swiper-slide
,
.slide-zoom
{
text-align
:
left
;
}
.swiper-slide
{
.swiper-slide
{
justify-content
:
normal
;
align-items
:
normal
;
}
.learn-item
{
.learn-item
{
height
:
100%
;
}
.learn-title
{
.learn-title
{
background-color
:
rgba
(
18
,
28
,
52
,
0
.34
);
font-size
:
1
.8rem
;
color
:
#ffffff
;
...
...
@@ -23,21 +23,21 @@ page-learning-do {
border-top-left-radius
:
.8rem
;
border-top-right-radius
:
.8rem
;
}
.item-container
{
.item-container
{
background-color
:
#fff
;
height
:
calc
(
100%
-
8rem
);
border-bottom-left-radius
:
.8rem
;
border-bottom-right-radius
:
.8rem
;
}
.item-title
{
.item-title
{
padding
:
1rem
;
font-size
:
1
.5rem
;
}
.item-content
{
.item-content
{
padding
:
1rem
;
font-size
:
1
.6rem
;
div
{
p
{
div
{
p
{
margin-bottom
:
1rem
;
margin-left
:
1rem
;
line-height
:
1
.5rem
;
...
...
@@ -112,7 +112,7 @@ page-learning-do {
width
:
100%
;
border
:
1px
solid
#ddd
;
}
.selectIndex
{
.selectIndex
{
display
:
inline-block
;
vertical-align
:
middle
;
width
:
2rem
;
...
...
@@ -127,7 +127,7 @@ page-learning-do {
position
:
relative
;
}
input
:checked
+
.selectIndex
{
input
:checked
+
.selectIndex
{
background-color
:
#ec1826
;
color
:
#ffffff
;
border
:
1px
solid
#ec1826
;
...
...
src/pages/home/learning/learning-do/learning-do.ts
View file @
94c344ba
import
{
Component
,
ViewChild
}
from
'@angular/core'
;
import
{
IonicPage
,
Navbar
,
NavController
,
NavParams
,
Slides
,
ToastController
}
from
'ionic-angular'
;
import
{
IonicPage
,
Nav
,
Nav
bar
,
NavController
,
NavParams
,
Slides
,
ToastController
}
from
'ionic-angular'
;
import
{
message
}
from
"../../../../app/main"
;
import
{
AppGlobal
,
AppService
}
from
"../../../../service/appHttpService"
;
import
{
LearningResultPage
}
from
"../learning-result/learning-result"
;
...
...
@@ -15,7 +15,8 @@ import {ReviewResultPage} from "../review-result/review-result";
})
export
class
LearningDoPage
{
@
ViewChild
(
Slides
)
slides
:
Slides
;
@
ViewChild
(
Navbar
)
navbar
:
Navbar
@
ViewChild
(
Navbar
)
navbar
:
Navbar
;
@
ViewChild
(
Nav
)
nav
:
Nav
;
type
;
//是否重做
title
;
// 问卷标题
...
...
@@ -33,14 +34,14 @@ export class LearningDoPage {
ionViewDidLoad
()
{
this
.
navbar
.
backButtonClick
=
()
=>
{
this
.
appService
.
alert
(
"是否退出当前测试,中途退出直接交卷?"
),
()
=>
{
this
.
submit
()
;
}
this
.
commonSer
.
alert
(
"是否退出当前测试,中途退出直接交卷?"
,
(
res
)
=>
{
this
.
submit
()
}
)
};
this
.
navCtrl
.
swipeBackEnabled
=
false
;
}
ionViewDidEnter
()
{
this
.
nav
.
swipeBackEnabled
=
false
;
this
.
testId
=
this
.
navParams
.
get
(
'testId'
);
this
.
title
=
this
.
navParams
.
get
(
'title'
);
this
.
type
=
this
.
navParams
.
get
(
'type'
);
...
...
@@ -60,6 +61,7 @@ export class LearningDoPage {
//清楚定时器
ionViewDidLeave
()
{
this
.
nav
.
swipeBackEnabled
=
true
;
this
.
index
=
1
;
this
.
slides
.
slideTo
(
0
);
window
.
clearInterval
(
this
.
clock
);
...
...
src/pages/home/learning/learning-result/learning-result.scss
View file @
94c344ba
page-learning-result
{
p
{
p
{
margin
:
.5rem
;
}
.main-container
{
height
:
100%
;
background
:
#e6e8ed
url(../../../
../assets/imgs/learn/learning_background.png)
no-repeat
;
background
:
#e6e8ed
url(
../assets/imgs/learn/learning_background.png)
no-repeat
;
padding
:
1
.5rem
;
}
.swiper-slide
,
.slide-zoom
{
...
...
@@ -36,7 +36,7 @@ page-learning-result {
.item-title
{
padding
:
1rem
;
font-size
:
2rem
;
span
{
span
{
font-size
:
3rem
;
}
}
...
...
@@ -96,9 +96,9 @@ page-learning-result {
flex
:
1
;
}
}
.icon-star
{
.icon-star
{
font-size
:
4
.8rem
;
ion-icon
{
ion-icon
{
margin-right
:
1rem
;
}
.star-yellow
{
...
...
@@ -108,7 +108,7 @@ page-learning-result {
color
:
grey
;
}
}
.submit-btn
{
.submit-btn
{
width
:
35%
;
background-color
:
#34b4fc
;
margin
:
10%
5%
;
...
...
src/pages/home/learning/review-learn/review-learn.scss
View file @
94c344ba
page-review-learn
{
.main-container
{
height
:
calc
(
100%
-
8rem
);
background
:
#e6e8ed
url(../../../
../assets/imgs/learn/learning_background.png)
no-repeat
;
background
:
#e6e8ed
url(
../assets/imgs/learn/learning_background.png)
no-repeat
;
padding
:
1
.5rem
;
}
.swiper-slide
,
.slide-zoom
{
...
...
@@ -35,7 +35,7 @@ page-review-learn {
}
.item-content
{
padding
:
1rem
;
p
{
p
{
margin
:
1rem
0
;
}
}
...
...
@@ -102,10 +102,10 @@ page-review-learn {
margin-left
:
2rem
;
border-radius
:
4px
;
}
.selectIndex
{
.selectIndex
{
position
:
relative
;
}
.
select-right
:
:
before
{
.
select-right
:
:
before
{
content
:
'\2713'
;
position
:
absolute
;
left
:
-24px
;
...
...
@@ -114,7 +114,7 @@ page-review-learn {
color
:
#50b632
;
font-size
:
2
.5rem
;
}
.
select-error
:
:
before
{
.
select-error
:
:
before
{
content
:
'\2718'
;
position
:
absolute
;
left
:
-20px
;
...
...
src/pages/home/learning/review-result/review-result.scss
View file @
94c344ba
page-review-result
{
p
{
p
{
margin
:
.5rem
;
}
.main-container
{
height
:
100%
;
background
:
#e6e8ed
url(../
../../../
assets/imgs/learn/learning_background.png)
no-repeat
;
background
:
#e6e8ed
url(../assets/imgs/learn/learning_background.png)
no-repeat
;
padding
:
1
.5rem
;
}
.swiper-slide
,
.slide-zoom
{
...
...
@@ -36,7 +36,7 @@ page-review-result {
.item-title
{
padding
:
1rem
;
font-size
:
2rem
;
span
{
span
{
font-size
:
3rem
;
}
}
...
...
@@ -96,9 +96,9 @@ page-review-result {
flex
:
1
;
}
}
.icon-star
{
.icon-star
{
font-size
:
4
.8rem
;
ion-icon
{
ion-icon
{
margin-right
:
1rem
;
}
.star-yellow
{
...
...
@@ -108,7 +108,7 @@ page-review-result {
color
:
grey
;
}
}
.submit-btn
{
.submit-btn
{
width
:
35%
;
background-color
:
#34b4fc
;
margin
:
10%
5%
;
...
...
src/pages/tabs/tabs.service.ts
View file @
94c344ba
...
...
@@ -33,5 +33,9 @@ export class TabsService{
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/wisdomgroup/workCalendar/getFestivalAboutMonth?'
+
this
.
commonSer
.
toQuery
(
data
));
}
//下载文件
downFile
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
AppGlobal
.
domain
+
'/modules/common/file/download/'
+
data
);
}
}
\ No newline at end of file
src/service/common.service.ts
View file @
94c344ba
...
...
@@ -60,6 +60,7 @@ export class CommonService{
* @param callback 如果有回调方法 就有确定、取消两个按钮,没有回调方法 则只有确认一个按钮
*/
alert
(
message
,
callback
?)
{
console
.
log
(
message
)
if
(
callback
)
{
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'提示'
,
...
...
@@ -87,7 +88,7 @@ export class CommonService{
* @param url 文件URL
*/
downloadFile
(
title
,
data
:
Response
)
{
const
blob
=
new
Blob
([
data
]
,
{
type
:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"
}
);
const
blob
=
new
Blob
([
data
]);
const
url
=
window
.
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
"a"
);
link
.
setAttribute
(
"href"
,
url
);
...
...
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