From a86588d032b5566ba1a9d57b161375e55c5ba520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B0=91=E9=98=B3?= <786612630@qq.com> Date: Fri, 19 Jan 2024 11:09:46 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=91b?= =?UTF-8?q?ug=E3=80=822=E3=80=81=E4=BF=AE=E5=A4=8D=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/ios/Podfile.lock | 14 ++--- star_lock/lib/main.dart | 6 +-- .../checkingInSet/checkingInSet_page.dart | 54 ++++++++++++++++++- .../checkingInSet/checkingInSet_state.dart | 1 + .../checkingInAddStaff_page.dart | 16 ++++-- .../checkInCreatCompany_page.dart | 28 ++++++++-- .../configuringWifi_logic.dart | 7 ++- .../lcokSet/lockSet/lockSet_page.dart | 1 + .../lcokSet/resetButton/resetButton_page.dart | 2 +- .../lockDetail/lockDetail_page.dart | 15 +++--- .../lockMian/lockMain/lockMain_logic.dart | 3 ++ .../main/lockMian/lockMain/lockMain_page.dart | 15 ++++++ star_lock/lib/mine/about/about_page.dart | 2 +- .../mine/addLock/addLock/addLock_page.dart | 41 +++++++------- .../mine/addLock/saveLock/saveLock_page.dart | 4 +- .../lib/mine/mine/starLockMine_page.dart | 2 +- .../minePersonInfo_entity.dart | 2 +- .../minePersonInfo_logic.dart | 2 +- .../mine/mineSet/mineSet/mineSet_page.dart | 46 +++++++++------- star_lock/lib/network/api.dart | 2 +- star_lock/lib/tools/commonItem.dart | 4 +- star_lock/pubspec.yaml | 2 +- 22 files changed, 189 insertions(+), 80 deletions(-) diff --git a/star_lock/ios/Podfile.lock b/star_lock/ios/Podfile.lock index e55abd46..2d0a0ce7 100644 --- a/star_lock/ios/Podfile.lock +++ b/star_lock/ios/Podfile.lock @@ -241,7 +241,7 @@ SPEC CHECKSUMS: audio_session: 4f3e461722055d21515cf3261b64c973c062f345 audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40 auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d - camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb + camera_avfoundation: 8b8d780bcfb6a4a02b0fbe2b4bd17b5b71946e68 connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475 @@ -254,26 +254,26 @@ SPEC CHECKSUMS: fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a g711_flutter: 8f2769052d2cf3549f83d11e1c42d81d94441123 - google_maps_flutter_ios: 590249c67f34f422122c232f2a626192adbc78ee + google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458 GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4 image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb - image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 + image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425 ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1 just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 Protobuf: d94761c33f1239c0a43a0817ca1a5f7f7c900241 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 - url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b + url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 - webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a + webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4 PODFILE CHECKSUM: 42aa7ffc6134b996f93caa6a9b6a2b5b580ff28a diff --git a/star_lock/lib/main.dart b/star_lock/lib/main.dart index 62759aea..f96e0a75 100644 --- a/star_lock/lib/main.dart +++ b/star_lock/lib/main.dart @@ -186,9 +186,9 @@ void openBlueScan() { } } -void startScanAction() { - BlueManage().startScan(); -} +// void startScanAction() { +// BlueManage().startScan(); +// } ///请求蓝牙权限 Future getMicrophonePermission() async { diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 6d97f9e4..17d89e9f 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/app_settings/app_colors.dart'; @@ -36,7 +37,9 @@ class _CheckingInSetPageState extends State { Obx(() => CommonItem( leftTitel: "${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}", - rightTitle: state.companyName.value ?? "", + // rightTitle: state.companyName.value ?? "", + isHaveRightWidget: true, + rightWidget: getTFWidget(), isHaveLine: true, isHaveDirection: true, action: () { @@ -130,7 +133,7 @@ class _CheckingInSetPageState extends State { context: context, builder: (BuildContext context) { return ShowTFView( - title: "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.company!.tr}", + title: "请输入公司名字", tipTitle: "", controller: state.changeNameController, sureClick: () { @@ -146,4 +149,51 @@ class _CheckingInSetPageState extends State { },); }); } + + // 接受者信息输入框 + Widget getTFWidget() { + state.nameController.text = state.companyName.value ?? ""; + return Container( + // color: Colors.red, + height: 65.h, + width: 300.w, + padding: EdgeInsets.only(top: 5.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: TextField( + //输入框一行 + maxLines: 1, + inputFormatters: [ + FilteringTextInputFormatter.deny('\n'), + LengthLimitingTextInputFormatter(30), + ], + controller: state.nameController, + autofocus: false, + enabled: false, + style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), + textAlign: TextAlign.end, + decoration: InputDecoration( + //输入里面输入文字内边距设置 + // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), + // hintText: state.companyName.value ?? "", + hintStyle: TextStyle(fontSize: 22.sp), + focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + contentPadding: const EdgeInsets.symmetric(vertical: 0), + ), + ), + ), + SizedBox( + width: 10.w, + ), + ], + ), + ); + } + } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart index 8c4e4216..acf78995 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart @@ -23,6 +23,7 @@ class CheckingInSetState{ var companyName = "".obs;// 公司名称 final TextEditingController changeNameController = TextEditingController(); + final TextEditingController nameController = TextEditingController(); final checkingInSetInfo = CheckingInSetInfo().obs; CheckingInSetState() { diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart index 83f4dc4b..de196a7d 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -247,7 +248,7 @@ class _CheckingInAddStaffPageState extends State { Widget getTFWidget(String tfStr, TextEditingController tf) { return SizedBox( - height: 50.h, + // height: 50.h, width: 300.w, // color: Colors.red, child: Row( @@ -256,16 +257,23 @@ class _CheckingInAddStaffPageState extends State { child: TextField( //输入框一行 maxLines: 1, + inputFormatters: [ + FilteringTextInputFormatter.deny('\n'), + LengthLimitingTextInputFormatter(30), + ], controller: tf, autofocus: false, textAlign: TextAlign.end, decoration: InputDecoration( //输入里面输入文字内边距设置 - contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), + // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, hintStyle: TextStyle(fontSize: 22.sp), - //不需要输入框下划线 - border: InputBorder.none, + focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + contentPadding: const EdgeInsets.symmetric(vertical: 0), ), ), ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart b/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart index 8d2dc973..665987eb 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/checkInCreatCompany/checkInCreatCompany_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -36,6 +37,7 @@ class _CheckInCreatCompanyPageState extends State { CommonItem( leftTitel: "${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}", rightTitle: "", + isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)), Obx(() => CommonItem( @@ -102,7 +104,7 @@ class _CheckInCreatCompanyPageState extends State { Widget getTFWidget(bool isHaveBtn, String tfStr, int lineIndex) { return SizedBox( - height: 50.h, + // height: 50.h, width: 320.w, child: Row( children: [ @@ -111,16 +113,32 @@ class _CheckInCreatCompanyPageState extends State { controller:state.companyNameController, //输入框一行 maxLines: 1, + inputFormatters: [ + FilteringTextInputFormatter.deny('\n'), + LengthLimitingTextInputFormatter(30), + ], autofocus: false, textAlign: TextAlign.end, decoration: InputDecoration( //输入里面输入文字内边距设置 - contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, + // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), + hintText: tfStr, hintStyle: TextStyle(fontSize: 22.sp), - //不需要输入框下划线 - border: InputBorder.none, + focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + contentPadding: const EdgeInsets.symmetric(vertical: 0), ), + + // decoration: InputDecoration( + // //输入里面输入文字内边距设置 + // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), + // hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, + // hintStyle: TextStyle(fontSize: 22.sp), + // //不需要输入框下划线 + // border: InputBorder.none, + // ), ), ) ], diff --git a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart b/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart index dc000915..a2929839 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/configuringWifi/configuringWifi_logic.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; +import 'package:get/get.dart'; import 'package:network_info_plus/network_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:star_lock/tools/baseGetXController.dart'; @@ -177,7 +178,7 @@ class ConfiguringWifiLogic extends BaseGetXController{ for (var element in itemList) { serversList.add(int.parse(element)); } - print('Resolved google.com to address: ${addresses.first.address} serversList:${serversList}'); + print('Resolved google.com to address: ${addresses.first.address} serversList:$serversList'); } double typeDouble = int.parse(item.port!) / 256; @@ -187,7 +188,9 @@ class ConfiguringWifiLogic extends BaseGetXController{ serversList.add(type2); } - var uidList = [Storage.getUid().toString()]; + var uidStr = await Storage.getUid(); + var uidList = [uidStr.toString()]; + // Get.log("uidList:$uidList await Storage.getUid()${await Storage.getUid()}"); IoSenderManage.senderConfiguringWifiCommand( keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(), userID: await Storage.getUid(), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart index 5a14697d..55e5a863 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart @@ -431,6 +431,7 @@ class _LockSetPageState extends State with RouteAware { SizedBox(height: 10.h), */ //-----新增至此 + SizedBox(height: 10.h), // 标记房态 Obx(() { var title = ""; diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart index 5c5d263d..99031ff5 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart @@ -96,7 +96,7 @@ class _ResetButtonPageState extends State with RouteAware { builder: (context) { return CupertinoAlertDialog( title: const Text("提示"), - content: Text('确定要${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.open!.tr : TranslationLoader.lanKeys!.close!.tr}重置键?'), + content: Text('确定要${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.close!.tr : TranslationLoader.lanKeys!.open!.tr}重置键?'), actions: [ CupertinoDialogAction( child: Text(TranslationLoader.lanKeys!.cancel!.tr), diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 6fd9aa66..ea67540d 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -66,8 +66,7 @@ class _LockDetailPageState extends State Storage.setStringList(saveBluePrivateKey, savePrivateKeyList); // signKey - List signKeyData = - state.keyInfos.value.bluetooth!.signKey!.cast(); + List signKeyData = state.keyInfos.value.bluetooth!.signKey!.cast(); var saveSignKeyList = changeIntListToStringList(signKeyData); Storage.setStringList(saveBlueSignKey, saveSignKeyList); @@ -635,11 +634,12 @@ class _LockDetailPageState extends State BlueManage().stopScan(); BlueManage().disconnect(BlueManage().connectDeviceMacAddress); state.openLockBtnState.value = 0; - if(state.animationController != null){ - state.animationController.reset(); - state.animationController.forward(); - state.animationController.dispose(); - } + + // if(state.animationController != null){ + // state.animationController.reset(); + // state.animationController.forward(); + // state.animationController.dispose(); + // } } /// 从下级返回 当前界面即将出现 @@ -659,6 +659,7 @@ class _LockDetailPageState extends State logic.cancelBlueConnetctToastTimer(); BlueManage().stopScan(); state.openLockBtnState.value = 0; + state.animationController.reset(); state.animationController.forward(); } diff --git a/star_lock/lib/main/lockMian/lockMain/lockMain_logic.dart b/star_lock/lib/main/lockMian/lockMain/lockMain_logic.dart index 1fd0b504..0d3b4c16 100644 --- a/star_lock/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/star_lock/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -63,6 +63,7 @@ class LockMainLogic extends BaseGetXController { // // refreshController.refreshCompleted(); // } + // Future void getStarLockInfo() async{ var entity = await ApiRepository.to.getStarLockListInfo( pageNo:page, @@ -93,10 +94,12 @@ class LockMainLogic extends BaseGetXController { state.dataLength.value = 2; } state.lockListInfoEntity.value = entity; + // return entity.data!; }else{ print("首页锁列表请求失败"); state.dataLength.value = 0; // refreshController.loadFailed(); + // return entity.data!; } // refreshController.refreshCompleted(); } diff --git a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart index 470a6628..97401bd5 100644 --- a/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/star_lock/lib/main/lockMian/lockMain/lockMain_page.dart @@ -12,6 +12,7 @@ import '../../../tools/storage.dart'; import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; import '../../lockDetail/lockDetail/lockDetail_page.dart'; +import '../entity/lockListInfo_entity.dart'; import '../lockList/lockList_page.dart'; import 'lockMain_logic.dart'; @@ -62,6 +63,20 @@ class _StarLockMainPageState extends State with BaseWidget { width: 1.sw / 3 * 2, child: const StarLockMinePage(), ), + // body: FutureBuilder( + // future: logic.getStarLockInfo(), // 异步操作 + // builder: (BuildContext context, AsyncSnapshot snapshot) { + // if (snapshot.connectionState == ConnectionState.waiting) { + // // return CircularProgressIndicator(); // 显示加载指示器 + // return Container(); + // } else if (snapshot.hasError) { + // // return Text('Error: ${snapshot.error}'); // 显示错误 + // return unHaveData(); + // } else { + // return getDataReturnUI(snapshot.data!.groupList!.length ?? 0); // 显示获取的数据 + // } + // }, + // ), body: Obx(() => getDataReturnUI(state.dataLength.value)), // body:smartRefresher( // logic.refreshController, diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart index 36806f3f..14e8e25b 100644 --- a/star_lock/lib/mine/about/about_page.dart +++ b/star_lock/lib/mine/about/about_page.dart @@ -37,7 +37,7 @@ class _AbountPageState extends State { ), SizedBox(height: 20.h), Text( - "星锁 1.0.0.06(preRelease-20240115)", + "星锁 1.0.0.07(preRelease-20240118-1)", style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), ), SizedBox( diff --git a/star_lock/lib/mine/addLock/addLock/addLock_page.dart b/star_lock/lib/mine/addLock/addLock/addLock_page.dart index bd19da74..674529b3 100644 --- a/star_lock/lib/mine/addLock/addLock/addLock_page.dart +++ b/star_lock/lib/mine/addLock/addLock/addLock_page.dart @@ -32,7 +32,7 @@ class _AddLockPageState extends State with BaseWidget { barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack: true, backgroundColor: AppColors.mainColor), - body: Column( + body: ListView( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -73,24 +73,27 @@ class _AddLockPageState extends State with BaseWidget { SizedBox( height: 120.h, ), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.next!.tr, - borderRadius: 20.w, - onClick: () { - if (Platform.isIOS) { - Navigator.pushNamed(context, Routers.nearbyLockPage); - } else { - getMicrophonePermission().then((value) { - if (value) { - // 有权限 - Navigator.pushNamed(context, Routers.nearbyLockPage); - } else { - //没有权限 - openAppSettings(); //打开app系统设置 - } - }); - } - }), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.next!.tr, + borderRadius: 20.w, + onClick: () { + if (Platform.isIOS) { + Navigator.pushNamed(context, Routers.nearbyLockPage); + } else { + getMicrophonePermission().then((value) { + if (value) { + // 有权限 + Navigator.pushNamed(context, Routers.nearbyLockPage); + } else { + //没有权限 + openAppSettings(); //打开app系统设置 + } + }); + } + }), + ), ], ), ); diff --git a/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart index b2933b4d..c5ea46d5 100644 --- a/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart +++ b/star_lock/lib/mine/addLock/saveLock/saveLock_page.dart @@ -94,8 +94,8 @@ class _SaveLockPageState extends State with RouteAware { margin: EdgeInsets.only( left: 50.w, right: 50.w, - top: 30.w, - bottom: 30.w + // top: 30.w, + // bottom: 30.w ), padding: EdgeInsets.only( top: 25.w, diff --git a/star_lock/lib/mine/mine/starLockMine_page.dart b/star_lock/lib/mine/mine/starLockMine_page.dart index 084a36bf..01145873 100644 --- a/star_lock/lib/mine/mine/starLockMine_page.dart +++ b/star_lock/lib/mine/mine/starLockMine_page.dart @@ -148,7 +148,7 @@ class _StarLockMinePageState extends State with BaseWidget { Get.toNamed(Routers.valueAddedServicesPage); }), mineItem('images/mine/icon_mine_main_shoppingcart.png', - TranslationLoader.lanKeys!.shoppingCart!.tr, () { + "配件商城".tr, () { Get.back(); Get.toNamed(Routers.LockMallPage); }), diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart index 6064eb8f..1307bde5 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart @@ -29,7 +29,7 @@ class MinePersonInfoEntity { class MinePersonInfoData { String? mobile; - String? uid; + int? uid; int? haveSafeAnswer; String? nickname; String? headUrl; diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_logic.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_logic.dart index 973fb16d..9ba92ced 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_logic.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_logic.dart @@ -26,7 +26,7 @@ class MinePersonInfoLogic extends GetConnect{ var entity = await ApiRepository.to.getUpToken( module: 'avatar', typeKey: 'userId', - type: state.mineInfoData.value.uid!, + type: state.mineInfoData.value.uid!.toString(), filename: filename, size: size ); diff --git a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart index da643a22..dbc30f22 100644 --- a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -246,7 +246,7 @@ class _MineSetPageState extends State { isDelete: true, onClick: () { //退出登录 - logic.userLogoutRequest(); + showLoginOutAlertTipDialog(); }), Container( padding: EdgeInsets.only(right: 30.w, top: 30.h), @@ -303,24 +303,32 @@ class _MineSetPageState extends State { ); } - // void showCupertinoAlertDialog(BuildContext context) { - // showDialog( - // context: context, - // builder: (BuildContext context) { - // return ShowIosTipView( - // title: "", - // tipTitle: TranslationLoader.lanKeys!.deleteAccountTips!.tr, - // sureClick: () { - // //安全验证 - // Navigator.pushNamed(context, Routers.safeVerifyPage); - // }, - // cancelClick: () { - // Navigator.pop(context); - // }, - // ); - // }, - // ); - // } + void showLoginOutAlertTipDialog() { + showCupertinoDialog( + context: context, + builder: (context) { + return CupertinoAlertDialog( + title: const Text("提示"), + content: const Text('确定要退出吗?'), + actions: [ + CupertinoDialogAction( + child: Text(TranslationLoader.lanKeys!.cancel!.tr), + onPressed: () { + Get.back(); + }, + ), + CupertinoDialogAction( + child: const Text("退出"), + onPressed: () { + Get.back(); + logic.userLogoutRequest(); + }, + ), + ], + ); + }, + ); + } CupertinoSwitch _isPrompToneSwitch() { return CupertinoSwitch( diff --git a/star_lock/lib/network/api.dart b/star_lock/lib/network/api.dart index 57691fc1..68145668 100644 --- a/star_lock/lib/network/api.dart +++ b/star_lock/lib/network/api.dart @@ -1,5 +1,5 @@ abstract class Api { - // static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //预发布环境 + // static String baseAddress = "https://pre.lock.star-lock.cn"; //预发布环境 static String baseAddress = "https://dev.lock.star-lock.cn"; //联调环境 // static String baseAddress = "http://192.168.1.15:8022"; //谢总本地 // static String baseAddress = "https://ge.lock.star-lock.cn:8100"; //葛工开发环境地址 diff --git a/star_lock/lib/tools/commonItem.dart b/star_lock/lib/tools/commonItem.dart index e75edfdf..8880c51c 100644 --- a/star_lock/lib/tools/commonItem.dart +++ b/star_lock/lib/tools/commonItem.dart @@ -64,9 +64,7 @@ class CommonItem extends StatelessWidget { textAlign: TextAlign.right, overflow: TextOverflow.ellipsis, maxLines: 2, - style: TextStyle( - fontSize: 22.sp, - color: AppColors.darkGrayTextColor), + style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), ), ], ), diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml index 918c443c..61d2cd71 100644 --- a/star_lock/pubspec.yaml +++ b/star_lock/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+6 +version: 1.0.0+8 environment: sdk: '>=2.12.0 <3.0.0'