// 获取入住记录 export const getCheckinInfo = (hotelId) => { return new Promise((resolve, reject) => { uni.request({ url: `/user/checkinInfo/${hotelId}`, method: "GET", success: (res) => { // console.log("获取入住记录结果", res) resolve(res.data) }, fail: (err) => { console.log("获取入住记录失败", err) reject(res) } }) }) } export const getOpenDoorInfo = (data) => { return new Promise((resolve, reject) => { uni.request({ url: `/user/openDoorInfo`, method: "POST", data: data, success: (res) => { // console.log("获取门锁信息", res) resolve(res.data) }, fail: (err) => { console.log("获取门锁信息失败", err) reject(res) } }) }) } export const unloadBLEOpenDoorLog = (data) => { return new Promise((resolve, reject) => { uni.request({ url: `/user/bleOpLogs`, method: "POST", data: data, success: (res) => { // console.log("上传蓝牙开门记录", res) resolve(res.data) }, fail: (err) => { console.log("上传蓝牙开门记录失败", err) reject(res) } }) }) } export const getElevatorQRCode = (data) => { return new Promise((resolve, reject) => { uni.request({ url: `/user/qrCode`, method: "POST", data: data, success: (res) => { // console.log("获取梯控二维码", res) resolve(res.data) }, fail: (err) => { console.log("获取梯控二维码失败", err) reject(res) } }) }) } export const moveElevator = (deviceId, floor) => { return new Promise((resolve, reject) => { uni.request({ url: `/user/elevator/${deviceId}/${floor}`, method: "POST", success: (res) => { // console.log("获取梯控二维码", res) resolve(res.data) }, fail: (err) => { console.log("获取梯控二维码失败", err) reject(res) } }) }) }