Bladeren bron

接口bug 修复

lilei 4 jaren geleden
bovenliggende
commit
ce654b67d3
3 gewijzigde bestanden met toevoegingen van 8 en 2 verwijderingen
  1. 3 2
      pages/index/index.vue
  2. 1 0
      pages/tdRecord/tdRecord.vue
  3. 4 0
      pages/userAuth/userAuth.vue

+ 3 - 2
pages/index/index.vue

@@ -200,8 +200,9 @@
 					// 监听寻找到新设备的事件
 					uni.onBluetoothDeviceFound(function (res) {
 					  let devices = res.devices.filter(item => item.name == 'FAYA')
-					  console.log(devices,'devices list')
-					  if(devices.length){
+					  const hasDev = _this.deviceList.find(item => item.deviceId == res.devices[0].deviceId)
+					  console.log(devices,hasDev,'devices list')
+					  if(devices.length&&!hasDev){
 						  _this.statusStr = '已发现设备'
 						  _this.deviceList = _this.deviceList.concat(res.devices)
 						  _this.loading = false

+ 1 - 0
pages/tdRecord/tdRecord.vue

@@ -136,6 +136,7 @@
 	}
 	.list{
 		flex-grow: 1;
+		height: calc(100vh - 76rpx);
 		overflow: auto;
 	}
 	.list-box{

+ 4 - 0
pages/userAuth/userAuth.vue

@@ -206,6 +206,10 @@
 						this.stationName = res.data.stationEntity.name
 						this.formData.srcDeviceCode = this.deviceId
 						this.formData.operatorNo = this.$store.state.vuex_userData.id
+					}else{
+						setTimeout(()=>{
+							uni.navigateBack()
+						},500)
 					}
 				})
 			},