diff --git a/App.vue b/App.vue index 15e70b16533ecae46e985fd793d9243d9375a381..3bcb9a36dad7b741552d8dc081bf3193f12d6de2 100644 --- a/App.vue +++ b/App.vue @@ -6,17 +6,8 @@ appVersion:{} }, onLaunch: function() { - //#ifdef APP-PLUS - // 保持屏幕常亮 - uni.setKeepScreenOn({ - keepScreenOn: true - }); - //#endif console.log('App Launch') - - initApp(); - - + // initApp(); }, onShow: function() { console.log('App Show') @@ -29,4 +20,14 @@ diff --git a/common/appInit.js b/common/appInit.js index 9a78c281ae5d1be95a8a1f9327b431ad2c60ebb7..3fbdda9f7d0da625914efb931476e2ee2f6653e9 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -6,8 +6,24 @@ export default function (){ // 检查更新 checkUpdate(); + + keepScreenOn(); } +/** + * 保持屏幕常亮 + */ +function keepScreenOn(){ + //#ifdef APP-PLUS + // 保持屏幕常亮 + uni.setKeepScreenOn({ + keepScreenOn: true + }); + //#endif +} +/** + * // 初始化appVersion + */ function initAppVersion(){ // #ifdef APP-NVUE let appid = plus.runtime.appid; diff --git a/pages/list/list.nvue b/pages/list/list.vue similarity index 62% rename from pages/list/list.nvue rename to pages/list/list.vue index 889e1e2b68205a838f8462eb06ba644def4427f6..089fc7db8a6e140aadd019d52e7b62f4a35abef6 100644 --- a/pages/list/list.nvue +++ b/pages/list/list.vue @@ -1,325 +1,287 @@ -