From b5acbbcde66759903600120a5e3a5d0930bd1ba5 Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Fri, 8 Nov 2024 18:01:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/tab-bar/tab-bar.vue | 12 +-
manifest.json | 3 +-
page_components/bindsz.vue | 4 +-
page_components/bindszthr.vue | 8 +-
page_components/bindsztwo.vue | 6 +-
page_components/eletj.vue | 6 +-
page_components/fuwu/index.vue | 12 +-
page_components/miyao.vue | 4 +-
page_components/peizhi.vue | 2 +-
page_components/wifilist/connect/index.vue | 4 +-
page_components/wifilist/index.vue | 14 +-
page_fenbao/HM-dragSorts/HM-dragSorts.vue | 6 +-
page_fenbao/chongzhi.vue | 10 +-
page_fenbao/device/czDevice.vue | 2 +-
page_fenbao/device/index.vue | 2 +-
page_fenbao/device/joinDevice.vue | 61 +++-
page_fenbao/device/lianjie.vue | 4 +-
page_fenbao/device/wifiDevice.vue | 2 +-
page_fenbao/editshenhe.vue | 4 +-
page_fenbao/sbshouye.vue | 8 +-
page_fenbao/statulist/fault/bangwx.vue | 4 +-
page_fenbao/statulist/fault/dangqiantel.vue | 2 +-
page_fenbao/statulist/fault/edittel.vue | 2 +-
page_fenbao/statulist/fault/index.vue | 8 +-
page_fenbao/statulist/fault/yichang/index.vue | 6 +-
page_fenbao/statulist/merchant/index.vue | 6 +-
.../statulist/myorder/detailxq/index.vue | 2 +-
page_fenbao/statulist/myorder/index.vue | 2 +-
.../statulist/myshop/editshop/index.vue | 4 +-
page_fenbao/statulist/myshop/index.vue | 4 +-
.../statulist/myshop/shebeilist/index.vue | 6 +-
.../statulist/myshop/shopdetail/index.vue | 10 +-
page_fenbao/statulist/myshop/shopxx/index.vue | 4 +-
page_fenbao/statulist/nearby/index.vue | 12 +-
page_fenbao/statulist/question/index.vue | 4 +-
.../statulist/taocanlist/addtaocan/index.vue | 11 +-
page_user/Feedback.vue | 10 +-
page_user/HM-dragSorts/HM-dragSorts.vue | 8 +-
page_user/cbRecord.vue | 2 +-
page_user/fenzu.vue | 8 +-
page_user/mapditu/index.vue | 12 +-
page_user/sbdetail.vue | 312 +++++++++---------
page_user/shouzhi.vue | 2 +-
page_user/skzh.vue | 2 +-
page_user/txrecord.vue | 2 +-
page_user/wifijoint/index.vue | 2 +-
page_user/yetx.vue | 2 +-
pages/daili/devicexq.vue | 42 +--
pages/daili/index.vue | 14 +-
pages/index/index.vue | 14 +-
pages/login/login.vue | 2 +-
pages/my.vue | 24 +-
pages/shouye/index.vue | 28 +-
53 files changed, 405 insertions(+), 342 deletions(-)
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index 6c40651..6a17496 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -1,18 +1,18 @@
@@ -35,7 +35,7 @@
-->
- 选择套餐列表
+ 选择套餐列表
@@ -59,7 +59,7 @@
-
+
暂无套餐,请先添加
@@ -82,7 +82,7 @@
-
+
商户反洗钱协议
diff --git a/page_components/bindsztwo.vue b/page_components/bindsztwo.vue
index d885a57..db352f7 100644
--- a/page_components/bindsztwo.vue
+++ b/page_components/bindsztwo.vue
@@ -20,7 +20,7 @@
-
+
WiFi配网
@@ -62,12 +62,12 @@
请将手机与设备尽量靠近
-
+
-
+
蓝牙连接失败
diff --git a/page_components/eletj.vue b/page_components/eletj.vue
index 1f68969..a8ab7b6 100644
--- a/page_components/eletj.vue
+++ b/page_components/eletj.vue
@@ -44,10 +44,10 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uccaWar4FDp37op7haWM " mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ur9HRtZKY7YcxGewJARz" mode="aspectFit">
@@ -195,7 +195,7 @@
-
+
diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue
index 3400944..6c4f7ea 100644
--- a/page_components/fuwu/index.vue
+++ b/page_components/fuwu/index.vue
@@ -3,7 +3,7 @@
-
+
{{deviceobj.deviceName == undefined ? '--' : deviceobj.deviceName}}
@@ -31,18 +31,18 @@
第一:检查手机蓝牙是否打开
+ src="https://api.ccttiot.com/smartmeter/img/static/uM4DY4Ee9AgFHLv4bIDR" mode="aspectFit">
第二:设置小程序蓝牙授权
+ src="https://api.ccttiot.com/smartmeter/img/static/uAj06uo9qysixLrcFHBn" mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ugFSKFZn4mzJJHQx3K2Z" mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/uZ4XoCI2KNQzcPKbwGLN" mode="aspectFit">
我已知晓
@@ -145,7 +145,7 @@
-
+
我已知晓
diff --git a/page_components/miyao.vue b/page_components/miyao.vue
index 0c7c277..a385adf 100644
--- a/page_components/miyao.vue
+++ b/page_components/miyao.vue
@@ -19,7 +19,7 @@
-
+
暂无秘钥
@@ -30,7 +30,7 @@
-
+
仅提示一次
diff --git a/page_components/peizhi.vue b/page_components/peizhi.vue
index 9df6367..9a334fe 100644
--- a/page_components/peizhi.vue
+++ b/page_components/peizhi.vue
@@ -71,7 +71,7 @@
style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;"
@click="getImage">
-
+
diff --git a/page_components/wifilist/connect/index.vue b/page_components/wifilist/connect/index.vue
index ae0eb2d..7fdcc88 100644
--- a/page_components/wifilist/connect/index.vue
+++ b/page_components/wifilist/connect/index.vue
@@ -8,13 +8,13 @@
- WiFi路网名称
+ WiFi路网名称
- 密码
+ 密码
diff --git a/page_components/wifilist/index.vue b/page_components/wifilist/index.vue
index baaa5db..1b470ff 100644
--- a/page_components/wifilist/index.vue
+++ b/page_components/wifilist/index.vue
@@ -10,7 +10,7 @@
请选择您需要连接的2.4GwiFi名称
-
+
刷新
@@ -24,22 +24,22 @@
+ mode="aspectFit">
+ mode="aspectFit">
+ mode="aspectFit">
+ mode="aspectFit">
@@ -49,7 +49,7 @@
-
@@ -174,7 +174,7 @@
@@ -109,9 +109,9 @@
diff --git a/page_fenbao/chongzhi.vue b/page_fenbao/chongzhi.vue
index d259070..3c98a5a 100644
--- a/page_fenbao/chongzhi.vue
+++ b/page_fenbao/chongzhi.vue
@@ -4,7 +4,7 @@
title-size='38' height='50'>
-
+
@@ -46,15 +46,15 @@
第一:检查手机蓝牙是否打开
-
+
第二:设置小程序蓝牙授权
-
-
-
+
+
+
继续充值
diff --git a/page_fenbao/device/czDevice.vue b/page_fenbao/device/czDevice.vue
index 0944822..bd7fec4 100644
--- a/page_fenbao/device/czDevice.vue
+++ b/page_fenbao/device/czDevice.vue
@@ -4,7 +4,7 @@
height='50'>
-
+
diff --git a/page_fenbao/device/index.vue b/page_fenbao/device/index.vue
index 55b0bc9..6fe6fe6 100644
--- a/page_fenbao/device/index.vue
+++ b/page_fenbao/device/index.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/page_fenbao/device/joinDevice.vue b/page_fenbao/device/joinDevice.vue
index b4f6d50..7c72b73 100644
--- a/page_fenbao/device/joinDevice.vue
+++ b/page_fenbao/device/joinDevice.vue
@@ -13,7 +13,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
@@ -148,10 +148,10 @@
this.Binddevice()
this.isbands = false
this.carstause = false
- if(uni.getStorageSync('banben') || uni.getStorageSync('banbenid')){
- this.banben = uni.getStorageSync('banben')
- this.modelId = uni.getStorageSync('banbenid')
- }
+ // if(uni.getStorageSync('banben') || uni.getStorageSync('banbenid')){
+ // this.banben = uni.getStorageSync('banben')
+ // this.modelId = uni.getStorageSync('banbenid')
+ // }
},
onShow() {
this.getlist()
@@ -345,6 +345,26 @@
let decodedValue = decodeURIComponent(sceneValue)
let id = getQueryParam(decodedValue, 's')
this.storeId = id
+
+
+ // 找到与目标字符串最相似的元素并打印其ID
+ let closestItemId = null;
+ let closestItemname = null
+ let smallestDistance = Infinity;
+ console.log( this.storeId,'idididididi');
+ this.Versionlist.forEach(item => {
+ if(item.snPrefix != null && item.snPrefix.length != 0){
+ const distance = this.levenshtein(item.snPrefix, this.storeId);
+ if (distance < smallestDistance) {
+ smallestDistance = distance
+ closestItemId = item.modelId
+ closestItemname = item.modelName
+ }
+ }
+ })
+ this.modelId = closestItemId
+ this.banben = closestItemname
+ console.log("与目标字符串最相似的元素的是:",this.modelId,this.banben);
},
fail: err => {
console.error('扫描失败:', err)
@@ -355,6 +375,35 @@
}
})
},
+ // 匹配最相似的
+ levenshtein(a, b) {
+ console.log(a,b,'ababababab');
+ const matrix = [];
+ // 增量地构建矩阵
+ for (let i = 0; i <= b.length; i++) {
+ matrix[i] = [i];
+ }
+ for (let j = 0; j <= a.length; j++) {
+ matrix[0][j] = j;
+ }
+ // 填充矩阵的其余部分
+ for (let i = 1; i <= b.length; i++) {
+ for (let j = 1; j <= a.length; j++) {
+ if (b.charAt(i - 1) === a.charAt(j - 1)) {
+ matrix[i][j] = matrix[i - 1][j - 1];
+ } else {
+ matrix[i][j] = Math.min(
+ matrix[i - 1][j - 1] + 1, // 替换
+ Math.min(matrix[i][j - 1] + 1, // 插入
+ matrix[i - 1][j] + 1) // 删除
+ );
+ }
+ }
+ }
+
+ // 返回矩阵右下角的值,即两个字符串之间的Levenshtein距离
+ return matrix[b.length][a.length];
+ },
Binddevice() {
uni.showLoading({
diff --git a/page_fenbao/device/lianjie.vue b/page_fenbao/device/lianjie.vue
index 3fe2a26..e18ddb8 100644
--- a/page_fenbao/device/lianjie.vue
+++ b/page_fenbao/device/lianjie.vue
@@ -203,7 +203,7 @@
请将手机与设备尽量靠近
-
+
@@ -211,7 +211,7 @@
-
+
蓝牙连接失败
diff --git a/page_fenbao/device/wifiDevice.vue b/page_fenbao/device/wifiDevice.vue
index ba0bb45..fbc7e34 100644
--- a/page_fenbao/device/wifiDevice.vue
+++ b/page_fenbao/device/wifiDevice.vue
@@ -4,7 +4,7 @@
height='50'>
-
+
diff --git a/page_fenbao/editshenhe.vue b/page_fenbao/editshenhe.vue
index 3756cfa..30822e4 100644
--- a/page_fenbao/editshenhe.vue
+++ b/page_fenbao/editshenhe.vue
@@ -74,10 +74,10 @@
-
+
diff --git a/page_fenbao/sbshouye.vue b/page_fenbao/sbshouye.vue
index 81831e6..9aaca6b 100644
--- a/page_fenbao/sbshouye.vue
+++ b/page_fenbao/sbshouye.vue
@@ -16,7 +16,7 @@
+ mode="aspectFit">
维修中
@@ -32,8 +32,8 @@
-
-
+
+
@@ -42,7 +42,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多设备...
diff --git a/page_fenbao/statulist/fault/bangwx.vue b/page_fenbao/statulist/fault/bangwx.vue
index d57ba7e..2490f39 100644
--- a/page_fenbao/statulist/fault/bangwx.vue
+++ b/page_fenbao/statulist/fault/bangwx.vue
@@ -3,7 +3,7 @@
-
+
您尚未绑定微信,绑定登录更便捷
@@ -12,7 +12,7 @@
点击下方按钮绑定您的微信账号
- 绑定微信
+ 绑定微信
diff --git a/page_fenbao/statulist/fault/dangqiantel.vue b/page_fenbao/statulist/fault/dangqiantel.vue
index 061038a..a2f4a66 100644
--- a/page_fenbao/statulist/fault/dangqiantel.vue
+++ b/page_fenbao/statulist/fault/dangqiantel.vue
@@ -3,7 +3,7 @@
-
+
您的手机号码:+86 158****1232
diff --git a/page_fenbao/statulist/fault/edittel.vue b/page_fenbao/statulist/fault/edittel.vue
index 800a490..0cb69f6 100644
--- a/page_fenbao/statulist/fault/edittel.vue
+++ b/page_fenbao/statulist/fault/edittel.vue
@@ -53,7 +53,7 @@
-
+
更换成功!
diff --git a/page_fenbao/statulist/fault/index.vue b/page_fenbao/statulist/fault/index.vue
index 69acab7..c5b4f27 100644
--- a/page_fenbao/statulist/fault/index.vue
+++ b/page_fenbao/statulist/fault/index.vue
@@ -3,12 +3,12 @@
-
+
- 手机号码
+ 手机号码
{{teltxt}}
@@ -16,7 +16,7 @@
- 微信
+ 微信
158****1123
@@ -24,7 +24,7 @@
- 修改密码
+ 修改密码
diff --git a/page_fenbao/statulist/fault/yichang/index.vue b/page_fenbao/statulist/fault/yichang/index.vue
index 699895c..4b814fa 100644
--- a/page_fenbao/statulist/fault/yichang/index.vue
+++ b/page_fenbao/statulist/fault/yichang/index.vue
@@ -6,18 +6,18 @@
- 设备编号:
+ 设备编号:
-
+
- 故障原因:
+ 故障原因:
diff --git a/page_fenbao/statulist/merchant/index.vue b/page_fenbao/statulist/merchant/index.vue
index 26e69b1..cd34e58 100644
--- a/page_fenbao/statulist/merchant/index.vue
+++ b/page_fenbao/statulist/merchant/index.vue
@@ -7,16 +7,16 @@
-
+
-
+
-
+
diff --git a/page_fenbao/statulist/myorder/detailxq/index.vue b/page_fenbao/statulist/myorder/detailxq/index.vue
index 66b587c..6de7cb0 100644
--- a/page_fenbao/statulist/myorder/detailxq/index.vue
+++ b/page_fenbao/statulist/myorder/detailxq/index.vue
@@ -85,7 +85,7 @@
-->
diff --git a/page_fenbao/statulist/myorder/index.vue b/page_fenbao/statulist/myorder/index.vue
index 103bb27..50810a0 100644
--- a/page_fenbao/statulist/myorder/index.vue
+++ b/page_fenbao/statulist/myorder/index.vue
@@ -42,7 +42,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多订单记录...
diff --git a/page_fenbao/statulist/myshop/editshop/index.vue b/page_fenbao/statulist/myshop/editshop/index.vue
index 6ae5183..32f1256 100644
--- a/page_fenbao/statulist/myshop/editshop/index.vue
+++ b/page_fenbao/statulist/myshop/editshop/index.vue
@@ -68,11 +68,11 @@
-
+
diff --git a/page_fenbao/statulist/myshop/index.vue b/page_fenbao/statulist/myshop/index.vue
index 9bcca5e..55f4f06 100644
--- a/page_fenbao/statulist/myshop/index.vue
+++ b/page_fenbao/statulist/myshop/index.vue
@@ -11,7 +11,7 @@
-
+
{{item.name}}
@@ -55,7 +55,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多店铺...
diff --git a/page_fenbao/statulist/myshop/shebeilist/index.vue b/page_fenbao/statulist/myshop/shebeilist/index.vue
index 81e090d..b1a7a7c 100644
--- a/page_fenbao/statulist/myshop/shebeilist/index.vue
+++ b/page_fenbao/statulist/myshop/shebeilist/index.vue
@@ -32,14 +32,14 @@
-
-
+
+
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多设备...
diff --git a/page_fenbao/statulist/myshop/shopdetail/index.vue b/page_fenbao/statulist/myshop/shopdetail/index.vue
index 1cba2ec..0c9c540 100644
--- a/page_fenbao/statulist/myshop/shopdetail/index.vue
+++ b/page_fenbao/statulist/myshop/shopdetail/index.vue
@@ -33,17 +33,17 @@
-
-
-
-
-
diff --git a/page_fenbao/statulist/myshop/shopxx/index.vue b/page_fenbao/statulist/myshop/shopxx/index.vue
index 6080cc0..9e58c54 100644
--- a/page_fenbao/statulist/myshop/shopxx/index.vue
+++ b/page_fenbao/statulist/myshop/shopxx/index.vue
@@ -67,9 +67,9 @@
style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;"
@click="getImage">
+ src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode="aspectFit">
-
-
+ src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode="aspectFit">
-
+
{{item.name}}
-
+
{{item.address}}
@@ -30,13 +30,13 @@
-
{{String(item.distance).split('.')[0]}}m
-
+
该区域暂无店铺...
diff --git a/page_fenbao/statulist/question/index.vue b/page_fenbao/statulist/question/index.vue
index 35770d7..d8d2f57 100644
--- a/page_fenbao/statulist/question/index.vue
+++ b/page_fenbao/statulist/question/index.vue
@@ -18,11 +18,11 @@
- 换一换
+ 换一换
-
+
您搜索的问题暂无相关分类
diff --git a/page_fenbao/statulist/taocanlist/addtaocan/index.vue b/page_fenbao/statulist/taocanlist/addtaocan/index.vue
index 1ea08b3..787003a 100644
--- a/page_fenbao/statulist/taocanlist/addtaocan/index.vue
+++ b/page_fenbao/statulist/taocanlist/addtaocan/index.vue
@@ -400,7 +400,7 @@
},
{
name: '分',
- disabled: false
+ disabled: false,
},
{
name: '秒',
@@ -429,7 +429,7 @@
listflag: false,
valueone: '单次收费',
valuetwo: '计时收费',
- valuethr: '',
+ valuethr: '分',
gmsjflag: true,
yjflag: false,
duflag: false,
@@ -438,7 +438,7 @@
dangflag: false,
backgroundColor: Array(24).fill('#64B6A7'),
backcolor: '',
- duvalue: '',
+ duvalue: '1',
qianvalue: '',
description: '',
feeMode: '1', ////收费模式(1单次收费 2智能收费)
@@ -457,6 +457,7 @@
}
},
onLoad(option) {
+ this.timetxt = '分'
if (option.suitId) {
this.deviceId = option.id
this.title = '保存'
@@ -561,6 +562,10 @@
duration: 1000,
})
} else {
+ if(this.valuethr == '分'){
+ this.timeUnit = 3
+ this.timetxt = '分'
+ }
this.btnmsk = true
if (this.title == '确定') {
// if(this.contwzflags == false){
diff --git a/page_user/Feedback.vue b/page_user/Feedback.vue
index 06e04d1..d0a2794 100644
--- a/page_user/Feedback.vue
+++ b/page_user/Feedback.vue
@@ -2,7 +2,7 @@
-
+
@@ -12,7 +12,7 @@
-
+
{{item.name}}
@@ -32,7 +32,7 @@
复制
-
+
@@ -54,10 +54,10 @@
复制
-
+
-
+
{{item.name}}
diff --git a/page_user/HM-dragSorts/HM-dragSorts.vue b/page_user/HM-dragSorts/HM-dragSorts.vue
index f78e03a..155d4e0 100644
--- a/page_user/HM-dragSorts/HM-dragSorts.vue
+++ b/page_user/HM-dragSorts/HM-dragSorts.vue
@@ -50,8 +50,8 @@
-
-
+
+
{{row.name.length > 10 ? row.name.substring(0, 10) + '...' : row.name }}({{row.deviceCount}})
@@ -61,9 +61,9 @@
(修改审核中)
-
-
diff --git a/page_user/cbRecord.vue b/page_user/cbRecord.vue
index 13e818c..84b3406 100644
--- a/page_user/cbRecord.vue
+++ b/page_user/cbRecord.vue
@@ -45,7 +45,7 @@
-没有更多记录了-
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多充值记录...
diff --git a/page_user/fenzu.vue b/page_user/fenzu.vue
index 33d01fc..657d0f5 100644
--- a/page_user/fenzu.vue
+++ b/page_user/fenzu.vue
@@ -7,17 +7,17 @@
-
-
+
+
{{item.name.length > 10 ? item.name.substring(0, 10) + '...' : item.name }}({{item.deviceCount}})
-
-
+
-
-
-
+
扫一扫
@@ -31,7 +31,7 @@
{{listobj.name == undefined ? '--' : listobj.name}}
-
+
{{listobj.address == undefined ? '--' : listobj.address}}
@@ -51,11 +51,11 @@
到这去
+ src="https://api.ccttiot.com/smartmeter/img/static/u9Z7DXlWfjJtIrq5OEty" mode="aspectFit"> 到这去
扫一扫
+ mode="aspectFit"> 扫一扫
diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue
index 1f4ff79..a67420d 100644
--- a/page_user/sbdetail.vue
+++ b/page_user/sbdetail.vue
@@ -61,7 +61,7 @@
实时参数
点击刷新
-
+
@@ -106,10 +106,10 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uccaWar4FDp37op7haWM " mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ur9HRtZKY7YcxGewJARz" mode="aspectFit">
@@ -166,10 +166,10 @@
-
+
蓝牙连接失败
@@ -650,142 +650,150 @@
},
// 开启和关闭
btnkq() {
- if (this.deviceInfo.onlineStatus == 1) {
- if (this.tdtxt == '开启') {
- this.$u.put(`/app/device/${this.id}/changePower?status=0`).then((res) => {
- if (res.code == 200) {
- this.tdtxt = '关闭'
- this.imgflag = false
- this.deviceInfo.status = 1
- uni.showToast({
- title: res.msg,
- icon: 'success',
- duration: 2000
- })
- } else {
- this.imgflag = true
- this.tdtxt = '开启'
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- })
- }
- })
- } else {
- this.$u.put(`/app/device/${this.id}/changePower?status=1`).then((res) => {
- if (res.code == 200) {
- this.imgflag = true
- this.tdtxt = '开启'
- this.deviceInfo.status = 2
- uni.showToast({
- title: res.msg,
- icon: 'success',
- duration: 2000
- })
- } else {
- this.imgflag = false
- this.tdtxt = '关闭'
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- })
- }
- })
- }
- } else {
- if (this.setMode == null) {
- this.btnmsk = false
- this.shibaiflag = false
- this.bluetoothflag = true
- xBlufi.initXBlufi(1)
- xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
- xBlufi.notifyStartDiscoverBle({
- 'isStart': true
- })
- // 停止蓝牙搜索
- setTimeout(() => {
- xBlufi.notifyStartDiscoverBle({
- 'isStart': false
- })
- xBlufi.notifyConnectBle({
- isStart: true,
- deviceId: this.deviceId,
- name: this.name
- })
- xBlufi.notifyInitBleEsp32({
- deviceId: this.deviceId
- })
- let name = ''
- let index = this.name.indexOf('-')
- if (index !== -1) {
- name = this.name.slice(index + 1)
- }
- if (this.deviceInfo.powerStatus == 0) {
- this.imgflag = false
- } else {
- this.imgflag = true
- }
- }, 1000)
- } else {
- // console.log(this.tdtxt,'020202');
+ if(this.deviceInfo.allowSwitch == true){
+ if (this.deviceInfo.onlineStatus == 1) {
if (this.tdtxt == '开启') {
- let that = this
- uni.getNetworkType({
- success(res) {
- if (res.networkType !== 'none') {
- uni.getConnectedBluetoothDevices({
- success(res) {
- setTimeout(() => {
- // console.log('close关闭');
- that.tdtxt = '关闭'
- that.imgflag = false
- that.deviceInfo.status = 1
- xBlufi.notifySendCustomData({
- customData: 'close'
- })
- xBlufi.notifySendCustomData({
- customData: '11close'
- })
- }, 1000)
- },
- fail(err) {
- console.error('获取已连接蓝牙设备信息失败:', err)
- }
- })
- }
+ this.$u.put(`/app/device/${this.id}/changePower?status=0`).then((res) => {
+ if (res.code == 200) {
+ this.tdtxt = '关闭'
+ this.imgflag = false
+ this.deviceInfo.status = 1
+ uni.showToast({
+ title: res.msg,
+ icon: 'success',
+ duration: 2000
+ })
+ } else {
+ this.imgflag = true
+ this.tdtxt = '开启'
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
}
})
} else {
- let that = this
- uni.getNetworkType({
- success(res) {
- if (res.networkType !== 'none') {
- uni.getConnectedBluetoothDevices({
- success(res) {
- setTimeout(() => {
- // console.log('open开启');
- that.tdtxt = '开启'
- that.imgflag = true
- that.deviceInfo.status = 2
- xBlufi.notifySendCustomData({
- customData: 'open'
- })
- xBlufi.notifySendCustomData({
- customData: '11open'
- })
- }, 1000)
- },
- fail(err) {
- console.error('获取已连接蓝牙设备信息失败:', err)
- }
- })
- }
+ this.$u.put(`/app/device/${this.id}/changePower?status=1`).then((res) => {
+ if (res.code == 200) {
+ this.imgflag = true
+ this.tdtxt = '开启'
+ this.deviceInfo.status = 2
+ uni.showToast({
+ title: res.msg,
+ icon: 'success',
+ duration: 2000
+ })
+ } else {
+ this.imgflag = false
+ this.tdtxt = '关闭'
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
}
})
}
+ } else {
+ if (this.setMode == null) {
+ this.btnmsk = false
+ this.shibaiflag = false
+ this.bluetoothflag = true
+ xBlufi.initXBlufi(1)
+ xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': true
+ })
+ // 停止蓝牙搜索
+ setTimeout(() => {
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: this.deviceId,
+ name: this.name
+ })
+ xBlufi.notifyInitBleEsp32({
+ deviceId: this.deviceId
+ })
+ let name = ''
+ let index = this.name.indexOf('-')
+ if (index !== -1) {
+ name = this.name.slice(index + 1)
+ }
+ if (this.deviceInfo.powerStatus == 0) {
+ this.imgflag = false
+ } else {
+ this.imgflag = true
+ }
+ }, 1000)
+ } else {
+ // console.log(this.tdtxt,'020202');
+ if (this.tdtxt == '开启') {
+ let that = this
+ uni.getNetworkType({
+ success(res) {
+ if (res.networkType !== 'none') {
+ uni.getConnectedBluetoothDevices({
+ success(res) {
+ setTimeout(() => {
+ // console.log('close关闭');
+ that.tdtxt = '关闭'
+ that.imgflag = false
+ that.deviceInfo.status = 1
+ xBlufi.notifySendCustomData({
+ customData: 'close'
+ })
+ xBlufi.notifySendCustomData({
+ customData: '11close'
+ })
+ }, 1000)
+ },
+ fail(err) {
+ console.error('获取已连接蓝牙设备信息失败:', err)
+ }
+ })
+ }
+ }
+ })
+ } else {
+ let that = this
+ uni.getNetworkType({
+ success(res) {
+ if (res.networkType !== 'none') {
+ uni.getConnectedBluetoothDevices({
+ success(res) {
+ setTimeout(() => {
+ // console.log('open开启');
+ that.tdtxt = '开启'
+ that.imgflag = true
+ that.deviceInfo.status = 2
+ xBlufi.notifySendCustomData({
+ customData: 'open'
+ })
+ xBlufi.notifySendCustomData({
+ customData: '11open'
+ })
+ }, 1000)
+ },
+ fail(err) {
+ console.error('获取已连接蓝牙设备信息失败:', err)
+ }
+ })
+ }
+ }
+ })
+ }
+ }
}
+ }else{
+ uni.showToast({
+ title: '您没有权限操作',
+ icon: 'none',
+ duration: 2000
+ })
}
},
getQiniuToken() {
diff --git a/page_user/shouzhi.vue b/page_user/shouzhi.vue
index a28189a..1153f8e 100644
--- a/page_user/shouzhi.vue
+++ b/page_user/shouzhi.vue
@@ -23,7 +23,7 @@
-没有更多记录了-
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多收支记录...
diff --git a/page_user/skzh.vue b/page_user/skzh.vue
index 6961d9c..6e1f630 100644
--- a/page_user/skzh.vue
+++ b/page_user/skzh.vue
@@ -34,7 +34,7 @@
-
+
使用当前微信收款
diff --git a/page_user/txrecord.vue b/page_user/txrecord.vue
index 7f1eaa0..8995b59 100644
--- a/page_user/txrecord.vue
+++ b/page_user/txrecord.vue
@@ -26,7 +26,7 @@
-没有更多记录了-
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无更多提现记录...
diff --git a/page_user/wifijoint/index.vue b/page_user/wifijoint/index.vue
index b54e5f0..9ba86cc 100644
--- a/page_user/wifijoint/index.vue
+++ b/page_user/wifijoint/index.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/page_user/yetx.vue b/page_user/yetx.vue
index d150290..8b77ead 100644
--- a/page_user/yetx.vue
+++ b/page_user/yetx.vue
@@ -49,7 +49,7 @@
-
+
{{item.name}}
diff --git a/pages/daili/devicexq.vue b/pages/daili/devicexq.vue
index 3a56528..14beba7 100644
--- a/pages/daili/devicexq.vue
+++ b/pages/daili/devicexq.vue
@@ -65,7 +65,7 @@
实时参数
点击刷新
-
+
@@ -110,10 +110,10 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uccaWar4FDp37op7haWM " mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ur9HRtZKY7YcxGewJARz" mode="aspectFit">
@@ -169,10 +169,10 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uccaWar4FDp37op7haWM " mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ur9HRtZKY7YcxGewJARz" mode="aspectFit">
@@ -186,65 +186,65 @@
-
充值记录
-
+
-
归零
-
+
+ src="https://api.ccttiot.com/smartmeter/img/static/u9vzIeLLorfYuoZnxBDZ" mode="aspectFit">
充值
-
+
+ src="https://api.ccttiot.com/smartmeter/img/static/ule3wEEDaXzfXCUCM1Ks" mode="aspectFit">
配网
-
+
+ src="https://api.ccttiot.com/smartmeter/img/static/uMdtTPOmGVJqcYIQvnUj" mode="aspectFit">
分享
-
+
+ src="https://api.ccttiot.com/smartmeter/img/static/uOUM2aclDz2ZnRxOll9g" mode="aspectFit">
设置
-
+
@@ -276,12 +276,12 @@
请将手机与设备尽量靠近
-
+
-
+
蓝牙连接失败
diff --git a/pages/daili/index.vue b/pages/daili/index.vue
index bfbb8f8..38c7150 100644
--- a/pages/daili/index.vue
+++ b/pages/daili/index.vue
@@ -1,7 +1,7 @@
-
代理设备列表
@@ -12,7 +12,7 @@
-
+
@@ -25,7 +25,7 @@
搜索
-
+
@@ -71,7 +71,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
暂无设备...
@@ -132,7 +132,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uiDR6MnGHguBRNSYFTVw" mode="aspectFit"> -->
@@ -148,12 +148,12 @@
请将手机与设备尽量靠近
-
+
-
+
蓝牙连接失败
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c7b3556..6165e18 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -4,7 +4,7 @@
title-size='44' height='50' id="navbar">
-->
-
设备列表
@@ -30,7 +30,7 @@
-
+
@@ -48,7 +48,7 @@
+
-->
-
+
@@ -89,7 +89,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit">
该店铺暂无设备...
@@ -148,7 +148,7 @@
+ src="https://api.ccttiot.com/smartmeter/img/static/uiDR6MnGHguBRNSYFTVw" mode="aspectFit">
@@ -164,12 +164,12 @@
请将手机与设备尽量靠近
-
+
-
+
蓝牙连接失败
diff --git a/pages/login/login.vue b/pages/login/login.vue
index ec2dd52..978a613 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -5,7 +5,7 @@
-
+
欢迎来到共享开关
diff --git a/pages/my.vue b/pages/my.vue
index 1a74b60..fa52707 100644
--- a/pages/my.vue
+++ b/pages/my.vue
@@ -43,7 +43,7 @@
-
+
收款账户
@@ -51,7 +51,7 @@
-
+
收支明细
@@ -62,44 +62,44 @@
-
+
我的店铺
-
+
套餐模版
-
+
订单管理
-
+
订单统计
-
+
安全中心
-
+
咨询客服
-
+
退出登录
diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue
index 906c28b..be94f33 100644
--- a/pages/shouye/index.vue
+++ b/pages/shouye/index.vue
@@ -13,61 +13,61 @@
-
+
您有正在使用中的设备...
+ src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode="aspectFit">
+ src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode="aspectFit">
{{item.deviceName}}
-
+
-
-
+ src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode="aspectFit">
-
-
-
-
-
+
-
+
扫一扫