|
|
@@ -43,8 +43,8 @@ class FieldControlPageImpl extends FieldControlPage {
|
|
|
..regName = r.name
|
|
|
..startAt = r.startAt.toPb()
|
|
|
..stopAt = r.stopAt.toPb()
|
|
|
- ..isQueryPwd = r.password != null
|
|
|
- ..queryPasswd = r.password ?? '');
|
|
|
+ ..isQueryPwd = r.passwordQuery != null
|
|
|
+ ..queryPasswd = r.passwordQuery ?? '');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -60,6 +60,7 @@ class RegisterInfo {
|
|
|
var startAt = DateTime.now();
|
|
|
var stopAt = DateTime.now();
|
|
|
String? password;
|
|
|
+ String? passwordQuery;
|
|
|
}
|
|
|
|
|
|
class FieldControlControllerImpl extends FieldControlController {
|
|
|
@@ -84,7 +85,9 @@ class RegisterDialogController extends GetxController {
|
|
|
final selected = Rx<EventInfo?>(null);
|
|
|
final eventList = <EventInfo>[].obs;
|
|
|
final hasPassword = false.obs;
|
|
|
+ final hasPasswordQuery = false.obs;
|
|
|
var password = '';
|
|
|
+ var passwordQuery = '';
|
|
|
late final int mapId;
|
|
|
final api = Get.find<ApiService>();
|
|
|
|
|
|
@@ -188,6 +191,27 @@ class RegisterDialog extends GetView<RegisterDialogController> {
|
|
|
}))),
|
|
|
]),
|
|
|
const SizedBox(height: 21.34),
|
|
|
+ Row(
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ children: [
|
|
|
+ Obx(() => Switch(
|
|
|
+ value: c.hasPasswordQuery.value,
|
|
|
+ onChanged: (v) {
|
|
|
+ c.hasPasswordQuery.value = v;
|
|
|
+ })),
|
|
|
+ const Text('查询密码'),
|
|
|
+ const SizedBox(width: 12),
|
|
|
+ Obx(() => Expanded(
|
|
|
+ child: Visibility(
|
|
|
+ visible: c.hasPasswordQuery.value,
|
|
|
+ child: _TextField(
|
|
|
+ hint: '请输入密码',
|
|
|
+ onChanged: (v) {
|
|
|
+ c.passwordQuery = v;
|
|
|
+ })))),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ const SizedBox(height: 6),
|
|
|
Row(
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
children: [
|
|
|
@@ -196,7 +220,7 @@ class RegisterDialog extends GetView<RegisterDialogController> {
|
|
|
onChanged: (v) {
|
|
|
c.hasPassword.value = v;
|
|
|
})),
|
|
|
- const Text('查询密码'),
|
|
|
+ const Text('赛事密码'),
|
|
|
const SizedBox(width: 12),
|
|
|
Obx(() => Expanded(
|
|
|
child: Visibility(
|
|
|
@@ -265,8 +289,10 @@ class RegisterDialog extends GetView<RegisterDialogController> {
|
|
|
..name = controller.registerName
|
|
|
..startAt = startAt
|
|
|
..stopAt = stopAt
|
|
|
- ..password =
|
|
|
- controller.hasPassword.value ? controller.password : null);
|
|
|
+ ..password = controller.hasPassword.value ? controller.password : null
|
|
|
+ ..passwordQuery = controller.hasPasswordQuery.value
|
|
|
+ ? controller.passwordQuery
|
|
|
+ : null);
|
|
|
}
|
|
|
|
|
|
Future<TimeOfDay?> _showTimePicker(
|