From 9b88341f2d40dce7792930f04a3d79edbfc7c9bc Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Fri, 18 Oct 2024 17:55:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=85=B3=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.interceptor.js | 4 ++-- page_components/eletj.vue | 38 ++++++++++++---------------------- page_components/fuwu/index.vue | 2 +- page_user/sbdetail.vue | 18 +++++++--------- page_user/yetx.vue | 2 +- 5 files changed, 24 insertions(+), 40 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index e4f5899..9d294c0 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -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 diff --git a/page_components/eletj.vue b/page_components/eletj.vue index b2a48b4..76689b6 100644 --- a/page_components/eletj.vue +++ b/page_components/eletj.vue @@ -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: diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue index 75acea9..5491b56 100644 --- a/page_components/fuwu/index.vue +++ b/page_components/fuwu/index.vue @@ -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: '该设备暂无套餐,是否前去配置?', diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index 48b7394..a473180 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -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') diff --git a/page_user/yetx.vue b/page_user/yetx.vue index 98907cd..c4da119 100644 --- a/page_user/yetx.vue +++ b/page_user/yetx.vue @@ -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;">