Commit 33942358 by 姜雷

修改洗浴设备蓝牙获取服务方式

parent 155d8039
......@@ -730,7 +730,15 @@ class Shower extends Component {
.then(res => {
const deviceId = res.deviceId;
const services = res.services;
let service = services[services.length - 1];
let service = services.find(
item =>
item.uuid.toLocaleLowerCase() ===
'6e401103-b5a3-f393-e0a9-e50e24dcca9e',
);
if (!service) {
service = services[0];
}
console.log('获取全部services: ', services, '. serviceId: ', service);
const serviceId = service.uuid;
this.setState(({ deviceInfo }: PageState) => ({
deviceInfo: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment