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