开关完善
This commit is contained in:
parent
b6e0d261cf
commit
9b88341f2d
|
@ -19,8 +19,8 @@ const install = (Vue, vm) => {
|
|||
// },
|
||||
// });
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
// baseUrl: 'http://192.168.2.15:10002',
|
||||
baseUrl: 'https://kg.chuangtewl.com/prod-api',
|
||||
baseUrl: 'http://192.168.2.15:10002',
|
||||
// baseUrl: 'https://kg.chuangtewl.com/prod-api',
|
||||
// loadingText: '加载中...',
|
||||
// loadingTime: 1000,
|
||||
// 设置自定义头部content-type
|
||||
|
|
|
@ -1267,14 +1267,9 @@
|
|||
if (timeDifference.minutes !== undefined) {
|
||||
result += `${timeDifference.minutes + 1}分`
|
||||
}
|
||||
// if (timeDifference.seconds !== undefined) {
|
||||
// result += `${timeDifference.seconds}秒`
|
||||
// }
|
||||
return result;
|
||||
return result
|
||||
},
|
||||
|
||||
|
||||
|
||||
startTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.timeday.seconds > 0) {
|
||||
|
@ -1339,9 +1334,9 @@
|
|||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
opendevices() {
|
||||
|
||||
|
@ -1366,36 +1361,30 @@
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
let devicesarr = options.data
|
||||
console.log(devicesarr, this.mac, '111');
|
||||
// console.log(devicesarr, this.mac, '111')
|
||||
devicesarr.forEach(device => {
|
||||
const mac = device.name.substring(4);
|
||||
const mac = device.name.substring(4)
|
||||
if (device.name.slice(5, 17) == this.qrResult) {
|
||||
this.deviceId = device.deviceId
|
||||
this.name = device.name
|
||||
// console.log(device.name,this.mac,'222');
|
||||
this.devicesList.push(device);
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
this.devicesList.push(device)
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList))
|
||||
// 将去重后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = uniqueDevicesList;
|
||||
} else {
|
||||
// uni.showToast({
|
||||
// title: '未找到该设备,请确认该设备在附近',
|
||||
// icon: 'none',
|
||||
// duration: 3000
|
||||
// })
|
||||
}
|
||||
this.devicesList = uniqueDevicesList
|
||||
}
|
||||
})
|
||||
}
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
|
||||
console.log("连接回调:" + JSON.stringify(options));
|
||||
console.log("连接回调:" + JSON.stringify(options))
|
||||
if (options.result) {
|
||||
// console.log('125451245')
|
||||
{
|
||||
xBlufi.notifyInitBleEsp32({
|
||||
deviceId: this.deviceId
|
||||
})
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvents);
|
||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvents)
|
||||
this.deviceIds = options.data.deviceId
|
||||
this.name = this.name
|
||||
}
|
||||
|
@ -1418,10 +1407,9 @@
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||
if (options.result) {
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) ===
|
||||
"CTKG");
|
||||
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) === "CTKG");
|
||||
// 将过滤后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = filteredDevices;
|
||||
this.devicesList = filteredDevices
|
||||
}
|
||||
break
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
// 点击我已知晓
|
||||
btnswindleflag(){
|
||||
this.swindleflag = false
|
||||
if(this.userId == this.deviceobj.userId && this.deviceobj.suitList == null || this.deviceobj.suitList.length == 0){
|
||||
if(this.userId == this.deviceobj.userId && this.deviceobj.suitList.length == 0){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '该设备暂无套餐,是否前去配置?',
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
</view>
|
||||
<image class="jt" src="https://api.ccttiot.com/smartmeter/img/static/ukdy921M8MNe9XDid0WI" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="cont" @click="topage(1)">
|
||||
<view class="cont" @click="topage(1)">
|
||||
<view class="top">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uhsqQVT62DOTdW8qW7ez" mode=""
|
||||
style="width: 44rpx;height: 44rpx;"></image>
|
||||
|
@ -194,7 +194,7 @@
|
|||
<view class="bot">充值</view>
|
||||
</view>
|
||||
<image class="jt" src="https://api.ccttiot.com/smartmeter/img/static/ukdy921M8MNe9XDid0WI" mode=""></image>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="cont" @click="topage(5)" v-if="modelId.some(tag => tag == 2)">
|
||||
|
@ -1066,21 +1066,17 @@
|
|||
'关闭'
|
||||
that.timeday =
|
||||
0
|
||||
xBlufi
|
||||
.notifySendCustomData({
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '@time0'
|
||||
})
|
||||
xBlufi
|
||||
.notifySendCustomData({
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '@mmney0'
|
||||
})
|
||||
xBlufi
|
||||
.notifySendCustomData({
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: 'close'
|
||||
})
|
||||
uni.showToast({
|
||||
title: res
|
||||
.msg,
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
|
@ -1402,7 +1398,7 @@
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
let devicesarr = options.data
|
||||
// console.log(devicesarr, 'devicesarrdevicesarr')
|
||||
console.log(devicesarr, 'devicesarrdevicesarr')
|
||||
devicesarr.forEach(device => {
|
||||
const mac = device.name.substring(5)
|
||||
// console.log(device.name,device.name(5,15), 'macmacmac')
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="" style="color: red;font-size: 24rpx;padding-top: 30rpx;box-sizing: border-box;">
|
||||
提现服务费为 ¥{{roundToTwoDecimalsTraditional(this.serviceRates)}}
|
||||
提现服务费为 ¥{{roundToTwoDecimalsTraditional(this.serviceRates)}} 最低提现金额为¥20
|
||||
</view>
|
||||
<view class="tit">
|
||||
<view class="" style="display: flex;">
|
||||
|
|
Loading…
Reference in New Issue
Block a user