优化
This commit is contained in:
23
src/apis/weightManage/light.ts
Normal file
23
src/apis/weightManage/light.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import http from '@/utils/http'
|
||||
|
||||
const BASE_URL = '/api/light'
|
||||
|
||||
/** @desc 连接灯光 */
|
||||
export function connect() {
|
||||
return http.post<any>(`${BASE_URL}/connect`)
|
||||
}
|
||||
|
||||
/** @desc 断开灯光连接 */
|
||||
export function disconnect() {
|
||||
return http.post<any>(`${BASE_URL}/disconnect`)
|
||||
}
|
||||
|
||||
/** @desc 设置灯光亮度 */
|
||||
export function brightness(materialId: string) {
|
||||
return http.post<any>(`${BASE_URL}/brightness`, { materialId: Number(materialId) })
|
||||
}
|
||||
|
||||
/** @desc 检查灯光状态 */
|
||||
export function status() {
|
||||
return http.get<any>(`${BASE_URL}/status`)
|
||||
}
|
||||
Reference in New Issue
Block a user