fix: 修改客服
This commit is contained in:
@@ -17,6 +17,7 @@ import 'package:kaer_with_panels/app/modules/kr_home/views/hi_subscription_corne
|
||||
import 'package:kaer_with_panels/app/common/app_run_data.dart';
|
||||
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/hi_menu_list_item.dart';
|
||||
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/user_info_card.dart';
|
||||
import '../../../utils/kr_common_util.dart';
|
||||
|
||||
class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
||||
const HIMenuView({super.key});
|
||||
@@ -29,6 +30,34 @@ class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final List<MenuItem> menuItems = [
|
||||
const MenuItem(
|
||||
iconName: 'icon-1',
|
||||
title: '节点列表',
|
||||
route: Routes.HI_NODE_LIST,
|
||||
),
|
||||
const MenuItem(
|
||||
iconName: 'icon-2',
|
||||
title: '消息中心',
|
||||
route: Routes.KR_MESSAGE,
|
||||
),
|
||||
const MenuItem(
|
||||
iconName: 'icon-3',
|
||||
title: '常见问题',
|
||||
route: Routes.HI_HELP,
|
||||
),
|
||||
const MenuItem(
|
||||
iconName: 'icon-4',
|
||||
title: '邀请好友',
|
||||
route: Routes.KR_INVITE,
|
||||
),
|
||||
MenuItem(
|
||||
iconName: 'icon-5',
|
||||
title: '在线客服',
|
||||
onTap: () => KRCommonUtil.kr_openCustomerService(),
|
||||
),
|
||||
];
|
||||
|
||||
return HIBaseScaffold(
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
@@ -58,17 +87,17 @@ class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
||||
);
|
||||
}),
|
||||
|
||||
SizedBox(height: 10.h), // 卡片和菜单列表的间距
|
||||
SizedBox(height: 10.h), // 卡片 and 菜单列表的间距
|
||||
|
||||
// ListView.separated 现在也会继承 Padding 的约束
|
||||
ListView.separated(
|
||||
shrinkWrap: true, // 让 ListView 高度自适应内容
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(), // 在 Stack 中,禁用其自身的滚动
|
||||
itemCount: _menuItems.length,
|
||||
itemCount: menuItems.length,
|
||||
// 渲染每一项
|
||||
itemBuilder: (context, index) {
|
||||
return MenuListItem(item: _menuItems[index]);
|
||||
return MenuListItem(item: menuItems[index]);
|
||||
},
|
||||
// 设置每一项之间的间距
|
||||
separatorBuilder: (context, index) {
|
||||
@@ -104,31 +133,3 @@ class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const List<MenuItem> _menuItems = [
|
||||
MenuItem(
|
||||
iconName: 'icon-1',
|
||||
title: '节点列表',
|
||||
route: Routes.HI_NODE_LIST,
|
||||
),
|
||||
MenuItem(
|
||||
iconName: 'icon-2',
|
||||
title: '消息中心',
|
||||
route: Routes.KR_MESSAGE,
|
||||
),
|
||||
MenuItem(
|
||||
iconName: 'icon-3',
|
||||
title: '常见问题',
|
||||
route: Routes.HI_HELP,
|
||||
),
|
||||
MenuItem(
|
||||
iconName: 'icon-4',
|
||||
title: '邀请好友',
|
||||
route: Routes.KR_INVITE,
|
||||
),
|
||||
MenuItem(
|
||||
iconName: 'icon-5',
|
||||
title: '在线客服',
|
||||
route: Routes.KR_CRISP,
|
||||
),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user