Merge commit '51d225af4cfd9b2c0f1b7032b5fdd4f6e643c4f1' into fanpeng
This commit is contained in:
commit
d1914a3eff
@ -166,4 +166,13 @@ const data = await $starCloud.syncAllOpenRecord(params)
|
|||||||
* @returns {Promise<Result>}
|
* @returns {Promise<Result>}
|
||||||
*/
|
*/
|
||||||
const data = await $starCloud.getServerTimestamp()
|
const data = await $starCloud.getServerTimestamp()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取锁支持项
|
||||||
|
* @param params
|
||||||
|
* @param {AccountInfo} params.accountInfo 账号信息
|
||||||
|
* @param {Number} params.lockId 锁 Id
|
||||||
|
* @returns {Promise<Result>}
|
||||||
|
*/
|
||||||
|
const data = await $starCloud.getLockSupportFeatures(params)
|
||||||
```
|
```
|
||||||
|
|||||||
@ -161,3 +161,12 @@ export function uploadRecordRequest(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取锁应用设置
|
||||||
|
export function getLockSettingDataRequest(data) {
|
||||||
|
return request({
|
||||||
|
url: '/v1/lock/getLockSettingData',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import {
|
|||||||
getLastRecordTimeRequest,
|
getLastRecordTimeRequest,
|
||||||
getLockDetailRequest,
|
getLockDetailRequest,
|
||||||
getLockNetTokenRequest,
|
getLockNetTokenRequest,
|
||||||
|
getLockSettingDataRequest,
|
||||||
getOfflinePasswordRequest,
|
getOfflinePasswordRequest,
|
||||||
getServerDatetimeRequest,
|
getServerDatetimeRequest,
|
||||||
getStarCloudToken,
|
getStarCloudToken,
|
||||||
@ -51,6 +52,7 @@ import log from '@/starCloud/log'
|
|||||||
* @typedef {Object} OfflinePassword
|
* @typedef {Object} OfflinePassword
|
||||||
* @property {String} keyboardPwdName - 密码名称
|
* @property {String} keyboardPwdName - 密码名称
|
||||||
* @property {Number} keyboardPwdType - 密码类型
|
* @property {Number} keyboardPwdType - 密码类型
|
||||||
|
* @property {Number} lockId - 锁 Id
|
||||||
* @property {Number} isCoerced - 胁迫 1:胁迫 2:非胁迫
|
* @property {Number} isCoerced - 胁迫 1:胁迫 2:非胁迫
|
||||||
* @property {Number} startDate - 开始时间
|
* @property {Number} startDate - 开始时间
|
||||||
* @property {Number} endDate - 结束时间
|
* @property {Number} endDate - 结束时间
|
||||||
@ -532,10 +534,7 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
if (result.code !== Result.Success.code) {
|
if (result.code !== Result.Success.code) {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
return await getOfflinePasswordRequest({
|
return await getOfflinePasswordRequest(password)
|
||||||
...password,
|
|
||||||
lockId: this.lockInfo.lockId
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 自定义密码
|
* 自定义密码
|
||||||
@ -1164,6 +1163,32 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
return new Result(code, data, message)
|
return new Result(code, data, message)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取锁支持项
|
||||||
|
* @param params
|
||||||
|
* @param {AccountInfo} params.accountInfo 账号信息
|
||||||
|
* @param {Number} params.lockId 锁 Id
|
||||||
|
* @returns {Promise<Result>}
|
||||||
|
*/
|
||||||
|
async getLockSupportFeatures(params) {
|
||||||
|
const { accountInfo, lockId } = params
|
||||||
|
|
||||||
|
// 设置执行账号
|
||||||
|
const result = await this.login(accountInfo)
|
||||||
|
if (result.code !== Result.Success.code) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
const { code, data, message } = await getLockSettingDataRequest({
|
||||||
|
lockId: lockId
|
||||||
|
})
|
||||||
|
if (code === Result.Success.code) {
|
||||||
|
return new Result(code, { ...data.lockFeature }, message)
|
||||||
|
} else {
|
||||||
|
return new Result(code, data, message)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清理用户
|
* 清理用户
|
||||||
* @returns {Promise<Result>}
|
* @returns {Promise<Result>}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user