diff --git a/App.vue b/App.vue index 0c69871..bea28b2 100644 --- a/App.vue +++ b/App.vue @@ -17,6 +17,16 @@ onLaunch: function() { }, onShow: function() { + uni.getNetworkType({ + success:(res)=> { + if(res.networkType==='none') { + uni.redirectTo({ + url: '/pages/networko/index' + }) + + } + } + }) uni.onNetworkStatusChange(this.networkStatusChange); }, onHide: function() { diff --git a/manifest.json b/manifest.json index 6d0de8d..1c4335a 100644 --- a/manifest.json +++ b/manifest.json @@ -122,13 +122,13 @@ }, "splashscreen" : { "useOriginalMsgbox" : true, - "androidStyle" : "default", + "androidStyle" : "common", "android" : { "hdpi" : "static/image/sy.png", "xhdpi" : "static/image/sy.png", "xxhdpi" : "static/image/sy.png" }, - "iosStyle" : "storyboard", + "iosStyle" : "common", "ios" : { "storyboard" : "files/CustomStoryboard.zip" } diff --git a/pages.json b/pages.json index 0f688a0..5bd6e4f 100644 --- a/pages.json +++ b/pages.json @@ -1,21 +1,20 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "uni-app", - "navigationStyle": "custom" - } - }, { - "path" : "pages/networko/index", - "style" : + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" + } + }, { - "navigationBarTitleText": "uni-app", - "navigationStyle": "custom" + "path" : "pages/networko/index", + "style" : + { + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" + } } - } ], "globalStyle": { diff --git a/pages/index/index.vue b/pages/index/index.vue index fecedb1..5466a1b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,9 +1,10 @@