update:新增调瞄通信,优化首页

This commit is contained in:
2026-08-03 16:39:52 +08:00
parent 3ab1ad59bd
commit fac2576b65
4 changed files with 99 additions and 11 deletions
+19
View File
@@ -493,6 +493,25 @@ export const laserAimAPI = async () => {
return request("POST", "/user/device/laserAim");
};
// 调瞄续期只负责发送请求,不等待或处理响应,避免阻塞下一次续期。
export const aimRenewAPI = () => {
const token = uni.getStorageSync(
`${uni.getAccountInfoSync().miniProgram.envVersion}_token`
);
const header = {};
if (token) header.Authorization = `Bearer ${token}`;
uni.request({
url: `${BASE_URL}/user/device/aimRenew`,
method: "POST",
header,
data: {},
timeout: 10000,
success: () => {},
fail: () => {},
});
};
export const laserCloseAPI = async () => {
return request("POST", "/user/device/closeAim");
};