修改选择器样式
This commit is contained in:
@@ -22,66 +22,71 @@ class BezierBottomNavigationBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final itemCount = path.length;
|
||||
return SizedBox(
|
||||
height: 130.rpx,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: CustomPaint(
|
||||
size: Size(MediaQuery.of(context).size.width, 130.rpx),
|
||||
painter: BezierPainter(
|
||||
position: animatedPosition,
|
||||
itemCount: itemCount,
|
||||
return Material(
|
||||
// ✅ 整个底部栏使用一个透明 Material 包裹
|
||||
type: MaterialType.transparency,
|
||||
child: SizedBox(
|
||||
height: 130.rpx,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: CustomPaint(
|
||||
size: Size(MediaQuery.of(context).size.width, 130.rpx),
|
||||
painter: BezierPainter(
|
||||
position: animatedPosition,
|
||||
itemCount: itemCount,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: path.asMap().entries.map((entry) {
|
||||
final i = entry.key;
|
||||
final icon = entry.value;
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
// 用 InkWell 替换 GestureDetector,支持点击反馈
|
||||
onTap: () => onTap(i),
|
||||
// splashColor: Colors.transparent, // 可选:关闭 splash 效果
|
||||
// highlightColor: Colors.transparent, // 可选:关闭高亮效果
|
||||
child: SizedBox.expand(
|
||||
Row(
|
||||
children: path.asMap().entries.map((entry) {
|
||||
final i = entry.key;
|
||||
final icon = entry.value;
|
||||
return Expanded(
|
||||
child: InkWell(
|
||||
onTap: () => onTap(i),
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
child: SizedBox.expand(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 14.rpx),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 11.rpx),
|
||||
child: SvgPicture.asset(icon,
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
color: selectedIndex == i
|
||||
? Colors.white
|
||||
: Color(0XFF929699)),
|
||||
padding: EdgeInsets.only(top: 14.rpx),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 11.rpx),
|
||||
child: SvgPicture.asset(
|
||||
icon,
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
color: selectedIndex == i
|
||||
? Colors.white
|
||||
: const Color(0XFF929699),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
titles[i],
|
||||
style: TextStyle(
|
||||
fontSize: 22.rpx,
|
||||
color: selectedIndex == i
|
||||
? Colors.white
|
||||
: Colors.grey.shade400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 3),
|
||||
Text(
|
||||
titles[i],
|
||||
style: TextStyle(
|
||||
fontSize: 22.rpx,
|
||||
color: selectedIndex == i
|
||||
? Colors.white
|
||||
: Colors.grey.shade400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
// 关键点:撑满 Expanded 区域
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
// import 'package:map_launcher/map_launcher.dart';
|
||||
|
||||
// class AppMapLocation {
|
||||
// static List<AvailableMap> availableMaps = [];
|
||||
// static List availableMapsToNames = [];
|
||||
|
||||
// static Future<void> checkInstalledApps() async {
|
||||
// availableMaps = await MapLauncher.installedMaps;
|
||||
// availableMapsToNames = availableMaps.map((AvailableMap m) {
|
||||
// String v = "";
|
||||
// switch (m.mapType) {
|
||||
// case MapType.baidu:
|
||||
// v = '百度地图';
|
||||
// break;
|
||||
// case MapType.tencent:
|
||||
// v = '腾讯地图';
|
||||
// break;
|
||||
// case MapType.amap:
|
||||
// v = '高德地图';
|
||||
// break;
|
||||
// case MapType.apple:
|
||||
// v = 'Apple地图';
|
||||
// break;
|
||||
// case MapType.google:
|
||||
// v = 'Google地图';
|
||||
// break;
|
||||
// case MapType.googleGo:
|
||||
// v = 'Google地图Go';
|
||||
// break;
|
||||
// case MapType.petal:
|
||||
// v = 'Petal地图';
|
||||
// break;
|
||||
// default:
|
||||
// v = m.mapName;
|
||||
// }
|
||||
// return v;
|
||||
// }).toList();
|
||||
// }
|
||||
|
||||
// static void launchMap(index, title, double latitude, double longitude) async {
|
||||
// await availableMaps[index].showMarker(
|
||||
// coords: Coords(latitude, longitude),
|
||||
// title: title,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@@ -1,304 +0,0 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/message/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/MessageWidgetWidget.dart';
|
||||
|
||||
class MessagePage extends StatefulWidget {
|
||||
const MessagePage({super.key});
|
||||
|
||||
@override
|
||||
State<MessagePage> createState() => _MessagePageState();
|
||||
}
|
||||
|
||||
class _MessagePageState extends State<MessagePage> {
|
||||
ThemeController themeController = Get.find();
|
||||
MessageController messageController = Get.find();
|
||||
late PageController _pageController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_pageController =
|
||||
PageController(initialPage: messageController.model.type == 1 ? 0 : 1);
|
||||
messageController.getMessageStatus();
|
||||
_fetchMessageData();
|
||||
}
|
||||
|
||||
void _fetchMessageData() {
|
||||
String type = messageController.model.type == 1 ? "app_vsm" : "app_system";
|
||||
messageController.updateMessageStatus(type: type);
|
||||
messageController.getMessageList().then((response) {
|
||||
if (response.code != HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
Get.context!,
|
||||
text: response.msg ?? "服务器.失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void _onTabChanged(int index) {
|
||||
messageController.model.type = index == 0 ? 1 : 2;
|
||||
messageController.updateAll();
|
||||
_fetchMessageData();
|
||||
_pageController.animateToPage(index,
|
||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||
}
|
||||
|
||||
void _onPageChanged(int index) {
|
||||
int newType = index == 0 ? 1 : 2;
|
||||
if (messageController.model.type != newType) {
|
||||
messageController.model.type = newType;
|
||||
messageController.updateAll();
|
||||
_fetchMessageData();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_pageController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
));
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/img/bgNoImg.png'),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: themeController.currentColor.sc17,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
|
||||
toolbarHeight: 140.rpx,
|
||||
titleSpacing: 0,
|
||||
title: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(40.rpx, 0, 0, 0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 140.rpx,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 40.rpx),
|
||||
Expanded(
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomLeft,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ClickableContainer(
|
||||
padding: EdgeInsets.all(0),
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor:
|
||||
themeController.currentColor.sc21,
|
||||
borderRadius: 8.rpx,
|
||||
onTap: () => _onTabChanged(0),
|
||||
child: Container(
|
||||
width: 160.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Text(
|
||||
'体征消息'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
color:
|
||||
messageController
|
||||
.model.type ==
|
||||
2
|
||||
? themeController
|
||||
.currentColor.sc3
|
||||
: themeController
|
||||
.currentColor.sc2,
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return messageController.model
|
||||
.body_message_read ==
|
||||
1
|
||||
? Positioned(
|
||||
top: -4,
|
||||
right: -14,
|
||||
child: Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration:
|
||||
const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
Obx(() {
|
||||
return ClickableContainer(
|
||||
padding: EdgeInsets.all(0),
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor:
|
||||
themeController.currentColor.sc21,
|
||||
borderRadius: 8.rpx,
|
||||
onTap: () => _onTabChanged(1),
|
||||
child: Container(
|
||||
width: 160.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Text(
|
||||
'系统消息'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
color:
|
||||
messageController
|
||||
.model.type ==
|
||||
1
|
||||
? themeController
|
||||
.currentColor.sc3
|
||||
: themeController
|
||||
.currentColor.sc2,
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return messageController.model
|
||||
.system_message_read ==
|
||||
1
|
||||
? Positioned(
|
||||
top: -4,
|
||||
right: -14,
|
||||
child: Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration:
|
||||
const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
].divide(SizedBox(width: 10.rpx)),
|
||||
),
|
||||
Obx(() {
|
||||
double lineWidth = 170.rpx;
|
||||
return AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
bottom: 0,
|
||||
left: messageController.model.type == 1
|
||||
? 0
|
||||
: 170.rpx,
|
||||
child: Container(
|
||||
width: lineWidth,
|
||||
height: 4.rpx,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc2,
|
||||
borderRadius: BorderRadius.circular(2.rpx),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 17.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: false,
|
||||
),
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: PageView(
|
||||
controller: _pageController,
|
||||
onPageChanged: _onPageChanged,
|
||||
children: [
|
||||
Obx(() {
|
||||
final list = messageController.messageList.value;
|
||||
return list.isEmpty
|
||||
? const NullDataWidget()
|
||||
: _buildMessageListView(list);
|
||||
}),
|
||||
Obx(() {
|
||||
final list = messageController.messageList.value;
|
||||
return list.isEmpty
|
||||
? const NullDataWidget()
|
||||
: _buildMessageListView(list);
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildMessageListView(List dataList) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.rpx),
|
||||
...dataList
|
||||
.map((item) => MessageWidgetWidget(data: item))
|
||||
.toList()
|
||||
.divide(SizedBox(height: 30.rpx)),
|
||||
SizedBox(height: 30.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/repair_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/repair_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/device_control/ColorChangeOnTap.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
class RepairHistoryWidget extends GetView<RepairInfoController> {
|
||||
int index;
|
||||
RepairListController repairListController;
|
||||
|
||||
RepairHistoryWidget(
|
||||
{required this.index, required this.repairListController}) {}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
int tmp = index;
|
||||
index = tmp;
|
||||
return ColorChangeOnPress(
|
||||
pressColor: AppColors().press_color, // 按下时的颜色
|
||||
shouldNavigate: true, // 是否需要跳转
|
||||
routeName: "/repairHistoryListPage", // 路由名称
|
||||
topLeft: 16,
|
||||
topRight: 16,
|
||||
bottomLeft: 16,
|
||||
bottomRight: 16,
|
||||
onTap: () async {
|
||||
// print("object");
|
||||
// final RepairInfoController repairInfoController =
|
||||
// Get.find<RepairInfoController>();
|
||||
// await repairInfoController
|
||||
// .initData(repairListController.model.repairList[index])
|
||||
// .then((_) {
|
||||
// repairInfoController.updateAll();
|
||||
// // Get.toNamed("/repairHistoryListPage"); // 这个在 ColorChangeOnPress 中已经处理
|
||||
// });
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 70,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(15, 14, 15, 13),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.5,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
repairListController
|
||||
.model.repairList[index].device_category ??
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF333333),
|
||||
fontSize: AppFontsize.title_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
"报修单号:${repairListController.model.repairList[index].id}",
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFFC8CBD2),
|
||||
fontSize: AppFontsize.small_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
"提交时间:" +
|
||||
(MyUtils.formatDateTime(repairListController
|
||||
.model.repairList[index].create_time!) ??
|
||||
''),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFFC8CBD2),
|
||||
fontSize: AppFontsize.small_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.2,
|
||||
height: MediaQuery.sizeOf(context).height * 0.075,
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: 130,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
repairListController.model.repairList[index].status ??
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF333333),
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0, 0.05),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
size: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 27)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,575 +0,0 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh/apply_repair_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/repair_list_controller.dart';
|
||||
|
||||
|
||||
class DeviceRepairPage extends GetView<RepairListController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
// final ScrollController scrollController = ScrollController();
|
||||
// final RepairListController controller = Get.find();
|
||||
|
||||
// DeviceRepairPage() {
|
||||
// controller.model.limit = AppConstants.limit;
|
||||
// controller.model.offset = 0;
|
||||
// controller.model.isLoading = false;
|
||||
// controller.model.hasMore = true;
|
||||
// controller.model.repairList.clear();
|
||||
// controller.initData();
|
||||
// Get.put(RepairListController());
|
||||
|
||||
// scrollController.addListener(() {
|
||||
// if (scrollController.position.pixels ==
|
||||
// scrollController.position.maxScrollExtent &&
|
||||
// controller.model.hasMore) {
|
||||
// controller.initData();
|
||||
// controller.updateAll();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
final List<ApplyRepairModel> mockData = List.generate(4, (index) {
|
||||
return ApplyRepairModel()
|
||||
..device_name = "SWESO1号智能一键入眠床"
|
||||
..status = index == 0 ? "已提交" : "已完成"
|
||||
..create_time = DateTime(2024, 5, 12, 12, 5, 12);
|
||||
});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备报修',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 20.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 报修须知
|
||||
Container(
|
||||
height: 412.rpx,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Color(0XFFC8CBD2), width: 0.rpx),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 固定的标题部分
|
||||
Text(
|
||||
"报修须知",
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 33.rpx),
|
||||
// 可滚动的正文部分,限定高度
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
TextSpan(
|
||||
text: "400-8756-966",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
// height: 1.3,
|
||||
decoration: TextDecoration
|
||||
.underline, // 添加下划线
|
||||
decorationColor:
|
||||
Colors.white,
|
||||
decorationThickness: 4.rpx,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: " 反馈。",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))),
|
||||
|
||||
SizedBox(height: 24.rpx),
|
||||
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// bool isOk = true;
|
||||
// for (var i = 0; i < 2; i++) {
|
||||
// var d = controller.model.peopleList[i];
|
||||
// print("${d.toJson()}");
|
||||
// String before = "人员信息${i == 0 ? "A" : "B"}:";
|
||||
// if (isOk &&
|
||||
// d.height != null &&
|
||||
// d.height != "" &&
|
||||
// int.tryParse("${d.height}") == null) {
|
||||
// showToast("$before身高请输入数字");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.weight != null &&
|
||||
// d.weight != "" &&
|
||||
// int.tryParse("${d.weight}") == null) {
|
||||
// showToast("$before体重请输入数字");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.tel != null &&
|
||||
// d.tel != "" &&
|
||||
// MyUtils.isValidPhoneNumber("${d.tel}") ==
|
||||
// false) {
|
||||
// showToast("$before请输入正确的电话");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.emergencyContact != null &&
|
||||
// d.emergencyContact != "" &&
|
||||
// MyUtils.isValidPhoneNumber(
|
||||
// "${d.emergencyContact}") ==
|
||||
// false) {
|
||||
// showToast("$before请输入正确的紧急联系人电话");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk) {
|
||||
// controller.savePeoples().then((d) {
|
||||
// showToast("保存成功", color: color_success);
|
||||
// }).catchError((d) {
|
||||
// print("$d");
|
||||
// showToast("保存失败");
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// controller.model.peopleList.forEach((d) {});
|
||||
},
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
"我要报修",
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
SizedBox(height: 235.rpx),
|
||||
|
||||
// 报修历史标题
|
||||
Container(
|
||||
width: double.infinity,
|
||||
child: Text("报修历史",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
height: 1)),
|
||||
),
|
||||
|
||||
SizedBox(height: 32.rpx),
|
||||
|
||||
// 报修历史列表
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: mockData.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = mockData[index];
|
||||
return ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Color(0XFF055466),
|
||||
padding: EdgeInsets.only(top: 0),
|
||||
onTap: () {
|
||||
Get.toNamed("/repairHistoryListPage");
|
||||
},
|
||||
child: Container(
|
||||
height: 119.rpx,
|
||||
// margin: const EdgeInsets.only(bottom: 10),
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// vertical: 12, horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
// color: const Color(0xFF06486F),
|
||||
border: Border(
|
||||
top: index == 0
|
||||
? BorderSide(
|
||||
color:
|
||||
const Color(0xFF929699),
|
||||
width: 1.rpx)
|
||||
: BorderSide.none,
|
||||
bottom: BorderSide(
|
||||
color: const Color(0xFF929699),
|
||||
width: 1.rpx),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
17.rpx, 0, 30.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 左侧设备信息
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.device_name ?? '',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
"提交时间:${item.create_time?.toString().substring(0, 19) ?? ''}",
|
||||
style: TextStyle(
|
||||
color: Colors.white60,
|
||||
fontSize: 20.rpx),
|
||||
),
|
||||
],
|
||||
),
|
||||
// 右侧状态
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
item.status ?? '',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx),
|
||||
),
|
||||
Icon(Icons.arrow_forward_ios,
|
||||
color: Colors.white,
|
||||
size: 30.rpx),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)));
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
// Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 1,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xFFF6F6F6),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// // TitleComponentWidget(
|
||||
// // titleName: '设备报修',
|
||||
// // ),
|
||||
// Expanded(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(15, 0, 15, 0),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 0.9,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xFFF6F6F6),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 14, 0, 13),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 0.186,
|
||||
// constraints: BoxConstraints(
|
||||
// minHeight: 170,
|
||||
// ),
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// border: Border.all(
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0, 14, 0, 18),
|
||||
// child: Text(
|
||||
// '报修须知',
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// fontSize: AppFontsize.title_size,
|
||||
// letterSpacing: 0,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 14, 0, 14, 14), // 应用 padding
|
||||
// child: SingleChildScrollView(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障或需要维修,请首先确认设备是否正确连接电源和网络,检查设置是否正常,排除基本操作问题。若问题依然存在,请记录下设备名称、设备型号、和具体故障情况等,方便我们更快速地为您提供帮助。您可以通过智慧眠花糖APP保修或者直接拨打400-8756-966反馈。',
|
||||
// style: FlutterFlowTheme.of(
|
||||
// context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF333333),
|
||||
// fontSize: AppFontsize
|
||||
// .small_text_size,
|
||||
// letterSpacing: 0,
|
||||
// lineHeight: 1.5,
|
||||
// ),
|
||||
// ),
|
||||
// // 如果需要,可以在 Text 下面添加其他小部件
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 42),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: 46,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 0.056,
|
||||
// decoration: BoxDecoration(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .secondaryBackground,
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: FFButtonWidget(
|
||||
// onPressed: () {
|
||||
// Get.toNamed("/applyRepairPage");
|
||||
// },
|
||||
// text: '我要报修',
|
||||
// options: FFButtonOptions(
|
||||
// height: 46,
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 24, 0, 24, 0),
|
||||
// iconPadding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0, 0, 0, 0),
|
||||
// color: Color(0xFFE55E92),
|
||||
// textStyle: FlutterFlowTheme.of(context)
|
||||
// .titleSmall
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: AppFontsize.title_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// elevation: 0,
|
||||
// borderSide: BorderSide(
|
||||
// color: Colors.transparent,
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// width: bodysize!.maxWidth,
|
||||
// height: bodysize!.maxHeight * 1,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xFFF6F6F6),
|
||||
// ),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 14, 0, 0, 17),
|
||||
// child: Text(
|
||||
// '报修历史',
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF333333),
|
||||
// fontSize: AppFontsize.title_size,
|
||||
// letterSpacing: 0,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Obx(() {
|
||||
// return Visibility(
|
||||
// visible:
|
||||
// controller.model.repairList != null &&
|
||||
// controller
|
||||
// .model.repairList!.isNotEmpty,
|
||||
// replacement:
|
||||
// EmptyMessageWidget(),
|
||||
// child: Expanded(
|
||||
// // child: Obx(() =>
|
||||
// child: ListView(
|
||||
// controller:
|
||||
// scrollController, // 绑定 ScrollController
|
||||
// shrinkWrap: true,
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: (controller
|
||||
// .model.repairList
|
||||
// .asMap()
|
||||
// .entries
|
||||
// .map((e) =>
|
||||
// RepairHistoryWidget(
|
||||
// index: e.key,
|
||||
// repairListController:
|
||||
// controller))
|
||||
// .toList() as List<Widget>)
|
||||
// .divide(const SizedBox(
|
||||
// height: 13,
|
||||
// ))
|
||||
// .addToEnd(SizedBox(
|
||||
// height: AppConstants
|
||||
// .list_end_height,
|
||||
// )))
|
||||
// // ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -153,10 +153,12 @@
|
||||
// }
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||
import 'package:vbvs_app/pages/device_control/MattressControl.dart';
|
||||
import 'package:vbvs_app/pages/device_control/new_Home_page.dart';
|
||||
import 'package:vbvs_app/pages/device_control/new_mine_page.dart';
|
||||
import 'package:vbvs_app/pages/device_control/score_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/find_password_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/new_Home_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/register_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/score_page.dart';
|
||||
|
||||
class MainPageBBottomChange extends StatefulWidget {
|
||||
@override
|
||||
@@ -182,7 +184,8 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
NewHomePage(),
|
||||
// PeopleInfoPage(),
|
||||
// Text('报告'),
|
||||
ScorePage(),
|
||||
RegisterPage(),
|
||||
// FindPasswordPage(),
|
||||
// Smys(),
|
||||
MattressControlPage(),
|
||||
NewMinePage()
|
||||
|
||||
224
lib/pages/mh_page/MhMessageList.dart
Normal file
224
lib/pages/mh_page/MhMessageList.dart
Normal file
@@ -0,0 +1,224 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/device/device_share_controller.dart';
|
||||
import 'package:vbvs_app/controller/message/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/enum/MessageStatus.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
|
||||
class MhMessageListWidget extends StatefulWidget {
|
||||
final data;
|
||||
|
||||
const MhMessageListWidget({super.key, required this.data});
|
||||
|
||||
@override
|
||||
State<MhMessageListWidget> createState() => _MhMessageListWidgetState();
|
||||
}
|
||||
|
||||
class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
ThemeController themeController = Get.find();
|
||||
MessageController messageController = Get.find();
|
||||
DeviceShareController deviceShareController = Get.find();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var messageInfo = widget.data;
|
||||
print(messageInfo);
|
||||
return Stack(
|
||||
children: [
|
||||
ClickableContainer(
|
||||
backgroundColor: Color(0xFF003058),
|
||||
highlightColor: Color(0xFF055466),
|
||||
borderRadius: 20.rpx,
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(31.rpx, 33.rpx, 0.rpx, 33.rpx),
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 66.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
// '实时监测结果通知'.tr,
|
||||
"${messageInfo['data']['title']}",
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 30.rpx,
|
||||
maxWidth: 140.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildInfoItem(context, mapItem['k'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 30.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildValueItem(context, mapItem['v'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 30.rpx)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (messageInfo['type'] == 'app_system')
|
||||
Positioned(
|
||||
bottom: 46.rpx,
|
||||
right: 20.rpx,
|
||||
child: Container(
|
||||
width: 123.rpx,
|
||||
height: 47.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius, // 直角
|
||||
colors: messageInfo['status'] == 1
|
||||
? [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2
|
||||
]
|
||||
: [themeController.currentColor.sc4], // 单色背景
|
||||
enableAnimation: true, // 有点击缩放动画
|
||||
enableGradient: false, // 不用渐变
|
||||
onTap: () {
|
||||
if (messageInfo['status'] == 1) {
|
||||
showConfirmDialog(context, Container(), "是否确认接受该设备".tr,
|
||||
onConfirm: () async {
|
||||
ApiResponse apiResponse = await deviceShareController
|
||||
.confirmShare(messageInfo['data']['shareCode']);
|
||||
if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc2,
|
||||
);
|
||||
messageController.getMessageList();
|
||||
messageController.updateAll();
|
||||
} else {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: apiResponse.msg!,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
messageController.getMessageList();
|
||||
messageController.updateAll();
|
||||
}
|
||||
}, onCancel: () {});
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
getMessageStatus(messageInfo['status']),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildInfoItem(BuildContext context, String label) {
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 62.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
label.tr,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildValueItem(BuildContext context, value) {
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 62.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: Text(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
"${value}",
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String getMessageStatus(int status) {
|
||||
if (status == null) {
|
||||
return '未知数据'.tr;
|
||||
}
|
||||
if (status == MessageStatus.noNeed.code) {
|
||||
return '无需处理'.tr;
|
||||
}
|
||||
if (status == MessageStatus.pending.code) {
|
||||
return "待处理".tr;
|
||||
}
|
||||
if (status == MessageStatus.completed.code) {
|
||||
return "已处理".tr;
|
||||
}
|
||||
if (status == MessageStatus.timeout.code) {
|
||||
return "已超时".tr;
|
||||
}
|
||||
return '未知数据'.tr;
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@ import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/address_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/device_control/EmptyMessageWidget.dart';
|
||||
import 'package:vbvs_app/pages/device_control/address_module_widget.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/address_module_widget.dart';
|
||||
|
||||
class AddressListPage extends GetView<AddressListController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -2,7 +2,7 @@ import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:vbvs_app/controller/mh/address_list_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
46
lib/pages/mh_page/app_map_location.dart
Normal file
46
lib/pages/mh_page/app_map_location.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:map_launcher/map_launcher.dart';
|
||||
|
||||
class AppMapLocation {
|
||||
static List<AvailableMap> availableMaps = [];
|
||||
static List availableMapsToNames = [];
|
||||
|
||||
static Future<void> checkInstalledApps() async {
|
||||
availableMaps = await MapLauncher.installedMaps;
|
||||
availableMapsToNames = availableMaps.map((AvailableMap m) {
|
||||
String v = "";
|
||||
switch (m.mapType) {
|
||||
case MapType.baidu:
|
||||
v = '百度地图';
|
||||
break;
|
||||
case MapType.tencent:
|
||||
v = '腾讯地图';
|
||||
break;
|
||||
case MapType.amap:
|
||||
v = '高德地图';
|
||||
break;
|
||||
case MapType.apple:
|
||||
v = 'Apple地图';
|
||||
break;
|
||||
case MapType.google:
|
||||
v = 'Google地图';
|
||||
break;
|
||||
case MapType.googleGo:
|
||||
v = 'Google地图Go';
|
||||
break;
|
||||
case MapType.petal:
|
||||
v = 'Petal地图';
|
||||
break;
|
||||
default:
|
||||
v = m.mapName;
|
||||
}
|
||||
return v;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
static void launchMap(index, title, double latitude, double longitude) async {
|
||||
await availableMaps[index].showMarker(
|
||||
coords: Coords(latitude, longitude),
|
||||
title: title,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/img/img_default_widget.dart';
|
||||
import 'package:vbvs_app/component/img/img_preview_widget.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh/apply_repair_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/apply_repair_controller.dart';
|
||||
|
||||
class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -1790,7 +1790,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// print('Button pressed ...');
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/book_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
||||
|
||||
class BookDateWidget extends GetView<BookInfoController> {
|
||||
// final String week;
|
||||
@@ -1,15 +1,13 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh/book_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/device_control/book_date_widget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/book_date_widget.dart';
|
||||
|
||||
class BookInfoPage extends GetView<BookInfoController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -651,7 +649,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
15, 0, 15, AppConstants.page_button_bottom_padding),
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// if (controller.model.select_time_index == null) {
|
||||
@@ -131,29 +131,29 @@ class BookSuccessPage extends GetView {
|
||||
SizedBox(height: 20), // 上间距
|
||||
for (var item in infoList)
|
||||
Container(
|
||||
height: 60.rpx,
|
||||
padding: EdgeInsets.symmetric(horizontal: 35),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
item['label']!,
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 60.rpx,
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 35.rpx),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
item['label']!,
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 35.rpx),
|
||||
Text(
|
||||
item['value']!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
SizedBox(width: 30.rpx),
|
||||
Text(
|
||||
item['value']!,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
SizedBox(height: 60.rpx), // 空间隔断
|
||||
Padding(
|
||||
@@ -162,41 +162,59 @@ class BookSuccessPage extends GetView {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {},
|
||||
child: Text("关闭",
|
||||
style: TextStyle(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"关闭",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx)),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
// minimumSize: Size(0, 60),
|
||||
),
|
||||
),
|
||||
),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(width: 60.rpx),
|
||||
SizedBox(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {},
|
||||
child: Text("我的预约",
|
||||
style: TextStyle(
|
||||
width: 200.rpx,
|
||||
height: 60.rpx,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
padding: EdgeInsets.zero, // 去除文字内边距
|
||||
tapTargetSize: MaterialTapTargetSize
|
||||
.shrinkWrap, // 去除额外点击区域
|
||||
// shape:
|
||||
// RoundedRectangleBorder(), // 可选:去除默认圆角
|
||||
),
|
||||
onPressed: () {},
|
||||
child: Center(
|
||||
// 保证文字居中
|
||||
child: Text(
|
||||
"我的预约",
|
||||
style: TextStyle(
|
||||
color: Color(0XFF011D33),
|
||||
fontSize: 26.rpx)),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF84F5FF),
|
||||
// minimumSize: Size(0, 60),
|
||||
),
|
||||
),
|
||||
)
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 80), // 下间距
|
||||
SizedBox(height: 80.rpx), // 下间距
|
||||
],
|
||||
)),
|
||||
),
|
||||
@@ -9,8 +9,8 @@ import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh/address_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/address_list_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/address_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
||||
|
||||
class EditAddressPage extends GetView<AddressController>
|
||||
implements CityPickerListener {
|
||||
@@ -1091,7 +1091,7 @@ class EditAddressPage extends GetView<AddressController>
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(15, 0,
|
||||
15, AppConstants.page_button_bottom_padding),
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// if (controller.model.all_address == null ||
|
||||
@@ -170,7 +170,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.rpx, right: 30.rpx, bottom: 85.rpx),
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {},
|
||||
colors: const [
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:ef/base/widget/flutterflow/FlutterFlowTheme.dart';
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
@@ -6,7 +7,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
|
||||
import '../../controller/mh/muser_info_controller.dart';
|
||||
import '../../controller/mh_controller/muser_info_controller.dart';
|
||||
|
||||
class EditUserInfoPage extends GetView<MUserInfoController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -15,6 +16,7 @@ class EditUserInfoPage extends GetView<MUserInfoController> {
|
||||
// UserInfoController controller = Get.find();
|
||||
// controller.model.user!.tmpHead = controller.model.user!.head;
|
||||
// }
|
||||
MUserInfoController controller = Get.find();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -59,7 +61,7 @@ class EditUserInfoPage extends GetView<MUserInfoController> {
|
||||
Positioned(
|
||||
right: 30.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {},
|
||||
colors: const [
|
||||
@@ -139,11 +141,36 @@ class EditUserInfoPage extends GetView<MUserInfoController> {
|
||||
),
|
||||
),
|
||||
alignment: Alignment(0, 0),
|
||||
child: Text(
|
||||
'玛利亚',
|
||||
style: TextStyle(
|
||||
color: Color(0XFFFFFFFF), fontSize: 26.rpx),
|
||||
child: TextField(
|
||||
obscureText: false,
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.done,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 30.rpx, color: Colors.white),
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.transparent,
|
||||
filled: true,
|
||||
hintText: "请输入昵称",
|
||||
hintStyle: TextStyle(color: Colors.white),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.all(0)),
|
||||
onChanged: (value) {
|
||||
controller.model.user?.nickName = value;
|
||||
controller.updateAll();
|
||||
},
|
||||
controller: controller.onReDraw(
|
||||
TextEditingController(
|
||||
text: controller.model.user?.nickName ?? ""),
|
||||
(textEditingController) {
|
||||
textEditingController.text =
|
||||
controller.model.user?.nickName ?? "";
|
||||
}),
|
||||
),
|
||||
// Text(
|
||||
// '玛利亚',
|
||||
// style: TextStyle(
|
||||
// color: Color(0XFFFFFFFF), fontSize: 26.rpx),
|
||||
// ),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -10,10 +10,10 @@ import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/mh/experience_store_list_page.dart';
|
||||
import 'package:vbvs_app/pages/device_control/Empty.dart';
|
||||
import 'package:vbvs_app/pages/device_control/experience_store_widget.dart';
|
||||
import 'package:vbvs_app/pages/device_control/searchWidget.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/experience_store_list_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/Empty.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/experience_store_widget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/searchWidget.dart';
|
||||
|
||||
class ExperienceStorePage extends GetView<ExperienceStoreListController> {
|
||||
ExperienceStorePage({super.key});
|
||||
@@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/controller/mh/book_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/device_control/app_map_location.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/app_map_location.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
import '../../common/util/MyUtils.dart';
|
||||
@@ -188,7 +188,7 @@ class ExperienceStoreWidget extends GetView {
|
||||
Flexible(
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
// //"latitude" -> "31.858934" "longitude" -> "117.282166"
|
||||
//"latitude" -> "31.858934" "longitude" -> "117.282166"
|
||||
// AppMapLocation.checkInstalledApps()
|
||||
// .then((d) {
|
||||
// if (AppMapLocation
|
||||
630
lib/pages/mh_page/find_password_page.dart
Normal file
630
lib/pages/mh_page/find_password_page.dart
Normal file
@@ -0,0 +1,630 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/find_password_controller.dart';
|
||||
import 'package:vbvs_app/controller/time/countdown_controller.dart';
|
||||
|
||||
class FindPasswordPage extends GetView<FindPasswordController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
final FocusNode _focusNode1 = FocusNode();
|
||||
final FocusNode _focusNode2 = FocusNode();
|
||||
|
||||
FindPasswordPage() {
|
||||
controller.model.pdshow = true;
|
||||
controller.model.cpdshow = true;
|
||||
_focusNode1.addListener(() {
|
||||
if (_focusNode1.hasFocus) {
|
||||
MyUtils.scrollToFocusedInput(_focusNode1, _scrollController);
|
||||
}
|
||||
});
|
||||
_focusNode2.addListener(() {
|
||||
if (_focusNode2.hasFocus) {
|
||||
MyUtils.scrollToFocusedInput(_focusNode2, _scrollController);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'找回密码',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 20.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
controller: _scrollController,
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '找回密码',
|
||||
// ),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
98.rpx, 0, 98.rpx, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.886,
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
decoration: BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 184.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: TextFormField(
|
||||
// focusNode: _focusNode1,
|
||||
onChanged: (value) {
|
||||
controller.model.phone = value;
|
||||
},
|
||||
// autofocus: true,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入手机号',
|
||||
hintStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(20.rpx, 0, 0,
|
||||
10.rpx),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.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,
|
||||
// focusNode: _focusNode2,
|
||||
onChanged: (value) {
|
||||
controller.model.code =
|
||||
value;
|
||||
},
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize:
|
||||
20.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
hintText: '请输验证码',
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Color(
|
||||
0xFF929699),
|
||||
fontSize:
|
||||
20.rpx,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
enabledBorder:
|
||||
InputBorder.none,
|
||||
focusedBorder:
|
||||
InputBorder.none,
|
||||
errorBorder:
|
||||
InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(20.rpx,
|
||||
0, 0, 10.rpx),
|
||||
),
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(
|
||||
0.2, 0.3),
|
||||
child: Container(
|
||||
width: 3,
|
||||
height: 30,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFCCCCCC),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0.9, 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(
|
||||
// "网络未连接,请开启设备网络后重试");
|
||||
// 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
|
||||
? '获取验证码'
|
||||
: '${countdownController.countdown.value}秒',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Color(0xFF333333),
|
||||
fontSize: 20.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,
|
||||
// focusNode: _focusNode1,
|
||||
onChanged: (value) {
|
||||
controller.model.pd = value;
|
||||
},
|
||||
// obscureText: true,
|
||||
obscureText:
|
||||
controller.model.pdshow!,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入新密码',
|
||||
hintStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder:
|
||||
InputBorder.none,
|
||||
focusedBorder:
|
||||
InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10, 10, 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:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.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,
|
||||
// focusNode: _focusNode2,
|
||||
onChanged: (value) {
|
||||
controller.model.confirm =
|
||||
value;
|
||||
},
|
||||
// obscureText: true,
|
||||
obscureText:
|
||||
controller.model.cpdshow!,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '确认新密码',
|
||||
hintStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder:
|
||||
InputBorder.none,
|
||||
focusedBorder:
|
||||
InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10, 10, 0, 0),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
// 根据 pdshow 控制图标
|
||||
controller.model.cpdshow!
|
||||
? Icons.visibility_off
|
||||
: Icons.visibility,
|
||||
color: Color(0xFF333333),
|
||||
size: 16,
|
||||
),
|
||||
onPressed: () {
|
||||
// 切换 pdshow 状态
|
||||
controller.model.cpdshow =
|
||||
!controller
|
||||
.model.cpdshow!;
|
||||
controller.updateAll();
|
||||
},
|
||||
),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
42.rpx, 38.rpx, 42.rpx, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.022,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.022,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 58.rpx, 0, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(),
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection:
|
||||
GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// if (CommonVariables.isNetWorkOn ==
|
||||
// false) {
|
||||
// showToast("网络未连接,请开启设备网络后重试");
|
||||
// return;
|
||||
// }
|
||||
// String msg = await controller
|
||||
// .confirmCode(context);
|
||||
// if (msg.isEmpty) {
|
||||
// // Get.toNamed("/userInfoPage");
|
||||
// // Get.toNamed("/resetPasswordPage");
|
||||
// Get.toNamed("/loginPage");
|
||||
// }
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
16.rpx),
|
||||
),
|
||||
child: Text(
|
||||
"提交",
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0XFF003058),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/pages/device_control/issue_preview_widget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/issue_preview_widget.dart';
|
||||
|
||||
import '../../controller/mh/issue_controller.dart';
|
||||
import '../../controller/mh_controller/issue_controller.dart';
|
||||
|
||||
class IssueListPage extends GetView<IssueListController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/mh/issue_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/issue_preview_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/issue_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/issue_preview_controller.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
@@ -11,9 +11,9 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/mh/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/MessageWidgetWidget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/MhMessageList.dart';
|
||||
|
||||
class MessagePage extends StatefulWidget {
|
||||
const MessagePage({super.key});
|
||||
@@ -406,7 +406,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
children: [
|
||||
SizedBox(height: 30.rpx),
|
||||
...dataList
|
||||
.map((item) => MessageWidgetWidget(data: item))
|
||||
.map((item) => MhMessageListWidget(data: item))
|
||||
.toList()
|
||||
.divide(SizedBox(height: 30.rpx)),
|
||||
SizedBox(height: 30.rpx),
|
||||
@@ -6,9 +6,9 @@ import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/my_experience_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/device_control/Empty.dart';
|
||||
import 'package:vbvs_app/pages/device_control/my_experience_widget.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/my_experience_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/Empty.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/my_experience_widget.dart';
|
||||
|
||||
class MyExperiencePage extends StatefulWidget {
|
||||
const MyExperiencePage({super.key});
|
||||
@@ -20,29 +20,29 @@ class MyExperiencePage extends StatefulWidget {
|
||||
class _MyExperiencePageState extends State<MyExperiencePage> {
|
||||
ScrollController scrollController = ScrollController();
|
||||
int runTime = 0;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
Timer(Duration.zero, () {
|
||||
controller.resetParm();
|
||||
controller.getAllBook();
|
||||
controller.page = 0;
|
||||
controller.getData();
|
||||
scrollController.addListener(() {
|
||||
print(
|
||||
"${scrollController.position.pixels} ${scrollController.position.maxScrollExtent}");
|
||||
int ctime = DateTime.now().millisecondsSinceEpoch;
|
||||
if (ctime - runTime > 100 &&
|
||||
scrollController.position.pixels + 80 >
|
||||
scrollController.position.maxScrollExtent) {
|
||||
runTime = ctime;
|
||||
print(
|
||||
"bottom get more data ${scrollController.position.pixels} ${scrollController.position.maxScrollExtent}");
|
||||
controller.getData();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// Timer(Duration.zero, () {
|
||||
// controller.resetParm();
|
||||
// controller.getAllBook();
|
||||
// controller.page = 0;
|
||||
// controller.getData();
|
||||
// scrollController.addListener(() {
|
||||
// print(
|
||||
// "${scrollController.position.pixels} ${scrollController.position.maxScrollExtent}");
|
||||
// int ctime = DateTime.now().millisecondsSinceEpoch;
|
||||
// if (ctime - runTime > 100 &&
|
||||
// scrollController.position.pixels + 80 >
|
||||
// scrollController.position.maxScrollExtent) {
|
||||
// runTime = ctime;
|
||||
// print(
|
||||
// "bottom get more data ${scrollController.position.pixels} ${scrollController.position.maxScrollExtent}");
|
||||
// controller.getData();
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
get controller => Get.find<BookExperienceListController>();
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -4,7 +4,7 @@ import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
import 'package:vbvs_app/controller/mh/my_experience_list_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/my_experience_list_controller.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/device/body_device_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/muser_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/muser_info_controller.dart';
|
||||
|
||||
|
||||
class NewHomePage extends StatefulWidget {
|
||||
@@ -497,7 +497,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
||||
Alignment
|
||||
.center,
|
||||
child: Text(
|
||||
'${day['scoreType'] ?? "暂无".tr}',
|
||||
'${day['scoreType'] ?? "暂无"}',
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
@@ -5,7 +5,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/muser_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/muser_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
|
||||
import 'package:vbvs_app/enum/LoginStatus.dart';
|
||||
@@ -217,7 +217,7 @@ class _MinePageState extends State<NewMinePage> {
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 60.rpx, right: 60.rpx, top: 94.rpx),
|
||||
left: 30.rpx, right: 30.rpx, top: 94.rpx),
|
||||
child: Text(
|
||||
'对已绑定的智能设备进行个性化配置,以获得更好的体验,',
|
||||
style: TextStyle(
|
||||
@@ -261,29 +261,28 @@ class _MinePageState extends State<NewMinePage> {
|
||||
children: [
|
||||
_buildListTile(
|
||||
Icons.receipt_long, '我的订单', '快捷查看我在网上的订单记录',
|
||||
showTopLine: true),
|
||||
showTopLine: true, path: "/issueListpage"),
|
||||
_buildListTile(Icons.store_mall_directory, '门店体验',
|
||||
'如果想免费体验智能设备,可在此进行提前预约',
|
||||
path: "/experienceStorePage"),
|
||||
_buildListTile(
|
||||
Icons.build,
|
||||
'设备报修',
|
||||
'当您的智能设备需要报修时,可以通过该功能联系解决',
|
||||
'当您的智能设备需要报修时,可以通过该功能联系解决,',
|
||||
path: '/deviceRepairPage',
|
||||
),
|
||||
_buildListTile(
|
||||
Icons.shopping_cart, '网上商城', '最新的智能产品线上购买服务'),
|
||||
Icons.shopping_cart, '网上商城', '最新的智能产品线上购买服务',
|
||||
path: "/issueListpage"),
|
||||
_buildListTile(
|
||||
Icons.location_on, '地址管理', '用于收货和报修时联系您',
|
||||
path: "/addressListPage"),
|
||||
_buildListTile(Icons.help_outline, '问题与帮助',
|
||||
'常见的问题汇总,如:智能床连接流程、如何查看睡眠报告',
|
||||
path: "/issueListpage"),
|
||||
_buildListTile(
|
||||
Icons.headset_mic,
|
||||
'在线客服',
|
||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
||||
),
|
||||
_buildListTile(Icons.headset_mic, '在线客服',
|
||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
||||
path: "/issueListpage"),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -10,7 +10,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh/people_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
|
||||
class PeopleInfoPage extends StatefulWidget {
|
||||
@@ -91,7 +91,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
Positioned(
|
||||
right: 30.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// bool isOk = true;
|
||||
@@ -269,6 +269,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
),
|
||||
),
|
||||
getLine(),
|
||||
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height *
|
||||
@@ -280,7 +281,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'性名',
|
||||
'姓名',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
@@ -447,48 +448,60 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 300.rpx,
|
||||
child: TextField(
|
||||
obscureText: false,
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.white),
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.transparent,
|
||||
filled: true,
|
||||
hintText: "请输入身高(厘米)",
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white),
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsets.all(0)),
|
||||
onChanged: (value) {
|
||||
controller.model.peopleList[index]
|
||||
.height = value;
|
||||
controller.updateAll();
|
||||
},
|
||||
controller: controller.onReDraw(
|
||||
TextEditingController(
|
||||
text: controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.height ??
|
||||
""),
|
||||
(textEditingController) {
|
||||
textEditingController.text =
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(
|
||||
milliseconds: 250), () {
|
||||
showHeightPickerDialog(
|
||||
context,
|
||||
initialHeight: controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.height ??
|
||||
170,
|
||||
onConfirm:
|
||||
(int selectedHeight) {
|
||||
controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.height ??
|
||||
"";
|
||||
}, "people_height_$index"),
|
||||
.height =
|
||||
selectedHeight.toString();
|
||||
controller.updateAll();
|
||||
print(
|
||||
"身高: $selectedHeight cm");
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.height !=
|
||||
null
|
||||
? "${controller.model.peopleList[index].height} cm"
|
||||
: '',
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -514,46 +527,59 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 300.rpx,
|
||||
child: TextField(
|
||||
obscureText: false,
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction:
|
||||
TextInputAction.done,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.white),
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.transparent,
|
||||
filled: true,
|
||||
hintText: "请输入体重(公斤)",
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white),
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsets.all(0)),
|
||||
onChanged: (value) {
|
||||
controller.model.peopleList[index]
|
||||
.weight = value;
|
||||
controller.updateAll();
|
||||
},
|
||||
controller: controller.onReDraw(
|
||||
TextEditingController(
|
||||
text: controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.weight ??
|
||||
""),
|
||||
(textEditingController) {
|
||||
textEditingController.text =
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
Future.delayed(
|
||||
const Duration(
|
||||
milliseconds: 250), () {
|
||||
showWeightPickerDialog(
|
||||
context,
|
||||
initialWeight: controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.weight ??
|
||||
"",
|
||||
onConfirm:
|
||||
(int selectedWeight) {
|
||||
controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.weight ??
|
||||
"";
|
||||
}, "people_weight_$index"),
|
||||
.weight =
|
||||
selectedWeight
|
||||
.toString(); // ✅ 转成字符串
|
||||
controller.updateAll();
|
||||
print(
|
||||
"体重: $selectedWeight kg");
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
controller
|
||||
.model
|
||||
.peopleList[index]
|
||||
.weight !=
|
||||
null
|
||||
? "${controller.model.peopleList[index].weight} kg"
|
||||
: '',
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16.rpx),
|
||||
Icon(Icons.expand_more,
|
||||
color: Colors.white,
|
||||
size: 48.rpx),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -661,73 +687,6 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// getLine(),
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// height: MediaQuery.sizeOf(context).height *
|
||||
// 0.064,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text(
|
||||
// '电话',
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF9EA4B7),
|
||||
// fontSize: 30.rpx,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// width: 300.rpx,
|
||||
// child: TextField(
|
||||
// obscureText: false,
|
||||
// keyboardType: TextInputType.number,
|
||||
// textInputAction:
|
||||
// TextInputAction.done,
|
||||
// textAlign: TextAlign.right,
|
||||
// style: TextStyle(
|
||||
// fontSize: 30.rpx,
|
||||
// color: Colors.white),
|
||||
// decoration: InputDecoration(
|
||||
// fillColor: Colors.transparent,
|
||||
// filled: true,
|
||||
// hintText: "请输入电话",
|
||||
// hintStyle: TextStyle(
|
||||
// color: Colors.white),
|
||||
// border: InputBorder.none,
|
||||
// contentPadding:
|
||||
// EdgeInsets.all(0)),
|
||||
// onChanged: (value) {
|
||||
// controller.model.peopleList[index]
|
||||
// .tel = value;
|
||||
// controller.updateAll();
|
||||
// },
|
||||
// controller: controller.onReDraw(
|
||||
// TextEditingController(
|
||||
// text: controller
|
||||
// .model
|
||||
// .peopleList[index]
|
||||
// .tel ??
|
||||
// ""),
|
||||
// (textEditingController) {
|
||||
// textEditingController.text =
|
||||
// controller
|
||||
// .model
|
||||
// .peopleList[index]
|
||||
// .tel ??
|
||||
// "";
|
||||
// }, "people_tel_$index"),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
getLine(),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
823
lib/pages/mh_page/register_page.dart
Normal file
823
lib/pages/mh_page/register_page.dart
Normal file
@@ -0,0 +1,823 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/register_controller.dart';
|
||||
import 'package:vbvs_app/controller/time/countdown_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
|
||||
class RegisterPage extends GetView<RegisterController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
// final FocusNode _focusNode1 = FocusNode();
|
||||
// final FocusNode _focusNode2 = FocusNode();
|
||||
// final FocusNode _focusNode3 = FocusNode();
|
||||
// final FocusNode _focusNode4 = FocusNode();
|
||||
|
||||
RegisterPage() {
|
||||
controller.model.pdshow = true;
|
||||
controller.model.cpdshow = true;
|
||||
Get.put(RegisterController());
|
||||
|
||||
// _focusNode1.addListener(() {
|
||||
// if (_focusNode1.hasFocus) {
|
||||
// MyUtils.scrollToFocusedInput(_focusNode1, _scrollController);
|
||||
// }
|
||||
// });
|
||||
// _focusNode2.addListener(() {
|
||||
// if (_focusNode2.hasFocus) {
|
||||
// MyUtils.scrollToFocusedInput(_focusNode2, _scrollController);
|
||||
// }
|
||||
// });
|
||||
// _focusNode3.addListener(() {
|
||||
// if (_focusNode3.hasFocus) {
|
||||
// MyUtils.scrollToFocusedInput(_focusNode3, _scrollController);
|
||||
// }
|
||||
// });
|
||||
// _focusNode4.addListener(() {
|
||||
// if (_focusNode4.hasFocus) {
|
||||
// MyUtils.scrollToFocusedInput(_focusNode4, _scrollController);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
|
||||
return GestureDetector(
|
||||
// onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
// key: scaffoldKey,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'用户注册',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 20.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
controller: _scrollController,
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
// TitleComponentWidget(
|
||||
// titleName: '用户注册',
|
||||
// ),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
98.rpx, 0, 98.rpx, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.886,
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 1,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 184.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: TextFormField(
|
||||
// autofocus: true,
|
||||
// focusNode: _focusNode1,
|
||||
onChanged: (value) {
|
||||
controller.model.register_phone =
|
||||
value;
|
||||
},
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入手机号',
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
20.rpx, 0, 0, 10.rpx),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 20.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,
|
||||
// focusNode: _focusNode2,
|
||||
onChanged: (value) {
|
||||
controller.model.register_pd =
|
||||
value;
|
||||
},
|
||||
// obscureText: true,
|
||||
obscureText:
|
||||
controller.model.pdshow!,
|
||||
decoration: InputDecoration(
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输入密码',
|
||||
hintStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(20.rpx,
|
||||
20.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:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.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:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '确认密码',
|
||||
hintStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(20.rpx,
|
||||
20.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:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.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:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
hintText: '请输验证码',
|
||||
hintStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
enabledBorder:
|
||||
InputBorder.none,
|
||||
focusedBorder:
|
||||
InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder:
|
||||
InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(20.rpx, 0,
|
||||
0, 10.rpx),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0.2, 0.1),
|
||||
child: Container(
|
||||
width: 3,
|
||||
height: 30,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFCCCCCC),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0.9, 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(
|
||||
// "网络未连接,请开启设备网络后重试");
|
||||
// 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
|
||||
? '获取验证码'
|
||||
: '${countdownController.countdown.value}秒',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF333333),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 19, 0, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.022,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.022,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0, 0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(0, 3, 0, 0),
|
||||
child: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity
|
||||
.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
64),
|
||||
),
|
||||
),
|
||||
unselectedWidgetColor:
|
||||
Color(0xFFD3D3D3),
|
||||
),
|
||||
child: Obx(
|
||||
() => Checkbox(
|
||||
value: controller
|
||||
.model
|
||||
.register_agree ??
|
||||
false,
|
||||
onChanged:
|
||||
(newValue) async {
|
||||
controller.model
|
||||
.register_agree =
|
||||
newValue;
|
||||
|
||||
controller
|
||||
.updateAll();
|
||||
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
|
||||
// if (newValue ==
|
||||
// true) {
|
||||
// Deviceconfig
|
||||
// .initPlatformState();
|
||||
// }
|
||||
},
|
||||
side: BorderSide(
|
||||
width: 1.5,
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.secondaryText,
|
||||
),
|
||||
activeColor:
|
||||
const Color(
|
||||
0xFF84F5FF),
|
||||
checkColor:
|
||||
Color(0xFF003058),
|
||||
visualDensity:
|
||||
VisualDensity(
|
||||
horizontal:
|
||||
-4.0,
|
||||
vertical:
|
||||
-4.0), // 变小
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(0, 0, 0, 0),
|
||||
child: Container(
|
||||
width:
|
||||
MediaQuery.sizeOf(context)
|
||||
.width *
|
||||
0.622,
|
||||
height:
|
||||
MediaQuery.sizeOf(context)
|
||||
.height *
|
||||
1,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 466,
|
||||
minHeight: 30,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Container(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(),
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'我已阅读并同意',
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors
|
||||
.white,
|
||||
fontSize: 12,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showCustomConfirmOfWebViewDialog(
|
||||
context,
|
||||
"用户协议",
|
||||
"/#/pages/agreement/agreement?type=2&hideHead=true");
|
||||
},
|
||||
child: Text(
|
||||
'《用户协议》',
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Color(
|
||||
0xFF1890FF),
|
||||
fontSize: 12,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: Text(
|
||||
'与',
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Colors
|
||||
.white,
|
||||
fontSize: 12,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
AlignmentDirectional(
|
||||
0, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showCustomConfirmOfWebViewDialog(
|
||||
context,
|
||||
"隐私协议",
|
||||
"/#/pages/agreement/agreement?type=1&hideHead=true");
|
||||
},
|
||||
child: Text(
|
||||
'《隐私协议》',
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color: Color(
|
||||
0xFF1890FF),
|
||||
fontSize: 12,
|
||||
letterSpacing:
|
||||
0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 29, 0, 0),
|
||||
child: Container(
|
||||
width: bodysize!.maxWidth,
|
||||
height: bodysize!.maxHeight * 0.056,
|
||||
decoration: BoxDecoration(),
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection:
|
||||
GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// if (CommonVariables.isNetWorkOn ==
|
||||
// false) {
|
||||
// showToast("网络未连接,请开启设备网络后重试");
|
||||
// return;
|
||||
// }
|
||||
// String msg = await controller
|
||||
// .registerUser(context);
|
||||
// if (msg == null || msg.isEmpty) {
|
||||
// Get.toNamed("/loginPage");
|
||||
// }
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Text(
|
||||
"提交",
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color:
|
||||
stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,12 @@ import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||
import 'package:vbvs_app/common/color/repair_status.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/repair_process.dart';
|
||||
import 'package:vbvs_app/pages/device_control/repair_process_widget.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/repair_process.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/repair_process_widget.dart';
|
||||
|
||||
import '../../component/img/img_preview_widget.dart';
|
||||
import '../../controller/mh/apply_repair_controller.dart';
|
||||
import '../../controller/mh/repair_info_controller.dart';
|
||||
import '../../controller/mh_controller/apply_repair_controller.dart';
|
||||
import '../../controller/mh_controller/repair_info_controller.dart';
|
||||
|
||||
class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -131,9 +131,8 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0, 0, 10),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0, 0, 20.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
decoration: BoxDecoration(
|
||||
@@ -141,8 +140,9 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(17, 10, 0, 0),
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
34.rpx, 10, 0, 0),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
@@ -450,13 +450,14 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
.status &&
|
||||
controller.model.applyRepairModel!
|
||||
.score ==
|
||||
null)
|
||||
null) {
|
||||
return Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(1, 0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(17, 33, 0, 24),
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
34.rpx, 66.rpx, 0, 48.rpx),
|
||||
child: Container(
|
||||
width: 61,
|
||||
height: MediaQuery.sizeOf(context)
|
||||
@@ -510,6 +511,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
}),
|
||||
Obx(() {
|
||||
@@ -518,17 +520,17 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
.status &&
|
||||
controller.model.applyRepairModel!
|
||||
.score !=
|
||||
null)
|
||||
null) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0, 0, 0, 5),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0, 0, 10.rpx),
|
||||
child: Container(
|
||||
width:
|
||||
MediaQuery.sizeOf(context).width,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, //true
|
||||
borderRadius:
|
||||
BorderRadius.circular(8),
|
||||
BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
@@ -578,9 +580,9 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
17, 0, 0, 0),
|
||||
EdgeInsetsDirectional
|
||||
.fromSTEB(34.rpx,
|
||||
0, 0, 0),
|
||||
child: Container(
|
||||
width:
|
||||
MediaQuery.sizeOf(
|
||||
@@ -602,13 +604,12 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
const AlignmentDirectional(
|
||||
-1, 0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10),
|
||||
20.rpx),
|
||||
child: Text(
|
||||
// '2023-08-22 12:12:44',
|
||||
MyUtils.formatDateTime(
|
||||
@@ -751,6 +752,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
}),
|
||||
],
|
||||
211
lib/pages/mh_page/repair_history_widget.dart
Normal file
211
lib/pages/mh_page/repair_history_widget.dart
Normal file
@@ -0,0 +1,211 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/repair_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/repair_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/ColorChangeOnTap.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
class RepairHistoryWidget extends GetView<RepairInfoController> {
|
||||
int index;
|
||||
RepairListController repairListController;
|
||||
|
||||
RepairHistoryWidget(
|
||||
{required this.index, required this.repairListController}) {}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
int tmp = index;
|
||||
index = tmp;
|
||||
// return ColorChangeOnPress(
|
||||
// pressColor: AppColors().press_color, // 按下时的颜色
|
||||
// shouldNavigate: true, // 是否需要跳转
|
||||
// routeName: "/repairHistoryListPage", // 路由名称
|
||||
// topLeft: 16,
|
||||
// topRight: 16,
|
||||
// bottomLeft: 16,
|
||||
// bottomRight: 16,
|
||||
// onTap: () async {
|
||||
// print("object");
|
||||
// final RepairInfoController repairInfoController =
|
||||
// Get.find<RepairInfoController>();
|
||||
// await repairInfoController
|
||||
// .initData(repairListController.model.repairList[index])
|
||||
// .then((_) {
|
||||
// repairInfoController.updateAll();
|
||||
// // Get.toNamed("/repairHistoryListPage"); // 这个在 ColorChangeOnPress 中已经处理
|
||||
// });
|
||||
// },
|
||||
// child: Container(
|
||||
// width: MediaQuery.sizeOf(context).width,
|
||||
// constraints: BoxConstraints(
|
||||
// minHeight: 70,
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(15, 14, 15, 13),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: MediaQuery.sizeOf(context).width * 0.5,
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// repairListController
|
||||
// .model.repairList[index].device_category ??
|
||||
// '',
|
||||
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF333333),
|
||||
// fontSize: 30.rpx,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// "报修单号:${repairListController.model.repairList[index].id}",
|
||||
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFFC8CBD2),
|
||||
// fontSize: AppFontsize.small_text_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// "提交时间:" +
|
||||
// (MyUtils.formatDateTime(repairListController
|
||||
// .model.repairList[index].create_time!) ??
|
||||
// ''),
|
||||
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFFC8CBD2),
|
||||
// fontSize: AppFontsize.small_text_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// width: MediaQuery.sizeOf(context).width * 0.2,
|
||||
// height: MediaQuery.sizeOf(context).height * 0.075,
|
||||
// constraints: BoxConstraints(
|
||||
// maxWidth: 130,
|
||||
// ),
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(0, 0),
|
||||
// child: Text(
|
||||
// repairListController.model.repairList[index].status ??
|
||||
// '',
|
||||
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF333333),
|
||||
// fontSize: AppFontsize.normal_text_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Align(
|
||||
// alignment: AlignmentDirectional(0, 0.05),
|
||||
// child: Icon(
|
||||
// Icons.arrow_forward_ios,
|
||||
// color: FlutterFlowTheme.of(context).secondaryText,
|
||||
// size: 10,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 27)),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
return ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Color(0XFF055466),
|
||||
padding: EdgeInsets.only(top: 0),
|
||||
onTap: () {
|
||||
Get.toNamed("/repairHistoryListPage");
|
||||
},
|
||||
child: Container(
|
||||
// height: 119.rpx,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0733,
|
||||
decoration: BoxDecoration(
|
||||
// color: const Color(0xFF06486F),
|
||||
border: Border(
|
||||
top: index == 0
|
||||
? BorderSide(color: const Color(0xFF929699), width: 1.rpx)
|
||||
: BorderSide.none,
|
||||
bottom:
|
||||
BorderSide(color: const Color(0xFF929699), width: 1.rpx),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(17.rpx, 0, 30.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 左侧设备信息
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
repairListController
|
||||
.model.repairList[index].device_category ??
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 30.rpx, height: 1),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
"提交时间:" +
|
||||
(MyUtils.formatDateTime(repairListController
|
||||
.model.repairList[index].create_time!) ??
|
||||
''),
|
||||
style: TextStyle(
|
||||
color: Colors.white60, fontSize: 20.rpx, height: 1),
|
||||
),
|
||||
],
|
||||
),
|
||||
// 右侧状态
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
repairListController.model.repairList[index].status ??
|
||||
'',
|
||||
style: TextStyle(color: Colors.white, fontSize: 26.rpx),
|
||||
),
|
||||
Icon(Icons.arrow_forward_ios,
|
||||
color: Colors.white, size: 30.rpx),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)));
|
||||
}
|
||||
}
|
||||
387
lib/pages/mh_page/repair_list.dart
Normal file
387
lib/pages/mh_page/repair_list.dart
Normal file
@@ -0,0 +1,387 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/apply_repair_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/repair_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/repair_history_widget.dart';
|
||||
|
||||
class DeviceRepairPage extends GetView<RepairListController> {
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
BoxConstraints? bodysize;
|
||||
final ScrollController scrollController = ScrollController();
|
||||
// final ScrollController scrollController = ScrollController();
|
||||
final RepairListController controller = Get.find();
|
||||
|
||||
// DeviceRepairPage() {
|
||||
// controller.model.limit = AppConstants.limit;
|
||||
// controller.model.offset = 0;
|
||||
// controller.model.isLoading = false;
|
||||
// controller.model.hasMore = true;
|
||||
// controller.model.repairList.clear();
|
||||
// controller.initData();
|
||||
// Get.put(RepairListController());
|
||||
|
||||
// scrollController.addListener(() {
|
||||
// if (scrollController.position.pixels ==
|
||||
// scrollController.position.maxScrollExtent &&
|
||||
// controller.model.hasMore) {
|
||||
// controller.initData();
|
||||
// controller.updateAll();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// final List<ApplyRepairModel> mockData
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
bodysize = cc;
|
||||
controller.model.repairList = List.generate(4, (index) {
|
||||
return ApplyRepairModel()
|
||||
..device_category = "SWESO1号智能一键入眠床"
|
||||
..status = index == 0 ? "已提交" : "已完成"
|
||||
..create_time = DateTime(2024, 5, 12, 12, 5, 12);
|
||||
});
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
// key: scaffoldKey,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设备报修',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 20.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(30.rpx, 6.rpx, 30.rpx, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 报修须知
|
||||
Container(
|
||||
height: 412.rpx,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Color(0XFFC8CBD2), width: 0.rpx),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
27.rpx, 49.rpx, 43.rpx, 39.rpx),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 固定的标题部分
|
||||
Text(
|
||||
"报修须知",
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 33.rpx),
|
||||
// 可滚动的正文部分,限定高度
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
color: Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
TextSpan(
|
||||
text: "400-8756-966",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
// height: 1.3,
|
||||
decoration: TextDecoration
|
||||
.underline, // 添加下划线
|
||||
decorationColor:
|
||||
Colors.white,
|
||||
decorationThickness: 4.rpx,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: " 反馈。",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0XFF929699),
|
||||
fontSize: 26.rpx,
|
||||
height: 1.3)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
))),
|
||||
|
||||
SizedBox(height: 24.rpx),
|
||||
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// bool isOk = true;
|
||||
// for (var i = 0; i < 2; i++) {
|
||||
// var d = controller.model.peopleList[i];
|
||||
// print("${d.toJson()}");
|
||||
// String before = "人员信息${i == 0 ? "A" : "B"}:";
|
||||
// if (isOk &&
|
||||
// d.height != null &&
|
||||
// d.height != "" &&
|
||||
// int.tryParse("${d.height}") == null) {
|
||||
// showToast("$before身高请输入数字");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.weight != null &&
|
||||
// d.weight != "" &&
|
||||
// int.tryParse("${d.weight}") == null) {
|
||||
// showToast("$before体重请输入数字");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.tel != null &&
|
||||
// d.tel != "" &&
|
||||
// MyUtils.isValidPhoneNumber("${d.tel}") ==
|
||||
// false) {
|
||||
// showToast("$before请输入正确的电话");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk &&
|
||||
// d.emergencyContact != null &&
|
||||
// d.emergencyContact != "" &&
|
||||
// MyUtils.isValidPhoneNumber(
|
||||
// "${d.emergencyContact}") ==
|
||||
// false) {
|
||||
// showToast("$before请输入正确的紧急联系人电话");
|
||||
// isOk = false;
|
||||
// }
|
||||
// if (isOk) {
|
||||
// controller.savePeoples().then((d) {
|
||||
// showToast("保存成功", color: color_success);
|
||||
// }).catchError((d) {
|
||||
// print("$d");
|
||||
// showToast("保存失败");
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// controller.model.peopleList.forEach((d) {});
|
||||
},
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
"我要报修",
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: stringToColor("#011D33"),
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
SizedBox(height: 235.rpx),
|
||||
|
||||
// 报修历史标题
|
||||
Container(
|
||||
width: double.infinity,
|
||||
child: Text("报修历史",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
height: 1)),
|
||||
),
|
||||
|
||||
SizedBox(height: 32.rpx),
|
||||
|
||||
// 报修历史列表
|
||||
// Expanded(
|
||||
// child: ListView.builder(
|
||||
// itemCount: mockData.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// final item = mockData[index];
|
||||
// return ClickableContainer(
|
||||
// backgroundColor: Colors.transparent,
|
||||
// highlightColor: Color(0XFF055466),
|
||||
// padding: EdgeInsets.only(top: 0),
|
||||
// onTap: () {
|
||||
// Get.toNamed("/repairHistoryListPage");
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 119.rpx,
|
||||
// // margin: const EdgeInsets.only(bottom: 10),
|
||||
// // padding: const EdgeInsets.symmetric(
|
||||
// // vertical: 12, horizontal: 16),
|
||||
// decoration: BoxDecoration(
|
||||
// // color: const Color(0xFF06486F),
|
||||
// border: Border(
|
||||
// top: index == 0
|
||||
// ? BorderSide(
|
||||
// color:
|
||||
// const Color(0xFF929699),
|
||||
// width: 1.rpx)
|
||||
// : BorderSide.none,
|
||||
// bottom: BorderSide(
|
||||
// color: const Color(0xFF929699),
|
||||
// width: 1.rpx),
|
||||
// ),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.fromLTRB(
|
||||
// 17.rpx, 0, 30.rpx, 0),
|
||||
// child: Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// // 左侧设备信息
|
||||
// Column(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.center,
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// item.device_name ?? '',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 30.rpx),
|
||||
// ),
|
||||
// const SizedBox(height: 4),
|
||||
// Text(
|
||||
// "提交时间:${item.create_time?.toString().substring(0, 19) ?? ''}",
|
||||
// style: TextStyle(
|
||||
// color: Colors.white60,
|
||||
// fontSize: 20.rpx),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// // 右侧状态
|
||||
// Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// item.status ?? '',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 26.rpx),
|
||||
// ),
|
||||
// Icon(Icons.arrow_forward_ios,
|
||||
// color: Colors.white,
|
||||
// size: 30.rpx),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// )));
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
|
||||
Obx(() {
|
||||
return Visibility(
|
||||
visible: controller.model.repairList != null &&
|
||||
controller.model.repairList!.isNotEmpty,
|
||||
replacement: EmptyMessageWidget(),
|
||||
child: Expanded(
|
||||
child: Obx(() => ListView(
|
||||
controller:
|
||||
scrollController, // 绑定 ScrollController
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: (controller.model.repairList
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => RepairHistoryWidget(
|
||||
index: e.key,
|
||||
repairListController: controller))
|
||||
.toList() as List<Widget>)
|
||||
// .divide(const SizedBox(
|
||||
// height: 13,
|
||||
// ))
|
||||
// .addToEnd(SizedBox(
|
||||
// height: AppConstants.list_end_height,
|
||||
// ))
|
||||
)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
))),
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,9 @@ import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/color/repair_status.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/repair_info_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/repair_info_controller.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
@@ -43,7 +44,7 @@ class RepairStatusWidget extends GetView {
|
||||
'未知时间',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
color: index ==
|
||||
repairInfoController
|
||||
@@ -66,7 +67,7 @@ class RepairStatusWidget extends GetView {
|
||||
'未知状态',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize.normal_text_size,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
color: repairInfoController
|
||||
.model.repairProcessList[index].status ==
|
||||
@@ -107,7 +108,7 @@ class RepairStatusWidget extends GetView {
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: AppFontsize.small_text_size,
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
),
|
||||
@@ -149,7 +149,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
// Get.toNamed("/applyRepairPage");
|
||||
@@ -5,10 +5,7 @@ import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/mh/score_controller.dart' as mh;
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
import 'package:vbvs_app/controller/mh_controller/score_controller.dart' as mh;
|
||||
class ScorePage extends GetView<mh.ScoreController> {
|
||||
BoxConstraints? bodysize;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
@@ -425,7 +422,7 @@ class ScorePage extends GetView<mh.ScoreController> {
|
||||
// ),
|
||||
|
||||
child: CustomCard(
|
||||
borderRadius: 10,
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.toNamed("/applyRepairPage");
|
||||
@@ -3,8 +3,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
import '../../common/util/MyUtils.dart';
|
||||
|
||||
class SearchWidget extends GetView {
|
||||
@@ -163,106 +161,7 @@ class SearchWidget extends GetView {
|
||||
),
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// width: MediaQuery.sizeOf(context).width,
|
||||
// height: 44,
|
||||
// decoration: BoxDecoration(
|
||||
// // color: Colors.red,
|
||||
// borderRadius: BorderRadius.circular(50.rpx),
|
||||
// ),
|
||||
// child: Container(
|
||||
// width: MediaQuery.sizeOf(context).width,
|
||||
// height: 44,
|
||||
// decoration: BoxDecoration(
|
||||
// color: valueOrDefault<Color>(
|
||||
// color,
|
||||
// Color(0xFF821111),
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(50),
|
||||
// ),
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(0, 0),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(0, 6, 0, 6),
|
||||
// child: Container(
|
||||
// padding: EdgeInsets.only(right: 30.rpx),
|
||||
// width: double.infinity,
|
||||
// height: 70.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10.rpx)),
|
||||
// child: TextField(
|
||||
// controller: TextEditingController(text: keyword),
|
||||
// onChanged: (d) {
|
||||
// onChange?.call(d);
|
||||
// },
|
||||
// style: TextStyle(
|
||||
// fontSize: 28.rpx, color: stringToColor("#C8CBD2")),
|
||||
// decoration: InputDecoration(
|
||||
// contentPadding:
|
||||
// EdgeInsets.only(top: 0, bottom: 0, right: 20.rpx),
|
||||
// border: OutlineInputBorder(
|
||||
// borderSide: BorderSide.none,
|
||||
// borderRadius: BorderRadius.circular(50.rpx)),
|
||||
// filled: true,
|
||||
// hintText: "$hint",
|
||||
// hintStyle: TextStyle(color: stringToColor("#c8cbd2")),
|
||||
// fillColor: stringToColor("#FFFFFF"),
|
||||
// // prefixIcon: Icon(
|
||||
// // Icons.search,
|
||||
// // size: 42.rpx,
|
||||
// // color: stringToColor("#D3B684"),
|
||||
// // ),
|
||||
// prefixIcon: Container(
|
||||
// padding: EdgeInsets.all(15.rpx), // 可根据需求调整内边距
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/images/search.svg',
|
||||
// fit: BoxFit.contain, // 确保 SVG 图像不会超出边界
|
||||
// color: stringToColor("#D3B684"),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )),
|
||||
// Align(
|
||||
// alignment: AlignmentDirectional(0.95, 0),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(0, 5, 0, 5),
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// findCallback?.call();
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 50,
|
||||
// // height: 50,
|
||||
// height: MediaQuery.sizeOf(context).height * 1,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xFFD3B684),
|
||||
// borderRadius: BorderRadius.circular(50),
|
||||
// ),
|
||||
// child: Align(
|
||||
// alignment: AlignmentDirectional(0, 0),
|
||||
// child: Text(
|
||||
// '搜索',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Colors.white,
|
||||
// fontSize: AppFontsize.normal_text_size,
|
||||
// letterSpacing: 0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_switch/flutter_switch.dart';
|
||||
import 'package:vbvs_app/common/color/appColors.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
|
||||
import '../../controller/mh/sleeping_habit_controller.dart';
|
||||
import '../../controller/mh_controller/sleeping_habit_controller.dart';
|
||||
|
||||
//睡眠隐私
|
||||
class Smys extends GetView<SleepingHabitController> {
|
||||
Reference in New Issue
Block a user