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