代码提交

This commit is contained in:
CYH 2025-04-27 17:30:04 +08:00
parent 9c1e8de478
commit 4284732820
57 changed files with 6454 additions and 1100 deletions

View File

@ -71,8 +71,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 109 versionCode 111
versionName "2.5.9" versionName "2.6.1"
manifestPlaceholders = [ manifestPlaceholders = [
vivo_APPID: "105669716", vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122", vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -66,7 +66,7 @@
<application <application
android:label="微乐园" android:label="微乐园"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher" >
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"

View File

@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="ic_launcher_background">#000000</color> <color name="ic_launcher_background">#ffffff</color>
</resources> </resources>

View File

@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

View File

@ -48,8 +48,8 @@
"isPrivacyDialogTitleBold": true, "isPrivacyDialogTitleBold": true,
"isPrivacyDialogAuto": true, "isPrivacyDialogAuto": true,
"privacyDialogSize": 14, "privacyDialogSize": 14,
"protocolLink": "https://iquanpai.com/app-h5/4_163.html", "protocolLink": "https://sourl.cn/G6yiGJ",
"protocol2Link": "https://iquanpai.com/app-h5/4_164.html", "protocol2Link": "https://sourl.cn/X5LP5a",
"privacyDialogTextColor": "#999999", "privacyDialogTextColor": "#999999",
"privacyDialogTitleMarginTop": 25, "privacyDialogTitleMarginTop": 25,
"privacyDialogContentStart": "我已阅读并同意", "privacyDialogContentStart": "我已阅读并同意",

View File

@ -105,9 +105,9 @@
"appPrivacyOriginRight": 40, "appPrivacyOriginRight": 40,
"appPrivacyText": "登录即同意《默认》并授权获得《隐私政策》和《用户隐私协议》", "appPrivacyText": "登录即同意《默认》并授权获得《隐私政策》和《用户隐私协议》",
"appFPrivacyText": "《隐私政策》", "appFPrivacyText": "《隐私政策》",
"appFPrivacyURL": "https://iquanpai.com/app-h5/4_164.html", "appFPrivacyURL": "https://sourl.cn/G6yiGJ",
"appSPrivacyText": "《用户隐私协议》", "appSPrivacyText": "《用户隐私协议》",
"appSPrivacyURL": "https://iquanpai.com/app-h5/4_163.html", "appSPrivacyURL": "https://sourl.cn/X5LP5a",
"appPrivacyAlignment": 0, "appPrivacyAlignment": 0,
"appPrivacyOriginLeftMargin": 60, "appPrivacyOriginLeftMargin": 60,
"appPrivacyOriginBottomMargin": 60, "appPrivacyOriginBottomMargin": 60,

View File

@ -111,7 +111,7 @@ class AccountPage extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Text( Text(
"换绑邮箱", mineLogic.userInfoBean?.email?.isNotEmpty ?? false ? "换绑邮箱" : '绑定邮箱',
style: TextStyle( style: TextStyle(
color: Color(0xFFF7FAFA), color: Color(0xFFF7FAFA),
fontSize: 16.0.sp, fontSize: 16.0.sp,

View File

@ -568,7 +568,7 @@ class _Call_outPageState extends State<Call_outPage> {
child: Container( child: Container(
height: 30.sp, height: 30.sp,
width: Get.width, width: Get.width,
padding: EdgeInsets.only(left: 4.sp, right: 4.sp), padding: EdgeInsets.only(left: 6.sp, right: 8.sp),
margin: EdgeInsets.only( margin: EdgeInsets.only(
// left: 15.sp, // left: 15.sp,
bottom: 10.sp, bottom: 10.sp,

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class Call_out_detailBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => Call_out_detailLogic());
}
}

View File

@ -0,0 +1,31 @@
import 'package:circle_app/net/dio_manager.dart';
import 'package:get/get.dart';
import '../../net/api.dart';
import '../circle/state.dart';
class Call_out_detailLogic extends GetxController {
bool isOpen = false;
Lists? lists;
String id = Get.arguments['id'];
@override
void onInit() {
// TODO: implement onInit
super.onInit();
loadData();
}
loadData() async {
var result = await DioManager.getInstance().get(url: Api.signInterestCalloutDetail,params: {'calloutId':id});
if (result['code'] == 200) {
lists = Lists.fromJson(result['data']);
update();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:circle_app/commons/colors/app_color.dart';
import 'package:circle_app/utils/util.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:tencent_cloud_chat_uikit/ui/utils/screen_utils.dart'; import 'package:tencent_cloud_chat_uikit/ui/utils/screen_utils.dart';
import 'package:tencent_extended_text/extended_text.dart'; import 'package:tencent_extended_text/extended_text.dart';
@ -196,7 +198,16 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
} }
} }
} }
Map jumpInfo = {};
if (widget.message.cloudCustomData?.isNotEmpty ?? false) {
try {
Map info = jsonDecode(widget.message.cloudCustomData!);
if (info.containsKey('jumpInfo')) {
jumpInfo = info['jumpInfo'];
}
} catch (e) {
}
}
final defaultStyle = widget.isFromSelf final defaultStyle = widget.isFromSelf
? (theme.chatMessageItemFromSelfBgColor ?? ? (theme.chatMessageItemFromSelfBgColor ??
theme.lightPrimaryMaterialColor.shade50) theme.lightPrimaryMaterialColor.shade50)
@ -208,6 +219,9 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
if (!widget.isFromSelf) { if (!widget.isFromSelf) {
return return
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: gradient:
@ -261,9 +275,20 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
], ],
), ),
), ),
),
if (jumpInfo.containsKey('btnText'))
InkWell(
onTap: () {
pushPage(jumpInfo['scene'], jumpInfo['param'].toString());
},
child: Container(margin: EdgeInsets.only(top: 8.sp),child: Text(jumpInfo['btnText'],style: TextStyle(color: AppColor.mainColor,fontSize: 16.sp),)),
)
],
); );
} }
return Container( return Column(
children: [
Container(
padding: padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10), widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -308,6 +333,15 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
TIMUIKitMessageReactionShowPanel(message: widget.message) TIMUIKitMessageReactionShowPanel(message: widget.message)
], ],
), ),
),
if (jumpInfo.containsKey('jump'))
InkWell(
onTap: () {
pushPage(jumpInfo['scene'], jumpInfo['param'].toString());
},
child: Text(jumpInfo['btnText'],style: TextStyle(color: AppColor.mainColor,fontSize: 15.sp),),
)
],
); );
} }

View File

@ -264,7 +264,7 @@ class _MoreDialogState extends State<MoreDialog> {
top: 12.sp, left: 14.sp, right: 14.sp), top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注", "拉黑后,你将屏蔽对方的任何信息。若您喜欢了对方,将自动取消喜欢",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: const Color(0xCCF7FAFA), fontSize: 16.sp), color: const Color(0xCCF7FAFA), fontSize: 16.sp),

View File

@ -205,8 +205,15 @@ class _CirclePageState extends State<CirclePage>
], ],
)), )),
if (logic.isShowTip) if (logic.isShowTip && homelogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -245,7 +252,9 @@ class _CirclePageState extends State<CirclePage>
), ),
], ],
), ),
),
)), )),
], ],
), ),
); );
@ -977,21 +986,11 @@ class _CirclePageState extends State<CirclePage>
InkWell( InkWell(
onTap: () async { onTap: () async {
if (_tabController.index == 2) { if (_tabController.index == 2) {
var data = await DioManager.instance Get.bottomSheet(
.get(url: Api.getUserMine); TodayPeopleDialog(isShow: true,source:'fate_match'),
var bean = isScrollControlled: true,
BaseResponse<MineResponseBean>.fromJson( enableDrag: false,
data, );
(data) =>
MineResponseBean.fromJson(data));
User userInfoBean = bean.data.user;
if (userInfoBean.vip > 0) {
navigateToQueen();
} else {
showOKToast('领取特权之后更容易上精选');
showOepnVipDialog('');
}
} else { } else {
Get.toNamed(Routes.Search); Get.toNamed(Routes.Search);
} }

View File

@ -372,8 +372,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
borderRadius: BorderRadius.circular(10.sp), borderRadius: BorderRadius.circular(10.sp),
child: Container( child: Container(
width: Get.width, width: Get.width,
// margin:
child: Stack( child: Stack(
children: [ children: [
ClipRRect( ClipRRect(
@ -1345,6 +1343,22 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
), ),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -1767,6 +1781,22 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
: Container(), : Container(),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,

View File

@ -1138,59 +1138,24 @@ class _LikeViewState extends State<LikeView>
); );
}), }),
), ),
// Container(
// height: 30.sp,
// padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
// margin: EdgeInsets.only(top: picHeight == 0 ? 15.sp : 5.sp),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(15.sp),
// color: Color(0x33000000)),
// child: Row(
// children: [
// widgets.isNotEmpty
// ? SizedBox(
// width: 24 + 12.sp * widgets.length - 8.sp,
// height: 24.sp,
// child: Stack(children: widgets),
// )
// : Container(),
// SizedBox(
// width: 4.sp,
// ),
// widgets.isNotEmpty
// ? Expanded(
// child: Text(
// '${lists.chat!.count!}位圈友已私聊',
// style: TextStyle(
// color: Colors.white.withOpacity(0.75),
// fontSize: 14.sp),
// ))
// : Expanded(
// child: Text(
// '赶紧成为第一位私聊ta的圈友吧',
// style: TextStyle(
// color: Colors.white.withOpacity(0.75),
// fontSize: 14.sp),
// )),
// GestureDetector(
// onTap: () {
// pushMsgPage(
// lists,
// lists.interest!['id'].toString(),
// );
// // pushHomePage(
// // lists, widget.bean.id.toString());
// },
// child: Image.asset(
// getCircleImage('chat'),
// width: 60.sp,
// ),
// )
// ],
// ),
// ),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -1236,7 +1201,7 @@ class _LikeViewState extends State<LikeView>
}, },
child: Image.asset( child: Image.asset(
getCircleImage('chat'), getCircleImage('chat'),
width: 60.sp, width: 50.sp,
), ),
) )
], ],
@ -1577,6 +1542,22 @@ class _LikeViewState extends State<LikeView>
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -1622,7 +1603,7 @@ class _LikeViewState extends State<LikeView>
}, },
child: Image.asset( child: Image.asset(
getCircleImage('chat'), getCircleImage('chat'),
width: 60.sp, width: 50.sp,
), ),
) )
], ],

View File

@ -23,6 +23,7 @@ import '../../commons/colors/app_color.dart';
import '../../net/api.dart'; import '../../net/api.dart';
import '../../utils/cache_img.dart'; import '../../utils/cache_img.dart';
import '../../utils/eventBus.dart'; import '../../utils/eventBus.dart';
import '../home/logic.dart';
import 'logic.dart'; import 'logic.dart';
import 'widgets/all_circle_item.dart'; import 'widgets/all_circle_item.dart';
@ -42,6 +43,8 @@ class _CircleListPageState extends State<CircleListPage>
final logic = Get.find<LikeLogic>(); final logic = Get.find<LikeLogic>();
final homeLogic = Get.find<HomeLogic>();
int currentIndex = 1; int currentIndex = 1;
List<String> tipList = [ List<String> tipList = [
@ -203,8 +206,16 @@ class _CircleListPageState extends State<CircleListPage>
), ),
), ),
), ),
if (logic.isShowCallOutTip) if (logic.isShowCallOutTip && homeLogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowCallOutTip = false;
logic.update();
logic.setSpCallOpTip();
logic.isShowLikeTip = true;
logic.update();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -236,7 +247,6 @@ class _CircleListPageState extends State<CircleListPage>
logic.isShowCallOutTip = false; logic.isShowCallOutTip = false;
logic.update(); logic.update();
logic.setSpCallOpTip(); logic.setSpCallOpTip();
// addUmengTag('点击圈子喊话');
var result = Get.toNamed( var result = Get.toNamed(
Routes.CallOutPage, Routes.CallOutPage,
); );
@ -250,9 +260,16 @@ class _CircleListPageState extends State<CircleListPage>
))), ))),
], ],
), ),
),
)), )),
if (logic.isShowLikeTip) if (logic.isShowLikeTip && homeLogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowLikeTip = false;
logic.update();
logic.setSpLikeOpTip();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -294,6 +311,7 @@ class _CircleListPageState extends State<CircleListPage>
)),)), )),)),
], ],
), ),
),
)) ))
], ],
); );

View File

@ -21,9 +21,9 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:visibility_detector/visibility_detector.dart'; import 'package:visibility_detector/visibility_detector.dart';
import '../../../commons/Widgets/circle_share.dart';
import '../../../commons/Widgets/tag_widget.dart'; import '../../../commons/Widgets/tag_widget.dart';
import '../../../commons/colors/app_color.dart'; import '../../../commons/colors/app_color.dart';
import '../../../commons/widgets/circle_share.dart';
import '../../../commons/widgets/more_dynamic_tip.dart'; import '../../../commons/widgets/more_dynamic_tip.dart';
import '../../../net/api.dart'; import '../../../net/api.dart';
import '../../../utils/SharedPreferencesHelper.dart'; import '../../../utils/SharedPreferencesHelper.dart';
@ -880,38 +880,8 @@ class _AllCircleItemState extends State<AllCircleItem>
await SharedPreferencesHelper.getInstance(); await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId(); String myUserId = sp.getMyUserId();
// if (lists.user?.id!.toString() == myUserId) {
Get.toNamed(Routes.UserInfoPage, Get.toNamed(Routes.UserInfoPage,
arguments: lists.user?.id!.toString()); arguments: lists.user?.id!.toString());
// return;
// }
// if (widget.bean.is_limit &&
// widget.bean.amount > 0) {
// await refreshCircleData();
// }
// if (widget.bean.is_limit &&
// widget.bean.amount > 0) {
// showJoinCiclePiker(
// widget.bean.id.toString(),
// widget.bean.amount.toString(),
// widget.bean.oldAmount.toString(),
// 1, (payResult) {
// widget.bean.is_limit = false;
// if (Get.isRegistered<CircleLogic>()) {
// var logic = Get.find<CircleLogic>();
// for (var element in logic.circle.lists) {
// if (element.id == widget.bean.id) {
// element.is_limit = false;
// element.isJoin = true;
// }
// }
// logic.update();
// }
// Get.back();
// }, widget.bean.ios_item);
// return;
// }
// pushHomePage(lists, lists.id.toString());
}, },
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
@ -1123,6 +1093,22 @@ class _AllCircleItemState extends State<AllCircleItem>
), ),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -1165,7 +1151,7 @@ class _AllCircleItemState extends State<AllCircleItem>
}, },
child: Image.asset( child: Image.asset(
getCircleImage('chat'), getCircleImage('chat'),
width: 60.sp, width: 50.sp,
), ),
) )
], ],
@ -1604,6 +1590,22 @@ class _AllCircleItemState extends State<AllCircleItem>
: Container(), : Container(),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -1646,7 +1648,7 @@ class _AllCircleItemState extends State<AllCircleItem>
}, },
child: Image.asset( child: Image.asset(
getCircleImage('chat'), getCircleImage('chat'),
width: 60.sp, width: 50.sp,
), ),
) )
], ],

View File

@ -2330,6 +2330,22 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
), ),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,
@ -2375,7 +2391,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
}, },
child: Image.asset( child: Image.asset(
getCircleImage('chat'), getCircleImage('chat'),
width: 60.sp, width: 50.sp,
), ),
) )
], ],
@ -2902,6 +2918,22 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
: Container(), : Container(),
Row( Row(
children: [ children: [
InkWell(
onTap: () {
Get.bottomSheet(
CallOutShareDialog('','',lists), isScrollControlled: true,
enableDrag: false
);
},
child: Container(
margin: EdgeInsets.only(right: 5.sp),
child: Image.asset(
getCircleImage('forward'),
width: 20.sp,
),
),
),
Expanded( Expanded(
child: Container( child: Container(
height: 30.sp, height: 30.sp,

View File

@ -30,12 +30,10 @@ class Help_BackLogic extends GetxController {
} }
getToken() async { getToken() async {
// var data = await DioManager.instance.get(url: Api.tokenNoLogin, params: {}); var data = await DioManager.instance.get(url: Api.tokenNoLogin, params: {});
// var bean = BaseResponse<QnTokenData>.fromJson( if(data['code'] == 200){
// data, (data) => QnTokenData.fromJson(data)); quToken = data['data']['token'];
// if(data['code'] == 200){ }
// quToken = data['data']['token'];
// }
} }
Future getImageFile() async { Future getImageFile() async {
@ -66,18 +64,20 @@ class Help_BackLogic extends GetxController {
showOKToast('请输入手机号'); showOKToast('请输入手机号');
} else if (textEditingController.text.isEmpty) { } else if (textEditingController.text.isEmpty) {
showOKToast('请输入您的问题'); showOKToast('请输入您的问题');
} else if (photoController.text.length != 11) {
showOKToast('请输入正确的手机号');
} else { } else {
// var result = await DioManager.instance.postBody(url: Api.registerFeedback, params: { var result = await DioManager.instance.postBody(url: Api.registerFeedback, params: {
// "content": textEditingController.text, "content": textEditingController.text,
// "images": imaglist, "images": imaglist,
// "mobile": photoController.text "mobile": photoController.text
// }); });
// if (result['code'] == 200) { if (result['code'] == 200) {
// showOKToast('提交成功'); showOKToast('提交成功');
// Get.back(); Get.back();
// } else { } else {
// showOKToast(result['msg']); showOKToast(result['msg']);
// } }
} }
} }

View File

@ -55,7 +55,7 @@ class Help_BackPage extends StatelessWidget {
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: padding:
EdgeInsets.only(left: 16.0.sp, right: 10.sp,top: 4.sp), EdgeInsets.only(left: 16.0.sp, right: 10.sp),
child: Text( child: Text(
"+86", "+86",
style: TextStyle( style: TextStyle(
@ -71,6 +71,8 @@ class Help_BackPage extends StatelessWidget {
controller: logic.photoController, controller: logic.photoController,
textAlignVertical: TextAlignVertical.center, textAlignVertical: TextAlignVertical.center,
maxLines: 1, maxLines: 1,
keyboardType: TextInputType.phone,
maxLength: 11,
decoration: InputDecoration( decoration: InputDecoration(
hintText: '请输入手机号,方便我们联系您', hintText: '请输入手机号,方便我们联系您',
counterText:"", counterText:"",

View File

@ -59,7 +59,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
String inventStr = '邀请好友'; String inventStr = '邀请好友';
String inventTipStr = '邀请更多圈友一起玩'; String inventTipStr = '邀请更多圈友一起玩';
Widget currentPage = Container(); Widget currentPage = Container();
final GlobalKey widgetKey = GlobalKey();
final HomeState state = HomeState(); final HomeState state = HomeState();
DateTime now = DateTime.now(); DateTime now = DateTime.now();
@ -116,7 +116,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
sp.setFirstPeopleSendCallOut(); sp.setFirstPeopleSendCallOut();
loadEnvTypeData(); loadEnvTypeData();
await checkInfo(); checkInfo();
// //
connectListener(); connectListener();
getIMData(); getIMData();
@ -184,19 +184,20 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
Map<String, dynamic> jsonData = json.decode(customData); Map<String, dynamic> jsonData = json.decode(customData);
int event = jsonData['event']; int event = jsonData['event'];
Map<String, dynamic> content = jsonData['content'] ?? []; Map<String, dynamic> content = jsonData['content'] ?? [];
BuildContext? context = widgetKey.currentContext;
switch (event) { switch (event) {
case 1: // case 1: //
String ageMsg = String ageMsg =
"${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}"; "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
if (content['isFollow'] == 1) { if (content['isFollow'] == 1) {
// //
showFloatingButtonOverlay(Get.context!, content['nickname'], showFloatingButtonOverlay(context!, content['nickname'],
ageMsg, content['avatarThumb'], 3, () { ageMsg, content['avatarThumb'], 3, () {
pushChatPage(content['id'].toString(), content['imId'], pushChatPage(content['id'].toString(), content['imId'],
content['nickname']); content['nickname']);
}); });
} else { } else {
showFloatingButtonOverlay(Get.context!, content['nickname'], showFloatingButtonOverlay(context!, content['nickname'],
ageMsg, content['avatarThumb'], 1, () { ageMsg, content['avatarThumb'], 1, () {
setLike(content['id'].toString()); setLike(content['id'].toString());
}); });
@ -208,7 +209,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
String ageMsg = String ageMsg =
"${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}"; "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
showFloatingButtonOverlay(Get.context!, content['nickname'], ageMsg, showFloatingButtonOverlay(context!, content['nickname'], ageMsg,
content['avatarThumb'], 2, () { content['avatarThumb'], 2, () {
pushChatPage(content['id'].toString(), content['imId'], pushChatPage(content['id'].toString(), content['imId'],
content['nickname']); content['nickname']);
@ -249,20 +250,21 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
Map jsonData = jsonDecode(message.customElem!.data!); Map jsonData = jsonDecode(message.customElem!.data!);
if (jsonData.containsKey('event')) { if (jsonData.containsKey('event')) {
String event = jsonData['event'].toString(); String event = jsonData['event'].toString();
BuildContext? context = widgetKey.currentContext;
if (int.parse(event) == 1) { if (int.parse(event) == 1) {
Map content = jsonData['content']; Map content = jsonData['content'];
String ageMsg = String ageMsg =
"${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}"; "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
if (content['isFollow'] == 1) { if (content['isFollow'] == 1) {
// //
showFloatingButtonOverlay(Get.context!, content['nickname'], showFloatingButtonOverlay(context!, content['nickname'],
ageMsg, content['avatarThumb'], 3, () { ageMsg, content['avatarThumb'], 3, () {
pushChatPage(content['id'].toString(), content['imId'], pushChatPage(content['id'].toString(), content['imId'],
content['nickname']); content['nickname']);
}); });
} else { } else {
showFloatingButtonOverlay(Get.context!, content['nickname'], showFloatingButtonOverlay(context!, content['nickname'],
ageMsg, content['avatarThumb'], 1, () { ageMsg, content['avatarThumb'], 1, () {
setLike(content['id'].toString()); setLike(content['id'].toString());
}); });
@ -272,7 +274,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
String ageMsg = String ageMsg =
"${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}"; "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
showFloatingButtonOverlay(Get.context!, content['nickname'], showFloatingButtonOverlay(context!, content['nickname'],
ageMsg, content['avatarThumb'], 2, () { ageMsg, content['avatarThumb'], 2, () {
pushChatPage(content['id'].toString(), content['imId'], pushChatPage(content['id'].toString(), content['imId'],
content['nickname']); content['nickname']);
@ -665,10 +667,10 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
final logic = Get.put(MinefragmentLogic()); final logic = Get.put(MinefragmentLogic());
logic.loadData(); logic.loadData();
} else if (index == 3) { } else if (index == 3) {
if (Get.isRegistered<MsgLogic>()) {
final logic = Get.find<MsgLogic>(); final logic = Get.find<MsgLogic>();
EventBusManager.fire(MsgRecommendCardRefresh()); logic.loadData();
logic.loadChatData(); }
logic.getVisitorMsgsData();
} }
update(); update();
} }
@ -747,7 +749,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
}); });
} }
void loadEnvTypeData() async { loadEnvTypeData() async {
var data = await DioManager.instance.get(url: Api.getAppEnv); var data = await DioManager.instance.get(url: Api.getAppEnv);
if (data['code'] == 200) { if (data['code'] == 200) {
isProd = data['data'] == 0; isProd = data['data'] == 0;

View File

@ -155,6 +155,7 @@ class _HomePageState extends State<HomePage>
return GetBuilder(builder: (HomeLogic controller) { return GetBuilder(builder: (HomeLogic controller) {
return ExitAppConfirmation( return ExitAppConfirmation(
child: Scaffold( child: Scaffold(
key: logic.widgetKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: const Color.fromRGBO(15, 10, 31, 1.0), backgroundColor: const Color.fromRGBO(15, 10, 31, 1.0),
bottomNavigationBar: Container( bottomNavigationBar: Container(

View File

@ -420,7 +420,7 @@ class _ShareState extends State<Share> {
_saveLocalImage() async { _saveLocalImage() async {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); ui.Image image = await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -457,7 +457,7 @@ class _ShareState extends State<Share> {
SmartDialog.showLoading(msg:'正在生成分享图片...'); SmartDialog.showLoading(msg:'正在生成分享图片...');
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); ui.Image image = await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';

View File

@ -511,11 +511,14 @@ class LoginPage extends StatelessWidget {
)), )),
Positioned(top: MediaQuery.of(context).padding.top + 15.sp,right: 15.sp,child: InkWell( Positioned(top: MediaQuery.of(context).padding.top + 15.sp,right: 15.sp,child: InkWell(
onTap: () { onTap: () {
Get.toNamed(Routes.HelpBack);
navigateToReport();
}, },
child: Text('❓在线反馈',style: TextStyle(color: AppColor.mainColor,fontSize: 15.sp),), child: Row(
children: [
Icon(Icons.question_mark,color: AppColor.mainColor,size: 15.sp,),
Text('在线反馈',style: TextStyle(color: AppColor.mainColor,fontSize: 15.sp),),
],
),
)), )),
], ],
); );

View File

@ -183,7 +183,7 @@ class MinefragmentLogic extends GetxController {
requestUserId = homeLogic.model!.id.toString(); requestUserId = homeLogic.model!.id.toString();
var result = await DioManager.instance.get( var result = await DioManager.instance.get(
url: Api.userTrends, url: Api.trends,
params: {'userId': requestUserId, 'page': dynamicPage, 'pageSize': 10}); params: {'userId': requestUserId, 'page': dynamicPage, 'pageSize': 10});
if (result['code'] == 200) { if (result['code'] == 200) {
if (dynamicPage == 1) { if (dynamicPage == 1) {

View File

@ -370,8 +370,16 @@ class _MinefragmentPageState extends State<MinefragmentPage>
isShowMenu = false; isShowMenu = false;
logic.update(); logic.update();
}), }),
if (logic.isShowserveTip) if (logic.isShowserveTip && homelogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowserveTip = false;
logic.setSpServeTip();
logic.update();
logic.isShowMoreTip = true;
logic.update();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -399,6 +407,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
width: 32.sp, width: 32.sp,
)), )),
], ],
),
), ),
)), )),
@ -452,8 +461,14 @@ class _MinefragmentPageState extends State<MinefragmentPage>
), ),
), ),
), ),
if (logic.isShowMoreTip) if (logic.isShowMoreTip && homelogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowMoreTip = false;
logic.setSpMoreTip();
logic.update();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -490,6 +505,7 @@ class _MinefragmentPageState extends State<MinefragmentPage>
)), )),
], ],
), ),
),
)), )),
], ],
); );

View File

@ -6,8 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:notification_permissions/notification_permissions.dart'; import 'package:notification_permissions/notification_permissions.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:scroll_to_index/scroll_to_index.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../commons/Widgets/base_tip_widget.dart'; import '../../commons/Widgets/base_tip_widget.dart';
import '../../utils/SharedPreferencesHelper.dart'; import '../../utils/SharedPreferencesHelper.dart';
import '../circle/logic.dart'; import '../circle/logic.dart';
@ -19,6 +18,7 @@ class MsgLogic extends GetxController {
List<UserListItem> lists = []; List<UserListItem> lists = [];
ScrollController listScrollController = ScrollController(); ScrollController listScrollController = ScrollController();
AutoScrollController scrollController = AutoScrollController();
List chatList = []; List chatList = [];
int total = 0; int total = 0;
@ -43,77 +43,76 @@ class MsgLogic extends GetxController {
bool isShowTip = false; bool isShowTip = false;
@override @override
void onInit() async { void onInit() {
// TODO: implement onInit // TODO: implement onInit
super.onInit(); super.onInit();
checkNotificationPermission(); checkNotificationPermission();
loadMyInfoData(); loadMyInfoData();
// loadChatData(); loadChatData();
loadLikeData(); loadLikeData();
loadStatusData(); loadStatusData();
getVisitorMsgsData(); getVisitorMsgsData();
getBannerData(); getBannerData();
getSpData();
}
Future<void> getSpData() async {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
isShowTip = sp.getBool(SharedPreferencesHelper.msgOpTip) ?? true; isShowTip = sp.getBool(SharedPreferencesHelper.msgOpTip) ?? true;
}
loadData() {
loadMyInfoData();
loadChatData();
loadLikeData();
loadStatusData();
}
loadLikeData() async {
var data =
await DioManager.instance.get(url: Api.fansList, params: {
'page':1,
'page_size':3
});
var bean = BaseResponse<UserList>.fromJson(data, (data) => UserList.fromJson(data));
if (bean.isSuccess()) {
lists.addAll(bean.data.lists);
}
update(); update();
} }
checkNotificationPermission() async { loadData() async {
await loadMyInfoData();
await loadChatData(isFresh: false);
await loadLikeData(isFresh: false);
await loadStatusData(isFresh: false);
await getVisitorMsgsData(isFresh: false);
update();
}
var status = await NotificationPermissions.getNotificationPermissionStatus(); loadLikeData({bool isFresh = true}) async {
var data = await DioManager.instance
.get(url: Api.fansList, params: {'page': 1, 'page_size': 3});
var bean = BaseResponse<UserList>.fromJson(
data, (data) => UserList.fromJson(data));
if (bean.isSuccess()) {
lists.addAll(bean.data.lists);
}
if (isFresh) {
update();
}
}
checkNotificationPermission() async {
var status =
await NotificationPermissions.getNotificationPermissionStatus();
if (status.index == 2) { if (status.index == 2) {
isShowNotifyTip = true; isShowNotifyTip = true;
update(); update();
} }
} }
void loadChatData() async { loadChatData({bool isFresh = true}) async {
var data = var data = await DioManager.instance.post(
await DioManager.instance.post(url: Api.recommendQuickChatUser, params: { url: Api.recommendQuickChatUser, params: {'page': 1, 'pageSize': 8});
'page':1,
'pageSize':8
});
if (data['code'] == 200) { if (data['code'] == 200) {
total = data['data']['total']; total = data['data']['total'];
chatList = data['data']['lists']; chatList = data['data']['lists'];
} else if (data['code'] == 404) { } else if (data['code'] == 404) {
// showOKToast('网络不流畅哦,请检查网络情况'); // showOKToast('网络不流畅哦,请检查网络情况');
} }
if (isFresh) {
// vicinityList = bean.data.lists;
update(); update();
} }
}
Future<bool> queryQuickStart() async { Future<bool> queryQuickStart() async {
var data = var data = await DioManager.getInstance().get(url: Api.queryQuickStart);
await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) { if (data["code"] == 200) {
if (data["data"] == 2 || data["data"] == 0) { if (data["data"] == 2 || data["data"] == 0) {
var data = await DioManager.getInstance() var data = await DioManager.getInstance().get(url: Api.startQuick);
.get(url: Api.startQuick);
if (data["code"] == 200) { if (data["code"] == 200) {
showOKToast("已冲到第一"); showOKToast("已冲到第一");
isStart = true; isStart = true;
@ -123,7 +122,6 @@ class MsgLogic extends GetxController {
showRechargeScreenDialog('quick_chat_open'); showRechargeScreenDialog('quick_chat_open');
} }
} else if (data["data"] == 1) { } else if (data["data"] == 1) {
showOKToast("速聊开启中"); showOKToast("速聊开启中");
return false; return false;
} }
@ -131,15 +129,13 @@ class MsgLogic extends GetxController {
return false; return false;
} }
stopQueryQuick()async{ stopQueryQuick() async {
var data = var data = await DioManager.getInstance().get(url: Api.stopQuick);
await DioManager.getInstance().get(url: Api.stopQuick);
if (data["code"] == 200) { if (data["code"] == 200) {
showOKToast('操作成功'); showOKToast('操作成功');
isStart = false; isStart = false;
loadChatData(); loadChatData();
} }
} }
Future<bool> callOrhers() async { Future<bool> callOrhers() async {
@ -150,13 +146,12 @@ class MsgLogic extends GetxController {
return true; return true;
} else if (data["code"] == 31201) { } else if (data["code"] == 31201) {
showRechargeScreenDialog('quick_chat_call'); showRechargeScreenDialog('quick_chat_call');
} else{ } else {
showOKToast(data["msg"]); showOKToast(data["msg"]);
} }
return false; return false;
} }
showTipPop() { showTipPop() {
Get.bottomSheet( Get.bottomSheet(
CupertinoActionSheet( CupertinoActionSheet(
@ -181,7 +176,7 @@ class MsgLogic extends GetxController {
Get.back(); Get.back();
addUmengTag('弹窗-一键呼唤三十位您想认识的人'); addUmengTag('弹窗-一键呼唤三十位您想认识的人');
}, },
child: const Text('一键呼唤三十位您想认识的人'), child: const Text('一键召唤30位想认识的人/10元'),
), ),
CupertinoActionSheetAction( CupertinoActionSheetAction(
onPressed: () { onPressed: () {
@ -203,11 +198,10 @@ class MsgLogic extends GetxController {
isScrollControlled: true); isScrollControlled: true);
} }
void getVisitorMsgsData() async { getVisitorMsgsData({bool isFresh = true}) async {
if (isMsgCountLoad) return; if (isMsgCountLoad) return;
isMsgCountLoad = true; isMsgCountLoad = true;
var data = var data = await DioManager.getInstance().get(url: Api.getVisitorMsgs);
await DioManager.getInstance().get(url: Api.getVisitorMsgs);
if (data["code"] == 200) { if (data["code"] == 200) {
visitorMsgs = data['data']['msgs'] ?? []; visitorMsgs = data['data']['msgs'] ?? [];
recent_visit_count_new = data['data']['unreadCount'] ?? 0; recent_visit_count_new = data['data']['unreadCount'] ?? 0;
@ -215,12 +209,13 @@ class MsgLogic extends GetxController {
await loadInterestedInMeUsersData(); await loadInterestedInMeUsersData();
} }
isMsgCountLoad = false; isMsgCountLoad = false;
if (isFresh) {
update(); update();
} }
}
void getBannerData() async { void getBannerData() async {
var data = var data = await DioManager.getInstance().get(url: Api.messageBanner);
await DioManager.getInstance().get(url: Api.messageBanner);
if (data["code"] == 200) { if (data["code"] == 200) {
bannerList = data['data']; bannerList = data['data'];
update(); update();
@ -228,10 +223,10 @@ class MsgLogic extends GetxController {
update(); update();
} }
loadVisitorTotalData() async { loadVisitorTotalData() async {
var data = var data = await DioManager.instance.get(
await DioManager.instance.get(url: Api.getVisitorTotal,); url: Api.getVisitorTotal,
);
if (data['code'] == 200) { if (data['code'] == 200) {
int sameCityCount = data['data']['sameCityCount']; int sameCityCount = data['data']['sameCityCount'];
int wantMeetCount = data['data']['wantMeetCount']; int wantMeetCount = data['data']['wantMeetCount'];
@ -242,25 +237,21 @@ class MsgLogic extends GetxController {
} else if (wantMeetCount > 0) { } else if (wantMeetCount > 0) {
bannerTip = '${wantMeetCount}人是你想认识的圈友'; bannerTip = '${wantMeetCount}人是你想认识的圈友';
} }
update();
} }
} }
loadInterestedInMeUsersData() async { loadInterestedInMeUsersData() async {
var data = var data = await DioManager.instance.get(url: Api.interestedInMeUsers);
await DioManager.instance.get(url: Api.interestedInMeUsers);
if (data['code'] == 200) { if (data['code'] == 200) {
List infoList = data['data']['lists']; List infoList = data['data']['lists'];
if (infoList.isNotEmpty) { if (infoList.isNotEmpty) {
moreCount = data['data']['total']; moreCount = data['data']['total'];
} }
update();
} }
} }
void loadStatusData() async { loadStatusData({bool isFresh = true}) async {
var data = var data = await DioManager.getInstance().get(url: Api.queryQuickStart);
await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) { if (data["code"] == 200) {
if (data["data"] == 0 || data["data"] == 2) { if (data["data"] == 0 || data["data"] == 2) {
isStart = false; isStart = false;
@ -268,10 +259,12 @@ class MsgLogic extends GetxController {
isStart = true; isStart = true;
} }
} }
if (isFresh) {
update(); update();
} }
}
void loadMyInfoData() async { loadMyInfoData() async {
var data = await DioManager.instance.get(url: Api.getUserMine); var data = await DioManager.instance.get(url: Api.getUserMine);
var bean = BaseResponse<MineResponseBean>.fromJson( var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data)); data, (data) => MineResponseBean.fromJson(data));

View File

@ -19,6 +19,7 @@ import 'package:url_launcher/url_launcher.dart';
import '../../commons/Widgets/today_people_dialog.dart'; import '../../commons/Widgets/today_people_dialog.dart';
import '../../utils/cache_img.dart'; import '../../utils/cache_img.dart';
import '../home/logic.dart';
import 'TIMUIKitConversation/tim_uikit_conversation.dart'; import 'TIMUIKitConversation/tim_uikit_conversation.dart';
import 'logic.dart'; import 'logic.dart';
@ -34,18 +35,18 @@ class MsgPage extends StatefulWidget {
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin { class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
final ctr = Get.lazyPut(() => MsgLogic()); final ctr = Get.lazyPut(() => MsgLogic());
// final controller = Get.find<MsgLogic>(); // final controller = Get.find<MsgLogic>();
var logic = Get.find<CircleLogic>(); var logic = Get.find<MsgLogic>();
var homeLogic = Get.find<HomeLogic>();
void getPipeiData() async { void getPipeiData() async {
var data = await DioManager.instance.get(url: Api.getMatch); var data = await DioManager.instance.get(url: Api.getMatch);
if (data['code'] == 200) { if (data['code'] == 200) {
// //
bool isSuccess = await createCustomMsg( bool isSuccess = await createCustomMsg(
data['data']['account_id'] data['data']['account_id'].toString().split('_').last,
.toString()
.split('_')
.last,
data['data']['account_id']); data['data']['account_id']);
if (!isSuccess) { if (!isSuccess) {
await sendTextMsg(data['data']['account_id']); await sendTextMsg(data['data']['account_id']);
@ -76,27 +77,25 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: Stack( body: GetBuilder(builder: (MsgLogic controller) {
return Stack(
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
SafeArea( SafeArea(
child: Column( child: Column(
children: [ children: [
GetBuilder(builder: (MsgLogic controller) { Column(
return Column(
children: [ children: [
navigatorItem(controller), navigatorItem(controller),
if (controller.isShowNotifyTip) notifyWidget( if (controller.isShowNotifyTip) notifyWidget(controller),
controller),
tipWidget(controller), tipWidget(controller),
reconmandWidget(controller), reconmandWidget(controller),
], ],
); ),
}),
Expanded( Expanded(
child: TIMConversation( child: TIMConversation(
autoScrollController: logic.scrollController, autoScrollController: controller.scrollController,
scrollController: logic.listScrollController, scrollController: controller.listScrollController,
onTapItem: (selectedConv) async { onTapItem: (selectedConv) async {
String type = selectedConv.userID!.split('_')[2]; String type = selectedConv.userID!.split('_')[2];
if (int.parse(type) == 11) { if (int.parse(type) == 11) {
@ -104,8 +103,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
arguments: selectedConv); arguments: selectedConv);
return; return;
} }
await Get.toNamed( await Get.toNamed(Routes.Chat, arguments: selectedConv);
Routes.Chat, arguments: selectedConv);
}, },
)) ))
], ],
@ -113,8 +111,8 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
Positioned( Positioned(
bottom: 20.sp, bottom: 20.sp,
right: 10.sp, right: 10.sp,
child: GetBuilder(builder: (MsgLogic controller) { child: controller.bannerList.isNotEmpty
return controller.bannerList.isNotEmpty ? Container( ? Container(
width: 75.sp, width: 75.sp,
height: 80.sp, height: 80.sp,
child: Swiper( child: Swiper(
@ -129,12 +127,14 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
onTap: () { onTap: () {
if (item['type'] == 1) { if (item['type'] == 1) {
if (item['scene'] == 'internal') { if (item['scene'] == 'internal') {
Get.toNamed(Routes.WebViewPage, arguments: { Get.toNamed(Routes.WebViewPage,
arguments: {
'title': "", 'title': "",
"url": item['param'] "url": item['param']
}); });
} else { } else {
launch(item['param'], forceSafariVC: false); launch(item['param'],
forceSafariVC: false);
} }
} else if (item['type'] > 1) { } else if (item['type'] > 1) {
pushPage(item['scene'], item['param']); pushPage(item['scene'], item['param']);
@ -151,58 +151,67 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
}, },
itemCount: controller.bannerList.length, itemCount: controller.bannerList.length,
), ),
) : Container(); )
})), : Container()),
Positioned( Positioned(
child: GetBuilder<MsgLogic>(builder: (logic) { child: !controller.isShowTip || !homeLogic.isProd
if (!logic.isShowTip) { ? Container()
return Container(); : InkWell(
} onTap: () {
return Container( controller.isShowTip = false;
controller.update();
controller.setSpTip();
},
child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
color: Colors.black.withOpacity(0.7), color: Colors.black.withOpacity(0.7),
child: Stack( child: Stack(
children: [ children: [
Positioned( Positioned(
top: MediaQuery top: MediaQuery.of(context).padding.top +
.of(context) 88.sp +
.padding 70.sp +
.top + 88.sp + 70.sp + (logic.isShowNotifyTip ? 40.sp : 0.0), (controller.isShowNotifyTip
? 40.sp
: 0.0),
left: 0.sp, left: 0.sp,
child: Column( child: Column(
children: [ children: [
Transform( Transform(
alignment: Alignment.center, alignment: Alignment.center,
transform: Matrix4.rotationY(3.1416), // π radians = 180 degrees transform: Matrix4.rotationY(
3.1416), // π radians = 180 degrees
child: Image.asset( child: Image.asset(
getBaseImage('pop_top_right'), getBaseImage('pop_top_right'),
width: 150.sp, width: 150.sp,
), ),
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 0.sp), margin:
child: Text('开启吸引更多人找您聊天', EdgeInsets.only(bottom: 0.sp),
style: TextStyle(color: Colors.white, child: Text(
'开启吸引更多人找您聊天',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.bold),)), fontWeight: FontWeight.bold),
)),
], ],
)), )),
Positioned( Positioned(
top: MediaQuery top: MediaQuery.of(context).padding.top +
.of(context) 88.sp +
.padding (controller.isShowNotifyTip
.top + 88.sp + (logic.isShowNotifyTip ? 40.sp : 0.0), ? 40.sp
: 0.0),
left: 10.sp, left: 10.sp,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
logic.isShowTip = false; controller.isShowTip = false;
logic.update(); controller.update();
logic.setSpTip(); controller.setSpTip();
logic.showTipPop(); controller.showTipPop();
// _showBottomSheet(context);
}, },
child: Column( child: Column(
children: [ children: [
@ -213,21 +222,23 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
SizedBox( SizedBox(
height: 4.sp, height: 4.sp,
), ),
Text('冲到第一', Text(
'冲到第一',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 12.sp), color: Colors.white,
fontSize: 12.sp),
), ),
], ],
), ),
), ),
), ),
], ],
), ),
),
)),
],
); );
})), }));
],
));
} }
circleWidget(String url, String userId, {double width = 30}) { circleWidget(String url, String userId, {double width = 30}) {
@ -649,14 +660,15 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
width: 25.sp, width: 25.sp,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(6.5.sp),
BorderRadius.circular(6.5.sp),
gradient: sexBgGradient(info['gender'] ?? 0)), gradient: sexBgGradient(info['gender'] ?? 0)),
child: Text(getGenderStr(info['gender'] ?? 0), child: Text(
getGenderStr(info['gender'] ?? 0),
style: TextStyle( style: TextStyle(
color: sexBgColor(info['gender'] ?? 0), color: sexBgColor(info['gender'] ?? 0),
fontSize: 9.sp, fontSize: 9.sp,
),), ),
),
)) ))
: Container() : Container()
], ],

View File

@ -110,31 +110,37 @@ class PhotoinfoLogic extends GetxController {
} else { } else {
isCountingDown = false; isCountingDown = false;
timer?.cancel(); timer?.cancel();
update();
} }
}); });
} }
Future<void> getCode() async { Future<void> getCode() async {
if (newPhotoController.text.contains('@')) { if (type > 1) {
if (newPhotoController.text.isEmpty) {
showOKToast("请输入邮箱");
return;
}
if (!newPhotoController.text.isEmail) { if (!newPhotoController.text.isEmail) {
showOKToast("邮箱输入有误"); showOKToast("邮箱输入有误");
return; return;
} }
} else if(!GetUtils.isPhoneNumber(newPhotoController.text)){ } else if(type <= 1){
showOKToast("手机号输入有误"); if (newPhotoController.text.isEmpty) {
showOKToast("请输入手机号");
return; return;
} }
}
var data = await DioManager.instance.post(url: newPhotoController.text.contains('@') ? Api.sendEmailCode : Api.sendCode, params: {newPhotoController.text.contains('@') ? 'email': "phone": newPhotoController.text}); var data = await DioManager.instance.post(url: newPhotoController.text.contains('@') ? Api.sendEmailCode : Api.sendCode, params: {newPhotoController.text.contains('@') ? 'email': "phone": newPhotoController.text});
var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data)); var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data));
showOKToast(bean.msg); showOKToast(bean.msg);
if(kDebugMode){
if(bean.code==200){ if(bean.code==200){
codeController.text = bean.data!.code.toString(); // codeController.text = bean.data!.code.toString();
startCountdown(); startCountdown();
update(); update();
} }
}
} }

View File

@ -297,16 +297,13 @@ class PhotoinfoPage extends StatelessWidget {
// String password = logic.state.passwordController.text; // String password = logic.state.passwordController.text;
String newphoto = logic.newPhotoController.text; String newphoto = logic.newPhotoController.text;
String code = logic.codeController.text; String code = logic.codeController.text;
if (photo == "" || photo.length < 11) { if (photo == "") {
showOKToast("已绑定手机号输入有误"); showOKToast(type == 0 || type == 2 ? "请输入已绑定手机号" : '请输入已绑定邮箱');
return; return;
} }
// if(password==""){
// showToast("请输入密码"); if (newphoto == "") {
// return ; showOKToast(type == 0 ? "请输入新手机号" : type == 1 ? '请输入手机号' : type == 2 ? '请输入新邮箱' : '请输入邮箱');
// }
if (newphoto == "" || newphoto.length < 11) {
showOKToast("新手机号输入有误");
return; return;
} }
if (code == "") { if (code == "") {

View File

@ -251,7 +251,7 @@ class _QuickPageState extends State<QuickPage>
logic.callOrhers(); logic.callOrhers();
Get.back(); Get.back();
}, },
child: Text('一键召唤三十位您想认识的人'), child: Text('一键召唤30位想认识的人/10元'),
), ),
CupertinoActionSheetAction( CupertinoActionSheetAction(
onPressed: () { onPressed: () {

View File

@ -14,6 +14,7 @@ import 'state.dart';
class ReportLogic extends GetxController { class ReportLogic extends GetxController {
final ReportState state = ReportState(); final ReportState state = ReportState();
var userId = Get.arguments["userId"] ?? ""; var userId = Get.arguments["userId"] ?? "";
Map arg = Get.arguments;
int myPosition = -1; int myPosition = -1;
TextEditingController textEditingController = TextEditingController(); TextEditingController textEditingController = TextEditingController();
List<MyObject> arrList = <MyObject>[ List<MyObject> arrList = <MyObject>[
@ -48,8 +49,8 @@ class ReportLogic extends GetxController {
var data = await DioManager.instance.post(url: Api.postReport, params: { var data = await DioManager.instance.post(url: Api.postReport, params: {
"user_id": userId, "user_id": userId,
"words": textEditingController.text, "words": textEditingController.text,
"obj_type": 1, "obj_type": arg.containsKey('type') ? 2 : 1,
"obj_id": userId, "obj_id": arg.containsKey('objId') ? arg['objId']: userId,
"reason": arrList[myPosition].name, "reason": arrList[myPosition].name,
"album": myBean "album": myBean
}); });

View File

@ -400,7 +400,7 @@ class _SwiperPageState extends State<SwiperPage> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {

View File

@ -57,6 +57,8 @@ class UserinfoLogic extends GetxController {
bool isBlackBeen = false; bool isBlackBeen = false;
bool isDestroy = false; bool isDestroy = false;
bool isShowTime = false;
bool isFee = false; bool isFee = false;
List giftList = []; List giftList = [];
@ -154,6 +156,7 @@ class UserinfoLogic extends GetxController {
fetchMyAlbum(Api.getMyAlbum); fetchMyAlbum(Api.getMyAlbum);
loadDyanmicListData(); loadDyanmicListData();
loadBabyData(); loadBabyData();
loadMyTimeData();
} else { } else {
sendHotAction(8, userId); sendHotAction(8, userId);
@ -163,14 +166,12 @@ class UserinfoLogic extends GetxController {
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status"); fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
fetchIsBlack("${Api.setBlock + userId}/block"); fetchIsBlack("${Api.setBlock + userId}/block");
loadScoreData(userId); loadScoreData(userId);
} }
// SmartDialog.dismiss(); // SmartDialog.dismiss();
fetchQnToken(Api.getqiniuToken); fetchQnToken(Api.getqiniuToken);
loadGiftListData(); loadGiftListData();
loadRelationTypeFirstListData(); loadRelationTypeFirstListData();
loadMasterData(); loadMasterData();
} }
loadDyanmicListData() async { loadDyanmicListData() async {
@ -395,10 +396,10 @@ class UserinfoLogic extends GetxController {
} }
setLike() async { setLike() async {
if (isBlack || isDestroy) { // if (isBlack || isDestroy) {
showOKToast("喜欢失败,存在拉黑关系或者该账户已注销"); // showOKToast("喜欢失败,存在拉黑关系或者该账户已注销");
return; // return;
} // }
var data = await DioManager.instance.post( var data = await DioManager.instance.post(
url: "${Api.setLike + userId}/follow", url: "${Api.setLike + userId}/follow",
@ -626,7 +627,6 @@ class UserinfoLogic extends GetxController {
} }
showMasterPop(textEditingController) async { showMasterPop(textEditingController) async {
var myResult = await DioManager.instance var myResult = await DioManager.instance
.get(url: Api.getMaster, params: {'userId': homeLogic.model!.id!}); .get(url: Api.getMaster, params: {'userId': homeLogic.model!.id!});
if (myResult['code'] == 200) { if (myResult['code'] == 200) {
@ -637,6 +637,7 @@ class UserinfoLogic extends GetxController {
} }
} }
} }
bool isHave = false; bool isHave = false;
if (masterInfo.isEmpty) { if (masterInfo.isEmpty) {
var myResult = await DioManager.instance var myResult = await DioManager.instance
@ -647,7 +648,11 @@ class UserinfoLogic extends GetxController {
} }
var result = await DioManager.instance.get( var result = await DioManager.instance.get(
url: masterInfo.isEmpty ? isHave ? Api.bindBabyMore : Api.popBindBaby : Api.popLootBaby, url: masterInfo.isEmpty
? isHave
? Api.bindBabyMore
: Api.popBindBaby
: Api.popLootBaby,
params: {'userId': userId}); params: {'userId': userId});
if (result['code'] == 10000) { if (result['code'] == 10000) {
if (masterInfo.isEmpty) { if (masterInfo.isEmpty) {
@ -668,7 +673,7 @@ class UserinfoLogic extends GetxController {
String title, String content, String money, textEditingController) { String title, String content, String money, textEditingController) {
Get.bottomSheet( Get.bottomSheet(
isScrollControlled: true, isScrollControlled: true,
isDismissible:false, isDismissible: false,
InkWell( InkWell(
onTap: () { onTap: () {
FocusManager.instance.primaryFocus?.unfocus(); FocusManager.instance.primaryFocus?.unfocus();
@ -888,7 +893,9 @@ class UserinfoLogic extends GetxController {
child: Text( child: Text(
title.isEmpty title.isEmpty
? '👑成为TA的新主人' ? '👑成为TA的新主人'
: title.contains('新主人') ? '👑成为TA的新主人' : "👑成为TA的第一任", : title.contains('新主人')
? '👑成为TA的新主人'
: "👑成为TA的第一任",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 15, fontSize: 15,
@ -1197,6 +1204,35 @@ class UserinfoLogic extends GetxController {
}, },
); );
} }
void loadMyTimeData() async {
var result = await DioManager.instance.get(
url: Api.getShowUserTrendsConf,
);
if (result['code'] == 200) {
isShowTime = result['data']['value'] == 1;
update();
}
}
void setTimeStatus() async {
var result = await DioManager.instance.post(
url: Api.setShowUserTrendsConf, params: {'value': isShowTime ? 0 : 1});
if (result['code'] == 200) {
isShowTime = !isShowTime;
dynamicPage = 1;
showOKToast('操作成功');
if (isShowTime) {
loadDyanmicListData();
} else {
// showOKToast('记录的时光已被隐藏,点击右上角眼睛可展示哦~');
loadDyanmicListData();
}
update();
}
}
} }
class UserBean { class UserBean {

View File

@ -1397,7 +1397,22 @@ class MyTabbedScreenState extends State<UserinfoPage>
width: 4.sp, width: 4.sp,
), ),
_tabController.index == 1 _tabController.index == 1
? GestureDetector( ? Row(
children: [
if (logic.isMe)
InkWell(
onTap: () {
logic.setTimeStatus();
},
child: Image.asset(
getMineImage(
!logic.isShowTime
? 'no_show_icon'
: 'show_icon'),
width: 30.sp,
),
),
GestureDetector(
onTap: () async { onTap: () async {
if (!logic.isMe) { if (!logic.isMe) {
await logic.sendWantSee(); await logic.sendWantSee();
@ -1438,6 +1453,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
), ),
), ),
), ),
),
],
) )
: Container(), : Container(),
logic.isBlack || logic.isDestroy || logic.isBlackBeen logic.isBlack || logic.isDestroy || logic.isBlackBeen
@ -2493,7 +2510,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
top: 12.sp, left: 14.sp, right: 14.sp), top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注", "拉黑后,你将屏蔽对方的任何信息。若您喜欢了对方,将自动取消喜欢",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: const Color(0xCCF7FAFA), fontSize: 16.sp), color: const Color(0xCCF7FAFA), fontSize: 16.sp),

View File

@ -60,7 +60,7 @@ class _DynamicState extends State<Dynamic> with AutomaticKeepAliveClientMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<UserinfoLogic>(tag:Get.arguments.toString(),builder: (listLogic) { return GetBuilder<UserinfoLogic>(tag:Get.arguments.toString(),builder: (listLogic) {
return listLogic.dynamicList.isEmpty return listLogic.dynamicList.isEmpty
? noResultWidget() ? noResultWidget(tip:logic.isMe && !listLogic.isShowTime ? '记录的时光已被隐藏,点击右上角眼睛可展示哦~' : '正在等待被填充~')
: Container( : Container(
width: Get.width, width: Get.width,
// padding: EdgeInsets.only( // padding: EdgeInsets.only(

View File

@ -377,7 +377,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
), ),
Container( Container(
height: picHeight, height: picHeight,
margin: EdgeInsets.only(top: 5.sp), margin: EdgeInsets.only(top: 5.sp,bottom: 10.sp),
child: picHeight == 200.sp child: picHeight == 200.sp
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),

View File

@ -301,6 +301,17 @@ class World_call_outLogic extends GetxController {
} }
} }
readTipBannerData(Map info) async {
var result =
await DioManager.instance.post(url: Api.noticeRead,params: {
"id": info['id'],
"type": info['type']
});
if (result['code'] == 200) {
}
}
void getWelfareDetailData(String id,int index) async { void getWelfareDetailData(String id,int index) async {
var result = var result =
await DioManager.instance.get(url: Api.getWelfareDetail+id); await DioManager.instance.get(url: Api.getWelfareDetail+id);

View File

@ -295,9 +295,14 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
action = '前往观赏'; action = '前往观赏';
tip = tip =
'邀请大家免费观赏「${logic.bannerList[index]['gift']['name']}'; '邀请大家免费观赏「${logic.bannerList[index]['gift']['name']}';
} else { } else if (jump['scene'] == 'visit_big_backer'){
type = 2;
action = '立即拜访'; action = '立即拜访';
tip = '通过充值成为【乐园大金主】'; tip = '通过充值成为【乐园大金主】';
} else {
type = 3;
action = jump['btnText'];
tip = data['msg'];
} }
return Container( return Container(
// margin: EdgeInsets.only(left: 10.sp, right: 10.sp), // margin: EdgeInsets.only(left: 10.sp, right: 10.sp),
@ -326,7 +331,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
} else if (type == 1) { } else if (type == 1) {
logic.treatWatch( logic.treatWatch(
jump['param'].toString()); jump['param'].toString());
} else { } else if (type == 2){
Get.toNamed(Routes.UserInfoPage, Get.toNamed(Routes.UserInfoPage,
arguments: arguments:
data['user']['id'].toString(), data['user']['id'].toString(),
@ -335,6 +340,10 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
}); });
logic.bigBackerVisit( logic.bigBackerVisit(
jump['param'].toString()); jump['param'].toString());
} else {
// homelogic.
pushPage(jump['scene'].toString(),jump['param'].toString());
logic.readTipBannerData(data);
} }
if (logic.bannerList.isEmpty) { if (logic.bannerList.isEmpty) {
logic.loadBannerData(); logic.loadBannerData();
@ -414,8 +423,14 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
), ),
)), )),
if (logic.isShowTip) if (logic.isShowTip && homelogic.isProd)
Positioned( Positioned(
child: InkWell(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
},
child: Container( child: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
@ -462,6 +477,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
), ),
], ],
), ),
),
)), )),
], ],
)); ));

View File

@ -243,7 +243,6 @@ unlockingPayment(String cicleId, MyCallback myCallback) async {
myCallback(true); myCallback(true);
} }
}); });
// showToast(data.toString());
} else { } else {
showOKToast(bean.msg); showOKToast(bean.msg);
} }

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart'; import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import '../../circle_app/circle/logic.dart'; import '../../circle_app/circle/logic.dart';
import '../../circle_app/circle/state.dart';
import '../../circle_app/home/logic.dart'; import '../../circle_app/home/logic.dart';
import '../../circle_app/likelist/logic.dart'; import '../../circle_app/likelist/logic.dart';
import '../../circle_app/minefragment/logic.dart'; import '../../circle_app/minefragment/logic.dart';
@ -597,3 +598,578 @@ class _FollowMeDialogState extends State<FollowMeDialog> {
} }
} }
} }
class FollowDialog extends StatefulWidget {
Lists lists;
FollowDialog({super.key,required this.lists});
@override
_FollowDialogState createState() => new _FollowDialogState();
}
class _FollowDialogState extends State<FollowDialog> {
// TODO: add state variables and methods
List<UserListItem> lists = [];
List<V2TimUserFullInfo> conList = [];
bool isMore = true;
int page = 1;
bool isVip = true;
final RefreshController refreshController = RefreshController();
@override
void initState() {
// TODO: implement initState
super.initState();
loadMineInfo();
loadData();
}
@override
Widget build(BuildContext context) {
// TODO: add widget build method
return Scaffold(
backgroundColor: Colors.transparent,
body: Column(
children: [
Container(height: Get.height * 0.33,width: Get.width,),
Expanded(
child: Container(
color: Colors.black,
child: Column(
children: [
Container(
width: Get.width,
height: 36.sp,
child: Stack(
alignment: Alignment.center,
children: [
Text(
'最近聊过和喜欢我的',
style: TextStyle(
fontSize: 18.sp,
color: Colors.white
)),
Positioned(
right: 15.sp,
child: GestureDetector(
onTap: () {
Get.back();
},
child: Image.asset(
getCircleImage('close'),
width: 24.sp,),
))
],
),
),
Expanded(child: Stack(
children: [
SmartRefresher(
controller: refreshController,
// onRefresh: _onRefresh,
onLoading: () {
_onLoading();
},
enablePullDown: false,
enablePullUp: true,
child: ListView.builder(
padding: EdgeInsets.zero,
itemCount: lists.length + conList.length,
itemBuilder: (context, index) {
if (conList.length > index) {
return ConListItem(conList[index], index);
}
return ListItem(lists[index - conList.length], index - conList.length);
},
),
),
showGd()
],))
],
),
),
)
],
),
);
}
Widget showGd() {
double interval = 50;
List<String> urlList = [];
if (lists.length > 3) {
for (int i = 3; i < lists.length; i++) {
if (urlList.length < 3) {
print(lists[i].user.avatar);
urlList.add(lists[i].user.avatar);
} else {
break;
}
}
}
List<Widget> widgets = [];
switch (urlList.length) {
case 0:
widgets.add(Positioned(
left: (Get.width / 2) - 40,
child: circleWidget(""),
));
break;
case 1:
for (int i = 0; i < urlList.length; i++) {
var element = urlList[i];
// double xOffset = interval * i + xOffsetBase;
double let = (Get.width / 2) - 60;
if (element == '') {
element =
'https://i0.wp.com/picjumbo.com/wp-content/uploads/romantic-tropical-beach-with-villa-and-palms-during-beautiful-sunset-free-photo.jpg?w=600&quality=80';
}
widgets.add(Positioned(
left: let,
child: circleWidget(element),
));
}
widgets.add(Positioned(
left: (Get.width / 2) - 20,
child: circleWidget(""),
));
break;
case 2:
double xOffsetBase =
(Get.width + interval * urlList.length - 60.0 * urlList.length) *
0.25;
for (int i = 0; i < urlList.length; i++) {
var element = urlList[i];
// double xOffset = interval * i + xOffsetBase;
double let = ((Get.width / 2) - ((40 * urlList.length)) + (i * 40));
if (element == '') {
element =
'https://i0.wp.com/picjumbo.com/wp-content/uploads/romantic-tropical-beach-with-villa-and-palms-during-beautiful-sunset-free-photo.jpg?w=600&quality=80';
}
widgets.add(Positioned(
left: let,
child: circleWidget(element),
));
}
double xOffset = interval * urlList.length + xOffsetBase;
widgets.add(Positioned(
left: xOffset,
child: circleWidget(""),
));
break;
case 3:
// double xOffsetBase = (Get.width + interval * urlList.length - 60.0 * urlList.length) * 0.25;
for (int i = 0; i < urlList.length; i++) {
switch (i) {
case 0:
if (urlList[i] == '') {
urlList[i] =
'https://i0.wp.com/picjumbo.com/wp-content/uploads/romantic-tropical-beach-with-villa-and-palms-during-beautiful-sunset-free-photo.jpg?w=600&quality=80';
}
widgets.add(Positioned(
left: (Get.width / 2) - 100,
child: circleWidget(urlList[i]),
));
break;
case 1:
if (urlList[i] == '') {
urlList[i] =
'https://i0.wp.com/picjumbo.com/wp-content/uploads/romantic-tropical-beach-with-villa-and-palms-during-beautiful-sunset-free-photo.jpg?w=600&quality=80';
}
widgets.add(Positioned(
left: (Get.width / 2) - 60,
child: circleWidget(urlList[i]),
));
break;
case 2:
if (urlList[i] == '') {
urlList[i] =
'https://i0.wp.com/picjumbo.com/wp-content/uploads/romantic-tropical-beach-with-villa-and-palms-during-beautiful-sunset-free-photo.jpg?w=600&quality=80';
}
widgets.add(Positioned(
left: (Get.width / 2) - 20,
child: circleWidget(urlList[i]),
));
break;
}
}
widgets.add(Positioned(
left: (Get.width / 2) + 20,
child: circleWidget(""),
));
break;
}
return isVip
? Container()
: Positioned(
bottom: 150,
child: Container(
width: Get.width,
child: Column(
children: [
SizedBox(
height: 140.sp,
width: Get.width,
child: Stack(
alignment: Alignment.centerLeft,
children: widgets,
),
),
Container(
margin: EdgeInsets.only(bottom: 40.sp),
child: Text(
"TA们也喜欢你哦 \n"
"成为会员查看所有圈友信息",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 15.sp,
),
),
),
GestureDetector(
onTap: () {
showRechargeDialog();
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: AppColor.mainVerLinearGradient,
),
padding: EdgeInsets.symmetric(
vertical: 10.sp,
horizontal: 55.sp,
),
child: Text(
"开通会员查看更多访客",
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
),
),
),
),
],
),
),
);
}
circleWidget(String url, {double width = 80}) {
return GestureDetector(
onTap: () {
// openvi();
},
child: Stack(
alignment: Alignment.center,
children: [
Image.asset(
getCircleImage('more'),
width: width.sp,
height: width.sp,
),
url != null && url.contains("http")
? ClipOval(
child: CachedImg(
imageUrl: url,
width: (width - 1).sp,
height: (width - 1).sp,
fit: BoxFit.cover,
),
)
: Text(
url,
style: TextStyle(color: Color(0xffF756FF), fontSize: 12.sp),
)
],
));
}
Widget ConListItem(V2TimUserFullInfo item, int index) {
return InkWell(
onTap: () {
sendCallOutCustomMsg(
item.userID!,
jsonEncode(widget.lists.toJson()),
'分享[${widget.lists.user?.nickname ?? ''}]的喊话');
// if (isVip || index < 3) {
// if (widget.bean != null) {
// sendCircleCustomMsg(item.userID!, jsonEncode(widget.bean!.toJson()), '分享[${widget.bean!.title}]');
// } else {
// sendUserHomeCustomMsg(item.userID!,
// jsonEncode(widget.userInfoBean!.toJson()), '分享用户[${widget.userInfoBean!.nickname}]的主页');
// }
// Get.toNamed(AppRoutes.UserInfoActivity,
// arguments: item.user.id.toString());
// }
},
child: Container(
margin: EdgeInsets.only(bottom: 21.sp),
child: Row(
children: [
Stack(
children: [
ClipOval(
child: CachedImg(
fit: BoxFit.cover,
imageUrl: item.faceUrl!,
width: 40.sp,
height: 40.sp,
),
),
Positioned(
right: 0.sp,
// left: 0.sp,
bottom: 0.sp,
child: Image.asset(
getMsgImage(getGenderImg(item.role!)),
height: 13.sp,
)
)
],
),
SizedBox(width: 10.sp),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
item.nickName!,
style: TextStyle(
color: Colors.white70,
fontSize: 16.sp,
fontWeight: FontWeight.bold),
),
// Placeholder image
],
),
],
),
// Pla
const Spacer(),
],
),
),
);
}
Widget ListItem(UserListItem item, int index) {
return InkWell(
onTap: () {
sendCallOutCustomMsg(
'qpqz_dev_0_'+ item.user.id.toString(),
jsonEncode(widget.lists.toJson()),
'分享[${widget.lists.user?.nickname ?? ''}]的喊话');
},
child: ImageFiltered(
imageFilter: ImageFilter.blur(
sigmaX: (isVip || index < 3) ? 0 : 5,
sigmaY: (isVip || index < 3) ? 0 : 5,
),
child: Container(
margin: EdgeInsets.only(bottom: 21.sp),
child: Row(
children: [
Stack(
children: [
ClipOval(
child: CachedImg(
fit: BoxFit.cover,
imageUrl: item.user.avatarThumb,
width: 40.sp,
height: 40.sp,
),
),
Positioned(
right: 0.sp,
// left: 0.sp,
bottom: 0.sp,
child: Image.asset(
getMsgImage(getGenderImg(item.user.gender)),
height: 13.sp,
)
)
],
),
SizedBox(width: 10.sp),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
item.user.nickname,
style: TextStyle(
color: Colors.white70,
fontSize: 16.sp,
fontWeight: FontWeight.bold),
),
SizedBox(width: 4.sp),
// SizedBox(height: 8.sp),
// _buildInfoRow(item),
// Placeholder image
],
),
],
),
// Pla
const Spacer(),
],
),
),
),
);
}
Widget _buildInfoRow(UserListItem userInfoBean) {
String ageMsg = getAgeCOntent(
userInfoBean.user.gender,
userInfoBean.user.age,
userInfoBean.user.role,
userInfoBean.user.orientation);
return Row(
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp),
gradient: sexBgGradient(userInfoBean.user.gender),
),
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text(
ageMsg,
style: TextStyle(
color: sexBgColor(userInfoBean.user.gender),
fontSize: 10.sp,
),
),
),
SizedBox(width: 6.sp),
],
);
}
_onLoading() {
if (isMore) {
page = page + 1;
loadData();
}
}
showRechargeDialog() async {
Get.bottomSheet(
Scaffold(
backgroundColor: Colors.transparent,
body: Open_vip_tipPage(false,'visitor_list'),
),
isScrollControlled: true,
enableDrag: false).then((value) {
loadMineInfo();
});
}
void loadData() async {
List<V2TimUserFullInfo> stataionList = [];
if (conList.isEmpty) {
stataionList = await loadConverstationListData();
HomeLogic logic = Get.find<HomeLogic>();
var myelement;
try {
stataionList.forEach((element) {
String userId = element.userID!.split('_').last;
if (userId == logic.model!.id!.toString()) {
myelement = element;
}
});
} catch (e) {
}
if (myelement != null) {
stataionList.remove(myelement);
}
}
Map typeMap = {
'官方通知':1,
'活动驿站':2,
'会员中心':3,
'资产中心':4,
'乐园圈子':5,
'互动通知':6,
};
stataionList.forEach((element) {
if (!typeMap.containsKey(element.nickName ?? '')) {
conList.add(element);
}
});
var data = await DioManager.instance
.get(url: Api.fansList, params: {'page': page,'page_size':8});
var bean = BaseResponse<UserList>.fromJson(
data, (data) => UserList.fromJson(data));
if (bean.isSuccess()) {
List data = bean.data.lists;
if (data.isNotEmpty) {
data.forEach((element) {
bool isContain = false;
conList.forEach((user) {
if (element.user.imId == user.userID!) {
isContain = true;
}
});
if (!isContain) {
lists.add(element);
}
});
refreshController.loadComplete();
} else {
isMore = false;
refreshController.loadNoData();
}
} else if (bean.code == 21201){
isMore = false;
refreshController.loadNoData();
}
setState(() {
});
}
void loadMineInfo() async {
var data = await DioManager.instance.get(url: Api.getUserMine);
var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data));
if (bean.isSuccess()) {
isVip = true;
}
}
}

View File

@ -343,7 +343,7 @@ class _SignInDialogState extends State<SignInDialog> {
left: 0, left: 0,
top: 0, top: 0,
child: Image.asset( child: Image.asset(
getHomeImage('sign_check'), getMineImage("icon_pay_select"),
height: 20.sp, height: 20.sp,
)) ))
], ],

View File

@ -582,7 +582,7 @@ class _UserShareState extends State<UserShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -623,7 +623,7 @@ class _UserShareState extends State<UserShare> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';

View File

@ -411,7 +411,7 @@ class _VideoShareDialogState extends State<VideoShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) { if (byteData != null) {
@ -452,7 +452,7 @@ class _VideoShareDialogState extends State<VideoShareDialog> {
RenderRepaintBoundary boundary = RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary; _globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = ui.Image image =
await boundary.toImage(pixelRatio: ui.window.devicePixelRatio); await boundary.toImage(pixelRatio: 1.0);
ByteData? byteData = ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png)); await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = ''; String filePath = '';

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -27,27 +28,41 @@ import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat
import 'package:tencent_cloud_chat_uikit/data_services/core/core_services.dart'; import 'package:tencent_cloud_chat_uikit/data_services/core/core_services.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart'; import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart'; import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
import 'circle_app/login/login/logic.dart'; import 'circle_app/login/login/logic.dart';
import 'circle_app/splash/view.dart'; import 'circle_app/splash/view.dart';
/// routeObserver /// routeObserver
final RouteObserver<PageRoute> routeObserver = RouteObserver(); final RouteObserver<PageRoute> routeObserver = RouteObserver();
List filterPageList = [Routes.Login,Routes.SetPasswordPage,Routes.Complete_materialPage]; List filterPageList = [
Routes.Login,
Routes.SetPasswordPage,
Routes.Complete_materialPage
];
String currentPage = ''; String currentPage = '';
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance(); final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
final TUIChatSeparateViewModel chatSeparateViewModel = final TUIChatSeparateViewModel chatSeparateViewModel =
TUIChatSeparateViewModel(); TUIChatSeparateViewModel();
// navigatorKey
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
OverlayEntry? mainOverlayEntry; OverlayEntry? mainOverlayEntry;
void main() { void main() {
// setCustomErrorWidget(); if (!kDebugMode) {
FlutterError.onError = (FlutterErrorDetails details) {
// Bugly
FlutterBugly.uploadException(
message: details.exceptionAsString(),
detail: details.stack.toString() +
(Platform.isAndroid
? 'UIextraMessage.txt'
: 'UIcrash_attach.log'));
};
}
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: Colors.black, // systemNavigationBarColor: Colors.black, //
// statusBarColor: Colors.transparent, //
)); ));
FlutterBugly.postCatchedException(() async { FlutterBugly.postCatchedException(() async {
// ensureInitialized // ensureInitialized
@ -71,7 +86,6 @@ void main() {
); );
} }
}); });
} }
setCustomErrorWidget() { setCustomErrorWidget() {
@ -188,6 +202,7 @@ class MyApp extends StatefulWidget {
class _MyAppState extends State<MyApp> with WidgetsBindingObserver { class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
AppLifecycleState? _lastLifecycleState; AppLifecycleState? _lastLifecycleState;
// This widget is the root of your application. // This widget is the root of your application.
final List<String> _guideList = ['bg', 'home_back']; final List<String> _guideList = ['bg', 'home_back'];
@ -202,13 +217,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
void initState() { void initState() {
initIM(); initIM();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
if (!kDebugMode) {
FlutterError.onError = (FlutterErrorDetails details) {
// Bugly
FlutterBugly.uploadException(message: "${details.exception}:${details.stack}", detail:Platform.isAndroid ?
'UIextraMessage.txt' : 'UIcrash_attach.log');
};
}
PaintingBinding.instance.imageCache.maximumSizeBytes = 1024 * 1024 * 300; PaintingBinding.instance.imageCache.maximumSizeBytes = 1024 * 1024 * 300;
loadBgImage(); loadBgImage();
@ -350,8 +358,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
} }
}, },
// [](https://cloud.tencent.com/document/product/269/70746#callback) // [](https://cloud.tencent.com/document/product/269/70746#callback)
listener: V2TimSDKListener(onConnectSuccess: () { listener: V2TimSDKListener(onConnectSuccess: () {}));
}));
} }
loadBgImage() async { loadBgImage() async {
@ -385,6 +392,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
duration: const Duration(seconds: 2), duration: const Duration(seconds: 2),
child: GetMaterialApp( child: GetMaterialApp(
title: '微乐园', title: '微乐园',
navigatorKey: navigatorKey,
theme: ThemeData( theme: ThemeData(
splashColor: Colors.transparent, // splashColor: Colors.transparent, //
highlightColor: Colors.transparent, // highlightColor: Colors.transparent, //
@ -398,6 +406,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
GlobalWidgetsLocalizations.delegate, GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
RefreshLocalizations.delegate, RefreshLocalizations.delegate,
/// iOS一定要设置 /// iOS一定要设置
], ],
locale: const Locale('zh', 'CN'), locale: const Locale('zh', 'CN'),
@ -408,9 +417,10 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
navigatorObservers: [routeObserver], navigatorObservers: [routeObserver],
builder: (BuildContext context, Widget? child) { builder: (BuildContext context, Widget? child) {
return MediaQuery( return MediaQuery(
/// ///
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
child:FlutterSmartDialog( child: FlutterSmartDialog(
child: RefreshConfiguration( child: RefreshConfiguration(
footerTriggerDistance: 15.0, footerTriggerDistance: 15.0,
dragSpeedRatio: 0.91, dragSpeedRatio: 0.91,
@ -422,15 +432,17 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
enableLoadingWhenFailed: true, enableLoadingWhenFailed: true,
hideFooterWhenNotFull: false, hideFooterWhenNotFull: false,
enableBallisticLoad: true, child: child!, enableBallisticLoad: true, child: child!,
) )));
));
}, },
// Listen to route changes // Listen to route changes
routingCallback: (routing) { routingCallback: (routing) {
if (routing != null) { if (routing != null) {
String currentRoute = routing.current; String currentRoute = routing.current;
String previousRoute = routing.previous; String previousRoute = routing.previous;
if (currentRoute != Routes.Home && currentRoute != '/' && currentRoute != previousRoute && !filterPageList.contains(currentRoute)) { if (currentRoute != Routes.Home &&
currentRoute != '/' &&
currentRoute != previousRoute &&
!filterPageList.contains(currentRoute)) {
routeList.add(currentRoute); routeList.add(currentRoute);
addUmengPage(currentRoute); addUmengPage(currentRoute);
} }
@ -447,9 +459,15 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
} }
} }
void sendOpenSourceData(String source,{String userId = '',String params = ''}) async { void sendOpenSourceData(String source,
{String userId = '', String params = ''}) async {
// //
DateTime now = DateTime.now(); DateTime now = DateTime.now();
String formattedTime = DateFormat('yyyy-MM-dd HH:mm:ss').format(now); String formattedTime = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
var result = await DioManager.instance.post(url: Api.triggerLog,params: {'event':source,'createTime':formattedTime,'userId':userId,'params':params}); var result = await DioManager.instance.post(url: Api.triggerLog, params: {
'event': source,
'createTime': formattedTime,
'userId': userId,
'params': params
});
} }

View File

@ -74,6 +74,12 @@ class Api {
// //
static const activeUsers = '/user-service/follow/activeUsers'; static const activeUsers = '/user-service/follow/activeUsers';
//
static const getShowUserTrendsConf = '/user-service/user/config/getShowUserTrendsConf';
//
static const setShowUserTrendsConf = '/user-service/user/config/setShowUserTrendsConf';
// //
static const quickAnswerAll = 'up-service/quickAnswer/getAll'; static const quickAnswerAll = 'up-service/quickAnswer/getAll';
@ -470,11 +476,14 @@ class Api {
static const getWelfareList = '/mall-service/user/welfare/get/page'; static const getWelfareList = '/mall-service/user/welfare/get/page';
// //
static const calloutBanner = '/up-service/callout/notice/v2'; static const calloutBanner = '/up-service/callout/notice/v3';
// //
static const getWelfareDetail = '/mall-service/user/welfare/get/id/'; static const getWelfareDetail = '/mall-service/user/welfare/get/id/';
//
static const noticeRead = '/up-service/callout/notice/read';
// //
static const getWelfare = '/mall-service/user/welfare/receive/'; static const getWelfare = '/mall-service/user/welfare/receive/';
@ -783,4 +792,13 @@ class Api {
static var searchCircle = '/up-service/interests/search'; static var searchCircle = '/up-service/interests/search';
//
static var registerFeedback = '/user-service/register/feedback';
//
static var tokenNoLogin = '/up-service/oss/tokenNoLogin';
//
static var trends = '/user-service/my/trends';
} }

View File

@ -59,14 +59,6 @@ class DioManager {
responseBody: true, responseBody: true,
)); ));
_dio!.interceptors.add(TimingInterceptor()); // _dio!.interceptors.add(TimingInterceptor()); //
// _dio?.httpClientAdapter = IOHttpClientAdapter()
// ..createHttpClient = () {
// //
// HttpClient client = HttpClient();
// client.idleTimeout = Duration(seconds: 15); //
// client.maxConnectionsPerHost = 15; // 15
// return client;
// };
} }
setDioTimeOut(int time) { setDioTimeOut(int time) {

View File

@ -79,6 +79,8 @@ import '../circle_app/astral__arcadia/view.dart';
import '../circle_app/aurora__nexus /binding.dart'; import '../circle_app/aurora__nexus /binding.dart';
import '../circle_app/aurora__nexus /view.dart'; import '../circle_app/aurora__nexus /view.dart';
import '../circle_app/blacklist/view.dart'; import '../circle_app/blacklist/view.dart';
import '../circle_app/call_out_detail/binding.dart';
import '../circle_app/call_out_detail/view.dart';
import '../circle_app/cascade__corner/binding.dart'; import '../circle_app/cascade__corner/binding.dart';
import '../circle_app/cascade__corner/view.dart'; import '../circle_app/cascade__corner/view.dart';
import '../circle_app/celestial/binding.dart'; import '../circle_app/celestial/binding.dart';
@ -122,6 +124,8 @@ import '../circle_app/good_reviews/binding.dart';
import '../circle_app/good_reviews/view.dart'; import '../circle_app/good_reviews/view.dart';
import '../circle_app/harmony__haven/binding.dart'; import '../circle_app/harmony__haven/binding.dart';
import '../circle_app/harmony__haven/view.dart'; import '../circle_app/harmony__haven/view.dart';
import '../circle_app/help_back/binding.dart';
import '../circle_app/help_back/view.dart';
import '../circle_app/infinity__isle/binding.dart'; import '../circle_app/infinity__isle/binding.dart';
import '../circle_app/infinity__isle/view.dart'; import '../circle_app/infinity__isle/view.dart';
import '../circle_app/invent_record/binding.dart'; import '../circle_app/invent_record/binding.dart';
@ -692,6 +696,15 @@ class PageList {
page: () => Search_peoplePage(), page: () => Search_peoplePage(),
binding: Search_peopleBinding(), binding: Search_peopleBinding(),
), ),
GetPage(
name: Routes.HelpBack,
page: () => Help_BackPage(),
binding: Help_BackBinding()),
GetPage(
name: Routes.CallOutDetail,
page: () => Call_out_detailPage(),
binding: Call_out_detailBinding()),
]; ];
} }

View File

@ -134,4 +134,8 @@ abstract class Routes {
static const Search = '/Search'; static const Search = '/Search';
static const HelpBack = '/HelpBack';
static const CallOutDetail = '/CallOutDetail';
} }

View File

@ -274,10 +274,6 @@ class SharedPreferencesHelper {
bool containsKey(String key) { bool containsKey(String key) {
bool? status = preferences?.containsKey(key); bool? status = preferences?.containsKey(key);
print(status); print(status);
if (status ?? false) {
bool? info = preferences?.getBool(key);
print(info);
}
return preferences?.containsKey(key) ?? false; return preferences?.containsKey(key) ?? false;
} }

View File

@ -46,6 +46,7 @@ import '../commons/colors/app_color.dart';
import '../commons/widgets/timeRecord_dialog.dart'; import '../commons/widgets/timeRecord_dialog.dart';
import '../net/dio_manager.dart'; import '../net/dio_manager.dart';
import 'SharedPreferencesHelper.dart'; import 'SharedPreferencesHelper.dart';
import 'cache_img.dart';
List chatIdList = []; List chatIdList = [];
List chatHotIdList = []; List chatHotIdList = [];
@ -1212,6 +1213,39 @@ sendCircleCustomMsg(String userId, String data, String desc) async {
} }
} }
//
sendCallOutCustomMsg(String userId, String data, String desc) async {
//
V2TimValueCallback<V2TimMsgCreateInfoResult> createCustomMessageRes =
await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.createCustomMessage(
data: data,
desc: desc,
extension: 'callOutData',
);
if (createCustomMessageRes.code == 0) {
String? id = createCustomMessageRes.data?.id;
String route = Get.currentRoute;
if (route.contains('/chat')) {
EventBusManager.fire(SendCoustomMessage(createCustomMessageRes));
} else {
V2TimValueCallback<V2TimMessage> sendMessageRes = await TencentImSDKPlugin
.v2TIMManager
.getMessageManager()
.sendMessage(id: id!, receiver: userId, groupID: '');
if (sendMessageRes.code == 0) {
//
showOKToast('发送成功');
sendMessageRes.data?.customElem?.data; //data
sendMessageRes.data?.customElem?.desc; //desc
sendMessageRes.data?.customElem?.extension; //extension
}
}
}
}
// //
sendGetGiftCustomMsg(String userId, String data, String desc) async { sendGetGiftCustomMsg(String userId, String data, String desc) async {
@ -1674,7 +1708,328 @@ Future<bool> checkCameraStatus() async {
return PermissionStatus.granted == camerastatus; return PermissionStatus.granted == camerastatus;
} }
bool isShowMasterDialog = false;
void loadMasterData(String userId) async {
if (isShowMasterDialog) return;
isShowMasterDialog = true;
var result = await DioManager.instance.get(
url: Api.getMaster,
params: {'userId': userId});
if (result['code'] == 200) {
Map masterInfo = result['data'] ?? {};
HomeLogic homeLogic = Get.find<HomeLogic>();
var myResult = await DioManager.instance
.get(url: Api.getMaster, params: {'userId': homeLogic.model!.id!});
if (myResult['code'] == 200) {
if (myResult['data'] != null) {
if (myResult['data']['userId'].toString() == userId) {
showOKToast('TA是你的主哦快和他互动呗');
isShowMasterDialog = false;
return;
}
}
}
bool isHave = false;
if (masterInfo.isEmpty) {
var myResult = await DioManager.instance
.get(url: Api.havaedMaster, params: {'userId': userId});
if (myResult['code'] == 200) {
isHave = myResult['data']['beforeHasMaster'] == 1;
}
}
var resultData = await DioManager.instance.get(
url: masterInfo.isEmpty
? isHave
? Api.bindBabyMore
: Api.popBindBaby
: Api.popLootBaby,
params: {'userId': userId});
isShowMasterDialog = false;
if (resultData['code'] == 10000) {
TextEditingController textEditingController = TextEditingController();
if (masterInfo.isEmpty) {
var result1 = await DioManager.instance.get(
url: Api.minAmount,
);
textEditingController.text = result1['data'].toString() ?? '1000';
} else {
textEditingController.text = (masterInfo['amount'] + 100).toString();
}
showMasterDialog(resultData['title'], resultData['content'],
textEditingController.text, textEditingController,masterInfo,userId);
}
}
}
showMasterDialog(
String title, String content, String money, textEditingController, Map masterInfo,String userId) {
Get.bottomSheet(
isScrollControlled: true,
isDismissible: false,
InkWell(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
},
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
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: [
if (title.isNotEmpty)
Center(
child: Text(
title,
style: TextStyle(
color: Colors.white, fontSize: 16.sp),
),
),
if (title.isEmpty)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
masterInfo.isNotEmpty
? '👑主人'
: '👑成为TA主人期间收礼会给您上贡',
style: TextStyle(
color: Colors.white, fontSize: 16.sp),
),
Row(
children: [
Row(
children: [
ClipOval(
child: CachedImg(
imageUrl: masterInfo['avatar'],
width: 25.sp,
height: 25.sp,
fit: BoxFit.cover,
)),
Text(
masterInfo['nickname'],
style: TextStyle(
color: AppColor.mainColor,
fontSize: 16.sp),
),
],
),
Text(
'给了',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp),
),
Text(
'${masterInfo['amount']}',
style: TextStyle(
color: AppColor.mainColor,
fontSize: 16.sp),
),
Image.asset(
getMineImage('bi_icon${0 + 1}'),
height: 20.sp,
)
],
),
],
),
Container(
margin: EdgeInsets.only(
top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center,
child: Text(
content,
textAlign: TextAlign.left,
style: TextStyle(
color: const Color(0xCCF7FAFA),
fontSize: 16.sp),
),
),
Stack(
alignment: Alignment.center,
children: [
Container(
margin: EdgeInsets.only(top: 14.sp),
width: 200.sp,
height: 35.sp,
decoration: BoxDecoration(
color: Color(0x1AFFFFFF),
borderRadius:
BorderRadius.circular(5.sp)),
alignment: Alignment.center,
child: TextField(
controller: textEditingController,
keyboardType: TextInputType.phone,
textAlign: TextAlign.center,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
FilteringTextInputFormatter.deny(
RegExp('[^0-9]')),
],
maxLength: 6,
//
style: TextStyle(
color: Colors.white, fontSize: 20.sp),
decoration: InputDecoration(
hintText: '请输入小票数量',
hintStyle: TextStyle(
color: Colors.white70,
fontSize: 20.sp),
border: InputBorder.none,
counterText: '',
contentPadding: EdgeInsets.only(
top: 0.sp, bottom: 7.5.sp),
),
),
),
Positioned(
child: Container(
margin: EdgeInsets.only(
top: 15.sp, left: 100.sp),
child: Image.asset(
getMineImage('bi_icon${1}'),
height: 25.sp,
)))
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Get.back();
},
child: Container(
margin: EdgeInsets.only(top: 14.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
gradient: const LinearGradient(
colors: [
Color(0x26FFFFFF),
Color(0x26FFFFFF),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
width: 120.sp,
height: 40.sp,
alignment: Alignment.center,
child: const Text(
"再考虑考虑",
style: TextStyle(
color: Colors.white,
fontSize: 15,
),
),
),
),
SizedBox(width: 24.sp),
GestureDetector(
onTap: () {
masterBind(textEditingController,masterInfo,userId);
},
child: Container(
margin: EdgeInsets.only(top: 14.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
width: 150.sp,
height: 40.sp,
alignment: Alignment.center,
child: Text(
title.isEmpty
? '👑成为TA的新主人'
: title.contains('新主人')
? '👑成为TA的新主人'
: "👑成为TA的第一任",
style: TextStyle(
color: Colors.white,
fontSize: 15,
),
),
),
)
],
)
],
),
)
],
),
),
],
),
),
));
}
void masterBind(textEditingController,Map masterInfo,String userId) async {
if (masterInfo.isNotEmpty) {
if (int.parse(textEditingController.text) < masterInfo['amount'] + 100) {
showOKToast('小票数量不能低于${masterInfo['amount'] + 100}');
return;
}
}
var result = await DioManager.instance.postBody(
url: Api.masterBind,
params: {'userId': userId, 'amount': textEditingController.text});
if (result['code'] == 200) {
showOKToast('绑定成功,快去我的主或贝页面查看吧');
Get.back();
} else if (result['code'] == 31201) {
showRechargeScreenDialog('');
}
}
pushPage(String action,String param,{String name = '',bool isShowUpdate = true}) async { pushPage(String action,String param,{String name = '',bool isShowUpdate = true}) async {
// public final static String MY_MAIN = "my_main";// // public final static String MY_MAIN = "my_main";//
@ -1714,12 +2069,15 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
// "follow";// // "follow";//
// 'interest_discovery';// // 'interest_discovery';//
// "activity";//驿 // "activity";//驿
// to_bind_baby
if (action == 'my_main') { if (action == 'my_main') {
Get.until((route) => route.settings.name == '/home'); Get.until((route) => route.settings.name == '/home');
final homeLogic = Get.put(HomeLogic()); final homeLogic = Get.put(HomeLogic());
homeLogic.tabController.animateTo(4); homeLogic.tabController.animateTo(4);
homeLogic.updateIndex(4); homeLogic.updateIndex(4);
} else if (action == 'to_bind_baby') {
loadMasterData(param);
} else if (action == 'my_interest') { } else if (action == 'my_interest') {
Get.toNamed(Routes.MyCirclePage); Get.toNamed(Routes.MyCirclePage);
} else if (action == 'activity') { } else if (action == 'activity') {

View File

@ -28,7 +28,10 @@ typedef void NoticeCallback();
void showFloatingButtonOverlay(BuildContext context, String nickname, void showFloatingButtonOverlay(BuildContext context, String nickname,
String ageMsg, String avatar, int event, NoticeCallback noticeCallback) { String ageMsg, String avatar, int event, NoticeCallback noticeCallback) {
if (Get.currentRoute == Routes.Chat) return; if (Get.currentRoute == Routes.Chat) return;
HomeLogic homeLogic = Get.find<HomeLogic>();
if (Get.currentRoute == Routes.Home && homeLogic.currentIndex == 3) return;
OverlayState? overlayState = Overlay.of(context); OverlayState? overlayState = Overlay.of(context);
late OverlayEntry overlayEntry; late OverlayEntry overlayEntry;
bool showMessage = false; bool showMessage = false;
@ -186,7 +189,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
), ),
), ),
), ),
if (event == 0) // if (event == 0)
Positioned( Positioned(
top: MediaQuery.of(context).padding.top, top: MediaQuery.of(context).padding.top,
right: 8, right: 8,

View File

@ -129,7 +129,7 @@ dependencies:
#友盟 #友盟
umeng_common_sdk: ^1.2.7 umeng_common_sdk: ^1.2.7
#易盾一键认证 #易盾一键认证
quickpass_yidun_flutter: ^1.4.3 quickpass_yidun_flutter: ^1.5.6
#视频播放器 #视频播放器
fijkplayer: ^0.11.0 fijkplayer: ^0.11.0