diff --git a/circle_app/ios/Runner/Info.plist b/circle_app/ios/Runner/Info.plist index ee21ecd..c22fcd1 100644 --- a/circle_app/ios/Runner/Info.plist +++ b/circle_app/ios/Runner/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.6 + 2.1.8 CFBundleSignature ???? CFBundleURLTypes diff --git a/circle_app/lib/circle_app/chat/view.dart b/circle_app/lib/circle_app/chat/view.dart index fa54e48..d6d3316 100644 --- a/circle_app/lib/circle_app/chat/view.dart +++ b/circle_app/lib/circle_app/chat/view.dart @@ -131,7 +131,7 @@ class _ChatPageState extends State { tip = 'TA发布了喊话,您发布后形象会更完善,'; } else if (otherUserBean!.userType == 1 && userInfoBean!.userType != 1) { isShowTip = true; - tip = 'TA完成了good号认证,您认证后可获得多种特权,联系客服'; + tip = 'TA完成了good号认证,您认证后可获得多种特权,'; } } if (isShowTip) { diff --git a/circle_app/lib/circle_app/dialog/UpdateDialog.dart b/circle_app/lib/circle_app/dialog/UpdateDialog.dart index 39670fc..34ae485 100644 --- a/circle_app/lib/circle_app/dialog/UpdateDialog.dart +++ b/circle_app/lib/circle_app/dialog/UpdateDialog.dart @@ -2,8 +2,7 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_install_app/flutter_install_app.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; +// import 'package:flutter_install_app/flutter_install_app.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -302,7 +301,7 @@ class _CustomDialogState extends State { installApk() async { //flutter_install_app - await AppInstaller.installApk(filePath, actionRequired: false); + // await AppInstaller.installApk(filePath, actionRequired: false); } } diff --git a/circle_app/lib/circle_app/home/like_peole_sended_call_out_dialog.dart b/circle_app/lib/circle_app/home/like_peole_sended_call_out_dialog.dart index f2a6e81..538337c 100644 --- a/circle_app/lib/circle_app/home/like_peole_sended_call_out_dialog.dart +++ b/circle_app/lib/circle_app/home/like_peole_sended_call_out_dialog.dart @@ -1,4 +1,5 @@ import 'package:circle_app/circle_app/home/logic.dart'; +import 'package:circle_app/router/routers.dart'; import 'package:flutter/material.dart'; import 'package:circle_app/commons/colors/app_color.dart'; @@ -80,7 +81,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget { ), alignment: Alignment.center, child: Text( - '放弃', + '关闭', style: TextStyle( color: Colors.white, fontSize: 16.sp, @@ -90,7 +91,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget { ), GestureDetector( onTap: () async { - Get.back(); + Get.until((route) => route.settings.name == Routes.Home); HomeLogic logic = Get.find(); logic.updateIndex(1); Future.delayed(Duration(milliseconds: 500),() { @@ -109,7 +110,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget { gradient: AppColor.mainVerLinearGradient ), child: Text( - '前往查看', + '查看', style: TextStyle( color: Colors.white, fontSize: 16.sp, diff --git a/circle_app/lib/circle_app/home/logic.dart b/circle_app/lib/circle_app/home/logic.dart index ea3c9ab..8ce4e6e 100644 --- a/circle_app/lib/circle_app/home/logic.dart +++ b/circle_app/lib/circle_app/home/logic.dart @@ -238,7 +238,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver { SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); if (await sp.isFirstPeopleSendCallOut()) { Future.delayed(Duration(seconds: 20),() { - showSendedCallOutDialog(message.customElem!.desc!.toString()); + EventBusManager.fire(ShowpeopleCallOutNotifi(message.customElem!.desc!.toString())); }); } } else if (int.parse(event) == 5) { @@ -630,4 +630,9 @@ class MsgRecommendCardRefresh {} class ShowGiftNotifi { Map info; ShowGiftNotifi(this.info); +} + +class ShowpeopleCallOutNotifi { + String content; + ShowpeopleCallOutNotifi(this.content); } \ No newline at end of file diff --git a/circle_app/lib/circle_app/home/view.dart b/circle_app/lib/circle_app/home/view.dart index fd308fd..d0e3429 100644 --- a/circle_app/lib/circle_app/home/view.dart +++ b/circle_app/lib/circle_app/home/view.dart @@ -13,6 +13,7 @@ import 'package:get/get.dart'; import '../../main.dart'; import '../../router/routers.dart'; import '../../view/notice.dart'; +import '../circle_list/logic.dart'; import '../circle_list/view.dart'; import '../world_call_out/logic.dart'; import 'logic.dart'; @@ -34,6 +35,7 @@ class _HomePageState extends State HomeLogic logic = Get.find(); var sub; + var sub1; @override void initState() { // TODO: implement initState @@ -54,6 +56,22 @@ class _HomePageState extends State }); }); + + sub1 = EventBusManager.on().listen((event) { + + showPeopleCallOutOverlay(context, event.content, () { + Get.until((route) => route.settings.name == Routes.Home); + logic.updateIndex(1); + Future.delayed(Duration(milliseconds: 500),() { + final likeLogic = Get.find(); + likeLogic.currentIndex == -2; + likeLogic.update(); + }); + }); + + // + // }); + }); } @override diff --git a/circle_app/lib/circle_app/minefragment/logic.dart b/circle_app/lib/circle_app/minefragment/logic.dart index 53e9cb1..33a7a24 100644 --- a/circle_app/lib/circle_app/minefragment/logic.dart +++ b/circle_app/lib/circle_app/minefragment/logic.dart @@ -34,15 +34,17 @@ class MinefragmentLogic extends GetxController { String joinedCircle = ""; String vipMsg = "十几种专属特权等你领取"; + bool isProxy = true; + @override void onInit() async { super.onInit(); - // SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); - // if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') { - // isProxy = true; - // } else { - // isProxy = false; - // } + SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); + if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') { + isProxy = true; + } else { + isProxy = false; + } getMode(); checkVersion(); diff --git a/circle_app/lib/circle_app/minefragment/view.dart b/circle_app/lib/circle_app/minefragment/view.dart index 2bb79cb..084a438 100644 --- a/circle_app/lib/circle_app/minefragment/view.dart +++ b/circle_app/lib/circle_app/minefragment/view.dart @@ -227,7 +227,7 @@ class _MinefragmentPageState extends State with RouteAware { return Column( - children: [_circleItemView(logic),_invienItemView(),_shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()], + children: [_circleItemView(logic),_invienItemView(), logic.isProxy ? Container() : _shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()], ); } diff --git a/circle_app/lib/circle_app/my_assets/logic.dart b/circle_app/lib/circle_app/my_assets/logic.dart index e26e68a..0cd5fe0 100644 --- a/circle_app/lib/circle_app/my_assets/logic.dart +++ b/circle_app/lib/circle_app/my_assets/logic.dart @@ -3,18 +3,28 @@ import 'package:get/get.dart'; import '../../net/api.dart'; import '../../net/dio_manager.dart'; +import '../../utils/SharedPreferencesHelper.dart'; class My_assetsLogic extends GetxController { AssetsDataData? myAssest; var sub; + bool isProxy = false; @override - void onInit() { + void onInit() async { // TODO: implement onInit super.onInit(); sub = EventBusManager.on().listen((event) { loadMyAssest(); }); + SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); + if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') { + isProxy = true; + } else { + isProxy = false; + } + + loadMyAssest(); } diff --git a/circle_app/lib/circle_app/my_assets/view.dart b/circle_app/lib/circle_app/my_assets/view.dart index c651e6f..9c9f298 100644 --- a/circle_app/lib/circle_app/my_assets/view.dart +++ b/circle_app/lib/circle_app/my_assets/view.dart @@ -282,6 +282,7 @@ class My_assetsPage extends StatelessWidget { ), ], )), + if (!logic.isProxy) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { diff --git a/circle_app/lib/view/notice.dart b/circle_app/lib/view/notice.dart index 8cebc26..a1a2edb 100644 --- a/circle_app/lib/view/notice.dart +++ b/circle_app/lib/view/notice.dart @@ -449,6 +449,163 @@ void showGiftButtonOverlay(BuildContext context,String content, overlayState?.insert(overlayEntry!); } +void showPeopleCallOutOverlay(BuildContext context,String content, + NoticeCallback noticeCallback) { + OverlayState? overlayState = Overlay.of(context); + late OverlayEntry overlayEntry; + bool showMessage = false; + + int countdownSeconds = 5; // 倒计时秒数 + + // 创建 Timer + late Timer countdownTimer; + + // 创建 OverlayEntry + overlayEntry = OverlayEntry( + builder: (BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + Positioned( + top: MediaQuery.of(context).padding.top, + // right: 16, + child: AnimatedContainer( + duration: const Duration(milliseconds: 500), + curve: Curves.easeInOut, + height: showMessage ? 55 : 0, + child: Container( + width: Get.width - 8, + // margin: EdgeInsets.only(top:10.sp), + padding: EdgeInsets.fromLTRB(10.sp, 8.sp, 10.sp, 8.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: const Color(0xFF353443), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + + // const SizedBox(width: 8), + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + // direction: Axis.vertical, + children: [ + Container( + // width: 70.sp, + child: Text( + content, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color.fromRGBO(247, 250, 250, 1.0), + fontSize: 15.sp, + ), + ), + ), + + ], + ), + ), + GestureDetector( + onTap: () { + countdownTimer.cancel(); + try { + overlayEntry!.remove(); + } catch (e) {} + mainOverlayEntry = null; + noticeCallback(); + + // logic.setLike(); + // logic.showMessage = false; + // logic.update(); + }, + child: Container( + // margin: EdgeInsets.only(top: 6.sp), + height: 24, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + gradient: const LinearGradient( + colors: [ + Color(0xFF06F9FA), + Color(0xFFDC5BFD), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 8.sp, vertical: 0.sp), + child: Text( + '查看', + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + ), + ), + ), + ), + + // ), + ], + ), + ), + ), + ), + Positioned( + top: MediaQuery.of(context).padding.top, + right: 7.sp, + child: GestureDetector( + onTap: () { + countdownTimer.cancel(); + // 取消计时器 + try { + overlayEntry!.remove(); + } catch (e) {} + mainOverlayEntry = null; + }, + child: Container( + height: 15, + width: 20, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topRight: Radius.circular(10), + bottomLeft: Radius.circular(10)), + gradient: AppColor.tagVerLinearGradient), + alignment: Alignment.center, + child: Icon( + Icons.close, + size: 15, + color: Colors.white, + ), + ), + )) + ], + ); + }, + ); + // setState(() {}); + showMessage = true; + mainOverlayEntry = overlayEntry; + countdownTimer = Timer.periodic(Duration(seconds: 1), (timer) { + if (countdownSeconds > 0) { + countdownSeconds--; + // overlayEntry.markNeedsBuild(); // 刷新 OverlayEntry + } else { + // 取消计时器 + timer.cancel(); + + try { + overlayEntry!.remove(); + } catch (e) {} + mainOverlayEntry = null; + } + }); + // 将 OverlayEntry 添加到 Overlay 中 + overlayState?.insert(overlayEntry!); +} + + void showTipFloatingButtonOverlay(BuildContext context, String tip) { OverlayState? overlayState = Overlay.of(context); diff --git a/circle_app/pubspec.lock b/circle_app/pubspec.lock index 324c027..64ab9c2 100644 --- a/circle_app/pubspec.lock +++ b/circle_app/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: "direct main" description: name: app_settings - sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33 + sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e" url: "https://pub.flutter-io.cn" source: hosted - version: "4.3.1" + version: "4.0.4" archive: dependency: transitive description: @@ -630,14 +630,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.3" - flutter_install_app: - dependency: "direct main" - description: - name: flutter_install_app - sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.0" flutter_intl: dependency: "direct main" description: diff --git a/circle_app/pubspec.yaml b/circle_app/pubspec.yaml index 9ae2aa3..6640863 100644 --- a/circle_app/pubspec.yaml +++ b/circle_app/pubspec.yaml @@ -90,7 +90,7 @@ dependencies: fluwx: ^3.8.1+1 event_bus: ^2.0.0 #安装apk - flutter_install_app: 1.3.0 +# flutter_install_app: 1.3.0 #闪屏页 flutter_native_splash: 2.2.16 #腾讯离线推送 @@ -112,7 +112,7 @@ dependencies: #边框渐变 gradient_borders: ^1.0.0 #系统设置 安卓4.3.1 苹果4.0.4 - app_settings: 4.3.1 + app_settings: 4.0.4 #百度定位插件 flutter_bmflocation: ^3.6.0 #通知权限