diff --git a/page_user/upload.vue b/page_user/upload.vue
index aac7eb6..0422cae 100644
--- a/page_user/upload.vue
+++ b/page_user/upload.vue
@@ -4,7 +4,7 @@
-
+
{{user.deviceName == undefined ? '--' : user.deviceName}}
@@ -17,9 +17,9 @@
MAC
{{user.mac == undefined ? '--' : user.mac}}
-
+
息屏
- {{xptxt}}
+ {{xinpin == null ? '--' : xinpin + '秒'}}
@@ -40,7 +40,6 @@
-
@@ -82,6 +81,9 @@
切记在蓝牙范围内,以防升级失败
+
+
+
@@ -94,31 +96,14 @@
gjshow: false,
xptxt: '',
nameflag: false,
- xplist: [{
- value: '1',
- label: '30秒'
- },
- {
- value: '2',
- label: '一分钟'
- },
- {
- value: '2',
- label: '三分钟'
- },
- {
- value: '2',
- label: '五分钟'
- }
- ],
- gjlist: [{
- value: '1',
- label: 'v2.1.2'
- },
- {
- value: '2',
- label: 'v2.1.3'
- }],
+ params: {
+ year: false,
+ month: false,
+ day: false,
+ hour: false,
+ minute: true,
+ second: true
+ },
deviceid: '',
user: {},
namesb: '',
@@ -128,7 +113,9 @@
progress:0,
shengjiflag:false,
xctime:'--',
- version:''
+ version:'',
+ xinpin:'',
+ imgpic:''
}
},
// 分享到好友(会话)
@@ -149,7 +136,9 @@
onLoad(option) {
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
this.deviceid = option.deviceid
+ this.imgpic = option.img
if(option.xctime != '--'){
+ this.xinpin = option.xipin
if(option.xctime != '--' && option.ver){
this.ver = 'V' + option.ver.slice(3)
this.xctime = option.xctime
@@ -166,6 +155,24 @@
this.getshebxq()
},
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() {
let that = this
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 9f6ffdc..401605a 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -435,7 +435,8 @@
csbobj:{},
disconnectTimer: null,
devicetime:'',
- imgpic:''
+ imgpic:'',
+ xinp:''
}
},
// 分享到好友(会话)
@@ -906,7 +907,7 @@
btnsz() {
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent)
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.etchecked = this.showobj.showArray[0] !== 1;
-
// 计算浇水时间
const calculateTimeDifference = (date1, date2) => {
const diffMs = Math.abs(date1 - date2);
@@ -1272,7 +1272,8 @@
nextTimeDiff: this.xctime,
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]){
// 显式转为字符串
const yiStr = String(this.showobj.showArray[6])