1.3.8代码提交
This commit is contained in:
parent
0751408802
commit
fb8e556303
@ -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 29
|
||||
versionName "1.3.7"
|
||||
versionCode 30
|
||||
versionName "1.3.8"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.3 KiB |
@ -381,7 +381,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.2;
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -530,7 +530,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.2;
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@ -573,7 +573,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.2;
|
||||
MARKETING_VERSION = 1.3.7;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.circleapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@ -7,6 +7,7 @@ import 'package:circle_app/network/api.dart';
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:diff_match_patch/diff_match_patch.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_setting_model.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/friendShip/friendship_services.dart';
|
||||
@ -288,11 +289,169 @@ class _InputTextFieldState extends TIMUIKitState<TIMInputTextField> {
|
||||
return imStatusOK;
|
||||
}
|
||||
|
||||
void _showReportDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 277.sp,
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(1.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"是否解除拉黑",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 14.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Image(
|
||||
image: AssetImage(getMineImage("icon_dialog_black")),
|
||||
width: 70.sp,
|
||||
height: 70.sp,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
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),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: const Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.sp),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
var data = await DioManager.instance.post(
|
||||
url: '${Api.setBlock + widget.conversationID.split('_').last}/block', params: {'status': '0'});
|
||||
var bean = BaseResponse<dynamic>.fromJson(
|
||||
data,
|
||||
(jsonData) => jsonData,
|
||||
);
|
||||
if (bean.isSuccess()) {
|
||||
final FriendshipServices _friendshipServices =
|
||||
serviceLocator<FriendshipServices>();
|
||||
isBlack = false;
|
||||
}
|
||||
showOKToast(bean.msg);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: const Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool isSendLoging = false;
|
||||
onSubmitted() async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -558,6 +558,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
showKeyboard = showSendSoundText;
|
||||
@ -768,6 +769,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
getImageFile();
|
||||
@ -779,6 +781,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
getTakeImageFile();
|
||||
@ -790,6 +793,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () async {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
showGiftPannel();
|
||||
@ -803,6 +807,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
getVideoFile(ImageSource.gallery);
|
||||
@ -814,6 +820,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () {
|
||||
if (isBlack) {
|
||||
showOKToast("您已将对方拉黑,请移除黑名单后在发送消息~");
|
||||
_showReportDialog(context);
|
||||
return;
|
||||
}
|
||||
getVideoFile(ImageSource.camera);
|
||||
@ -1333,6 +1340,163 @@ class _TIMTextFieldLayoutNarrowState
|
||||
// }
|
||||
}
|
||||
|
||||
void _showReportDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: 277.sp,
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(1.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
"是否解除拉黑",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 14.sp),
|
||||
alignment: Alignment.center,
|
||||
child: Image(
|
||||
image: AssetImage(getMineImage("icon_dialog_black")),
|
||||
width: 70.sp,
|
||||
height: 70.sp,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
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),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0x26FFFFFF),
|
||||
Color(0x26FFFFFF),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: const Text(
|
||||
"否",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24.sp),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
var data = await DioManager.instance.post(
|
||||
url: '${Api.setBlock + widget.conversationID.split('_').last}/block', params: {'status': '0'});
|
||||
var bean = BaseResponse<dynamic>.fromJson(
|
||||
data,
|
||||
(jsonData) => jsonData,
|
||||
);
|
||||
if (bean.isSuccess()) {
|
||||
final FriendshipServices _friendshipServices =
|
||||
serviceLocator<FriendshipServices>();
|
||||
isBlack = false;
|
||||
}
|
||||
showOKToast(bean.msg);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 24.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
bottom: 10.sp,
|
||||
left: 52.sp,
|
||||
right: 52.sp),
|
||||
child: const Text(
|
||||
"是",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void loadUserData() async {
|
||||
var data = await DioManager.instance.get(
|
||||
url:
|
||||
|
||||
@ -49,7 +49,7 @@ class _ChatPageState extends State<ChatPage> {
|
||||
super.initState();
|
||||
initEventBus();
|
||||
loadMyInfo();
|
||||
// loadIsShowSendGiftDialogData();
|
||||
loadIsShowSendGiftDialogData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
String withStr = '';
|
||||
int selectedIndex = -1;
|
||||
|
||||
|
||||
String tipStr = '';
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
@ -43,6 +43,7 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
if (info['name'] == '浪漫告白') {
|
||||
selectedIndex = i ;
|
||||
giftId = info['id'].toString();
|
||||
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,8 +65,8 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 285.sp
|
||||
),
|
||||
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
padding: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
||||
margin: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
||||
padding: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
gradient: LinearGradient(colors: [Color(0xFF4C3E5F),Color(0xFF324140)]),
|
||||
@ -85,14 +86,38 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 102.sp,
|
||||
margin: EdgeInsets.only(top: 12.sp,),
|
||||
height: tipStr.isNotEmpty ? 145.sp : 122.sp,
|
||||
margin: EdgeInsets.only(top: 12.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)])),
|
||||
child: giftGridWidget(),
|
||||
child: Column(
|
||||
children: [
|
||||
if (tipStr.isNotEmpty)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top:6.sp),
|
||||
child: Text(
|
||||
'礼物送出后,获得$tipStr小时的消息置顶',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
giftGridWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// height: 102.sp,
|
||||
// margin: EdgeInsets.only(top: 12.sp,),
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10.sp),
|
||||
// gradient: LinearGradient(
|
||||
// colors: [Color(0xFF132B40), Color(0xFF251240)])),
|
||||
// child: giftGridWidget(),
|
||||
// ),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 25.sp,),
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
@ -169,9 +194,9 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
giftGridWidget() {
|
||||
return Container(
|
||||
width: Get.width,
|
||||
height: 102.sp,
|
||||
height: 120.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.sp, right: 10.sp, top: 10.sp, bottom: 10.sp),
|
||||
EdgeInsets.only(left: 5.sp, right: 5.sp, top: 10.sp, bottom: 10.sp),
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: giftList.length,
|
||||
@ -192,12 +217,12 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
onTap: () {
|
||||
selectedIndex = index;
|
||||
giftId = info['id'].toString();
|
||||
// tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
height: 78.sp,
|
||||
width: 78.sp,
|
||||
height: 120.sp,
|
||||
width: 75.sp,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
@ -207,9 +232,20 @@ class _SendGiftDialogState extends State<SendGiftDialog> {
|
||||
children: [
|
||||
Image.network(
|
||||
info['icon'],
|
||||
width: 65.sp,
|
||||
height: 65.sp,
|
||||
width: 60.sp,
|
||||
height: 60.sp,
|
||||
),
|
||||
|
||||
Text(info['name'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500)),
|
||||
Text('${price.toInt()}小票',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500))
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
@ -66,7 +66,7 @@ class _WishDialogState extends State<WishDialog> {
|
||||
giftGridWidget() {
|
||||
return Container(
|
||||
width: Get.width,
|
||||
height: 102.sp,
|
||||
height: 120.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.sp, right: 10.sp, top: 10.sp, bottom: 10.sp),
|
||||
child: ListView.builder(
|
||||
@ -93,8 +93,8 @@ class _WishDialogState extends State<WishDialog> {
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
height: 78.sp,
|
||||
width: 78.sp,
|
||||
height: 120.sp,
|
||||
width: 77.sp,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
@ -107,6 +107,16 @@ class _WishDialogState extends State<WishDialog> {
|
||||
width: 65.sp,
|
||||
height: 65.sp,
|
||||
),
|
||||
Text(info['name'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500)),
|
||||
Text('${price.toInt()}小票',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w500))
|
||||
],
|
||||
)
|
||||
],
|
||||
@ -153,7 +163,7 @@ class _WishDialogState extends State<WishDialog> {
|
||||
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
Container(
|
||||
height: tipStr.isNotEmpty ? 125.sp : 102.sp,
|
||||
height: tipStr.isNotEmpty ? 145.sp : 122.sp,
|
||||
margin: EdgeInsets.only(top: 12.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
@ -228,7 +238,6 @@ class _WishDialogState extends State<WishDialog> {
|
||||
return;
|
||||
}
|
||||
var info = giftList[selectedIndex];
|
||||
|
||||
sendInventWishCustomMsg(
|
||||
widget.accId, jsonEncode(info), '邀请你许个愿');
|
||||
},
|
||||
|
||||
@ -303,7 +303,28 @@ class CircleLogic extends GetxController {
|
||||
}
|
||||
|
||||
try {
|
||||
vicinityList.addAll(bean.data.users);
|
||||
|
||||
if (vicinityPage == 1) {
|
||||
vicinityList.addAll(bean.data.users);
|
||||
} else {
|
||||
List<VicinityItemBean> info = [];
|
||||
bean.data.users.forEach((element) {
|
||||
bool isContain = false;
|
||||
vicinityList.forEach((listInfo) {
|
||||
|
||||
if (listInfo.id == element.id) {
|
||||
isContain = true;
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
info.add(element);
|
||||
}
|
||||
});
|
||||
if (info.isNotEmpty) {
|
||||
vicinityList.addAll(info);
|
||||
}
|
||||
}
|
||||
|
||||
vicinityPage = vicinityPage + 1;
|
||||
} on Exception {}
|
||||
update();
|
||||
|
||||
@ -227,7 +227,24 @@ class _DiscoverState extends State<Discover>
|
||||
list = dataList;
|
||||
refreshController.refreshCompleted();
|
||||
} else {
|
||||
list.addAll(dataList);
|
||||
List info = [];
|
||||
dataList.forEach((element) {
|
||||
var user = Users.fromJson(element);
|
||||
bool isContain = false;
|
||||
list.forEach((listInfo) {
|
||||
var user1 = Users.fromJson(listInfo);
|
||||
if (user1.userId == user.userId) {
|
||||
isContain = true;
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
info.add(element);
|
||||
}
|
||||
});
|
||||
if (info.isNotEmpty) {
|
||||
list.addAll(info);
|
||||
}
|
||||
// list.addAll(dataList);
|
||||
}
|
||||
|
||||
index = index + 1;
|
||||
|
||||
@ -72,7 +72,8 @@ class _LikeViewState extends State<LikeView>
|
||||
|
||||
scroToTop = EventBusManager.on<ScrollToTop>().listen((event) {
|
||||
// if (widget.logic.state.index == widget.index) {
|
||||
var str = '{\"content\":{\"calloutId\":10453,\"interestId\":5},\"event\":3}';
|
||||
var str =
|
||||
'{\"content\":{\"calloutId\":10453,\"interestId\":5},\"event\":3}';
|
||||
var params = jsonDecode(str);
|
||||
scrollController.animateTo(
|
||||
0.0,
|
||||
@ -82,7 +83,7 @@ class _LikeViewState extends State<LikeView>
|
||||
});
|
||||
likeRefreshSub = EventBusManager.on<LikeRefresh>().listen((event) {
|
||||
// if (widget.logic.state.index == widget.index) {
|
||||
refreshData();
|
||||
refreshData();
|
||||
// }
|
||||
});
|
||||
// widget.back(widget.createState());
|
||||
@ -142,8 +143,22 @@ class _LikeViewState extends State<LikeView>
|
||||
}
|
||||
if (dataList.isNotEmpty) {
|
||||
recomandMore = true;
|
||||
List<Lists> info = [];
|
||||
for (var element in dataList) {
|
||||
recomanddlists.add(Lists.fromJson(element));
|
||||
Lists infos = Lists.fromJson(element);
|
||||
|
||||
bool isContain = false;
|
||||
recomanddlists.forEach((listInfo) {
|
||||
if (listInfo.id == infos.id) {
|
||||
isContain = true;
|
||||
}
|
||||
});
|
||||
if (!isContain) {
|
||||
info.add(infos);
|
||||
}
|
||||
}
|
||||
if (info.isNotEmpty) {
|
||||
recomanddlists.addAll(info);
|
||||
}
|
||||
recomandPage++;
|
||||
}
|
||||
@ -274,14 +289,11 @@ class _LikeViewState extends State<LikeView>
|
||||
}
|
||||
}
|
||||
if (!isContain) {
|
||||
bean.chat!.users!.add(Users(avatar: avatar,id: userId,nickname: name));
|
||||
bean.chat!.users!
|
||||
.add(Users(avatar: avatar, id: userId, nickname: name));
|
||||
bean.chat!.count = bean.chat!.count + 1;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,81 +322,81 @@ class _LikeViewState extends State<LikeView>
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
// margin:
|
||||
// EdgeInsets.only(left: widget.index > 0 ? 4.sp : 0, right: 4.sp),
|
||||
child: SmartRefresher(
|
||||
controller: refreshController,
|
||||
onRefresh: refreshData,
|
||||
onLoading: loadMore,
|
||||
enablePullUp: recomandMore,
|
||||
child: ListView.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
addAutomaticKeepAlives: false,
|
||||
addRepaintBoundaries: false,
|
||||
scrollDirection: Axis.vertical,
|
||||
controller: scrollController,
|
||||
itemCount: likeMore
|
||||
? lists.length
|
||||
: lists.length + recomanddlists.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (lists.length - 1 >= index) {
|
||||
var list = lists[index];
|
||||
if (list.isQueen!) {
|
||||
return vipDynamicItem(list);
|
||||
} else {
|
||||
return normalDynamicItem(list);
|
||||
}
|
||||
} else if (!likeMore &&
|
||||
lists.length == index &&
|
||||
recomanddlists.isNotEmpty) {
|
||||
return tipItem();
|
||||
} else if (index - lists.length < recomanddlists.length &&
|
||||
!likeMore) {
|
||||
var list = recomanddlists[index - lists.length];
|
||||
if (list.isQueen!) {
|
||||
return vipDynamicItem(list);
|
||||
} else {
|
||||
return normalDynamicItem(list);
|
||||
}
|
||||
} else {
|
||||
if (recomandMore) return Container();
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: likeMore ? 0 : 10.sp),
|
||||
child: likeMore
|
||||
? loaddingWidget(likeMore)
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
var homeLogic = Get.find<HomeLogic>();
|
||||
homeLogic.tabController.animateTo(1,
|
||||
duration: Duration(milliseconds: 0),
|
||||
curve: Curves.ease);
|
||||
homeLogic.updateIndex(1);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 10.sp),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getLoginImage('start_bg'),
|
||||
width: 180.sp,
|
||||
),
|
||||
Text(
|
||||
'查看更多圈子',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.sp),
|
||||
)
|
||||
],
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
// margin:
|
||||
// EdgeInsets.only(left: widget.index > 0 ? 4.sp : 0, right: 4.sp),
|
||||
child: SmartRefresher(
|
||||
controller: refreshController,
|
||||
onRefresh: refreshData,
|
||||
onLoading: loadMore,
|
||||
enablePullUp: recomandMore,
|
||||
child: ListView.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
addAutomaticKeepAlives: false,
|
||||
addRepaintBoundaries: false,
|
||||
scrollDirection: Axis.vertical,
|
||||
controller: scrollController,
|
||||
itemCount: likeMore
|
||||
? lists.length
|
||||
: lists.length + recomanddlists.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (lists.length - 1 >= index) {
|
||||
var list = lists[index];
|
||||
if (list.isQueen!) {
|
||||
return vipDynamicItem(list);
|
||||
} else {
|
||||
return normalDynamicItem(list);
|
||||
}
|
||||
} else if (!likeMore &&
|
||||
lists.length == index &&
|
||||
recomanddlists.isNotEmpty) {
|
||||
return tipItem();
|
||||
} else if (index - lists.length < recomanddlists.length &&
|
||||
!likeMore) {
|
||||
var list = recomanddlists[index - lists.length];
|
||||
if (list.isQueen!) {
|
||||
return vipDynamicItem(list);
|
||||
} else {
|
||||
return normalDynamicItem(list);
|
||||
}
|
||||
} else {
|
||||
if (recomandMore) return Container();
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: likeMore ? 0 : 10.sp),
|
||||
child: likeMore
|
||||
? loaddingWidget(likeMore)
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
var homeLogic = Get.find<HomeLogic>();
|
||||
homeLogic.tabController.animateTo(1,
|
||||
duration: Duration(milliseconds: 0),
|
||||
curve: Curves.ease);
|
||||
homeLogic.updateIndex(1);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 10.sp),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getLoginImage('start_bg'),
|
||||
width: 180.sp,
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}),
|
||||
),
|
||||
));
|
||||
Text(
|
||||
'查看更多圈子',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
void _showTextContentDialog(BuildContext context, String msg, String title) {
|
||||
@ -1261,7 +1273,8 @@ class _LikeViewState extends State<LikeView>
|
||||
bean['is_join'] = !bean['is_join'];
|
||||
if (recomanddlists.isNotEmpty) {
|
||||
recomanddlists.forEach((element) {
|
||||
if (element.interest!['id'].toString() == bean['id'].toString()) {
|
||||
if (element.interest!['id'].toString() ==
|
||||
bean['id'].toString()) {
|
||||
element.interest!['is_join'] = true;
|
||||
element.interest = element.interest!;
|
||||
}
|
||||
@ -1270,7 +1283,8 @@ class _LikeViewState extends State<LikeView>
|
||||
|
||||
if (lists.isNotEmpty) {
|
||||
lists.forEach((element) {
|
||||
if (element.interest!['id'].toString() == bean['id'].toString()) {
|
||||
if (element.interest!['id'].toString() ==
|
||||
bean['id'].toString()) {
|
||||
element.interest!['is_join'] = true;
|
||||
element.interest = element.interest!;
|
||||
}
|
||||
|
||||
@ -373,6 +373,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
logic.getMode();
|
||||
} else if (index == 2) {
|
||||
final logic = Get.find<MsgLogic>();
|
||||
EventBusManager.fire(MsgRecommendCardRefresh());
|
||||
logic.loadChatData();
|
||||
}
|
||||
update();
|
||||
@ -439,4 +440,8 @@ class conTop {
|
||||
bool isTop;
|
||||
String conId;
|
||||
conTop(this.isTop,this.conId);
|
||||
}
|
||||
|
||||
class MsgRecommendCardRefresh {
|
||||
|
||||
}
|
||||
@ -170,11 +170,16 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
// serviceLocator<TUIFriendShipViewModel>();
|
||||
bool hasMore = true;
|
||||
List<String> chatImIdList = [];
|
||||
var recommendCircleFriendData = {};
|
||||
Map recommendCircleFriendData = {};
|
||||
|
||||
|
||||
var sub;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
sub = EventBusManager.on().listen((event) {
|
||||
loadRecommendCircleFriendData();
|
||||
});
|
||||
loadRecommendCircleFriendData();
|
||||
final controller = getController();
|
||||
widget.scrollController!.addListener(() {
|
||||
@ -392,6 +397,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
sub.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -637,429 +643,371 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
}
|
||||
|
||||
recommendCircleFriendWidget() {
|
||||
var info = {};
|
||||
try {
|
||||
var info = {};
|
||||
|
||||
var user = Users.fromJson(recommendCircleFriendData['user']);
|
||||
var user = Users.fromJson(recommendCircleFriendData['user']);
|
||||
|
||||
// 对方喜欢了你100
|
||||
// ·你们有共同喜欢的圈友90
|
||||
// ·你喜欢的圈友也喜欢TA80
|
||||
// ·你们都在深圳留下过足迹70
|
||||
// ·你们有2个共同的圈子:圈子名称、圈子名称60
|
||||
// ·我刚来到这里哦55
|
||||
// ·可能是你想认识的人50
|
||||
// ·很多圈友都喜欢TA40
|
||||
// ·TA是乐园优秀圈主哦~30
|
||||
// 对方喜欢了你100
|
||||
// ·你们有共同喜欢的圈友90
|
||||
// ·你喜欢的圈友也喜欢TA80
|
||||
// ·你们都在深圳留下过足迹70
|
||||
// ·你们有2个共同的圈子:圈子名称、圈子名称60
|
||||
// ·我刚来到这里哦55
|
||||
// ·可能是你想认识的人50
|
||||
// ·很多圈友都喜欢TA40
|
||||
// ·TA是乐园优秀圈主哦~30
|
||||
|
||||
var titleList = [];
|
||||
|
||||
if (recommendCircleFriendData['is_follow_me']) {
|
||||
titleList.add('对方喜欢了你');
|
||||
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||
titleList.add('你们有共同喜欢的圈友');
|
||||
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||
titleList.add('你喜欢的圈友也喜欢TA');
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List citys = recommendCircleFriendData['both_cities'];
|
||||
if (citys.isNotEmpty) {
|
||||
titleList.add('你们都在${citys.first}留下过足迹');
|
||||
}
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List circles = recommendCircleFriendData['both_interests'];
|
||||
if (circles.isNotEmpty) {
|
||||
List<dynamic> both_interests =
|
||||
recommendCircleFriendData['both_interests'];
|
||||
List<String> circleList = [];
|
||||
both_interests.forEach((element) {
|
||||
circleList.add(element['title']);
|
||||
});
|
||||
if (circleList.isNotEmpty) {
|
||||
titleList
|
||||
.add('你们有${circleList.length}个共同的圈子:${circleList.join('、')}');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData.containsKey('is_new_user')) {
|
||||
titleList.add('我刚来到这里哦');
|
||||
}
|
||||
}
|
||||
info = checkCardReturnData(recommendCircleFriendData);
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_wanna_meet']) {
|
||||
titleList.add('很多圈友都喜欢TA');
|
||||
}
|
||||
}
|
||||
List circleList = recommendCircleFriendData['interests'];
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_most_fans']) {
|
||||
titleList.add('可能是你想认识的人');
|
||||
}
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
child: Column(children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 2.sp,
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
)),
|
||||
Container(
|
||||
width: 4.sp,
|
||||
height: 4.sp,
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.white.withOpacity(0.5)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 2.sp,
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0, -1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: Text(
|
||||
'圈友推荐',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||
]),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
loadRecommendCircleFriendData();
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.refresh_sharp,
|
||||
size: 18.sp,
|
||||
color: AppColor.mainColor,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'换一位',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 16.sp),
|
||||
width: Get.width,
|
||||
// constraints: BoxConstraints(maxHeight: 230.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)]),
|
||||
borderRadius: BorderRadius.circular(8.sp),
|
||||
border: GradientBoxBorder(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp,top: 10.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,arguments: user.userId.toString());
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
recommendCircleFriendData['user']['avatar'],
|
||||
width: 50.sp,
|
||||
height: 50.sp,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.sp,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
user.nickname ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0XFFF7FAFA),
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 4.sp,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 6.sp, right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(9.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.25, 0.5),
|
||||
end: Alignment(0.75, 0.5),
|
||||
colors: [
|
||||
Color(0xff8DFFF8),
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
getAgeCOntent(
|
||||
user!.gender ?? 0,
|
||||
user!.age ?? 0,
|
||||
user!.role ?? 0,
|
||||
user!.orientation ?? 0),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (user.vip! > 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 4.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
user.vip == 1 ? 'vip' : 'year_vip'),
|
||||
width: 36.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (!chatImIdList.contains(user.userId.toString())) {
|
||||
await createCustomMsg(user.userId.toString(), recommendCircleFriendData['user']['imId']);
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||
titleList.add('TA是乐园优秀圈主哦~');
|
||||
}
|
||||
}
|
||||
pushChatPage(user.userId.toString(), recommendCircleFriendData['user']['imId'], user.nickname!);
|
||||
},
|
||||
child: Container(
|
||||
height: 25.sp,
|
||||
padding: EdgeInsets.only(left: 6.sp,right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(12.5.sp)),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'聊一聊',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (info.containsKey('desc'))
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Text(
|
||||
info['desc'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
if (info.containsKey('city'))
|
||||
info['city'].toString().isNotEmpty
|
||||
? Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3.sp,
|
||||
height: 3.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5.sp),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(child: Text(
|
||||
info['city'],
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
if (info.containsKey('both_interests'))
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Text(
|
||||
info['both_interests'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
if (titleList.length >= 1) {
|
||||
info['city'] = titleList.first;
|
||||
}
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp, top: 10.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'交友宣言:' +
|
||||
recommendCircleFriendData['user']['signature'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)),
|
||||
])),
|
||||
Image.asset(
|
||||
getCircleImage('line'),
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
|
||||
if (titleList.length >= 2) {
|
||||
info['both_interests'] = titleList[1];
|
||||
}
|
||||
|
||||
if (titleList.length >= 3) {
|
||||
info['desc'] = titleList[2];
|
||||
}
|
||||
|
||||
List circleList = recommendCircleFriendData['interests'];
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
child: Column(children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 2.sp,
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
)),
|
||||
Container(
|
||||
width: 4.sp,
|
||||
height: 4.sp,
|
||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.white.withOpacity(0.5)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 2.sp,
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0, -1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child: Text(
|
||||
'圈友推荐',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0xffF657FF), offset: Offset(0.0, -1))
|
||||
]),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Image.asset(
|
||||
getMsgImage('heart_icon'),
|
||||
width: 18.sp,
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
loadRecommendCircleFriendData();
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.refresh_sharp,
|
||||
size: 18.sp,
|
||||
color: AppColor.mainColor,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'换一位',
|
||||
style: TextStyle(
|
||||
color: AppColor.mainColor, fontSize: 15.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 16.sp),
|
||||
width: Get.width,
|
||||
// constraints: BoxConstraints(maxHeight: 230.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF4C3E5F), Color(0xFF324140)]),
|
||||
borderRadius: BorderRadius.circular(8.sp),
|
||||
border: GradientBoxBorder(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
width: 1.sp,
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp,top: 10.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,arguments: user.userId.toString());
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
recommendCircleFriendData['user']['avatar'],
|
||||
width: 50.sp,
|
||||
height: 50.sp,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.sp,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
user.nickname ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0XFFF7FAFA),
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 4.sp,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 18.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 6.sp, right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(9.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.25, 0.5),
|
||||
end: Alignment(0.75, 0.5),
|
||||
colors: [
|
||||
Color(0xff8DFFF8),
|
||||
Color(0xffB5D3FF)
|
||||
])),
|
||||
child: Text(
|
||||
getAgeCOntent(
|
||||
user!.gender ?? 0,
|
||||
user!.age ?? 0,
|
||||
user!.role ?? 0,
|
||||
user!.orientation ?? 0),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (user.vip! > 0)
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 4.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
getCircleImage(
|
||||
user.vip == 1 ? 'vip' : 'year_vip'),
|
||||
width: 36.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (!chatImIdList.contains(user.userId.toString())) {
|
||||
await createCustomMsg(user.userId.toString(), recommendCircleFriendData['user']['imId']);
|
||||
}
|
||||
|
||||
pushChatPage(user.userId.toString(), recommendCircleFriendData['user']['imId'], user.nickname!);
|
||||
},
|
||||
child: Container(
|
||||
height: 25.sp,
|
||||
padding: EdgeInsets.only(left: 6.sp,right: 6.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(12.5.sp)),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'聊一聊',
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (info.containsKey('desc'))
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Text(
|
||||
info['desc'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
if (info.containsKey('city'))
|
||||
info['city'].toString().isNotEmpty
|
||||
? Container(
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3.sp,
|
||||
height: 3.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5.sp),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(child: Text(
|
||||
info['city'],
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
if (info.containsKey('both_interests'))
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Text(
|
||||
info['both_interests'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp, top: 10.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'交友宣言:' +
|
||||
recommendCircleFriendData['user']['signature'],
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)),
|
||||
])),
|
||||
Image.asset(
|
||||
getCircleImage('line'),
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
|
||||
if (circleList.isNotEmpty)
|
||||
Container(
|
||||
height: 72.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
||||
width: Get.width,
|
||||
child: ListView.builder(itemBuilder: (context,index) {
|
||||
return circleInfoItem(circleList[index], index);
|
||||
},itemCount: circleList.length,scrollDirection: Axis.horizontal,),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
]));
|
||||
if (circleList.isNotEmpty)
|
||||
Container(
|
||||
height: 72.sp,
|
||||
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
||||
width: Get.width,
|
||||
child: ListView.builder(itemBuilder: (context,index) {
|
||||
return circleInfoItem(circleList[index], index);
|
||||
},itemCount: circleList.length,scrollDirection: Axis.horizontal,),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
]));
|
||||
} catch (e) {
|
||||
loadRecommendCircleFriendData();
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
|
||||
circleInfoItem(var bean, int index) {
|
||||
|
||||
@ -22,9 +22,23 @@ class SwiperPage extends StatefulWidget {
|
||||
class _SwiperPageState extends State<SwiperPage> {
|
||||
|
||||
GlobalKey _globalKey = GlobalKey();
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<SwiperLogic>(builder: (logic) {
|
||||
List<Widget> imgList = [];
|
||||
logic.imgList.forEach((element) {
|
||||
imgList.add(CachedNetworkImage(
|
||||
imageUrl: element,
|
||||
|
||||
fit: BoxFit.cover,
|
||||
height: Get.height,
|
||||
width: Get.width,
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
return Scaffold(
|
||||
appBar: null,
|
||||
backgroundColor: Colors.black87,
|
||||
@ -41,6 +55,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
||||
controller: logic.swiperController,
|
||||
index: logic.index,
|
||||
loop: false,
|
||||
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
// if (logic.index == index) {
|
||||
// return RepaintBoundary(
|
||||
@ -89,20 +104,40 @@ class _SwiperPageState extends State<SwiperPage> {
|
||||
|
||||
itemWidget(SwiperLogic logic,int index) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
width: Get.width,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
|
||||
child: CachedNetworkImage(
|
||||
// progressIndicatorBuilder: (context,str,progress) {
|
||||
// return Container();
|
||||
// },
|
||||
placeholder: (context,str) {
|
||||
print(str + '进度');
|
||||
if (Get.arguments['index'] == index) {
|
||||
return Container(
|
||||
// color: Colors.red,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: logic.imgList[index].toString(),
|
||||
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
imageUrl: logic.imgList[index].toString().contains('?') ? logic.imgList[index].toString().split('?').first : logic.imgList[index].toString(),
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
width: Get.width,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
||||
@ -228,10 +228,22 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
color: Color(0xFF240F3B)),
|
||||
alignment: Alignment.center,
|
||||
height: 24.sp,
|
||||
child: Text(
|
||||
'想要微信号',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 14.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getDisCoverImage('wx'),
|
||||
width: 20.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'想要微信号',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@ -154,7 +154,7 @@ Widget getZN() {
|
||||
),
|
||||
margin: EdgeInsets.only(left: 10.0.sp),
|
||||
child: Text(
|
||||
"直男",
|
||||
"男",
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 12.0.sp,
|
||||
@ -176,7 +176,7 @@ Widget getNV() {
|
||||
),
|
||||
margin: EdgeInsets.only(left: 10.0.sp),
|
||||
child: Text(
|
||||
"真女",
|
||||
"女",
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 12.0.sp,
|
||||
|
||||
@ -42,7 +42,7 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
itemWidget() {
|
||||
var info = {};
|
||||
|
||||
var user = Users.fromJson(recommendCircleFriendData['user']);
|
||||
|
||||
|
||||
// 对方喜欢了你100
|
||||
// ·你们有共同喜欢的圈友90
|
||||
@ -54,71 +54,77 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
// ·TA是乐园优秀圈主哦~30
|
||||
|
||||
var titleList = [];
|
||||
var user = Users.fromJson(recommendCircleFriendData['user']);
|
||||
try {
|
||||
|
||||
if (recommendCircleFriendData['is_follow_me']) {
|
||||
titleList.add('对方喜欢了你');
|
||||
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||
titleList.add('你们有共同喜欢的圈友');
|
||||
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||
titleList.add('你喜欢的圈友也喜欢TA');
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List citys = recommendCircleFriendData['both_cities'];
|
||||
if (citys.isNotEmpty) {
|
||||
titleList.add('你们都在${citys.first}留下过足迹');
|
||||
if (recommendCircleFriendData['is_follow_me']) {
|
||||
titleList.add('对方喜欢了你');
|
||||
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||
titleList.add('你们有共同喜欢的圈友');
|
||||
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||
titleList.add('你喜欢的圈友也喜欢TA');
|
||||
}
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List circles = recommendCircleFriendData['both_interests'];
|
||||
if (circles.isNotEmpty) {
|
||||
List<dynamic> both_interests =
|
||||
recommendCircleFriendData['both_interests'];
|
||||
List<String> circleList = [];
|
||||
both_interests.forEach((element) {
|
||||
circleList.add(element['title']);
|
||||
});
|
||||
if (circleList.isNotEmpty) {
|
||||
titleList
|
||||
.add('你们有${circleList.length}个共同的圈子:${circleList.join('、')}');
|
||||
if (titleList.length < 3) {
|
||||
List citys = recommendCircleFriendData['both_cities'];
|
||||
if (citys.isNotEmpty) {
|
||||
titleList.add('你们都在${citys.first}留下过足迹');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData.containsKey('is_new_user')) {
|
||||
titleList.add('我刚来到这里哦');
|
||||
if (titleList.length < 3) {
|
||||
List circles = recommendCircleFriendData['both_interests'];
|
||||
if (circles.isNotEmpty) {
|
||||
List<dynamic> both_interests =
|
||||
recommendCircleFriendData['both_interests'];
|
||||
List<String> circleList = [];
|
||||
both_interests.forEach((element) {
|
||||
circleList.add(element['title']);
|
||||
});
|
||||
if (circleList.isNotEmpty) {
|
||||
titleList
|
||||
.add('你们有${circleList.length}个共同的圈子:${circleList.join('、')}');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_wanna_meet']) {
|
||||
titleList.add('很多圈友都喜欢TA');
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData.containsKey('is_new_user')) {
|
||||
titleList.add('我刚来到这里哦');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_most_fans']) {
|
||||
titleList.add('可能是你想认识的人');
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_wanna_meet']) {
|
||||
titleList.add('很多圈友都喜欢TA');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||
titleList.add('TA是乐园优秀圈主哦~');
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_most_fans']) {
|
||||
titleList.add('可能是你想认识的人');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length >= 1) {
|
||||
info['city'] = titleList.first;
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||
titleList.add('TA是乐园优秀圈主哦~');
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length >= 2) {
|
||||
info['both_interests'] = titleList[1];
|
||||
}
|
||||
if (titleList.length >= 1) {
|
||||
info['city'] = titleList.first;
|
||||
}
|
||||
|
||||
if (titleList.length >= 3) {
|
||||
info['desc'] = titleList[2];
|
||||
if (titleList.length >= 2) {
|
||||
info['both_interests'] = titleList[1];
|
||||
}
|
||||
|
||||
if (titleList.length >= 3) {
|
||||
info['desc'] = titleList[2];
|
||||
}
|
||||
} catch (e) {
|
||||
loadRecommendCircleFriendData();
|
||||
return Container();
|
||||
}
|
||||
|
||||
List circleList = recommendCircleFriendData['interests'];
|
||||
@ -139,7 +145,8 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: '');
|
||||
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: recommendCircleFriendData['user']['id'].toString());
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
|
||||
@ -26,6 +26,8 @@ import '../app/select_circle/logic.dart';
|
||||
import '../network/dio_manager.dart';
|
||||
import 'SharedPreferencesHelper.dart';
|
||||
|
||||
List chatIdList = [];
|
||||
|
||||
class Util {}
|
||||
|
||||
//获取图片
|
||||
@ -515,6 +517,8 @@ pushChatPage(String userId, String imId, String userName) {
|
||||
}
|
||||
|
||||
createCustomMsg(String userId, String imId) async {
|
||||
if (chatIdList.contains(imId)) return;
|
||||
chatIdList.add(imId);
|
||||
//通过会话ID获取指定会话列表
|
||||
V2TimValueCallback<List<V2TimConversation>>
|
||||
getConversationListByConversaionIdsRes = await TencentImSDKPlugin
|
||||
@ -772,3 +776,74 @@ sendInventWishCustomMsg(String userId, String data, String desc) async {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//判断卡片返回信息
|
||||
Map checkCardReturnData(Map recommendCircleFriendData) {
|
||||
var titleList = [];
|
||||
Map info = {};
|
||||
if (recommendCircleFriendData['is_follow_me']) {
|
||||
titleList.add('对方喜欢了你');
|
||||
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||
titleList.add('你们有共同喜欢的圈友');
|
||||
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||
titleList.add('你喜欢的圈友也喜欢TA');
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List citys = recommendCircleFriendData['both_cities'];
|
||||
if (citys.isNotEmpty) {
|
||||
titleList.add('你们都在${citys.first}留下过足迹');
|
||||
}
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
List circles = recommendCircleFriendData['both_interests'];
|
||||
if (circles.isNotEmpty) {
|
||||
List<dynamic> both_interests =
|
||||
recommendCircleFriendData['both_interests'];
|
||||
List<String> circleList = [];
|
||||
both_interests.forEach((element) {
|
||||
circleList.add(element['title']);
|
||||
});
|
||||
if (circleList.isNotEmpty) {
|
||||
titleList
|
||||
.add('你们有${circleList.length}个共同的圈子:${circleList.join('、')}');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData.containsKey('is_new_user')) {
|
||||
titleList.add('我刚来到这里哦');
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_wanna_meet']) {
|
||||
titleList.add('很多圈友都喜欢TA');
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_most_fans']) {
|
||||
titleList.add('可能是你想认识的人');
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length < 3) {
|
||||
if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||
titleList.add('TA是乐园优秀圈主哦~');
|
||||
}
|
||||
}
|
||||
|
||||
if (titleList.length >= 1) {
|
||||
info['city'] = titleList.first;
|
||||
}
|
||||
|
||||
if (titleList.length >= 2) {
|
||||
info['both_interests'] = titleList[1];
|
||||
}
|
||||
|
||||
if (titleList.length >= 3) {
|
||||
info['desc'] = titleList[2];
|
||||
}
|
||||
return info;
|
||||
}
|
||||
@ -89,7 +89,7 @@ dependencies:
|
||||
# 微信SDK插件
|
||||
fluwx: ^3.8.1+1
|
||||
event_bus: ^2.0.0
|
||||
#安装apk
|
||||
# #安装apk
|
||||
flutter_install_app: 1.3.0
|
||||
#闪屏页
|
||||
flutter_native_splash: 2.2.16
|
||||
|
||||
Loading…
Reference in New Issue
Block a user