循环密码日期格式问题修复
This commit is contained in:
parent
31e3250cec
commit
f5e978e32c
@ -79,6 +79,8 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
||||
//清空码
|
||||
getKeyType = '4';
|
||||
}
|
||||
print('得到的类型为getKeyType$getKeyType');
|
||||
|
||||
if (state.widgetType.value != '0' &&
|
||||
state.widgetType.value != '2' &&
|
||||
state.widgetType.value != '5') {
|
||||
|
||||
@ -49,12 +49,13 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
if (!state.isInitialized.value) {
|
||||
state.isInitialized.value = true;
|
||||
state.keyInfo.value = widget.getKeyInfo;
|
||||
state.widgetType.value = widget.type;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
state.widgetType.value = widget.type;
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Obx(() => indexChangeWidget()),
|
||||
);
|
||||
@ -290,19 +291,11 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// Pickers.showDatePicker(context, mode: DateMode.H, onConfirm: (p) {
|
||||
// state.effectiveDateTime.value = DateTime.parse(
|
||||
// '${p.year}-${intToStr(p.month!)}-${intToStr(p.day!)} ${intToStr(p.hour!)}');
|
||||
// state.loopEffectiveDate.value =
|
||||
// "${formatDate(state.effectiveDateTime.value, [HH])}:00";
|
||||
// state.loopStartHours.value = p.hour!;
|
||||
// state.selectEffectiveDate.value = state.loopEffectiveDate.value;
|
||||
// });
|
||||
Pickers.showDatePicker(context, mode: DateMode.H, onConfirm: (p) {
|
||||
DateTime selectedDateTime = DateTime(
|
||||
p.year!,
|
||||
p.month!,
|
||||
p.day!,
|
||||
DateTime.now().year,
|
||||
DateTime.now().month,
|
||||
DateTime.now().day,
|
||||
p.hour!,
|
||||
);
|
||||
|
||||
@ -311,8 +304,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
state.loopEffectiveDate.value =
|
||||
"${formatDate(state.effectiveDateTime.value, [HH])}:00";
|
||||
state.loopStartHours.value = p.hour!;
|
||||
state.selectEffectiveDate.value =
|
||||
state.loopEffectiveDate.value;
|
||||
// state.selectEffectiveDate.value =
|
||||
// formatDate(state.effectiveDateTime.value, [HH]);
|
||||
} else {
|
||||
// 处理日期不合法的情况,可以使用默认值或者其他策略
|
||||
}
|
||||
@ -323,19 +316,11 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
rightTitle: state.loopFailureDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// Pickers.showDatePicker(context, mode: DateMode.H, onConfirm: (p) {
|
||||
// state.failureDateTime.value = DateTime.parse(
|
||||
// '${p.year}-${intToStr(p.month!)}-${intToStr(p.day!)} ${intToStr(p.hour!)}');
|
||||
// state.loopFailureDate.value =
|
||||
// "${formatDate(state.failureDateTime.value, [HH])}:00";
|
||||
// state.loopEndHours.value = p.hour!;
|
||||
// state.selectFailureDate.value = state.loopFailureDate.value;
|
||||
// });
|
||||
Pickers.showDatePicker(context, mode: DateMode.H, onConfirm: (p) {
|
||||
DateTime selectedDateTime = DateTime(
|
||||
p.year!,
|
||||
p.month!,
|
||||
p.day!,
|
||||
DateTime.now().year,
|
||||
DateTime.now().month,
|
||||
DateTime.now().day,
|
||||
p.hour!,
|
||||
);
|
||||
|
||||
@ -344,7 +329,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
state.loopFailureDate.value =
|
||||
"${formatDate(state.failureDateTime.value, [HH])}:00";
|
||||
state.loopEndHours.value = p.hour!;
|
||||
state.selectFailureDate.value = state.loopFailureDate.value;
|
||||
// state.selectFailureDate.value =
|
||||
// formatDate(state.failureDateTime.value, [HH]);
|
||||
} else {
|
||||
// 处理日期不合法的情况,可以使用默认值或者其他策略
|
||||
}
|
||||
|
||||
@ -56,9 +56,7 @@ class BaseProvider extends GetConnect with Api {
|
||||
body: rs as T,
|
||||
statusText: res.statusText,
|
||||
);
|
||||
}else{
|
||||
|
||||
}
|
||||
} else {}
|
||||
// print('得到的数据======>bodyString:${res.bodyString} body:${res.body} bodyBytes:${res.bodyBytes} status:${res.status} statusText:${res.statusText} statusCode:${res.statusCode}');
|
||||
getDataResult(res.body);
|
||||
return res;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user