|
@@ -3,6 +3,7 @@ let xBlufi = require("../../utils/blufi/xBlufi.js");
|
|
|
import strings from '../../utils/strings.js';
|
|
|
import lexin_devices from '../../utils/lexin/devices';
|
|
|
import junzheng_util from '../../utils/junzheng/util';
|
|
|
+import route_util from '../../utils/route_util.js';
|
|
|
Page({
|
|
|
|
|
|
data: {
|
|
@@ -80,7 +81,7 @@ Page({
|
|
|
// {"type":"1","result":true,"data":[{"deviceId":"57:F6:7D:62:D6:C0","name":"","RSSI":-97,"connectable":true,"advertisData":"4c0010072a1fbee24315680100100000000000000000000000000000","advertisServiceUUIDs":[],"localName":"","serviceData":{}}]}
|
|
|
// {"type":"1","result":true,"data":[{"deviceId":"57:F6:7D:62:D6:C0","name":"","RSSI":-97,"connectable":true,"advertisData":"4c0010072a1fbee24315680100100000000000000000000000000000","advertisServiceUUIDs":[],"localName":"","serviceData":{}},{"deviceId":"42:E0:22:C2:6E:25","name":"","RSSI":-92,"connectable":true,"advertisData":"4c001007221fa8d7a84ba8","advertisServiceUUIDs":[],"localName":"","serviceData":{}}]}
|
|
|
funListenDeviceMsgEvent: function (options) {
|
|
|
- const that = this;
|
|
|
+ var that = this;
|
|
|
switch (options.type) {
|
|
|
//发现设备列表回调开始
|
|
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
|
@@ -136,6 +137,7 @@ Page({
|
|
|
});
|
|
|
|
|
|
setTimeout(() => {
|
|
|
+ var name = that.data.devicesList[0].name;
|
|
|
that.setData({
|
|
|
isSubmit: false,
|
|
|
islanya: false,
|
|
@@ -143,18 +145,16 @@ Page({
|
|
|
isOnBluetooth: false,
|
|
|
});
|
|
|
var param = JSON.stringify(that.data.connectDevice);
|
|
|
- var name = devicesList[0].name;
|
|
|
var isLexin = name.indexOf(lexin_devices.leXin) !== -1;
|
|
|
if (isLexin) {
|
|
|
wx.navigateTo({
|
|
|
url: '../deviceConnect3/deviceConnect3?deviceId=' + options.data.deviceId + '&name=' + options.data.name + "¶m=" + param,
|
|
|
});
|
|
|
} else {
|
|
|
- wx.navigateTo({
|
|
|
- url: '../deviceConnect4/deviceConnect4?deviceId=' + options.data.deviceId + '&name=' + options.data.name + "¶m=" + param,
|
|
|
- });
|
|
|
+ var url = "../deviceConnect4/deviceConnect4";
|
|
|
+ var param = "?deviceId=" + options.data.deviceId + '&name=' + options.data.name + "¶m=" + param;
|
|
|
+ route_util.jumpParams(url, param);
|
|
|
}
|
|
|
-
|
|
|
}, 200);
|
|
|
} else {
|
|
|
wx.showModal({
|