绑定设备功能 (#294)

Co-authored-by: CGD <3030332422@qq.com>
This commit is contained in:
欣南科技
2025-03-12 12:44:25 +08:00
committed by GitHub
co-authored by CGD
parent 7c5f2d95a4
commit 81fee53085
2 changed files with 36 additions and 3 deletions
+16
View File
@@ -58,4 +58,20 @@ export default {
});
}).send()
},
// 绑定设备
bindDevice(deviceCode, callback) {
RequestService.sendRequest()
.url(`${getServiceUrl()}/api/v1/user/device/bind/${deviceCode}`)
.method('POST')
.success((res) => {
RequestService.clearRequestTime();
callback(res);
})
.fail((err) => {
console.error('绑定设备失败:', err);
RequestService.reAjaxFun(() => {
this.bindDevice(deviceCode, callback);
});
}).send();
}
}