最新修改
This commit is contained in:
@@ -97,13 +97,12 @@ class _HomeTabSortPageState extends State<HomeTabSortPage> with UniqueTagMixin {
|
|||||||
},
|
},
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() {
|
() {
|
||||||
|
//非暗网风格也要读一次:Obx 读不到可观察变量会抛 improper use of a GetX
|
||||||
|
final isInTop = logic.isSortMenuInTop.value;
|
||||||
Color? bgColor;
|
Color? bgColor;
|
||||||
if (widget.isDarkStyle) {
|
if (widget.isDarkStyle) {
|
||||||
if (logic.isSortMenuInTop.value) {
|
bgColor =
|
||||||
bgColor = Colors.transparent;
|
isInTop ? Colors.transparent : Colors.black;
|
||||||
} else {
|
|
||||||
bgColor = Colors.black;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return HomeSortHeader(
|
return HomeSortHeader(
|
||||||
isLatest: logic.isNewestStyle,
|
isLatest: logic.isNewestStyle,
|
||||||
|
|||||||
@@ -21,10 +21,8 @@ import '../web_page/h5_page.dart';
|
|||||||
import 'collec_history_buy/col_his_buy_page.dart';
|
import 'collec_history_buy/col_his_buy_page.dart';
|
||||||
import 'identity/mine_identity_page.dart';
|
import 'identity/mine_identity_page.dart';
|
||||||
import 'message/message_center_page.dart';
|
import 'message/message_center_page.dart';
|
||||||
import 'mine_drive/mine_drive_page.dart';
|
|
||||||
import 'mine_following/mine_following_view.dart';
|
import 'mine_following/mine_following_view.dart';
|
||||||
import 'mine_post/mine_publish_main_page.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_logic.dart';
|
||||||
import 'mine_setting/mine_password_page.dart';
|
import 'mine_setting/mine_password_page.dart';
|
||||||
import 'mine_setting/mine_setting_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 {
|
void menuVerTapEvent(int index) async {
|
||||||
if (index == 0) {
|
switch (index) {
|
||||||
//创作中心
|
case 0: //意见反馈
|
||||||
Get.to(MinePublishPostPage(), preventDuplicates: false);
|
Get.to(() => const MineFeedbackPage());
|
||||||
} else if (index == 1) {
|
case 1: //我的购买
|
||||||
//意见反馈
|
ColHisBuyPage.to(PageType.buy);
|
||||||
Get.to(() => const MineFeedbackPage());
|
case 2: //我的喜欢
|
||||||
} else if (index == 2) {
|
ColHisBuyPage.to(PageType.like);
|
||||||
//我的购买
|
case 3: //分享邀请
|
||||||
ColHisBuyPage.to(PageType.buy);
|
Get.to(() => MineSharePage());
|
||||||
} else if (index == 3) {
|
case 4: //应用推荐
|
||||||
//我的喜欢
|
Get.to(() => const WelfareHomePage(index: 1), preventDuplicates: false);
|
||||||
ColHisBuyPage.to(PageType.like);
|
case 5: //账号凭证
|
||||||
} else if (index == 4) {
|
await Get.dialog(MineAccountIdentityPage());
|
||||||
//分享邀请
|
case 6: //锁屏密码
|
||||||
Get.to(() => MineSharePage());
|
await _togglePassword();
|
||||||
} else if (index == 5) {
|
case 7: //我的消息
|
||||||
//领取兑换
|
menuTapEvent(3);
|
||||||
Get.to(() => MineExchangeCodePage(type: 1));
|
}
|
||||||
} else if (index == 6) {
|
}
|
||||||
//加群开车
|
|
||||||
Get.to(() => MineDrivePage());
|
/// 锁屏密码:已设置则先确认再去关闭页,未设置直接去设置页
|
||||||
} else if (index == 7) {
|
Future<void> _togglePassword() async {
|
||||||
//应用推荐
|
if (globalStore.password.isEmpty) {
|
||||||
Get.to(() => const WelfareHomePage(index: 1), preventDuplicates: false);
|
Get.toNamed(MinePasswordPage.routeName,
|
||||||
} else if (index == 8) {
|
arguments: MinePasswordType.setting);
|
||||||
//账号凭证
|
return;
|
||||||
await Get.dialog(MineAccountIdentityPage());
|
}
|
||||||
} else if (index == 9) {
|
final close = await CommonAlert.show(
|
||||||
//锁屏密码
|
title: '关闭锁定码',
|
||||||
if (globalStore.password.isNotEmpty) {
|
content: '您确定关闭锁定密码?\n\n开启需重新输入密码',
|
||||||
final close = await CommonAlert.show(
|
cancelText: '稍后再说',
|
||||||
title: '关闭锁定码',
|
confirmText: '确定关闭',
|
||||||
content: '您确定关闭锁定密码?\n\n开启需重新输入密码',
|
);
|
||||||
cancelText: '稍后再说',
|
if (close) {
|
||||||
confirmText: '确定关闭',
|
Get.toNamed(MinePasswordPage.routeName,
|
||||||
);
|
arguments: MinePasswordType.close);
|
||||||
if (close) {
|
|
||||||
Get.toNamed(MinePasswordPage.routeName,
|
|
||||||
arguments: MinePasswordType.close);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Get.toNamed(
|
|
||||||
MinePasswordPage.routeName,
|
|
||||||
arguments: MinePasswordType.setting,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else if (index == 10) {
|
|
||||||
menuTapEvent(3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user