Browse Source

feat: 处理设备是否支持5g信号处理

332777428@qq.com 1 tháng trước cách đây
mục cha
commit
a4a1728f7c

+ 0 - 1
pages/pageA/deviceList/deviceList.js

@@ -77,7 +77,6 @@ Page({
         title: '暂不支持该设备',
       })
     }
-
   },
 
 })

+ 17 - 1
pages/pageB/deviceConnect1/deviceConnect1.js

@@ -13,12 +13,29 @@ Page({
     ssid: "",
     pwdData: "",
     connectDevice: "",
+    is5gDevice: false,
   },
 
   onLoad(options) {
     var that = this;
     var param = options.param;
     that.data.connectDevice = param;
+
+    var device = JSON.parse(param);
+    var typeList = device.typeList;
+    if (!constant.strings.isEmpty(typeList)) {
+      var targetList = typeList.filter((v) => v.connectType == 3);
+      if (!constant.strings.isEmpty(targetList)) {
+        /// 字段,含义为是否支持5G:1-是 0-否;
+        var is5g = targetList[0].is5g;
+        if (is5g == 1) {
+          that.setData({
+            is5gDevice: true,
+          });
+        }
+      }
+    }
+
     const res = wx.getSystemInfoSync(); // 获取系统信息
     /// android ios
     const platform = res.platform; // 获取平台类型
@@ -137,7 +154,6 @@ Page({
 
     constant.app.globalData.ssid = that.data.ssid;
     constant.app.globalData.pwdData = that.data.pwdData;
-    console.log("gadsfadfqwer==aaa=" + constant.app.globalData.pwdData);
 
     var param = "?param=" + that.data.connectDevice;
     constant.routeUtil.jumpParam(constant.routePath.deviceConnect2, param);