Commit c1d842c6 authored by wangqinghua's avatar wangqinghua

key update

parent fca0557d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://218.78.19.169:8081/wisdomgroup" "proxyUrl": "http://47.103.33.196:8080/wisdomgroup"
}, },
{ {
"path": "/logistics", "path": "/logistics",
......
...@@ -20,11 +20,12 @@ import {TabsService} from "../pages/tabs/tabs.service"; ...@@ -20,11 +20,12 @@ import {TabsService} from "../pages/tabs/tabs.service";
import {version} from "moment"; import {version} from "moment";
declare var Wechat:any; declare var Wechat: any;
declare var window:any; declare var window: any;
declare var cordova: any; declare var cordova: any;
declare var device: any; declare var device: any;
declare var appAvailability:any; declare var appAvailability: any;
@Component({ @Component({
templateUrl: 'app.html' templateUrl: 'app.html'
}) })
...@@ -32,7 +33,8 @@ export class MyApp { ...@@ -32,7 +33,8 @@ export class MyApp {
@ViewChild(Content) content: Content; @ViewChild(Content) content: Content;
rootPage; rootPage;
showSplash = true; showSplash = false;
nowVersion = "4.6.0";
user; user;
...@@ -50,6 +52,8 @@ export class MyApp { ...@@ -50,6 +52,8 @@ export class MyApp {
private appMainSer: AppMainService, private appMainSer: AppMainService,
public appService: AppService) { public appService: AppService) {
this.platform.ready().then(() => { this.platform.ready().then(() => {
this.showSplash = true;
this.splashScreen.hide(); this.splashScreen.hide();
this.statusBar.show(); this.statusBar.show();
this.statusBar.overlaysWebView(false); this.statusBar.overlaysWebView(false);
...@@ -60,7 +64,6 @@ export class MyApp { ...@@ -60,7 +64,6 @@ export class MyApp {
timer(4500).subscribe((res) => { timer(4500).subscribe((res) => {
this.showSplash = false; this.showSplash = false;
this.device(); this.device();
this.loadLogin();
}); });
//app字体不跟随手机字体大小变化 //app字体不跟随手机字体大小变化
...@@ -72,18 +75,21 @@ export class MyApp { ...@@ -72,18 +75,21 @@ export class MyApp {
//用户设备 //用户设备
device() { device() {
console.log('device');
if (this.platform.is('android')) { if (this.platform.is('android')) {
this.screenOrientation.lock('portrait-primary'); //锁定竖屏 this.screenOrientation.lock('portrait-primary'); //锁定竖屏
this.checkVersion(); this.checkVersion();
} else {
this.loadLogin();
} }
} }
//检测是否需要更新 //检测是否需要更新
async checkVersion() { async checkVersion() {
let appVersion;
await this.appVersion.getVersionNumber().then((ver: string) => { await this.appVersion.getVersionNumber().then((ver: string) => {
appVersion = ver.trim(); this.nowVersion = ver.trim();
this.loadLogin();
}); });
await this.appUpdateService.compariVersion().subscribe(res => { await this.appUpdateService.compariVersion().subscribe(res => {
const data = res.json(); const data = res.json();
...@@ -91,8 +97,8 @@ export class MyApp { ...@@ -91,8 +97,8 @@ export class MyApp {
console.log(data); console.log(data);
data.latestVersion = data.latestVersion.trim(); data.latestVersion = data.latestVersion.trim();
if (data.code == 200) { if (data.code == 200) {
if (data.latestVersion != null && data.latestVersion != appVersion) { if (data.latestVersion != null && data.latestVersion != this.nowVersion) {
this.appUpdateService.detectionUpgrade(data.androidDownload, true,data.latestVersion); //提示升级 this.appUpdateService.detectionUpgrade(data.androidDownload, true, data.latestVersion); //提示升级
} }
} }
}); });
...@@ -110,7 +116,8 @@ export class MyApp { ...@@ -110,7 +116,8 @@ export class MyApp {
await this.getNoRead(); await this.getNoRead();
} }
async takeLogin(){ async takeLogin() {
this.user.newestVersion = this.nowVersion;
await this.tabSer.loginpost(this.user).subscribe((res) => { await this.tabSer.loginpost(this.user).subscribe((res) => {
if (res.code == '200') { if (res.code == '200') {
this.storage.set('user', res.data); this.storage.set('user', res.data);
...@@ -118,7 +125,7 @@ export class MyApp { ...@@ -118,7 +125,7 @@ export class MyApp {
this.storage.set('userLoginInfo', this.user); this.storage.set('userLoginInfo', this.user);
this.rootPage = TabsPage; this.rootPage = TabsPage;
} else { } else {
this.appService.alert('手机号或密码错误!'); this.appService.alert(res.message);
this.rootPage = LoginPage; this.rootPage = LoginPage;
} }
}); });
......
...@@ -59,6 +59,7 @@ import {ContactService} from "../pages/contact/contact.service"; ...@@ -59,6 +59,7 @@ import {ContactService} from "../pages/contact/contact.service";
import {UntilService} from "../provide/until.service"; import {UntilService} from "../provide/until.service";
import {PaymentPageModule} from "../pages/discover-pages/payment/payment.module"; import {PaymentPageModule} from "../pages/discover-pages/payment/payment.module";
import {RepairPageModule} from "../pages/serve-pages/repair/repair.module"; import {RepairPageModule} from "../pages/serve-pages/repair/repair.module";
import {TimeFormatService} from "../provide/timeFormat.service";
@NgModule({ @NgModule({
...@@ -145,6 +146,7 @@ import {RepairPageModule} from "../pages/serve-pages/repair/repair.module"; ...@@ -145,6 +146,7 @@ import {RepairPageModule} from "../pages/serve-pages/repair/repair.module";
AppMainService, AppMainService,
DiscoverService, DiscoverService,
UntilService, UntilService,
TimeFormatService,
{provide: ErrorHandler, useClass: IonicErrorHandler} {provide: ErrorHandler, useClass: IonicErrorHandler}
] ]
}) })
......
...@@ -559,3 +559,15 @@ ion-buttons button span.top-right-icon{ ...@@ -559,3 +559,15 @@ ion-buttons button span.top-right-icon{
.action-sheet-wrapper{ .action-sheet-wrapper{
top: 25%; top: 25%;
} }
.cancelBtn{
padding: .8rem !important;
border: 1px solid #419bf6;
text-align: center;
border-radius: 10px;
width: 70%;
margin: 0 auto !important;
span{
color: #419bf6 !important;
}
}
...@@ -47,7 +47,37 @@ ...@@ -47,7 +47,37 @@
<!-- The main bundle js is generated during the build process --> <!-- The main bundle js is generated during the build process -->
<script src="build/main.js"></script> <script src="build/main.js"></script>
<script>
//Cache Buster
(function () {
let rep = /.*\?.*/,
links = document.getElementsByTagName('link'),
scripts = document.getElementsByTagName('script'),
process_scripts = true;
for (let i = 0; i < links.length; i++) {
let link = links[i],
href = link.href;
if (rep.test(href)) {
link.href = href + '&' + Date.now();
} else {
link.href = href + '?' + Date.now();
}
}
if (process_scripts) {
for (let i = 0; i < scripts.length; i++) {
let script = scripts[i],
src = script.src;
if (rep.test(src)) {
script.src = src + '&' + Date.now();
} else {
script.src = src + '?' + Date.now();
}
}
}
})();
</script>
</body> </body>
<script src="assets/swiper/swiper-4.1.6.min.js"></script> <script src="assets/swiper/swiper-4.1.6.min.js"></script>
......
...@@ -8,6 +8,7 @@ import {Storage} from '@ionic/storage'; ...@@ -8,6 +8,7 @@ import {Storage} from '@ionic/storage';
import {AppService} from '../../service/http.service'; import {AppService} from '../../service/http.service';
import {LoginService} from "./login.service"; import {LoginService} from "./login.service";
import {TabsService} from "../tabs/tabs.service"; import {TabsService} from "../tabs/tabs.service";
import {AppVersion} from "@ionic-native/app-version";
@IonicPage() @IonicPage()
...@@ -24,19 +25,23 @@ export class LoginPage { ...@@ -24,19 +25,23 @@ export class LoginPage {
userid: '', //登录数据 userid: '', //登录数据
mobile: '', mobile: '',
password: '', password: '',
rememberMe: true rememberMe: true,
newestVersion: '4.6.0'
}; };
tabflag: any; tabflag: any;
constructor(public navCtrl: NavController, constructor(public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
public storage: Storage, public storage: Storage,
public alertCtrl: AlertController, public alertCtrl: AlertController, private appVersion: AppVersion,
private loadingCtrl: LoadingController, private loadingCtrl: LoadingController,
public http: Http, private loginSer: LoginService, public http: Http, private loginSer: LoginService,
public appService: AppService, public appService: AppService,
public tabSer: TabsService, public tabSer: TabsService,
public elementRef: ElementRef) { public elementRef: ElementRef) {
this.appVersion.getVersionNumber().then((ver: string) => {
this.user.newestVersion = ver.trim();
});
} }
...@@ -93,7 +98,7 @@ export class LoginPage { ...@@ -93,7 +98,7 @@ export class LoginPage {
this.storage.set('userLoginInfo', this.user); this.storage.set('userLoginInfo', this.user);
return this.navCtrl.setRoot(TabsPage, {"user": this.user}); return this.navCtrl.setRoot(TabsPage, {"user": this.user});
} else { } else {
this.appService.alert('手机号或密码错误!'); this.appService.alert(res.message);
} }
}, },
(err) => { (err) => {
......
...@@ -127,6 +127,7 @@ export class PersonInfoPage { ...@@ -127,6 +127,7 @@ export class PersonInfoPage {
const fileTransfer: FileTransferObject = this.transfer.create(); const fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/icon/upload', options).then( fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/icon/upload', options).then(
(res) => { (res) => {
console.log(res);
uploadLoading.dismiss(); uploadLoading.dismiss();
this.commonSer.toast('上传成功'); this.commonSer.toast('上传成功');
this.getUserInfo(); this.getUserInfo();
......
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
<span *ngIf="item.typeList && item.typeList.includes(2)">晚餐</span> <span *ngIf="item.typeList && item.typeList.includes(2)">晚餐</span>
</span> </span>
</p> </p>
<p (click)="removeItem(item)" class="cancelBtn"> <span>取消</span> </p>
</ion-item> </ion-item>
<ion-item *ngIf="item.diffFlag == 2"> <ion-item *ngIf="item.diffFlag == 2">
<p> <p>
...@@ -124,10 +125,9 @@ ...@@ -124,10 +125,9 @@
<span>{{item.orderDate | date:'yyyy-MM-dd'}}</span> <span>{{item.orderDate | date:'yyyy-MM-dd'}}</span>
</span> </span>
</p> </p>
<p (click)="removeItem(item)" class="cancelBtn"> <span>取消</span> </p>
</ion-item> </ion-item>
<ion-item-options>
<button ion-button color="danger" (click)="removeItem(item)">取消</button>
</ion-item-options>
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
......
...@@ -141,11 +141,11 @@ export class FoodPage { ...@@ -141,11 +141,11 @@ export class FoodPage {
//取消预定 //取消预定
removeItem(item) { removeItem(item) {
debugger
if (item.orderDate < new Date().getTime()) { if (item.orderDate < new Date().getTime()) {
this.commonSer.toast("已过期不可取消"); this.commonSer.toast("已过期不可取消");
return; return;
} }
this.commonSer.alert('确定取消?',()=>{
this.serveSer.cancelMeals(item.id).subscribe( this.serveSer.cancelMeals(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
...@@ -156,6 +156,7 @@ export class FoodPage { ...@@ -156,6 +156,7 @@ export class FoodPage {
} }
} }
) )
});
} }
//审核 //审核
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<span *ngIf="item1.startEnd == 1">9:00-09:45</span> <span *ngIf="item1.startEnd == 1">9:00-09:45</span>
<span *ngIf="item1.startEnd == 2">09:45-10:30</span> <span *ngIf="item1.startEnd == 2">09:45-10:30</span>
<span *ngIf="item1.startEnd == 3">10:30-11:15</span> <span *ngIf="item1.startEnd == 3">10:30-11:15</span>
<span *ngIf="item1.userName == mineInfo?.username"> {{item1.userName}}</span> <span> {{item1.userName}}</span>
(已预定) (已预定)
</span> </span>
</ng-container> </ng-container>
...@@ -59,14 +59,15 @@ ...@@ -59,14 +59,15 @@
</div> </div>
<div class="morning-room"> <div class="morning-room">
<ng-container *ngFor="let item2 of room?.afternoonUse"> <ng-container *ngFor="let item2 of room?.afternoonUse">
<span [ngClass]="item2.isImportant == 1?'import':''" <span [ngClass]="item2.isImportant == 1?'import':''" *ngIf="role.includes(9) || item2.userName == mineInfo?.username"
*ngIf="role.includes(9) || item2.userName == mineInfo?.username"
(click)="goApplyEdit(item2)"> (click)="goApplyEdit(item2)">
<span *ngIf="item2.startEnd == 4">13:00-14:00</span> <span *ngIf="item2.startEnd == 4">13:00-14:00</span>
<span *ngIf="item2.startEnd == 5">14:00-15:00</span> <span *ngIf="item2.startEnd == 5">14:00-15:00</span>
<span *ngIf="item2.startEnd == 6">15:00-16:00</span> <span *ngIf="item2.startEnd == 6">15:00-16:00</span>
<span *ngIf="item2.startEnd == 7">16:00-17:00</span> <span *ngIf="item2.startEnd == 7">16:00-17:00</span>
<span>
{{item2.userName}} {{item2.userName}}
</span>
(已预定) (已预定)
</span> </span>
</ng-container> </ng-container>
...@@ -133,10 +134,8 @@ ...@@ -133,10 +134,8 @@
<span *ngIf="item.startEnd == 7">16:00-17:00</span> <span *ngIf="item.startEnd == 7">16:00-17:00</span>
</span> </span>
</p> </p>
<p (click)="removeItem(item)" class="cancelBtn"> <span>取消</span> </p>
</ion-item> </ion-item>
<ion-item-options>
<button ion-button color="danger" (click)="removeItem(item)">取消</button>
</ion-item-options>
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
......
...@@ -137,6 +137,7 @@ export class HairCutPage { ...@@ -137,6 +137,7 @@ export class HairCutPage {
this.commonSer.toast("已过期不可取消"); this.commonSer.toast("已过期不可取消");
return; return;
} }
this.commonSer.alert('确定取消?',()=>{
this.serveSer.cancelHair(item.id).subscribe( this.serveSer.cancelHair(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
...@@ -147,6 +148,7 @@ export class HairCutPage { ...@@ -147,6 +148,7 @@ export class HairCutPage {
} }
} }
) )
});
} }
//改变 //改变
......
...@@ -37,19 +37,22 @@ ...@@ -37,19 +37,22 @@
<div class="room"> <div class="room">
<div class="notYet"> <div class="notYet">
<p>会议室预定信息</p> <p>会议室预定信息</p>
<p class="meet-tips"><span>提示:点击会议室名称进行预定</span></p>
<div class="room-apply"> <div class="room-apply">
<div class="room-flex" *ngFor="let room of room"> <div class="room-flex" *ngFor="let room of room">
<div class="room-name" (click)="chooseType(room,{},'8:00:00')"> <div class="room-name" (click)="chooseType(room,{},'8:00:00')">
{{room.roomName}} {{room.roomName}}
</div> </div>
<div class="room-apply"> <div class="room-apply">
<p *ngFor="let apply of room?.applies" (click)="chooseType(room,apply,'8:00:00')"> <p *ngFor="let apply of room?.applies" (click)="chooseType(room,apply,'8:00:00')"
[ngClass]="apply.startTime.split(':').join('') > clock12 ? 'afternoonBg':''">
<span>{{apply.timeQuantum}}</span> <span>{{apply.timeQuantum}}</span>
<span>{{apply.applicantName}}</span> <span>{{apply.applicantName}}</span>
<span>{{apply.orgName}}</span> <span>{{apply.orgName}}</span>
<span>{{apply.meetingTypeStr}}</span> <!-- <span>{{apply.meetingTypeStr}}</span>-->
</p> </p>
<p *ngIf="this.role.includes(1) || this.role.includes(2) || this.role.includes(3)
|| this.role.includes(7)" class="list-btn" (click)="goApply(room,'8:00:00')">
会议室预定</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -92,10 +95,9 @@ ...@@ -92,10 +95,9 @@
<span>{{item.startTime | date:'yyyy年MM月dd日 HH:mm'}}</span>-<span>{{item.endTime | date:'HH:mm'}}</span> <span>{{item.startTime | date:'yyyy年MM月dd日 HH:mm'}}</span>-<span>{{item.endTime | date:'HH:mm'}}</span>
</span> </span>
</p> </p>
<p *ngIf="nowDate < item.startTime" (click)="removeItem(item)" class="cancelBtn">
<span>取消</span></p>
</ion-item> </ion-item>
<ion-item-options>
<button ion-button color="danger" (click)="removeItem(item)">取消</button>
</ion-item-options>
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
...@@ -112,6 +114,16 @@ ...@@ -112,6 +114,16 @@
loadingSpinner="bubbles" loadingSpinner="bubbles"
loadingText="加载中"></ion-infinite-scroll-content> loadingText="加载中"></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>
<!-- <ion-fab right bottom *ngIf="this.role.includes(1) || this.role.includes(2) || this.role.includes(3)-->
<!-- || this.role.includes(7)">-->
<!-- <button ion-fab color="light" (click)="goApply(room[0],'8:00')">-->
<!-- <div class="fab-call">-->
<!-- <ion-icon style="font-size: 2rem" class="top-right-icon icon-fabu iconfont"></ion-icon>-->
<!-- <p>会议室预定</p>-->
<!-- </div>-->
<!-- </button>-->
<!-- </ion-fab>-->
</ion-content> </ion-content>
</ion-content> </ion-content>
...@@ -274,12 +274,42 @@ page-meet-room { ...@@ -274,12 +274,42 @@ page-meet-room {
} }
.room-apply{ .room-apply{
p{ p{
border: 1px solid #fff1f0;
padding: 1.5rem 5px; padding: 1.5rem 5px;
border-radius: 5px;
} }
p:nth-of-type(2n){ p.afternoonBg{
background-color: #fff1f0; background-color: #fff1f0;
border-radius: 5px; border: 1px solid #fff1f0;
color: #000000; color: #000000;
} }
} }
.fab ion-icon {
color: #e42417;
font-size: 4rem;
}
.fab-ios-light {
border: 1px solid #333333;
width: 7rem;
height: 7rem;
}
.fab-call {
line-height: normal;
p {
color: #333333;
font-size: 1rem;
}
}
.list-btn{
text-align: center;
color: #4d8bfc;
border:1px solid #4d8bfc !important;
font-weight: bold;
font-size: 2rem;
border-radius: 5px;
}
} }
...@@ -10,6 +10,7 @@ import {CommonService} from "../../../provide/common.service"; ...@@ -10,6 +10,7 @@ import {CommonService} from "../../../provide/common.service";
import {AppMainService} from "../../../app/app.service"; import {AppMainService} from "../../../app/app.service";
import {RoomDealPage} from "./room-deal/room-deal"; import {RoomDealPage} from "./room-deal/room-deal";
import {timer} from "rxjs/observable/timer"; import {timer} from "rxjs/observable/timer";
import {TimeFormatService} from "../../../provide/timeFormat.service";
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -41,15 +42,17 @@ export class MeetRoomPage { ...@@ -41,15 +42,17 @@ export class MeetRoomPage {
isLoad: true, isLoad: true,
}; };
clock12 = "1200";
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe, private serveSer: ServeService, public datePipe: DatePipe,private timeFormat:TimeFormatService,
private commonSer: CommonService, private appMainSer: AppMainService) { private commonSer: CommonService, private appMainSer: AppMainService) {
} }
ionViewDidEnter() { ionViewDidEnter() {
this.myApply(); this.myApply();
this.getApply(); this.getApply();
} }
ionViewDidLoad() { ionViewDidLoad() {
...@@ -90,6 +93,7 @@ export class MeetRoomPage { ...@@ -90,6 +93,7 @@ export class MeetRoomPage {
} }
doInfinite(e) { doInfinite(e) {
this.nowDate = new Date().getTime();
if (this.page.total == this.applyList.length) { if (this.page.total == this.applyList.length) {
console.log("没有更多了"); console.log("没有更多了");
e.enable(false); e.enable(false);
...@@ -113,6 +117,7 @@ export class MeetRoomPage { ...@@ -113,6 +117,7 @@ export class MeetRoomPage {
//我的预定 //我的预定
myApply() { myApply() {
this.nowDate = new Date().getTime();
const data = { const data = {
P_pageNumber: this.page.P_pageNumber, P_pageNumber: this.page.P_pageNumber,
P_pageSize: this.page.P_pageSize, P_pageSize: this.page.P_pageSize,
...@@ -128,10 +133,7 @@ export class MeetRoomPage { ...@@ -128,10 +133,7 @@ export class MeetRoomPage {
//取消预定 //取消预定
removeItem(item) { removeItem(item) {
if (item.startTime < new Date().getTime()) { this.commonSer.alert('确定取消申请?', () => {
this.commonSer.toast("已过期不可取消");
return;
}
this.serveSer.cancelApply(item.id).subscribe( this.serveSer.cancelApply(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
...@@ -142,6 +144,7 @@ export class MeetRoomPage { ...@@ -142,6 +144,7 @@ export class MeetRoomPage {
} }
} }
) )
});
} }
//审核 //审核
...@@ -167,15 +170,14 @@ export class MeetRoomPage { ...@@ -167,15 +170,14 @@ export class MeetRoomPage {
} else { } else {
this.navCtrl.push(RoomApplyPage, { this.navCtrl.push(RoomApplyPage, {
id: apply.applyId, id: apply.applyId,
type:'look' type: 'look'
}); });
} }
} }
//新增申请 //新增申请
goApply(room, apply, time) { goApply(room, time) {
let data; let data;
if (apply) {
data = { data = {
roomId: room.roomId, roomId: room.roomId,
roomName: room.roomName, roomName: room.roomName,
...@@ -183,7 +185,6 @@ export class MeetRoomPage { ...@@ -183,7 +185,6 @@ export class MeetRoomPage {
startTime: this.date + ' ' + time, startTime: this.date + ' ' + time,
accommodation: room.accommodation accommodation: room.accommodation
}; };
}
this.navCtrl.push(RoomApplyPage, {data: data}); this.navCtrl.push(RoomApplyPage, {data: data});
} }
...@@ -199,7 +200,7 @@ export class MeetRoomPage { ...@@ -199,7 +200,7 @@ export class MeetRoomPage {
if (apply.applyId) { if (apply.applyId) {
this.goApplyEdit(room, apply); this.goApplyEdit(room, apply);
} else { } else {
this.goApply(room, apply, time); this.goApply(room, time);
} }
} }
} }
......
...@@ -6,6 +6,7 @@ import {CommonService} from "../../../../provide/common.service"; ...@@ -6,6 +6,7 @@ import {CommonService} from "../../../../provide/common.service";
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {AppMainService} from "../../../../app/app.service"; import {AppMainService} from "../../../../app/app.service";
import {UntilService} from "../../../../provide/until.service"; import {UntilService} from "../../../../provide/until.service";
import {TimeFormatService} from "../../../../provide/timeFormat.service";
@Component({ @Component({
selector: 'page-room-apply', selector: 'page-room-apply',
...@@ -81,6 +82,7 @@ export class RoomApplyPage { ...@@ -81,6 +82,7 @@ export class RoomApplyPage {
constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController, constructor(public navCtrl: NavController, public navParams: NavParams, private actionSheetCtrl: ActionSheetController,
private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService, private serveSer: ServeService, public _modalCtrl: ModalController, private appMainSer: AppMainService,
public timeFormat: TimeFormatService,
private commonSer: CommonService, private datePipe: DatePipe, private until: UntilService) { private commonSer: CommonService, private datePipe: DatePipe, private until: UntilService) {
this.appMainSer.mineInfo.subscribe(value => { this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value; this.mineInfo = value;
...@@ -121,15 +123,11 @@ export class RoomApplyPage { ...@@ -121,15 +123,11 @@ export class RoomApplyPage {
} }
changeStartTime(e) { changeStartTime(e) {
const minute = e.minute > 9 ? e.minute : '0' + e.minute; this.obj.startTime = this.timeFormat.ionTimeFormat(e);
const hour = e.hour > 9 ? e.hour : '0' + e.hour;
this.obj.startTime = e.year + '-' + e.month + '-' + e.day + " " + hour + ":" + minute + ":00";
} }
changeEndTime(e) { changeEndTime(e) {
const minute = e.minute > 9 ? e.minute : '0' + e.minute; this.obj.endTime = this.timeFormat.ionTimeFormat(e);
const hour = e.hour > 9 ? e.hour : '0' + e.hour;
this.obj.endTime = e.year + '-' + e.month + '-' + e.day + " " + hour + ":" + minute + ":00";
} }
//会议详情 //会议详情
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
<ion-input [(ngModel)]="obj.equipmentName" placeholder="设备名称"></ion-input> <ion-input [(ngModel)]="obj.equipmentName" placeholder="设备名称"></ion-input>
</ion-item> </ion-item>
<ion-item> <ion-item>
<ion-input [(ngModel)]="obj.roomName" placeholder="房间号"></ion-input>
</ion-item>
<ion-item>
<textarea [(ngModel)]="obj.remark" class="content-textarea" placeholder="备注"></textarea> <textarea [(ngModel)]="obj.remark" class="content-textarea" placeholder="备注"></textarea>
</ion-item> </ion-item>
<ion-item> <ion-item>
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
<ion-col class="imgList" col-4 *ngFor="let img of obj.urlList;let i = index;"> <ion-col class="imgList" col-4 *ngFor="let img of obj.urlList;let i = index;">
<span class="imgTips" *ngIf="i == 0">设备图片</span> <span class="imgTips" *ngIf="i == 0">设备图片</span>
<ion-icon (click)="deleteFile(i)" class="main-color" name="close-circle"></ion-icon> <ion-icon (click)="deleteFile(i)" class="main-color" name="close-circle"></ion-icon>
<img [src]="pictrue + img" alt="标题图片"> <img [src]="picUrl + img" alt="标题图片">
</ion-col> </ion-col>
<ion-col col-4 *ngIf="obj.urlList.length < 9"> <ion-col col-4 *ngIf="obj.urlList.length < 9">
<div class="selectDiv" (click)="tackePic()"> <div class="selectDiv" (click)="tackePic()">
......
...@@ -13,11 +13,12 @@ import {ServeService} from "../../serve.service"; ...@@ -13,11 +13,12 @@ import {ServeService} from "../../serve.service";
export class RepairApplyPage { export class RepairApplyPage {
rId; rId;
pictrue = AppGlobal.domain + '/wisdomgroup'; picUrl = AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/';
obj = <any>{ obj = <any>{
equipmentName: '', equipmentName: '',
remark: '', remark: '',
urlList: [] urlList: [],
roomName:''
}; };
status; status;
actionSheet_image; actionSheet_image;
...@@ -116,13 +117,13 @@ export class RepairApplyPage { ...@@ -116,13 +117,13 @@ export class RepairApplyPage {
}); });
uploadLoading.present(); uploadLoading.present();
const fileTransfer: FileTransferObject = this.transfer.create(); const fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/upload1', options).then( fileTransfer.upload(file, AppGlobal.domain + '/wisdomgroup/modules/common/file/icon/upload', options).then(
(res) => { (res) => {
uploadLoading.dismiss(); uploadLoading.dismiss();
this.commonSer.toast('上传成功'); this.commonSer.toast('上传成功');
const data = JSON.parse(res.response); const data = JSON.parse(res.response);
this.commonSer.log(data.data[0].filePath); this.commonSer.log(data.data.id);
this.obj.urlList.push(data.data[0].filePath); this.obj.urlList.push(data.data.id);
}, err => { }, err => {
uploadLoading.dismiss(); uploadLoading.dismiss();
this.commonSer.toast('上传错误'); this.commonSer.toast('上传错误');
...@@ -141,6 +142,10 @@ export class RepairApplyPage { ...@@ -141,6 +142,10 @@ export class RepairApplyPage {
//提交 //提交
submit() { submit() {
if(!this.obj.equipmentName){
this.commonSer.toast('请输入设备名称');
return
}
this.commonSer.alert('确定提交申请?', () => { this.commonSer.alert('确定提交申请?', () => {
if (this.rId) this.obj.id = this.rId; if (this.rId) this.obj.id = this.rId;
this.serveSer.saveRepair(this.obj).subscribe( this.serveSer.saveRepair(this.obj).subscribe(
......
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
</span> </span>
</p> </p>
</ion-item> </ion-item>
<ion-item-options> <!-- <ion-item-options>-->
<button ion-button color="danger" (click)="removeItem(item)">取消</button> <!-- <button ion-button color="danger" (click)="removeItem(item)">取消</button>-->
</ion-item-options> <!-- </ion-item-options>-->
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
......
...@@ -230,19 +230,24 @@ page-repair { ...@@ -230,19 +230,24 @@ page-repair {
font-size: 1rem; font-size: 1rem;
border-radius: 4px; border-radius: 4px;
} }
.fab ion-icon{
.fab ion-icon {
color: #e42417; color: #e42417;
font-size: 3.5rem; font-size: 4rem;
} }
.fab-ios-light{
.fab-ios-light {
border: 1px solid #333333; border: 1px solid #333333;
width: 7rem; width: 9rem;
height: 7rem; height: 9rem;
} }
.fab-call{
.fab-call {
line-height: normal; line-height: normal;
p{
p {
color: #333333; color: #333333;
font-size: 1rem;
} }
} }
} }
...@@ -4,6 +4,7 @@ import {ServeService} from "../../serve.service"; ...@@ -4,6 +4,7 @@ import {ServeService} from "../../serve.service";
import {CommonService} from "../../../../provide/common.service"; import {CommonService} from "../../../../provide/common.service";
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {PersonMulComponent} from "../../../../components/person-mul/person-mul"; import {PersonMulComponent} from "../../../../components/person-mul/person-mul";
import {TimeFormatService} from "../../../../provide/timeFormat.service";
@Component({ @Component({
...@@ -40,7 +41,7 @@ export class CarApplyPage { ...@@ -40,7 +41,7 @@ export class CarApplyPage {
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public modalCtrl: ModalController, private serveSer: ServeService, public modalCtrl: ModalController,
private commonSer: CommonService, private datePipe: DatePipe, private commonSer: CommonService, private datePipe: DatePipe,private timeFormat:TimeFormatService,
private actionSheetCtrl: ActionSheetController) { private actionSheetCtrl: ActionSheetController) {
} }
...@@ -93,15 +94,11 @@ export class CarApplyPage { ...@@ -93,15 +94,11 @@ export class CarApplyPage {
} }
changeStartTime(e) { changeStartTime(e) {
const minute = e.minute > 9 ? e.minute : '0' + e.minute; this.obj.startTime = this.timeFormat.ionTimeFormat(e);
const hour = e.hour > 9 ? e.hour : '0' + e.hour;
this.obj.startTime = e.year + '-' + e.month + '-' + e.day + " " + hour + ":" + minute + ":00";
} }
changeEndTime(e) { changeEndTime(e) {
const minute = e.minute > 9 ? e.minute : '0' + e.minute; this.obj.endTime = this.timeFormat.ionTimeFormat(e);
const hour = e.hour > 9 ? e.hour : '0' + e.hour;
this.obj.endTime = e.year + '-' + e.month + '-' + e.day + " " + hour + ":" + minute + ":00";
} }
//选择事由 //选择事由
......
...@@ -119,14 +119,13 @@ ...@@ -119,14 +119,13 @@
<span>{{item.phone}}</span> <span>{{item.phone}}</span>
</span> </span>
</p> </p>
<p *ngIf="nowDate < item.startTime" (click)="removeItem(item)" class="cancelBtn">
<span>取消</span></p>
</ion-item> </ion-item>
<ion-item-options>
<button ion-button color="danger" (click)="removeItem(item)">取消</button>
</ion-item-options>
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
*ngIf="!isLoad && applyList.length == 0"> *ngIf="page.isLoad && applyList.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt=""> <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center> <p text-center>
暂无申请 暂无申请
......
...@@ -35,22 +35,26 @@ export class UseCarPage { ...@@ -35,22 +35,26 @@ export class UseCarPage {
role = []; role = [];
mineInfo; mineInfo;
pageNumber = 1; page = {
pageSize = AppGlobal.pageCount; P_pageNumber: 1,
total; P_pageSize: AppGlobal.pageCount,
isLoad = true; total: 0,
isLoad: false,
};
checkObj = { checkObj = {
checkedApplyList: [], //已审核 checkedApplyList: [], //已审核
uncheckApplyist: [] //未审核 uncheckApplyist: [] //未审核
}; };
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe, private serveSer: ServeService, public datePipe: DatePipe,
private commonSer: CommonService, private appMainSer: AppMainService) { private commonSer: CommonService, private appMainSer: AppMainService) {
} }
ionViewDidEnter(){ ionViewDidEnter() {
this.myApply(); this.myApply();
this.getApply(); this.getApply();
} }
...@@ -80,52 +84,72 @@ export class UseCarPage { ...@@ -80,52 +84,72 @@ export class UseCarPage {
) )
} }
//我的预定
myApply() {
this.nowDate = new Date().getTime();
const data = {
P_pageNumber: 1,
P_pageSize: this.page.P_pageSize,
};
this.serveSer.myCarApply(data).subscribe(
(res) => {
this.page.isLoad = false;
this.applyList = res.data.list;
this.page.total = res.data.total;
}
)
}
getDate(e) { getDate(e) {
this.date = e; this.date = e;
this.getApply(); this.getApply();
} }
doRefresh(e){ doRefresh(e) {
this.getApply(); this.getApply();
const data = { const data = {
P_pageNumber: 1, P_pageNumber: 1,
P_pageSize: this.pageSize, P_pageSize: this.page.P_pageSize,
}; };
this.serveSer.myCarApply(data).subscribe( this.serveSer.myCarApply(data).subscribe(
(res) => { (res) => {
this.isLoad = false; this.page.isLoad = true;
this.applyList = res.data.list; this.applyList = res.data.list;
this.total = res.data.total; this.page.total = res.data.total;
timer(800).subscribe(() => e.complete()); timer(800).subscribe(() => e.complete());
} }
) )
} }
doInfinite(e){ doInfinite(e) {
timer(800).subscribe(() => e.complete()); this.nowDate = new Date().getTime();
if (this.page.total == this.applyList.length) {
console.log("没有更多了");
e.enable(false);
return false;
} }
this.page.P_pageNumber++;
//我的预定
myApply() {
const data = { const data = {
P_pageNumber: this.pageNumber, P_pageNumber: this.page.P_pageNumber,
P_pageSize: this.pageSize, P_pageSize: this.page.P_pageSize,
}; };
this.serveSer.myCarApply(data).subscribe( this.serveSer.myCarApply(data).subscribe(
(res) => { (res) => {
this.isLoad = false; this.page.total = res.total;
this.applyList = res.data.list; this.applyList = this.applyList.concat(res.list);
this.total = res.data.total; timer(800).subscribe(() => e.complete());
} }
) )
timer(800).subscribe(() => e.complete());
} }
//取消预定 //取消预定
removeItem(item) { removeItem(item) {
if(item.startTime < new Date().getTime()){ if (item.startTime < new Date().getTime()) {
this.commonSer.toast("已过期不可取消"); this.commonSer.toast("已过期不可取消");
return; return;
} }
this.commonSer.alert('确定取消?', () => {
this.serveSer.cancelCarApply(item.id).subscribe( this.serveSer.cancelCarApply(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
...@@ -136,6 +160,7 @@ export class UseCarPage { ...@@ -136,6 +160,7 @@ export class UseCarPage {
} }
} }
) )
});
} }
//新增预定 //新增预定
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
来访时间:<span>{{done.visitTime | date:"yyyy-MM-dd HH:mm"}}</span> 来访时间:<span>{{done.visitTime | date:"yyyy-MM-dd HH:mm"}}</span>
</div> </div>
<div> <div>
访客公司<span>{{done.visitorOrg}}</span> 访客单位<span>{{done.visitorOrg}}</span>
访客车辆:<span>{{done.carNumber}}</span> 访客车辆:<span>{{done.carNumber}}</span>
</div> </div>
</div> </div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
来访时间:<span>{{no.visitTime | date:"yyyy-MM-dd HH:mm"}}</span> 来访时间:<span>{{no.visitTime | date:"yyyy-MM-dd HH:mm"}}</span>
</div> </div>
<div> <div>
访客公司<span>{{no.visitorOrg}}</span> 访客单位<span>{{no.visitorOrg}}</span>
访客车辆:<span>{{no.carNumber}}</span> 访客车辆:<span>{{no.carNumber}}</span>
</div> </div>
</div> </div>
...@@ -110,10 +110,8 @@ ...@@ -110,10 +110,8 @@
</button> </button>
</ion-col> </ion-col>
</ion-row> </ion-row>
<p *ngIf="nowDate < item.startTime" (click)="removeItem(item,$event)" class="cancelBtn"> <span>取消</span> </p>
</ion-item> </ion-item>
<ion-item-options>
<button ion-button color="danger" (click)="removeItem(item)">取消</button>
</ion-item-options>
</ion-item-sliding> </ion-item-sliding>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem;color: #666666" <ion-list text-center style="margin-top: 10rem;color: #666666"
......
...@@ -37,9 +37,10 @@ export class VistorRegisterPage { ...@@ -37,9 +37,10 @@ export class VistorRegisterPage {
myList; myList;
pageNumber = 1; pageNumber = 1;
pageSize = 100; pageSize = 1000;
total; total;
isLoad = true; isLoad = true;
nowDate;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe, private serveSer: ServeService, public datePipe: DatePipe,
...@@ -89,6 +90,7 @@ export class VistorRegisterPage { ...@@ -89,6 +90,7 @@ export class VistorRegisterPage {
//我的预定 //我的预定
myApply() { myApply() {
this.nowDate = new Date().getTime();
const data = { const data = {
P_pageNumber: this.pageNumber, P_pageNumber: this.pageNumber,
P_pageSize: this.pageSize, P_pageSize: this.pageSize,
...@@ -103,11 +105,13 @@ export class VistorRegisterPage { ...@@ -103,11 +105,13 @@ export class VistorRegisterPage {
} }
//取消预定 //取消预定
removeItem(item) { removeItem(item, ev) {
if(item.submitTime < new Date().getTime() || item.status == 2 ){ ev.stopPropagation();
if (item.submitTime < new Date().getTime() || item.status == 2) {
this.commonSer.toast("已过期不可取消"); this.commonSer.toast("已过期不可取消");
return; return;
} }
this.commonSer.alert('确定取消?', () => {
this.serveSer.cancelVisitor(item.id).subscribe( this.serveSer.cancelVisitor(item.id).subscribe(
(res) => { (res) => {
if (res.errcode == 1000) { if (res.errcode == 1000) {
...@@ -118,6 +122,7 @@ export class VistorRegisterPage { ...@@ -118,6 +122,7 @@ export class VistorRegisterPage {
} }
} }
) )
});
} }
//审核 //审核
...@@ -134,7 +139,7 @@ export class VistorRegisterPage { ...@@ -134,7 +139,7 @@ export class VistorRegisterPage {
//编辑申请 //编辑申请
goApplyEdit(item) { goApplyEdit(item) {
if(item.status == 2) return; if (item.status == 2) return;
this.navCtrl.push(VistorApplyPage, {id: item.id}); this.navCtrl.push(VistorApplyPage, {id: item.id});
} }
...@@ -144,7 +149,7 @@ export class VistorRegisterPage { ...@@ -144,7 +149,7 @@ export class VistorRegisterPage {
} }
//确认到访 //确认到访
confirmVist(item,e) { confirmVist(item, e) {
e.stopPropagation(); e.stopPropagation();
this.commonSer.alert("确认访客已到访?", () => { this.commonSer.alert("确认访客已到访?", () => {
this.serveSer.confirmVisit(item.id).subscribe( this.serveSer.confirmVisit(item.id).subscribe(
......
...@@ -75,11 +75,6 @@ export class DiscoverPage { ...@@ -75,11 +75,6 @@ export class DiscoverPage {
"indexChildren": '12' "indexChildren": '12'
}, },
{ {
"name": "身边典型",
"type": 6,
"indexChildren": '16'
},
{
"name": "机关动态", "name": "机关动态",
"type": 3, "type": 3,
"indexChildren": '13' "indexChildren": '13'
...@@ -150,58 +145,67 @@ export class DiscoverPage { ...@@ -150,58 +145,67 @@ export class DiscoverPage {
] ]
}, },
{ {
"name": "党风廉政", "type": 9, "indexParent": 4, "children": [ "name": "先进风采", "type": 25, "indexParent": 4, "children": [
{
"name": "先进风采",
"type": 25,
"indexChildren": '41'
},
]
},
{
"name": "党风廉政", "type": 9, "indexParent": 5, "children": [
{ {
"name": "廉政格言", "name": "廉政格言",
"type": 9, "type": 9,
"indexChildren": '41' "indexChildren": '51'
}, },
{ {
"name": "纪检提示", "name": "纪检提示",
"type": 10, "type": 10,
"indexChildren": '42' "indexChildren": '52'
}, },
{ {
"name": "警示教育", "name": "警示教育",
"type": 12, "type": 12,
"indexChildren": '43' "indexChildren": '53'
} }
] ]
}, },
{ {
"name": "互动交流", "type": 21, "indexParent": 5, "children": [ "name": "互动交流", "type": 21, "indexParent": 6, "children": [
{ {
"name": "学思践悟", "name": "学思践悟",
"type": 21, "type": 21,
"indexChildren": '51' "indexChildren": '61'
}, },
{ {
"name": "话题讨论", "name": "话题讨论",
"type": 22, "type": 22,
"indexChildren": '52' "indexChildren": '62'
}, },
{ {
"name": "你问我答", "name": "你问我答",
"type": 24, "type": 24,
"indexChildren": '55' "indexChildren": '63'
}] }]
}, },
{ {
"name": "知识拓展", "type": 16, "indexParent": 6, "children": [ "name": "知识拓展", "type": 16, "indexParent": 7, "children": [
{ {
"name": "视频资料", "name": "视频资料",
"type": 16, "type": 16,
"indexChildren": '61' "indexChildren": '71'
}, },
{ {
"name": "他山之石", "name": "他山之石",
"type": 18, "type": 18,
"indexChildren": '63' "indexChildren": '73'
}, },
{ {
"name": "综合知识", "name": "综合知识",
"type": 19, "type": 19,
"indexChildren": '64' "indexChildren": '74'
}, },
] ]
} }
......
<ion-header>
<ion-navbar>
<ion-title>test</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { TestPage } from './test';
@NgModule({
declarations: [
TestPage,
],
imports: [
IonicPageModule.forChild(TestPage),
],
})
export class TestPageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the TestPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-test',
templateUrl: 'test.html',
})
export class TestPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad TestPage');
}
}
...@@ -21,7 +21,11 @@ ...@@ -21,7 +21,11 @@
<span>系统建议</span> <span>系统建议</span>
<ion-icon float-right name="ios-arrow-forward" ></ion-icon> <ion-icon float-right name="ios-arrow-forward" ></ion-icon>
</ion-item> </ion-item>
<ion-item class="margin-top-20"> <ion-item class="margin-top-20" (click)="clearSotrage()">
<span>清除缓存</span>
<span float-right name="ios-arrow-forward" ></span>
</ion-item>
<ion-item>
<span>当前版本</span> <span>当前版本</span>
<span float-right (click)="update()"><span *ngIf="!isLatest" class="red-span"></span>{{version}}</span> <span float-right (click)="update()"><span *ngIf="!isLatest" class="red-span"></span>{{version}}</span>
</ion-item> </ion-item>
......
...@@ -8,6 +8,7 @@ import {LoginPage} from "../login/login"; ...@@ -8,6 +8,7 @@ import {LoginPage} from "../login/login";
import {App} from "ionic-angular"; import {App} from "ionic-angular";
import {ProposalPage} from "../mine-pages/proposal/proposal"; import {ProposalPage} from "../mine-pages/proposal/proposal";
import {TabsService} from "../tabs/tabs.service"; import {TabsService} from "../tabs/tabs.service";
import {CommonService} from "../../provide/common.service";
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -27,6 +28,7 @@ export class VersionPage { ...@@ -27,6 +28,7 @@ export class VersionPage {
private appUpdateService: AppUpdateService, private appUpdateService: AppUpdateService,
private appVersion: AppVersion, private appVersion: AppVersion,
private storage: Storage, private storage: Storage,
private commonSer: CommonService,
private app: App, private tabSer: TabsService, private app: App, private tabSer: TabsService,
private alertCtrl: AlertController) { private alertCtrl: AlertController) {
...@@ -120,6 +122,11 @@ export class VersionPage { ...@@ -120,6 +122,11 @@ export class VersionPage {
} }
} }
//清除缓存
clearSotrage() {
window.location.reload(true);
this.commonSer.toast('缓存清除成功');
}
//后台退出 //后台退出
logoutApp() { logoutApp() {
......
...@@ -52,8 +52,8 @@ export class BackButtonService { ...@@ -52,8 +52,8 @@ export class BackButtonService {
private showExit(): void { private showExit(): void {
//如果为true,退出 //如果为true,退出
if (this.backButtonPressed) { if (this.backButtonPressed) {
this.platform.exitApp();
this.tabSer.logout(); this.tabSer.logout();
this.platform.exitApp();
} else { } else {
//第一次按,弹出Toast //第一次按,弹出Toast
this.toastCtrl.create({ this.toastCtrl.create({
......
export class TimeFormatService { constructor() { } ionTimeFormat(e) { const month = e.month > 9 ? e.month : '0' + e.month; const day = e.day > 9 ? e.day : '0' + e.day; const minute = e.minute > 9 ? e.minute : '0' + e.minute; const hour = e.hour > 9 ? e.hour : '0' + e.hour; const time = e.year + '-' + e.month + '-' + e.day + " " + hour + ":" + minute + ":00"; return time; }}
\ 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