1.3.6代码提交

This commit is contained in:
CYH 2023-12-06 09:15:35 +08:00
parent 7478f85bbb
commit dbb58ccaa6
18 changed files with 373 additions and 248 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 27
versionName "1.3.5"
versionCode 28
versionName "1.3.6"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -25,6 +25,7 @@ class _WishDialogState extends State<WishDialog> {
String giftId = '';
String withStr = '';
int selectedIndex = 1;
String tipStr = '';
List<String> optionList = [
'分享一张本人照片',
@ -52,6 +53,7 @@ class _WishDialogState extends State<WishDialog> {
if (info['name'] == '浪漫告白') {
selectedIndex = i ;
giftId = info['id'].toString();
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
}
}
setState(() {});
@ -84,7 +86,7 @@ class _WishDialogState extends State<WishDialog> {
onTap: () {
selectedIndex = index;
giftId = info['id'].toString();
// tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
setState(() {});
},
child: Container(
@ -148,13 +150,28 @@ class _WishDialogState extends State<WishDialog> {
style: TextStyle(color: Colors.white, fontSize: 15.sp),
),
Container(
height: 102.sp,
height: tipStr.isNotEmpty ? 125.sp : 102.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(),
],
),
),
GestureDetector(
onTap: () {

View File

@ -1,4 +1,3 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
@ -49,7 +48,9 @@ class _DiscoverState extends State<Discover>
int index = 1;
List tagList = [];
List<String> genderList = [];List<String> orientationList= [];List<String> roleList= [];
List<String> genderList = [];
List<String> orientationList = [];
List<String> roleList = [];
bool isPop = false;
//
@ -61,7 +62,6 @@ class _DiscoverState extends State<Discover>
double screenHeight = 0;
void animateToOffset(ScrollController controller, double offset,
void Function() onScrollCompleted) {
controller
@ -100,7 +100,7 @@ class _DiscoverState extends State<Discover>
//
lastPage--;
animateToOffset(
_scrollController, lastPage * ( screenHeight + 5.sp), () {});
_scrollController, lastPage * (screenHeight + 5.sp), () {});
} else if (touchRangeY > 0 && lastPage < list.length - 1) {
//
lastPage++;
@ -137,7 +137,6 @@ class _DiscoverState extends State<Discover>
});
}
sub = EventBusManager.on<DiscovrScrollTap>().listen((event) {
pointerStart = Offset.zero;
pointerEnd = Offset.zero;
@ -195,9 +194,7 @@ class _DiscoverState extends State<Discover>
list[initIndex] = result['data'];
setState(() {});
} catch (e) {
}
} catch (e) {}
}
loadGiftListData() async {
@ -264,12 +261,9 @@ class _DiscoverState extends State<Discover>
if (screenHeight == 0 && list.isNotEmpty) {
var size = context?.findRenderObject()?.paintBounds?.size;
screenHeight = size!.height - 20.sp;
setState(() {
});
setState(() {});
print(size.toString());
}
});
return list.isEmpty
@ -277,10 +271,10 @@ class _DiscoverState extends State<Discover>
? loaddingWidget(true)
: noResultWidget(tip: '已解锁微信的圈友会展示在这里哦~')
: Stack(
fit: StackFit.expand,
children: [
Container(color: Colors.transparent),
Listener(
fit: StackFit.expand,
children: [
Container(color: Colors.transparent),
Listener(
onPointerDown: getPointDownListenerInHorizontal(),
onPointerUp: getPointUpListenerInHorizontal(),
child: SmartRefresher(
@ -289,7 +283,6 @@ class _DiscoverState extends State<Discover>
onLoading: _onLoading,
enablePullUp: true,
child: ListView.builder(
itemBuilder: (context, index) {
var user = Users.fromJson(list[index]);
@ -333,9 +326,12 @@ class _DiscoverState extends State<Discover>
child: Container(
padding: EdgeInsets.all(2.sp),
child: Swiper(
autoplay:
user.images!.length == 1 ? false : true,
loop: user.images!.length == 1 ? false : true,
autoplay: user.images!.length == 1
? false
: true,
loop: user.images!.length == 1
? false
: true,
itemBuilder:
(BuildContext context, int index) {
// print(index);
@ -364,89 +360,127 @@ class _DiscoverState extends State<Discover>
)),
),
Positioned(
left: 16.sp,
top: 20.sp,
left: 5.sp,
top: 10.sp,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
if (user.both_cities!.isNotEmpty)
Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin:
EdgeInsets.only(right: 4.sp),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(3.sp),
color: const Color(0xFFCE51FF),
if (onLineStr.isNotEmpty)
Container(
height: 24.sp,
padding: EdgeInsets.only(
left: 6.sp, right: 6.sp),
decoration: BoxDecoration(
color: Colors.black
.withOpacity(0.35),
borderRadius:
BorderRadius.circular(
12.sp)),
child: Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin: EdgeInsets.only(
right: 4.sp),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
3.sp),
color:
const Color(0xFFCE51FF),
),
),
),
// if (logic.online)
Text(
"你们都来过${user.both_cities!.first}",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
// if (logic.online)
Text(
onLineStr,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
),
),
if (user.both_interests!.isNotEmpty)
SizedBox(
height: 8.sp,
),
if (user.both_interests!.isNotEmpty)
Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin:
EdgeInsets.only(right: 4.sp),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(3.sp),
color: const Color(0xFFCE51FF),
),
),
// if (logic.online)
Text(
"你们有共同的圈子:${user.both_interests!.first['title']}",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
),
if (user.both_cities!.isNotEmpty)
SizedBox(
height: 8.sp,
),
if (onLineStr.isNotEmpty)
Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin:
EdgeInsets.only(right: 4.sp),
decoration: BoxDecoration(
Container(
height: 24.sp,
padding: EdgeInsets.only(
left: 6.sp, right: 6.sp),
decoration: BoxDecoration(
color: Colors.black
.withOpacity(0.35),
borderRadius:
BorderRadius.circular(3.sp),
color: const Color(0xFFCE51FF),
),
),
// if (logic.online)
Text(
onLineStr,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
BorderRadius.circular(
12.sp)),
child: Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin: EdgeInsets.only(
right: 4.sp),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
3.sp),
color: const Color(
0xFFCE51FF),
),
),
// if (logic.online)
Text(
"你们都来过${user.both_cities!.first}",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
)),
if (user.both_cities!.isNotEmpty)
SizedBox(
height: 8.sp,
),
if (user.both_interests!.isNotEmpty)
Container(
height: 24.sp,
padding: EdgeInsets.only(
left: 6.sp, right: 6.sp),
decoration: BoxDecoration(
color: Colors.black
.withOpacity(0.35),
borderRadius:
BorderRadius.circular(
12.sp)),
child: Row(
children: [
Container(
width: 6.sp,
height: 6.sp,
margin: EdgeInsets.only(
right: 4.sp),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
3.sp),
color: const Color(
0xFFCE51FF),
),
),
// if (logic.online)
Text(
"你们有共同的圈子:${user.both_interests!.first['title']}",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
],
)),
],
),
)),
@ -462,11 +496,13 @@ class _DiscoverState extends State<Discover>
width: 73.sp,
height: 25.sp,
decoration: BoxDecoration(
gradient: AppColor.mainVerLinearGradient,
gradient:
AppColor.mainVerLinearGradient,
borderRadius:
BorderRadius.circular(12.5.sp)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(left: 5.sp),
@ -495,7 +531,8 @@ class _DiscoverState extends State<Discover>
width: Get.width - 32.sp,
padding: EdgeInsets.only(right: 0.sp),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
if (user.wxNum != null)
wxStatusWidget(
@ -519,18 +556,23 @@ class _DiscoverState extends State<Discover>
fontWeight: FontWeight.bold),
),
Container(
margin: EdgeInsets.only(left: 5.sp),
margin:
EdgeInsets.only(left: 5.sp),
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: [
BorderRadius.circular(
9.sp),
gradient:
const LinearGradient(
begin: Alignment(
0.25, 0.5),
end: Alignment(
0.75, 0.5),
colors: [
Color(0xff8DFFF8),
Color(0xffB5D3FF)
])),
@ -562,11 +604,16 @@ class _DiscoverState extends State<Discover>
),
Container(
width: Get.width - 120.sp,
margin: EdgeInsets.only(top: 15.sp,bottom: 15.sp),
margin: EdgeInsets.only(
top: 15.sp, bottom: 15.sp),
child: Text(
user.signature! ?? '',
overflow: TextOverflow.ellipsis,
maxLines: (user.signature! ?? '').length > 15 ? 2 : 1,
maxLines:
(user.signature! ?? '').length >
15
? 2
: 1,
style: TextStyle(
fontSize: 16.sp,
color: const Color(0XFFF7FAFA)),
@ -626,8 +673,8 @@ class _DiscoverState extends State<Discover>
),
GestureDetector(
onTap: () {
_showReportDialog(context,user.userId!.toString(),index);
_showReportDialog(context,
user.userId!.toString(), index);
},
child: Image.asset(
getCircleImage(
@ -648,8 +695,8 @@ class _DiscoverState extends State<Discover>
),
),
),
],
);
],
);
}
tagItem(List item) {
@ -746,22 +793,20 @@ class _DiscoverState extends State<Discover>
} else if (data['data']['user']['wxNum'].toString().isEmpty) {
showAddWxPicker(false);
}
}
}
void sendNoLookData(String userId,int index) async {
void sendNoLookData(String userId, int index) async {
var data = await DioManager.instance.post(url: Api.uninterested + userId);
if (data['code'] == 200) {
showOKToast('操作成功');
list.removeAt(index);
setState(() {
});
setState(() {});
}
}
void _showReportDialog(BuildContext context,String userId,int currentIndex) {
void _showReportDialog(
BuildContext context, String userId, int currentIndex) {
showDialog(
context: context,
builder: (BuildContext context) {
@ -803,7 +848,7 @@ class _DiscoverState extends State<Discover>
child: Text(
"温馨提示",
style:
TextStyle(color: Colors.white, fontSize: 16.sp),
TextStyle(color: Colors.white, fontSize: 16.sp),
),
),
Container(
@ -865,7 +910,7 @@ class _DiscoverState extends State<Discover>
GestureDetector(
onTap: () {
Get.back();
sendNoLookData(userId,currentIndex);
sendNoLookData(userId, currentIndex);
},
child: Container(
margin: EdgeInsets.only(top: 24.sp),
@ -908,7 +953,6 @@ class _DiscoverState extends State<Discover>
}
}
class DiscoverDataRefresh {
String userId;
DiscoverDataRefresh(this.userId);
@ -976,7 +1020,7 @@ class Users {
this.birthday,
this.blacklist,
this.city,
this.both_interests,
this.both_interests,
this.distance,
this.dust,
this.email,

View File

@ -32,7 +32,7 @@ class Gift_shopPage extends StatelessWidget {
Get.toNamed(AppRoutes.BillActivity,arguments: 2);
},
child: Text(
'礼物收入',
'账单',
style: TextStyle(color: Colors.white, fontSize: 14.sp),
),
),
@ -288,14 +288,14 @@ class Gift_shopPage extends StatelessWidget {
child: Container(
height: 105.sp,
decoration: BoxDecoration(
color: isGet ? Color(0xFF3E3D4C) : Color(0x292836FF),
color: isGet ? Color(0x8F3E3D4C) : Color(0x0f2836FF),
borderRadius: BorderRadius.circular(4.sp),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Opacity(
opacity: isGet ? 1 : 0.5,
opacity: isGet ? 1 : 0.75,
child: Image.network(
info['icon'],
width: 60.sp,

View File

@ -378,7 +378,7 @@ class _LikelistPageState extends State<LikelistPage> with RouteAware {
borderRadius: BorderRadius.circular(14),
),
child: Center(
child: Text(item.isLike ? "互相关注" : "关注",
child: Text(item.isLike ? "互相喜欢" : "喜欢",
style: TextStyle(fontSize: 14.sp, color: Colors.white)),
),
),

View File

@ -178,7 +178,7 @@ class TIMConversationItem extends TIMUIKitStatelessWidget {
),
),
if (userInfo != null)
(userInfo!.role ?? 0) > 0
(userInfo!.role ?? 0) > 0 && !(userInfo!.userID ?? '').contains('qz_prod_11_')
? Positioned(
bottom: 0,
right: 0,

View File

@ -7,7 +7,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../common/Widgets/base_tip_widget.dart';
import '../../util/SharedPreferencesHelper.dart';
import '../circle/logic.dart';
import '../minefragment/logic.dart';
import 'state.dart';
class MsgLogic extends GetxController {
@ -25,6 +27,7 @@ class MsgLogic extends GetxController {
void onInit() {
// TODO: implement onInit
super.onInit();
loadMyInfoData();
loadChatData();
loadLikeData();
loadStatusData();
@ -63,7 +66,7 @@ class MsgLogic extends GetxController {
var data =
await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) {
if (data["data"] == 0) {
if (data["data"] == 2 || data["data"] == 0) {
var data = await DioManager.getInstance()
.get(url: Api.startQuick);
if (data["code"] == 200) {
@ -157,7 +160,7 @@ class MsgLogic extends GetxController {
var data =
await DioManager.getInstance().get(url: Api.queryQuickStart);
if (data["code"] == 200) {
if (data["data"] == 0) {
if (data["data"] == 0 || data["data"] == 2) {
isStart = false;
} else {
isStart = true;
@ -165,4 +168,18 @@ class MsgLogic extends GetxController {
}
update();
}
void loadMyInfoData() async {
var data = await DioManager.instance.get(url: Api.getUserMine);
var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data));
if (bean.isSuccess()) {
var userInfoBean = bean.data.user;
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
sharedPreferences.setInt(SharedPreferencesHelper.VIP, userInfoBean.vip);
sharedPreferences.setInt(
SharedPreferencesHelper.USERID, userInfoBean!.id);
});
}
}
}

View File

@ -108,7 +108,7 @@ class MyfeedbacklistPage extends StatelessWidget {
Container(
margin: EdgeInsets.only(left: 16.sp,right: 16.sp,bottom: 16.sp),
child: Text(
item.reply!=null?"反馈回复:"+item.reply:"审核中",
item.reply!=null?"反馈回复:"+item.reply:"待回复",
style: TextStyle(
color: Colors.grey,
fontSize: 12.0.sp,

View File

@ -42,11 +42,11 @@ class _SwiperPageState extends State<SwiperPage> {
index: logic.index,
loop: false,
itemBuilder: (BuildContext context, int index) {
if (logic.index == index) {
return RepaintBoundary(
key: _globalKey,
child:itemWidget(logic,index));
}
// if (logic.index == index) {
// return RepaintBoundary(
// key: _globalKey,
// child:itemWidget(logic,index));
// }
return itemWidget(logic,index);
},
@ -60,26 +60,26 @@ class _SwiperPageState extends State<SwiperPage> {
activeColor: Color(0xFFD14CFF),
color: Colors.white)), //
)),
Positioned(
bottom: Get.bottomBarHeight,
right: 15.sp,
child: InkWell(
onTap: () {
_saveLocalImage();
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(5.sp),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
borderRadius: BorderRadius.circular(17.5.sp)),
child: Icon(
Icons.download,
color: Colors.white,
size: 25.sp,
),
),
))
// Positioned(
// bottom: Get.bottomBarHeight,
// right: 15.sp,
// child: InkWell(
// onTap: () {
// _saveLocalImage();
// },
// child: Container(
// alignment: Alignment.center,
// padding: EdgeInsets.all(5.sp),
// decoration: BoxDecoration(
// color: Colors.black.withOpacity(0.5),
// borderRadius: BorderRadius.circular(17.5.sp)),
// child: Icon(
// Icons.download,
// color: Colors.white,
// size: 25.sp,
// ),
// ),
// ))
],
),
),
@ -98,9 +98,11 @@ class _SwiperPageState extends State<SwiperPage> {
children: [
Container(
// color: Colors.red,
child: CachedNetworkImage(
imageUrl: logic.imgList[index].toString().contains('?') ? logic.imgList[index].toString().split('?').first : logic.imgList[index].toString(),
fit: BoxFit.contain,
fit: BoxFit.cover,
width: double.infinity,
),
),
Positioned(

View File

@ -350,7 +350,7 @@ class UserinfoLogic extends GetxController {
'num': 1,
'toUserId': userId
});
if (result['code'] == 10000) {
if (result['code'] == 200) {
showOKToast('赠送成功');
loadData();
} else if (result['code'] == 31201) {
@ -389,6 +389,15 @@ class UserinfoLogic extends GetxController {
});
} catch (_) {}
}
void sendWhatToWx() async {
var result = await DioManager.instance.get(url: Api.noticeWxNum + userId,);
if (result['code'] == 200) {
showOKToast('已提醒对方填写');
} else {
showOKToast(result['msg']);
}
}
}
class UserBean {

View File

@ -29,7 +29,6 @@ class UserinfoPage extends StatefulWidget {
class MyTabbedScreenState extends State<UserinfoPage>
with SingleTickerProviderStateMixin, RouteAware {
late TabController _tabController;
late PageController _pageController;
ScrollController scrollController = ScrollController();
bool isShowBlackTitle = false;
@ -40,34 +39,35 @@ class MyTabbedScreenState extends State<UserinfoPage>
void initState() {
super.initState();
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
scrollController.animateTo(0, duration: Duration(microseconds: 200), curve: Curves.easeIn);
if (isSetState) {
isSetState = false;
setState(() {
});
}
});
scrollController.addListener(() {
if (scrollController.position.pixels ==
scrollController.position.maxScrollExtent) {
print('2222');
isSetState = true;
EventBusManager.fire(ScrollViewIsEnd(true));
setState(() {
});
EventBusManager.fire(ScrollViewIsEnd(true));
} else {
EventBusManager.fire(ScrollViewIsEnd(false));
if (isSetState) {
isSetState = false;
setState(() {
});
isSetState = false;
}
print('111');
}
});
_pageController = PageController();
_tabController = TabController(length: 2, vsync: this);
_tabController.animation!.addListener(_handleTabChange);
// _tabController.addListener(_handleTabChange);
// _tabController
}
@override
@ -106,15 +106,6 @@ class MyTabbedScreenState extends State<UserinfoPage>
@override
void dispose() {
_tabController.dispose();
OverlayState? overlayState = Overlay.of(Get.context!);
if (mainOverlayEntry != null) {
if (overlayState.debugIsVisible(mainOverlayEntry!)) {
mainOverlayEntry!.remove();
}
}
// overlayState.insert(entry);
sub.cancel();
routeObserver.unsubscribe(this);
super.dispose();
@ -210,7 +201,44 @@ class MyTabbedScreenState extends State<UserinfoPage>
// ),
// ),
)
: Container()),
: logic.userInfoBean!= null ? logic.userInfoBean!.wx_num.isEmpty ? GestureDetector(
onTap: () {
logic.sendWhatToWx();
},
child: Stack(
alignment: Alignment.center,
children: [
Container(
width: 101.sp,
height: 26.sp,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.sp),
gradient: LinearGradient(
colors: [
Color(0xFF30FFD9),
Color(0xFFDD3DF4)
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
),
Container(
width: 100.sp,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(11.sp),
color: Color(0xFF240F3B)),
alignment: Alignment.center,
height: 24.sp,
child: Text(
'想要微信号',
style: TextStyle(
color: Colors.white, fontSize: 14.sp),
),
)
],
),
) : Container() : Container()),
body: Stack(
// fit: StackFit.expand,
children: [
@ -233,7 +261,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
toolbarHeight: 0,
foregroundColor: Colors.transparent,
backgroundColor: Colors.transparent,
expandedHeight: 372.sp + (logic.userInfoBean != null
expandedHeight: (!logic.isMe ? 372.sp : 312.sp) + (logic.userInfoBean != null
? logic.userInfoBean!.wx_num!.isNotEmpty
? 59.sp : 0 : 0),
bottom: PreferredSize(
@ -622,7 +650,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
children: [
Stack(children: [
Opacity(
opacity: !isGet ? 0.5 : 1,
opacity: !isGet ? 0.6 : 1,
child: Image.network(
info['icon'],
width: 50.sp,

View File

@ -55,7 +55,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView> with AutomaticKeepAli
listsLg?.loadCallOutListData(widget.userId);
listsLg!.scrollController.addListener(() {
if (listsLg!.scrollController.offset < 0) {
if (listsLg!.scrollController.offset <= 0) {
EventBusManager.fire(ScrollViewScrollTop());
isEnd = false;
setState(() {
@ -91,7 +91,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView> with AutomaticKeepAli
? loaddingWidget(true)
: ListView.builder(
// physics: const AlwaysScrollableScrollPhysics(),
physics: isEnd ? AlwaysScrollableScrollPhysics() : NeverScrollableScrollPhysics(),
physics: isEnd ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(),
// shrinkWrap:true,
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).padding.bottom + 56.sp),

View File

@ -302,4 +302,7 @@ class Api {
static const chatRecommendFriend = '/msg-service/im/chat/recommend';
//
static const isShow_give_gift = '/msg-service/message/show_give_gift/';
//
static const noticeWxNum = '/user-service/user/updateWxNum/notice/';
}

View File

@ -246,7 +246,7 @@ class DioManager {
pushLoginPage();
break;
}
if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState)) {
if (responseMap["code"] != 200 && responseMap["code"] != 10000 && !url.contains(Api.checkWxNumState) && responseMap["code"] != 21201) {
showOKToast(responseMap['msg']);
}
}

View File

@ -671,16 +671,20 @@ sendCircleCustomMsg(String userId, String data, String desc) async {
);
if (createCustomMessageRes.code == 0) {
String? id = createCustomMessageRes.data?.id;
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
if (Get.currentRoute == AppRoutes.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
}
}
}
}

View File

@ -44,7 +44,7 @@ void showFloatingButtonOverlay(
child: Container(
width: Get.width - 16,
// margin: EdgeInsets.only(top:10.sp),
padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 0),
padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 16.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: const Color(0xFF353443),
@ -62,69 +62,70 @@ void showFloatingButtonOverlay(
),
),
const SizedBox(width: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
// width: 70.sp,
child: Text(
nickname,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16.sp,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
// width: 70.sp,
child: Text(
nickname,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16.sp,
),
),
),
),
SizedBox(width: 8.sp),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
SizedBox(width: 8.sp),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp,
// bottom: 2.sp,
left: 10.sp,
right: 10.sp,
),
child: Text(
ageMsg,
style: const TextStyle(
color: Colors.black,
fontSize: 10,
),
),
),
padding: EdgeInsets.only(
top: 2.sp,
bottom: 2.sp,
left: 10.sp,
right: 10.sp,
),
child: Text(
ageMsg,
style: const TextStyle(
color: Colors.black,
fontSize: 10,
),
),
),
],
),
const SizedBox(height: 8),
Text( event == 0
? "看了这么久,给我点个喜欢呗~"
: event == 1
? "我喜欢了你,可以喜欢我一下吗?"
: event == 2
? "你喜欢的人上线啦,赶紧找他聊天吧!"
: "我也喜欢了你,一起聊聊呗~",
style: TextStyle(
color: Colors.grey,
fontSize: 14.sp,
],
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
const SizedBox(height: 4),
Text( event == 0
? "看了这么久,给我点个喜欢呗~"
: event == 1
? "我喜欢了你,可以喜欢我一下吗?"
: event == 2
? "你喜欢的人上线啦,赶紧找他聊天吧!"
: "我也喜欢了你,一起聊聊呗~",
style: TextStyle(
color: Colors.grey,
fontSize: 13.sp,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
const Spacer(),
GestureDetector(
onTap: () {
countdownTimer.cancel();