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