代码提交

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.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode 109
versionName "2.5.9"
versionCode 111
versionName "2.6.1"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -568,7 +568,7 @@ class _Call_outPageState extends State<Call_outPage> {
child: Container(
height: 30.sp,
width: Get.width,
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
padding: EdgeInsets.only(left: 6.sp, right: 8.sp),
margin: EdgeInsets.only(
// left: 15.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: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:tencent_cloud_chat_uikit/ui/utils/screen_utils.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
? (theme.chatMessageItemFromSelfBgColor ??
theme.lightPrimaryMaterialColor.shade50)
@ -208,106 +219,129 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
if (!widget.isFromSelf) {
return
Container(
decoration: BoxDecoration(
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
child:Container(
margin: EdgeInsets.all(1),
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 11 : 9),
decoration: BoxDecoration(
color: const Color(0xFF493E5C),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// If the [elemType] is text message, it will not be null here.
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
customEmojiStickerList: widget.customEmojiStickerList,
showAtBackground: true,
)),
// If the link preview info is available, render the preview card.
if (_renderPreviewWidget() != null &&
widget.chatModel.chatConfig.urlPreviewType ==
UrlPreviewType.previewCardAndHyperlink)
_renderPreviewWidget()!,
if (widget.isShowMessageReaction ?? true)
TIMUIKitMessageReactionShowPanel(message: widget.message)
],
),
),
);
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
child:Container(
margin: EdgeInsets.all(1),
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 11 : 9),
decoration: BoxDecoration(
color: const Color(0xFF493E5C),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// If the [elemType] is text message, it will not be null here.
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
customEmojiStickerList: widget.customEmojiStickerList,
showAtBackground: true,
)),
// If the link preview info is available, render the preview card.
if (_renderPreviewWidget() != null &&
widget.chatModel.chatConfig.urlPreviewType ==
UrlPreviewType.previewCardAndHyperlink)
_renderPreviewWidget()!,
if (widget.isShowMessageReaction ?? true)
TIMUIKitMessageReactionShowPanel(message: widget.message)
],
),
),
),
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(
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
decoration: BoxDecoration(
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// If the [elemType] is text message, it will not be null here.
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
customEmojiStickerList: widget.customEmojiStickerList,
showAtBackground: true,
)),
// If the link preview info is available, render the preview card.
if (_renderPreviewWidget() != null &&
widget.chatModel.chatConfig.urlPreviewType ==
UrlPreviewType.previewCardAndHyperlink)
_renderPreviewWidget()!,
if (widget.isShowMessageReaction ?? true)
TIMUIKitMessageReactionShowPanel(message: widget.message)
],
),
return Column(
children: [
Container(
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
decoration: BoxDecoration(
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// If the [elemType] is text message, it will not be null here.
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
customEmojiStickerList: widget.customEmojiStickerList,
showAtBackground: true,
)),
// If the link preview info is available, render the preview card.
if (_renderPreviewWidget() != null &&
widget.chatModel.chatConfig.urlPreviewType ==
UrlPreviewType.previewCardAndHyperlink)
_renderPreviewWidget()!,
if (widget.isShowMessageReaction ?? true)
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),
alignment: Alignment.center,
child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注",
"拉黑后,你将屏蔽对方的任何信息。若您喜欢了对方,将自动取消喜欢",
textAlign: TextAlign.center,
style: TextStyle(
color: const Color(0xCCF7FAFA), fontSize: 16.sp),

View File

@ -205,47 +205,56 @@ class _CirclePageState extends State<CirclePage>
],
)),
if (logic.isShowTip)
if (logic.isShowTip && homelogic.isProd)
Positioned(
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: MediaQuery.of(context).padding.top + 40.sp,
right: 0.sp,
child: InkWell(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
},
child: Column(
children: [
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: MediaQuery.of(context).padding.top + 40.sp,
right: 0.sp,
Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
),
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('筛选城市/角色/属性/取向',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
],
)),
Positioned(
top: MediaQuery.of(context).padding.top + 10.sp,
right: 10.sp,
child: GestureDetector(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
_showBottomSheet(context);
},
child: Image.asset(
getCircleImage('icon_screen'),
width: 30.sp,
child: Column(
children: [
Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
),
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('筛选城市/角色/属性/取向',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
],
)),
Positioned(
top: MediaQuery.of(context).padding.top + 10.sp,
right: 10.sp,
child: GestureDetector(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
_showBottomSheet(context);
},
child: Image.asset(
getCircleImage('icon_screen'),
width: 30.sp,
),
),
),
),
],
],
),
),
)),
],
),
);
@ -977,21 +986,11 @@ class _CirclePageState extends State<CirclePage>
InkWell(
onTap: () async {
if (_tabController.index == 2) {
var data = await DioManager.instance
.get(url: Api.getUserMine);
var bean =
BaseResponse<MineResponseBean>.fromJson(
data,
(data) =>
MineResponseBean.fromJson(data));
User userInfoBean = bean.data.user;
if (userInfoBean.vip > 0) {
navigateToQueen();
} else {
showOKToast('领取特权之后更容易上精选');
showOepnVipDialog('');
}
Get.bottomSheet(
TodayPeopleDialog(isShow: true,source:'fate_match'),
isScrollControlled: true,
enableDrag: false,
);
} else {
Get.toNamed(Routes.Search);
}

View File

@ -372,8 +372,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
borderRadius: BorderRadius.circular(10.sp),
child: Container(
width: Get.width,
// margin:
child: Stack(
children: [
ClipRRect(
@ -1345,6 +1343,22 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
),
Row(
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(
child: Container(
height: 30.sp,
@ -1767,6 +1781,22 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
: Container(),
Row(
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(
child: Container(
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(
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(
child: Container(
height: 30.sp,
@ -1236,7 +1201,7 @@ class _LikeViewState extends State<LikeView>
},
child: Image.asset(
getCircleImage('chat'),
width: 60.sp,
width: 50.sp,
),
)
],
@ -1577,6 +1542,22 @@ class _LikeViewState extends State<LikeView>
Row(
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(
child: Container(
height: 30.sp,
@ -1622,7 +1603,7 @@ class _LikeViewState extends State<LikeView>
},
child: Image.asset(
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 '../../utils/cache_img.dart';
import '../../utils/eventBus.dart';
import '../home/logic.dart';
import 'logic.dart';
import 'widgets/all_circle_item.dart';
@ -42,6 +43,8 @@ class _CircleListPageState extends State<CircleListPage>
final logic = Get.find<LikeLogic>();
final homeLogic = Get.find<HomeLogic>();
int currentIndex = 1;
List<String> tipList = [
@ -203,96 +206,111 @@ class _CircleListPageState extends State<CircleListPage>
),
),
),
if (logic.isShowCallOutTip)
if (logic.isShowCallOutTip && homeLogic.isProd)
Positioned(
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
bottom: 36.sp + 70.sp,
right: 30.sp,
child: Column(
children: [
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('发圈内动态吸引圈友',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationX(3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_left'),
width: 150.sp,
child: InkWell(
onTap: () {
logic.isShowCallOutTip = false;
logic.update();
logic.setSpCallOpTip();
logic.isShowLikeTip = true;
logic.update();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
bottom: 36.sp + 70.sp,
right: 30.sp,
child: Column(
children: [
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('发圈内动态吸引圈友',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationX(3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_left'),
width: 150.sp,
),
),
),
],
)),
Positioned(
bottom: 36.sp,
right: 10.sp,
child: GestureDetector(
onTap: () async {
logic.isShowCallOutTip = false;
logic.update();
logic.setSpCallOpTip();
// addUmengTag('点击圈子喊话');
var result = Get.toNamed(
Routes.CallOutPage,
);
logic.isShowLikeTip = true;
logic.update();
],
)),
Positioned(
bottom: 36.sp,
right: 10.sp,
child: GestureDetector(
onTap: () async {
logic.isShowCallOutTip = false;
logic.update();
logic.setSpCallOpTip();
var result = Get.toNamed(
Routes.CallOutPage,
);
logic.isShowLikeTip = true;
logic.update();
},
child: Image.asset(
getCircleImage('send_msg'),
width: 70.sp,
))),
],
},
child: Image.asset(
getCircleImage('send_msg'),
width: 70.sp,
))),
],
),
),
)),
if (logic.isShowLikeTip)
if (logic.isShowLikeTip && homeLogic.isProd)
Positioned(
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: 36.sp + 130.sp,
left: 30.sp,
child: Column(
children: [
child: InkWell(
onTap: () {
logic.isShowLikeTip = false;
logic.update();
logic.setSpLikeOpTip();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: 36.sp + 130.sp,
left: 30.sp,
child: Column(
children: [
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_left'),
width: 150.sp,
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_left'),
width: 150.sp,
),
),
),
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('👀喜欢的圈友动态',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
],
)),
Positioned(
top: 120.sp,
left: 10.sp,
child: GestureDetector(
onTap: () async {
logic.isShowLikeTip = false;
logic.currentIndex = -2;
logic.update();
logic.setSpLikeOpTip();
},
child: topCicleStatusItem(
true,
Image.asset(
getCircleImage('like_icon'),
width: 32.sp,
)),)),
],
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('👀喜欢的圈友动态',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),)),
],
)),
Positioned(
top: 120.sp,
left: 10.sp,
child: GestureDetector(
onTap: () async {
logic.isShowLikeTip = false;
logic.currentIndex = -2;
logic.update();
logic.setSpLikeOpTip();
},
child: topCicleStatusItem(
true,
Image.asset(
getCircleImage('like_icon'),
width: 32.sp,
)),)),
],
),
),
))
],

View File

@ -21,9 +21,9 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:visibility_detector/visibility_detector.dart';
import '../../../commons/Widgets/circle_share.dart';
import '../../../commons/Widgets/tag_widget.dart';
import '../../../commons/colors/app_color.dart';
import '../../../commons/widgets/circle_share.dart';
import '../../../commons/widgets/more_dynamic_tip.dart';
import '../../../net/api.dart';
import '../../../utils/SharedPreferencesHelper.dart';
@ -880,38 +880,8 @@ class _AllCircleItemState extends State<AllCircleItem>
await SharedPreferencesHelper.getInstance();
String myUserId = sp.getMyUserId();
// if (lists.user?.id!.toString() == myUserId) {
Get.toNamed(Routes.UserInfoPage,
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(
alignment: Alignment.center,
@ -1123,6 +1093,22 @@ class _AllCircleItemState extends State<AllCircleItem>
),
Row(
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(
child: Container(
height: 30.sp,
@ -1165,7 +1151,7 @@ class _AllCircleItemState extends State<AllCircleItem>
},
child: Image.asset(
getCircleImage('chat'),
width: 60.sp,
width: 50.sp,
),
)
],
@ -1604,6 +1590,22 @@ class _AllCircleItemState extends State<AllCircleItem>
: Container(),
Row(
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(
child: Container(
height: 30.sp,
@ -1646,7 +1648,7 @@ class _AllCircleItemState extends State<AllCircleItem>
},
child: Image.asset(
getCircleImage('chat'),
width: 60.sp,
width: 50.sp,
),
)
],

View File

@ -2330,6 +2330,22 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
),
Row(
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(
child: Container(
height: 30.sp,
@ -2375,7 +2391,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
},
child: Image.asset(
getCircleImage('chat'),
width: 60.sp,
width: 50.sp,
),
)
],
@ -2902,6 +2918,22 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
: Container(),
Row(
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(
child: Container(
height: 30.sp,

View File

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

View File

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

View File

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

View File

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

View File

@ -420,7 +420,7 @@ class _ShareState extends State<Share> {
_saveLocalImage() async {
RenderRepaintBoundary boundary =
_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 =
await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) {
@ -457,7 +457,7 @@ class _ShareState extends State<Share> {
SmartDialog.showLoading(msg:'正在生成分享图片...');
RenderRepaintBoundary boundary =
_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 =
await (image.toByteData(format: ui.ImageByteFormat.png));
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(
onTap: () {
navigateToReport();
Get.toNamed(Routes.HelpBack);
},
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();
var result = await DioManager.instance.get(
url: Api.userTrends,
url: Api.trends,
params: {'userId': requestUserId, 'page': dynamicPage, 'pageSize': 10});
if (result['code'] == 200) {
if (dynamicPage == 1) {

View File

@ -370,37 +370,46 @@ class _MinefragmentPageState extends State<MinefragmentPage>
isShowMenu = false;
logic.update();
}),
if (logic.isShowserveTip)
if (logic.isShowserveTip && homelogic.isProd)
Positioned(
child: Container(
child: InkWell(
onTap: () {
logic.isShowserveTip = false;
logic.setSpServeTip();
logic.update();
logic.isShowMoreTip = true;
logic.update();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
bottom: 130.sp,
right: 30.sp,
child: Stack(
alignment: Alignment.center,
children: [
Image.asset(
getMineImage('bubble_icon'),
width: 174.sp,
),
Container(margin: EdgeInsets.only(bottom: 10.sp),child: Text('产品反馈或在线客服',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),))
],
)),
Positioned(
bottom: 95.sp,
right: 40.sp,
child: Image.asset(
getMineImage('hand_icon'),
width: 32.sp,
)),
],
children: [
Positioned(
bottom: 130.sp,
right: 30.sp,
child: Stack(
alignment: Alignment.center,
children: [
Image.asset(
getMineImage('bubble_icon'),
width: 174.sp,
),
Container(margin: EdgeInsets.only(bottom: 10.sp),child: Text('产品反馈或在线客服',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),))
],
)),
Positioned(
bottom: 95.sp,
right: 40.sp,
child: Image.asset(
getMineImage('hand_icon'),
width: 32.sp,
)),
],
),
)),
),
)),
Positioned(
bottom: 20.sp,
@ -452,43 +461,50 @@ class _MinefragmentPageState extends State<MinefragmentPage>
),
),
),
if (logic.isShowMoreTip)
if (logic.isShowMoreTip && homelogic.isProd)
Positioned(
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: 20.sp + MediaQuery.of(context).padding.top,
right: 10.sp,
child: Column(
child: InkWell(
onTap: () {
logic.isShowMoreTip = false;
logic.setSpMoreTip();
logic.update();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: 20.sp + MediaQuery.of(context).padding.top,
right: 10.sp,
child: Column(
children: [
Image.asset(
getBaseImage('pop_top_right'),
width: 174.sp,
children: [
Image.asset(
getBaseImage('pop_top_right'),
width: 174.sp,
),
Container(margin: EdgeInsets.only(bottom: 10.sp),child: Text('更多功能等你体验',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),))
],
)),
Positioned(
top: 5.sp + MediaQuery.of(context).padding.top,
right: 10.sp,
child: GestureDetector(
onTap: () {
logic.isShowMoreTip = false;
logic.setSpMoreTip();
isShowMenu = true;
logic.update();
},
child: Image.asset(
getMineImage('my_more_icon'),
width: 24.sp,
),
Container(margin: EdgeInsets.only(bottom: 10.sp),child: Text('更多功能等你体验',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.bold),))
],
)),
Positioned(
top: 5.sp + MediaQuery.of(context).padding.top,
right: 10.sp,
child: GestureDetector(
onTap: () {
logic.isShowMoreTip = false;
logic.setSpMoreTip();
isShowMenu = true;
logic.update();
},
child: Image.asset(
getMineImage('my_more_icon'),
width: 24.sp,
),
)),
],
)),
],
),
),
)),
],

View File

@ -6,8 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:notification_permissions/notification_permissions.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:scroll_to_index/scroll_to_index.dart';
import '../../commons/Widgets/base_tip_widget.dart';
import '../../utils/SharedPreferencesHelper.dart';
import '../circle/logic.dart';
@ -19,13 +18,14 @@ class MsgLogic extends GetxController {
List<UserListItem> lists = [];
ScrollController listScrollController = ScrollController();
AutoScrollController scrollController = AutoScrollController();
List chatList = [];
int total = 0;
bool isStart = false;
bool isStart = false;
bool isShowNotifyTip = false;
bool isShowNotifyTip = false;
String tip = '';
@ -43,77 +43,76 @@ class MsgLogic extends GetxController {
bool isShowTip = false;
@override
void onInit() async {
void onInit() {
// TODO: implement onInit
super.onInit();
checkNotificationPermission();
loadMyInfoData();
// loadChatData();
loadChatData();
loadLikeData();
loadStatusData();
getVisitorMsgsData();
getBannerData();
getSpData();
}
Future<void> getSpData() async {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
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();
}
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) {
isShowNotifyTip = true;
update();
}
}
void loadChatData() async {
var data =
await DioManager.instance.post(url: Api.recommendQuickChatUser, params: {
'page':1,
'pageSize':8
});
loadChatData({bool isFresh = true}) async {
var data = await DioManager.instance.post(
url: Api.recommendQuickChatUser, params: {'page': 1, 'pageSize': 8});
if (data['code'] == 200) {
total = data['data']['total'];
chatList = data['data']['lists'];
} else if (data['code'] == 404) {
// showOKToast('网络不流畅哦,请检查网络情况');
}
// vicinityList = bean.data.lists;
update();
if (isFresh) {
update();
}
}
Future<bool> queryQuickStart() async {
var data =
await DioManager.getInstance().get(url: Api.queryQuickStart);
var data = await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) {
if (data["data"] == 2 || data["data"] == 0) {
var data = await DioManager.getInstance()
.get(url: Api.startQuick);
var data = await DioManager.getInstance().get(url: Api.startQuick);
if (data["code"] == 200) {
showOKToast("已冲到第一");
isStart = true;
@ -123,7 +122,6 @@ class MsgLogic extends GetxController {
showRechargeScreenDialog('quick_chat_open');
}
} else if (data["data"] == 1) {
showOKToast("速聊开启中");
return false;
}
@ -131,15 +129,13 @@ class MsgLogic extends GetxController {
return false;
}
stopQueryQuick()async{
var data =
await DioManager.getInstance().get(url: Api.stopQuick);
stopQueryQuick() async {
var data = await DioManager.getInstance().get(url: Api.stopQuick);
if (data["code"] == 200) {
showOKToast('操作成功');
isStart = false;
loadChatData();
}
}
Future<bool> callOrhers() async {
@ -150,13 +146,12 @@ class MsgLogic extends GetxController {
return true;
} else if (data["code"] == 31201) {
showRechargeScreenDialog('quick_chat_call');
} else{
} else {
showOKToast(data["msg"]);
}
return false;
}
showTipPop() {
Get.bottomSheet(
CupertinoActionSheet(
@ -181,7 +176,7 @@ class MsgLogic extends GetxController {
Get.back();
addUmengTag('弹窗-一键呼唤三十位您想认识的人');
},
child: const Text('一键呼唤三十位您想认识的人'),
child: const Text('一键召唤30位想认识的人/10元'),
),
CupertinoActionSheetAction(
onPressed: () {
@ -203,11 +198,10 @@ class MsgLogic extends GetxController {
isScrollControlled: true);
}
void getVisitorMsgsData() async {
getVisitorMsgsData({bool isFresh = true}) async {
if (isMsgCountLoad) return;
isMsgCountLoad = true;
var data =
await DioManager.getInstance().get(url: Api.getVisitorMsgs);
var data = await DioManager.getInstance().get(url: Api.getVisitorMsgs);
if (data["code"] == 200) {
visitorMsgs = data['data']['msgs'] ?? [];
recent_visit_count_new = data['data']['unreadCount'] ?? 0;
@ -215,12 +209,13 @@ class MsgLogic extends GetxController {
await loadInterestedInMeUsersData();
}
isMsgCountLoad = false;
update();
if (isFresh) {
update();
}
}
void getBannerData() async {
var data =
await DioManager.getInstance().get(url: Api.messageBanner);
var data = await DioManager.getInstance().get(url: Api.messageBanner);
if (data["code"] == 200) {
bannerList = data['data'];
update();
@ -228,10 +223,10 @@ class MsgLogic extends GetxController {
update();
}
loadVisitorTotalData() async {
var data =
await DioManager.instance.get(url: Api.getVisitorTotal,);
var data = await DioManager.instance.get(
url: Api.getVisitorTotal,
);
if (data['code'] == 200) {
int sameCityCount = data['data']['sameCityCount'];
int wantMeetCount = data['data']['wantMeetCount'];
@ -242,25 +237,21 @@ class MsgLogic extends GetxController {
} else if (wantMeetCount > 0) {
bannerTip = '${wantMeetCount}人是你想认识的圈友';
}
update();
}
}
loadInterestedInMeUsersData() async {
var data =
await DioManager.instance.get(url: Api.interestedInMeUsers);
var data = await DioManager.instance.get(url: Api.interestedInMeUsers);
if (data['code'] == 200) {
List infoList = data['data']['lists'];
if (infoList.isNotEmpty) {
moreCount = data['data']['total'];
}
update();
}
}
void loadStatusData() async {
var data =
await DioManager.getInstance().get(url: Api.queryQuickStart);
loadStatusData({bool isFresh = true}) async {
var data = await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) {
if (data["data"] == 0 || data["data"] == 2) {
isStart = false;
@ -268,10 +259,12 @@ class MsgLogic extends GetxController {
isStart = true;
}
}
update();
if (isFresh) {
update();
}
}
void loadMyInfoData() async {
loadMyInfoData() async {
var data = await DioManager.instance.get(url: Api.getUserMine);
var bean = BaseResponse<MineResponseBean>.fromJson(
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 '../../utils/cache_img.dart';
import '../home/logic.dart';
import 'TIMUIKitConversation/tim_uikit_conversation.dart';
import 'logic.dart';
@ -34,18 +35,18 @@ class MsgPage extends StatefulWidget {
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
final ctr = Get.lazyPut(() => MsgLogic());
// final controller = Get.find<MsgLogic>();
var logic = Get.find<CircleLogic>();
var logic = Get.find<MsgLogic>();
var homeLogic = Get.find<HomeLogic>();
void getPipeiData() async {
var data = await DioManager.instance.get(url: Api.getMatch);
if (data['code'] == 200) {
//
bool isSuccess = await createCustomMsg(
data['data']['account_id']
.toString()
.split('_')
.last,
data['data']['account_id'].toString().split('_').last,
data['data']['account_id']);
if (!isSuccess) {
await sendTextMsg(data['data']['account_id']);
@ -76,158 +77,168 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Stack(
fit: StackFit.expand,
children: [
SafeArea(
child: Column(
children: [
GetBuilder(builder: (MsgLogic controller) {
return Column(
children: [
navigatorItem(controller),
if (controller.isShowNotifyTip) notifyWidget(
controller),
tipWidget(controller),
reconmandWidget(controller),
],
);
}),
Expanded(
child: TIMConversation(
autoScrollController: logic.scrollController,
scrollController: logic.listScrollController,
onTapItem: (selectedConv) async {
String type = selectedConv.userID!.split('_')[2];
if (int.parse(type) == 11) {
Get.toNamed(Routes.SysNotifyListPage,
arguments: selectedConv);
return;
}
await Get.toNamed(
Routes.Chat, arguments: selectedConv);
},
))
],
)),
Positioned(
bottom: 20.sp,
right: 10.sp,
child: GetBuilder(builder: (MsgLogic controller) {
return controller.bannerList.isNotEmpty ? Container(
width: 75.sp,
height: 80.sp,
child: Swiper(
autoplay: true,
loop: true,
autoplayDelay: 6000,
scrollDirection: Axis.vertical,
itemBuilder: (BuildContext context, int index) {
Map item = controller.bannerList[index];
return GestureDetector(
onTap: () {
if (item['type'] == 1) {
if (item['scene'] == 'internal') {
Get.toNamed(Routes.WebViewPage, arguments: {
'title': "",
"url": item['param']
});
} else {
launch(item['param'], forceSafariVC: false);
}
} else if (item['type'] > 1) {
pushPage(item['scene'], item['param']);
}
},
child: ClipRRect(
borderRadius: BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: item['pic_url'],
fit: BoxFit.cover,
),
),
);
},
itemCount: controller.bannerList.length,
),
) : Container();
})),
body: GetBuilder(builder: (MsgLogic controller) {
return Stack(
fit: StackFit.expand,
children: [
SafeArea(
child: Column(
children: [
Column(
children: [
navigatorItem(controller),
if (controller.isShowNotifyTip) notifyWidget(controller),
tipWidget(controller),
reconmandWidget(controller),
],
),
Expanded(
child: TIMConversation(
autoScrollController: controller.scrollController,
scrollController: controller.listScrollController,
onTapItem: (selectedConv) async {
String type = selectedConv.userID!.split('_')[2];
if (int.parse(type) == 11) {
Get.toNamed(Routes.SysNotifyListPage,
arguments: selectedConv);
return;
}
await Get.toNamed(Routes.Chat, arguments: selectedConv);
},
))
],
)),
Positioned(
child: GetBuilder<MsgLogic>(builder: (logic) {
if (!logic.isShowTip) {
return Container();
}
return Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: MediaQuery
.of(context)
.padding
.top + 88.sp + 70.sp + (logic.isShowNotifyTip ? 40.sp : 0.0),
left: 0.sp,
child: Column(
children: [
bottom: 20.sp,
right: 10.sp,
child: controller.bannerList.isNotEmpty
? Container(
width: 75.sp,
height: 80.sp,
child: Swiper(
autoplay: true,
loop: true,
autoplayDelay: 6000,
scrollDirection: Axis.vertical,
itemBuilder: (BuildContext context, int index) {
Map item = controller.bannerList[index];
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
return GestureDetector(
onTap: () {
if (item['type'] == 1) {
if (item['scene'] == 'internal') {
Get.toNamed(Routes.WebViewPage,
arguments: {
'title': "",
"url": item['param']
});
} else {
launch(item['param'],
forceSafariVC: false);
}
} else if (item['type'] > 1) {
pushPage(item['scene'], item['param']);
}
},
child: ClipRRect(
borderRadius: BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: item['pic_url'],
fit: BoxFit.cover,
),
),
);
},
itemCount: controller.bannerList.length,
),
)
: Container()),
Positioned(
child: !controller.isShowTip || !homeLogic.isProd
? Container()
: InkWell(
onTap: () {
controller.isShowTip = false;
controller.update();
controller.setSpTip();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
children: [
Positioned(
top: MediaQuery.of(context).padding.top +
88.sp +
70.sp +
(controller.isShowNotifyTip
? 40.sp
: 0.0),
left: 0.sp,
child: Column(
children: [
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(
3.1416), // π radians = 180 degrees
child: Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
),
),
Container(
margin:
EdgeInsets.only(bottom: 0.sp),
child: Text(
'开启吸引更多人找您聊天',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.bold),
)),
],
)),
Positioned(
top: MediaQuery.of(context).padding.top +
88.sp +
(controller.isShowNotifyTip
? 40.sp
: 0.0),
left: 10.sp,
child: GestureDetector(
onTap: () {
controller.isShowTip = false;
controller.update();
controller.setSpTip();
controller.showTipPop();
},
child: Column(
children: [
Image.asset(
getMsgImage('msg_first'),
width: 50.sp,
),
SizedBox(
height: 4.sp,
),
Text(
'冲到第一',
style: TextStyle(
color: Colors.white,
fontSize: 12.sp),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 0.sp),
child: Text('开启吸引更多人找您聊天',
style: TextStyle(color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.bold),)),
],
)),
Positioned(
top: MediaQuery
.of(context)
.padding
.top + 88.sp + (logic.isShowNotifyTip ? 40.sp : 0.0),
left: 10.sp,
child: GestureDetector(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
logic.showTipPop();
// _showBottomSheet(context);
},
child: Column(
children: [
Image.asset(
getMsgImage('msg_first'),
width: 50.sp,
),
SizedBox(
height: 4.sp,
),
Text('冲到第一',
style: TextStyle(
color: Colors.white, fontSize: 12.sp),
),
],
),
),
],
),
),
],
),
);
})),
],
));
)),
],
);
}));
}
circleWidget(String url, String userId, {double width = 30}) {
@ -321,12 +332,12 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
},
child: ctr.lists.isNotEmpty
? SizedBox(
height: 30.sp,
width: 30.0.sp + 15.sp * (widgets.length),
child: Stack(
children: widgets,
),
)
height: 30.sp,
width: 30.0.sp + 15.sp * (widgets.length),
child: Stack(
children: widgets,
),
)
: Container(),
)),
GestureDetector(
@ -404,7 +415,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
child: Text(
'去开启',
style:
TextStyle(color: AppColor.mainColor, fontSize: 14.sp),
TextStyle(color: AppColor.mainColor, fontSize: 14.sp),
)),
SizedBox(
width: 4.sp,
@ -507,15 +518,15 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
),
Expanded(
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (contenxt, index) {
if (index == controller.chatList.length) {
return MoreItem();
}
return peopleWidget(controller.chatList[index]);
},
itemCount: controller.chatList.length + 1,
))
scrollDirection: Axis.horizontal,
itemBuilder: (contenxt, index) {
if (index == controller.chatList.length) {
return MoreItem();
}
return peopleWidget(controller.chatList[index]);
},
itemCount: controller.chatList.length + 1,
))
],
),
);
@ -642,22 +653,23 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
),
(info['gender'] ?? 0) > 0
? Positioned(
bottom: 28.sp,
right: 0.sp,
child: Container(
height: 13.sp,
width: 25.sp,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(6.5.sp),
gradient: sexBgGradient(info['gender'] ?? 0)),
child: Text(getGenderStr(info['gender'] ?? 0),
style: TextStyle(
color: sexBgColor(info['gender'] ?? 0),
fontSize: 9.sp,
),),
))
bottom: 28.sp,
right: 0.sp,
child: Container(
height: 13.sp,
width: 25.sp,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.5.sp),
gradient: sexBgGradient(info['gender'] ?? 0)),
child: Text(
getGenderStr(info['gender'] ?? 0),
style: TextStyle(
color: sexBgColor(info['gender'] ?? 0),
fontSize: 9.sp,
),
),
))
: Container()
],
),

View File

@ -110,31 +110,37 @@ class PhotoinfoLogic extends GetxController {
} else {
isCountingDown = false;
timer?.cancel();
update();
}
});
}
Future<void> getCode() async {
if (newPhotoController.text.contains('@')) {
if (type > 1) {
if (newPhotoController.text.isEmpty) {
showOKToast("请输入邮箱");
return;
}
if (!newPhotoController.text.isEmail) {
showOKToast("邮箱输入有误");
return;
}
} else if(!GetUtils.isPhoneNumber(newPhotoController.text)){
showOKToast("手机号输入有误");
return;
} else if(type <= 1){
if (newPhotoController.text.isEmpty) {
showOKToast("请输入手机号");
return;
}
}
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));
showOKToast(bean.msg);
if(kDebugMode){
if(bean.code==200){
codeController.text = bean.data!.code.toString();
// codeController.text = bean.data!.code.toString();
startCountdown();
update();
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -57,6 +57,8 @@ class UserinfoLogic extends GetxController {
bool isBlackBeen = false;
bool isDestroy = false;
bool isShowTime = false;
bool isFee = false;
List giftList = [];
@ -154,6 +156,7 @@ class UserinfoLogic extends GetxController {
fetchMyAlbum(Api.getMyAlbum);
loadDyanmicListData();
loadBabyData();
loadMyTimeData();
} else {
sendHotAction(8, userId);
@ -163,14 +166,12 @@ class UserinfoLogic extends GetxController {
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
fetchIsBlack("${Api.setBlock + userId}/block");
loadScoreData(userId);
}
// SmartDialog.dismiss();
fetchQnToken(Api.getqiniuToken);
loadGiftListData();
loadRelationTypeFirstListData();
loadMasterData();
}
loadDyanmicListData() async {
@ -395,10 +396,10 @@ class UserinfoLogic extends GetxController {
}
setLike() async {
if (isBlack || isDestroy) {
showOKToast("喜欢失败,存在拉黑关系或者该账户已注销");
return;
}
// if (isBlack || isDestroy) {
// showOKToast("喜欢失败,存在拉黑关系或者该账户已注销");
// return;
// }
var data = await DioManager.instance.post(
url: "${Api.setLike + userId}/follow",
@ -625,8 +626,7 @@ class UserinfoLogic extends GetxController {
}
}
showMasterPop(textEditingController) async {
showMasterPop(textEditingController) async {
var myResult = await DioManager.instance
.get(url: Api.getMaster, params: {'userId': homeLogic.model!.id!});
if (myResult['code'] == 200) {
@ -637,6 +637,7 @@ class UserinfoLogic extends GetxController {
}
}
}
bool isHave = false;
if (masterInfo.isEmpty) {
var myResult = await DioManager.instance
@ -647,7 +648,11 @@ class UserinfoLogic extends GetxController {
}
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});
if (result['code'] == 10000) {
if (masterInfo.isEmpty) {
@ -668,7 +673,7 @@ class UserinfoLogic extends GetxController {
String title, String content, String money, textEditingController) {
Get.bottomSheet(
isScrollControlled: true,
isDismissible:false,
isDismissible: false,
InkWell(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
@ -888,7 +893,9 @@ class UserinfoLogic extends GetxController {
child: Text(
title.isEmpty
? '👑成为TA的新主人'
: title.contains('新主人') ? '👑成为TA的新主人' : "👑成为TA的第一任",
: title.contains('新主人')
? '👑成为TA的新主人'
: "👑成为TA的第一任",
style: TextStyle(
color: Colors.white,
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 {

View File

@ -1397,48 +1397,65 @@ class MyTabbedScreenState extends State<UserinfoPage>
width: 4.sp,
),
_tabController.index == 1
? GestureDetector(
onTap: () async {
if (!logic.isMe) {
await logic.sendWantSee();
String source = logic.pageType == 1
? 'new_list'
: logic.pageType == 2
? 'nearby_list'
: 'chosen_list';
pushChatPage(logic.userInfoBean!.id.toString(),
logic.imId, logic.userInfoBean!.nickname,
source: source);
} else {
showTimeRecordDialog(logic.userInfoBean!);
}
},
child: Container(
margin: EdgeInsets.only(left: 10.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
? Row(
children: [
if (logic.isMe)
InkWell(
onTap: () {
logic.setTimeStatus();
},
child: Image.asset(
getMineImage(
!logic.isShowTime
? 'no_show_icon'
: 'show_icon'),
width: 30.sp,
),
),
padding: EdgeInsets.symmetric(
vertical: 2.sp,
horizontal: 12.sp,
),
child: Text(
!logic.isMe ? '想看' : '记录时光',
style: const TextStyle(
color: Colors.white,
fontSize: 12,
GestureDetector(
onTap: () async {
if (!logic.isMe) {
await logic.sendWantSee();
String source = logic.pageType == 1
? 'new_list'
: logic.pageType == 2
? 'nearby_list'
: 'chosen_list';
pushChatPage(logic.userInfoBean!.id.toString(),
logic.imId, logic.userInfoBean!.nickname,
source: source);
} else {
showTimeRecordDialog(logic.userInfoBean!);
}
},
child: Container(
margin: EdgeInsets.only(left: 10.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.symmetric(
vertical: 2.sp,
horizontal: 12.sp,
),
child: Text(
!logic.isMe ? '想看' : '记录时光',
style: const TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
),
),
)
],
)
: Container(),
logic.isBlack || logic.isDestroy || logic.isBlackBeen
? Container()
@ -2493,7 +2510,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center,
child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注",
"拉黑后,你将屏蔽对方的任何信息。若您喜欢了对方,将自动取消喜欢",
textAlign: TextAlign.center,
style: TextStyle(
color: const Color(0xCCF7FAFA), fontSize: 16.sp),

View File

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

View File

@ -377,7 +377,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
),
Container(
height: picHeight,
margin: EdgeInsets.only(top: 5.sp),
margin: EdgeInsets.only(top: 5.sp,bottom: 10.sp),
child: picHeight == 200.sp
? ClipRRect(
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 {
var result =
await DioManager.instance.get(url: Api.getWelfareDetail+id);

View File

@ -295,9 +295,14 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
action = '前往观赏';
tip =
'邀请大家免费观赏「${logic.bannerList[index]['gift']['name']}';
} else {
} else if (jump['scene'] == 'visit_big_backer'){
type = 2;
action = '立即拜访';
tip = '通过充值成为【乐园大金主】';
} else {
type = 3;
action = jump['btnText'];
tip = data['msg'];
}
return Container(
// margin: EdgeInsets.only(left: 10.sp, right: 10.sp),
@ -326,7 +331,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
} else if (type == 1) {
logic.treatWatch(
jump['param'].toString());
} else {
} else if (type == 2){
Get.toNamed(Routes.UserInfoPage,
arguments:
data['user']['id'].toString(),
@ -335,6 +340,10 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
});
logic.bigBackerVisit(
jump['param'].toString());
} else {
// homelogic.
pushPage(jump['scene'].toString(),jump['param'].toString());
logic.readTipBannerData(data);
}
if (logic.bannerList.isEmpty) {
logic.loadBannerData();
@ -414,53 +423,60 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
),
)),
if (logic.isShowTip)
if (logic.isShowTip && homelogic.isProd)
Positioned(
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
alignment: Alignment.center,
children: [
Positioned(
bottom: 40.sp,
child: Column(
children: [
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('同时邀请数万人看烟花/庄园/婚礼/火箭/城堡/弹幕',style: TextStyle(color: Colors.white,fontSize: 14.sp,fontWeight: FontWeight.bold),)),
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationZ(3.1416), // π radians = 180 degrees
child: Container(
margin: EdgeInsets.only(right: 125.sp),
child: Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
child: InkWell(
onTap: () {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
},
child: Container(
width: Get.width,
height: Get.height,
color: Colors.black.withOpacity(0.7),
child: Stack(
alignment: Alignment.center,
children: [
Positioned(
bottom: 40.sp,
child: Column(
children: [
Container(margin: EdgeInsets.only(bottom: 0.sp),child: Text('同时邀请数万人看烟花/庄园/婚礼/火箭/城堡/弹幕',style: TextStyle(color: Colors.white,fontSize: 14.sp,fontWeight: FontWeight.bold),)),
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationZ(3.1416), // π radians = 180 degrees
child: Container(
margin: EdgeInsets.only(right: 125.sp),
child: Image.asset(
getBaseImage('pop_top_right'),
width: 150.sp,
),
),
),
),
],
)),
Positioned(
bottom: 10.sp,
// right: 10.sp,
child: chatActionWidget(getBaseImage('qz_gift_8'), '万人展',
() {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
Get.bottomSheet(SendCastleDialog(),
isScrollControlled: true)
.then((value) {
if (value != null) {
logic.loadBannerData();
refreshData(logic);
}
});
}),
),
],
],
)),
Positioned(
bottom: 10.sp,
// right: 10.sp,
child: chatActionWidget(getBaseImage('qz_gift_8'), '万人展',
() {
logic.isShowTip = false;
logic.update();
logic.setSpTip();
Get.bottomSheet(SendCastleDialog(),
isScrollControlled: true)
.then((value) {
if (value != null) {
logic.loadBannerData();
refreshData(logic);
}
});
}),
),
],
),
),
)),
],

View File

@ -243,7 +243,6 @@ unlockingPayment(String cicleId, MyCallback myCallback) async {
myCallback(true);
}
});
// showToast(data.toString());
} else {
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 '../../circle_app/circle/logic.dart';
import '../../circle_app/circle/state.dart';
import '../../circle_app/home/logic.dart';
import '../../circle_app/likelist/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,
top: 0,
child: Image.asset(
getHomeImage('sign_check'),
getMineImage("icon_pay_select"),
height: 20.sp,
))
],

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.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/tencent_cloud_chat_uikit.dart';
import 'package:tencent_chat_push_for_china/tencent_chat_push_for_china.dart';
import 'circle_app/login/login/logic.dart';
import 'circle_app/splash/view.dart';
/// 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 = '';
final CoreServicesImpl coreInstance = TIMUIKitCore.getInstance();
final TUIChatSeparateViewModel chatSeparateViewModel =
TUIChatSeparateViewModel();
// navigatorKey
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
OverlayEntry? mainOverlayEntry;
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(
systemNavigationBarColor: Colors.black, //
// statusBarColor: Colors.transparent, //
));
FlutterBugly.postCatchedException(() async {
// ensureInitialized
@ -71,7 +86,6 @@ void main() {
);
}
});
}
setCustomErrorWidget() {
@ -188,6 +202,7 @@ class MyApp extends StatefulWidget {
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
AppLifecycleState? _lastLifecycleState;
// This widget is the root of your application.
final List<String> _guideList = ['bg', 'home_back'];
@ -202,13 +217,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
void initState() {
initIM();
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;
loadBgImage();
@ -350,8 +358,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
}
},
// [](https://cloud.tencent.com/document/product/269/70746#callback)
listener: V2TimSDKListener(onConnectSuccess: () {
}));
listener: V2TimSDKListener(onConnectSuccess: () {}));
}
loadBgImage() async {
@ -374,71 +381,76 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
minTextAdapt: true,
splitScreenMode: true,
builder: (context, child) {
return OKToast(
// 2-A: wrap your app with OKToast
textStyle: const TextStyle(fontSize: 19.0, color: Colors.white),
backgroundColor: Colors.grey,
animationCurve: Curves.easeIn,
return OKToast(
// 2-A: wrap your app with OKToast
textStyle: const TextStyle(fontSize: 19.0, color: Colors.white),
backgroundColor: Colors.grey,
animationCurve: Curves.easeIn,
// animationBuilder: const Miui10AnimBuilder(),
animationDuration: const Duration(milliseconds: 200),
duration: const Duration(seconds: 2),
child: GetMaterialApp(
title: '微乐园',
theme: ThemeData(
splashColor: Colors.transparent, //
highlightColor: Colors.transparent, //
),
initialBinding: SplashBinding(),
getPages: PageList.routes,
// animationBuilder: const Miui10AnimBuilder(),
animationDuration: const Duration(milliseconds: 200),
duration: const Duration(seconds: 2),
child: GetMaterialApp(
title: '微乐园',
navigatorKey: navigatorKey,
theme: ThemeData(
splashColor: Colors.transparent, //
highlightColor: Colors.transparent, //
),
initialBinding: SplashBinding(),
getPages: PageList.routes,
///
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
RefreshLocalizations.delegate,
/// iOS一定要设置
],
locale: const Locale('zh', 'CN'),
supportedLocales: const [
Locale('zh', 'CN'),
],
home: SplashPage(),
navigatorObservers: [routeObserver],
builder: (BuildContext context, Widget? child) {
return MediaQuery(
///
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
child:FlutterSmartDialog(
child: RefreshConfiguration(
footerTriggerDistance: 15.0,
dragSpeedRatio: 0.91,
footerBuilder: () => CustomLoadFooter(), // 使 Footer
headerTriggerDistance: 80.0,
maxOverScrollExtent: 100,
maxUnderScrollExtent: 0,
enableScrollWhenRefreshCompleted: true,
enableLoadingWhenFailed: true,
hideFooterWhenNotFull: false,
enableBallisticLoad: true, child: child!,
)
));
},
// Listen to route changes
routingCallback: (routing) {
if (routing != null) {
String currentRoute = routing.current;
String previousRoute = routing.previous;
if (currentRoute != Routes.Home && currentRoute != '/' && currentRoute != previousRoute && !filterPageList.contains(currentRoute)) {
routeList.add(currentRoute);
addUmengPage(currentRoute);
}
}
},
debugShowCheckedModeBanner: false,
),
);
///
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
RefreshLocalizations.delegate,
/// iOS一定要设置
],
locale: const Locale('zh', 'CN'),
supportedLocales: const [
Locale('zh', 'CN'),
],
home: SplashPage(),
navigatorObservers: [routeObserver],
builder: (BuildContext context, Widget? child) {
return MediaQuery(
///
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
child: FlutterSmartDialog(
child: RefreshConfiguration(
footerTriggerDistance: 15.0,
dragSpeedRatio: 0.91,
footerBuilder: () => CustomLoadFooter(), // 使 Footer
headerTriggerDistance: 80.0,
maxOverScrollExtent: 100,
maxUnderScrollExtent: 0,
enableScrollWhenRefreshCompleted: true,
enableLoadingWhenFailed: true,
hideFooterWhenNotFull: false,
enableBallisticLoad: true, child: child!,
)));
},
// Listen to route changes
routingCallback: (routing) {
if (routing != null) {
String currentRoute = routing.current;
String previousRoute = routing.previous;
if (currentRoute != Routes.Home &&
currentRoute != '/' &&
currentRoute != previousRoute &&
!filterPageList.contains(currentRoute)) {
routeList.add(currentRoute);
addUmengPage(currentRoute);
}
}
},
debugShowCheckedModeBanner: false,
),
);
});
}
@ -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();
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 getShowUserTrendsConf = '/user-service/user/config/getShowUserTrendsConf';
//
static const setShowUserTrendsConf = '/user-service/user/config/setShowUserTrendsConf';
//
static const quickAnswerAll = 'up-service/quickAnswer/getAll';
@ -470,11 +476,14 @@ class Api {
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 noticeRead = '/up-service/callout/notice/read';
//
static const getWelfare = '/mall-service/user/welfare/receive/';
@ -783,4 +792,13 @@ class Api {
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,
));
_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) {

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 /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/view.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/harmony__haven/binding.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/view.dart';
import '../circle_app/invent_record/binding.dart';
@ -692,6 +696,15 @@ class PageList {
page: () => Search_peoplePage(),
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 HelpBack = '/HelpBack';
static const CallOutDetail = '/CallOutDetail';
}

View File

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

View File

@ -46,6 +46,7 @@ import '../commons/colors/app_color.dart';
import '../commons/widgets/timeRecord_dialog.dart';
import '../net/dio_manager.dart';
import 'SharedPreferencesHelper.dart';
import 'cache_img.dart';
List chatIdList = [];
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 {
@ -1674,7 +1708,328 @@ Future<bool> checkCameraStatus() async {
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 {
// public final static String MY_MAIN = "my_main";//
@ -1714,12 +2069,15 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
// "follow";//
// 'interest_discovery';//
// "activity";//驿
// to_bind_baby
if (action == 'my_main') {
Get.until((route) => route.settings.name == '/home');
final homeLogic = Get.put(HomeLogic());
homeLogic.tabController.animateTo(4);
homeLogic.updateIndex(4);
} else if (action == 'to_bind_baby') {
loadMasterData(param);
} else if (action == 'my_interest') {
Get.toNamed(Routes.MyCirclePage);
} else if (action == 'activity') {

View File

@ -28,7 +28,10 @@ typedef void NoticeCallback();
void showFloatingButtonOverlay(BuildContext context, String nickname,
String ageMsg, String avatar, int event, NoticeCallback noticeCallback) {
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);
late OverlayEntry overlayEntry;
bool showMessage = false;
@ -186,7 +189,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
),
),
),
if (event == 0)
// if (event == 0)
Positioned(
top: MediaQuery.of(context).padding.top,
right: 8,

View File

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