|
@@ -1,8 +1,9 @@
|
|
|
// pages/deviceConnect3/deviceConnect3.ts
|
|
|
const app = getApp();
|
|
|
let xBlufi = require("../../utils/blufi/xBlufi.js");
|
|
|
-import route_constant from '../../utils/route_constant.js'
|
|
|
+import strings from '../../utils/strings.js';
|
|
|
import route_util from '../../utils/route_util.js';
|
|
|
+import route_constant from '../../utils/route_constant.js'
|
|
|
let percentIn = null;
|
|
|
let errTi = null;
|
|
|
|
|
@@ -24,10 +25,19 @@ Page({
|
|
|
customData: '',
|
|
|
percent: 0,
|
|
|
ruterStatus: 0, // 0 连接中 // 1 成功 // 2失败
|
|
|
+ imageUrl: "./../../img/g.png",
|
|
|
},
|
|
|
|
|
|
onLoad: function (options) {
|
|
|
var that = this;
|
|
|
+ var param = options.param;
|
|
|
+ if (!strings.isEmpty(param)) {
|
|
|
+ param = JSON.parse(param);
|
|
|
+ that.setData({
|
|
|
+ imageUrl: param.img,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
that.setData({
|
|
|
name: options.name,
|
|
|
connectedDeviceId: options.deviceId,
|
|
@@ -101,7 +111,8 @@ Page({
|
|
|
name: deviceId,
|
|
|
deviceId: deviceId,
|
|
|
mac: deviceId,
|
|
|
- imageUrl: "./../../img/min.png",
|
|
|
+ imageUrl: that.data.imageUrl,
|
|
|
+ // imageUrl: "./../../img/min.png",
|
|
|
}
|
|
|
getCurrentPages()[0].addWifiDevice(device);
|
|
|
// [{"deviceId":"BLUFI_7cdfa1fcbb24","name":"BLUFI_7cdfa1fcbb24","state":"online"}]
|