diff --git a/App.vue b/App.vue index 8c7dd9b..2c6e748 100644 --- a/App.vue +++ b/App.vue @@ -94,6 +94,7 @@ onHide: function() { // console.log('App Hide') }, + } diff --git a/common/base.js b/common/base.js new file mode 100644 index 0000000..e69de29 diff --git a/main.js b/main.js index 6dfa9ba..4b2d064 100644 --- a/main.js +++ b/main.js @@ -3,6 +3,10 @@ import store from '@/store/store.js' import ios from '@/ios/index.js' // #ifndef VUE3 import Vue from 'vue' + +Vue.prototype.$onLaunched = new Promise(resolve => { + Vue.prototype.$isResolve = resolve +}) Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ diff --git a/manifest.json b/manifest.json index 126004a..1a19141 100644 --- a/manifest.json +++ b/manifest.json @@ -112,7 +112,7 @@ "xxhdpi" : "unpackage/res/icons/dope2.png" }, "useOriginalMsgbox" : false, - "iosStyle" : "common", + "iosStyle" : "default", "ios" : { "iphone" : { "retina47" : "unpackage/res/icons/dope2.png", diff --git a/pages/account/index.vue b/pages/account/index.vue index 41e0a80..df87d53 100644 --- a/pages/account/index.vue +++ b/pages/account/index.vue @@ -535,7 +535,7 @@ align-items: center; position: absolute; width: 100%; - top: 13.5%; + top: 15.5%; // left: 15%; // z-index: 1111; diff --git a/pages/index/index.vue b/pages/index/index.vue index d366f32..c929a33 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -157,21 +157,50 @@ }, 2000) }, onReady() { - + // 轮询判断 + // typee = 2 有网络 //判断是否有网络(尝试解决IOS白屏) - uni.getNetworkType({ - success: function (res) { - console.log(res.networkType);//网络类型 wifi、2g、3g、4g、ethernet、unknown、none - if(res.networkType === "none"){ - - this.typee = 1; - console.log("当前无网络",this.typee); - }else{ - this.typee = 2 - console.log("有网络",this.typee); - } - } - }); + let that = this; + let s = 0; + let time = setInterval(()=>{ + console.log('6666') + uni.getNetworkType({ + success:(res)=>{ + console.log(res.networkType,s); + if(res.networkType !== 'none'){ + that.typee = 2; + clearInterval(time); + console.log('清楚网络..') + } + } + }) + s++; + },1000); + /* uni.getNetworkType({ + success: function(res) { + console.log(res.networkType); + //网络类型 wifi、2g、3g、4g、ethernet、unknown、none + setTimeout(function() { + if (res.networkType === "none") { + that.typee = 1; + console.log("当前无网络", that.typee); + uni.showToast({ + title: '网络不佳,请重新打开........', + duration: 20000 + }); + + } else { + that.typee = 2 + console.log("有网络", that.typee); + uni.showToast({ + title: '网络不佳,请重新打开........', + duration: 2000 + }); + + } + }, 3000) + } + }); */ }, onLoad() { let home = 'HOME' @@ -1134,7 +1163,7 @@