1,新增删除钥匙接口地址
2,新增删除密码接口地址
This commit is contained in:
parent
62370f364a
commit
9e26f37585
@ -25,7 +25,8 @@ abstract class Api {
|
||||
'/key/modifyKeyNameForAdmin'; //编辑电子钥匙名字
|
||||
final String passwordKeyListURL = '/keyboardPwd/listSendRecords'; //密码钥匙列表
|
||||
final String passwordKeyResetURL = '/keyboardPwd/reset'; //密码钥匙重置
|
||||
|
||||
final String deleteElectronicKeyURL = '/keyboardPwd/reset'; //删除电子钥匙
|
||||
final String deleteKeyboardPwdURL = '/keyboardPwd/reset'; //删除密码
|
||||
final String getLockInfoURL = '/lock/syncDataPage'; // 获取锁信息
|
||||
|
||||
final String passwordKeyGetURL = '/keyboardPwd/get'; //获取密码
|
||||
|
||||
@ -315,6 +315,19 @@ class ApiProvider extends BaseProvider {
|
||||
|
||||
Future<Response> lockGroupList(String type) =>
|
||||
post(lockGroupListURL.toUrl, jsonEncode({'type': type}));
|
||||
|
||||
Future<Response> deleteElectronicKey(String keyId) =>
|
||||
post(deleteElectronicKeyURL.toUrl, jsonEncode({'keyId': keyId}));
|
||||
|
||||
Future<Response> deleteKeyboardPwd(
|
||||
String keyId, String keyboardPwdId, String deleteType) =>
|
||||
post(
|
||||
deleteKeyboardPwdURL.toUrl,
|
||||
jsonEncode({
|
||||
'keyId': keyId,
|
||||
'keyboardPwdId': keyboardPwdId,
|
||||
'deleteType': deleteType
|
||||
}));
|
||||
}
|
||||
|
||||
extension ExtensionString on String {
|
||||
|
||||
@ -302,4 +302,18 @@ class ApiRepository {
|
||||
final res = await apiProvider.lockGroupList(type);
|
||||
return LockGroupListEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
//删除电子钥匙
|
||||
Future<LockGroupListEntity> deleteElectronicKey(String type) async {
|
||||
final res = await apiProvider.deleteElectronicKey(type);
|
||||
return LockGroupListEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
//删除密码
|
||||
Future<LockGroupListEntity> deleteKeyboardPwd(
|
||||
String keyId, String keyboardPwdId, String deleteType) async {
|
||||
final res =
|
||||
await apiProvider.deleteKeyboardPwd(keyId, keyboardPwdId, deleteType);
|
||||
return LockGroupListEntity.fromJson(res.body);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user