|
@@ -53,11 +53,10 @@ const $iosGrantedTips = (cb) => {
|
|
|
var version = (verinfo + "").replace(/[^0-9|_.]/gi, "").replace(/_/gi, ".");
|
|
|
var arr = version.split(".");
|
|
|
console.log(arr);
|
|
|
-
|
|
|
if (arr[0] > 12 && arr[1] >= 0) {
|
|
|
- //对13.3以后的版本处理,包括13.3,
|
|
|
- DeviceMotionEvent &&
|
|
|
+ if (typeof DeviceMotionEvent !=='undefined' && typeof DeviceMotionEvent.requestPermission ==='function') {
|
|
|
DeviceMotionEvent.requestPermission().then((permissionState) => {
|
|
|
+ console.log("存在-permissionState", permissionState);
|
|
|
if (permissionState == "granted") {
|
|
|
cb({
|
|
|
msg: "授权成功",
|
|
@@ -71,6 +70,13 @@ const $iosGrantedTips = (cb) => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+ //13.3以前的版本
|
|
|
+ cb({
|
|
|
+ msg: "无需授权,直接成功",
|
|
|
+ code: 1,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
//13.3以前的版本
|
|
|
cb({
|