Przeglądaj źródła

屏幕显示控制

shish 4 lat temu
rodzic
commit
35a5d78215

+ 5 - 0
hdPad/src/App.vue

@@ -7,6 +7,11 @@ export default {
 	globalData: {},
 	onLaunch() {
 
+		// #ifdef APP-PLUS
+		// 锁定屏幕方向 横屏正方向
+		plus.screen.lockOrientation('landscape');
+		// #endif
+
 		// 删除缓存
 		if (process.env.NODE_ENV == 'production') {
 			uni.removeStorageSync('shopUser')

+ 1 - 0
hdPad/src/manifest.json

@@ -20,6 +20,7 @@
             "autoclose" : true,
             "delay" : 0
         },
+        "orientation" : [ "landscape" ],
         "modules" : {
             "OAuth" : {},
             "Payment" : {},

+ 0 - 5
hdPad/src/mixins/globalMixins.js

@@ -28,11 +28,6 @@ export default {
 	},
 	onLoad: function (option) {
 
-    // #ifdef APP-PLUS
-    //横屏锁定
-    //plus.screen.lockOrientation('landscape')
-    // #endif
-
 		this.option = option || null
 		if (option.token) {
 			uni.setStorageSync('token', option.token)

+ 2 - 1
hdPad/src/pages.json

@@ -17,6 +17,7 @@
 		"app-plus":{"titleNView":false,"bounce":"none"},
 		"navigationStyle":"custom",
 		"rpxCalcMaxDeviceWidth": 2000,
-		"rpxCalcBaseDeviceWidth": 1440
+		"rpxCalcBaseDeviceWidth": 1440,
+		"pageOrientation":"landscape"
 	}
 }