diff --git a/circle_app/assets/images/base/vip_fun_1.png b/circle_app/assets/images/base/vip_fun_1.png new file mode 100644 index 0000000..2ee4cbf Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_1.png differ diff --git a/circle_app/assets/images/base/vip_fun_2.png b/circle_app/assets/images/base/vip_fun_2.png new file mode 100644 index 0000000..788735b Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_2.png differ diff --git a/circle_app/assets/images/base/vip_fun_3.png b/circle_app/assets/images/base/vip_fun_3.png new file mode 100644 index 0000000..581afec Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_3.png differ diff --git a/circle_app/assets/images/base/vip_fun_4.png b/circle_app/assets/images/base/vip_fun_4.png new file mode 100644 index 0000000..ca54a1a Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_4.png differ diff --git a/circle_app/assets/images/base/vip_fun_5.png b/circle_app/assets/images/base/vip_fun_5.png new file mode 100644 index 0000000..dfb0fb4 Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_5.png differ diff --git a/circle_app/assets/images/base/vip_fun_6.png b/circle_app/assets/images/base/vip_fun_6.png new file mode 100644 index 0000000..6448e9c Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_6.png differ diff --git a/circle_app/assets/images/base/vip_fun_7.png b/circle_app/assets/images/base/vip_fun_7.png new file mode 100644 index 0000000..57751e8 Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_7.png differ diff --git a/circle_app/assets/images/base/vip_fun_8.png b/circle_app/assets/images/base/vip_fun_8.png new file mode 100644 index 0000000..41fa802 Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_8.png differ diff --git a/circle_app/assets/images/base/vip_fun_9.png b/circle_app/assets/images/base/vip_fun_9.png new file mode 100644 index 0000000..f272ede Binary files /dev/null and b/circle_app/assets/images/base/vip_fun_9.png differ diff --git a/circle_app/assets/images/base/year_vip.png b/circle_app/assets/images/base/year_vip.png new file mode 100644 index 0000000..3de0b0f Binary files /dev/null and b/circle_app/assets/images/base/year_vip.png differ diff --git a/circle_app/assets/images/circle/add.png b/circle_app/assets/images/circle/add.png index 9061e75..823b60d 100644 Binary files a/circle_app/assets/images/circle/add.png and b/circle_app/assets/images/circle/add.png differ diff --git a/circle_app/lib/app/circle/logic.dart b/circle_app/lib/app/circle/logic.dart index f004c64..693e3ae 100644 --- a/circle_app/lib/app/circle/logic.dart +++ b/circle_app/lib/app/circle/logic.dart @@ -52,6 +52,8 @@ class CircleLogic extends GetxController { Circle getCircleIndex() { return circle.lists[state.index]; } + + } class InterestsBean { diff --git a/circle_app/lib/app/circle/state.dart b/circle_app/lib/app/circle/state.dart index 0015898..e5abebc 100644 --- a/circle_app/lib/app/circle/state.dart +++ b/circle_app/lib/app/circle/state.dart @@ -124,6 +124,7 @@ class User { String? avatar; String? city; int? gender; + int? age; int? id; double? lat; double? lng; @@ -139,6 +140,7 @@ class User { this.id, this.lat, this.lng, + this.age, this.nickname, this.orientation, this.role, @@ -149,6 +151,7 @@ class User { city = json['city']; gender = json['gender']; id = json['id']; + age = json['age'] ?? 0; lat = json['lat'] ?? 0.0; lng = json['lng'] ?? 0.0; nickname = json['nickname']; diff --git a/circle_app/lib/app/circle/view.dart b/circle_app/lib/app/circle/view.dart index 9be30f2..c0de636 100644 --- a/circle_app/lib/app/circle/view.dart +++ b/circle_app/lib/app/circle/view.dart @@ -54,7 +54,7 @@ class _CirclePageState extends State Container( child: Column(children: [ navigatorItem(), - Text(controller.state.msg), + // Text(controller.state.msg), //组件使用 Expanded( child: Swiper( @@ -130,9 +130,11 @@ class _CirclePageState extends State Positioned( left: 0, child: Container( + width: 30.sp * widgets.length, height: 44.sp, child: Stack( + alignment: Alignment.centerLeft, children: widgets, ), )), @@ -189,108 +191,7 @@ class _CirclePageState extends State )); } - tipWdiget() { - return Container( - width: Get.width, - height: Get.height, - child: Center( - child: Container( - width: 339.sp, - height: 330.sp, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getCircleImage('add_tip_bg')))), - child: Stack( - alignment: Alignment.center, - children: [ - Positioned( - top: 5.sp, - right: 12.sp, - child: GestureDetector( - onTap: () { - Get.back(); - }, - child: Image.asset( - getCircleImage('close'), - width: 24.sp, - ), - )), - Positioned( - top: 24.sp, - child: Text( - '解锁圈子才能主动私聊', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - )), - Positioned( - left: 17.sp, - top: 64.sp, - child: Text( - '为什么要解锁圈子?', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - )), - Positioned( - top: 98.sp, - child: Container( - width: 339.sp, - padding: EdgeInsets.only(left: 17.sp, right: 17.sp), - child: Text( - '为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的跨友;3、谢绝只会白嫖的猎奇人士。', - style: TextStyle( - color: Color.fromRGBO(247, 250, 250, 0.8), - fontSize: 12.sp)), - )), - Positioned( - bottom: 18.sp, - child: Container( - width: 168.sp, - height: 42.sp, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(21.sp), - gradient: const LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [Color(0xff0AFCFF), Color(0xffD739EA)])), - child: Text( - '立即解锁', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - ), - )), - Positioned( - bottom: 72.sp, - child: Container( - child: Row( - children: [ - Text( - '¥18', - style: TextStyle( - color: Color(0xffE845FF), - fontSize: 16.sp, - fontWeight: FontWeight.w600), - ), - SizedBox( - width: 2.sp, - ), - Text( - '(原价60)', - style: TextStyle( - color: Colors.white70, - fontSize: 16.sp, - fontWeight: FontWeight.w400, - decoration: TextDecoration.lineThrough, - decorationColor: Colors.white70, - ), - ), - ], - ), - )) - ], - ), - ), - ), - ); - } + void _showTextContentDialog(BuildContext context, String msg) { showDialog( diff --git a/circle_app/lib/app/circle/widgets/info_list_view.dart b/circle_app/lib/app/circle/widgets/info_list_view.dart index 1a48881..b7cd06f 100644 --- a/circle_app/lib/app/circle/widgets/info_list_view.dart +++ b/circle_app/lib/app/circle/widgets/info_list_view.dart @@ -33,12 +33,13 @@ class InfoListView extends StatelessWidget { '性单恋' ]; List roleList = ['Sado', 'Maso', 'Dom', 'Sub', 'Switch']; + ListLogic? listsLg; @override Widget build(BuildContext context) { Get.lazyPut(() => ListLogic()); - final listsLg = Get.find(); - listsLg.loadCallOutListData(bean.id.toString()); + listsLg = Get.find(); + listsLg!.loadCallOutListData(bean.id.toString()); TextSpan descSpan; TextSpan span; @@ -267,18 +268,25 @@ class InfoListView extends StatelessWidget { ), )), GestureDetector( - onTap: () { + onTap: () async { if (bean.isJoin) { _showOutCircleDialog(context, logic, bean); } else { - logic.outCircle( + await logic.outCircle( bean.id.toString(), bean.isJoin); + logic.update(); } }, - child: Image.asset( - getCircleImage('add'), - width: 77.sp, - ), + child:Stack( + alignment: Alignment.center, + children: [ + Image.asset( + getCircleImage('add'), + width: 77.sp, + ), + Text(!bean.isJoin ? '申请加入':'已加入',style: TextStyle(color: Colors.white,fontSize: 12.sp),) + ], + ) ) ], ), @@ -356,9 +364,9 @@ class InfoListView extends StatelessWidget { } ///至尊喊话 - vipDynamicItem(Lists bean) { + vipDynamicItem(Lists lists) { Text descText = Text( - bean.content!, + lists.content!, style: TextStyle(color: Colors.white, fontSize: 14.sp), maxLines: 2, ); @@ -366,7 +374,7 @@ class InfoListView extends StatelessWidget { // List urlList = bean.lastJoinUsers; List widgets = []; int index = 0; - bean.chat!.users!.forEach((element) { + lists.chat!.users!.forEach((element) { widgets.add(Positioned( left: 12.sp * index, child: circleWidget(element.avatar!, width: 24), @@ -375,14 +383,34 @@ class InfoListView extends StatelessWidget { }); if (widgets.isNotEmpty) { widgets.add(Positioned( - left: 12.sp * bean.chat!.users!.length, + left: 12.sp * lists.chat!.users!.length, child: Image.asset( getCircleImage('more'), width: 24.sp, ))); } - double widgetHeight = 250.sp + contentHeight(bean.content!); + double picHeight = 0.0; + + int type = 0; + if (lists.album != null) { + if (lists.album!.isNotEmpty) { + Album info = lists.album!.first!; + type = info.type!; + + if (info.type == 1) { + if (lists.album!.length > 3) { + picHeight = 218.sp; + } else { + picHeight = 109.sp; + } + } else { + picHeight = 109.sp; + } + } + } + + double widgetHeight = 140.sp + contentHeight(lists.content!) + picHeight; return Container( margin: EdgeInsets.only(top: 10.sp), @@ -409,7 +437,7 @@ class InfoListView extends StatelessWidget { height: 18.sp, ), Container( - height: 279.sp, + height: widgetHeight, width: Get.width, padding: EdgeInsets.only(top: 12.sp, left: 12.sp, right: 12.sp), child: Column( @@ -427,14 +455,19 @@ class InfoListView extends StatelessWidget { getCircleImage('avatar_bg'), width: 42.sp, ), - ClipOval( - child: Image.network( - bean.user!.avatar!, - width: 40.sp, - height: 40.sp, - fit: BoxFit.fill, - ), - ) + GestureDetector( + onTap: () { + listsLg?.pushMsgPage(lists,lists.id.toString()); + }, + child: ClipOval( + child: Image.network( + lists.user!.avatar!, + width: 40.sp, + height: 40.sp, + fit: BoxFit.fill, + ), + ), + )) ], )), Expanded( @@ -447,7 +480,7 @@ class InfoListView extends StatelessWidget { Row( children: [ Text( - bean.user!.nickname!, + lists.user!.nickname!, style: TextStyle( color: Colors.white, fontSize: 18.sp, @@ -456,7 +489,7 @@ class InfoListView extends StatelessWidget { SizedBox( width: 8.sp, ), - bean.user!.vip! == 0 + lists.user!.vip! == 0 ? Container() : Image.asset( getCircleImage('vip'), @@ -484,7 +517,7 @@ class InfoListView extends StatelessWidget { Color(0xffB5D3FF) ])), child: Text( - '${genderList[bean.user!.gender!]}.${'33'}.${roleList[bean.user!.role!]}.${orientationList[bean.user!.orientation!]}', + '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}', style: TextStyle( color: Colors.black, fontSize: 12.sp, @@ -507,34 +540,48 @@ class InfoListView extends StatelessWidget { Container( height: 100.sp, margin: EdgeInsets.only(top: 5.sp), - child: GridView( + child: GridView.builder( + itemCount: lists.album!.length, physics: const NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, //横轴三个子widget crossAxisSpacing: 8.sp, + mainAxisSpacing: 8.sp, childAspectRatio: 1.0 //宽高比为1时,子widget ), - children: [ - ClipRRect( - borderRadius: BorderRadius.circular(6.sp), - child: Image.network( - 'https://pic1.zhimg.com/v2-3be05963f5f3753a8cb75b6692154d4a_720w.jpg?source=172ae18b', - fit: BoxFit.fill, + itemBuilder: (contentxt, currentIndex) { + Album album = lists.album![currentIndex]; + if (album.type == 2) { + return ClipRRect( + borderRadius: BorderRadius.circular(6.sp), + child: VideoItemWidget(album.url!)); + } + return GestureDetector( + onTap: () { + var imgList = []; + for (var element in lists.album!) { + imgList.add(element.url!); + } + Get.toNamed(AppRoutes.Swiper, arguments: { + 'imaglist': imgList, + 'index': currentIndex + }); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.sp), + child: CachedNetworkImage( + imageUrl: album.url!, + placeholder: (context, url) => + CircularProgressIndicator( + color: Color(0xFF07FAFB), + ), + errorWidget: (context, url, error) => + Icon(Icons.error), + fit: BoxFit.cover, + ), ), - ), - ClipRRect( - borderRadius: BorderRadius.circular(6.sp), - child: Image.network( - 'https://pic1.zhimg.com/v2-3be05963f5f3753a8cb75b6692154d4a_720w.jpg?source=172ae18b', - fit: BoxFit.fill), - ), - ClipRRect( - borderRadius: BorderRadius.circular(6.sp), - child: Image.network( - 'https://pic1.zhimg.com/v2-3be05963f5f3753a8cb75b6692154d4a_720w.jpg?source=172ae18b', - fit: BoxFit.fill), - ), - ]), + ); + }), ), Container( height: 34.sp, @@ -561,7 +608,7 @@ class InfoListView extends StatelessWidget { widgets.isNotEmpty ? Expanded( child: Text( - '${bean.chat!.count!}位圈友已私聊', + '${lists.chat!.count!}位圈友已私聊', style: TextStyle( color: Colors.white, fontSize: 12.sp), )) @@ -571,9 +618,14 @@ class InfoListView extends StatelessWidget { style: TextStyle( color: Colors.white, fontSize: 12.sp), )), - Image.asset( - getCircleImage('chat'), - width: 60.sp, + GestureDetector( + onTap: () { + listsLg?.pushMsgPage(lists,bean.id.toString()); + }, + child: Image.asset( + getCircleImage('chat'), + width: 60.sp, + ), ) ], ), @@ -587,9 +639,9 @@ class InfoListView extends StatelessWidget { } ///普通图文喊话 - normalDynamicItem(Lists bean) { + normalDynamicItem(Lists lists) { Text descText = Text( - bean.content!, + lists.content!, style: TextStyle(color: Colors.white, fontSize: 14.sp), // maxLines: 2, ); @@ -597,14 +649,16 @@ class InfoListView extends StatelessWidget { double picHeight = 0.0; int type = 0; - if (bean.album != null) { - if (bean.album!.isNotEmpty) { - Album info = bean.album!.first!; + if (lists.album != null) { + if (lists.album!.isNotEmpty) { + Album info = lists.album!.first!; type = info.type!; if (info.type == 1) { - if (bean.album!.length > 3) { + if (lists.album!.length > 3) { picHeight = 218.sp; + } else { + picHeight = 109.sp; } } else { picHeight = 109.sp; @@ -614,7 +668,7 @@ class InfoListView extends StatelessWidget { List widgets = []; int index = 0; - bean!.chat!.users!.forEach((element) { + lists!.chat!.users!.forEach((element) { widgets.add(Positioned( left: 12.sp * index, child: GestureDetector( @@ -626,7 +680,7 @@ class InfoListView extends StatelessWidget { }); if (widgets.isNotEmpty) { widgets.add(Positioned( - left: 12.sp * bean.chat!.users!.length, + left: 12.sp * lists.chat!.users!.length, child: Image.asset( getCircleImage('more'), width: 24.sp, @@ -635,7 +689,7 @@ class InfoListView extends StatelessWidget { return Container( margin: EdgeInsets.only(top: 10.sp), width: Get.width, - height: 130.sp + contentHeight(bean.content!) + picHeight, + height: 130.sp + contentHeight(lists.content!) + picHeight, decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.fill, @@ -655,7 +709,7 @@ class InfoListView extends StatelessWidget { height: 20.sp, ), Text( - bean.user!.city ?? '外星', + lists.user!.city ?? '外星', style: TextStyle(color: Colors.white, fontSize: 12.sp), ) ], @@ -663,7 +717,7 @@ class InfoListView extends StatelessWidget { // height: 18.sp, ), Container( - height: 130.sp + contentHeight(bean.content!) + picHeight, + height: 130.sp + contentHeight(lists.content!) + picHeight, width: Get.width, padding: EdgeInsets.only(left: 12.sp, right: 12.sp), child: Column( @@ -681,14 +735,18 @@ class InfoListView extends StatelessWidget { getCircleImage('avatar_bg'), width: 42.sp, ), - ClipOval( + GestureDetector( + onTap: () { + listsLg?.pushMsgPage(lists,bean.id.toString()); + }, + child:ClipOval( child: Image.network( - bean.user!.avatar!, + lists.user!.avatar!, width: 40.sp, height: 40.sp, fit: BoxFit.fill, ), - ) + )) ], )), Expanded( @@ -701,7 +759,7 @@ class InfoListView extends StatelessWidget { Row( children: [ Text( - bean.user!.nickname! ?? '', + lists.user!.nickname! ?? '', style: TextStyle( color: Colors.white, fontSize: 18.sp, @@ -710,7 +768,7 @@ class InfoListView extends StatelessWidget { SizedBox( width: 8.sp, ), - bean.user!.vip! == 0 + lists.user!.vip! == 0 ? Container() : Image.asset( getCircleImage('vip'), @@ -738,7 +796,7 @@ class InfoListView extends StatelessWidget { Color(0xffB5D3FF) ])), child: Text( - '${genderList[bean.user!.gender!]}.${'33'}.${roleList[bean.user!.role!]}.${orientationList[bean.user!.orientation!]}', + '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}', style: TextStyle( color: Colors.black, fontSize: 12.sp, @@ -763,7 +821,7 @@ class InfoListView extends StatelessWidget { height: picHeight, margin: EdgeInsets.only(top: 5.sp), child: GridView.builder( - itemCount: bean.album!.length, + itemCount: lists.album!.length, physics: const NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -773,7 +831,7 @@ class InfoListView extends StatelessWidget { childAspectRatio: 1.0 //宽高比为1时,子widget ), itemBuilder: (contentxt, currentIndex) { - Album album = bean.album![currentIndex]; + Album album = lists.album![currentIndex]; if (album.type == 2) { return ClipRRect( borderRadius: BorderRadius.circular(6.sp), @@ -782,7 +840,7 @@ class InfoListView extends StatelessWidget { return GestureDetector( onTap: () { var imgList = []; - for (var element in bean.album!) { + for (var element in lists.album!) { imgList.add(element.url!); } Get.toNamed(AppRoutes.Swiper, arguments: { @@ -800,7 +858,7 @@ class InfoListView extends StatelessWidget { ), errorWidget: (context, url, error) => Icon(Icons.error), - fit: BoxFit.fill, + fit: BoxFit.cover, ), ), ); @@ -831,7 +889,7 @@ class InfoListView extends StatelessWidget { widgets.isNotEmpty ? Expanded( child: Text( - '${bean.chat!.count!}位圈友已私聊', + '${lists.chat!.count!}位圈友已私聊', style: TextStyle( color: Colors.white, fontSize: 12.sp), )) @@ -841,10 +899,14 @@ class InfoListView extends StatelessWidget { style: TextStyle( color: Colors.white, fontSize: 12.sp), )), - Image.asset( + GestureDetector( + onTap: () { + listsLg?.pushMsgPage(lists,bean.id.toString()); + }, + child:Image.asset( getCircleImage('chat'), width: 60.sp, - ) + )) ], ), ) @@ -971,9 +1033,10 @@ class InfoListView extends StatelessWidget { ), SizedBox(width: 24.sp), GestureDetector( - onTap: () { + onTap: () async { Navigator.pop(context); - logic.outCircle(bean.id.toString(), bean.isJoin); + await logic.outCircle(bean.id.toString(), bean.isJoin); + logic.update(); }, child: Container( margin: EdgeInsets.only(top: 24.sp), diff --git a/circle_app/lib/app/circle/widgets/list_logic.dart b/circle_app/lib/app/circle/widgets/list_logic.dart index b06b97e..e3fb683 100644 --- a/circle_app/lib/app/circle/widgets/list_logic.dart +++ b/circle_app/lib/app/circle/widgets/list_logic.dart @@ -1,5 +1,8 @@ import 'package:circle_app/app/circle/state.dart'; +import 'package:circle_app/common/Widgets/base_tip_widget.dart'; +import 'package:circle_app/common/Widgets/open_vip_tip/view.dart'; import 'package:circle_app/network/dio_manager.dart'; +import 'package:circle_app/router/app_routers.dart'; import 'package:circle_app/util/util.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -19,7 +22,7 @@ class ListLogic extends GetxController { url: "/up-service/interest/$circleId/callouts", params: {"page": callOutPage, "page_size": "20"}); if (data["code"] == 200) { - List dataList = data["data"]["lists"]; + List dataList = data["data"]["lists"] ?? []; if (callOutPage == 1) { if (lists.isNotEmpty) { lists.clear(); @@ -31,9 +34,8 @@ class ListLogic extends GetxController { lists.add(Lists.fromJson(element)); } callOutPage++; - } else { - callOutMore = false; } + callOutMore = dataList.length == 20; update(); } else { showToast(data["msg"]); @@ -51,6 +53,19 @@ class ListLogic extends GetxController { loadCallOutListData(_circleId); } + void pushMsgPage(Lists bean,String cicleId) { + Get.toNamed(AppRoutes.UserInfoActivity, arguments: bean.user!.id!.toString()); + // if (bean.isQueen) { + // showJoinCiclePiker(cicleId); + // } else { + //跳转消息页面 + // Get.bottomSheet(Open_vip_tipPage(), + // isScrollControlled: true, + // enableDrag: false, + // ); + // } + } + @override void onInit() { // TODO: implement onInit diff --git a/circle_app/lib/app/circle/widgets/play_video_view.dart b/circle_app/lib/app/circle/widgets/play_video_view.dart index 6f4f19b..c38c556 100644 --- a/circle_app/lib/app/circle/widgets/play_video_view.dart +++ b/circle_app/lib/app/circle/widgets/play_video_view.dart @@ -94,7 +94,7 @@ class _PlayVideoViewState extends State { )), Positioned( left: 15.sp, - top: Get.statusBarHeight, + top: 44.sp, child: GestureDetector( onTap: () { Get.back(); diff --git a/circle_app/lib/common/Widgets/base_tip_widget.dart b/circle_app/lib/common/Widgets/base_tip_widget.dart new file mode 100644 index 0000000..6bb490b --- /dev/null +++ b/circle_app/lib/common/Widgets/base_tip_widget.dart @@ -0,0 +1,115 @@ +import 'package:circle_app/util/util.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +joiinCircileTipWdiget(String cicleId) { + return Scaffold( + backgroundColor: Colors.transparent, + body: Container( + width: Get.width, + height: Get.height, + child: Container( + width: 339.sp, + height: 330.sp, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage(getCircleImage('add_tip_bg')))), + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + top: 5.sp, + right: 12.sp, + child: GestureDetector( + onTap: () { + Get.back(); + }, + child: Image.asset( + getCircleImage('close'), + width: 24.sp, + ), + )), + Positioned( + top: 24.sp, + child: Text( + '解锁圈子才能主动私聊', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + )), + Positioned( + left: 17.sp, + top: 64.sp, + child: Text( + '为什么要解锁圈子?', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + )), + Positioned( + top: 98.sp, + child: Container( + width: 339.sp, + padding: EdgeInsets.only(left: 17.sp, right: 17.sp), + child: Text( + '为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核,保证用户真实,避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的跨友;3、谢绝只会白嫖的猎奇人士。', + style: TextStyle( + color: Color.fromRGBO(247, 250, 250, 0.8), + fontSize: 12.sp)), + )), + Positioned( + bottom: 18.sp, + child: Container( + width: 168.sp, + height: 42.sp, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(21.sp), + gradient: const LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [Color(0xff0AFCFF), Color(0xffD739EA)])), + child: Text( + '立即解锁', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + ), + )), + Positioned( + bottom: 72.sp, + child: Container( + child: Row( + children: [ + Text( + '¥18', + style: TextStyle( + color: Color(0xffE845FF), + fontSize: 16.sp, + fontWeight: FontWeight.w600), + ), + SizedBox( + width: 2.sp, + ), + Text( + '(原价60)', + style: TextStyle( + color: Colors.white70, + fontSize: 16.sp, + fontWeight: FontWeight.w400, + decoration: TextDecoration.lineThrough, + decorationColor: Colors.white70, + ), + ), + ], + ), + )) + ], + ), + ), + ), + ); +} + showJoinCiclePiker(String cicleId) { + return Get.bottomSheet( + joiinCircileTipWdiget(cicleId), + isScrollControlled: true, + enableDrag: false + ); +} \ No newline at end of file diff --git a/circle_app/lib/common/Widgets/open_vip_tip/view.dart b/circle_app/lib/common/Widgets/open_vip_tip/view.dart index d3d1133..a5e5371 100644 --- a/circle_app/lib/common/Widgets/open_vip_tip/view.dart +++ b/circle_app/lib/common/Widgets/open_vip_tip/view.dart @@ -1,6 +1,7 @@ import 'package:circle_app/util/util.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 'logic.dart'; @@ -13,152 +14,230 @@ class Open_vip_tipPage extends StatelessWidget { @override Widget build(BuildContext context) { - return GetBuilder(builder: (Open_vip_tipLogic controller) { - return Container( - width: Get.width, - height: Get.height, - child: Center( - child: Container( - width: 339.sp, - height: 453.sp, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getCircleImage('open_vip_bg')))), - child: Stack( - alignment: Alignment.center, - children: [ - Positioned( - top: 5.sp, - right: 12.sp, - child: GestureDetector( - onTap: () { - Get.back(); - }, - child: Image.asset( - getCircleImage('close'), - width: 24.sp, - ), - )), - Positioned( - top: 24.sp, - child: Text( - '兽迷会员十大特权', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - )), - Positioned( - left: 17.sp, - top: 64.sp, - child: Text( - '为什么要解锁圈子?', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - )), - Positioned( - top: 227.sp, - child: Container( - width: 339.sp, - padding: EdgeInsets.only(left: 17.sp, right: 17.sp), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - typeItem(controller,controller.index == 0,0), + List vipFuncList = ['1', '2', '3', '4', '5', '6', '7', '8', '9']; + // for (int i = 1; i < 10; i++) { + // + // } - typeItem(controller,controller.index == 1,1), - typeItem(controller,controller.index == 2,2), - ], - ))), - Positioned( - bottom: 48.sp, - child: Container( - width: 168.sp, - height: 42.sp, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(21.sp), - gradient: const LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [Color(0xff0AFCFF), Color(0xffD739EA)])), - child: Text( - '立即解锁', - style: TextStyle(color: Colors.white, fontSize: 16.sp), - ), - )), - Positioned( - bottom: 17.sp, - child: Container( - child: Row( - children: [ - Text( - '点击加入即表示同意', - style: TextStyle( - color: Colors.white, - fontSize: 11.sp, - fontWeight: FontWeight.w600), + return GetBuilder(builder: (Open_vip_tipLogic controller) { + return Scaffold( + backgroundColor: Colors.transparent, + body: Container( + width: Get.width, + height: Get.height, + child: Center( + child: Container( + width: 339.sp, + height: 453.sp, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage(getCircleImage('open_vip_bg')))), + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + top: 5.sp, + right: 12.sp, + child: GestureDetector( + onTap: () { + Get.back(); + }, + child: Image.asset( + getCircleImage('close'), + width: 24.sp, ), - SizedBox( - width: 2.sp, + )), + Positioned( + top: 24.sp, + child: Text( + '兽迷会员十大特权', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + )), + Positioned( + top: 44.sp, + child: Container( + width: Get.width, + height: 180.sp, + child: Swiper( + itemCount: vipFuncList.length, + itemBuilder: (BuildContext context, int index) { + return funcItem(vipFuncList[index], + vipFuncList[index] + '111', index+1); + }, + loop: true, + autoplay:true, + pagination: new SwiperPagination( + builder: DotSwiperPaginationBuilder( + color: Color(0x99FFFFFF), + size:4.sp, + activeColor: Color(0xFF00FFD2), + activeSize: 4.sp + ) + ),//如果不填则不显示指示点 + ), + )), + Positioned( + top: 227.sp, + child: Container( + width: 339.sp, + padding: EdgeInsets.only(left: 17.sp, right: 17.sp), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + typeItem(controller, controller.index == 0, 0), + typeItem(controller, controller.index == 1, 1), + typeItem(controller, controller.index == 2, 2), + ], + ))), + Positioned( + bottom: 48.sp, + child: Container( + width: 168.sp, + height: 42.sp, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(21.sp), + gradient: const LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Color(0xff0AFCFF), + Color(0xffD739EA) + ])), + child: Text( + '立即解锁', + style: + TextStyle(color: Colors.white, fontSize: 16.sp), ), - Text( - '《合伙人协议》', - style: TextStyle( - color: Color(0xff00FFF4), - fontSize: 11.sp, - fontWeight: FontWeight.w400, - ), + )), + Positioned( + bottom: 17.sp, + child: Container( + child: Row( + children: [ + Text( + '点击加入即表示同意', + style: TextStyle( + color: Colors.white, + fontSize: 11.sp, + fontWeight: FontWeight.w600), + ), + SizedBox( + width: 2.sp, + ), + Text( + '《合伙人协议》', + style: TextStyle( + color: Color(0xff00FFF4), + fontSize: 11.sp, + fontWeight: FontWeight.w400, + ), + ), + ], ), - ], - ), - )) - ], + )) + ], + ), + ), ), ), - ), ); }); - } - typeItem(Open_vip_tipLogic controller,bool isSelected,int index) { - return GestureDetector( + typeItem(Open_vip_tipLogic controller, bool isSelected, int index) { + return GestureDetector( onTap: () { - controller.index = index; - controller.update(); - }, - child: Stack( - alignment: Alignment.center, - children: [ - isSelected ? Image.asset( - getCircleImage('selected'), - width: 98.sp, - height: 110.sp, - fit: BoxFit.fill, - ) : Container(), - Container( - width: isSelected ? 96.sp : 98.sp, - height: isSelected ? 108.sp : 110.sp, - decoration: BoxDecoration( - color: Color.fromRGBO(255, 255, 255, 0.1), - borderRadius: BorderRadius.circular(10.sp), + controller.index = index; + controller.update(); + }, + child: Stack( + alignment: Alignment.center, + children: [ + isSelected + ? Image.asset( + getCircleImage('selected'), + width: 98.sp, + height: 110.sp, + fit: BoxFit.fill, + ) + : Container(), + Container( + width: isSelected ? 96.sp : 98.sp, + height: isSelected ? 108.sp : 110.sp, + decoration: BoxDecoration( + color: Color.fromRGBO(255, 255, 255, 0.1), + borderRadius: BorderRadius.circular(10.sp), ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text('3个月',style: TextStyle(color: Colors.white,fontSize: 14.sp),), - Text('0.67元/天',style: TextStyle(color: Colors.white,fontSize: 14.sp),), - Row( - mainAxisAlignment: MainAxisAlignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Text('58元',style: TextStyle(color: Colors.white,fontSize: 14.sp),), - SizedBox(width: 4.sp,), - Text('388元',style: TextStyle(color: Colors.white70,fontSize: 10.sp, decoration: TextDecoration.lineThrough, - decorationColor: Colors.white70,),), + Text( + '3个月', + style: TextStyle(color: Colors.white, fontSize: 14.sp), + ), + Text( + '0.67元/天', + style: TextStyle(color: Colors.white, fontSize: 14.sp), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '58元', + style: TextStyle(color: Colors.white, fontSize: 14.sp), + ), + SizedBox( + width: 4.sp, + ), + Text( + '388元', + style: TextStyle( + color: Colors.white70, + fontSize: 10.sp, + decoration: TextDecoration.lineThrough, + decorationColor: Colors.white70, + ), + ), + ], + ) ], - ) - ], + ), + ), + ], + )); + } + + funcItem(String func, String funcDesc, int index) { + return Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + getBaseImage('vip_fun_$index'), + width: 70.sp, ), - ), - ], - )); + SizedBox( + height: 14.sp, + ), + Text( + func, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + SizedBox( + height: 4.sp, + ), + Text(funcDesc, + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + )) + ], + ), + ); } } diff --git a/circle_app/lib/main.dart b/circle_app/lib/main.dart index 61551d6..aaea0c9 100644 --- a/circle_app/lib/main.dart +++ b/circle_app/lib/main.dart @@ -107,6 +107,7 @@ class _MyAppState extends State { initialBinding: SplashBinding(), getPages: AppPages.routes, home: SplashPage(), + debugShowCheckedModeBanner: false, ); }); }