From e84d9eb6516e8c79904d4cf701049ada436b5380 Mon Sep 17 00:00:00 2001 From: CYH <13923927013@163.com> Date: Sun, 4 Feb 2024 16:39:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=8D=E9=A6=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle_app/android/app/build.gradle | 4 +- circle_app/assets/images/mine/save.png | Bin 0 -> 8476 bytes .../ios/Runner.xcodeproj/project.pbxproj | 6 +- circle_app/lib/app/bill/view.dart | 14 +- circle_app/lib/app/circle/logic.dart | 5 + circle_app/lib/app/circle/view.dart | 4 +- .../lib/app/circle/widgets/discover.dart | 91 ++- .../lib/app/circle/widgets/discover_item.dart | 695 ++++++++++++++++++ .../lib/app/circle/widgets/vicinity.dart | 190 +++-- circle_app/lib/app/home/logic.dart | 52 +- circle_app/lib/app/invite/share.dart | 7 +- .../app/login/complete_material/logic.dart | 39 +- .../lib/app/login/complete_material/view.dart | 3 +- circle_app/lib/app/my_assets/view.dart | 16 +- .../lib/common/Widgets/circle_share.dart | 7 +- .../lib/common/Widgets/unlock_wx_tip.dart | 5 +- circle_app/lib/common/const.dart | 20 +- 17 files changed, 985 insertions(+), 173 deletions(-) create mode 100644 circle_app/assets/images/mine/save.png create mode 100644 circle_app/lib/app/circle/widgets/discover_item.dart diff --git a/circle_app/android/app/build.gradle b/circle_app/android/app/build.gradle index dc5c32e..124700c 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 37 - versionName "1.4.5" + versionCode 39 + versionName "1.4.7" manifestPlaceholders = [ vivo_APPID: "105669716", vivo_APPKEY:"84f750207787376b310ca5b0d5969122", diff --git a/circle_app/assets/images/mine/save.png b/circle_app/assets/images/mine/save.png new file mode 100644 index 0000000000000000000000000000000000000000..c662df7ecafcb54d66a77ea930a95c3a30fcffe7 GIT binary patch literal 8476 zcmV+%A>-bOP)PyA07*naRCr$PeF>Nq)s_D_x0bhdvoA(aL=A{68JDQhj2f2&VkZAl>24jOViK2p z|1sliqBP_syhbLIjQPw=44P3xEgKQW3)+{Huz0cE#Q8fc)q-~OuV-pQ%g z?KIfkZ>f5(>NR!w`V;B9p8KnF?^*6S2wpKMur4Cxo|4aa@R567q>C z*mM*u$QeHcg%~3c6(+?Hhf#<<9K{Dh;C4x7yTHH> zU`8&N%ViHAI-I@Z$ERn#EgNL4~whX>$9P}9g>;w?}(|~v)L!1)y1;O9| zTyPNPkLdj`&qI&?zZZmkBs9T@2uMHl$NW1pe;EBRfK)a`Z972lJ%DVt0I`jMyw#9$ z?{Cf4zY~dI?s(ji;|homFBjv2BK}n-*wp|q8vw!rASfYIOlz!ElqALEpjj=oSpcr`Bdp3wxlF^N(LLt(G7QVG1Y+B=^d%g%xd?17W6~^D_Crq3 z0_S>7ZK1?ukYyD#Jp%^ke*oaWVM2L!{*u6pHMNi;COfQv7;8x`1`xM_z>$a$&R^w* z2Lqw|X8sr#Nd(x7Lj2}%`+IlZ`rtWQ5&P`=Dm4wnm64Bv^$-}(Wcef7htfi)|E*C-GLwndZIbKut_uq#w0pyaf)>%V&YCy1ab zelUz2=!OwvfRBq%@cD+n#hN2V%>l8sCDp*dxK{v9Mqmo5R=h%5BSz|_9Dvv=09Q0N zhga7UU1|b|v4~KC#m@%D9#CZ898Is;6R6_Ypt~d;+lH>aE`hSpKSJGE3rDu=fw(%F zJcl9wyMPjE(sT_BQn`7hAO&Pe1uhKI6tn@C?rT^Ye6?UB2P?Q5h-;!f4wU`>{I(8rK0a784R~OI;}hUn5CsJt?2PVx0oSA$2|1j)311 z(}K@7G@xOpGP&=^qi;Eo26BtM$V^@>jPf#w1WAA7paLpQ8lJ8}6yw zT-_NAKALNQ7>mXm0q{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h>fXI6DmkINFNoKH0 zmcC;admZGt;3RC&{Vst38vyZXfx%}Q?!kkVoQIqGKCXb+pY8rLyZ`_I%1J~)RPdBL zM)IZR2u(~g7*0bFr-OhgfN(M*P7L^hW@K05oWw;<4obm5OQyM+)RGGy;_;QN5%7K!0jt_L^Ng3hlJ06uPkcq}pR|LbkO z(PKvYR8{o>msF6%M9}#ufZ{X|(n$=($y~q~0iqrm)S+M_0U+E5#$Na(1oAH6LIZ?D zD5PBiMN%N&DhbwssBX*&{h*HpQj*k}t51(j+Z{2X5+JEYpZ^0b2xwJP5GA4j0000< KMNUMnLSTYm-Y=s7 literal 0 HcmV?d00001 diff --git a/circle_app/ios/Runner.xcodeproj/project.pbxproj b/circle_app/ios/Runner.xcodeproj/project.pbxproj index 0caae0b..e034526 100644 --- a/circle_app/ios/Runner.xcodeproj/project.pbxproj +++ b/circle_app/ios/Runner.xcodeproj/project.pbxproj @@ -381,7 +381,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.2; + MARKETING_VERSION = 1.4.4; PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -530,7 +530,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.2; + MARKETING_VERSION = 1.4.4; PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -573,7 +573,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.2; + MARKETING_VERSION = 1.4.4; PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/circle_app/lib/app/bill/view.dart b/circle_app/lib/app/bill/view.dart index 1a934ca..ce51b4c 100644 --- a/circle_app/lib/app/bill/view.dart +++ b/circle_app/lib/app/bill/view.dart @@ -89,9 +89,10 @@ class _BillState extends State with SingleTickerProviderStateMixin { // _tabController.animateTo(index); // }, children: [ + billListView(3), billListView(1), billListView(2), - billListView(3), + // billListView(4), ], ), @@ -192,11 +193,12 @@ class _BillState extends State with SingleTickerProviderStateMixin { indicatorSize: TabBarIndicatorSize.label, labelStyle: TextStyle(fontSize: 16.sp), tabs: const [ - Tab( - text: "充值", - ), - Tab(text: "消耗"), Tab(text: "收入"), + Tab( + text: "充值/奖励", + ), + Tab(text: "支出"), + ], onTap: (index) { // _pageController.animateToPage( @@ -258,7 +260,7 @@ class ListItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - type==2 ? '-'+item.amount.toString(): '+'+item.amount.toString(), + type==2 ? '-'+item.amount.toString() + '小票' : '+'+ '${type == 3 ? (item.amount * 0.01).toStringAsFixed(2) + '元' : item.amount.toString() + '小票'}', style: TextStyle( color: const Color(0xffefd84e), fontSize: 14.0.sp, diff --git a/circle_app/lib/app/circle/logic.dart b/circle_app/lib/app/circle/logic.dart index e87aa3d..aed6b4e 100644 --- a/circle_app/lib/app/circle/logic.dart +++ b/circle_app/lib/app/circle/logic.dart @@ -299,6 +299,7 @@ class CircleLogic extends GetxController { deep = bean.data.deep; } catch (Exception) {} + myVip = bean.data.isVip ? 1 : 0; if (vicinityPage == 1) { cityName = bean.data.city; @@ -362,12 +363,14 @@ class CircleLogic extends GetxController { class VicinityBean { String city; int offset; + bool isVip; int deep; List users; VicinityBean( {required this.city, required this.users, + required this.isVip, required this.offset, required this.deep}); @@ -377,6 +380,7 @@ class VicinityBean { listsJson.map((e) => VicinityItemBean.fromJson(e)).toList(); return VicinityBean( users: lists, + isVip: json['isVip'] ?? false, city: json['city'], offset: json['offset'], deep: json['deep']); @@ -397,6 +401,7 @@ class VicinityItemBean { final double lng; final double lat; final String city; + final List interests; final List images; final String avatarThumb; diff --git a/circle_app/lib/app/circle/view.dart b/circle_app/lib/app/circle/view.dart index 8ee0021..b8a454e 100644 --- a/circle_app/lib/app/circle/view.dart +++ b/circle_app/lib/app/circle/view.dart @@ -694,7 +694,7 @@ class _CirclePageState extends State TabBar( isScrollable: true, controller: _tabController, - labelPadding: EdgeInsets.symmetric(horizontal: 4.0.sp), + labelPadding: EdgeInsets.symmetric(horizontal: 12.0.sp), indicator: UnderlineTabIndicator( borderSide: BorderSide( color: const Color(0xFF00FFF4), @@ -786,7 +786,7 @@ class _CirclePageState extends State }, child: Image.asset( getCircleImage('callout_icon'), - width: 75.sp, + height: 24.5.sp, ), ) : Row( diff --git a/circle_app/lib/app/circle/widgets/discover.dart b/circle_app/lib/app/circle/widgets/discover.dart index b741dac..45e9495 100644 --- a/circle_app/lib/app/circle/widgets/discover.dart +++ b/circle_app/lib/app/circle/widgets/discover.dart @@ -151,6 +151,7 @@ class _DiscoverState extends State lastPage = 0; _scrollController.animateTo(0, duration: const Duration(milliseconds: 300), curve: Curves.easeInOut); + refreshData(); }); sub1 = EventBusManager.on().listen((event) { genderList = event.genderList!; @@ -312,11 +313,11 @@ class _DiscoverState extends State var user = Users.fromJson(list[index]); String onLineStr = ''; - if (user.online! ?? false) { - onLineStr = '当前在线'; + if (user.online_flag?.isNotEmpty ?? false) { + onLineStr = user.online_flag!; if (user.distance != null) { if (user.distance! < 100) { - onLineStr = '当前在线 · ${user.distance!.toInt()}km'; + onLineStr = '${user.online_flag!}· ${user.distance!.toInt()}km'; } } } else { @@ -357,36 +358,57 @@ class _DiscoverState extends State // clipBehavior: Clip.hardEdge, child: Container( // padding: EdgeInsets.all(2.sp), - child: Swiper( - autoplay: false, - loop: user.images!.length == 1 - ? false - : true, - itemBuilder: - (BuildContext context, int index) { - // print(index); - return GestureDetector( - onTap: () { - List imgList = []; - user.images!.forEach((element) { - imgList.add(element); - }); - - Get.toNamed(AppRoutes.Swiper, - arguments: { - 'imaglist': imgList, - 'index': index - }); - }, - child: CachedNetworkImage( - imageUrl: user.images![index], - fit: BoxFit.cover, - width: Get.width, - height: screenHeight, - )); + child: PageView.builder( + //当页面选中后回调此方法 + //参数[index]是当前滑动到的页面角标索引 从0开始 + onPageChanged: (int index) { + print("当前的页面是 $index"); + // currentPage = index; }, - itemCount: user.images!.length, - ), + //值为flase时 显示第一个页面 然后从左向右开始滑动 + //值为true时 显示最后一个页面 然后从右向左开始滑动 + reverse: false, + //滑动到页面底部无回弹效果 + physics: BouncingScrollPhysics(), + //纵向滑动切换 + scrollDirection: Axis.horizontal, + //页面控制器 + // controller: pageController, + //所有的子Widget + itemBuilder: (BuildContext context, int index) { + return GestureDetector( + onTap: () { + List imgList = []; + user.images!.forEach((element) { + imgList.add(element); + }); + + Get.toNamed(AppRoutes.Swiper, + arguments: { + 'imaglist': imgList, + 'index': index + }); + }, + child: CachedNetworkImage( + imageUrl: user.images![index], + fit: BoxFit.cover, + width: Get.width, + height: screenHeight, + )); + },itemCount: user.images!.length,) + + // Swiper( + // autoplay: false, + // loop: user.images!.length == 1 + // ? false + // : true, + // itemBuilder: + // (BuildContext context, int index) { + // // print(index); + + // }, + // itemCount: user.images!.length, + // ), )), ), Positioned( @@ -433,7 +455,7 @@ class _DiscoverState extends State ], ), ), - if (user.both_cities!.isNotEmpty) + if (onLineStr!.isNotEmpty) SizedBox( height: 8.sp, ), @@ -1056,6 +1078,7 @@ class Users { String? nicknameNote; bool? online; String? openId; + String? online_flag; bool? partner; bool? is_follow; String? phoneNum; @@ -1084,6 +1107,7 @@ class Users { this.bgPicUrl, this.birthday, this.blacklist, + this.online_flag, this.city, this.both_interests, this.distance, @@ -1136,6 +1160,7 @@ class Users { vip = json['vip']; role = json['role']; auth = json['auth']; + online_flag = json['online_flag']; both_interests = json['both_interests'] ?? []; both_cities = json['both_cities'] ?? []; is_follow = json['is_follow']; diff --git a/circle_app/lib/app/circle/widgets/discover_item.dart b/circle_app/lib/app/circle/widgets/discover_item.dart new file mode 100644 index 0000000..1941a4e --- /dev/null +++ b/circle_app/lib/app/circle/widgets/discover_item.dart @@ -0,0 +1,695 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:get/get.dart'; +import 'package:gradient_borders/box_borders/gradient_box_border.dart'; + +import '../../../common/colors/app_color.dart'; +import '../../../common/const.dart'; +import '../../../network/api.dart'; +import '../../../network/dio_manager.dart'; +import '../../../router/app_routers.dart'; +import '../../../util/util.dart'; +import '../../chat/TIMUIKitChat/TIMUIKitMessageItem/TIMUIKitMessageReaction/tim_uikit_chat_gift_elem.dart'; +import '../../home/logic.dart'; +import 'discover.dart'; + + +class DiscoverItem extends StatefulWidget { + double screenHeight; + Function deleteCallBack; + Function likeCallBack; + List list; + int index; + String onLineStr; + + DiscoverItem(this.screenHeight,this.list,this.index,this.onLineStr,this.deleteCallBack,this.likeCallBack, {super.key}); + + + // screenHeight + @override + _DiscoverItemState createState() => new _DiscoverItemState(); + +} + +class _DiscoverItemState extends State { + // TODO: add state variables and methods + var user; + String onLineStr = ''; + HomeLogic logic = Get.find(); + + @override + void initState() { + // TODO: implement initState + super.initState(); + user = Users.fromJson(widget.list[widget.index]); + onLineStr= widget.onLineStr; + } + + @override + Widget build(BuildContext context) { + // TODO: add widget build method + return Container( + height: widget.screenHeight, + width: Get.width, + margin: EdgeInsets.only( + top: 5.sp, left: 16.sp, right: 16.sp), + child: Stack( + children: [ + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.black.withOpacity(0.25), + borderRadius: BorderRadius.circular(10.sp), + border: GradientBoxBorder( + gradient: + AppColor.mainVerLinearGradient, + width: 1.sp, + ), + // image: DecorationImage( + // fit: BoxFit.fill, + // image: AssetImage( + // getCircleImage('open_vip_bg'), + // )) + ), + height: widget.screenHeight, + width: Get.width, + child: ClipRRect( + borderRadius: BorderRadius.circular(10), + // clipBehavior: Clip.hardEdge, + child: Container( + // padding: EdgeInsets.all(2.sp), + child: Swiper( + autoplay: false, + loop: user.images!.length == 1 + ? false + : true, + itemBuilder: + (BuildContext context, int index) { + // print(index); + return GestureDetector( + onTap: () { + List imgList = []; + user.images!.forEach((element) { + imgList.add(element); + }); + + Get.toNamed(AppRoutes.Swiper, + arguments: { + 'imaglist': imgList, + 'index': index + }); + }, + child: CachedNetworkImage( + imageUrl: user.images![index], + fit: BoxFit.cover, + width: Get.width, + height:widget.screenHeight, + )); + }, + itemCount: user.images!.length, + ), + )), + ), + Positioned( + left: 5.sp, + top: 10.sp, + child: Container( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + 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( + onLineStr, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp), + ), + ], + ), + ), + if (user.both_cities!.isNotEmpty) + SizedBox( + height: 8.sp, + ), + if (user.both_cities!.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 (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), + ), + ], + )), + ], + ), + )), + Positioned( + right: 16.sp, + top: 16.sp, + child: GestureDetector( + onTap: () { + Get.toNamed(AppRoutes.UserInfoActivity, + arguments: user.userId!.toString()); + }, + child: Container( + width: 73.sp, + height: 25.sp, + decoration: BoxDecoration( + gradient: + AppColor.mainVerLinearGradient, + borderRadius: + BorderRadius.circular(12.5.sp)), + child: Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.only(left: 5.sp), + child: Text( + '查看主页', + style: TextStyle( + color: Colors.white, + fontSize: 10.sp, + ), + ), + ), + Image( + width: 15.sp, + image: AssetImage( + getDisCoverImage("right_icon")), + // width: 44.sp, + ), + ], + ), + ), + )), + + Positioned( + left: 6.sp, + bottom: 6.sp, + child: Container( + width: Get.width - 32.sp, + padding: EdgeInsets.only(right: 0.sp), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + if (user.wxNum != null && logic.isProd) + wxStatusWidget( + user.unLockWxNum == 1, + user.wxNum!, + user.userId.toString(), + user.avatarUrl!, () { + loadSignDiscoverData( + user.userId.toString()); + }), + SizedBox( + height: 15.sp, + ), + Row( + children: [ + Text( + user.nickname ?? '', + style: TextStyle( + fontSize: 18.sp, + color: Color(0XFFF7FAFA), + fontWeight: FontWeight.bold), + ), + Container( + 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: [ + Color(0xff8DFFF8), + Color(0xffB5D3FF) + ])), + child: Text( + getAgeCOntent( + user!.gender ?? 0, + user!.age ?? 0, + user!.role ?? 0, + user!.orientation ?? 0), + style: TextStyle( + color: Colors.black, + fontSize: 12.sp, + ), + ), + ), + if (user.vip! > 0) + Container( + margin: EdgeInsets.only( + left: 4.sp, + ), + child: Image.asset( + getCircleImage(user!.vip == 1 + ? 'vip' + : 'year_vip'), + width: 36.sp, + ), + ), + ], + ), + Container( + width: Get.width - 120.sp, + margin: EdgeInsets.only( + top: 15.sp, bottom: 15.sp), + child: Text( + user.signature! ?? '', + overflow: TextOverflow.ellipsis, + maxLines: + (user.signature! ?? '').length > + 15 + ? 2 + : 1, + style: TextStyle( + fontSize: 16.sp, + color: const Color(0XFFF7FAFA)), + ), + ), + Container( + width: Get.width - 110.sp, + height: 35.sp, + child: tagItem(user.interests!), + ), + ], + ), + )), + Positioned( + bottom: 5.sp, + right: 15.sp, + child: Container( + child: Column( + children: [ + GestureDetector( + onTap: () async { + showGiftPannel(user.imAccid!.toString()); + }, + child: Image.asset( + getMsgImage('gift'), + width: 50.sp, + ), + ), + SizedBox( + height: 25.sp, + ), + GestureDetector( + onTap: () { + pushChatPage( + user.userId.toString(), + user.imAccid!.toString(), + user.nickname!); + }, + child: Image.asset( + getCircleImage( + 'chat_icon', + ), + width: 50.sp, + ), + ), + SizedBox( + height: 25.sp, + ), + GestureDetector( + onTap: () { + widget.likeCallBack(); + }, + child: Image.asset( + getCircleImage( + user.is_follow! + ? 'like_icon' + : 'nor_like_icon', + ), + width: 50.sp, + ), + ), + SizedBox( + height: 20.sp, + ), + GestureDetector( + onTap: () { + _showReportDialog(context, + user.userId!.toString(), widget.index); + }, + child: Image.asset( + getCircleImage( + 'no_look_icon', + ), + width: 50.sp, + ), + ) + ], + ), + )) + ], + )); + } + + + void _showReportDialog( + BuildContext context, String userId, int currentIndex) { + showDialog( + context: context, + builder: (BuildContext context) { + return Dialog( + backgroundColor: Colors.transparent, + child: Container( + height: 277.sp, + padding: const EdgeInsets.all(1.0), + child: Stack( + children: [ + Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(10.0), + gradient: const LinearGradient( + colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + ), + Container( + margin: EdgeInsets.all(1.sp), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(10.0), + gradient: const LinearGradient( + colors: [Color(0xFF4C3E5F), Color(0xFF324140)], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + ), + Container( + margin: EdgeInsets.only(top: 24.sp), + child: Column( + children: [ + Center( + child: Text( + "温馨提示", + style: + TextStyle(color: Colors.white, fontSize: 16.sp), + ), + ), + Container( + margin: EdgeInsets.only(top: 14.sp), + alignment: Alignment.center, + child: Image( + image: AssetImage(getCircleImage("no_look_icon_h")), + width: 70.sp, + height: 70.sp, + ), + ), + Container( + margin: EdgeInsets.only( + top: 12.sp, left: 14.sp, right: 14.sp), + alignment: Alignment.center, + child: Text( + "您确认对TA不感兴趣吗?确认之后在这个板块就看不见TA了。", + textAlign: TextAlign.center, + style: TextStyle( + color: const Color(0xCCF7FAFA), fontSize: 16.sp), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Container( + margin: EdgeInsets.only(top: 24.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17), + gradient: const LinearGradient( + colors: [ + Color(0x26FFFFFF), + Color(0x26FFFFFF), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + padding: EdgeInsets.only( + top: 10.sp, + bottom: 10.sp, + left: 27.sp, + right: 27.sp), + child: const Text( + "再考虑考虑", + style: TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ), + ), + SizedBox(width: 24.sp), + GestureDetector( + onTap: () { + Get.back(); + sendNoLookData(userId, currentIndex); + }, + child: Container( + margin: EdgeInsets.only(top: 24.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17), + gradient: const LinearGradient( + colors: [ + Color(0xFF06F9FA), + Color(0xFFDC5BFD), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + padding: EdgeInsets.only( + top: 10.sp, + bottom: 10.sp, + left: 52.sp, + right: 52.sp), + child: const Text( + "确定", + style: TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ), + ) + ], + ) + ], + ), + ) + ], + ), + ), + ); + }, + ); + } + + void sendNoLookData(String userId, int index) async { + var data = await DioManager.instance.post(url: Api.uninterested + userId); + if (data['code'] == 200) { + showOKToast('操作成功'); + // widget.list.removeAt(index); + widget.deleteCallBack(); + // setState(() {}); + } + } + + + loadSignDiscoverData(String userId) async { + try { + var result = await DioManager.instance + .get(url: Api.getFindPageUserByUserId, params: { + 'userId': userId, + 'lat': '0', + 'lng': '0', + }); + + int initIndex = 0; + widget.list.forEach((element) { + if (element['id'].toString() == userId) { + initIndex = widget.list.indexOf(element); + } + }); + + widget.list[initIndex] = result['data']; + setState(() {}); + } catch (e) {} + } + + + tagItem(List item) { + return Container( + width: Get.width, + margin: EdgeInsets.only(top: 5.sp, bottom: 5.sp), + // color: Colors.red, + // height: 45.sp, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: item.length, + itemBuilder: (context, index) { + return tagWidget(item[index]['title'], item[index]['id']); + }), + ); + } + + tagWidget(String tagName, int id) { + return GestureDetector( + onTap: () { + Get.toNamed(AppRoutes.Signal_circle_list, arguments: id); + }, + child: Container( + margin: EdgeInsets.only(right: 6.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17.0), + gradient: const LinearGradient( + colors: [ + Color(0xFF06F9FA), + Color(0xFFDC5BFD), + ], + ), + color: const Color(0xFF392D53), + ), + child: Container( + margin: EdgeInsets.all(0.2.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17.0), + color: const Color(0xFF392D53), + ), + child: Padding( + padding: EdgeInsets.only( + top: 2.sp, + bottom: 2.sp, + left: 10.sp, + right: 10.sp, + ), + child: Center( + child: Text( + tagName, + style: const TextStyle( + fontSize: 11.0, + color: Colors.white, + ), + ), + ), + ), + ), + ), + ); + } + +} diff --git a/circle_app/lib/app/circle/widgets/vicinity.dart b/circle_app/lib/app/circle/widgets/vicinity.dart index f672de0..a07fde9 100644 --- a/circle_app/lib/app/circle/widgets/vicinity.dart +++ b/circle_app/lib/app/circle/widgets/vicinity.dart @@ -69,7 +69,7 @@ class _VicinityState extends State with AutomaticKeepAliveClientMixin controller: widget.logic.refreshController, onRefresh: _onRefresh, onLoading: _onLoading, - enablePullUp: widget.logic.myVip == 0 ? false : true, + enablePullUp: true, child: ListView.builder( controller: _scrollController, padding: EdgeInsets.all(10.sp), @@ -78,17 +78,17 @@ class _VicinityState extends State with AutomaticKeepAliveClientMixin if (index == 0) { return bannerView(widget.logic); } else { - if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) { - // return; - return Stack( - children: [ - ListItem(widget.logic.vicinityList[index - 1], index - 1), - showVipView() - ], - ); - } else { + // if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) { + // // return; + // return Stack( + // children: [ + // ListItem(widget.logic.vicinityList[index - 1], index - 1), + // showVipView() + // ], + // ); + // } else { return ListItem(widget.logic.vicinityList[index - 1], index - 1); - } + // } } }, ), @@ -172,79 +172,115 @@ class _VicinityState extends State with AutomaticKeepAliveClientMixin Widget showVipView() { return Container( - margin: EdgeInsets.only(top: 10.sp), - child: Stack( - children: [ - Positioned( - bottom: 0, - child: Container( - color: Colors.black, - width: Get.width, - height: 100.sp, - padding: EdgeInsets.symmetric(vertical: 25.sp), - )), - Container( - width: Get.width, - // margin: EdgeInsets.only(top: 10.sp), - color: Colors.black.withOpacity(0.87), - padding: EdgeInsets.symmetric(vertical: 25.sp, horizontal: 20.sp), - child: Column( - children: [ - Center( - child: Text( - "VIP特权", - style: TextStyle(color: Colors.white, fontSize: 16.sp), - ), - ), - Container( - padding: EdgeInsets.only(top: 18.sp), - child: Text( - "开通VIP后,才能查看更多附近的圈友,也可以根据您的喜好、属性、角色、取向等筛选出想要认识的人,还可以获得其他十几种会员特权,拥有更多不一样的体验", - style: TextStyle(color: Colors.white, fontSize: 14.sp), - ), - ), - GestureDetector( - onTap: () async { - widget.logic.showRechargeDialog(); - }, - child: Center( - child: Container( - margin: EdgeInsets.only(top: 14.sp), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(17), - gradient: const LinearGradient( - colors: [ - Color(0xFF06F9FA), - Color(0xFFDC5BFD), - ], - begin: Alignment.centerLeft, - end: Alignment.centerRight, - ), - ), - padding: EdgeInsets.symmetric( - vertical: 10.sp, - horizontal: 55.sp, - ), - child: const Text( - "前往开通VIP", - style: TextStyle( - color: Colors.white, - fontSize: 12, - ), + width: Get.width, + height: 200.sp, + // margin: EdgeInsets.only(top: 10.sp), + + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.sp), + color: Colors.black.withOpacity(0.87), + ), + margin: EdgeInsets.only(left: 15.sp,right: 15.sp), + padding: EdgeInsets.symmetric(vertical: 15.sp, horizontal: 20.sp), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Center( + child: Text( + "VIP特权", + style: TextStyle(color: Colors.white, fontSize: 16.sp), + ), + ), + Container( + padding: EdgeInsets.only(top: 18.sp), + child: Text( + "开通VIP后,才能查看更多附近的圈友,也可以根据您的喜好、属性、角色、取向等筛选出想要认识的人,还可以获得其他十几种会员特权,拥有更多不一样的体验", + style: TextStyle(color: Colors.white, fontSize: 14.sp), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + GestureDetector( + onTap: () { + Get.back(); + }, + child: Container( + // height: 40.sp, + // width: 120.sp, + margin: EdgeInsets.only(top: 14.sp), + alignment: Alignment.center, + padding: EdgeInsets.symmetric( + vertical: 10.sp, + horizontal: 30.sp, + ), + decoration: BoxDecoration( + color: Colors.grey.withOpacity(0.7), + borderRadius: BorderRadius.circular(20), + ), + child: Text( + '再考虑考虑', + style: TextStyle( + color: Colors.white.withOpacity(0.6), + fontSize: 12, + fontWeight: FontWeight.w500), + )), + ), + GestureDetector( + onTap: () async { + Get.back(); + widget.logic.showRechargeDialog(); + }, + child: Center( + child: Container( + margin: EdgeInsets.only(top: 14.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17), + gradient: const LinearGradient( + colors: [ + Color(0xFF06F9FA), + Color(0xFFDC5BFD), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, ), ), - )) - ], - )), - ], - ), - ); + padding: EdgeInsets.symmetric( + vertical: 10.sp, + horizontal: 30.sp, + ), + child: const Text( + "前往开通VIP", + style: TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ), + )), + ], + ) + ], + )); } Widget ListItem(VicinityItemBean item, int index) { return GestureDetector( onTap: () { - Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString()); + if (index < 5) { + Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString()); + } else { + if (widget.logic + .myVip > 0) { + Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString()); + } else { + Get.bottomSheet(Scaffold(backgroundColor: Colors.transparent,body: Center( + child: showVipView(), + ),),isScrollControlled: true,backgroundColor: Colors.transparent,barrierColor: Colors.black.withOpacity(0.6)); + } + } + + }, child: Container( margin: EdgeInsets.only(top: 10.sp), diff --git a/circle_app/lib/app/home/logic.dart b/circle_app/lib/app/home/logic.dart index 659ca62..e936c8b 100644 --- a/circle_app/lib/app/home/logic.dart +++ b/circle_app/lib/app/home/logic.dart @@ -332,32 +332,32 @@ class HomeLogic extends GetxController with WidgetsBindingObserver { data['data']['account_id'].toString(), data['data']['user_sig']); accountId = data['data']['account_id'].toString(); - SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); - var date = DateTime.now(); - var date2 = '${date.year}-${date.month}-${date.day}-${accountId}'; - String firspop = 'firspop-${accountId}'; - if (sp.preferences!.containsKey(firspop)) { - var lastDate = sp.preferences!.getString(firspop); - if (lastDate != date2) { - Future.delayed(Duration(seconds: 15), () { - if (Get.currentRoute != AppRoutes.Login) { - sp.preferences!.setString(firspop, date2); - Get.bottomSheet(TodayPeopleDialog(), isScrollControlled: true, - enableDrag: false,); - } - }); - } - } else { - Future.delayed(Duration(seconds: 15), () { - if (Get.currentRoute != AppRoutes.Login) { - sp.preferences!.setString(firspop, date2); - Get.bottomSheet(TodayPeopleDialog(),isScrollControlled: true, - enableDrag: false,); - } - }); - - - } + // SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); + // var date = DateTime.now(); + // var date2 = '${date.year}-${date.month}-${date.day}-${accountId}'; + // String firspop = 'firspop-${accountId}'; + // if (sp.preferences!.containsKey(firspop)) { + // var lastDate = sp.preferences!.getString(firspop); + // if (lastDate != date2) { + // Future.delayed(Duration(seconds: 15), () { + // if (Get.currentRoute != AppRoutes.Login) { + // sp.preferences!.setString(firspop, date2); + // Get.bottomSheet(TodayPeopleDialog(), isScrollControlled: true, + // enableDrag: false,); + // } + // }); + // } + // } else { + // Future.delayed(Duration(seconds: 15), () { + // if (Get.currentRoute != AppRoutes.Login) { + // sp.preferences!.setString(firspop, date2); + // Get.bottomSheet(TodayPeopleDialog(),isScrollControlled: true, + // enableDrag: false,); + // } + // }); + // + // + // } } } diff --git a/circle_app/lib/app/invite/share.dart b/circle_app/lib/app/invite/share.dart index a9f5183..daf79d0 100644 --- a/circle_app/lib/app/invite/share.dart +++ b/circle_app/lib/app/invite/share.dart @@ -262,13 +262,10 @@ class _ShareState extends State { shareAction('wxq', '朋友圈', () { shareWxData(2); }), - shareAction('qq', 'QQ', () { + shareAction('save', '复制邀请链接', () { copyInviteText(logic.name); }), - shareAction('wb', '微博', () { - copyInviteText(logic.name); - }), - shareAction('hb', '保存海报', () { + shareAction('hb', '保存邀请海报', () { _saveLocalImage(); }), ], diff --git a/circle_app/lib/app/login/complete_material/logic.dart b/circle_app/lib/app/login/complete_material/logic.dart index dee0de2..5dd6363 100644 --- a/circle_app/lib/app/login/complete_material/logic.dart +++ b/circle_app/lib/app/login/complete_material/logic.dart @@ -293,6 +293,41 @@ class Complete_materialLogic extends GetxController { } + if (state.wxEditingController.text.isNotEmpty) { + bool isPass = false; + if (state.wxEditingController.text.length == 11) { + RegExp exp = RegExp( + r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$'); + isPass = exp.hasMatch(state.wxEditingController.text); + } + + if (state.wxEditingController.text.isNotEmpty && !isPass) { + RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$'); + if (!wxReg.hasMatch(state.wxEditingController.text)) { + showOKToast('请输入正确的微信号'); + return; + } + } + + if (wxStatusInfo.containsKey('4000')) { + showOKToast(wxStatusInfo['40000']); + return; + } + + var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text}); + if (result['code'] == 31201) { + // showToast. + showOKToast(result['msg']); + showRechargeScreenDialog(); + return; + } else if (result['code'] == 200) { + if (wxStatusInfo.containsKey('32100')) { + showOKToast(wxStatusInfo['32100']); + } + } + print(result); + } + var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: { 'avatar_url': headUrl, 'birthday': state.brithday, @@ -332,9 +367,9 @@ class Complete_materialLogic extends GetxController { showOKToast('请选择您的常驻城市'); return; } else if (state.role.isEmpty) { - showOKToast('请选择您的角色'); + showOKToast('请选择您的属性'); return; - } else if (state.role.isEmpty) { + } else if (state.sex.isEmpty) { showOKToast('请选择您的角色'); return; } else if (state.orientation.isEmpty) { diff --git a/circle_app/lib/app/login/complete_material/view.dart b/circle_app/lib/app/login/complete_material/view.dart index fb379e5..3b664d0 100644 --- a/circle_app/lib/app/login/complete_material/view.dart +++ b/circle_app/lib/app/login/complete_material/view.dart @@ -145,7 +145,7 @@ class _Complete_materialPageState extends State { ), () {}, img: 'edit'), - if (isShowWx) + // if (isShowWx) funcWidget( '微信', TextField( @@ -180,6 +180,7 @@ class _Complete_materialPageState extends State { fontSize: 14.sp, fontWeight: FontWeight.w500), ), () { + showOKToast('为了确保角色的真实性,选错了需联系客服更正'); showSexPiker(context, controller); }), funcWidget( diff --git a/circle_app/lib/app/my_assets/view.dart b/circle_app/lib/app/my_assets/view.dart index cb77bbd..41f4c34 100644 --- a/circle_app/lib/app/my_assets/view.dart +++ b/circle_app/lib/app/my_assets/view.dart @@ -115,7 +115,7 @@ class My_assetsPage extends StatelessWidget { Container( margin: EdgeInsets.only(right: 15.sp), child: Text( - "收入金额", + "收入余额", style: TextStyle( color: Colors.white, fontSize: 13.sp), @@ -170,7 +170,6 @@ class My_assetsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "${logic.myAssest!.balance!}小票", style: TextStyle( color: Colors.white, @@ -185,7 +184,7 @@ class My_assetsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "${logic.myAssest!.incomeBalance!}小票", + "${(logic.myAssest!.incomeBalance! * 0.01).toStringAsFixed(2)}元", style: TextStyle( color: Colors.white, fontSize: 18.sp), @@ -213,12 +212,13 @@ class My_assetsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "总充值", + "总收入", style: TextStyle( color: Colors.white, fontSize: 14.sp), ), - Text("${logic.myAssest!.totalRechargeBalance!}小票", + Text( + "${(logic.myAssest!.totalIncomeBalance! * 0.01).toStringAsFixed(2)}元", style: TextStyle( color: Colors.white, fontSize: 14.sp), @@ -237,13 +237,12 @@ class My_assetsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - "总收入", + "总充值/奖励", style: TextStyle( color: Colors.white, fontSize: 14.sp), ), - Text( - "${logic.myAssest!.totalIncomeBalance!}小票", + Text("${logic.myAssest!.totalRechargeBalance!}小票", style: TextStyle( color: Colors.white, fontSize: 14.sp), @@ -256,6 +255,7 @@ class My_assetsPage extends StatelessWidget { width: 1.sp, color:Color(0x4DFFFFFF), ), + Expanded( flex: 1, child: Column( diff --git a/circle_app/lib/common/Widgets/circle_share.dart b/circle_app/lib/common/Widgets/circle_share.dart index 9c959de..fa4f40a 100644 --- a/circle_app/lib/common/Widgets/circle_share.dart +++ b/circle_app/lib/common/Widgets/circle_share.dart @@ -353,13 +353,10 @@ class _CircleShareState extends State { shareAction('wxq', '朋友圈', () { shareWxData(2); }), - shareAction('qq', 'QQ', () { + shareAction('save', '复制邀请链接', () { copyInviteText(logic.name); }), - shareAction('wb', '微博', () { - copyInviteText(logic.name); - }), - shareAction('hb', '保存海报', () { + shareAction('hb', '保存邀请海报', () { _saveLocalImage(); }), ], diff --git a/circle_app/lib/common/Widgets/unlock_wx_tip.dart b/circle_app/lib/common/Widgets/unlock_wx_tip.dart index 4f5556b..5ca89d2 100644 --- a/circle_app/lib/common/Widgets/unlock_wx_tip.dart +++ b/circle_app/lib/common/Widgets/unlock_wx_tip.dart @@ -12,6 +12,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; +import '../const.dart'; import 'base_tip_widget.dart'; class UnlockWxTip extends StatefulWidget { @@ -51,7 +52,7 @@ class _UnlockWxTipState extends State { Container( margin: EdgeInsets.only(left: 20.sp,right: 20.sp), padding: EdgeInsets.all(15.sp), - height: !Platform.isIOS ? 440.sp : 350.sp, + height: !Platform.isIOS ? 440.sp : 410.sp, decoration: BoxDecoration( color: const Color(0xFF393949), borderRadius: BorderRadius.circular(10.sp) @@ -174,7 +175,7 @@ class _UnlockWxTipState extends State { } else { unlockingPayment(prices[selectedIndex].id.toString(), (){ Get.back(); - showOKToast('微信号解锁成功'); + checkMyUserStatus(); unLockWxSuccessResult(widget.userId); }); } diff --git a/circle_app/lib/common/const.dart b/circle_app/lib/common/const.dart index ff990cc..da5d17e 100644 --- a/circle_app/lib/common/const.dart +++ b/circle_app/lib/common/const.dart @@ -8,6 +8,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:oktoast/oktoast.dart'; +import '../app/userinfo/logic.dart'; + const bgAssetImage = DecorationImage( image: AssetImage('assets/images/base/bg.png'), fit: BoxFit.cover, @@ -24,7 +26,7 @@ wxStatusWidget(bool isUnclock, String wx, String userId, String avatarUrl, var result = await DioManager() .post(url: Api.UnlockWx, params: {'targetUserId': userId}); if (result['code'] == 200) { - showToast('解锁成功'); + checkMyUserStatus(); callBack(); } else { Get.bottomSheet(UnlockWxTip(userId, avatarUrl), @@ -90,3 +92,19 @@ wxStatusWidget(bool isUnclock, String wx, String userId, String avatarUrl, ), )); } + + +checkMyUserStatus() async { + var data = await DioManager.instance.get(url: Api.getUserInfo); + var bean = BaseResponse.fromJson( + data, (data) => ResponseBean.fromJson(data)); + + if (bean.isSuccess()) { + UserBean userInfoBean = bean.data.user; + if (userInfoBean.wx_num.isNotEmpty) { + showToast('已成功解锁TA的微信,快去和TA私聊呗~'); + } else { + showToast('你已成功解锁TA的微信,建议您也填写微信,方便对方快速找到您哦~'); + } + } +} \ No newline at end of file