修改消息bug和UI

This commit is contained in:
CYH 2023-07-19 09:55:28 +08:00
parent 5d6f953858
commit 92065b0cb3
7 changed files with 199 additions and 143 deletions

View File

@ -402,7 +402,9 @@ class _TIMUIKItHistoryMessageListItemState
} }
if (messageItem.customElem?.extension?.contains('cardData') ?? false) { if (messageItem.customElem?.extension?.contains('cardData') ?? false) {
Map info = jsonDecode(messageItem.customElem?.data ?? ''); Map info = jsonDecode(messageItem.customElem?.data ?? '');
return Container( return Column(
children: [
Container(
height: info.containsKey('city') ? 175.sp : 135.sp, height: info.containsKey('city') ? 175.sp : 135.sp,
width: Get.width, width: Get.width,
margin: EdgeInsets.only(left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16), margin: EdgeInsets.only(left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16),
@ -492,6 +494,41 @@ class _TIMUIKItHistoryMessageListItemState
) )
], ],
), ),
),
Container(
width: Get.width,
margin: EdgeInsets.only(top: 10.sp,left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16),
// margin: EdgeInsets.only(top: 10.sp),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'骂人、诈骗、造谣均属于严重违规行为,请严格遵守',
style: TextStyle(
color: Colors.white,
fontSize: 11.sp,
fontWeight: FontWeight.w600),
),
SizedBox(
width: 2.sp,
),
GestureDetector(
onTap: (){
navigateToUserAgreement();
},
child: Text(
'《文明公约》',
style: TextStyle(
color: Color(0xff00FFF4),
fontSize: 11.sp,
fontWeight: FontWeight.w400,
),
),
),
],
),
)
],
); );
} }

View File

@ -132,7 +132,7 @@ class TIMChat extends StatefulWidget {
final List customEmojiStickerList; final List customEmojiStickerList;
final Widget? customAppBar; final PreferredSizeWidget? customAppBar;
/// Custom emoji panel. /// Custom emoji panel.
final CustomStickerPanel? customStickerPanel; final CustomStickerPanel? customStickerPanel;
@ -376,16 +376,7 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: (widget.customAppBar == null) appBar:widget.customAppBar!,
? TIMUIKitAppBar(
showTotalUnReadCount: widget.showTotalUnReadCount,
config: widget.appBarConfig,
conversationShowName: _getTitle(),
conversationID: _getConvID(),
showC2cMessageEditStatus:
widget.config?.showC2cMessageEditStatus ?? true,
)
: null,
body: DropTarget( body: DropTarget(
onDragDone: (detail) { onDragDone: (detail) {
setState(() { setState(() {
@ -413,13 +404,13 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
children: [ children: [
Column( Column(
children: [ children: [
if (widget.customAppBar != null) widget.customAppBar!,
if (filteredApplicationList.isNotEmpty) if (filteredApplicationList.isNotEmpty)
_renderJoinGroupApplication( _renderJoinGroupApplication(
filteredApplicationList.length, theme), filteredApplicationList.length, theme),
if (widget.topFixWidget != null) widget.topFixWidget!, if (widget.topFixWidget != null) widget.topFixWidget!,
Expanded( Expanded(
child: Container( child: Container(
// color: Colors.red,
color: theme.chatBgColor, color: theme.chatBgColor,
child: Align( child: Align(
// key: alignKey, // key: alignKey,

View File

@ -97,6 +97,7 @@ class _ChatPageState extends State<ChatPage> {
), ),
onPressed: () {}, onPressed: () {},
), ),
userAvatarBuilder: (BuildContext context, V2TimMessage message) { userAvatarBuilder: (BuildContext context, V2TimMessage message) {
return avatarWidget(message.faceUrl ?? 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png'); return avatarWidget(message.faceUrl ?? 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png');
}, },

View File

@ -1119,7 +1119,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
} }
void _showOutCircleDialog( void _showOutCircleDialog(
BuildContext context, CircleLogic controller, Circle bean) { BuildContext context, var controller, Circle bean) {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {

View File

@ -17,6 +17,7 @@ class Sys_notify_listLogic extends GetxController {
int page = 0; int page = 0;
int isVip = 0; int isVip = 0;
bool isLoad = true; bool isLoad = true;
bool isMore = true;
List<Lists> lists = []; List<Lists> lists = [];
@override @override
@ -49,6 +50,9 @@ class Sys_notify_listLogic extends GetxController {
lists.add(Lists.fromJson(element)); lists.add(Lists.fromJson(element));
}); });
} }
if (bean.length < 10) {
isMore = false;
}
isLoad = false; isLoad = false;
update(); update();
if (page == 0) { if (page == 0) {
@ -65,8 +69,13 @@ class Sys_notify_listLogic extends GetxController {
} }
void onLoading() { void onLoading() {
// page = page + 1; if (isMore) {
initList(); initList();
} else {
refreshController.loadNoData();
}
// page = page + 1;
} }
void makeRead() async { void makeRead() async {

View File

@ -1,5 +1,8 @@
import 'dart:convert';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:circle_app/components/my_app_bar.dart'; import 'package:circle_app/components/my_app_bar.dart';
import 'package:circle_app/router/app_routers.dart';
import 'package:circle_app/util/util.dart'; import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -70,9 +73,9 @@ class Sys_notify_listPage extends StatelessWidget {
)); ));
} }
if (data.title?.isNotEmpty ?? false) { if (data.title?.isNotEmpty ?? false) {
widgets.add(Container( widgets.add(
margin: EdgeInsets.only( Container(
top: 8.sp, left: 16.sp, right: 16.sp), margin: EdgeInsets.only(top: 8.sp, left: 16.sp, right: 16.sp),
child: Text( child: Text(
data.title!, data.title!,
style: TextStyle( style: TextStyle(
@ -80,7 +83,8 @@ class Sys_notify_listPage extends StatelessWidget {
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500),
), ),
),); ),
);
} }
if (data.content?.isNotEmpty ?? false) { if (data.content?.isNotEmpty ?? false) {
@ -97,6 +101,21 @@ class Sys_notify_listPage extends StatelessWidget {
)); ));
} }
widgets.add(GestureDetector(
onTap: () {
Get.toNamed(AppRoutes.WebViewActivity,
arguments: jsonDecode(data.note!));
},
child: Container(
margin: EdgeInsets.only(bottom: 8.sp, left: 16.sp),
child: Text('点击查看>',
style: TextStyle(
color: Color(0xFF00FFF4),
fontSize: 12.sp,
fontWeight: FontWeight.w500)),
),
));
return Container( return Container(
child: Column( child: Column(
children: [ children: [
@ -128,13 +147,12 @@ class Sys_notify_listPage extends StatelessWidget {
color: Color(0xFF292836)), color: Color(0xFF292836)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children:widgets children: widgets),
)
],
)
],
), ),
)
],
)
],
)
], ],
), ),
); );

View File

@ -5,6 +5,6 @@ import 'state.dart';
class WebviewLogic extends GetxController { class WebviewLogic extends GetxController {
final WebviewState state = WebviewState(); final WebviewState state = WebviewState();
final title = Get.arguments['title']; final title = Get.arguments['title'] ?? '';
} }