|
@@ -23,7 +23,7 @@
|
|
</view>
|
|
</view>
|
|
<view
|
|
<view
|
|
class="rightItem"
|
|
class="rightItem"
|
|
- @click="gotoPath('/pagesA/devices/devices')"
|
|
|
|
|
|
+ @click="gotoDevice('/pagesA/devices/devices')"
|
|
>
|
|
>
|
|
<view class="rightTitle">我的家庭</view>
|
|
<view class="rightTitle">我的家庭</view>
|
|
<view class="rightContent"
|
|
<view class="rightContent"
|
|
@@ -33,7 +33,7 @@
|
|
</view>
|
|
</view>
|
|
<view
|
|
<view
|
|
class="rightItem"
|
|
class="rightItem"
|
|
- @click="gotoPath('/pagesA/devices/devices')"
|
|
|
|
|
|
+ @click="gotoDevice('/pagesA/devices/devices')"
|
|
>
|
|
>
|
|
<view class="rightTitle">全部设备</view>
|
|
<view class="rightTitle">全部设备</view>
|
|
<view class="rightContent"
|
|
<view class="rightContent"
|
|
@@ -65,7 +65,7 @@
|
|
<image src="../../static/smalLn.png" mode="" />
|
|
<image src="../../static/smalLn.png" mode="" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="card" @click="gotoPath('/pagesA/devices/devices')">
|
|
|
|
|
|
+ <view class="card" @click="gotoDevice('/pagesA/devices/devices')">
|
|
<view class="contentTitle">
|
|
<view class="contentTitle">
|
|
<text>我的家庭</text>
|
|
<text>我的家庭</text>
|
|
<image src="../../static/rightArrow.png" />
|
|
<image src="../../static/rightArrow.png" />
|
|
@@ -81,7 +81,7 @@
|
|
<image src="../../static/linkService.png" mode="" />
|
|
<image src="../../static/linkService.png" mode="" />
|
|
<button open-type="contact">联系客服</button>
|
|
<button open-type="contact">联系客服</button>
|
|
</view>
|
|
</view>
|
|
- <view class="bot_version"> v3.0.3 </view>
|
|
|
|
|
|
+ <view class="bot_version"> v3.0.4 </view>
|
|
|
|
|
|
<view class="shareInfo" @click="goDeviceShare()" v-if="shareNum > 0">
|
|
<view class="shareInfo" @click="goDeviceShare()" v-if="shareNum > 0">
|
|
<image src="../../static/ln_small.png" class="shareImage"></image>
|
|
<image src="../../static/ln_small.png" class="shareImage"></image>
|
|
@@ -107,6 +107,8 @@ export default {
|
|
devNum: 0,
|
|
devNum: 0,
|
|
warnNum: 0,
|
|
warnNum: 0,
|
|
imageUrl: "../../static/headerInfo.png",
|
|
imageUrl: "../../static/headerInfo.png",
|
|
|
|
+ devDevice: "",
|
|
|
|
+ warmDevice: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -127,6 +129,31 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ gotoDevice(url) {
|
|
|
|
+ if (uni.getStorageSync("userId")) {
|
|
|
|
+ if (this.devDevice.length == 1) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:
|
|
|
|
+ "/pagesA/deviceDetail/deviceDetail?devItem=" +
|
|
|
|
+ JSON.stringify(this.devDevice[0]),
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: url,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "暂未登录,请先登录",
|
|
|
|
+ icon: "none",
|
|
|
|
+ duration: 1500,
|
|
|
|
+ });
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: "/pagesA/loginNew/loginNew",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
goNo() {
|
|
goNo() {
|
|
if (uni.getStorageSync("userId")) {
|
|
if (uni.getStorageSync("userId")) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -157,6 +184,7 @@ export default {
|
|
this.groupNum = groupNum;
|
|
this.groupNum = groupNum;
|
|
this.devNum = devNum;
|
|
this.devNum = devNum;
|
|
this.warnNum = warnNum;
|
|
this.warnNum = warnNum;
|
|
|
|
+ this.devDevice = res.data.data.deviceList;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -170,7 +198,6 @@ export default {
|
|
state: 0,
|
|
state: 0,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- uni.hideLoading();
|
|
|
|
this.shareNum = res.data.data?.length || 0;
|
|
this.shareNum = res.data.data?.length || 0;
|
|
});
|
|
});
|
|
},
|
|
},
|