diff --git a/circle_app/android/app/build.gradle b/circle_app/android/app/build.gradle index f666db0..da58d98 100644 --- a/circle_app/android/app/build.gradle +++ b/circle_app/android/app/build.gradle @@ -71,8 +71,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion - versionCode 27 - versionName "1.3.5" + versionCode 28 + versionName "1.3.6" manifestPlaceholders = [ vivo_APPID: "105669716", vivo_APPKEY:"84f750207787376b310ca5b0d5969122", diff --git a/circle_app/assets/images/circle/no_look_icon.png b/circle_app/assets/images/circle/no_look_icon.png index 8b48b4c..e36b656 100644 Binary files a/circle_app/assets/images/circle/no_look_icon.png and b/circle_app/assets/images/circle/no_look_icon.png differ diff --git a/circle_app/assets/images/circle/nor_like_icon.png b/circle_app/assets/images/circle/nor_like_icon.png index efc6530..beb5aae 100644 Binary files a/circle_app/assets/images/circle/nor_like_icon.png and b/circle_app/assets/images/circle/nor_like_icon.png differ diff --git a/circle_app/lib/app/chat/widget/wish_dialog.dart b/circle_app/lib/app/chat/widget/wish_dialog.dart index 399fd7d..91f6725 100644 --- a/circle_app/lib/app/chat/widget/wish_dialog.dart +++ b/circle_app/lib/app/chat/widget/wish_dialog.dart @@ -25,6 +25,7 @@ class _WishDialogState extends State { String giftId = ''; String withStr = ''; int selectedIndex = 1; + String tipStr = ''; List optionList = [ '分享一张本人照片', @@ -52,6 +53,7 @@ class _WishDialogState extends State { if (info['name'] == '浪漫告白') { selectedIndex = i ; giftId = info['id'].toString(); + tipStr = info['topHours'] != null ? info['topHours'].toString() : ''; } } setState(() {}); @@ -84,7 +86,7 @@ class _WishDialogState extends State { onTap: () { selectedIndex = index; giftId = info['id'].toString(); - // tipStr = info['topHours'] != null ? info['topHours'].toString() : ''; + tipStr = info['topHours'] != null ? info['topHours'].toString() : ''; setState(() {}); }, child: Container( @@ -148,13 +150,28 @@ class _WishDialogState extends State { style: TextStyle(color: Colors.white, fontSize: 15.sp), ), Container( - height: 102.sp, + height: tipStr.isNotEmpty ? 125.sp : 102.sp, margin: EdgeInsets.only(top: 12.sp), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.sp), gradient: LinearGradient( colors: [Color(0xFF132B40), Color(0xFF251240)])), - child: giftGridWidget(), + child: Column( + children: [ + if (tipStr.isNotEmpty) + Padding( + padding: EdgeInsets.only(top:6.sp), + child: Text( + '礼物送出后,获得$tipStr小时的消息置顶', + style: TextStyle( + color: AppColor.mainColor, + fontSize: 12.sp, + fontWeight: FontWeight.w500), + ), + ), + giftGridWidget(), + ], + ), ), GestureDetector( onTap: () { diff --git a/circle_app/lib/app/circle/widgets/discover.dart b/circle_app/lib/app/circle/widgets/discover.dart index 2bbf21c..633bf2c 100644 --- a/circle_app/lib/app/circle/widgets/discover.dart +++ b/circle_app/lib/app/circle/widgets/discover.dart @@ -1,4 +1,3 @@ - import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; @@ -49,7 +48,9 @@ class _DiscoverState extends State int index = 1; List tagList = []; - List genderList = [];List orientationList= [];List roleList= []; + List genderList = []; + List orientationList = []; + List roleList = []; bool isPop = false; //获取屏幕宽度 @@ -61,7 +62,6 @@ class _DiscoverState extends State double screenHeight = 0; - void animateToOffset(ScrollController controller, double offset, void Function() onScrollCompleted) { controller @@ -100,7 +100,7 @@ class _DiscoverState extends State // 手指从下向上滑动 lastPage--; animateToOffset( - _scrollController, lastPage * ( screenHeight + 5.sp), () {}); + _scrollController, lastPage * (screenHeight + 5.sp), () {}); } else if (touchRangeY > 0 && lastPage < list.length - 1) { // 从上向下 lastPage++; @@ -137,7 +137,6 @@ class _DiscoverState extends State }); } - sub = EventBusManager.on().listen((event) { pointerStart = Offset.zero; pointerEnd = Offset.zero; @@ -195,9 +194,7 @@ class _DiscoverState extends State list[initIndex] = result['data']; setState(() {}); - } catch (e) { - - } + } catch (e) {} } loadGiftListData() async { @@ -264,12 +261,9 @@ class _DiscoverState extends State if (screenHeight == 0 && list.isNotEmpty) { var size = context?.findRenderObject()?.paintBounds?.size; screenHeight = size!.height - 20.sp; - setState(() { - - }); + setState(() {}); print(size.toString()); } - }); return list.isEmpty @@ -277,10 +271,10 @@ class _DiscoverState extends State ? loaddingWidget(true) : noResultWidget(tip: '已解锁微信的圈友会展示在这里哦~') : Stack( - fit: StackFit.expand, - children: [ - Container(color: Colors.transparent), - Listener( + fit: StackFit.expand, + children: [ + Container(color: Colors.transparent), + Listener( onPointerDown: getPointDownListenerInHorizontal(), onPointerUp: getPointUpListenerInHorizontal(), child: SmartRefresher( @@ -289,7 +283,6 @@ class _DiscoverState extends State onLoading: _onLoading, enablePullUp: true, child: ListView.builder( - itemBuilder: (context, index) { var user = Users.fromJson(list[index]); @@ -333,9 +326,12 @@ class _DiscoverState extends State child: Container( padding: EdgeInsets.all(2.sp), child: Swiper( - autoplay: - user.images!.length == 1 ? false : true, - loop: user.images!.length == 1 ? false : true, + autoplay: user.images!.length == 1 + ? false + : true, + loop: user.images!.length == 1 + ? false + : true, itemBuilder: (BuildContext context, int index) { // print(index); @@ -364,89 +360,127 @@ class _DiscoverState extends State )), ), Positioned( - left: 16.sp, - top: 20.sp, + left: 5.sp, + top: 10.sp, child: Container( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - if (user.both_cities!.isNotEmpty) - Row( - children: [ - Container( - width: 6.sp, - height: 6.sp, - margin: - EdgeInsets.only(right: 4.sp), - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(3.sp), - color: const Color(0xFFCE51FF), + if (onLineStr.isNotEmpty) + Container( + height: 24.sp, + padding: EdgeInsets.only( + left: 6.sp, right: 6.sp), + decoration: BoxDecoration( + color: Colors.black + .withOpacity(0.35), + borderRadius: + BorderRadius.circular( + 12.sp)), + child: Row( + children: [ + Container( + width: 6.sp, + height: 6.sp, + margin: EdgeInsets.only( + right: 4.sp), + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular( + 3.sp), + color: + const Color(0xFFCE51FF), + ), ), - ), - // if (logic.online) - Text( - "你们都来过${user.both_cities!.first}", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp), - ), - ], + // if (logic.online) + Text( + onLineStr, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp), + ), + ], + ), ), if (user.both_interests!.isNotEmpty) SizedBox( height: 8.sp, ), - if (user.both_interests!.isNotEmpty) - Row( - children: [ - Container( - width: 6.sp, - height: 6.sp, - margin: - EdgeInsets.only(right: 4.sp), - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(3.sp), - color: const Color(0xFFCE51FF), - ), - ), - // if (logic.online) - Text( - "你们有共同的圈子:${user.both_interests!.first['title']}", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp), - ), - ], - ), if (user.both_cities!.isNotEmpty) - SizedBox( - height: 8.sp, - ), - if (onLineStr.isNotEmpty) - Row( - children: [ - Container( - width: 6.sp, - height: 6.sp, - margin: - EdgeInsets.only(right: 4.sp), - decoration: BoxDecoration( + Container( + height: 24.sp, + padding: EdgeInsets.only( + left: 6.sp, right: 6.sp), + decoration: BoxDecoration( + color: Colors.black + .withOpacity(0.35), borderRadius: - BorderRadius.circular(3.sp), - color: const Color(0xFFCE51FF), - ), - ), - // if (logic.online) - Text( - onLineStr, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp), - ), - ], + BorderRadius.circular( + 12.sp)), + child: Row( + children: [ + Container( + width: 6.sp, + height: 6.sp, + margin: EdgeInsets.only( + right: 4.sp), + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular( + 3.sp), + color: const Color( + 0xFFCE51FF), + ), + ), + // if (logic.online) + Text( + "你们都来过${user.both_cities!.first}", + style: TextStyle( + color: Colors.white, + fontSize: 16.sp), + ), + ], + )), + if (user.both_cities!.isNotEmpty) + SizedBox( + height: 8.sp, ), + if (user.both_interests!.isNotEmpty) + Container( + height: 24.sp, + padding: EdgeInsets.only( + left: 6.sp, right: 6.sp), + decoration: BoxDecoration( + color: Colors.black + .withOpacity(0.35), + borderRadius: + BorderRadius.circular( + 12.sp)), + child: Row( + children: [ + Container( + width: 6.sp, + height: 6.sp, + margin: EdgeInsets.only( + right: 4.sp), + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular( + 3.sp), + color: const Color( + 0xFFCE51FF), + ), + ), + // if (logic.online) + Text( + "你们有共同的圈子:${user.both_interests!.first['title']}", + style: TextStyle( + color: Colors.white, + fontSize: 16.sp), + ), + ], + )), ], ), )), @@ -462,11 +496,13 @@ class _DiscoverState extends State width: 73.sp, height: 25.sp, decoration: BoxDecoration( - gradient: AppColor.mainVerLinearGradient, + gradient: + AppColor.mainVerLinearGradient, borderRadius: BorderRadius.circular(12.5.sp)), child: Row( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.center, children: [ Container( margin: EdgeInsets.only(left: 5.sp), @@ -495,7 +531,8 @@ class _DiscoverState extends State width: Get.width - 32.sp, padding: EdgeInsets.only(right: 0.sp), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ if (user.wxNum != null) wxStatusWidget( @@ -519,18 +556,23 @@ class _DiscoverState extends State fontWeight: FontWeight.bold), ), Container( - margin: EdgeInsets.only(left: 5.sp), + margin: + EdgeInsets.only(left: 5.sp), alignment: Alignment.center, height: 18.sp, padding: EdgeInsets.only( left: 6.sp, right: 6.sp), decoration: BoxDecoration( borderRadius: - BorderRadius.circular(9.sp), - gradient: const LinearGradient( - begin: Alignment(0.25, 0.5), - end: Alignment(0.75, 0.5), - colors: [ + BorderRadius.circular( + 9.sp), + gradient: + const LinearGradient( + begin: Alignment( + 0.25, 0.5), + end: Alignment( + 0.75, 0.5), + colors: [ Color(0xff8DFFF8), Color(0xffB5D3FF) ])), @@ -562,11 +604,16 @@ class _DiscoverState extends State ), Container( width: Get.width - 120.sp, - margin: EdgeInsets.only(top: 15.sp,bottom: 15.sp), + margin: EdgeInsets.only( + top: 15.sp, bottom: 15.sp), child: Text( user.signature! ?? '', overflow: TextOverflow.ellipsis, - maxLines: (user.signature! ?? '').length > 15 ? 2 : 1, + maxLines: + (user.signature! ?? '').length > + 15 + ? 2 + : 1, style: TextStyle( fontSize: 16.sp, color: const Color(0XFFF7FAFA)), @@ -626,8 +673,8 @@ class _DiscoverState extends State ), GestureDetector( onTap: () { - _showReportDialog(context,user.userId!.toString(),index); - + _showReportDialog(context, + user.userId!.toString(), index); }, child: Image.asset( getCircleImage( @@ -648,8 +695,8 @@ class _DiscoverState extends State ), ), ), - ], - ); + ], + ); } tagItem(List item) { @@ -746,22 +793,20 @@ class _DiscoverState extends State } else if (data['data']['user']['wxNum'].toString().isEmpty) { showAddWxPicker(false); } - } } - void sendNoLookData(String userId,int index) async { + void sendNoLookData(String userId, int index) async { var data = await DioManager.instance.post(url: Api.uninterested + userId); if (data['code'] == 200) { showOKToast('操作成功'); list.removeAt(index); - setState(() { - - }); + setState(() {}); } } - void _showReportDialog(BuildContext context,String userId,int currentIndex) { + void _showReportDialog( + BuildContext context, String userId, int currentIndex) { showDialog( context: context, builder: (BuildContext context) { @@ -803,7 +848,7 @@ class _DiscoverState extends State child: Text( "温馨提示", style: - TextStyle(color: Colors.white, fontSize: 16.sp), + TextStyle(color: Colors.white, fontSize: 16.sp), ), ), Container( @@ -865,7 +910,7 @@ class _DiscoverState extends State GestureDetector( onTap: () { Get.back(); - sendNoLookData(userId,currentIndex); + sendNoLookData(userId, currentIndex); }, child: Container( margin: EdgeInsets.only(top: 24.sp), @@ -908,7 +953,6 @@ class _DiscoverState extends State } } - class DiscoverDataRefresh { String userId; DiscoverDataRefresh(this.userId); @@ -976,7 +1020,7 @@ class Users { this.birthday, this.blacklist, this.city, - this.both_interests, + this.both_interests, this.distance, this.dust, this.email, diff --git a/circle_app/lib/app/gift_shop/view.dart b/circle_app/lib/app/gift_shop/view.dart index 80944f5..2df1591 100644 --- a/circle_app/lib/app/gift_shop/view.dart +++ b/circle_app/lib/app/gift_shop/view.dart @@ -32,7 +32,7 @@ class Gift_shopPage extends StatelessWidget { Get.toNamed(AppRoutes.BillActivity,arguments: 2); }, child: Text( - '礼物收入', + '账单', style: TextStyle(color: Colors.white, fontSize: 14.sp), ), ), @@ -288,14 +288,14 @@ class Gift_shopPage extends StatelessWidget { child: Container( height: 105.sp, decoration: BoxDecoration( - color: isGet ? Color(0xFF3E3D4C) : Color(0x292836FF), + color: isGet ? Color(0x8F3E3D4C) : Color(0x0f2836FF), borderRadius: BorderRadius.circular(4.sp), ), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Opacity( - opacity: isGet ? 1 : 0.5, + opacity: isGet ? 1 : 0.75, child: Image.network( info['icon'], width: 60.sp, diff --git a/circle_app/lib/app/likelist/view.dart b/circle_app/lib/app/likelist/view.dart index e618161..cd17a32 100644 --- a/circle_app/lib/app/likelist/view.dart +++ b/circle_app/lib/app/likelist/view.dart @@ -378,7 +378,7 @@ class _LikelistPageState extends State with RouteAware { borderRadius: BorderRadius.circular(14), ), child: Center( - child: Text(item.isLike ? "互相关注" : "关注", + child: Text(item.isLike ? "互相喜欢" : "喜欢", style: TextStyle(fontSize: 14.sp, color: Colors.white)), ), ), diff --git a/circle_app/lib/app/msg/TIMUIKitConversation/tim_uikit_conversation_item.dart b/circle_app/lib/app/msg/TIMUIKitConversation/tim_uikit_conversation_item.dart index cb69624..8e61b2d 100644 --- a/circle_app/lib/app/msg/TIMUIKitConversation/tim_uikit_conversation_item.dart +++ b/circle_app/lib/app/msg/TIMUIKitConversation/tim_uikit_conversation_item.dart @@ -178,7 +178,7 @@ class TIMConversationItem extends TIMUIKitStatelessWidget { ), ), if (userInfo != null) - (userInfo!.role ?? 0) > 0 + (userInfo!.role ?? 0) > 0 && !(userInfo!.userID ?? '').contains('qz_prod_11_') ? Positioned( bottom: 0, right: 0, diff --git a/circle_app/lib/app/msg/logic.dart b/circle_app/lib/app/msg/logic.dart index b26b05e..8041d68 100644 --- a/circle_app/lib/app/msg/logic.dart +++ b/circle_app/lib/app/msg/logic.dart @@ -7,7 +7,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import '../../common/Widgets/base_tip_widget.dart'; +import '../../util/SharedPreferencesHelper.dart'; import '../circle/logic.dart'; +import '../minefragment/logic.dart'; import 'state.dart'; class MsgLogic extends GetxController { @@ -25,6 +27,7 @@ class MsgLogic extends GetxController { void onInit() { // TODO: implement onInit super.onInit(); + loadMyInfoData(); loadChatData(); loadLikeData(); loadStatusData(); @@ -63,7 +66,7 @@ class MsgLogic extends GetxController { var data = await DioManager.getInstance().get(url: Api.queryQuickStart); if (data["code"] == 200) { - if (data["data"] == 0) { + if (data["data"] == 2 || data["data"] == 0) { var data = await DioManager.getInstance() .get(url: Api.startQuick); if (data["code"] == 200) { @@ -157,7 +160,7 @@ class MsgLogic extends GetxController { var data = await DioManager.getInstance().get(url: Api.queryQuickStart); if (data["code"] == 200) { - if (data["data"] == 0) { + if (data["data"] == 0 || data["data"] == 2) { isStart = false; } else { isStart = true; @@ -165,4 +168,18 @@ class MsgLogic extends GetxController { } update(); } + + void loadMyInfoData() async { + var data = await DioManager.instance.get(url: Api.getUserMine); + var bean = BaseResponse.fromJson( + data, (data) => MineResponseBean.fromJson(data)); + if (bean.isSuccess()) { + var userInfoBean = bean.data.user; + SharedPreferencesHelper.getInstance().then((sharedPreferences) { + sharedPreferences.setInt(SharedPreferencesHelper.VIP, userInfoBean.vip); + sharedPreferences.setInt( + SharedPreferencesHelper.USERID, userInfoBean!.id); + }); + } + } } diff --git a/circle_app/lib/app/myfeedbacklist/view.dart b/circle_app/lib/app/myfeedbacklist/view.dart index 9422274..e63aea4 100644 --- a/circle_app/lib/app/myfeedbacklist/view.dart +++ b/circle_app/lib/app/myfeedbacklist/view.dart @@ -108,7 +108,7 @@ class MyfeedbacklistPage extends StatelessWidget { Container( margin: EdgeInsets.only(left: 16.sp,right: 16.sp,bottom: 16.sp), child: Text( - item.reply!=null?"反馈回复:"+item.reply:"审核中", + item.reply!=null?"反馈回复:"+item.reply:"待回复", style: TextStyle( color: Colors.grey, fontSize: 12.0.sp, diff --git a/circle_app/lib/app/swiper/view.dart b/circle_app/lib/app/swiper/view.dart index c5db245..707887a 100644 --- a/circle_app/lib/app/swiper/view.dart +++ b/circle_app/lib/app/swiper/view.dart @@ -42,11 +42,11 @@ class _SwiperPageState extends State { index: logic.index, loop: false, itemBuilder: (BuildContext context, int index) { - if (logic.index == index) { - return RepaintBoundary( - key: _globalKey, - child:itemWidget(logic,index)); - } + // if (logic.index == index) { + // return RepaintBoundary( + // key: _globalKey, + // child:itemWidget(logic,index)); + // } return itemWidget(logic,index); }, @@ -60,26 +60,26 @@ class _SwiperPageState extends State { activeColor: Color(0xFFD14CFF), color: Colors.white)), //下面的分页小点 )), - Positioned( - bottom: Get.bottomBarHeight, - right: 15.sp, - child: InkWell( - onTap: () { - _saveLocalImage(); - }, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.all(5.sp), - decoration: BoxDecoration( - color: Colors.black.withOpacity(0.5), - borderRadius: BorderRadius.circular(17.5.sp)), - child: Icon( - Icons.download, - color: Colors.white, - size: 25.sp, - ), - ), - )) + // Positioned( + // bottom: Get.bottomBarHeight, + // right: 15.sp, + // child: InkWell( + // onTap: () { + // _saveLocalImage(); + // }, + // child: Container( + // alignment: Alignment.center, + // padding: EdgeInsets.all(5.sp), + // decoration: BoxDecoration( + // color: Colors.black.withOpacity(0.5), + // borderRadius: BorderRadius.circular(17.5.sp)), + // child: Icon( + // Icons.download, + // color: Colors.white, + // size: 25.sp, + // ), + // ), + // )) ], ), ), @@ -98,9 +98,11 @@ class _SwiperPageState extends State { children: [ Container( // color: Colors.red, + child: CachedNetworkImage( imageUrl: logic.imgList[index].toString().contains('?') ? logic.imgList[index].toString().split('?').first : logic.imgList[index].toString(), - fit: BoxFit.contain, + fit: BoxFit.cover, + width: double.infinity, ), ), Positioned( diff --git a/circle_app/lib/app/userinfo/logic.dart b/circle_app/lib/app/userinfo/logic.dart index 23a851a..c62d14a 100644 --- a/circle_app/lib/app/userinfo/logic.dart +++ b/circle_app/lib/app/userinfo/logic.dart @@ -350,7 +350,7 @@ class UserinfoLogic extends GetxController { 'num': 1, 'toUserId': userId }); - if (result['code'] == 10000) { + if (result['code'] == 200) { showOKToast('赠送成功'); loadData(); } else if (result['code'] == 31201) { @@ -389,6 +389,15 @@ class UserinfoLogic extends GetxController { }); } catch (_) {} } + + void sendWhatToWx() async { + var result = await DioManager.instance.get(url: Api.noticeWxNum + userId,); + if (result['code'] == 200) { + showOKToast('已提醒对方填写'); + } else { + showOKToast(result['msg']); + } + } } class UserBean { diff --git a/circle_app/lib/app/userinfo/view.dart b/circle_app/lib/app/userinfo/view.dart index 895d011..74f0bbc 100644 --- a/circle_app/lib/app/userinfo/view.dart +++ b/circle_app/lib/app/userinfo/view.dart @@ -29,7 +29,6 @@ class UserinfoPage extends StatefulWidget { class MyTabbedScreenState extends State with SingleTickerProviderStateMixin, RouteAware { late TabController _tabController; - late PageController _pageController; ScrollController scrollController = ScrollController(); bool isShowBlackTitle = false; @@ -40,34 +39,35 @@ class MyTabbedScreenState extends State void initState() { super.initState(); sub = EventBusManager.on().listen((event) { - scrollController.animateTo(0, duration: Duration(microseconds: 200), curve: Curves.easeIn); + if (isSetState) { + isSetState = false; + setState(() { + + }); + } }); scrollController.addListener(() { if (scrollController.position.pixels == scrollController.position.maxScrollExtent) { print('2222'); isSetState = true; + EventBusManager.fire(ScrollViewIsEnd(true)); setState(() { }); - EventBusManager.fire(ScrollViewIsEnd(true)); + } else { EventBusManager.fire(ScrollViewIsEnd(false)); if (isSetState) { + isSetState = false; setState(() { }); - isSetState = false; } - - print('111'); } }); - _pageController = PageController(); _tabController = TabController(length: 2, vsync: this); _tabController.animation!.addListener(_handleTabChange); - // _tabController.addListener(_handleTabChange); - // _tabController } @override @@ -106,15 +106,6 @@ class MyTabbedScreenState extends State @override void dispose() { _tabController.dispose(); - OverlayState? overlayState = Overlay.of(Get.context!); - if (mainOverlayEntry != null) { - if (overlayState.debugIsVisible(mainOverlayEntry!)) { - mainOverlayEntry!.remove(); - } - } - - // overlayState.insert(entry); - sub.cancel(); routeObserver.unsubscribe(this); super.dispose(); @@ -210,7 +201,44 @@ class MyTabbedScreenState extends State // ), // ), ) - : Container()), + : logic.userInfoBean!= null ? logic.userInfoBean!.wx_num.isEmpty ? GestureDetector( + onTap: () { + logic.sendWhatToWx(); + }, + child: Stack( + alignment: Alignment.center, + children: [ + Container( + width: 101.sp, + height: 26.sp, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.sp), + gradient: LinearGradient( + colors: [ + Color(0xFF30FFD9), + Color(0xFFDD3DF4) + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + ), + Container( + width: 100.sp, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(11.sp), + color: Color(0xFF240F3B)), + alignment: Alignment.center, + height: 24.sp, + child: Text( + '想要微信号', + style: TextStyle( + color: Colors.white, fontSize: 14.sp), + ), + ) + ], + ), + ) : Container() : Container()), body: Stack( // fit: StackFit.expand, children: [ @@ -233,7 +261,7 @@ class MyTabbedScreenState extends State toolbarHeight: 0, foregroundColor: Colors.transparent, backgroundColor: Colors.transparent, - expandedHeight: 372.sp + (logic.userInfoBean != null + expandedHeight: (!logic.isMe ? 372.sp : 312.sp) + (logic.userInfoBean != null ? logic.userInfoBean!.wx_num!.isNotEmpty ? 59.sp : 0 : 0), bottom: PreferredSize( @@ -622,7 +650,7 @@ class MyTabbedScreenState extends State children: [ Stack(children: [ Opacity( - opacity: !isGet ? 0.5 : 1, + opacity: !isGet ? 0.6 : 1, child: Image.network( info['icon'], width: 50.sp, diff --git a/circle_app/lib/app/userinfo/widgets/home_call_out.dart b/circle_app/lib/app/userinfo/widgets/home_call_out.dart index 6850b55..5c5637e 100644 --- a/circle_app/lib/app/userinfo/widgets/home_call_out.dart +++ b/circle_app/lib/app/userinfo/widgets/home_call_out.dart @@ -55,7 +55,7 @@ class _HomeCallOutViewState extends State with AutomaticKeepAli listsLg?.loadCallOutListData(widget.userId); listsLg!.scrollController.addListener(() { - if (listsLg!.scrollController.offset < 0) { + if (listsLg!.scrollController.offset <= 0) { EventBusManager.fire(ScrollViewScrollTop()); isEnd = false; setState(() { @@ -91,7 +91,7 @@ class _HomeCallOutViewState extends State with AutomaticKeepAli ? loaddingWidget(true) : ListView.builder( // physics: const AlwaysScrollableScrollPhysics(), - physics: isEnd ? AlwaysScrollableScrollPhysics() : NeverScrollableScrollPhysics(), + physics: isEnd ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(), // shrinkWrap:true, padding: EdgeInsets.only( bottom: MediaQuery.of(context).padding.bottom + 56.sp), diff --git a/circle_app/lib/network/api.dart b/circle_app/lib/network/api.dart index 04a691a..5d4eb08 100644 --- a/circle_app/lib/network/api.dart +++ b/circle_app/lib/network/api.dart @@ -302,4 +302,7 @@ class Api { static const chatRecommendFriend = '/msg-service/im/chat/recommend'; //是否显示送礼物 static const isShow_give_gift = '/msg-service/message/show_give_gift/'; + + //想要微信 + static const noticeWxNum = '/user-service/user/updateWxNum/notice/'; } \ No newline at end of file diff --git a/circle_app/lib/network/dio_manager.dart b/circle_app/lib/network/dio_manager.dart index ccd9ca7..2ee7edc 100644 --- a/circle_app/lib/network/dio_manager.dart +++ b/circle_app/lib/network/dio_manager.dart @@ -246,7 +246,7 @@ class DioManager { pushLoginPage(); break; } - if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState)) { + if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState) && responseMap["code"] != 21201) { showOKToast(responseMap['msg']); } } diff --git a/circle_app/lib/util/util.dart b/circle_app/lib/util/util.dart index b828696..2148460 100644 --- a/circle_app/lib/util/util.dart +++ b/circle_app/lib/util/util.dart @@ -671,16 +671,20 @@ sendCircleCustomMsg(String userId, String data, String desc) async { ); if (createCustomMessageRes.code == 0) { String? id = createCustomMessageRes.data?.id; - V2TimValueCallback sendMessageRes = await TencentImSDKPlugin - .v2TIMManager - .getMessageManager() - .sendMessage(id: id!, receiver: userId, groupID: ''); - if (sendMessageRes.code == 0) { - // 发送成功 - showOKToast('发送成功'); - sendMessageRes.data?.customElem?.data; //自定义data - sendMessageRes.data?.customElem?.desc; //自定义desc - sendMessageRes.data?.customElem?.extension; //自定义extension + if (Get.currentRoute == AppRoutes.Chat) { + EventBusManager.fire(SendCoustomMessage(createCustomMessageRes)); + } else { + V2TimValueCallback sendMessageRes = await TencentImSDKPlugin + .v2TIMManager + .getMessageManager() + .sendMessage(id: id!, receiver: userId, groupID: ''); + if (sendMessageRes.code == 0) { + // 发送成功 + showOKToast('发送成功'); + sendMessageRes.data?.customElem?.data; //自定义data + sendMessageRes.data?.customElem?.desc; //自定义desc + sendMessageRes.data?.customElem?.extension; //自定义extension + } } } } diff --git a/circle_app/lib/view/notice.dart b/circle_app/lib/view/notice.dart index 79bebc8..7c83370 100644 --- a/circle_app/lib/view/notice.dart +++ b/circle_app/lib/view/notice.dart @@ -44,7 +44,7 @@ void showFloatingButtonOverlay( child: Container( width: Get.width - 16, // margin: EdgeInsets.only(top:10.sp), - padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 0), + padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 16.sp), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: const Color(0xFF353443), @@ -62,69 +62,70 @@ void showFloatingButtonOverlay( ), ), const SizedBox(width: 8), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - // width: 70.sp, - child: Text( - nickname, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color.fromRGBO(247, 250, 250, 1.0), - fontSize: 16.sp, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + // width: 70.sp, + child: Text( + nickname, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color.fromRGBO(247, 250, 250, 1.0), + fontSize: 16.sp, + ), ), ), - ), - SizedBox(width: 8.sp), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(17), - gradient: const LinearGradient( - colors: [ - Color.fromRGBO(141, 255, 248, 1.0), - Color.fromRGBO(181, 211, 255, 1.0), - ], - begin: Alignment.centerLeft, - end: Alignment.centerRight, + SizedBox(width: 8.sp), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17), + gradient: const LinearGradient( + colors: [ + Color.fromRGBO(141, 255, 248, 1.0), + Color.fromRGBO(181, 211, 255, 1.0), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + padding: EdgeInsets.only( + top: 2.sp, + // bottom: 2.sp, + left: 10.sp, + right: 10.sp, + ), + child: Text( + ageMsg, + style: const TextStyle( + color: Colors.black, + fontSize: 10, + ), ), ), - padding: EdgeInsets.only( - top: 2.sp, - bottom: 2.sp, - left: 10.sp, - right: 10.sp, - ), - child: Text( - ageMsg, - style: const TextStyle( - color: Colors.black, - fontSize: 10, - ), - ), - ), - ], - ), - const SizedBox(height: 8), - Text( event == 0 - ? "看了这么久,给我点个喜欢呗~" - : event == 1 - ? "我喜欢了你,可以喜欢我一下吗?" - : event == 2 - ? "你喜欢的人上线啦,赶紧找他聊天吧!" - : "我也喜欢了你,一起聊聊呗~", - style: TextStyle( - color: Colors.grey, - fontSize: 14.sp, + ], ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ], + const SizedBox(height: 4), + Text( event == 0 + ? "看了这么久,给我点个喜欢呗~" + : event == 1 + ? "我喜欢了你,可以喜欢我一下吗?" + : event == 2 + ? "你喜欢的人上线啦,赶紧找他聊天吧!" + : "我也喜欢了你,一起聊聊呗~", + style: TextStyle( + color: Colors.grey, + fontSize: 13.sp, + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ], + ), ), - const Spacer(), GestureDetector( onTap: () { countdownTimer.cancel();