Explorar o código

修改安卓弹出权限异常

wangxy hai 1 semana
pai
achega
4ff143d4c8
Modificáronse 1 ficheiros con 12 adicións e 15 borrados
  1. 12 15
      pages/login/index.vue

+ 12 - 15
pages/login/index.vue

@@ -249,20 +249,17 @@
 		agreeContentDialogRef.value.handleShow();
 		agreeContentDialogRef.value.handleShow();
 	};
 	};
 	const getUUid = (data) => {
 	const getUUid = (data) => {
-    const systemInfo = uni.getSystemInfoSync();
-    if (systemInfo.platform == 'ios') {
-      plus.device.getInfo({
-        success: (res) => {
-          // res.uuid 是设备的 UUID(iOS 下为 identifierForVendor)
-          console.log('res', res);
-          uuid.value = res.uuid;
-          console.log('iOS 设备 UUID:', uuid.value);
-        },
-        fail: (err) => {
-          console.error('获取设备信息失败:', err);
-        }
-      });
-    }
+    plus.device.getInfo({
+      success: (res) => {
+        // res.uuid 是设备的 UUID(iOS 下为 identifierForVendor)
+        console.log('res', res);
+        uuid.value = res.uuid;
+        console.log('iOS 设备 UUID:', uuid.value);
+      },
+      fail: (err) => {
+        console.error('获取设备信息失败:', err);
+      }
+    });
 	};
 	};
 
 
 	const handleAgreementChange = (event) => {
 	const handleAgreementChange = (event) => {
@@ -277,7 +274,7 @@
 		const systemInfo = uni.getSystemInfoSync();
 		const systemInfo = uni.getSystemInfoSync();
 		if (indexData.isAgreed === true) {
 		if (indexData.isAgreed === true) {
 
 
-			if (!uuid.value && systemInfo.platform == 'ios') {
+			if (!uuid.value) {
 				toast("设备id丢失")
 				toast("设备id丢失")
 				getUUid()
 				getUUid()
 				return false
 				return false