调整尺寸

This commit is contained in:
2025-11-18 15:50:58 +08:00
parent fb212fa386
commit 959fe89bed
4 changed files with 14 additions and 12 deletions

View File

@@ -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,

View File

@@ -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) {