最新修改

This commit is contained in:
谢宇宁
2026-09-16 15:08:13 +07:00
parent d6c95e16eb
commit 123a887914
2 changed files with 41 additions and 55 deletions
@@ -97,13 +97,12 @@ class _HomeTabSortPageState extends State<HomeTabSortPage> with UniqueTagMixin {
},
child: Obx(
() {
//非暗网风格也要读一次:Obx 读不到可观察变量会抛 improper use of a GetX
final isInTop = logic.isSortMenuInTop.value;
Color? bgColor;
if (widget.isDarkStyle) {
if (logic.isSortMenuInTop.value) {
bgColor = Colors.transparent;
} else {
bgColor = Colors.black;
}
bgColor =
isInTop ? Colors.transparent : Colors.black;
}
return HomeSortHeader(
isLatest: logic.isNewestStyle,
+37 -50
View File
@@ -21,10 +21,8 @@ import '../web_page/h5_page.dart';
import 'collec_history_buy/col_his_buy_page.dart';
import 'identity/mine_identity_page.dart';
import 'message/message_center_page.dart';
import 'mine_drive/mine_drive_page.dart';
import 'mine_following/mine_following_view.dart';
import 'mine_post/mine_publish_main_page.dart';
import 'mine_setting/mine_code_page.dart';
import 'mine_setting/mine_password_logic.dart';
import 'mine_setting/mine_password_page.dart';
import 'mine_setting/mine_setting_page.dart';
@@ -135,55 +133,44 @@ class MineMainLogic extends GetxController with GetTickerProviderStateMixin {
}
}
/// 「常用功能」宫格点击:index 跟着 [menuVerNameArr] 走,改菜单顺序两处要一起改
void menuVerTapEvent(int index) async {
if (index == 0) {
//创作中心
Get.to(MinePublishPostPage(), preventDuplicates: false);
} else if (index == 1) {
//意见反馈
Get.to(() => const MineFeedbackPage());
} else if (index == 2) {
//我的购买
ColHisBuyPage.to(PageType.buy);
} else if (index == 3) {
//我的喜欢
ColHisBuyPage.to(PageType.like);
} else if (index == 4) {
//分享邀请
Get.to(() => MineSharePage());
} else if (index == 5) {
//领取兑换
Get.to(() => MineExchangeCodePage(type: 1));
} else if (index == 6) {
//加群开车
Get.to(() => MineDrivePage());
} else if (index == 7) {
//应用推荐
Get.to(() => const WelfareHomePage(index: 1), preventDuplicates: false);
} else if (index == 8) {
//账号凭证
await Get.dialog(MineAccountIdentityPage());
} else if (index == 9) {
//锁屏密码
if (globalStore.password.isNotEmpty) {
final close = await CommonAlert.show(
title: '关闭锁定码',
content: '您确定关闭锁定密码?\n\n开启需重新输入密码',
cancelText: '稍后再说',
confirmText: '确定关闭',
);
if (close) {
Get.toNamed(MinePasswordPage.routeName,
arguments: MinePasswordType.close);
}
} else {
Get.toNamed(
MinePasswordPage.routeName,
arguments: MinePasswordType.setting,
);
}
} else if (index == 10) {
menuTapEvent(3);
switch (index) {
case 0: //意见反馈
Get.to(() => const MineFeedbackPage());
case 1: //我的购买
ColHisBuyPage.to(PageType.buy);
case 2: //我的喜欢
ColHisBuyPage.to(PageType.like);
case 3: //分享邀请
Get.to(() => MineSharePage());
case 4: //应用推荐
Get.to(() => const WelfareHomePage(index: 1), preventDuplicates: false);
case 5: //账号凭证
await Get.dialog(MineAccountIdentityPage());
case 6: //锁屏密码
await _togglePassword();
case 7: //我的消息
menuTapEvent(3);
}
}
/// 锁屏密码:已设置则先确认再去关闭页,未设置直接去设置页
Future<void> _togglePassword() async {
if (globalStore.password.isEmpty) {
Get.toNamed(MinePasswordPage.routeName,
arguments: MinePasswordType.setting);
return;
}
final close = await CommonAlert.show(
title: '关闭锁定码',
content: '您确定关闭锁定密码?\n\n开启需重新输入密码',
cancelText: '稍后再说',
confirmText: '确定关闭',
);
if (close) {
Get.toNamed(MinePasswordPage.routeName,
arguments: MinePasswordType.close);
}
}