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 = ''
         //下面这段代码来自网络
         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设备的deviceId:',  deviceId);
         plus.runtime.getProperty(plus.runtime.appid, (info) => {
            // console.log(info);
            this.$data.version = info.version;