|
@@ -103,7 +103,7 @@ Page({
|
|
|
}
|
|
|
});
|
|
|
// 登录
|
|
|
- this.homeLogin();
|
|
|
+ this.login();
|
|
|
},
|
|
|
|
|
|
onMeLoad() {
|
|
@@ -140,7 +140,7 @@ Page({
|
|
|
success() {
|
|
|
if (app.globalData.newDeviceId) {
|
|
|
// 获取设备本地数据
|
|
|
- _this.getHomeDeviceData();
|
|
|
+ _this.getDeviceData();
|
|
|
} else if (_this.data.deviceListIndex !== null) {
|
|
|
// 更新
|
|
|
_this.actionDevice(_this.data.deviceListIndex);
|
|
@@ -154,7 +154,8 @@ Page({
|
|
|
this.onLoad();
|
|
|
},
|
|
|
|
|
|
- homeLogin() {
|
|
|
+ ////开始是home的
|
|
|
+ login() {
|
|
|
wx.login({
|
|
|
success: res => {
|
|
|
let phone = undefined;
|
|
@@ -185,7 +186,7 @@ Page({
|
|
|
return;
|
|
|
};
|
|
|
// 获取设备本地数据
|
|
|
- this.getHomeDeviceData();
|
|
|
+ this.getDeviceData();
|
|
|
|
|
|
_this.setData({
|
|
|
showLogin: false,
|
|
@@ -202,7 +203,8 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- getHomeDeviceData() {
|
|
|
+ ///开始时home的
|
|
|
+ getDeviceData() {
|
|
|
// 获取设备数据
|
|
|
wx.getStorage({
|
|
|
key: 'devicelist',
|
|
@@ -250,6 +252,7 @@ Page({
|
|
|
|
|
|
// 回调
|
|
|
mqttCallback(type, option) {
|
|
|
+ console.log("gadsfadsfqwerq===" + type + "===" + option);
|
|
|
let payloads = null;
|
|
|
if (option) {
|
|
|
payloads = JSON.parse(option.payload);
|
|
@@ -417,6 +420,7 @@ Page({
|
|
|
if (this.data.deviceList.length === 0 || this.data.deviceListIndex === null) {
|
|
|
return
|
|
|
};
|
|
|
+
|
|
|
let topic = `/AIrSMArT_${this.data.deviceList[this.data.deviceListIndex].name.split("BLUFI_")[1]}/user/pub_response`;
|
|
|
app.subscribe(topic);
|
|
|
const obj = {
|
|
@@ -503,9 +507,8 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
goDeviceConnect() {
|
|
|
- routeUtil.jump(route_constant.deviceList)
|
|
|
-
|
|
|
- return;
|
|
|
+ // routeUtil.jump(route_constant.deviceList)
|
|
|
+ // return;
|
|
|
wx.navigateTo({
|
|
|
url: './../deviceConnect0/deviceConnect0',
|
|
|
});
|