diff --git a/page_fenbao/chongzhi.vue b/page_fenbao/chongzhi.vue
index 0042324..4ef8124 100644
--- a/page_fenbao/chongzhi.vue
+++ b/page_fenbao/chongzhi.vue
@@ -37,7 +37,10 @@
充值
-
+
+
+
+
@@ -93,7 +96,8 @@
bgc: {
background: '#8883F0'
},
- billNo: ''
+ billNo: '',
+ maskflag:true
}
},
onLoad(e) {
@@ -130,6 +134,7 @@
});
// 判断是否存在浇花器设备
if (this.devicesList.length == 0) {
+
uni.showToast({
title: '暂无发现对应设备,请靠近设备',
icon: 'none',
@@ -145,7 +150,7 @@
// uni.hideLoading()
}
this.status = true
- }, 2000)
+ }, 4000)
},
onShow: function() {
@@ -371,6 +376,7 @@
}
}
}else{
+ this.maskflag = false
uni.hideLoading()
uni.showToast({
title: '未连接到设备,请靠近设备尝试',
@@ -382,6 +388,7 @@
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
this.ver_data = this.parseCustomData(options.data)
+ this.maskflag = false
uni.hideLoading()
console.log("1收到设备发来的自定义数据结果:", this.ver_data);
break;
@@ -499,7 +506,18 @@
page {
background-color: #F7FAFE !important;
}
-
+
+ .masks{
+ width: 100%;
+ height: 100vh;
+ position: fixed;
+ top: 0;
+ left: 50%;
+ transform: translateX(-50%);
+ background-color: #ccc;
+ opacity: .6;
+ }
+
.card {
margin-top: 50rpx;
display: flex;
diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue
index 988d507..5b1297d 100644
--- a/page_user/sbdetail.vue
+++ b/page_user/sbdetail.vue
@@ -27,7 +27,7 @@
{{ deviceInfo.deviceName == null ? '' : deviceInfo.deviceName }}
-
+
更新时间:{{deviceInfo.lastPullTime}}
@@ -114,7 +114,7 @@
{{timeday}}
- sb:{{setMode}}
+
剩余分钟
@@ -128,7 +128,7 @@
其他
-
+
@@ -158,14 +158,14 @@
-
+
收费方式
-
+
@@ -259,27 +259,27 @@
this.id = id
this.getDevice(id)
- xBlufi.initXBlufi(1);
- xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
+ // xBlufi.initXBlufi(1);
+ // xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
+ // xBlufi.notifyStartDiscoverBle({
+ // 'isStart': true
+ // })
// 停止蓝牙搜索
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- });
+ // setTimeout(() => {
+ // xBlufi.notifyStartDiscoverBle({
+ // 'isStart': false
+ // });
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- })
- xBlufi.notifyInitBleEsp32({
- deviceId: this.deviceId
- });
- }, 2000)
+ // xBlufi.notifyConnectBle({
+ // isStart: true,
+ // deviceId: this.deviceId,
+ // name: this.name
+ // })
+ // xBlufi.notifyInitBleEsp32({
+ // deviceId: this.deviceId
+ // });
+ // }, 2000)
},
onShow() {
@@ -323,34 +323,29 @@
}
});
},
- btnpic() {
+ btnpic(e) {
let _this = this
let math = 'static/' + _this.$u.guid(20)
- uni.chooseImage({
- count: 1,
- type: 'all',
- success(res) {
- const tempFilePaths = res.tempFiles
- wx.uploadFile({
- url: 'https://up-z2.qiniup.com',
- name: 'file',
- filePath: tempFilePaths[0].path,
- formData: {
- token: _this.token, //后端返回的token
- key: 'smartmeter/img/' + math
- },
- success: function(res) {
- let str = JSON.parse(res.data)
- _this.userImgs = 'https://api.ccttiot.com/' + str.key
- _this.imglist = _this.userImgs
- let data = {
- deviceId: _this.id,
- customPicture: _this.imglist
- }
- _this.putdevice(data)
-
+ const tempFilePaths = e.detail.avatarUrl
+ wx.uploadFile({
+ url: 'https://up-z2.qiniup.com',
+ name: 'file',
+ filePath: tempFilePaths,
+ formData: {
+ token: _this.token,
+ key: 'smartmeter/img/' + math
+ },
+ success: function(res) {
+ let str = JSON.parse(res.data)
+ console.log(str.key)
+ _this.userImgs = 'https://api.ccttiot.com/' + str.key
+ _this.imglist = _this.userImgs
+ _this.imgflag = false
+ let data = {
+ deviceId:_this.id,
+ customPicture:_this.imglist
}
- });
+ _this.putdevice(data)
}
})
},
@@ -362,9 +357,9 @@
icon: 'success',
duration: 2000
})
- } else if (res.code == 500) {
+ } else {
uni.showToast({
- title: '设备不在线',
+ title: res.msg,
icon: 'none',
duration: 2000
})
@@ -393,7 +388,7 @@
let now = new Date();
let differenceInMs = expireDate - now;
if (differenceInMs <= 0) {
- this.timeday = null
+ this.timeday = 0
} else {
this.timeday = Math.abs(Math.floor(differenceInMs / (1000 * 60)));
}
diff --git a/page_user/setting.vue b/page_user/setting.vue
index cdece49..8eccf08 100644
--- a/page_user/setting.vue
+++ b/page_user/setting.vue
@@ -20,7 +20,7 @@
- {{remake}}
+ {{remake == null ? '' : remake}}
@@ -43,7 +43,7 @@
- {{listobj.deviceNo}}
+ {{listobj.deviceNo == null ? '' : listobj.deviceNo}}
@@ -53,7 +53,7 @@
- {{listobj.model}}
+ {{listobj.model == null ? '' : listobj.model}}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c0ea6f3..ab51bd8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -807,7 +807,6 @@
display: flex;
align-items: center;
justify-content: center;
-
border-left: 2rpx solid #D8D8D8;
font-weight: 500;
font-size: 36rpx;
@@ -855,7 +854,6 @@
height: 96rpx;
background: #8883F0;
border-radius: 16rpx;
-
font-weight: 500;
font-size: 36rpx;
color: #FFFFFF;
@@ -1312,7 +1310,7 @@
// align-items: center;
margin-top: 20rpx;
width: 658rpx;
- height: 282rpx;
+ height: 250rpx;
background: #fff;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
border-radius: 24rpx 24rpx 24rpx 24rpx;
@@ -1367,7 +1365,7 @@
image {
width: 180rpx;
- height: 200rpx;
+ height: 180rpx;
}
}
}