This commit is contained in:
3321822538@qq.com 2024-12-23 18:14:38 +08:00
parent ea71dcdbfa
commit 8ff13508d8

View File

@ -258,13 +258,15 @@
ljljflag:true, ljljflag:true,
timer: null, timer: null,
lianjieflag:false, lianjieflag:false,
ljtxt:'连接中' ljtxt:'连接中',
successflag:true
}; };
}, },
// components: {}, // components: {},
props: {}, props: {},
onShow: function(options) { onShow: function(options) {
this.statusflag = false
// //
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') { if (systemInfo.platform === 'android') {
@ -719,43 +721,42 @@
break break
case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT: case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT:
uni.hideLoading(); uni.hideLoading();
if (!options.result) if (this.successflag == true) {
this.textwifi = '连接', this.successflag = false;
this.ssid = '', if (!options.result) {
this.statusflag = false, this.textwifi = '连接';
// uni.hideLoading(), this.ssid = '';
this.statusflag = false;
let that = this;
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '配网失败请选择2.4GWiFi连接并确保密码正确', content: '配网失败请选择2.4GWiFi连接并确保密码正确',
showCancel: false ,//
success:function(res) {
// let that = this
// uni.reLaunch({
// url:'/page_user/sbdetail?id=' + that.objlist.id
// })
}
});
else {
if (options.data.progress == 100) {
let ssid = options.data.ssid;
this.statusflag = false
uni.hideLoading();
this.textwifi = '连接'
this.maskflag = false
this.sdmaskflag = false
let that = this
uni.showModal({
title: '温馨提示',
content: `WIFI${this.ssid}配网成功`,
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
// that.successflag = true;
}
});
} else {
if (options.data.progress == 100) {
let ssid = options.data.ssid;
that.statusflag = false;
uni.hideLoading();
that.textwifi = '连接';
that.maskflag = false;
that.sdmaskflag = false;
uni.showModal({
title: '温馨提示',
content: `WIFI${that.ssid}配网成功`,
showCancel: false,
success: function(res) {
// that.successflag = true;
uni.reLaunch({ uni.reLaunch({
url:'/page_user/sbdetail?id=' + that.objlist.id url: '/page_user/sbdetail?id=' + that.objlist.id
}) });
}
});
} }
})
} }
break;
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA: