This commit is contained in:
魏少阳 2023-08-30 10:56:23 +08:00
commit f95eebc74e
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 deletLockURL = '/lock/delete'; //

View File

@ -324,6 +324,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

@ -309,4 +309,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);
}
}