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
f18605d3
Commit
f18605d3
authored
Apr 07, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改网络上传的方法
parent
2be6d0e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
138 additions
and
67 deletions
+138
-67
config.xml
config.xml
+2
-2
ionic.config.json
ionic.config.json
+2
-1
app.scss
src/app/app.scss
+66
-46
learning-do.ts
src/pages/home/learning/learning-do/learning-do.ts
+7
-7
learning-explain.ts
src/pages/home/learning/learning-explain/learning-explain.ts
+3
-2
learning-list.ts
src/pages/home/learning/learning-list/learning-list.ts
+5
-3
home.ts
src/pages/tabs/home/home.ts
+4
-5
appHttpService.ts
src/service/appHttpService.ts
+0
-0
common.service.ts
src/service/common.service.ts
+49
-1
No files found.
config.xml
View file @
f18605d3
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"io.ionic.smart19.starter
"
version=
"3.0.3
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<widget
id=
"io.ionic.smart19.starter
.test"
version=
"4.0.0
"
xmlns=
"http://www.w3.org/ns/widgets"
xmlns:cdv=
"http://cordova.apache.org/ns/1.0"
>
<name>
智汇19号v3.0.3
</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>
<content
src=
"index.html"
/>
<content
src=
"index.html"
/>
...
...
ionic.config.json
View file @
f18605d3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"proxies"
:
[
"proxies"
:
[
{
{
"path"
:
"/wisdomgroup"
,
"path"
:
"/wisdomgroup"
,
"proxyUrl"
:
"http://1
0.10.202.24:8080
/wisdomgroup"
"proxyUrl"
:
"http://1
80.168.156.212:2931
/wisdomgroup"
}
}
]
]
}
}
\ No newline at end of file
src/app/app.scss
View file @
f18605d3
@import
"../theme/icon.scss"
;
@import
"../theme/icon.scss"
;
p
{
p
{
margin
:
0
;
margin
:
0
;
}
}
.back-button.show-back-button
{
.back-button.show-back-button
{
margin-left
:
5px
;
margin-left
:
5px
;
}
}
//列表
//列表
.item-ios
{
.item-ios
{
padding-left
:
0
;
padding-left
:
0
;
}
}
.list-ios
.item-block
.item-inner
{
.list-ios
.item-block
.item-inner
{
padding-left
:
10px
;
padding-left
:
10px
;
}
}
.list-ios
.item-block
.item-inner
{
.list-ios
.item-block
.item-inner
{
border-bottom
:
1px
solid
#dadada
;
border-bottom
:
1px
solid
#dadada
;
}
}
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-block
:first-child
{
.list-ios
>
.item-block
:first-child
{
border
:
none
;
border
:
none
;
}
}
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-wrapper
:last-child
.item-block
{
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-wrapper
:last-child
.item-block
{
border-bottom
:
1px
solid
#dadada
;
border-bottom
:
1px
solid
#dadada
;
}
}
.back-button-icon-ios
{
.back-button-icon-ios
{
line-height
:
20px
;
line-height
:
20px
;
font-size
:
3rem
;
font-size
:
3rem
;
color
:
#fff
;
color
:
#fff
;
}
}
.bgc-e7e8ed
{
.bgc-e7e8ed
{
background-color
:
#ebedf2
;
background-color
:
#ebedf2
;
}
}
.bgc-fff
{
.bgc-fff
{
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.bgc-19b5ff
{
.bgc-19b5ff
{
background-color
:
#19b5ff
;
background-color
:
#19b5ff
;
}
}
.submit-btn
{
.submit-btn
{
height
:
40px
;
height
:
40px
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
width
:
80%
;
width
:
80%
;
...
@@ -52,29 +61,34 @@ p{
...
@@ -52,29 +61,34 @@ p{
white-space
:
nowrap
;
white-space
:
nowrap
;
border-radius
:
3px
;
border-radius
:
3px
;
}
}
.label-input
.text-input
{
.label-input
.text-input
{
padding
:
5px
;
padding
:
5px
;
border
:
1px
solid
#ddd
;
border
:
1px
solid
#ddd
;
border-radius
:
4px
;
border-radius
:
4px
;
height
:
35px
;
height
:
35px
;
}
}
.no-info
{
.no-info
{
text-align
:
center
;
text-align
:
center
;
margin-top
:
8rem
;
margin-top
:
8rem
;
color
:
#666
;
color
:
#666
;
}
}
.text-center
{
.text-center
{
text-align
:
center
;
text-align
:
center
;
}
}
.text-right
{
.text-right
{
text-align
:
right
;
text-align
:
right
;
}
}
.swiper-title
{
.swiper-title
{
position
:
relative
;
position
:
relative
;
color
:
#24bafc
;
color
:
#24bafc
;
}
}
.
swiper-title
:
:
after
{
.
swiper-title
:
:
after
{
content
:
''
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
width
:
100%
;
width
:
100%
;
...
@@ -113,9 +127,9 @@ ion-icon {
...
@@ -113,9 +127,9 @@ ion-icon {
}
}
&
[
class
*=
"notice-on"
]
{
&
[
class
*=
"notice-on"
]
{
background
:
url(../assets/imgs/tabs/icon-notice-on.png)
no-repeat
50%
50%
;
background
:
url(../assets/imgs/tabs/icon-notice-on.png)
no-repeat
50%
50%
;
background-size
:
contain
;
background-size
:
contain
;
}
}
&
[
class
*=
"notice-off"
]
{
&
[
class
*=
"notice-off"
]
{
background
:
url(../assets/imgs/tabs/icon-notice-off.png)
no-repeat
50%
50%
;
background
:
url(../assets/imgs/tabs/icon-notice-off.png)
no-repeat
50%
50%
;
background-size
:
contain
;
background-size
:
contain
;
...
@@ -130,69 +144,71 @@ ion-icon {
...
@@ -130,69 +144,71 @@ ion-icon {
}
}
}
}
//border
//border
.border-none
{
.border-none
{
border
:
none
!
important
;
border
:
none
!
important
;
}
}
//tabs
//tabs
.tabs-ios
.tabbar
{
.tabs-ios
.tabbar
{
border-top
:
1px
solid
#eeeeee
;
border-top
:
1px
solid
#eeeeee
;
background-color
:
#f7f7f7
;
background-color
:
#f7f7f7
;
}
}
//导航栏
//导航栏
.toolbar-title-ios
{
.toolbar-title-ios
{
color
:
#ffffff
;
color
:
#ffffff
;
font-weight
:
400
;
font-weight
:
400
;
}
}
.toolbar-background-ios
{
.toolbar-background-ios
{
background-color
:
#19b5ff
;
background-color
:
#19b5ff
;
}
}
.header-ios
.toolbar-ios
:last-child
.toolbar-background-ios
{
.header-ios
.toolbar-ios
:last-child
.toolbar-background-ios
{
border-bottom
:
1px
solid
#34b4fc
;
border-bottom
:
1px
solid
#34b4fc
;
}
}
.toolbar-ios
ion-title
{
.toolbar-ios
ion-title
{
padding
:
0
;
padding
:
0
;
}
}
.space
{
.space
{
background-color
:
#ebedf2
;
background-color
:
#ebedf2
;
height
:
10px
;
height
:
10px
;
}
}
//toast
//toast
.toast-ios
.toast-wrapper.toast-middle
{
.toast-ios
.toast-wrapper.toast-middle
{
width
:
50%
;
width
:
50%
;
text-align
:
center
;
text-align
:
center
;
}
}
.item-ios
.item-button
{
.item-ios
.item-button
{
height
:
2rem
;
height
:
2rem
;
}
}
//tab切换头
//tab切换头
.tabs-parent
{
.tabs-parent
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
position
:
relative
;
position
:
relative
;
background-color
:
#fff
;
background-color
:
#fff
;
margin-bottom
:
.5rem
;
margin-bottom
:
.5rem
;
font-size
:
1
.7rem
;
}
}
.tabs-children
{
.tabs-children
{
flex
:
1
;
flex
:
1
;
text-align
:
center
;
text-align
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
height
:
3
rem
;
height
:
4
rem
;
line-height
:
3
rem
;
line-height
:
4
rem
;
}
}
#tips
{
#tips
{
position
:
absolute
;
position
:
absolute
;
bottom
:
0
;
bottom
:
0
;
height
:
3px
;
height
:
3px
;
...
@@ -204,28 +220,32 @@ ion-icon {
...
@@ -204,28 +220,32 @@ ion-icon {
-o-transition
:
left
500ms
;
-o-transition
:
left
500ms
;
transition
:
left
500ms
;
transition
:
left
500ms
;
}
}
.gray
{
.gray
{
color
:
#b3b3b3
;
color
:
#b3b3b3
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
border
:
1px
solid
#b3b3b3
;
border
:
1px
solid
#b3b3b3
;
padding
:
1px
8px
;
padding
:
1px
8px
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.green
{
.green
{
color
:
#50b632
;
color
:
#50b632
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
border
:
1px
solid
#50b632
;
border
:
1px
solid
#50b632
;
padding
:
1px
8px
;
padding
:
1px
8px
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.yellow
{
.yellow
{
color
:
#fd9a2b
;
color
:
#fd9a2b
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
border
:
1px
solid
#fd9a2b
;
border
:
1px
solid
#fd9a2b
;
padding
:
1px
8px
;
padding
:
1px
8px
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.red
{
.red
{
color
:
#f76063
;
color
:
#f76063
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
border
:
1px
solid
#f76063
;
border
:
1px
solid
#f76063
;
...
...
src/pages/home/learning/learning-do/learning-do.ts
View file @
f18605d3
...
@@ -48,13 +48,13 @@ export class LearningDoPage {
...
@@ -48,13 +48,13 @@ export class LearningDoPage {
let
totalTime
=
this
.
totalTime
;
let
totalTime
=
this
.
totalTime
;
this
.
clock
=
window
.
setInterval
(()
=>
{
this
.
clock
=
window
.
setInterval
(()
=>
{
totalTime
--
;
totalTime
--
;
let
hourse
=
(
Math
.
floor
(
totalTime
/
3600
));
let
hourse
=
(
Math
.
floor
(
totalTime
/
3600
))
.
toString
()
;
hourse
=
(
hourse
>
10
?
hourse
:
hourse
+
'0'
);
hourse
=
(
hourse
.
length
>
1
?
hourse
:
hourse
+
'0'
);
let
minutes
=
Math
.
floor
(
totalTime
/
60
);
let
minutes
=
Math
.
floor
(
totalTime
/
60
)
.
toString
()
;
minutes
=
(
minutes
>
10
?
minutes
:
minutes
+
'0'
);
minutes
=
(
minutes
.
length
>
1
?
minutes
:
minutes
+
'0'
);
let
seconds
=
Math
.
floor
(
totalTime
%
60
);
let
seconds
=
Math
.
floor
(
totalTime
%
60
)
.
toString
()
;
seconds
=
(
seconds
>
10
?
seconds
:
seconds
+
'0'
);
seconds
=
(
seconds
.
length
>
1
?
seconds
:
seconds
+
'0'
);
this
.
timeText
=
hourse
+
"
:"
+
minutes
+
":
"
+
seconds
;
this
.
timeText
=
hourse
+
"
:"
+
minutes
+
":
"
+
seconds
;
if
(
totalTime
<
0
)
{
if
(
totalTime
<
0
)
{
window
.
clearInterval
(
this
.
clock
)
window
.
clearInterval
(
this
.
clock
)
this
.
timeText
=
"00:00:00"
;
this
.
timeText
=
"00:00:00"
;
...
...
src/pages/home/learning/learning-explain/learning-explain.ts
View file @
f18605d3
...
@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular';
...
@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular';
import
{
LearningDoPage
}
from
"../learning-do/learning-do"
;
import
{
LearningDoPage
}
from
"../learning-do/learning-do"
;
import
{
LearnService
}
from
"../learn.service"
;
import
{
LearnService
}
from
"../learn.service"
;
import
{
AppGlobal
,
AppService
}
from
"../../../../service/appHttpService"
;
import
{
AppGlobal
,
AppService
}
from
"../../../../service/appHttpService"
;
import
{
CommonService
}
from
"../../../../service/common.service"
;
@
IonicPage
()
@
IonicPage
()
@
Component
({
@
Component
({
...
@@ -19,7 +20,7 @@ export class LearningExplainPage {
...
@@ -19,7 +20,7 @@ export class LearningExplainPage {
testId
:
null
testId
:
null
};
//测试对象
};
//测试对象
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
learnSer
:
LearnService
,
public
appService
:
App
Service
)
{
public
learnSer
:
LearnService
,
public
commonSer
:
Common
Service
)
{
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
...
@@ -40,7 +41,7 @@ export class LearningExplainPage {
...
@@ -40,7 +41,7 @@ export class LearningExplainPage {
if
(
this
.
item
.
questionCount
>
0
){
if
(
this
.
item
.
questionCount
>
0
){
this
.
navCtrl
.
push
(
"LearningDoPage"
,
{
testId
:
this
.
testId
});
this
.
navCtrl
.
push
(
"LearningDoPage"
,
{
testId
:
this
.
testId
});
}
else
{
}
else
{
this
.
appService
.
toast
(
'当前试卷试题为空'
);
this
.
commonSer
.
toast
(
'当前试卷试题为空'
);
}
}
}
}
...
...
src/pages/home/learning/learning-list/learning-list.ts
View file @
f18605d3
...
@@ -41,10 +41,12 @@ export class LearningListPage {
...
@@ -41,10 +41,12 @@ export class LearningListPage {
};
};
this
.
learnSer
.
getLearnTestList
(
data
).
subscribe
(
this
.
learnSer
.
getLearnTestList
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
){
this
.
list
=
res
.
data
.
list
;
this
.
noList
=
res
.
data
.
list
.
filter
((
e
)
=>
e
.
testResult
==
0
);
this
.
doList
=
res
.
data
.
list
.
filter
((
e
)
=>
e
.
testResult
==
2
);
}
this
.
link
=
true
;
this
.
link
=
true
;
this
.
list
=
res
.
data
.
list
;
this
.
noList
=
res
.
data
.
list
.
filter
((
e
)
=>
e
.
testResult
==
0
);
this
.
doList
=
res
.
data
.
list
.
filter
((
e
)
=>
e
.
testResult
==
2
);
}
}
)
)
}
}
...
...
src/pages/tabs/home/home.ts
View file @
f18605d3
...
@@ -74,7 +74,7 @@ export class HomePage {
...
@@ -74,7 +74,7 @@ export class HomePage {
constructor
(
public
navCtrl
:
NavController
,
public
activityStatisticService
:
ActivityStatisticService
,
constructor
(
public
navCtrl
:
NavController
,
public
activityStatisticService
:
ActivityStatisticService
,
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
)
{
}
}
...
@@ -127,7 +127,7 @@ export class HomePage {
...
@@ -127,7 +127,7 @@ export class HomePage {
ionViewDidLeave
()
{
ionViewDidLeave
()
{
this
.
newArr
=
[];
this
.
newArr
=
[];
if
(
this
.
slides
)
{
if
(
this
.
slides
)
{
this
.
slides
.
stopAutoplay
();
this
.
slides
.
stopAutoplay
();
}
}
}
}
...
@@ -136,10 +136,10 @@ export class HomePage {
...
@@ -136,10 +136,10 @@ export class HomePage {
//获取权限
//获取权限
getRole
()
{
getRole
()
{
this
.
tabsSer
.
getRoles
().
subscribe
(
this
.
tabsSer
.
getRoles
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
role
=
res
this
.
role
=
res
},
},
error
=>
{
error
=>
{
this
.
appService
.
alert
(
'系统错误!'
);
this
.
appService
.
alert
(
'系统错误!'
);
}
}
)
)
...
@@ -217,7 +217,6 @@ export class HomePage {
...
@@ -217,7 +217,6 @@ export class HomePage {
this
.
appService
.
ObserverHttpGet
(
"/wisdomgroup/modules/activity/hasNewActivity"
,
null
)
this
.
appService
.
ObserverHttpGet
(
"/wisdomgroup/modules/activity/hasNewActivity"
,
null
)
.
subscribe
((
res
:
Response
)
=>
{
.
subscribe
((
res
:
Response
)
=>
{
let
data
=
res
.
json
();
let
data
=
res
.
json
();
console
.
log
(
data
)
this
.
hasNewActivity
=
data
;
this
.
hasNewActivity
=
data
;
},
error
=>
{
},
error
=>
{
}
}
...
...
src/service/appHttpService.ts
View file @
f18605d3
This diff is collapsed.
Click to expand it.
src/service/common.service.ts
View file @
f18605d3
import
{
Injectable
}
from
"@angular/core"
;
import
{
Injectable
}
from
"@angular/core"
;
import
{
AlertController
,
ToastController
}
from
"ionic-angular"
;
@
Injectable
()
@
Injectable
()
export
class
CommonService
{
export
class
CommonService
{
constructor
(){}
constructor
(
public
toastCtrl
:
ToastController
,
public
alertCtrl
:
AlertController
){}
/**
/**
* JSON格式数据转化为字符串 接口调用
* JSON格式数据转化为字符串 接口调用
...
@@ -34,4 +35,50 @@ export class CommonService{
...
@@ -34,4 +35,50 @@ export class CommonService{
}
}
return
formData
;
return
formData
;
}
}
/**
* 提示信息 位置:居中,延时2s
* @param message 提示文字
* @param callback 提示信息之后执行的方法
*/
toast
(
message
,
callback
?)
{
let
toast
=
this
.
toastCtrl
.
create
({
message
:
message
,
duration
:
2000
,
position
:
'middle'
,
dismissOnPageChange
:
true
,
});
toast
.
present
();
if
(
callback
)
{
callback
();
}
}
/**
* alert弹窗
* @param message 弹窗内的文字
* @param callback 如果有回调方法 就有确定、取消两个按钮,没有回调方法 则只有确认一个按钮
*/
alert
(
message
,
callback
?)
{
if
(
callback
)
{
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'提示'
,
message
:
message
,
buttons
:
[
'取消'
,
{
text
:
"确定"
,
handler
:
data
=>
{
callback
();
}
}]
});
alert
.
present
();
}
else
{
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'提示'
,
message
:
message
,
buttons
:
[
"确定"
]
});
alert
.
present
();
}
}
}
}
\ 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