aaa
This commit is contained in:
		
							parent
							
								
									db9769f8bb
								
							
						
					
					
						commit
						f13de0eafd
					
				|  | @ -20,8 +20,8 @@ const install = (Vue, vm) => { | |||
| 	// 	},
 | ||||
| 	// }); 
 | ||||
| 	Vue.prototype.$u.http.setConfig({ | ||||
| 			// baseUrl: 'http://192.168.2.184:3000/dev-api',
 | ||||
| 			baseUrl: 'https://kg.chuantewulian.cn/prod-api', | ||||
| 			baseUrl: 'http://192.168.2.17:3000/dev-api', | ||||
| 			// baseUrl: 'https://kg.chuantewulian.cn/prod-api',
 | ||||
| 			loadingText: '努力加载中~', | ||||
| 			loadingTime: 1000, | ||||
| 			// 设置自定义头部content-type
 | ||||
|  |  | |||
|  | @ -219,6 +219,7 @@ | |||
| 					if (res.code == 200) { | ||||
| 						this.mac = 'CTKG-' + res.data.mac | ||||
| 						this.onlineStatus = res.data.onlineStatus | ||||
| 						// console.log(this.mac,'期初'); | ||||
| 					} | ||||
| 				}) | ||||
| 			}, | ||||
|  | @ -313,8 +314,9 @@ | |||
| 							content: '支付的时候请靠近设备并打开蓝牙', | ||||
| 							success: function(res) { | ||||
| 								if (res.confirm) { | ||||
| 									console.log(that.deviceId,that.name); | ||||
| 									xBlufi.initXBlufi(1); | ||||
| 									xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent); | ||||
| 									xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent); | ||||
| 									xBlufi.notifyStartDiscoverBle({ | ||||
| 										'isStart': true | ||||
| 									}) | ||||
|  | @ -322,11 +324,11 @@ | |||
| 										xBlufi.notifyStartDiscoverBle({ | ||||
| 											'isStart': false | ||||
| 										}) | ||||
| 										if (this.devicesList.length > 0) { | ||||
| 										if (that.devicesList.length > 0) { | ||||
| 											xBlufi.notifyConnectBle({ | ||||
| 												isStart: true, | ||||
| 												deviceId: this.deviceId, | ||||
| 												name: this.name | ||||
| 												deviceId: that.deviceId, | ||||
| 												name: that.name | ||||
| 											}) | ||||
| 										} | ||||
| 									}, 2000) | ||||
|  | @ -407,9 +409,11 @@ | |||
| 							let devicesarr = options.data | ||||
| 							devicesarr.forEach(device => { | ||||
| 								const mac = device.name.substring(4); | ||||
| 								console.log(device.name,this.mac,'111'); | ||||
| 								if (device.name == this.mac) { | ||||
| 									this.deviceId = device.deviceId | ||||
| 									this.name = device.name | ||||
| 									console.log(device.name,this.mac,'222'); | ||||
| 									this.devicesList.push(device); | ||||
| 									let uniqueDevicesList = Array.from(new Set(this.devicesList)); | ||||
| 									// 将去重后的数组重新赋值给 this.devicesList | ||||
|  |  | |||
|  | @ -225,7 +225,7 @@ | |||
| 						if (!options.result) { | ||||
| 							console.log("蓝牙未开启", options); | ||||
| 							uni.showToast({ | ||||
| 								title: '蓝牙未开启,如有疑问请查看查看常见问题', | ||||
| 								title: '蓝牙未开启,请打开手机蓝牙', | ||||
| 								icon: 'none', | ||||
| 								duration: 3000 | ||||
| 							}); | ||||
|  | @ -284,7 +284,7 @@ | |||
| 				xBlufi.notifyStartDiscoverBle({ | ||||
| 					'isStart': false | ||||
| 				}); | ||||
| 				console.log(e, '蓝牙信息101010') | ||||
| 				console.log(e, '蓝牙信息101010')  | ||||
| 				const deviceId = e.deviceId | ||||
| 				this.Bluetoothmac = e.localName.substring(6) //从第七位开始截取 只取后面的mac号 | ||||
| 				this.mac = e.localName.substring(6) | ||||
|  |  | |||
|  | @ -333,6 +333,7 @@ | |||
| 			}, | ||||
| 
 | ||||
| 			handleMarkerClick(e) { | ||||
| 				console.log(e); | ||||
| 				this.$u.get("/app/store/" + e.markerId).then(res => { | ||||
| 					if (res.code == 200) { | ||||
| 						this.listobj = res.data | ||||
|  |  | |||
|  | @ -233,6 +233,15 @@ | |||
| 						"navigationBarTextStyle": "#FFFFFF", | ||||
| 						"navigationStyle": "custom" | ||||
| 					} | ||||
| 				},{ | ||||
| 					"path": "zhuce", | ||||
| 					"style": { | ||||
| 						"navigationBarTitleText": "", | ||||
| 						"enablePullDownRefresh": false, | ||||
| 						"navigationBarBackgroundColor": "#3996FD", | ||||
| 						"navigationBarTextStyle": "#FFFFFF", | ||||
| 						"navigationStyle": "custom" | ||||
| 					} | ||||
| 				},{ | ||||
| 					"path": "device/lianjie", | ||||
| 					"style": { | ||||
|  |  | |||
|  | @ -125,23 +125,18 @@ | |||
| 									uni.navigateTo({ | ||||
| 										url: '/page_user/sbdetail?id=' +that.deviceobj.deviceId | ||||
| 									}) | ||||
| 									// uni.showModal({ | ||||
| 									// 	title: '提示', | ||||
| 									// 	content: '绑定成功,需前去设置吗?', | ||||
| 									// 	success: function(res) { | ||||
| 									// 		if (res.confirm) { | ||||
| 												 | ||||
| 									// 		} else if (res.cancel) { | ||||
| 
 | ||||
| 									// 		} | ||||
| 									// 	} | ||||
| 									// }) | ||||
| 								} else { | ||||
| 									uni.showToast({ | ||||
| 										title: res.msg, | ||||
| 										icon: 'none', | ||||
| 										duration: 1000 | ||||
| 									}) | ||||
| 								}else { | ||||
| 									if(res.msg == '设备未录入'){ | ||||
| 										uni.navigateTo({ | ||||
| 											url:'/page_fenbao/zhuce?sn=' + id | ||||
| 										}) | ||||
| 									}else{ | ||||
| 										uni.showToast({ | ||||
| 											title: res.msg, | ||||
| 											icon: 'none', | ||||
| 											duration: 1000 | ||||
| 										}) | ||||
| 									} | ||||
| 								} | ||||
| 							}) | ||||
| 						} else if (res.cancel) { | ||||
|  | @ -375,7 +370,7 @@ | |||
| 						} | ||||
| 					}, | ||||
| 					fail: (error) => { | ||||
| 						console.error('获取地图缩放级别失败:', error); | ||||
| 						// console.error('获取地图缩放级别失败:', error); | ||||
| 					}, | ||||
| 				}) | ||||
| 			}, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user