Skip to content

Commit 315d2ec

Browse files
committed
ionic remote
1 parent 0bbbf2b commit 315d2ec

File tree

18 files changed

+142
-34
lines changed

18 files changed

+142
-34
lines changed

config.1.xml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>test-ionic3</name>
4+
<description>An awesome Ionic/Cordova app.</description>
5+
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6+
<content src="index.html" />
7+
<access origin="*" />
8+
<allow-intent href="http://*/*" />
9+
<allow-intent href="https://*/*" />
10+
<allow-intent href="tel:*" />
11+
<allow-intent href="sms:*" />
12+
<allow-intent href="mailto:*" />
13+
<allow-intent href="geo:*" />
14+
<preference name="ScrollEnabled" value="false" />
15+
<preference name="android-minSdkVersion" value="16" />
16+
<preference name="BackupWebStorage" value="none" />
17+
<preference name="SplashMaintainAspectRatio" value="true" />
18+
<preference name="FadeSplashScreenDuration" value="300" />
19+
<preference name="SplashShowOnlyFirstTime" value="false" />
20+
<preference name="SplashScreen" value="screen" />
21+
<preference name="SplashScreenDelay" value="3000" />
22+
<preference name="AutoHideSplashScreen" value="false" />
23+
<preference name="ShowSplashScreen" value="true" />
24+
<preference name="ShowSplashScreenSpinner" value="false" />
25+
<preference name="FadeSplashScreen" value="true" />
26+
<platform name="android">
27+
<allow-intent href="market:*" />
28+
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
29+
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
30+
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
31+
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
32+
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
33+
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
34+
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
35+
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
36+
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
37+
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
38+
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
39+
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
40+
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
41+
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
42+
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
43+
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
44+
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
45+
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
46+
</platform>
47+
<platform name="ios">
48+
<allow-intent href="itms:*" />
49+
<allow-intent href="itms-apps:*" />
50+
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
51+
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
52+
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
53+
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
54+
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
55+
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
56+
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
57+
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
58+
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
59+
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
60+
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
61+
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
62+
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
63+
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
64+
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
65+
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
66+
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
67+
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
68+
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
69+
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
70+
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
71+
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
72+
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
73+
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
74+
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
75+
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
76+
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
77+
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
78+
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
79+
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
80+
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
81+
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
82+
</platform>
83+
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
84+
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
85+
<plugin name="cordova-plugin-device" spec="1.1.4" />
86+
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
87+
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
88+
<plugin name="cordova-sqlite-storage" spec="~2.2.0" />
89+
<engine name="android" spec="~6.1.2" />
90+
</widget>

config.xml

-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,5 @@
8585
<plugin name="cordova-plugin-device" spec="1.1.4" />
8686
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
8787
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
88-
<plugin name="cordova-plugin-fingerprint-aio" spec="~1.3.3" />
8988
<engine name="android" spec="~6.1.2" />
90-
<plugin name="cordova-sqlite-storage" spec="~2.2.0" />
9189
</widget>

src/app/app.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export class MyApp {
3131
});
3232

3333
this.initTranslate();
34-
this.storage.set(AppConfig.TOKEN, null);
3534

3635
admSysParam.retrieveSysParamList();
3736

src/app/app.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export class AppConfig {
88
static SYS_NAME = "FTX";
99
static SYS_USER = "TestUser";
1010
static TOKEN = "token";
11+
static WEB_URL = "";
12+
// static WEB_URL = "http://192.168.1.108:8100/";
1113
// static BASE_URL = 'http://localhost:2080/AppFrameworkServer/';
1214
static BASE_URL = 'http://192.168.1.108:2080/AppFrameworkServer/';
1315
// static URL = 'http://uat.ftecx.com:2080/AppFrameworkServer/';

src/app/app.module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ import { MyApp } from './app.component';
2020

2121
import { AdmUserProvider, AdmSysParamProvider } from '../providers/providers';
2222
import { PlatformProvider, Md5Provider, HttpProvider, PopupProvider } from '../providers/common/commonProviders';
23+
import { AppConfig } from './app.config';
2324

2425
// The translate loader needs to know where to load i18n files
2526
// in Ionic's static asset pipeline.
2627
export function createTranslateLoader(http: HttpClient) {
27-
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
28+
return new TranslateHttpLoader(http, AppConfig.WEB_URL+'./assets/i18n/', '.json');
2829
}
2930

3031
@NgModule({

src/app/app.scss

+7
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,10 @@ ion-title{
5454
color: #999;
5555
}
5656
}
57+
body.keyboard-is-open ion-tabbar {
58+
display: none;
59+
}
60+
61+
body.keyboard-is-open scroll-content {
62+
margin-bottom: 0 !important;
63+
}

src/app/main.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
22

33
import { AppModule } from './app.module';
4+
import { AppConfig } from './app.config';
5+
declare var __webpack_public_path__: string; // Make typescript compilation happy
6+
__webpack_public_path__ = AppConfig.WEB_URL + "build/";
47

58
platformBrowserDynamic().bootstrapModule(AppModule);

src/index.1.html src/index1.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="format-detection" content="telephone=no">
88
<meta name="msapplication-tap-highlight" content="no">
99

10-
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
10+
<link rel="icon" type="image/x-icon" href="http://192.168.1.108:8100/assets/icon/favicon.ico">
1111
<link rel="manifest" href="manifest.json">
1212
<meta name="theme-color" content="#4e8ef7">
1313

src/pages/about/about.html

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
<!--
2-
Generated template for the AboutPage page.
31

4-
See http://ionicframework.com/docs/components/#navigation for more info on
5-
Ionic pages and navigation.
6-
-->
72
<ion-header>
83

9-
<ion-navbar>
4+
<ion-navbar color='ftx-theme'>
105
<ion-title>about</ion-title>
116
</ion-navbar>
127

src/pages/about/about.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export class AboutPage {
2222
}
2323

2424
ionViewDidLoad() {
25-
26-
console.log(this.admSysParamProvider._sys_param);
25+
// console.log(this.admSysParamProvider._sys_param);
2726
}
2827

2928
}

src/pages/common/login/login.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export class LoginPage {
3333

3434
platform.registerBackButtonAction();
3535
}
36-
37-
// Attempt to login in through our User service
36+
3837
doLogin() {
3938
if (!this.ftxForm.valid) {
4039
if (!this.ftxForm.controls.mobile.valid || this.ftxForm.controls.mobile.errors) {
@@ -51,7 +50,7 @@ export class LoginPage {
5150

5251
this.admUserProvider.login(this.ftxForm.value).subscribe((data) => {
5352
if (data)
54-
this.navCtrl.push("TabsPage");
53+
this.navCtrl.pop();
5554
});
5655
}
5756
goSignUpPage() {

src/pages/common/tabs/tabs.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class TabsPage {
1717
marketRoot = 'MarketPage'
1818
personRoot = 'PersonPage'
1919

20+
tab_ind = true;
2021
@ViewChild('menuTabs') tabRef: Tabs;
2122

2223
constructor(public navCtrl: NavController,
@@ -31,7 +32,12 @@ export class TabsPage {
3132

3233
platform.registerBackButtonAction(this.tabRef);
3334

34-
this.modalCtrl.create(GesturePasswordPage).present();
35+
storage.get(AppConfig.SYS_USER).then((data) => {
36+
if (data) {
37+
this.modalCtrl.create(GesturePasswordPage).present();
38+
}
39+
})
40+
3541
}
3642

3743
}

src/pages/home/home.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
<!--
2-
Generated template for the HomePage page.
3-
4-
See http://ionicframework.com/docs/components/#navigation for more info on
5-
Ionic pages and navigation.
6-
-->
71
<ion-header>
82

9-
<ion-navbar>
3+
<ion-navbar color='ftx-theme'>
104
<ion-title>home</ion-title>
115
</ion-navbar>
126

src/pages/market/market.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<ion-header>
33

4-
<ion-navbar>
4+
<ion-navbar color='ftx-theme'>
55
<ion-title>market</ion-title>
66
</ion-navbar>
77

src/pages/person/person/person.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- header -->
22
<ion-header>
3-
<ion-navbar color='navbar'>
3+
<ion-navbar color='ftx-theme'>
44
<ion-buttons left>
55
<button ion-button icon-only (click)="goSettingPage()">
66
<ion-icon name="settings"></ion-icon>
@@ -25,7 +25,7 @@
2525
<ion-list class="profile-list">
2626
<ion-item (click)="personDetail(1)">
2727
<ion-thumbnail item-start>
28-
<img src="{{user.avatar_url || 'assets/imgs/icon.png'}}">
28+
<img src="{{user.avatar_url || web_url+'assets/imgs/icon.png'}}">
2929
</ion-thumbnail>
3030
<h2>
3131
<span ion-text [color]="user.is_vip?'danger':'dark'">{{user.nickname || '啬甩'}}</span>

src/pages/person/person/person.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { IonicPage, NavController, NavParams } from 'ionic-angular';
2+
import { IonicPage, NavController, NavParams, ModalController } from 'ionic-angular';
33
import { Storage } from '@ionic/storage';
44
import { AppConfig } from '../../../app/app.config';
55
import { AdmUserProvider } from '../../../providers/providers';
@@ -13,19 +13,21 @@ export class PersonPage {
1313
messageCount = 10;
1414
user = {};
1515

16+
web_url = AppConfig.WEB_URL;
1617
constructor(public navCtrl: NavController,
1718
public admUserProvider: AdmUserProvider,
1819
public storage: Storage,
20+
public modalCtrl: ModalController,
1921
public navParams: NavParams) {
2022
}
2123

2224
ionViewDidLoad() {
25+
2326
this.storage.get(AppConfig.SYS_USER).then((data) => {
24-
this.user = data;
27+
if(!data){
28+
this.modalCtrl.create('LoginPage').present();
29+
}
2530
})
26-
27-
console.log(this.user);
28-
2931
}
3032
doRefresh(refresher) {
3133

src/providers/adm/adm-user/adm-user.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class AdmUserProvider {
2020
if (data) {
2121
this._admUser = data.entity;
2222
this.storage.set(AppConfig.SYS_USER, data.entity);
23+
return true;
2324
}
2425
return false;
2526
});

src/providers/common/platform/platform.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@angular/core';
2-
import { Platform, Tabs, App, NavController } from 'ionic-angular';
2+
import { Platform, Tabs, App, NavController, Keyboard } from 'ionic-angular';
33
import { PopupProvider } from "../popup/popup";
44
@Injectable()
55
export class PlatformProvider {
@@ -9,15 +9,27 @@ export class PlatformProvider {
99

1010
constructor(private platform: Platform,
1111
public appCtrl: App,
12+
public keyboard: Keyboard,
1213
private popup: PopupProvider) {
1314
}
1415

16+
aaa() {
17+
18+
this.platform.ready().then(() => {
19+
if (this.keyboard.isOpen()) {
20+
document.body.classList.add('keyboard-is-open');
21+
} else {
22+
document.body.classList.remove('keyboard-is-open');
23+
}
24+
25+
});
26+
}
1527
registerBackButtonAction(tabRef?: Tabs) {
1628
this.platform.ready().then((result) => {
1729
this.registerBackButton(tabRef);
1830
})
1931
}
20-
32+
2133
registerBackButton(tabRef: Tabs): void {
2234

2335
//registerBackButtonAction是系统自带的方法

0 commit comments

Comments
 (0)