|
@@ -99,7 +99,10 @@
|
|
|
password:this.wifiPwd
|
|
|
},
|
|
|
success:res2=>{
|
|
|
- if(res2.errMsg!=='request:ok') return that.$showToast('设备联网失败')
|
|
|
+ if(res2.errMsg!=='request:ok'){
|
|
|
+ that.show = true;
|
|
|
+ return
|
|
|
+ }
|
|
|
wx.request({
|
|
|
url:'http://192.168.4.1/reboot',
|
|
|
method:'POST',
|
|
@@ -107,12 +110,9 @@
|
|
|
if(res3.errMsg!=='request:ok') return that.$showToast('设备重启失败')
|
|
|
that.flag = true;
|
|
|
uni.hideLoading();
|
|
|
- that.$showToast('联网成功,设备即将重启')
|
|
|
- setTimeout(()=>{
|
|
|
- uni.reLaunch({
|
|
|
- url:'/pages/home'
|
|
|
- })
|
|
|
- },1500)
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pagesMy/wifiSuccess'
|
|
|
+ })
|
|
|
},
|
|
|
fail:err3=>{
|
|
|
that.flag = true;
|
|
@@ -131,6 +131,10 @@
|
|
|
},
|
|
|
toCode(item){
|
|
|
this.wifiSSID = item.ssid;
|
|
|
+ },
|
|
|
+ toTryAgain(){
|
|
|
+ this.show = false;
|
|
|
+ this.toConnectWiFi();
|
|
|
}
|
|
|
}
|
|
|
}
|