100J分享接口bug修复

This commit is contained in:
fengerli
2026-03-03 17:19:14 +08:00
parent 253733ad2b
commit 569c7cf0b4

View File

@ -231,6 +231,9 @@
deviceUpdateVolume,
deviceVoiceBroadcast
} from '@/api/100J/HBY100-J.js'
import {
deviceShareId
} from '@/api/6170/deviceControl.js'
var these = null;
import Common from '@/utils/Common.js'
const pagePath = "/pages/100/HBY100";
@ -454,16 +457,6 @@
these.Status.apiType = data.apiType;
these.Status.isRightIconVisible = these.Status.apiType === 'listA';
if (data.apiType !== 'listA') {
Common.getdeviceShareId(data.data.id).then(res => {
if (res.code == 200) {
if (res.data.permission) {
these.permissions = res.data.permission.split(',');
}
}
});
}
this.mqttClient = new MqttClient();
this.mqttClient.connect(() => {
@ -503,7 +496,7 @@
.battery_remaining_time //续航时间
// 设备按键, app同步
} else if (funcType == '14') {
// 调节相关字段
// 调节亮度,音量,频率相关字段
these.formData.strobeFrequency = led_strobe.frequency ||
0.5; //频率
these.formData.volume = volume || 10; //音量
@ -587,7 +580,13 @@
})
})
console.log(data, 'datatatatat');
these.fetchDeviceDetail(data.data.id)
if (these.Status.apiType === 'listA') {
these.fetchDeviceDetail(data.data.id)
} else {
console.log('走到这里了没');
// 分享权限详情
these.fetchSharedDeviceDetail(data.data.id)
}
});
this.createThrottledFunctions();
@ -639,6 +638,18 @@
}
})
},
// 获取分享设备详情
async fetchSharedDeviceDetail(id) {
try {
const res = await deviceShareId(id)
if (res.code == 200) {
console.log(this.deviceInfo,'this.deviceInfo');
this.deviceInfo=res.data
}
} catch (error) {
}
},
handleRightClick(item, s) {
if (item && item.callback) {
item.callback(item, s);