You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
568 B

import axios from "axios";
import { showNotify } from "vant"
export function commandOpenDoor(data:any) {
axios({
method: 'post', url: `http://100.64.0.1/api/cabinet/v1/open`, data, headers: {
'Content-Type': 'application/json'
}
}).then(doorRet => {
if (doorRet.data.code == 200) {
// WebSocketFun()
} else if (doorRet.data.code == 201) {
showNotify({ message: '请先打开柜门' })
} else {
showNotify({ message: '请先关闭其他抽屉!' })
}
})
}