浇花器

This commit is contained in:
3321822538@qq.com 2025-04-26 17:47:36 +08:00
parent 8bd7b1fbcc
commit f45f0ac107
4 changed files with 28 additions and 10 deletions

View File

@ -21,7 +21,7 @@ const install = (Vue, vm) => {
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
baseUrl: 'https://yxd.ccttiot.com/prod-api', baseUrl: 'https://yxd.ccttiot.com/prod-api',
// baseUrl: 'http://192.168.0.101:8081', // baseUrl: 'http://192.168.0.100:8081',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type

View File

@ -25,6 +25,9 @@
<view class="devmac"> <view class="devmac">
MAC{{item.mac == undefined ? item.name.slice(-12) : item.mac}} MAC{{item.mac == undefined ? item.name.slice(-12) : item.mac}}
</view> </view>
<view class="devmac">
信号{{item.ssid == undefined ? '--' : item.ssid}}
</view>
</view> </view>
<view class="add" style="color: #ccc;border: 1px solid #ccc;" v-if="item.userId"> <view class="add" style="color: #ccc;border: 1px solid #ccc;" v-if="item.userId">
已添加 已添加
@ -166,7 +169,7 @@
pre: this.currentDevice.pre, pre: this.currentDevice.pre,
deviceName: this.customDeviceName deviceName: this.customDeviceName
} }
console.log(data,'参数');
this.$u.post(`/app/bandDevice`, data).then((res) => { this.$u.post(`/app/bandDevice`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
@ -179,6 +182,7 @@
uni.navigateBack() uni.navigateBack()
}, 2000) }, 2000)
} else { } else {
console.log(res,'报错');
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
@ -228,6 +232,7 @@
updatedDevicesList.forEach(val => { updatedDevicesList.forEach(val => {
const mac = val.name.slice(-12); const mac = val.name.slice(-12);
const pre = val.name.slice(0, 5); const pre = val.name.slice(0, 5);
const ssid = val.RSSI
const matched = that.getpipei(pre); const matched = that.getpipei(pre);
const userid = val.userId || null; const userid = val.userId || null;
that.jiaohuaqi.push({ that.jiaohuaqi.push({
@ -235,7 +240,8 @@
modelName: matched.modelName, modelName: matched.modelName,
modelPicture: matched.picture, modelPicture: matched.picture,
pre: pre, pre: pre,
userId: userid userId: userid,
ssid:ssid
}); });
console.log(that.jiaohuaqi, '2222'); console.log(that.jiaohuaqi, '2222');
}); });

View File

@ -23,11 +23,20 @@
<image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
</view> </view>
</view> </view>
<view class="wifi" style="margin-top: 24rpx;" @click="gjconfirm" > <view class="wifi" style="margin-top: 24rpx;display: block;" @click="gjconfirm" >
<view class="">固件更新</view> <view class="" style="display: flex;justify-content: space-between;align-items: center;">
<view class="flex" style="color: red;font-size: 20rpx;" v-if=" ver != null && ver != version"> <view class="">固件更新</view>
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image> --> <view class="flex" style="color: red;font-size: 20rpx;" v-if=" ver != null && ver != version">
<text style="display: inline-block;width: 10rpx;height: 10rpx;border-radius: 50%;background-color: red;margin-right: 10rpx;"></text>可更新 <text style="display: inline-block;width: 10rpx;height: 10rpx;border-radius: 50%;background-color: red;margin-right: 10rpx;"></text>可更新
</view>
</view>
<view class="" style="font-size: 24rpx;display: flex;justify-content: space-between;">
<view class="">
当前版本{{ver == null ? '请连接蓝牙获取当前版本' : ver}}
</view>
<view class="">
最新版本{{version == null ? '' : version}}
</view>
</view> </view>
</view> </view>
<!-- 息屏选择器 --> <!-- 息屏选择器 -->

View File

@ -44,7 +44,7 @@
<view class="" @click="btnxq(3)"> <view class="" @click="btnxq(3)">
关于我们 <image src="https://api.ccttiot.com/smartmeter/img/static/uKpBiM6T9kj4BddzJtDc" mode=""></image> 关于我们 <image src="https://api.ccttiot.com/smartmeter/img/static/uKpBiM6T9kj4BddzJtDc" mode=""></image>
</view> </view>
<view class="" style="border: 0;" @click="btnxq(4)"> <view class="" v-if="logoflag == false" style="border: 0;" @click="btnxq(4)">
退出登录 <image src="https://api.ccttiot.com/smartmeter/img/static/uKpBiM6T9kj4BddzJtDc" mode=""></image> 退出登录 <image src="https://api.ccttiot.com/smartmeter/img/static/uKpBiM6T9kj4BddzJtDc" mode=""></image>
</view> </view>
</view> </view>
@ -62,7 +62,8 @@
userobj:{}, userobj:{},
imageSrc:'', imageSrc:'',
token:'', token:'',
picdomain:'' picdomain:'',
logoflag:true
} }
}, },
// //
@ -95,7 +96,9 @@
if (res.code == 200) { if (res.code == 200) {
this.userobj = res.data this.userobj = res.data
this.imageSrc = res.data.avatar this.imageSrc = res.data.avatar
this.logoflag = false
}else if(res.code == 401){ }else if(res.code == 401){
this.logoflag = true
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '您还未登录,是否前去登录?', content: '您还未登录,是否前去登录?',