diff --git a/circle_app/android/app/build.gradle b/circle_app/android/app/build.gradle index 689d4d6..7a71736 100644 --- a/circle_app/android/app/build.gradle +++ b/circle_app/android/app/build.gradle @@ -65,8 +65,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion - versionCode 4 - versionName "1.0.3" + versionCode 110 + versionName "1.1.0" manifestPlaceholders = [ vivo_APPID: "105669716", vivo_APPKEY:"84f750207787376b310ca5b0d5969122", diff --git a/circle_app/assets/province.json b/circle_app/assets/province.json index a03aa5f..b47ed12 100644 --- a/circle_app/assets/province.json +++ b/circle_app/assets/province.json @@ -1,9 +1,5 @@ [ - {"name": "全国", - "city": [{ - "name": "全国", - "area": ["全国"] - }]}, + { "name": "北京市", "city": [ diff --git a/circle_app/lib/app/circle/logic.dart b/circle_app/lib/app/circle/logic.dart index ef676b0..dfbc189 100644 --- a/circle_app/lib/app/circle/logic.dart +++ b/circle_app/lib/app/circle/logic.dart @@ -275,13 +275,12 @@ class CircleLogic extends GetxController { } catch (Exception) {} if (vicinityPage == 1) { + cityName = bean.data.city; vicinityList.clear(); } try{ vicinityList.addAll(bean.data.users); - } catch(Exception){ - - } + } on Exception{} if (vicinityPage == 1) { refreshController.refreshCompleted(); diff --git a/circle_app/lib/app/circle/view.dart b/circle_app/lib/app/circle/view.dart index 322a74b..1cdbc96 100644 --- a/circle_app/lib/app/circle/view.dart +++ b/circle_app/lib/app/circle/view.dart @@ -8,6 +8,7 @@ import 'package:circle_app/util/util.dart'; import 'package:flutter/material.dart'; import 'package:flutter_pickers/pickers.dart'; import 'package:flutter_pickers/style/default_style.dart'; +import 'package:flutter_pickers/style/picker_style.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:get/get.dart'; @@ -18,10 +19,8 @@ import '../select_circle/logic.dart'; import '../userinfo/logic.dart'; import 'logic.dart'; - const bgWidget = DecorationImage( -fit: BoxFit.fill, -image: AssetImage('assets/images/base/home_back.png')); + fit: BoxFit.fill, image: AssetImage('assets/images/base/home_back.png')); class CirclePage extends StatefulWidget { CirclePage({Key? key}) : super(key: key); @@ -76,9 +75,8 @@ class _CirclePageState extends State return Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, - decoration: const BoxDecoration( - color: Color(0xFF423055), - image: bgWidget), + decoration: + const BoxDecoration(color: Color(0xFF423055), image: bgWidget), child: Scaffold( backgroundColor: Colors.transparent, body: SafeArea( @@ -139,18 +137,20 @@ class _CirclePageState extends State controller: logic.refreshController, onRefresh: _onRefresh, onLoading: _onLoading, - enablePullUp: logic.myVip>0, + enablePullUp: logic.myVip > 0, child: ListView.builder( padding: EdgeInsets.all(10.sp), - itemCount: logic.myVip == 0 ? logic.vicinityList.length + 2 : logic.vicinityList.length + 1, + itemCount: logic.myVip == 0 + ? logic.vicinityList.length + 2 + : logic.vicinityList.length + 1, itemBuilder: (context, index) { if (index == 0) { return bannerView(controller); } else { - if (logic.myVip == 0 && index == logic.vicinityList.length+1) { + if (logic.myVip == 0 && index == logic.vicinityList.length + 1) { return showVipView(); } else { - return ListItem(logic.vicinityList[index-1], index-1); + return ListItem(logic.vicinityList[index - 1], index - 1); } } }, @@ -215,8 +215,8 @@ class _CirclePageState extends State Widget ListItem(VicinityItemBean item, int index) { return GestureDetector( - onTap: (){ - Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString()); + onTap: () { + Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString()); }, child: Container( margin: EdgeInsets.only(top: 10.sp), @@ -238,12 +238,14 @@ class _CirclePageState extends State topLeft: Radius.circular(10.sp), topRight: Radius.circular(10.sp), ), - child: item.images.length==0? Image( - image: AssetImage(getCircleImage("icon_list_null")), - width: Get.width, - fit: BoxFit.fill, - height: 92.sp, - ):Container(), + child: item.images.length == 0 + ? Image( + image: AssetImage(getCircleImage("icon_list_null")), + width: Get.width, + fit: BoxFit.fill, + height: 92.sp, + ) + : Container(), ), ), Column(children: [ @@ -278,16 +280,18 @@ class _CirclePageState extends State child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Container( - margin: EdgeInsets.only(top: 6.sp), child: Row( children: [ for (int i = 0; i < item.images.length; i++) GestureDetector( - onTap: (){ - Get.toNamed(AppRoutes.Swiper, - arguments: {'imaglist': item.images, 'index': i}); - }, + onTap: () { + Get.toNamed(AppRoutes.Swiper, + arguments: { + 'imaglist': item.images, + 'index': i + }); + }, child: ListAlbumItem(item.images[i], i)), ], ), @@ -314,36 +318,36 @@ class _CirclePageState extends State const Spacer(), Container( margin: EdgeInsets.only(right: 8.sp), - child:item.isOnline==1? Text( - "当前在线", - style: TextStyle( - color: const Color.fromRGBO(247, 250, 250, 1.0), - fontSize: 12.sp, - ), - ):Container(), + child: item.isOnline == 1 + ? Text( + "当前在线", + style: TextStyle( + color: + const Color.fromRGBO(247, 250, 250, 1.0), + fontSize: 12.sp, + ), + ) + : Container(), ), - - ], ), ), Container( height: 50.sp, // 设置固定高度 width: Get.width, - margin: EdgeInsets.symmetric( horizontal: 8.0), + margin: EdgeInsets.symmetric(horizontal: 8.0), child: Align( alignment: Alignment.centerLeft, // 文本左对齐,垂直居中 child: Text( item.signature, maxLines: 2, - style: TextStyle(color: Colors.white,fontSize: 14.sp), + style: TextStyle(color: Colors.white, fontSize: 14.sp), overflow: TextOverflow.ellipsis, ), ), ), - Container( - margin: EdgeInsets.only(left: 8.sp,right: 3.sp), + margin: EdgeInsets.only(left: 8.sp, right: 3.sp), child: _buildInterestsListView(item.interests)) ]), ], @@ -408,11 +412,9 @@ class _CirclePageState extends State ); } - - Widget _buildInfoRow(VicinityItemBean item) { - String ageMsg = getAgeCOntent(item!.gender, item!.age, - item!.role, item!.orientation); + String ageMsg = + getAgeCOntent(item!.gender, item!.age, item!.role, item!.orientation); return Row( children: [ Container( @@ -442,40 +444,44 @@ class _CirclePageState extends State ), ), const SizedBox(width: 6), - if (item.vip > 0) - Image( - image: AssetImage(getBaseImage(item.vip == 1 ? "vip" : 'year_vip')), - width: 44.sp, - height: 18.sp, - ), + if (item.vip > 0) + Image( + image: AssetImage(getBaseImage(item.vip == 1 ? "vip" : 'year_vip')), + width: 44.sp, + height: 18.sp, + ), ], ); } Widget ListAlbumItem(String item, int index) { return Container( - margin: EdgeInsets.symmetric(horizontal: 2.sp), - child: CachedNetworkImage( width: 88.sp, height: 88.sp, fit: BoxFit.cover, imageUrl: item+"?imageView2/1/w/176/h/176/q/75",), + margin: EdgeInsets.symmetric(horizontal: 2.sp), + child: CachedNetworkImage( + width: 88.sp, + height: 88.sp, + fit: BoxFit.cover, + imageUrl: item + "?imageView2/1/w/176/h/176/q/75", + ), ); } void _onRefresh() async { logic.vicinityPage = 1; logic.offset = 0; - logic.getNearByList(); - // logic.refreshController.refreshCompleted(); - + logic.getNearByList(); + // logic.refreshController.refreshCompleted(); } void _onLoading() async { - if(logic.myVip>0){ + if (logic.myVip > 0) { logic.vicinityPage = logic.vicinityPage + 1; + // logic.offset = 0; // logic.getNearByList(); - }else{ + } else { logic.refreshController.loadComplete(); } - } Widget bannerView(CircleLogic controller) { @@ -485,17 +491,14 @@ class _CirclePageState extends State child: Swiper( autoplay: logic.bannerList.length > 1, controller: logic.swiperController, - loop: logic.bannerList.length>1?true:false, + loop: logic.bannerList.length > 1 ? true : false, // index:logic.index, itemBuilder: (BuildContext context, int index) { - print(logic.bannerList[index].picUrl); + print(logic.bannerList[index].picUrl); return GestureDetector( onTap: () async { - print(logic.bannerList[index].param); - Get.toNamed(AppRoutes.WebViewActivity, arguments: { - 'title': "", - "url": logic.bannerList[index].param.toString() - }); + // print(logic.bannerList[index].param); + navigateToCustomRoute(logic.bannerList[index]); }, child: SizedBox( width: Get.width, @@ -528,16 +531,16 @@ class _CirclePageState extends State Widget circleList(CircleLogic controller) { return Swiper( itemBuilder: (BuildContext context, int index) { - var bean = logic.circle.lists[index]; - // final GlobalKey infoListViewKey = GlobalKey(); - return InfoListView(index, bean, logic); + var bean = logic.circle.lists[index]; + // final GlobalKey infoListViewKey = GlobalKey(); + return InfoListView(index, bean, logic); }, onIndexChanged: (index) { - controller.state.index = index; - if (index == logic.circle.lists.length - 1) { - logic.loadMore(); - } - print(index.toString()); + controller.state.index = index; + if (index == logic.circle.lists.length - 1) { + logic.loadMore(); + } + print(index.toString()); }, index: controller.state.index, itemCount: logic.circle.lists.length, @@ -590,23 +593,67 @@ class _CirclePageState extends State left: 0, child: GestureDetector( onTap: () { - Get.toNamed(AppRoutes.VisitorListActivity); + Get.toNamed(AppRoutes.Invite); }, - child: SizedBox( - width: 30.sp * widgets.length, - height: 44.sp, - child: Stack( - alignment: Alignment.centerLeft, - children: widgets, + child: Container( + 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.6.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(17.0), + color: const Color(0xFF392D53), + ), + child: Padding( + padding: EdgeInsets.only( + top: 5.sp, + bottom: 4.sp, + left: 8.sp, + right: 8.sp, + ), + child: const Center( + child: Text( + "邀请得会员", + style: TextStyle( + fontSize: 11, + color: Colors.white, + ), + ), + ), + ), ), ), - ), - ) + )) + + // Positioned( + // left: 0, + // child: GestureDetector( + // onTap: () { + // Get.toNamed(AppRoutes.VisitorListActivity); + // }, + // child: SizedBox( + // width: 30.sp * widgets.length, + // height: 44.sp, + // child: Stack( + // alignment: Alignment.centerLeft, + // children: widgets, + // ), + // ), + // ), + // ) : GestureDetector( - onTap: (){ - showCityPiker(context); - }, - child: Row( + onTap: () { + showCityPiker(context); + }, + child: Row( children: [ Image.asset( getCircleImage('icon_city'), @@ -615,13 +662,13 @@ class _CirclePageState extends State Container( margin: EdgeInsets.only(left: 4.sp, top: 4.sp), child: Text( - logic.cityName, + modifyCityName(logic.cityName), style: TextStyle(color: Colors.white, fontSize: 16.sp), )) ], ), - ), + ), Container( alignment: Alignment.center, //padding: EdgeInsets.symmetric(horizontal: 10.sp), @@ -633,7 +680,7 @@ class _CirclePageState extends State TabBar( isScrollable: true, controller: _tabController, - labelPadding: EdgeInsets.symmetric(horizontal: 13.0), + labelPadding: EdgeInsets.symmetric(horizontal: 13.0), indicator: UnderlineTabIndicator( borderSide: BorderSide( color: const Color(0xFF00FFF4), @@ -653,7 +700,6 @@ class _CirclePageState extends State '发现', style: TextStyle( fontSize: 18.sp, - ), ), ), @@ -662,7 +708,6 @@ class _CirclePageState extends State '附近', style: TextStyle( fontSize: 18.sp, - ), ), ), @@ -675,17 +720,16 @@ class _CirclePageState extends State color: const Color(0xFFF657FF).withOpacity(0.5), offset: Offset(0, -2), // 阴影偏移 blurRadius: 3, // 阴影模糊半径 - // spreadRadius: 0 - + // spreadRadius: 0 ), ], ), unselectedLabelStyle: TextStyle( - // color: const Color(0xB3FFFFFF), + // color: const Color(0xB3FFFFFF), fontSize: 18.sp, shadows: [ Shadow( - // color: const Color(0xFFF657FF), + // color: const Color(0xFFF657FF), offset: const Offset(0, -1), blurRadius: 3.0.sp, ), @@ -729,57 +773,15 @@ class _CirclePageState extends State Positioned( right: 0, child: logic.isShowCircle - ? - GestureDetector( - onTap: (){ - Get.toNamed(AppRoutes.Invite); - }, - child: Container( - 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.6.sp), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(17.0), - color: const Color(0xFF392D53), - ), - child: Padding( - padding: EdgeInsets.only( - top: 5.sp, - bottom: 4.sp, - left: 15.sp, - right: 15.sp, + ? GestureDetector( + onTap: () { + Get.toNamed(AppRoutes.MyCircle, arguments: ''); + }, + child: Image.asset( + getCircleImage('my_circle'), + width: 64.sp, ), - child: const Center( - child: Text( - "邀请得会员", - style: TextStyle( - fontSize: 11, - color: Colors.white, - ), - ), - ), - ), - ), - ), - ) - // GestureDetector( - // onTap: () { - // Get.toNamed(AppRoutes.MyCircle, arguments: ''); - // }, - // child: Image.asset( - // getCircleImage('my_circle'), - // width: 64.sp, - // ), - // ) + ) : GestureDetector( onTap: () { _showBottomSheet(context); @@ -805,8 +807,7 @@ class _CirclePageState extends State orientationList: logic.orientationList, roleList: logic.roleList, callback: (genderList, orientationList, roleList) { - logic.offset = 0; - logic.getNearByList(); + _onRefresh(); }, ); // Use your custom widget here }, @@ -1037,32 +1038,87 @@ class _CirclePageState extends State ); } - showCityPiker(context) { Pickers.showMultiLinkPicker(context, - pickerStyle: DefaultPickerStyle.dark(), data: logic.cityMap, columeNum: 2, - onConfirm: (List res, List position){ - print(res); - // print(logic.cityMap[res[0]][res[1]][0]); - // controller.state.city = controller.cityMap[res[0]][res[1]][0]; - // logic.state.city = res[1]; - logic.cityName = res[1]; + pickerStyle: DefaultPickerStyle.dark(), + data: logic.cityMap, + columeNum: 2, onConfirm: (List res, List position) { + print(res); + // print(logic.cityMap[res[0]][res[1]][0]); + // controller.state.city = controller.cityMap[res[0]][res[1]][0]; + // logic.state.city = res[1]; + logic.cityName = res[1]; - logic.offset = 0; - logic.getNearByList(); - // logic.getSuccess(); - // logic.update(); - } + _onRefresh(); + // logic.getSuccess(); + // logic.update(); + } - // onConfirm:(String province, String city, String? town){ - // controller.state.role = city; - // controller.update(); - // - // } + // onConfirm:(String province, String city, String? town){ + // controller.state.role = city; + // controller.update(); + // + // } - ); + ); } + String modifyCityName(String cityName) { + if (cityName.endsWith("市")) { + cityName = cityName.substring(0, cityName.length - 1); + } + if (cityName.length > 4) { + cityName = cityName.substring(0, 4) + "..."; + } + return cityName; + } +} + +class DefaultPickerStyle extends PickerStyle { + DefaultPickerStyle({bool haveRadius: false, String? title}) { + if (haveRadius) { + this.headDecoration = BoxDecoration( + color: Colors.white, + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(10), topRight: Radius.circular(10))); + } + if (title != null && title != '') { + this.title = Center( + child: + Text(title, style: TextStyle(color: Colors.grey, fontSize: 14))); + } + } + + /// 夜间 + DefaultPickerStyle.dark({bool haveRadius: false, String? title}) { + this.commitButton = Container( + alignment: Alignment.center, + padding: const EdgeInsets.only(left: 12, right: 22), + child: Text('确定', style: TextStyle(color: Colors.white, fontSize: 16.0)), + ); + + this.cancelButton = Container( + alignment: Alignment.center, + padding: const EdgeInsets.only(left: 22, right: 12), + child: Text('取消', style: TextStyle(color: Colors.white, fontSize: 16.0)), + ); + + this.headDecoration = BoxDecoration( + color: Color(0xFF4A3E5D), + borderRadius: !haveRadius + ? null + : BorderRadius.only( + topLeft: Radius.circular(10), topRight: Radius.circular(10))); + + if (title != null && title != '') { + this.title = Center( + child: + Text(title, style: TextStyle(color: Colors.white, fontSize: 14))); + } + + this.backgroundColor = Color(0xFF4A3E5D)!; + this.textColor = Colors.white; + } } diff --git a/circle_app/lib/app/home/logic.dart b/circle_app/lib/app/home/logic.dart index 1a5917c..4d07e32 100644 --- a/circle_app/lib/app/home/logic.dart +++ b/circle_app/lib/app/home/logic.dart @@ -68,7 +68,9 @@ class HomeLogic extends GetxController { if (sender.userID == "qpqz_dev_10_10000000000" || sender.userID == "qpqz_prod_10_10000000000") { - + if(customData.isEmpty){ + return; + } print("123123123123"+customData); Map jsonData = json.decode(customData); diff --git a/circle_app/lib/app/home/view.dart b/circle_app/lib/app/home/view.dart index b9c936a..25630bd 100644 --- a/circle_app/lib/app/home/view.dart +++ b/circle_app/lib/app/home/view.dart @@ -26,49 +26,40 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin super.build(context); return GetBuilder(builder: (HomeLogic controller) { - return GestureDetector( - onTap: () { - controller.onReady(); - // Get.toNamed(AppRoutes.Complete_materialPage); - }, - child: ExitAppConfirmation(child: Stack(children: [ - Scaffold( - resizeToAvoidBottomInset: false, - // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), - bottomNavigationBar: Container( - height: 49.sp + MediaQuery.of(context).padding.bottom, - width: Get.width, - // color: Colors.red, - padding: EdgeInsets.only(left: 50.sp, right: 50.sp), - decoration: BoxDecoration( - color: const Color(0xFF423055), - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage( - getTabbarImage('tabbar_bg'), - ))), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - funcItem(0, 'msg', 0 == controller.currentIndex, controller), - funcItem(1, 'circle', 1 == controller.currentIndex, controller), - funcItem(2, 'mine', 2 == controller.currentIndex, controller), - ], - ), - ), - body: PageView( - physics: const NeverScrollableScrollPhysics(), - controller: controller.pageController, - onPageChanged: (int index) { - // controller.updateIndex(index); - }, - children: controller.tabs, - ), + return ExitAppConfirmation(child: Scaffold( + resizeToAvoidBottomInset: false, + // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), + bottomNavigationBar: Container( + height: 49.sp + MediaQuery.of(context).padding.bottom, + width: Get.width, + // color: Colors.red, + padding: EdgeInsets.only(left: 50.sp, right: 50.sp), + decoration: BoxDecoration( + color: const Color(0xFF423055), + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage( + getTabbarImage('tabbar_bg'), + ))), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + funcItem(0, 'msg', 0 == controller.currentIndex, controller), + funcItem(1, 'circle', 1 == controller.currentIndex, controller), + funcItem(2, 'mine', 2 == controller.currentIndex, controller), + ], ), - - ],),) - ); + ), + body: PageView( + physics: const NeverScrollableScrollPhysics(), + controller: controller.pageController, + onPageChanged: (int index) { + // controller.updateIndex(index); + }, + children: controller.tabs, + ), + ),); }); } diff --git a/circle_app/lib/app/invite/view.dart b/circle_app/lib/app/invite/view.dart index 7a0fc36..4acdf1d 100644 --- a/circle_app/lib/app/invite/view.dart +++ b/circle_app/lib/app/invite/view.dart @@ -40,6 +40,9 @@ class InvitePage extends StatelessWidget { child: Image.asset(getMineImage('invite_right_icon'), ), ), + onPressed: (){ + navigateToInviteStrategy(); + }, ), body: GetBuilder(builder: (logic) { List peopleCountList = []; diff --git a/circle_app/lib/app/minefragment/view.dart b/circle_app/lib/app/minefragment/view.dart index 93fafb8..b64a86c 100644 --- a/circle_app/lib/app/minefragment/view.dart +++ b/circle_app/lib/app/minefragment/view.dart @@ -64,12 +64,12 @@ class MinefragmentPage extends StatelessWidget { child: Stack(children: [ MyImageWidget, Positioned( - top: 58.sp, - left: 90.sp, + top: 54.sp, + left: 72.sp, child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)), Positioned( - top: 32.sp, - left: 90.sp, + top: 26.sp, + left: 70.sp, child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),)) ],), ), diff --git a/circle_app/lib/app/userinfo/view.dart b/circle_app/lib/app/userinfo/view.dart index 4895eb5..758a56a 100644 --- a/circle_app/lib/app/userinfo/view.dart +++ b/circle_app/lib/app/userinfo/view.dart @@ -8,6 +8,7 @@ import 'package:get/get.dart'; import '../../components/my_app_bar.dart'; import '../../router/app_routers.dart'; import '../../util/util.dart'; +import '../select_circle/logic.dart'; import 'logic.dart'; class UserinfoPage extends StatefulWidget { @@ -88,6 +89,22 @@ class MyTabbedScreenState extends State width: Get.width, child: _meInfoButton(logic), ), + !logic.isShowAlbum &&logic.isMe ? Positioned( + bottom: 36.sp, + right: 10.sp, + child: GestureDetector( + onTap: () async { + + List numbers = []; + + var data = await Get.toNamed( + AppRoutes.Call_out, + arguments: {'numbers': numbers}); + }, + child: Image.asset( + getCircleImage('send_msg'), + width: 60.sp, + ))):Container() ], ), ), 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 6ba78d6..d3998c2 100644 --- a/circle_app/lib/app/userinfo/widgets/home_call_out.dart +++ b/circle_app/lib/app/userinfo/widgets/home_call_out.dart @@ -344,9 +344,9 @@ class _HomeCallOutViewState extends State with AutomaticKeepAli mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - lists.create_time!, + "", style: TextStyle( - color: Colors.white, fontSize: 12.sp), + color: Colors.white, fontSize: 1.sp), ), widget.userId.isNotEmpty ? Container() @@ -605,7 +605,7 @@ class _HomeCallOutViewState extends State with AutomaticKeepAli mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - lists.create_time!, + "", style: TextStyle(color: Colors.white, fontSize: 12.sp), ), diff --git a/circle_app/lib/network/dio_manager.dart b/circle_app/lib/network/dio_manager.dart index 2889694..63062aa 100644 --- a/circle_app/lib/network/dio_manager.dart +++ b/circle_app/lib/network/dio_manager.dart @@ -45,7 +45,8 @@ class DioManager { // 接收数据的最长时限 receiveTimeout: const Duration(seconds: 300), )); - _dio!.interceptors.add(LogInterceptor(responseBody: true)); + _dio!.interceptors.add(LogInterceptor(responseBody: true, + )); // _dio!.interceptors.add(ConnectivityInterceptor()); } diff --git a/circle_app/lib/util/util.dart b/circle_app/lib/util/util.dart index f0d2e12..e114808 100644 --- a/circle_app/lib/util/util.dart +++ b/circle_app/lib/util/util.dart @@ -1,3 +1,4 @@ +import 'dart:convert'; import 'dart:io'; import 'dart:ui'; @@ -13,6 +14,8 @@ import 'package:path_provider/path_provider.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:video_compress/video_compress.dart'; +import '../app/circle/logic.dart'; +import '../app/select_circle/logic.dart'; import 'SharedPreferencesHelper.dart'; class Util {} @@ -154,8 +157,10 @@ String convertToTenThousand(int number) { pushLoginPage() async { await logoutIM(); SharedPreferencesHelper.getInstance().then((sharedPreferences) { - bool agreement = sharedPreferences.getBool(SharedPreferencesHelper.AGREEMENT)??false; - String loginPhone = sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE)??""; + bool agreement = + sharedPreferences.getBool(SharedPreferencesHelper.AGREEMENT) ?? false; + String loginPhone = + sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ?? ""; print(loginPhone); sharedPreferences.clear(); sharedPreferences.setString(SharedPreferencesHelper.LOGINPHONE, loginPhone); @@ -278,10 +283,8 @@ class CustomLoadFooter extends StatelessWidget { failedText: "加载失败", ); } - } - // 获取应用程序的文档目录路径 Future getApplicationDocumentsDirectoryPath() async { final directory = await getApplicationDocumentsDirectory(); @@ -306,13 +309,11 @@ Future getLibraryDirectoryPath() async { return directory.path; } - - //跳转到文明公约 void navigateToCodeOfConduct() { Get.toNamed(AppRoutes.WebViewActivity, arguments: { 'title': "文明公约", - "url": "https://docs.qq.com/doc/DZUtoZ3V0S3ltY2Zw" + "url": "https://docs.qq.com/doc/DZUtoZ3V0S3ltY2Zw" }); } @@ -320,7 +321,9 @@ void navigateToCodeOfConduct() { void navigateToUserAgreement() { Get.toNamed(AppRoutes.WebViewActivity, arguments: { 'title': "用户协议", - "url": Platform.isIOS?"https://docs.qq.com/doc/DZVV1SkttZGlPUW1H":"https://iquanpai.com/app-h5/4_163.html" + "url": Platform.isIOS + ? "https://docs.qq.com/doc/DZVV1SkttZGlPUW1H" + : "https://iquanpai.com/app-h5/4_163.html" }); } @@ -328,14 +331,19 @@ void navigateToUserAgreement() { void navigateToPrivacyPolicy() { Get.toNamed(AppRoutes.WebViewActivity, arguments: { 'title': "隐私协议", - "url": Platform.isIOS?"https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1":"https://iquanpai.com/app-h5/4_164.html" + "url": Platform.isIOS + ? "https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1" + : "https://iquanpai.com/app-h5/4_164.html" }); } + //发布内容规范 void navigateToContentGuidelines() { Get.toNamed(AppRoutes.WebViewActivity, arguments: { 'title': "发布内容规范", - "url": Platform.isIOS?"https://docs.qq.com/doc/DZVhLamZDQnJ0eHds":"https://iquanpai.com/app-h5/4_165.html" + "url": Platform.isIOS + ? "https://docs.qq.com/doc/DZVhLamZDQnJ0eHds" + : "https://iquanpai.com/app-h5/4_165.html" }); } @@ -343,8 +351,57 @@ void navigateToContentGuidelines() { void navigateToPartnerAgreement() { Get.toNamed(AppRoutes.WebViewActivity, arguments: { 'title': "合伙人协议", - "url": Platform.isIOS?"https://docs.qq.com/doc/DZUpwWFdNcGlsYld4":"https://iquanpai.com/app-h5/4_166.html" + "url": Platform.isIOS + ? "https://docs.qq.com/doc/DZUpwWFdNcGlsYld4" + : "https://iquanpai.com/app-h5/4_166.html" }); } +//邀请攻略 +void navigateToInviteStrategy() { + Get.toNamed(AppRoutes.WebViewActivity, arguments: { + 'title': "邀请攻略", + "url": "https://leyuan666.com/app-h5/4_168.html" + }); +} +void navigateToCustomRoute(BannerItem bannerItem) { + print(bannerItem.param); + switch (bannerItem.type) { + case 1: + Get.toNamed(AppRoutes.WebViewActivity, + arguments: {'title': "", "url": bannerItem.param.toString()}); + break; + case 2: + switch (bannerItem.scene) { + case "scene_2": + List numbers = []; + if(bannerItem.param!.isNotEmpty){ + String paramJson = bannerItem.param.toString(); + paramJson = paramJson.replaceAll(r'\', ''); // 去除反斜杠转义 + Map jsonData = json.decode(paramJson); + numbers.add(MyConfigData(jsonData['id'].toString(), jsonData['name'], false)); + } + Get.toNamed(AppRoutes.Call_out, arguments: {'numbers': numbers}); + break; + case "scene_3": + Get.toNamed(AppRoutes.FeedbackActivity); + break; + } + break; + case 3: + switch (bannerItem.scene) { + case "scene_1": + Get.toNamed(AppRoutes.Invite); + break; + case "scene_4": + if(bannerItem.param!.isEmpty){ + Get.toNamed(AppRoutes.UserInfoActivity); + }else{ + Get.toNamed(AppRoutes.UserInfoActivity, arguments: bannerItem.param.toString()); + } + break; + } + break; + } +} diff --git a/circle_app/lib/view/notice.dart b/circle_app/lib/view/notice.dart index b9cf305..6e4ee19 100644 --- a/circle_app/lib/view/notice.dart +++ b/circle_app/lib/view/notice.dart @@ -14,7 +14,7 @@ void showFloatingButtonOverlay( late OverlayEntry overlayEntry; bool showMessage = false; - int countdownSeconds = 5; // 倒计时秒数 + int countdownSeconds = 8; // 倒计时秒数 // 创建 Timer late Timer countdownTimer; diff --git a/circle_app/pubspec.yaml b/circle_app/pubspec.yaml index 6f9368c..b69522e 100644 --- a/circle_app/pubspec.yaml +++ b/circle_app/pubspec.yaml @@ -142,6 +142,7 @@ flutter: - assets/images/mine/ - assets/images/msg/ - assets/images/circle/ + - assets/province.json # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see