htc před 1 týdnem
rodič
revize
45638f5b65
2 změnil soubory, kde provedl 8 přidání a 5 odebrání
  1. 5 3
      pagesMy/wifiSet.vue
  2. 3 2
      pagesMy/wifiSuccess.vue

+ 5 - 3
pagesMy/wifiSet.vue

@@ -110,9 +110,11 @@
 								if(res3.errMsg!=='request:ok') return that.$showToast('设备重启失败')
 								that.flag = true;
 								uni.hideLoading();
-								uni.navigateTo({
-									url:'/pagesMy/wifiSuccess'
-								})
+								setTimeout(()=>{
+									uni.navigateTo({
+										url:'/pagesMy/wifiSuccess'
+									})
+								},2000)
 							},
 							fail:err3=>{
 								that.flag = true;

+ 3 - 2
pagesMy/wifiSuccess.vue

@@ -18,17 +18,18 @@
 		},
 		methods:{
 			scanDevice(){
+				let that = this;
 				uni.scanCode({
 					success: (res) => {
 						let result = JSON.parse(res.result);
 						if(res.errMsg==='scanCode:ok'){
-							this.$api.post('/device/bindAdd',{
+							that.$api.post('/device/bindAdd',{
 								...result,
 								"type": "",
 								"userId": 0,
 								"agentId": ""
 							}).then(res=>{
-								if(res.data.code!==0) return this.$showToast(res.data.msg)
+								if(res.data.code!==0) return that.$showToast(res.data.msg)
 								uni.navigateTo({
 									url:'/pagesMy/scanResult'
 								})