From 9579db49ed24da51339056c0fd3c58fceed959a7 Mon Sep 17 00:00:00 2001 From: qiaowei Date: Tue, 14 Apr 2020 13:08:35 +0800 Subject: [PATCH] =?utf8?q?=E5=85=AC=E5=AE=89app=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- config.xml | 4 +- platforms/android/app/build.gradle | 2 +- .../android/app/src/main/AndroidManifest.xml | 2 +- .../app/src/main/assets/www/css/index.css | 6 + .../app/src/main/assets/www/index.html | 10 +- .../app/src/main/assets/www/js/index.js | 28 +- .../app/src/main/assets/www/login.html | 2 +- .../android/app/src/main/assets/www/main.html | 215 +++------ .../app/MainActivity.java | 2 +- .../app/src/main/res/drawable-hdpi/icon.png | Bin 5769 -> 8894 bytes .../app/src/main/res/drawable-ldpi/icon.png | Bin 1979 -> 2858 bytes .../app/src/main/res/drawable-mdpi/icon.png | Bin 3098 -> 4513 bytes .../app/src/main/res/drawable-xhdpi/icon.png | Bin 9210 -> 14665 bytes .../app/src/main/res/drawable-xxhdpi/icon.png | Bin 18087 -> 30230 bytes .../src/main/res/drawable-xxxhdpi/icon.png | Bin 29131 -> 51005 bytes .../ic_launcher_foreground.png | Bin 5769 -> 8894 bytes .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 5769 -> 8894 bytes .../ic_launcher_foreground.png | Bin 1979 -> 2858 bytes .../src/main/res/mipmap-ldpi/ic_launcher.png | Bin 1979 -> 2858 bytes .../ic_launcher_foreground.png | Bin 3098 -> 4513 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 3098 -> 4513 bytes .../ic_launcher_foreground.png | Bin 9210 -> 14665 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 9210 -> 14665 bytes .../ic_launcher_foreground.png | Bin 18087 -> 30230 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 18087 -> 30230 bytes .../ic_launcher_foreground.png | Bin 29131 -> 51005 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 29131 -> 51005 bytes .../app/src/main/res/values/strings.xml | 2 +- .../android/app/src/main/res/xml/config.xml | 4 +- platforms/browser/config.xml | 4 +- www/css/aui-slide.css | 113 +++++ www/css/index.css | 6 + www/img/s1.jpg | Bin 0 -> 822340 bytes www/img/s2.jpg | Bin 0 -> 779213 bytes www/img/s3.jpg | Bin 0 -> 559210 bytes www/img/splashscreen.png | Bin 0 -> 179398 bytes www/index.html | 10 +- www/js/index.js | 28 +- www/js/mainmenu.js | 445 ++++++++++++++++++ www/js/startload.js | 20 + www/login.html | 2 +- www/main.html | 215 +++------ www/main2.html | 270 +++++++++++ www/more.html | 34 ++ www/startload.html | 65 +++ 45 files changed, 1125 insertions(+), 364 deletions(-) rename platforms/android/app/src/main/java/com/{dalicitycard => dalipolice}/app/MainActivity.java (97%) create mode 100644 www/css/aui-slide.css create mode 100644 www/img/s1.jpg create mode 100644 www/img/s2.jpg create mode 100644 www/img/s3.jpg create mode 100644 www/img/splashscreen.png create mode 100644 www/js/mainmenu.js create mode 100644 www/js/startload.js create mode 100644 www/main2.html create mode 100644 www/more.html create mode 100644 www/startload.html diff --git a/config.xml b/config.xml index 6283731..0c356ca 100644 --- a/config.xml +++ b/config.xml @@ -1,6 +1,6 @@ - - dlapp + + dlapp A sample Apache Cordova application that responds to the deviceready event. diff --git a/platforms/android/app/build.gradle b/platforms/android/app/build.gradle index b59ebb2..9a325ca 100644 --- a/platforms/android/app/build.gradle +++ b/platforms/android/app/build.gradle @@ -166,7 +166,7 @@ task cdvPrintProps { android { defaultConfig { - applicationId 'com.dalicitycard.app' + applicationId 'com.dalipolice.app' if (cdvMinSdkVersion != null) { minSdkVersion cdvMinSdkVersion } diff --git a/platforms/android/app/src/main/AndroidManifest.xml b/platforms/android/app/src/main/AndroidManifest.xml index 3238e12..4eb48c9 100644 --- a/platforms/android/app/src/main/AndroidManifest.xml +++ b/platforms/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/platforms/android/app/src/main/assets/www/css/index.css b/platforms/android/app/src/main/assets/www/css/index.css index b23e33c..fb20796 100644 --- a/platforms/android/app/src/main/assets/www/css/index.css +++ b/platforms/android/app/src/main/assets/www/css/index.css @@ -38,6 +38,12 @@ body { position: absolute; animation: myfirst 2s linear infinite alternate; } +.mainmeun-div{ + height: 100%; + flex-direction: row;justify-content: center; + align-items: center;display: flex!important; + font-size: 20px; +} @keyframes myfirst { 0% { diff --git a/platforms/android/app/src/main/assets/www/index.html b/platforms/android/app/src/main/assets/www/index.html index 576b5e9..005362a 100644 --- a/platforms/android/app/src/main/assets/www/index.html +++ b/platforms/android/app/src/main/assets/www/index.html @@ -1,6 +1,5 @@ - @@ -9,15 +8,10 @@ - 大理市民卡 + 大理公安在线 - + diff --git a/platforms/android/app/src/main/assets/www/js/index.js b/platforms/android/app/src/main/assets/www/js/index.js index db3d7ce..9e660c1 100644 --- a/platforms/android/app/src/main/assets/www/js/index.js +++ b/platforms/android/app/src/main/assets/www/js/index.js @@ -25,9 +25,16 @@ var app = { }, onDeviceReady: function() { + debugger; + var firstload = window.localStorage.getItem("firstload"); + if(isEmpty(firstload)){ + app.toPage("startload.html") + return; + } var uid = window.localStorage.getItem("token"); if (isEmpty(uid)) { - window.location = "login.html"; + //window.location = "login.html"; + toPage("login.html") } else { //尝试登陆 V1Infor(function(ok, ret) { @@ -37,23 +44,32 @@ var app = { if(!isEmpty(ret.token)){ window.localStorage.setItem("token",ret.token); } - window.location = "main.html"; + //window.location = "main.html"; + app.toPage("main.html") }else{ - window.location = "login.html"; + //window.location = "login.html"; + app.toPage("login.html") } } else { //alert('无法请求到服务器,请检查网络并稍后再试'); if (ret.status == 401) { //need login - window.location = "login.html"; + //window.location = "login.html"; + app.toPage("login.html") } else { //TODO ,没有网络 - - window.location = "main.html"; + app.toPage("main.html") + //window.location = "main.html"; } } }) } + }, + toPage:function(page){ + setTimeout(function() { + //window.location=page; + window.location=page; + },2000) } }; app.initialize(); \ No newline at end of file diff --git a/platforms/android/app/src/main/assets/www/login.html b/platforms/android/app/src/main/assets/www/login.html index 60827f3..bce7fd5 100644 --- a/platforms/android/app/src/main/assets/www/login.html +++ b/platforms/android/app/src/main/assets/www/login.html @@ -12,7 +12,7 @@