1,新增全局的常量定义
2,修复有效期显示错乱问题 3,删除账号 优先显示问题修复
This commit is contained in:
parent
a0c8e0832b
commit
f9c25b2917
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -150,7 +151,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
DateTime startDateStr =
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!);
|
||||
@ -158,15 +159,15 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!);
|
||||
useDateStr =
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}';
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -141,7 +142,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
DateTime startDateStr =
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!);
|
||||
@ -149,15 +150,15 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!);
|
||||
useDateStr =
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}';
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/tools/noData.dart';
|
||||
@ -223,7 +224,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
DateTime startDateStr =
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!);
|
||||
@ -231,15 +232,15 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!);
|
||||
useDateStr =
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}';
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart';
|
||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -88,7 +89,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.periodValidity!.tr,
|
||||
rightTitle: getUseDateStr(itemData),
|
||||
rightTitle: getUseDateStr(_lockData),
|
||||
allHeight: 70.h,
|
||||
isHaveLine: false),
|
||||
SizedBox(
|
||||
@ -159,7 +160,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(LockData indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
if (indexEntity.startDate != null && indexEntity.endDate != null) {
|
||||
DateTime startDateStr =
|
||||
@ -171,13 +172,13 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
||||
} else {
|
||||
useDateStr = '限期';
|
||||
}
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
useDateStr = '永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
useDateStr = '单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -246,18 +246,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||
// ),
|
||||
// Obx(() =>
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: CommonItem(
|
||||
leftTitel: '感应距离',
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Toast.show(msg: "功能暂未开放");
|
||||
})),
|
||||
// ),
|
||||
|
||||
// Obx(() =>
|
||||
Visibility(
|
||||
visible: true,
|
||||
@ -292,6 +281,18 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||
// ),
|
||||
// Obx(() =>
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: CommonItem(
|
||||
leftTitel: '感应距离',
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Toast.show(msg: "功能暂未开放");
|
||||
})),
|
||||
// ),
|
||||
// Obx(() =>
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: CommonItem(
|
||||
@ -538,8 +539,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
}
|
||||
|
||||
void showDeletPasswordAlertDialog(
|
||||
BuildContext context,
|
||||
) {
|
||||
BuildContext context,
|
||||
) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
@ -549,9 +550,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
controller: state.passwordTF,
|
||||
sureClick: () {
|
||||
//发送编辑钥匙名称请求
|
||||
if (state.passwordTF.text.isNotEmpty) {
|
||||
|
||||
}
|
||||
if (state.passwordTF.text.isNotEmpty) {}
|
||||
},
|
||||
cancelClick: () {
|
||||
Navigator.pop(context);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -100,15 +99,15 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
|
||||
Widget unHaveData() {
|
||||
return Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 330.w,
|
||||
height: 330.w,
|
||||
margin: EdgeInsets.only(top: 180.h),
|
||||
// height: 330.w,
|
||||
// margin: EdgeInsets.only(top: 180.h),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(width: 4.w, color: AppColors.mainColor),
|
||||
// borderRadius: BorderRadius.circular(110.w),
|
||||
@ -118,8 +117,8 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
padding: const EdgeInsets.all(30.0),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_unHaveLockData.png',
|
||||
width: 150.w,
|
||||
height: 150.w,
|
||||
width: 260.w,
|
||||
height: 260.w,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
@ -136,7 +135,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
],
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 10.h),
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Text(
|
||||
TranslationLoader
|
||||
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
||||
@ -146,11 +145,14 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
||||
color: Colors.black),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 200.h,
|
||||
height: 160.h,
|
||||
),
|
||||
SubmitBtn(btnName: '演示模式', onClick: (){
|
||||
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||
},)
|
||||
SubmitBtn(
|
||||
btnName: '演示模式',
|
||||
onClick: () {
|
||||
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/network/api.dart';
|
||||
|
||||
import '../../app_settings/app_colors.dart';
|
||||
@ -9,19 +10,6 @@ import '../../tools/commonItem.dart';
|
||||
import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
// 网页的宏定义网址
|
||||
class XSWebviewURLMacro {
|
||||
static String baseWebURL = Api.baseAddress; //base地址
|
||||
static String userAgreementURL = '$baseWebURL/app/userAgreement'; //用户协议
|
||||
static String privacyPolicyURL = '$baseWebURL/app/privacy'; //隐私政策
|
||||
static String collectionListURL =
|
||||
'$baseWebURL/app/personalInformationCollectionList'; //个人信息收集清单
|
||||
static String thirdPartyInfShareListURL =
|
||||
'$baseWebURL/app/thirdPartyInformationSharingList'; //第三方信息共享清单
|
||||
static String appPermissionDescURL =
|
||||
'$baseWebURL/app/applicationPermissionDescription'; //应用权限说明
|
||||
}
|
||||
|
||||
class AbountPage extends StatefulWidget {
|
||||
const AbountPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -72,7 +60,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.userAgreementURL,
|
||||
"url": XSConstantMacro.introduceURL,
|
||||
"title": '介绍'
|
||||
});
|
||||
}),
|
||||
@ -90,7 +78,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.userAgreementURL,
|
||||
"url": XSConstantMacro.userAgreementURL,
|
||||
"title": '用户协议'
|
||||
});
|
||||
}),
|
||||
@ -108,7 +96,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.privacyPolicyURL,
|
||||
"url": XSConstantMacro.privacyPolicyURL,
|
||||
"title": '隐私政策'
|
||||
});
|
||||
}),
|
||||
@ -127,7 +115,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.collectionListURL,
|
||||
"url": XSConstantMacro.collectionListURL,
|
||||
"title": '个人信息收集清单'
|
||||
});
|
||||
}),
|
||||
@ -146,7 +134,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.appPermissionDescURL,
|
||||
"url": XSConstantMacro.appPermissionDescURL,
|
||||
"title": '应用权限说明'
|
||||
});
|
||||
}),
|
||||
@ -165,7 +153,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||
arguments: {
|
||||
"url": XSWebviewURLMacro.thirdPartyInfShareListURL,
|
||||
"url": XSConstantMacro.thirdPartyInfShareListURL,
|
||||
"title": '第三方信息共享清单'
|
||||
});
|
||||
}),
|
||||
|
||||
@ -82,7 +82,7 @@ class _SafeVerifyPageState extends State<SafeVerifyPage> {
|
||||
Obx(() => Padding(
|
||||
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||
child: Text(
|
||||
'请点击获取验证码,验证码将发送到${state.loginData.value.mobile}',
|
||||
'请点击获取验证码,验证码将发送到${state.accountStr.value}',
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 22.sp),
|
||||
),
|
||||
|
||||
@ -19,6 +19,9 @@ class SafeVerifyState {
|
||||
var xWidth = ''.obs; // 滑动验证码滑动位置
|
||||
var canSub = false.obs;
|
||||
var date = currentTimeMillis().toString().obs;
|
||||
var accountStr = ''.obs;
|
||||
var toggleStr = ''.obs; //可切换字眼
|
||||
var isToggle = false.obs; //是否点击切换
|
||||
|
||||
bool get codeIsOK => verificationCode.value.isNotEmpty;
|
||||
|
||||
@ -42,6 +45,23 @@ class SafeVerifyState {
|
||||
print("getLoginData:$data");
|
||||
if (data != null && data.isNotEmpty) {
|
||||
loginData.value = LoginData.fromJson(jsonDecode(data));
|
||||
|
||||
//有手机号无邮箱 优先显示手机号 不可切换
|
||||
if (loginData.value.mobile!.isNotEmpty &&
|
||||
loginData.value.email!.isEmpty) {
|
||||
accountStr.value = loginData.value.mobile!;
|
||||
isToggle.value = false;
|
||||
} else if (loginData.value.mobile!.isNotEmpty &&
|
||||
loginData.value.email!.isNotEmpty) {
|
||||
//有手机号有邮箱 优先显示手机号 可切换至邮箱
|
||||
accountStr.value = loginData.value.mobile!;
|
||||
isToggle.value = true;
|
||||
} else if (loginData.value.mobile!.isNotEmpty &&
|
||||
loginData.value.email!.isNotEmpty) {
|
||||
//无手机号有邮箱 优先显示邮箱 不可切换
|
||||
accountStr.value = loginData.value.email!;
|
||||
isToggle.value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetailEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -133,7 +134,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(AuthorizedAdminListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
DateTime startDateStr =
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.startDate!);
|
||||
@ -141,15 +142,15 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
DateTime.fromMillisecondsSinceEpoch(indexEntity.endDate!);
|
||||
useDateStr =
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)}\n${endDateStr.toLocal().toString().substring(0, 16)}';
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdminListEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
@ -212,7 +213,7 @@ class _AuthorizedAdministratorListPageState
|
||||
//使用期限
|
||||
String getUseDateStr(AuthorizedAdminListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
if (indexEntity.startDate != null && indexEntity.endDate != null) {
|
||||
DateTime startDateStr =
|
||||
@ -224,13 +225,13 @@ class _AuthorizedAdministratorListPageState
|
||||
} else {
|
||||
useDateStr = '限期';
|
||||
}
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
useDateStr = '永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
useDateStr = '单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get_utils/get_utils.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockUserManage/keyListByUserEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
@ -100,7 +101,7 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
|
||||
//使用期限
|
||||
String getUseDateStr(KeyListItem indexEntity) {
|
||||
String useDateStr = '';
|
||||
if (indexEntity.keyType == 1) {
|
||||
if (indexEntity.keyType == XSConstantMacro.keyTypeTime) {
|
||||
//限期
|
||||
if (indexEntity.startDate != null && indexEntity.endDate != null) {
|
||||
DateTime startDateStr =
|
||||
@ -112,13 +113,13 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
|
||||
} else {
|
||||
useDateStr = '限期';
|
||||
}
|
||||
} else if (indexEntity.keyType == 2) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||
//永久
|
||||
useDateStr = '永久';
|
||||
} else if (indexEntity.keyType == 3) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||
//单次
|
||||
useDateStr = '单次';
|
||||
} else if (indexEntity.keyType == 4) {
|
||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||
//循环
|
||||
useDateStr = '循环';
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
logic.userLogoutRequest();
|
||||
}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
padding: EdgeInsets.only(right: 30.w, top: 30.h),
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user