1,新增删除钥匙接口地址

2,新增删除密码接口地址
This commit is contained in:
Daisy 2023-08-29 17:41:20 +08:00
parent 62370f364a
commit 9e26f37585
3 changed files with 29 additions and 1 deletions

View File

@ -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'; //

View File

@ -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 {

View File

@ -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);
}
}