调整尺寸
This commit is contained in:
@@ -31,7 +31,7 @@ class BaseWidgetsPage extends GetView<BaseWidgetsController> {
|
|||||||
// 对应的页面
|
// 对应的页面
|
||||||
List<Widget> _buildPages() {
|
List<Widget> _buildPages() {
|
||||||
return [
|
return [
|
||||||
MapPage(),
|
// MapPage(),
|
||||||
ReservationPage(),
|
ReservationPage(),
|
||||||
CarInfoPage(),
|
CarInfoPage(),
|
||||||
MinePage(),
|
MinePage(),
|
||||||
@@ -46,12 +46,12 @@ class BaseWidgetsPage extends GetView<BaseWidgetsController> {
|
|||||||
jumpTabAndPage(index);
|
jumpTabAndPage(index);
|
||||||
}, // 切换tab事件
|
}, // 切换tab事件
|
||||||
items: [
|
items: [
|
||||||
NavigationItemModel(
|
/*NavigationItemModel(
|
||||||
label: '地图',
|
label: '地图',
|
||||||
icon: AntdIcon.location,
|
icon: AntdIcon.location,
|
||||||
selectedIcon: AntdIcon.location_fill,
|
selectedIcon: AntdIcon.location_fill,
|
||||||
dot: false,
|
dot: false,
|
||||||
),
|
),*/
|
||||||
NavigationItemModel(
|
NavigationItemModel(
|
||||||
label: '加氢预约',
|
label: '加氢预约',
|
||||||
icon: AntdIcon.orderedlist,
|
icon: AntdIcon.orderedlist,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class AttachmentViewerController extends GetxController {
|
|||||||
late final String fileType;
|
late final String fileType;
|
||||||
|
|
||||||
final RxBool isLoading = true.obs;
|
final RxBool isLoading = true.obs;
|
||||||
// This is the correct state variable: it stores the local file path.
|
|
||||||
final RxString localFilePath = ''.obs;
|
final RxString localFilePath = ''.obs;
|
||||||
final RxString loadingText = '加载中...'.obs;
|
final RxString loadingText = '加载中...'.obs;
|
||||||
|
|
||||||
@@ -26,7 +25,6 @@ class AttachmentViewerController extends GetxController {
|
|||||||
|
|
||||||
if (url.toLowerCase().endsWith('.pdf')) {
|
if (url.toLowerCase().endsWith('.pdf')) {
|
||||||
fileType = 'pdf';
|
fileType = 'pdf';
|
||||||
// This is the correct logic: download the file first.
|
|
||||||
_downloadPdf();
|
_downloadPdf();
|
||||||
} else {
|
} else {
|
||||||
fileType = 'image';
|
fileType = 'image';
|
||||||
@@ -34,12 +32,10 @@ class AttachmentViewerController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Downloads the PDF file to a temporary directory and stores its path.
|
|
||||||
Future<void> _downloadPdf() async {
|
Future<void> _downloadPdf() async {
|
||||||
try {
|
try {
|
||||||
final dio = Dio();
|
final dio = Dio();
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
// Use a unique name to avoid caching issues
|
|
||||||
final fileName = '${DateTime.now().millisecondsSinceEpoch}_${url.split('/').last}';
|
final fileName = '${DateTime.now().millisecondsSinceEpoch}_${url.split('/').last}';
|
||||||
final savePath = '${tempDir.path}/$fileName';
|
final savePath = '${tempDir.path}/$fileName';
|
||||||
|
|
||||||
@@ -53,7 +49,6 @@ class AttachmentViewerController extends GetxController {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// On success, update the local file path
|
|
||||||
localFilePath.value = savePath;
|
localFilePath.value = savePath;
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:getx_scaffold/getx_scaffold.dart';
|
import 'package:getx_scaffold/getx_scaffold.dart';
|
||||||
|
|
||||||
import '../../storage_service.dart';
|
|
||||||
|
|
||||||
class LoginController extends GetxController with BaseControllerMixin {
|
class LoginController extends GetxController with BaseControllerMixin {
|
||||||
@override
|
@override
|
||||||
String get builderId => 'login';
|
String get builderId => 'login';
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
|
|||||||
children: [
|
children: [
|
||||||
Card(
|
Card(
|
||||||
elevation: 2,
|
elevation: 2,
|
||||||
child: Padding(
|
child: Container(
|
||||||
|
height: 55.h,
|
||||||
padding: EdgeInsets.all(3),
|
padding: EdgeInsets.all(3),
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
controller: tabController,
|
controller: tabController,
|
||||||
@@ -142,9 +143,12 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
|
|||||||
controller: controller.driverIdentityController,
|
controller: controller.driverIdentityController,
|
||||||
cursorColor: AppTheme.themeColor,
|
cursorColor: AppTheme.themeColor,
|
||||||
maxLength: 8,
|
maxLength: 8,
|
||||||
|
style: TextStyle(fontSize: 14),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请输入身份后8位',
|
hintText: '请输入身份后8位',
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
|
hintStyle: TextStyle(fontSize: 14),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
prefixIcon: Icon(Icons.person_2_outlined, color: Colors.grey),
|
prefixIcon: Icon(Icons.person_2_outlined, color: Colors.grey),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: AppTheme.themeColor),
|
borderSide: BorderSide(color: AppTheme.themeColor),
|
||||||
@@ -237,9 +241,12 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
|
|||||||
TextFormField(
|
TextFormField(
|
||||||
controller: controller.stationIdController,
|
controller: controller.stationIdController,
|
||||||
cursorColor: AppTheme.themeColor,
|
cursorColor: AppTheme.themeColor,
|
||||||
|
style: TextStyle(fontSize: 14),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请输入加氢站编号',
|
hintText: '请输入加氢站编号',
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
|
hintStyle: TextStyle(fontSize: 14),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
prefixIcon: Icon(Icons.person_2_outlined, color: Colors.grey),
|
prefixIcon: Icon(Icons.person_2_outlined, color: Colors.grey),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: AppTheme.themeColor),
|
borderSide: BorderSide(color: AppTheme.themeColor),
|
||||||
@@ -250,8 +257,11 @@ class _LoginPageState extends State<LoginPage> with SingleTickerProviderStateMix
|
|||||||
TextFormField(
|
TextFormField(
|
||||||
controller: controller.passwordController,
|
controller: controller.passwordController,
|
||||||
obscureText: _obscureText,
|
obscureText: _obscureText,
|
||||||
|
style: TextStyle(fontSize: 14),
|
||||||
cursorColor: AppTheme.themeColor,
|
cursorColor: AppTheme.themeColor,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
hintStyle: TextStyle(fontSize: 14),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
hintText: '请输入密码',
|
hintText: '请输入密码',
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
|
|||||||
Reference in New Issue
Block a user