mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-31 08:10:21 +00:00
fix: iOS16.4之前版本无法进入的问题
This commit is contained in:
parent
a680538f80
commit
385abae741
@ -233,7 +233,7 @@ export default {
|
||||
windowSizeListener() {
|
||||
const windowWidth = $A(window).width(),
|
||||
windowHeight = $A(window).height(),
|
||||
windowOrientation = $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape'
|
||||
windowOrientation = $A.screenOrientation()
|
||||
|
||||
this.$store.state.windowTouch = "ontouchend" in document
|
||||
|
||||
|
||||
15
resources/assets/js/functions/common.js
vendored
15
resources/assets/js/functions/common.js
vendored
@ -547,6 +547,21 @@ const localforage = require("localforage");
|
||||
}, 250);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取屏幕方向
|
||||
* @returns {string}
|
||||
*/
|
||||
screenOrientation() {
|
||||
try {
|
||||
if (typeof window.screen.orientation === "object") {
|
||||
return $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape'
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
return $A(window).width() > $A(window).height() ? "landscape" : "portrait"
|
||||
},
|
||||
|
||||
/**
|
||||
* 是否IOS
|
||||
* @returns {boolean|string}
|
||||
|
||||
2
resources/assets/js/store/state.js
vendored
2
resources/assets/js/store/state.js
vendored
@ -1,6 +1,6 @@
|
||||
const windowWidth = $A(window).width(),
|
||||
windowHeight = $A(window).height(),
|
||||
windowOrientation = $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape'
|
||||
windowOrientation = $A.screenOrientation()
|
||||
|
||||
export default {
|
||||
// 客户端ID(希望不变的,除非清除浏览器缓存或者卸载应用)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user