From 1652caddff10990679dacd1822be6d1d5dc1bf65 Mon Sep 17 00:00:00 2001
From: cyy <cuiqian2004@163.com>
Date: 星期日, 16 六月 2024 18:43:07 +0800
Subject: [PATCH] 5600 action ext_data

---
 pages/login/index.vue |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/pages/login/index.vue b/pages/login/index.vue
index c4f8ba6..df5707a 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -600,6 +600,29 @@
 			}
 		},
 		onLoad() {
+			//鑾峰彇mac鍦板潃
+			var net = plus.android.importClass("java.net.NetworkInterface");
+			var wl0 = net.getByName('wlan0');
+			var macByte = wl0.getHardwareAddress();
+			var deviceId = ''  
+			//涓嬮潰杩欐浠g爜鏉ヨ嚜缃戠粶  
+			for (var i = 0; i < macByte.length; i++) {  
+			    var tmp = "";  
+			    var num = macByte[i];  
+			    if (num < 0) {        
+			      tmp =(255+num+1).toString(16);  
+			    } else {  
+			      tmp = num.toString(16);  
+			    }  
+			    if (tmp.length == 1) {  
+			      tmp = "0" + tmp;  
+			    }  
+			    deviceId += tmp;  
+			}  
+			//78b8d67511ca
+			this.$store.commit("setDeviceId", deviceId);
+			console.log('Android璁惧鐨刣eviceId:',  deviceId);
+			
 			plus.runtime.getProperty(plus.runtime.appid, (info) => {
 				// console.log(info);
 				this.$data.version = info.version;

--
Gitblit v1.9.1