From 8ff13508d8132aba69ee6d1f5f1baad57231d562 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Mon, 23 Dec 2024 18:14:38 +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 --- page_components/wifilist/index.vue | 85 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/page_components/wifilist/index.vue b/page_components/wifilist/index.vue index bb8761c..31e3032 100644 --- a/page_components/wifilist/index.vue +++ b/page_components/wifilist/index.vue @@ -258,13 +258,15 @@ ljljflag:true, timer: null, lianjieflag:false, - ljtxt:'连接中' + ljtxt:'连接中', + successflag:true }; }, // components: {}, props: {}, onShow: function(options) { + this.statusflag = false // 判断手机是什么型号 let systemInfo = uni.getSystemInfoSync(); if (systemInfo.platform === 'android') { @@ -717,47 +719,46 @@ } } break - case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT: - uni.hideLoading(); - if (!options.result) - this.textwifi = '连接', - this.ssid = '', - this.statusflag = false, - // uni.hideLoading(), - uni.showModal({ - title: '温馨提示', - 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, - success: function(res) { - uni.reLaunch({ - url:'/page_user/sbdetail?id=' + that.objlist.id - }) - } - }) - } - break; - } - break; + case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT: + uni.hideLoading(); + if (this.successflag == true) { + this.successflag = false; + if (!options.result) { + this.textwifi = '连接'; + this.ssid = ''; + this.statusflag = false; + let that = this; + uni.showModal({ + title: '温馨提示', + content: '配网失败,请选择2.4GWiFi连接并确保密码正确', + showCancel: false, + 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({ + url: '/page_user/sbdetail?id=' + that.objlist.id + }); + } + }); + } + } + } + break; case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA: this.loadPercent = options.data; this.loadText = '文件读取中'