Commit f18605d3 authored by wangqinghua's avatar wangqinghua

修改网络上传的方法

parent 2be6d0e3
<?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">
<name>智汇19号v3.0.3</name>
<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>党建云平台(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
......
......@@ -7,7 +7,7 @@
"proxies": [
{
"path": "/wisdomgroup",
"proxyUrl": "http://10.10.202.24:8080/wisdomgroup"
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
}
]
}
\ No newline at end of file
@import "../theme/icon.scss";
p{
p {
margin: 0;
}
.back-button.show-back-button{
.back-button.show-back-button {
margin-left: 5px;
}
//列表
.item-ios{
.item-ios {
padding-left: 0;
}
.list-ios .item-block .item-inner{
.list-ios .item-block .item-inner {
padding-left: 10px;
}
.list-ios .item-block .item-inner {
border-bottom: 1px solid #dadada;
}
.list-ios > .item-block:last-child,
.list-ios > .item-block:first-child{
.list-ios > .item-block:first-child {
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;
}
.back-button-icon-ios{
.back-button-icon-ios {
line-height: 20px;
font-size: 3rem;
color:#fff;
color: #fff;
}
.bgc-e7e8ed{
.bgc-e7e8ed {
background-color: #ebedf2;
}
.bgc-fff{
.bgc-fff {
background-color: #fff;
}
.bgc-19b5ff{
.bgc-19b5ff {
background-color: #19b5ff;
}
.submit-btn{
.submit-btn {
height: 40px;
margin-bottom: 15px;
width: 80%;
......@@ -52,29 +61,34 @@ p{
white-space: nowrap;
border-radius: 3px;
}
.label-input .text-input{
.label-input .text-input {
padding: 5px;
border: 1px solid #ddd;
border-radius: 4px;
height: 35px;
}
.no-info{
.no-info {
text-align: center;
margin-top: 8rem;
color: #666;
}
.text-center{
.text-center {
text-align: center;
}
.text-right{
.text-right {
text-align: right;
}
.swiper-title{
.swiper-title {
position: relative;
color: #24bafc;
}
.swiper-title::after{
.swiper-title::after {
content: '';
position: absolute;
width: 100%;
......@@ -130,69 +144,71 @@ ion-icon {
}
}
//border
.border-none{
.border-none {
border: none !important;
}
//tabs
.tabs-ios .tabbar{
.tabs-ios .tabbar {
border-top: 1px solid #eeeeee;
background-color: #f7f7f7;
}
//导航栏
.toolbar-title-ios{
.toolbar-title-ios {
color: #ffffff;
font-weight: 400;
}
.toolbar-background-ios{
.toolbar-background-ios {
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;
}
.toolbar-ios ion-title{
.toolbar-ios ion-title {
padding: 0;
}
.space{
.space {
background-color: #ebedf2;
height: 10px;
}
//toast
.toast-ios .toast-wrapper.toast-middle{
.toast-ios .toast-wrapper.toast-middle {
width: 50%;
text-align: center;
}
.item-ios .item-button{
.item-ios .item-button {
height: 2rem;
}
//tab切换头
.tabs-parent{
.tabs-parent {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
position: relative;
background-color: #fff;
margin-bottom: .5rem;
font-size: 1.7rem;
}
.tabs-children{
.tabs-children {
flex: 1;
text-align: center;
cursor: pointer;
height: 3rem;
line-height: 3rem;
height: 4rem;
line-height: 4rem;
}
#tips{
#tips {
position: absolute;
bottom: 0;
height: 3px;
......@@ -204,28 +220,32 @@ ion-icon {
-o-transition: left 500ms;
transition: left 500ms;
}
.gray{
.gray {
color: #b3b3b3;
font-size: 1.4rem;
border: 1px solid #b3b3b3;
padding: 1px 8px;
border-radius: 2px;
}
.green{
.green {
color: #50b632;
font-size: 1.4rem;
border: 1px solid #50b632;
padding: 1px 8px;
border-radius: 2px;
}
.yellow{
.yellow {
color: #fd9a2b;
font-size: 1.4rem;
border: 1px solid #fd9a2b;
padding: 1px 8px;
border-radius: 2px;
}
.red{
.red {
color: #f76063;
font-size: 1.4rem;
border: 1px solid #f76063;
......
......@@ -48,13 +48,13 @@ export class LearningDoPage {
let totalTime = this.totalTime;
this.clock = window.setInterval(() => {
totalTime--;
let hourse = (Math.floor(totalTime / 3600));
hourse = (hourse > 10 ? hourse:hourse + '0');
let minutes = Math.floor(totalTime / 60);
minutes = (minutes > 10 ? minutes:minutes + '0');
let seconds = Math.floor(totalTime % 60);
seconds = (seconds > 10 ? seconds:seconds + '0');
this.timeText = hourse + ":" + minutes + ":" + seconds;
let hourse = (Math.floor(totalTime / 3600)).toString();
hourse = (hourse.length > 1 ? hourse:hourse + '0');
let minutes = Math.floor(totalTime / 60).toString();
minutes = (minutes.length > 1 ? minutes:minutes + '0');
let seconds = Math.floor(totalTime % 60).toString();
seconds = (seconds.length > 1 ? seconds:seconds + '0');
this.timeText = hourse + ":" + minutes + ":" + seconds;
if (totalTime < 0) {
window.clearInterval(this.clock)
this.timeText = "00:00:00";
......
......@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {LearningDoPage} from "../learning-do/learning-do";
import {LearnService} from "../learn.service";
import {AppGlobal, AppService} from "../../../../service/appHttpService";
import {CommonService} from "../../../../service/common.service";
@IonicPage()
@Component({
......@@ -19,7 +20,7 @@ export class LearningExplainPage {
testId:null
}; //测试对象
constructor(public navCtrl: NavController, public navParams: NavParams,
public learnSer: LearnService,public appService:AppService) {
public learnSer: LearnService,public commonSer:CommonService) {
}
ionViewDidLoad() {
......@@ -40,7 +41,7 @@ export class LearningExplainPage {
if(this.item.questionCount > 0){
this.navCtrl.push("LearningDoPage", {testId: this.testId});
}else{
this.appService.toast('当前试卷试题为空');
this.commonSer.toast('当前试卷试题为空');
}
}
......
......@@ -41,11 +41,13 @@ export class LearningListPage {
};
this.learnSer.getLearnTestList(data).subscribe(
(res) => {
this.link = true;
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;
}
)
}
......
......@@ -74,7 +74,7 @@ export class HomePage {
constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService,
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 {
ionViewDidLeave() {
this.newArr = [];
if(this.slides){
if (this.slides) {
this.slides.stopAutoplay();
}
}
......@@ -136,10 +136,10 @@ export class HomePage {
//获取权限
getRole() {
this.tabsSer.getRoles().subscribe(
(res)=>{
(res) => {
this.role = res
},
error=>{
error => {
this.appService.alert('系统错误!');
}
)
......@@ -217,7 +217,6 @@ export class HomePage {
this.appService.ObserverHttpGet("/wisdomgroup/modules/activity/hasNewActivity", null)
.subscribe((res: Response) => {
let data = res.json();
console.log(data)
this.hasNewActivity = data;
}, error => {
}
......
This diff is collapsed.
import {Injectable} from "@angular/core";
import {AlertController, ToastController} from "ionic-angular";
@Injectable()
export class CommonService{
constructor(){}
constructor(public toastCtrl:ToastController,public alertCtrl:AlertController){}
/**
* JSON格式数据转化为字符串 接口调用
......@@ -34,4 +35,50 @@ export class CommonService{
}
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
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