|
|
|
|
@ -1168,8 +1168,8 @@ import {
|
|
|
|
|
getLocalPositionRelativeToP4,
|
|
|
|
|
parseTime
|
|
|
|
|
} from '@/utils/tool'
|
|
|
|
|
import {ScreenOrientation} from '@capacitor/screen-orientation';
|
|
|
|
|
import { StatusBar, Style } from '@capacitor/status-bar';
|
|
|
|
|
// import {ScreenOrientation} from '@capacitor/screen-orientation';
|
|
|
|
|
// import { StatusBar, Style } from '@capacitor/status-bar';
|
|
|
|
|
const formUrl = 'http://192.168.1.123:5000/'
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
@ -2573,24 +2573,24 @@ onMounted(() => {
|
|
|
|
|
getObstacleList()
|
|
|
|
|
// testFun()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function lockLandscapeIfSmallWidth() {
|
|
|
|
|
const w = window.innerWidth;
|
|
|
|
|
|
|
|
|
|
if (w < 700) {
|
|
|
|
|
// 锁定横屏
|
|
|
|
|
ScreenOrientation.lock({orientation: 'landscape'});
|
|
|
|
|
StatusBar.hide();
|
|
|
|
|
} else {
|
|
|
|
|
// 允许自由旋转
|
|
|
|
|
ScreenOrientation.unlock();
|
|
|
|
|
StatusBar.show();
|
|
|
|
|
StatusBar.setStyle({ style: Style.Default });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化执行一次
|
|
|
|
|
lockLandscapeIfSmallWidth();
|
|
|
|
|
//
|
|
|
|
|
// function lockLandscapeIfSmallWidth() {
|
|
|
|
|
// const w = window.innerWidth;
|
|
|
|
|
//
|
|
|
|
|
// if (w < 700) {
|
|
|
|
|
// // 锁定横屏
|
|
|
|
|
// ScreenOrientation.lock({orientation: 'landscape'});
|
|
|
|
|
// StatusBar.hide();
|
|
|
|
|
// } else {
|
|
|
|
|
// // 允许自由旋转
|
|
|
|
|
// ScreenOrientation.unlock();
|
|
|
|
|
// StatusBar.show();
|
|
|
|
|
// StatusBar.setStyle({ style: Style.Default });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// // 初始化执行一次
|
|
|
|
|
// lockLandscapeIfSmallWidth();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|