diff --git a/star_lock/lib/main.dart b/star_lock/lib/main.dart index 66b92028..61e1f4ea 100644 --- a/star_lock/lib/main.dart +++ b/star_lock/lib/main.dart @@ -20,22 +20,22 @@ FutureOr main() async { if (AppPlatform.isAndroid) { SystemUiOverlayStyle systemUiOverlayStyle = - const SystemUiOverlayStyle(statusBarColor: Colors.transparent); + const SystemUiOverlayStyle(statusBarColor: Colors.transparent); SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle); } } // 设置国际化信息 Future _initTranslation() async => TranslationLoader.loadTranslation( - zhSource: "images/lan/lan_zh.json", - enSource: "images/lan/lan_en.json", - keySource: "images/lan/lan_keys.json", -); + zhSource: "images/lan/lan_zh.json", + enSource: "images/lan/lan_en.json", + keySource: "images/lan/lan_keys.json", + ); // 设置包名服务设备信息 Future _setCommonServices() async { await Get.putAsync(() => StoreService().init()); await Get.putAsync(() => PlatformInfoService().init()); - await Get.putAsync(() => DeviceInfoService().init()); + // await Get.putAsync(() => DeviceInfoService().init()); // Get.log(PlatformInfoService.to.info.version); } diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart index 758f0237..582f807a 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart @@ -397,12 +397,13 @@ class _SendElectronicKeyPageState extends State { // SizedBox( // height: 10.h, // ), - OutLineBtn( - btnName: '标记为已入住', - onClick: () { - updateRoomCheckIn(); - }, - ), + //田总说不要标记为已入住 + // OutLineBtn( + // btnName: '标记为已入住', + // onClick: () { + // updateRoomCheckIn(); + // }, + // ), ], ); } diff --git a/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart index a0ccf33f..1e846ee8 100644 --- a/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart @@ -74,7 +74,8 @@ class _LockSetPageState extends State with RouteAware { // 根据权限显示不同的列表 List getListWidget() { // print("state.lockBasicInfo.value.isLockOwner:${state.lockBasicInfo.value.isLockOwner} state.lockBasicInfo.value.keyRight:${state.lockBasicInfo.value.keyRight}"); - if (state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1) { + if (state.lockBasicInfo.value.isLockOwner == 1 || + state.lockBasicInfo.value.keyRight == 1) { // 超级管理员、授权管理员 return getAllWidget(); } else { @@ -449,26 +450,26 @@ class _LockSetPageState extends State with RouteAware { //-----新增至此 SizedBox(height: 10.h), // 标记房态 - Obx(() { - var title = ""; - if (state.lockStatus.value.roomStatus == 1) { - title = TranslationLoader.lanKeys!.checkedIn!.tr; - } else if (state.lockStatus.value.roomStatus == 0) { - title = TranslationLoader.lanKeys!.leisure!.tr; - } - return Visibility( - visible: state.lockStatus.value.roomStatus == 1 ? true : false, - child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.markedHouseState!.tr, - rightTitle: title, - isHaveLine: true, - isHaveDirection: true, - action: () { - Get.toNamed(Routers.markedHouseStatePage, arguments: { - 'lockSetInfoData': state.lockSetInfoData.value - }); - })); - }), + // Obx(() { + // var title = ""; + // if (state.lockStatus.value.roomStatus == 1) { + // title = TranslationLoader.lanKeys!.checkedIn!.tr; + // } else if (state.lockStatus.value.roomStatus == 0) { + // title = TranslationLoader.lanKeys!.leisure!.tr; + // } + // return Visibility( + // visible: state.lockStatus.value.roomStatus == 1 ? true : false, + // child: CommonItem( + // leftTitel: TranslationLoader.lanKeys!.markedHouseState!.tr, + // rightTitle: title, + // isHaveLine: true, + // isHaveDirection: true, + // action: () { + // Get.toNamed(Routers.markedHouseStatePage, arguments: { + // 'lockSetInfoData': state.lockSetInfoData.value + // }); + // })); + // }), // 考勤 Obx( () => Visibility( diff --git a/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart b/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart index befc6a56..6c42dcf8 100644 --- a/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart +++ b/star_lock/lib/main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; @@ -19,12 +18,10 @@ class DemoModeLockSetPage extends StatefulWidget { } class _DemoModeLockSetPageState extends State { - @override void initState() { // TODO: implement initState super.initState(); - } @override @@ -43,7 +40,7 @@ class _DemoModeLockSetPageState extends State { // 基本信息 CommonItem( leftTitel: - TranslationLoader.lanKeys!.basicInformation!.tr, + TranslationLoader.lanKeys!.basicInformation!.tr, rightTitle: "", isHaveLine: false, isHaveDirection: true, @@ -53,7 +50,9 @@ class _DemoModeLockSetPageState extends State { // 'keyInfo': state.getKeyInfosData.value // }); }), - SizedBox(height: 10.h,), + SizedBox( + height: 10.h, + ), // 门磁 CommonItem( leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr, @@ -68,7 +67,7 @@ class _DemoModeLockSetPageState extends State { // 无线键盘 CommonItem( leftTitel: - TranslationLoader.lanKeys!.wirelessKeyboard!.tr, + TranslationLoader.lanKeys!.wirelessKeyboard!.tr, rightTitle: "", isHaveLine: false, isHaveDirection: true, @@ -99,7 +98,7 @@ class _DemoModeLockSetPageState extends State { // 自动闭锁 CommonItem( leftTitel: - TranslationLoader.lanKeys!.automaticBlocking!.tr, + TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle: TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, @@ -133,7 +132,7 @@ class _DemoModeLockSetPageState extends State { // 常开模式 CommonItem( leftTitel: - TranslationLoader.lanKeys!.normallyOpenMode!.tr, + TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle: TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, @@ -216,23 +215,22 @@ class _DemoModeLockSetPageState extends State { SizedBox(height: 10.h), //-----新增至此 // 标记房态 - CommonItem( - leftTitel: - TranslationLoader.lanKeys!.markedHouseState!.tr, - rightTitle: "", - isHaveLine: true, - isHaveDirection: true, - action: () { - gotoAddLock(); - }), + // CommonItem( + // leftTitel: + // TranslationLoader.lanKeys!.markedHouseState!.tr, + // rightTitle: "", + // isHaveLine: true, + // isHaveDirection: true, + // action: () { + // gotoAddLock(); + // }), // 考勤 CommonItem( leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle: "", isHaveLine: true, isHaveRightWidget: true, - rightWidget: _openCheckInSwitch() - ), + rightWidget: _openCheckInSwitch()), // 开锁提醒 CommonItem( leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr, @@ -304,7 +302,8 @@ class _DemoModeLockSetPageState extends State { }), SizedBox(height: 30.h), Container( - padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h), + padding: + EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h), child: SubmitBtn( btnName: "退出演示模式", isDelete: true, @@ -343,9 +342,8 @@ class _DemoModeLockSetPageState extends State { ); } - void gotoAddLock(){ + void gotoAddLock() { // Get.toNamed(Routers.selectLockTypePage); - EasyLoading.showToast("演示模式",duration: 2000.milliseconds); + EasyLoading.showToast("演示模式", duration: 2000.milliseconds); } - } diff --git a/star_lock/lib/mine/mine/starLockMine_page.dart b/star_lock/lib/mine/mine/starLockMine_page.dart index 34f423e4..c9611f05 100644 --- a/star_lock/lib/mine/mine/starLockMine_page.dart +++ b/star_lock/lib/mine/mine/starLockMine_page.dart @@ -13,12 +13,12 @@ class StarLockMinePage extends StatefulWidget { const StarLockMinePage({Key? key}) : super(key: key); @override - State createState() => _StarLockMinePageState(); + State createState() => StarLockMinePageState(); } -GlobalKey<_StarLockMinePageState> starLockMineKey = GlobalKey(); +GlobalKey starLockMineKey = GlobalKey(); -class _StarLockMinePageState extends State with BaseWidget { +class StarLockMinePageState extends State with BaseWidget { final logic = Get.put(StarLockMineLogic()); final state = Get.find().state; diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_logic.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_logic.dart new file mode 100644 index 00000000..3ce45d61 --- /dev/null +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_logic.dart @@ -0,0 +1,24 @@ +import 'package:star_lock/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_state.dart'; +import 'package:star_lock/tools/baseGetXController.dart'; + +class ValueAddedServicesBuyLogic extends BaseGetXController { + final ValueAddedServicesBuyState state = ValueAddedServicesBuyState(); + + @override + Future onReady() async { + print("ready home"); + super.onReady(); + } + + @override + void onInit() { + print("init home"); + super.onInit(); + } + + @override + void onClose() { + print("close home"); + super.onClose(); + } +} diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart index ac7453a2..b95a0db0 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_logic.dart'; -import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/titleAppBar.dart'; import '../../../translations/trans_lib.dart'; @@ -16,17 +16,13 @@ class ValueAddedServicesBuyPage extends StatefulWidget { } class _ValueAddedServicesBuyPageState extends State { - final data = [ - "1", - "2", - "3", - "4", - ]; - @override Widget build(BuildContext context) { var type = ModalRoute.of(context)?.settings.arguments as int; + final logic = Get.put(ValueAddedServicesBuyLogic()); + final state = Get.find().state; + return Scaffold( backgroundColor: AppColors.greyBackgroundColor, appBar: TitleAppBar( @@ -59,7 +55,9 @@ class _ValueAddedServicesBuyPageState extends State { mainAxisSpacing: 10.h, crossAxisSpacing: 10.w, childAspectRatio: 1 / 0.5, - children: data.map((title) => _buildItem(title)).toList(), + children: state.topData.value + .map((title) => _buildItem(title)) + .toList(), ), ), ), @@ -123,16 +121,21 @@ class _ValueAddedServicesBuyPageState extends State { color: AppColors.mainColor, fontWeight: FontWeight.w500))), SizedBox(width: 5.w), - Container( - width: 180.w, - height: 100.h, - color: AppColors.mainColor, - child: Center( - child: Text(TranslationLoader.lanKeys!.goToPay!.tr, - style: TextStyle( - fontSize: 24.sp, - color: Colors.white, - fontWeight: FontWeight.w500)))) + GestureDetector( + onTap: () { + logic.showToast("支付成功"); + }, + child: Container( + width: 180.w, + height: 100.h, + color: AppColors.mainColor, + child: Center( + child: Text(TranslationLoader.lanKeys!.goToPay!.tr, + style: TextStyle( + fontSize: 24.sp, + color: Colors.white, + fontWeight: FontWeight.w500)))), + ) ], ), ), diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_state.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_state.dart new file mode 100644 index 00000000..47be7926 --- /dev/null +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_state.dart @@ -0,0 +1,12 @@ +import 'package:get/get.dart'; + +class ValueAddedServicesBuyState { + final topData = [ + "1", + "2", + "3", + "4", + ].obs; + + void onClose() {} +} diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart index 2384e41a..7fbbedd2 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart @@ -152,8 +152,8 @@ class _ValueAddedServicesHighFunctionPageState TranslationLoader.lanKeys!.lockGroup!.tr), _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", TranslationLoader.lanKeys!.sendGroupKey!.tr), - _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", - TranslationLoader.lanKeys!.markedHouseState!.tr), + // _buildItem("images/mine/icon_mine_highFunctionContent_bjft.png", + // TranslationLoader.lanKeys!.markedHouseState!.tr), _buildItem("images/mine/icon_mine_highFunctionContent_fkgj.png", TranslationLoader.lanKeys!.cardIssuingtool!.tr), _buildItem( diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart index 5a5c495b..0b3a8dec 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; - -import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/commonItem.dart'; import '../../../tools/titleAppBar.dart'; @@ -92,9 +90,9 @@ class _ValueAddedServicesRealNamePageState ), GestureDetector( onTap: () { - Navigator.pushNamed( - context, Routers.valueAddedServicesBuyPage, - arguments: 3); + // Navigator.pushNamed( + // context, Routers.valueAddedServicesBuyPage, + // arguments: 3); }, child: Container( width: 200.w, @@ -103,7 +101,8 @@ class _ValueAddedServicesRealNamePageState child: Center( child: Text(TranslationLoader.lanKeys!.buy!.tr, style: TextStyle( - color: AppColors.mainColor, + // color: AppColors.mainColor, + color: AppColors.blackColor, fontSize: 24.sp)))), ), ],