feat: 登录接口修改
This commit is contained in:
parent
91185a593a
commit
9123d5f0e4
@ -7,16 +7,16 @@ class KRIsRegister {
|
||||
KRIsRegister({this.kr_isRegister = false});
|
||||
|
||||
KRIsRegister.fromJson(Map<String, dynamic> json) {
|
||||
kr_isRegister = json['Status'] == "true" || json['Status'] == true
|
||||
kr_isRegister = json['exist'] == "true" || json['exist'] == true
|
||||
? true
|
||||
: false || json['status'] == "true" || json['status'] == true
|
||||
: false || json['exist'] == "true" || json['exist'] == true
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['Status'] = kr_isRegister;
|
||||
data['exist'] = kr_isRegister;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,21 +514,22 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.w),
|
||||
Obx(() {
|
||||
final current = controller.kr_subscribeService.kr_currentSubscribe.value;
|
||||
Text(
|
||||
'每个账号最多允许同时使用2台设备同时在线',
|
||||
style: KrAppTextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
/*Obx(() {
|
||||
// final current = controller.kr_subscribeService.kr_currentSubscribe.value;
|
||||
|
||||
// 如果 current 为 null,显示默认值 0
|
||||
final deviceLimit = current?.deviceLimit ?? 0;
|
||||
// final deviceLimit = current?.deviceLimit ?? 0;
|
||||
|
||||
return Text(
|
||||
'每个账号最多允许同时使用$deviceLimit台设备同时在线',
|
||||
style: KrAppTextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
);
|
||||
}),
|
||||
return
|
||||
}),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -315,7 +315,10 @@ class KRLoginController extends GetxController
|
||||
final result = check.fold((l) {
|
||||
KRCommonUtil.kr_showToast(l.msg);
|
||||
return null;
|
||||
}, (isRegistered) => isRegistered ? 2 : 1);
|
||||
}, (isRegistered) {
|
||||
print('isRegistered $isRegistered');
|
||||
return isRegistered ? 2 : 1;
|
||||
});
|
||||
if (result == null) return;
|
||||
type = result;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user