mac 3 years ago
parent
commit
ca5844e141

+ 7
- 1
lib/pages/Login/index.dart View File

@@ -95,7 +95,13 @@ class _Login extends State<Login> {
95 95
   @override
96 96
   Widget build(BuildContext context) {
97 97
     return Scaffold(
98
-      body: SafeArea(
98
+      backgroundColor: Colors.transparent,
99
+      resizeToAvoidBottomInset: false,
100
+      body: GestureDetector(
101
+        behavior: HitTestBehavior.translucent,
102
+        onTap: () {
103
+          FocusScope.of(context).requestFocus(FocusNode());
104
+        },
99 105
         child: Container(
100 106
           padding: EdgeInsets.all(15.w),
101 107
           decoration: const BoxDecoration(

+ 2
- 2
lib/pages/main/index.dart View File

@@ -20,7 +20,7 @@ class Main extends BasicPage {
20 20
   void loginOut() {
21 21
     modal.showAlert(
22 22
         title: '提示',
23
-        message: '确定要退出登吗?',
23
+        message: '确定要退出登吗?',
24 24
         onConfirm: () {
25 25
           box.remove('token');
26 26
           Get.offAllNamed('/login');
@@ -346,7 +346,7 @@ class Main extends BasicPage {
346 346
                               loginOut();
347 347
                             },
348 348
                             child: Text(
349
-                              "退出登",
349
+                              "退出登",
350 350
                               style: TextStyle(
351 351
                                 fontSize: 20.sp,
352 352
                                 fontWeight: FontWeight.bold,

+ 1
- 1
lib/services/user.dart View File

@@ -12,7 +12,7 @@ Future getSMSCaptch(String phone) async {
12 12
   });
13 13
 }
14 14
 
15
-//登
15
+//登
16 16
 Future userLogin(String userName, String password) async {
17 17
   return request(
18 18
     '/login',

+ 6
- 3
lib/utils/Request.dart View File

@@ -28,10 +28,13 @@ class Response {
28 28
 final client = GetPlatform.isAndroid ? 'android' : 'ios';
29 29
 
30 30
 Dio createRequest() {
31
+  const isProd = bool.fromEnvironment('dart.vm.product');
32
+  const host =
33
+      isProd ? 'https://machine.njyunzhi.com' : 'http://192.168.89.147:7080';
34
+  final baseUrl = '$host/api/$client/worker';
35
+
31 36
   var options = BaseOptions(
32
-    // baseUrl: 'http://192.168.89.25:7080/api/' + client + '/worker',
33
-    // baseUrl: 'http://192.168.89.147:7080/api/' + client + '/worker',
34
-    baseUrl: 'https://machine.njyunzhi.com/api/' + client + '/worker',
37
+    baseUrl: baseUrl,
35 38
     connectTimeout: 5000,
36 39
     receiveTimeout: 3000,
37 40
   );

+ 2
- 0
lib/widgets/amap/amap.dart View File

@@ -43,6 +43,8 @@ class AMap extends StatelessWidget {
43 43
             onTap: (e) {
44 44
               onClick(item);
45 45
             },
46
+            //这个东西在苹果手机上会有个默认气泡 false后就正常了
47
+            infoWindowEnable: false,
46 48
             clickable: true,
47 49
             position: LatLng(
48 50
                 double.parse(locationArea[0]), double.parse(locationArea[1])),

+ 1
- 3
lib/widgets/layout/BasicPage.dart View File

@@ -104,9 +104,7 @@ class _BasicPageState extends State<BasicPage> {
104 104
     return Scaffold(
105 105
       resizeToAvoidBottomInset: widget.isPop == null ? false : true,
106 106
       appBar: _getAppBar(),
107
-      body: SafeArea(
108
-        child: widget.builder(context),
109
-      ),
107
+      body: widget.builder(context),
110 108
       bottomNavigationBar: widget.tabIndex == null
111 109
           ? null
112 110
           : BottomBar(list: BarList, current: widget.tabIndex!),