This commit is contained in:
3321822538@qq.com 2024-12-13 17:20:05 +08:00
parent 5a88ee7ace
commit 1500c8954f
2 changed files with 118 additions and 86 deletions

View File

@ -761,7 +761,7 @@
this.getzfqd()
this.getprice()
if (this.detaobj.suitFeeMode == 1) {
if (this.onlineStatus == 0) {
if (this.onlineStatus == 1) {
let that = this
uni.showModal({
title: '提示',
@ -773,22 +773,32 @@
}
that.$u.put(`/app/bill/endUse`, data).then(res => {
if (res.code == 200) {
if(res.data.deviceResult == false){
// if(res.data.deviceResult && res.data.deviceResult == false){
// uni.showToast({
// title: res.data.deviceMsg,
// icon: 'none',
// duration: 2000
// })
// setTimeout(()=>{
// uni.reLaunch({
// url: '/pages/shouye/index'
// })
// },1500)
// }else{
// uni.reLaunch({
// url: '/pages/shouye/index'
// })
// }
uni.showToast({
title: res.data.deviceMsg,
icon: 'none',
duration: 2000
title: '结束成功',
icon: 'success',
duration: 1000
})
setTimeout(()=>{
uni.reLaunch({
url: '/pages/shouye/index'
})
},1500)
}else{
uni.reLaunch({
url: '/pages/shouye/index'
})
}
} else {
uni.showToast({
title: res.msg,

View File

@ -5,22 +5,22 @@
<!-- 样式 -->
<view class="container" style="margin-top: 50rpx;">
<view class="device">
<span class="device-list-title">WIFI选择</span>
<view class="" v-if="objlist.wifi">
该设备已成功连接WIFI{{objlist.wifi}}
<span class="device-list-title"> <image style="width: 30rpx;height: 30rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uUwOlSoho5fNOXBHVQ8D" mode=""></image> 提示</span>
<view class="text_3 ml-3" style="font-size: 24rpx;color: #1E1D20;">本设备只支持2.4G-WiFi网络暂不支持5G-WiFi网络</view>
</view>
</view>
<view class="flex-row items-center flex-1 group" style="display: flex;justify-content: space-between;align-items: center;">
<view class="text_3 ml-3" style="width: 350rpx;flex-wrap: wrap;">本设备只支持2.4G-WIFI网络 暂不支持5G-WIFI</view>
<!-- <view class="flex-row items-center flex-1 group" style="display: flex;justify-content: space-between;align-items: center;">
<view class="text_3 ml-3" style="color: #8883F0;display: flex;justify-content: space-between;align-items: center;" @click="btnwifi">
<image class="sximg" src="https://api.ccttiot.com/smartmeter/img/static/uhhg02VV44LLPaDJDJO2" mode="aspectFit" :style="{ transform: 'rotate(' + rotateDegree + 'deg)' }" ></image>
<text>刷新</text> </view>
</view>
</view> -->
<!-- wifi列表 -->
<!-- wifi列表 v-if="signalStrengthflag"-->
<view class="wifilist">
<view class="bd" v-for="(item,index) in 10" :key="index" @click="btnqhwifi(index,item)"
v-if="signalStrengthflag">
<view class="top">
<image src="https://api.ccttiot.com/smartmeter/img/static/uCN5HZjWwMqVQkbccAxa" mode=""></image> 请选择您需要连接的WiFi名称
</view>
<view class="bd" v-for="(item,index) in list" :key="index" @click="btnqhwifi(index,item)"
>
<view class="bdbox">
<view class="box">
<ul>
@ -46,10 +46,14 @@
</li>
</ul>
</view>
<view class="content">
<view class="bt">{{item.SSID == '' ? 'CMCC-eaca' : item.SSID}}</view>
<!-- <view class="wz" style="color: #8883F0 ;">{{item.BSSID}}</view> -->
</view>
<view class="" style="font-size: 24rpx;color: #8883F0;" v-if="item.SSID == this.objlist.wifi">
已连接
</view>
<view class="" style="font-size: 24rpx;color: #8883F0;width: 20rpx;" v-else>
</view>
</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uLrArPv3OrIodtWZ3gri" mode="aspectFit"
@ -58,8 +62,8 @@
</view>
</view>
<view class="annius" style="display: flex;justify-content: space-between;">
<view class="" @click="btnsd">手动添加其他网络</view>
<!-- <view class="" @click="btnxyb">下一步</view> -->
<view style="width: 246rpx;" @click="btnwifi"> 重新搜索</view>
<view style="width: 374rpx;" @click="btnsd">未找到手动添加WIFI</view>
</view>
</view>
@ -241,7 +245,7 @@
dotShowInterval: null,
devicesList:[],
ver_data:'',
ljljflag:true
// ljljflag:true
};
},
@ -255,16 +259,11 @@
var that = this
wx.startWifi({
success: function() {
// Wi-Fi
console.log('Wi-Fi 模块已初始化');
// wx.getWifiList
wx.getWifiList({
success: function(res) {
// Wi-Fi
console.log('获取 Wi-Fi 列表成功:', res);
// Wi-Fi
wx.onGetWifiList(function(res) {
// Wi-Fi
console.log('监听到获取到 Wi-Fi 列表:', res.wifiList);
that.wifiList = res.wifiList
//
@ -286,13 +285,11 @@
});
},
fail: function(err) {
// Wi-Fi
console.error('获取 Wi-Fi 列表失败:', err);
}
});
},
fail: function(err) {
//
console.error('Wi-Fi 初始化失败:', err);
}
});
@ -323,30 +320,16 @@
console.log('32751212');
}
},15000)
//
// xBlufi.initXBlufi(1)
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
// xBlufi.notifyStartDiscoverBle({
// 'isStart': true
// })
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
// xBlufi.notifyInitBleEsp32({
// deviceId: this.objlist.deviceId
// })
var that = this
let that = this
wx.startWifi({
success: function() {
// Wi-Fi
console.log('Wi-Fi 模块已初始化');
// wx.getWifiList
wx.getWifiList({
success: function(res) {
// Wi-Fi
console.log('获取 Wi-Fi 列表成功:', res);
// Wi-Fi
wx.onGetWifiList(function(res) {
// Wi-Fi
console.log('ios监听到获取到 Wi-Fi 列表:', res.wifiList);
that.wifiList = res.wifiList
//
@ -366,20 +349,20 @@
that.list = that.wifiList.filter(item => {
return item.SSID !== ''
})
// console.log(that.list, '1010'); //
});
console.log(that.list, '1010'); //
})
},
fail: function(err) {
// Wi-Fi
console.error('获取 Wi-Fi 列表失败:', err);
}
});
})
},
fail: function(err) {
//
console.error('Wi-Fi 初始化失败:', err);
}
});
})
},
//
onShareAppMessage: function () {
@ -399,7 +382,6 @@
},
onUnload: function() {
console.log("unload返回 ");
if (this.dotShowInterval) {
clearInterval(this.dotShowInterval);
}
@ -430,10 +412,10 @@
});
setTimeout(() => {
if (this.devicesList.length == 0) {
uni.showToast({
title: '暂无发现对应设备,请重试',
icon: 'none'
});
// uni.showToast({
// title: ',',
// icon: 'none'
// });
} else {
let uniqueDevicesList = Array.from(new Set(this.devicesList));
this.devicesList = uniqueDevicesList;
@ -918,7 +900,7 @@
.box {
margin-right: 30rpx;
height: 100%;
padding-bottom: 40rpx;
// padding-bottom: 40rpx;
box-sizing: border-box;
}
@ -931,7 +913,6 @@
li {
image {
display: inline-block;
margin-top: 10rpx;
width: 50rpx;
height: 52rpx;
}
@ -944,17 +925,21 @@
// bottom: 50rpx;
border-radius: 52rpx 52rpx 52rpx 52rpx;
// font-weight: 700;
font-size: 38rpx;
width: 100%;
font-size: 28rpx;
width: 650rpx;
margin-top: 20rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 62rpx;
view{
height: 96rpx;
border-radius: 30rpx;
border-radius: 50rpx;
line-height: 96rpx;
box-sizing: border-box;
width: 100%;
// background-color: #8883F0 !important;
color: #8883F0;
background-color: #8883F0 !important;
color: #fff;
text-align: center;
}
}
@ -1093,24 +1078,48 @@
.bdbox {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.wifilist {
.top{
image{
width: 50rpx;
height: 52rpx;
margin-right: 20rpx;
}
display: flex;
align-items: center;
margin-top: 40rpx;
margin-left: 42rpx;
font-size: 28rpx;
color: #77808D;
}
// margin-top: 80rpx;
width: 650rpx;
margin: auto;
margin-top: 26rpx;
height: 960rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx;
overflow: scroll;
.bd {
display: flex;
justify-content: space-between;
width: 100%;
height: 148rpx;
// line-height: 148rpx;
padding-top: 45rpx;
align-items: center;
// justify-content: space-between;
width: 498rpx;
margin: auto;
height: 106rpx;
// line-height: 106rpx;
box-sizing: border-box;
/* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
/* border-radius: 10rpx; */
border-bottom: 1px solid #E5E5E5;
// padding: 26rpx 76rpx;
box-sizing: border-box;
padding-left: 60rpx;
padding-right: 60rpx;
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
border-radius: 10rpx;
margin-top: 20rpx;
.picone {
width: 58rpx;
@ -1129,7 +1138,7 @@
view {
height: 40rpx;
margin-top: 20rpx;
// margin-top: 20rpx;
}
.wz {
@ -1147,13 +1156,26 @@
.device{
width: 650rpx;
height: 176rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
margin: auto;
padding: 28rpx 38rpx;
box-sizing: border-box;
border-radius: 20rpx;
}
.device-list-title {
color: #50565a;
font-size: 86rpx;
font-family: SourceHanSansCN;
margin-top: 100rpx;
font-size: 32rpx;
color: #262B37;
display: flex;
align-items: center;
margin-bottom: 40rpx;
image{
margin-right: 10rpx;
}
}
.text_3 {