From c6d0ec5089dd5ed56855fcf9e0b6004689c51365 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Sat, 9 Nov 2024 18:02:13 +0800 Subject: [PATCH] 11 --- page_fenbao/statulist/about/index.vue | 5 +- .../statulist/myshop/editshop/index.vue | 4 +- page_fenbao/statulist/myshop/shopxx/index.vue | 7 +- page_fenbao/zhuce.vue | 177 +----- page_user/sbdetail.vue | 59 +- pages.json | 525 ++++++++++++------ pages/index/index.vue | 7 +- pages/my.vue | 5 +- pages/shouye/index.vue | 4 + pages/tj.vue | 5 +- 10 files changed, 403 insertions(+), 395 deletions(-) diff --git a/page_fenbao/statulist/about/index.vue b/page_fenbao/statulist/about/index.vue index 909382f..d727027 100644 --- a/page_fenbao/statulist/about/index.vue +++ b/page_fenbao/statulist/about/index.vue @@ -18,7 +18,10 @@ data() { return { obj: {}, - tit: '' + tit: '', + bgc: { + backgroundColor: " #8883F0", + }, } }, // 分享到好友(会话) diff --git a/page_fenbao/statulist/myshop/editshop/index.vue b/page_fenbao/statulist/myshop/editshop/index.vue index 32f1256..999aa6e 100644 --- a/page_fenbao/statulist/myshop/editshop/index.vue +++ b/page_fenbao/statulist/myshop/editshop/index.vue @@ -561,6 +561,7 @@ line-height: 70rpx; padding-left: 22rpx; padding-right: 72rpx; + width: 100%; } } } @@ -569,7 +570,7 @@ display: flex; justify-content: space-between; margin-top: 34rpx; - + align-items: center; .tit { margin-top: 12rpx; font-size: 32rpx; @@ -587,6 +588,7 @@ height: 70rpx; line-height: 70rpx; padding-left: 22rpx; + width: 100%; } } } diff --git a/page_fenbao/statulist/myshop/shopxx/index.vue b/page_fenbao/statulist/myshop/shopxx/index.vue index 9e58c54..f33b530 100644 --- a/page_fenbao/statulist/myshop/shopxx/index.vue +++ b/page_fenbao/statulist/myshop/shopxx/index.vue @@ -99,6 +99,9 @@ export default { data() { return { + bgc: { + backgroundColor: " #8883F0", + }, btnmsk:false, checked:true, params: { @@ -556,6 +559,7 @@ line-height: 70rpx; padding-left: 22rpx; padding-right: 72rpx; + width: 100%; } } } @@ -564,7 +568,7 @@ display: flex; justify-content: space-between; margin-top: 34rpx; - + align-items: center; .tit { margin-top: 12rpx; font-size: 32rpx; @@ -582,6 +586,7 @@ height: 70rpx; line-height: 70rpx; padding-left: 22rpx; + width: 100%; } } } diff --git a/page_fenbao/zhuce.vue b/page_fenbao/zhuce.vue index f50f151..e02d9f3 100644 --- a/page_fenbao/zhuce.vue +++ b/page_fenbao/zhuce.vue @@ -109,7 +109,6 @@ }, onLoad(option) { // console.log(option); - this.getluru() this.getxingh() this.storeId = option.sn }, @@ -284,7 +283,7 @@ } }) // console.log('蓝牙停止搜索ok') - this.mengcflag = false + // this.mengcflag = false if (this.devicesLists.length == 0) { this.titleflag = true } else { @@ -342,122 +341,6 @@ uni.navigateTo({ url:'/page_fenbao/device/joinDevice?mac='+Bluetoothmac }) - - // this.arrs = '' - // this.qrResult = e.name //拿到所点击的mac号 - // if (this.ver_data == null) { //判断是否有连接蓝牙 - // xBlufi.initXBlufi(1) - // xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent) - // xBlufi.notifyStartDiscoverBle({ - // 'isStart': true - // }) - // this.devicesList.forEach(device => { - // if (device.name == this.qrResult) { - // this.deviceId = device.deviceId - // this.name = device.name - // this.mac = device.name.slice(5, 17) - // } - // }) - // uni.showLoading({ - // title: '连接准备中...' - // }) - // // 停止蓝牙搜索 - // setTimeout(() => { - // setTimeout(()=>{ - // uni.showLoading({ - // title: '连接中...' - // }) - // setTimeout(()=>{ - // uni.hideLoading() - // uni.showToast({ - // title: '连接成功', - // icon: 'success', - // duration: 2000 - // }) - // this.devicesLists.forEach(item => { - // if (item.name == this.qrResult) { - // item.lj = '开关' - // } - // }) - // },2000) - // },500) - // xBlufi.notifyStartDiscoverBle({ - // 'isStart': false - // }) - // xBlufi.notifyConnectBle({ - // isStart: true, - // deviceId: this.deviceId, - // name: this.name - // }) - // xBlufi.notifyInitBleEsp32({ - // deviceId: this.deviceId - // }) - // }, 1000) - // }else{ //有连接则发送命令 - // uni.showLoading({ - // title: '执行中...' - // }) - // let that = this //改变this指向 - // uni.getNetworkType({ - // success(res) { - // if (res.networkType !== 'none') { - // uni.getConnectedBluetoothDevices({ - // success(res) { - // setTimeout(() => { //一秒后发送开启命令 - // xBlufi.notifySendCustomData({ - // customData: 'open' - // }) - // setTimeout(()=>{ //发送开启命令两秒后发送关闭命令 - // xBlufi.notifySendCustomData({ - // customData: 'close' - // }) - // setTimeout(()=>{ //发送关闭命令后一秒后断开连接 - // uni.hideLoading() - // that.ver_data = null - // xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent); - // wx.closeBLEConnection({ - // deviceId: that.deviceId, - // }) - // that.devicesLists.forEach(item => { - // if (item.name == that.qrResult) { - // item.lj = '连接' - // } - // }) - // // console.log('guanbi'); - // },1000) - // },2000) - // }, 1000) - // }, - // fail(err) { - // console.error('获取已连接蓝牙设备信息失败:', err) - // } - // }) - // } - // } - // }) - // } - }, - // 请求已经录入设备的mac - getluru() { - // this.$u.get(`/app/device/listAllMac`).then(res => { - // if (res.code == 200) { - // this.lurulist = res.data - // if(this.lurulist){ - // xBlufi.initXBlufi(1); - // xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent); - // xBlufi.notifyStartDiscoverBle({ - // 'isStart': true - // }) - // // 两秒后停止蓝牙搜索 - // setTimeout(() => { - // xBlufi.notifyStartDiscoverBle({ - // 'isStart': false - // }); - // this.status = true - // }, 1000) - // } - // } - // }) }, parseCustomData(data) { const dataArray = data.split('@'); @@ -485,49 +368,10 @@ } return parsedData; }, - //4、建立连接 - // createBLEConnection(e) { - // // this.deviceId = e.name - // this.mengcflag = true - // uni.showLoading({ - // title: '录入中...' - // }) - // this.mac = e.name.substring(5) - // // 录入设备 - // let data = { - // sn: this.storeId, - // mac: this.mac, - // modelId: this.valuexh - // } - // this.$u.post('/app/device', data).then((res) => { - // if (res.code == 200) { - // uni.showToast({ - // title: '设备:' + this.mac + '已录入成功', - // icon: 'success', - // duration: 2000 - // }) - // this.mengcflag = false - // uni.hideLoading() - // this.Search() - // // setTimeout(() => { - // // uni.navigateBack() - // // }, 1000) - // uni.removeStorageSync('mac') - // } else { - // this.mengcflag = false - // uni.hideLoading() - // uni.showToast({ - // title: res.msg, - // icon: 'none', - // duration: 2000 - // }) - // } - // }) - // }, // 点击重新搜索 Search() { // if (this.status) { - this.seachflag = false + this.seachflag = false this.mengcflag = true uni.showLoading({ title: '请稍后...' @@ -553,19 +397,10 @@ xBlufi.notifyStartDiscoverBle({ 'isStart': false }); - this.seachflag = true - // 判断是否存在设备 - // if (this.devicesList.length == 0) { - // this.tishiflag = true - // this.texts = '扫描完毕,暂无发现设备' - // } else { - // this.texts = '扫描到以下设备,请点击录入!' - // } - // } else { - // xBlufi.notifyStartDiscoverBle({ - // 'isStart': true - // }) - // } + setTimeout(()=>{ + this.seachflag = true + this.mengcflag = false + },2000) }, 2000) // } }, diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index a67420d..b581590 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -1,6 +1,6 @@