2 커밋 ada06e5fdf ... f7b7797fbf

작성자 SHA1 메시지 날짜
  wangxy f7b7797fbf Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学 2 주 전
  wangxy 2491cffb9c 修改安卓弹出权限异常 2 주 전
1개의 변경된 파일17개의 추가작업 그리고 29개의 파일을 삭제
  1. 17 29
      pages/login/index.vue

+ 17 - 29
pages/login/index.vue

@@ -124,8 +124,7 @@
 		console.log('物理分辨率宽:', info.windowWidth * info.pixelRatio) */
 		showAppleLogin.value = isIOS13OrAbove();
 		getLoginInit()
-		getUUid()
-		getUUid2()
+		getUUid()
 		if (plus.runtime.isApplicationExist({
 				pname: 'com.tencent.mm',
 				action: 'weixin://'
@@ -250,31 +249,20 @@
 		agreeContentDialogRef.value.handleShow();
 	};
 	const getUUid = (data) => {
-    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 getUUid2 = (data) => {
-    plus.device.getOAID({
-      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 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);
+        }
+      });
+    }
 	};
 
 	const handleAgreementChange = (event) => {
@@ -289,7 +277,7 @@
 		const systemInfo = uni.getSystemInfoSync();
 		if (indexData.isAgreed === true) {
 
-			if (!uuid.value) {
+      if (!uuid.value && systemInfo.platform == 'ios') {
 				toast("设备id丢失")
 				getUUid()
 				return false
@@ -392,7 +380,7 @@
 		// 		  provider: 'weixin',
 		// 		 	"onlyAuthorize": true, // 微信登录仅请求授权认证
 		// 		  success: function (loginRes) {
-		// 			  		console.log('loginRes',loginRes); 
+		// 			  		console.log('loginRes',loginRes);
 
 		// 		  }
 		// 	  });