浇花器增睡眠命令
This commit is contained in:
parent
3a05a5631f
commit
50ee64fd4b
|
@ -4,7 +4,7 @@
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<!-- 背景 -->
|
<!-- 背景 -->
|
||||||
<view class="img">
|
<view class="img">
|
||||||
<image class="img" src="https://api.ccttiot.com/smartmeter/img/static/uVKucPVDjxjaCDCpFKvw" mode=""></image>
|
<image class="img" :src="imgpic" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="name" @click="btnxianshi">
|
<view class="name" @click="btnxianshi">
|
||||||
<view class="">{{user.deviceName == undefined ? '--' : user.deviceName}}</view>
|
<view class="">{{user.deviceName == undefined ? '--' : user.deviceName}}</view>
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
<text class="one" style="margin-right: 124rpx;">MAC</text>
|
<text class="one" style="margin-right: 124rpx;">MAC</text>
|
||||||
<text>{{user.mac == undefined ? '--' : user.mac}}</text>
|
<text>{{user.mac == undefined ? '--' : user.mac}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="wifi" style="margin-top: 78rpx;" @click="xpshow = true">
|
<view class="wifi" style="margin-top: 78rpx;" @click="btnxip">
|
||||||
<view class="">息屏</view>
|
<view class="">息屏</view>
|
||||||
<view class="flex">{{xptxt}}
|
<view class="flex">{{xinpin == null ? '--' : xinpin + '秒'}}
|
||||||
<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>
|
||||||
|
@ -40,7 +40,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 息屏选择器 -->
|
<!-- 息屏选择器 -->
|
||||||
<u-select v-model="xpshow" :list="xplist" @confirm="xpconfirm"></u-select>
|
|
||||||
<!-- 固件更新选择器 -->
|
<!-- 固件更新选择器 -->
|
||||||
<u-select v-model="gjshow" :list="gjlist" @confirm="gjconfirm"></u-select>
|
<u-select v-model="gjshow" :list="gjlist" @confirm="gjconfirm"></u-select>
|
||||||
<!-- 修改设备名称弹框 -->
|
<!-- 修改设备名称弹框 -->
|
||||||
|
@ -82,6 +81,9 @@
|
||||||
切记在蓝牙范围内,以防升级失败
|
切记在蓝牙范围内,以防升级失败
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-picker v-model="xpshow" mode="time" :default-time="00" :params="params" @confirm="confirm"></u-picker>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -94,31 +96,14 @@
|
||||||
gjshow: false,
|
gjshow: false,
|
||||||
xptxt: '',
|
xptxt: '',
|
||||||
nameflag: false,
|
nameflag: false,
|
||||||
xplist: [{
|
params: {
|
||||||
value: '1',
|
year: false,
|
||||||
label: '30秒'
|
month: false,
|
||||||
},
|
day: false,
|
||||||
{
|
hour: false,
|
||||||
value: '2',
|
minute: true,
|
||||||
label: '一分钟'
|
second: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: '三分钟'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: '五分钟'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
gjlist: [{
|
|
||||||
value: '1',
|
|
||||||
label: 'v2.1.2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: 'v2.1.3'
|
|
||||||
}],
|
|
||||||
deviceid: '',
|
deviceid: '',
|
||||||
user: {},
|
user: {},
|
||||||
namesb: '',
|
namesb: '',
|
||||||
|
@ -128,7 +113,9 @@
|
||||||
progress:0,
|
progress:0,
|
||||||
shengjiflag:false,
|
shengjiflag:false,
|
||||||
xctime:'--',
|
xctime:'--',
|
||||||
version:''
|
version:'',
|
||||||
|
xinpin:'',
|
||||||
|
imgpic:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 分享到好友(会话)
|
// 分享到好友(会话)
|
||||||
|
@ -149,7 +136,9 @@
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
this.deviceid = option.deviceid
|
this.deviceid = option.deviceid
|
||||||
|
this.imgpic = option.img
|
||||||
if(option.xctime != '--'){
|
if(option.xctime != '--'){
|
||||||
|
this.xinpin = option.xipin
|
||||||
if(option.xctime != '--' && option.ver){
|
if(option.xctime != '--' && option.ver){
|
||||||
this.ver = 'V' + option.ver.slice(3)
|
this.ver = 'V' + option.ver.slice(3)
|
||||||
this.xctime = option.xctime
|
this.xctime = option.xctime
|
||||||
|
@ -166,6 +155,24 @@
|
||||||
this.getshebxq()
|
this.getshebxq()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
btnxip(){
|
||||||
|
if(this.xinpin == '' || this.xinpin == null){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先连接蓝牙拿取息屏时间',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.xpshow = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 设置息屏时间
|
||||||
|
confirm(e) {
|
||||||
|
this.xinpin = Number(e.minute * 60) + Number(e.second)
|
||||||
|
xBlufi.notifySendCustomData({
|
||||||
|
customData: '11sleep' + this.xinpin + '@'
|
||||||
|
})
|
||||||
|
},
|
||||||
// 解绑设备按钮
|
// 解绑设备按钮
|
||||||
btnjiebang() {
|
btnjiebang() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
|
@ -435,7 +435,8 @@
|
||||||
csbobj:{},
|
csbobj:{},
|
||||||
disconnectTimer: null,
|
disconnectTimer: null,
|
||||||
devicetime:'',
|
devicetime:'',
|
||||||
imgpic:''
|
imgpic:'',
|
||||||
|
xinp:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 分享到好友(会话)
|
// 分享到好友(会话)
|
||||||
|
@ -906,7 +907,7 @@
|
||||||
btnsz() {
|
btnsz() {
|
||||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_user/upload?deviceid=' + this.shebid + '&ver=' + this.ver + '&xctime=' + this.xctime
|
url: '/page_user/upload?deviceid=' + this.shebid + '&ver=' + this.ver + '&xctime=' + this.xctime + '&xipin=' + this.xinp + '&img=' + this.imgpic
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择设备
|
// 选择设备
|
||||||
|
@ -1206,7 +1207,6 @@
|
||||||
// 设置开关状态
|
// 设置开关状态
|
||||||
this.yschecked = this.showobj.showArray[1] !== 1;
|
this.yschecked = this.showobj.showArray[1] !== 1;
|
||||||
this.etchecked = this.showobj.showArray[0] !== 1;
|
this.etchecked = this.showobj.showArray[0] !== 1;
|
||||||
|
|
||||||
// 计算浇水时间
|
// 计算浇水时间
|
||||||
const calculateTimeDifference = (date1, date2) => {
|
const calculateTimeDifference = (date1, date2) => {
|
||||||
const diffMs = Math.abs(date1 - date2);
|
const diffMs = Math.abs(date1 - date2);
|
||||||
|
@ -1272,7 +1272,8 @@
|
||||||
nextTimeDiff: this.xctime,
|
nextTimeDiff: this.xctime,
|
||||||
prevTime: this.sctimejs
|
prevTime: this.sctimejs
|
||||||
});
|
});
|
||||||
console.log(this.showobj.showArray,this.showobj.showArray[6],'02020202020');
|
this.xinp = this.showobj.showArray[this.showobj.showArray.length - 1]
|
||||||
|
console.log(this.showobj.showArray,this.showobj.showArray[6],this.showobj.showArray[this.showobj.showArray.length - 1],'02020202020');
|
||||||
if(this.showobj.showArray[6] && this.showobj.showArray[7]){
|
if(this.showobj.showArray[6] && this.showobj.showArray[7]){
|
||||||
// 显式转为字符串
|
// 显式转为字符串
|
||||||
const yiStr = String(this.showobj.showArray[6])
|
const yiStr = String(this.showobj.showArray[6])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user