fix:修复钥匙实名认证的的问题
This commit is contained in:
parent
51ba82226e
commit
719f39c6d1
@ -351,4 +351,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: 317f9473a5705c6fe4d79d95e81676f248048fdc
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
COCOAPODS: 1.14.3
|
||||
|
||||
@ -180,7 +180,7 @@ class SenderBeforeDataManage {
|
||||
useCountLimit = 1;
|
||||
}
|
||||
|
||||
AppLog.log("startTime.hour:${startTime!.hour} startTime.minute:${startTime!.minute} endTime.hour:${endTime!.hour} endTime.minute:${endTime!.minute}}");
|
||||
AppLog.log("startTime.hour:${startTime?.hour} startTime.minute:${startTime?.minute} endTime.hour:${endTime?.hour} endTime.minute:${endTime?.minute}}");
|
||||
var addUserData = AddUserCommand(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
authUserID: currentKeyInfo.senderUserId!.toString(),
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
@ -135,16 +137,32 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
Future<void> checkRealNameStatus(int realNameAuthStatus) async {
|
||||
//打开实名认证 必须输入身份证号和真实姓名
|
||||
if (realNameAuthStatus == 1) {
|
||||
if (state.getRealName.value.isEmpty ||
|
||||
state.getIDCardNumber.value.isEmpty) {
|
||||
ShowCupertinoAlertView()
|
||||
.showOpenAuthWithIDCardInfoAlert((idCard, realName) {
|
||||
state.getIDCardNumber.value = idCard ?? '';
|
||||
state.getRealName.value = realName ?? '';
|
||||
AdvancedFunctionRecordEntity entity = await ApiRepository.to.keyCheckFace(
|
||||
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
if (state.getRealName.value.isEmpty ||
|
||||
state.getIDCardNumber.value.isEmpty) {
|
||||
ShowCupertinoAlertView()
|
||||
.showOpenAuthWithIDCardInfoAlert((idCard, realName) {
|
||||
state.getIDCardNumber.value = idCard ?? '';
|
||||
state.getRealName.value = realName ?? '';
|
||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||
});
|
||||
} else {
|
||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||
});
|
||||
} else {
|
||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||
}
|
||||
} else if (entity.errorCode == 432) {
|
||||
//432--余量不足,需购买
|
||||
ShowCupertinoAlertView().showBuyTipWithContentAlert(
|
||||
titleStr: '实名认证为付费功能,请购买后再使用'.tr,
|
||||
sureClick: () {
|
||||
Get.toNamed(Routers.advancedFeaturesWebPage,
|
||||
arguments: {'isShop': false});
|
||||
});
|
||||
} else if (entity.errorCode == 433) {
|
||||
//需联系管理员购买
|
||||
ShowCupertinoAlertView().showContactAdministratorBuyAlert();
|
||||
}
|
||||
} else {
|
||||
updateRealNameInfoWithAuthStatus(realNameAuthStatus);
|
||||
@ -231,17 +249,23 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
var textList = <String>[];
|
||||
if (CommonDataManage().currentKeyInfo.keyRight == 1) {
|
||||
textList = [
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen ? '取消冻结'.tr : "冻结".tr
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen
|
||||
? '取消冻结'.tr
|
||||
: "冻结".tr
|
||||
];
|
||||
} else if (CommonDataManage().currentKeyInfo.isLockOwner == 1) {
|
||||
if (state.keyType.value == 1 || state.keyType.value == 2) {
|
||||
textList = [
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen ? '取消冻结'.tr : "冻结".tr,
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen
|
||||
? '取消冻结'.tr
|
||||
: "冻结".tr,
|
||||
state.itemData.value.keyRight == 1 ? '取消授权'.tr : '授权'.tr
|
||||
];
|
||||
} else if (state.keyType.value == 4) {
|
||||
textList = [
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen ? '取消冻结'.tr : "冻结".tr
|
||||
state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen
|
||||
? '取消冻结'.tr
|
||||
: "冻结".tr
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -256,7 +280,8 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
chooseCallback: (value) {
|
||||
int index = value;
|
||||
if (index == 0) {
|
||||
if (state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen) {
|
||||
if (state.itemData.value.keyStatus ==
|
||||
XSConstantMacro.keyStatusFrozen) {
|
||||
// 取消冻结
|
||||
if (state.itemData.value.keyRight == 1) {
|
||||
// 管理员
|
||||
@ -336,8 +361,8 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
return currentController;
|
||||
}
|
||||
|
||||
noModificationAllowedDuringFreeze(){
|
||||
if(state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen){
|
||||
noModificationAllowedDuringFreeze() {
|
||||
if (state.itemData.value.keyStatus == XSConstantMacro.keyStatusFrozen) {
|
||||
showToast("冻结状态下不允许修改钥匙权限".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user