浇花器

This commit is contained in:
3321822538@qq.com 2025-01-10 17:14:17 +08:00
parent 0007cf28bd
commit da45ae50e3

View File

@ -267,7 +267,7 @@
<u-picker v-model="showjs" mode="time" :params="params" @confirm="confirm"></u-picker>
<tab-bar :indexs='0'></tab-bar>
</view>
</template>
@ -343,11 +343,23 @@
},
onShow() {
wx.openBluetoothAdapter({
success: function (res) {
console.log('蓝牙适配器初始化成功');
},
fail: function (err) {
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
uni.showToast({
title: '蓝牙适配器初始化失败,可能是因为没有权限',
icon: 'none',
duration:2000
})
}
})
//
this.getinfo()
//
this.getshuju()
},
methods: {
//
@ -401,7 +413,6 @@
this.getshebxq()
setTimeout(()=>{
uni.hideLoading()
if(this.datalist == ''){
let that = this
uni.showModal({
@ -924,6 +935,30 @@
}
})
},
//
getlianjie(){
if(this.datalist == ''){
let that = this
uni.showModal({
title: '提示',
content: '设备未连接,是否进行设备连接?',
success: function (res) {
if (res.confirm) {
uni.hideLoading()
that.btnlj()
} else if (res.cancel) {
uni.hideLoading()
uni.showToast({
title: '已取消连接',
icon: 'none',
duration:2000
})
}
}
})
}
},
//
getlist(){
this.$u.get(`/app/getDeviceInfoByUser?userId=${this.userobj.userId}`).then((res) => {
@ -934,26 +969,21 @@
this.mac = res.data[0].mac
this.user = res.data[0]
this.shebid = res.data[0].deviceId
if(this.datalist == ''){
let that = this
uni.showModal({
title: '提示',
content: '设备未连接,是否进行设备连接?',
success: function (res) {
if (res.confirm) {
uni.hideLoading()
that.btnlj()
} else if (res.cancel) {
uni.hideLoading()
uni.showToast({
title: '已取消连接',
icon: 'none',
duration:2000
})
}
}
let that = this
wx.openBluetoothAdapter({
success: function (res) {
console.log('蓝牙适配器初始化成功');
that.getlianjie()
},
fail: function (err) {
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
uni.showToast({
title: '蓝牙适配器初始化失败,可能是因为没有权限',
icon: 'none',
duration:2000
})
}
}
})
}else{
this.bjflag = true
}
@ -981,17 +1011,7 @@
if (!options.result) {
this.datalist = ''
this.ver_data = ''
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// //
// success: function(res) {
// uni.hideLoading()
// this.datalist = ''
// this.ver_data = ''
// }
// })
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS: