更新设备控制
This commit is contained in:
@@ -980,6 +980,9 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
|||||||
|
|
||||||
if (deviceCalibrationController.process.value == 1) {
|
if (deviceCalibrationController.process.value == 1) {
|
||||||
if (deviceCalibrationController.inBedTips.value == 0) {
|
if (deviceCalibrationController.inBedTips.value == 0) {
|
||||||
|
//todo 更改提示文字
|
||||||
|
//校准人员已在床 绿色
|
||||||
|
//校准人员未在床 红色
|
||||||
return Text(
|
return Text(
|
||||||
"请校准人员保持在床状态".tr,
|
"请校准人员保持在床状态".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -218,6 +218,10 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
"macA": bleDevice.macA,
|
"macA": bleDevice.macA,
|
||||||
if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
|
if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
|
||||||
"macB": bleDevice.macB,
|
"macB": bleDevice.macB,
|
||||||
|
if (bleDevice.name!=null && bleDevice.name!.isNotEmpty)
|
||||||
|
'param':{
|
||||||
|
'name':bleDevice.name,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var response =
|
var response =
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
|
|
||||||
class BlueToothDataModel {
|
class BlueToothDataModel {
|
||||||
String name;
|
String name;//设备型号
|
||||||
bool bind;
|
bool bind;
|
||||||
String mac;
|
String mac;
|
||||||
ScanResult scanResult;
|
ScanResult scanResult;
|
||||||
|
|||||||
110
lib/pages/mh_page/test/WebviewTestModel.dart
Normal file
110
lib/pages/mh_page/test/WebviewTestModel.dart
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
import 'package:easyweb/easyweb.dart';
|
||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:easyweb/base/minisdk.dart';
|
||||||
|
import 'package:easydevice/easydevice.dart';
|
||||||
|
|
||||||
|
class WebviewTestModel {
|
||||||
|
WebviewTestModel();
|
||||||
|
|
||||||
|
//EasyFlutter Start[Model]
|
||||||
|
|
||||||
|
//EasyFlutter End
|
||||||
|
}
|
||||||
|
|
||||||
|
class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||||
|
WebviewTestController() : super(WebviewTestModel()) {
|
||||||
|
web = WebviewHelper(
|
||||||
|
jsbridge: buildsdk(
|
||||||
|
father: this,
|
||||||
|
clientId: '494641114',
|
||||||
|
//dbgserverUrl: 'ws://192.168.1.2:9001',
|
||||||
|
),
|
||||||
|
settings: buildsettings(),
|
||||||
|
params: PlatformHeadlessInAppWebViewCreationParams(
|
||||||
|
initialUrlRequest: URLRequest(
|
||||||
|
url: WebUri('https://wsl.it.real.he-info.cn:94/webdemo/index.html'),
|
||||||
|
),
|
||||||
|
onLoadStop: (controller, url) => {setState(() => ready.value = true)},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
try {
|
||||||
|
web.jsbridge!.bind((bridge) {
|
||||||
|
Minibleapp(bridge: bridge);
|
||||||
|
});
|
||||||
|
web
|
||||||
|
//.file(
|
||||||
|
// url: 'https://wsl.it.real.he-info.cn:94/webdemo/web.zip',
|
||||||
|
// pretag: 'https://wsl.it.real.he-info.cn:94/webdemo/',
|
||||||
|
//)
|
||||||
|
.network()
|
||||||
|
.then((value) {
|
||||||
|
if (value) {
|
||||||
|
//资源准备完成..
|
||||||
|
setState(() {
|
||||||
|
ready.value = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (e, s) {
|
||||||
|
ef.log('$e,$s');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
late WebviewHelper web;
|
||||||
|
var ready = false.obs;
|
||||||
|
var cnt = 0.obs;
|
||||||
|
//EasyFlutter End
|
||||||
|
}
|
||||||
|
|
||||||
|
class WebviewTestView extends GetComponent<WebviewTestController> {
|
||||||
|
WebviewTestView({super.key, super.oncreate});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.black12,
|
||||||
|
body: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(8),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() => controller.cnt.value++);
|
||||||
|
// Get.to(
|
||||||
|
// () => TestInkWellView(
|
||||||
|
// oncreate: (x) => TestInkWellController(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
child: Text('转跳'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child:
|
||||||
|
controller.ready.value
|
||||||
|
? ((controller.cnt.value % 2 == 0)
|
||||||
|
? controller.web.build(
|
||||||
|
key: ValueKey("A"),
|
||||||
|
headless: false,
|
||||||
|
)
|
||||||
|
: controller.web.build(
|
||||||
|
key: ValueKey("B"),
|
||||||
|
headless: false,
|
||||||
|
))
|
||||||
|
: Container(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,17 +27,15 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
bodysize = cc;
|
bodysize = cc;
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
// onTap: () => FocusScope.of(context).unfocus(),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
image: AssetImage('assets/images/new_background.png'),
|
||||||
fit: BoxFit.fill, // 填满整个 Container
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
// key: scaffoldKey,
|
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
@@ -49,7 +47,6 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
|
||||||
Text(
|
Text(
|
||||||
'用户注册',
|
'用户注册',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
@@ -58,7 +55,6 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 左侧图标
|
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 20.rpx,
|
left: 20.rpx,
|
||||||
child: returnIconButtomNew,
|
child: returnIconButtomNew,
|
||||||
@@ -77,9 +73,6 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
// TitleComponentWidget(
|
|
||||||
// titleName: '用户注册',
|
|
||||||
// ),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
@@ -92,367 +85,356 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
height: bodysize!.maxHeight * 1,
|
height: bodysize!.maxHeight * 1,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Align(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
0, 184.rpx, 0, 0),
|
child: Padding(
|
||||||
child: Container(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
width: bodysize!.maxWidth,
|
0, 184.rpx, 0, 0),
|
||||||
height: 92.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: bodysize!.maxWidth,
|
width: double.infinity,
|
||||||
height: bodysize!.maxHeight * 0.06,
|
height: bodysize!.maxHeight * 0.06,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFF3F5F6),
|
color: Color(0xFFF3F5F6),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Align(
|
constraints: BoxConstraints(
|
||||||
alignment: AlignmentDirectional(0, 0),
|
minHeight: 92.rpx,
|
||||||
child: TextFormField(
|
|
||||||
// autofocus: true,
|
|
||||||
// focusNode: _focusNode1,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller.model.register_phone =
|
|
||||||
value;
|
|
||||||
},
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
hintText: '请输入手机号'.tr,
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF929699),
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
enabledBorder: InputBorder.none,
|
|
||||||
focusedBorder: InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
contentPadding:
|
|
||||||
EdgeInsetsDirectional.fromSTEB(
|
|
||||||
20.rpx, 0, 0, 0.rpx),
|
|
||||||
),
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
child: Padding(
|
||||||
),
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
),
|
35.rpx, 0, 35.rpx, 0),
|
||||||
Padding(
|
child: Row(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
mainAxisSize: MainAxisSize.max,
|
||||||
0, 32.rpx, 0, 0),
|
mainAxisAlignment:
|
||||||
child: Container(
|
MainAxisAlignment.spaceBetween,
|
||||||
width: bodysize!.maxWidth,
|
children: [
|
||||||
height: 92.rpx,
|
Expanded(
|
||||||
decoration: BoxDecoration(),
|
child: Container(
|
||||||
child: Container(
|
child: Align(
|
||||||
width: bodysize!.maxWidth,
|
alignment:
|
||||||
height: bodysize!.maxHeight * 0.06,
|
AlignmentDirectional(
|
||||||
decoration: BoxDecoration(
|
-1, 0),
|
||||||
color: Color(0xFFF3F5F6),
|
child: TextFormField(
|
||||||
borderRadius: BorderRadius.circular(12),
|
onChanged: (value) {
|
||||||
),
|
controller.model
|
||||||
child: Align(
|
.register_phone =
|
||||||
alignment: AlignmentDirectional(0, 0),
|
value;
|
||||||
child: Obx(() {
|
},
|
||||||
return TextFormField(
|
decoration: InputDecoration(
|
||||||
// autofocus: true,
|
isDense: true,
|
||||||
// focusNode: _focusNode2,
|
hintText: '请输入手机号'.tr,
|
||||||
onChanged: (value) {
|
hintStyle: TextStyle(
|
||||||
controller.model.register_pd =
|
fontFamily:
|
||||||
value;
|
'Readex Pro',
|
||||||
},
|
color:
|
||||||
// obscureText: true,
|
Color(0xFF929699),
|
||||||
obscureText:
|
fontSize: 26.rpx,
|
||||||
controller.model.pdshow!,
|
),
|
||||||
decoration: InputDecoration(
|
border: InputBorder.none,
|
||||||
labelStyle: TextStyle(
|
),
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
hintText: '请输入密码'.tr,
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF929699),
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
enabledBorder: InputBorder.none,
|
|
||||||
focusedBorder: InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
contentPadding:
|
|
||||||
EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
10, 26.rpx, 0, 0),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
// 根据 pdshow 控制图标
|
|
||||||
controller.model.pdshow!
|
|
||||||
? Icons.visibility_off
|
|
||||||
: Icons.visibility,
|
|
||||||
color: Color(0xFF333333),
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
// 切换 pdshow 状态
|
|
||||||
controller.model.pdshow =
|
|
||||||
!controller
|
|
||||||
.model.pdshow!;
|
|
||||||
controller.updateAll();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0, 32.rpx, 0, 0),
|
|
||||||
child: Container(
|
|
||||||
width: bodysize!.maxWidth,
|
|
||||||
height: 92.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Container(
|
|
||||||
width: bodysize!.maxWidth,
|
|
||||||
height: bodysize!.maxHeight * 0.06,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFF3F5F6),
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(0, 0),
|
|
||||||
child: Obx(() {
|
|
||||||
return TextFormField(
|
|
||||||
// autofocus: true,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller.model
|
|
||||||
.register_confirm_pd =
|
|
||||||
value;
|
|
||||||
},
|
|
||||||
// focusNode: _focusNode3,
|
|
||||||
// obscureText: true,
|
|
||||||
obscureText:
|
|
||||||
controller.model.cpdshow!,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
hintText: '请输入确认密码'.tr,
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF929699),
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
enabledBorder: InputBorder.none,
|
|
||||||
focusedBorder: InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
contentPadding:
|
|
||||||
EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
10, 26.rpx, 0, 0),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
// 根据 pdshow 控制图标
|
|
||||||
controller.model.pdshow!
|
|
||||||
? Icons.visibility_off
|
|
||||||
: Icons.visibility,
|
|
||||||
color: Color(0xFF333333),
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
// 切换 pdshow 状态
|
|
||||||
controller.model.cpdshow =
|
|
||||||
!controller
|
|
||||||
.model.cpdshow!;
|
|
||||||
controller.updateAll();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0, 32.rpx, 0, 0),
|
|
||||||
child: Container(
|
|
||||||
width: bodysize!.maxWidth,
|
|
||||||
height: 92.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: AlignmentDirectional(0, 0),
|
|
||||||
child: Container(
|
|
||||||
width: bodysize!.maxWidth,
|
|
||||||
height: 92.rpx,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFF3F5F6),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
child: Align(
|
|
||||||
alignment:
|
|
||||||
AlignmentDirectional(0, 0),
|
|
||||||
child: TextFormField(
|
|
||||||
// autofocus: true,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller.model
|
|
||||||
.register_code = value;
|
|
||||||
},
|
|
||||||
// focusNode: _focusNode4,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
hintText: '请输入验证码',
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF929699),
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
enabledBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
focusedBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder:
|
|
||||||
InputBorder.none,
|
|
||||||
contentPadding:
|
|
||||||
EdgeInsetsDirectional
|
|
||||||
.fromSTEB(20.rpx, 0,
|
|
||||||
0, 0.rpx),
|
|
||||||
),
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment:
|
|
||||||
AlignmentDirectional(0.4, 0.1),
|
|
||||||
child: Container(
|
|
||||||
width: 1.rpx,
|
|
||||||
height: 38.rpx,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: stringToColor("#929699"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment:
|
|
||||||
AlignmentDirectional(1.2, 0),
|
|
||||||
child: Container(
|
|
||||||
width: bodysize!.maxWidth * 0.157,
|
|
||||||
height: bodysize!.maxHeight * 0.014,
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 118,
|
|
||||||
minHeight: 30,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment:
|
|
||||||
AlignmentDirectional(0, 0),
|
|
||||||
child: Obx(() {
|
|
||||||
final CountdownController
|
|
||||||
countdownController =
|
|
||||||
Get.find<
|
|
||||||
CountdownController>();
|
|
||||||
return InkWell(
|
|
||||||
onTap: () async {
|
|
||||||
if (countdownController
|
|
||||||
.countdown.value !=
|
|
||||||
0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (CommonVariables
|
|
||||||
.isNetWorkOn ==
|
|
||||||
false) {
|
|
||||||
showToast(
|
|
||||||
"网络未连接,请开启设备网络后重试"
|
|
||||||
.tr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String msg =
|
|
||||||
await controller
|
|
||||||
.getCode(context);
|
|
||||||
if (msg.isNotEmpty) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
countdownController
|
|
||||||
.countdown
|
|
||||||
.value ==
|
|
||||||
0
|
|
||||||
? countdownController
|
|
||||||
.startCountdown(
|
|
||||||
AppConstants
|
|
||||||
.code_time)
|
|
||||||
: null;
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
countdownController
|
|
||||||
.countdown
|
|
||||||
.value ==
|
|
||||||
0
|
|
||||||
? '获取验证码'.tr
|
|
||||||
: '${countdownController.countdown.value}' +
|
|
||||||
'秒'.tr,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF333333),
|
fontSize: 26.rpx,
|
||||||
fontSize: 20.rpx,
|
color: Colors.black,
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 32.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: bodysize!.maxHeight * 0.06,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFFF3F5F6),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 92.rpx,
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
35.rpx, 0, 35.rpx, 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(
|
||||||
|
-1, 0),
|
||||||
|
child: Obx(() =>
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model
|
||||||
|
.register_pd =
|
||||||
|
value;
|
||||||
|
},
|
||||||
|
obscureText: controller
|
||||||
|
.model.pdshow!,
|
||||||
|
decoration:
|
||||||
|
InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
hintText: '请输入密码'.tr,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: Color(
|
||||||
|
0xFF929699),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
),
|
||||||
|
border:
|
||||||
|
InputBorder.none,
|
||||||
|
suffixIcon:
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
controller.model
|
||||||
|
.pdshow!
|
||||||
|
? Icons
|
||||||
|
.visibility_off
|
||||||
|
: Icons
|
||||||
|
.visibility,
|
||||||
|
color: Color(
|
||||||
|
0xFF333333),
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
controller.model
|
||||||
|
.pdshow =
|
||||||
|
!controller
|
||||||
|
.model
|
||||||
|
.pdshow!;
|
||||||
|
controller
|
||||||
|
.updateAll();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 确认密码输入框
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 32.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: bodysize!.maxHeight * 0.06,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFFF3F5F6),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 92.rpx,
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
35.rpx, 0, 35.rpx, 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(
|
||||||
|
-1, 0),
|
||||||
|
child: Obx(() =>
|
||||||
|
TextFormField(
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model
|
||||||
|
.register_confirm_pd =
|
||||||
|
value;
|
||||||
|
},
|
||||||
|
obscureText: controller
|
||||||
|
.model.cpdshow!,
|
||||||
|
decoration:
|
||||||
|
InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
hintText:
|
||||||
|
'请输入确认密码'.tr,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: Color(
|
||||||
|
0xFF929699),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
),
|
||||||
|
border:
|
||||||
|
InputBorder.none,
|
||||||
|
suffixIcon:
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
controller.model
|
||||||
|
.pdshow!
|
||||||
|
? Icons
|
||||||
|
.visibility_off
|
||||||
|
: Icons
|
||||||
|
.visibility,
|
||||||
|
color: Color(
|
||||||
|
0xFF333333),
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
controller.model
|
||||||
|
.cpdshow =
|
||||||
|
!controller
|
||||||
|
.model
|
||||||
|
.cpdshow!;
|
||||||
|
controller
|
||||||
|
.updateAll();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 验证码输入框
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 32.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: bodysize!.maxHeight * 0.06,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFFF3F5F6),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 92.rpx,
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
35.rpx, 0, 35.rpx, 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(
|
||||||
|
-1, 0),
|
||||||
|
child: TextFormField(
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model
|
||||||
|
.register_code =
|
||||||
|
value;
|
||||||
|
},
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
hintText: '请输入验证码',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color:
|
||||||
|
Color(0xFF929699),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1.rpx,
|
||||||
|
height: 38.rpx,
|
||||||
|
color: Color(0xFF929699),
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
final countdownController = Get
|
||||||
|
.find<CountdownController>();
|
||||||
|
return InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
if (countdownController
|
||||||
|
.countdown.value !=
|
||||||
|
0) return;
|
||||||
|
String msg = await controller
|
||||||
|
.getCode(context);
|
||||||
|
if (msg.isEmpty) {
|
||||||
|
countdownController
|
||||||
|
.startCountdown(
|
||||||
|
AppConstants
|
||||||
|
.code_time);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
countdownController.countdown
|
||||||
|
.value ==
|
||||||
|
0
|
||||||
|
? '获取验证码'.tr
|
||||||
|
: '${countdownController.countdown.value}秒'
|
||||||
|
.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFF333333),
|
||||||
|
fontSize: 20.rpx,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 其他部分保持不变...
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
0, 19, 0, 0),
|
0, 19, 0, 0),
|
||||||
@@ -526,12 +508,6 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
|
|
||||||
controller
|
controller
|
||||||
.updateAll();
|
.updateAll();
|
||||||
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
|
|
||||||
// if (newValue ==
|
|
||||||
// true) {
|
|
||||||
// Deviceconfig
|
|
||||||
// .initPlatformState();
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 1.5,
|
width: 1.5,
|
||||||
@@ -547,7 +523,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
horizontal:
|
horizontal:
|
||||||
-4.0,
|
-4.0,
|
||||||
vertical:
|
vertical:
|
||||||
-4.0), // 变小
|
-4.0),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|||||||
14
pubspec.yaml
14
pubspec.yaml
@@ -29,16 +29,16 @@ dependencies:
|
|||||||
git:
|
git:
|
||||||
url: http://admin@git.real.he-info.cn:8080/r/~lu/flutterflow-ui.git
|
url: http://admin@git.real.he-info.cn:8080/r/~lu/flutterflow-ui.git
|
||||||
ref: master
|
ref: master
|
||||||
lottie: ^3.2.0
|
# lottie: ^3.2.0
|
||||||
flutter_blue_plus: ^1.35.3
|
flutter_blue_plus: ^1.35.3
|
||||||
permission_handler: ^12.0.0+1
|
permission_handler: ^12.0.0+1
|
||||||
loading_indicator: ^3.1.1
|
loading_indicator: ^3.1.1
|
||||||
geolocator: ^13.0.1
|
geolocator: ^13.0.1
|
||||||
easydevice:
|
easydevice:
|
||||||
path:
|
git:
|
||||||
C:\Users\a\Desktop\blue\easydevice
|
url: https://gitea.wslpc.real.he-info.cn:94/flutter/easydevice.git
|
||||||
# url: http:///enchantedwyf@git.it.real.he-info.cn:90/r/easydevice.git
|
# url: http:///enchantedwyf@git.it.real.he-info.cn:90/r/easydevice.git
|
||||||
# ref: main
|
ref: main
|
||||||
localstorage: ^5.0.0
|
localstorage: ^5.0.0
|
||||||
img_picker: ^1.0.2
|
img_picker: ^1.0.2
|
||||||
uuid: ^4.5.1
|
uuid: ^4.5.1
|
||||||
@@ -61,6 +61,12 @@ dependencies:
|
|||||||
chewie: ^1.10.0
|
chewie: ^1.10.0
|
||||||
map_launcher: ^3.5.0
|
map_launcher: ^3.5.0
|
||||||
gif: ^2.3.0
|
gif: ^2.3.0
|
||||||
|
easyweb:
|
||||||
|
git:
|
||||||
|
url: https://gitea.wslpc.real.he-info.cn:94/flutter/easyweb.git
|
||||||
|
ref: main
|
||||||
|
archive: ^4.0.0
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user