home_main_logic.dart
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import 'package:get/get.dart';
import 'package:cp_offline_manage/router/route_config.dart';
class Home_mainLogic extends GetxController {
final items = [
{"type": 1, "name": '出票', "icon": 'icon_chu_piao.png'},
{"type": 2, "name": '兑奖', "icon": 'icon_dui_jiang.png'},
{"type": 3, "name": '账户总览', "icon": 'icon_account_overview.png'},
{"type": 4, "name": '赛事下单', "icon": 'icon_competition.png'},
{"type": 5, "name": '门店账本', "icon": 'icon_store_account.png'},
{"type": 6, "name": '刮刮乐', "icon": 'icon_croak.png'},
{"type": 7, "name": '交接班', "icon": 'icon_shift_change.png'},
];
void jump(int index) {
var item = items[index];
switch (item["type"]) {
case 1:
Get.toNamed(RouteConfig.out_ticket_key);
return;
case 2:
Get.toNamed(RouteConfig.redeem_query_key);
return;
case 3:
Get.toNamed(RouteConfig.account_total_key);
return;
case 4:
Get.toNamed(RouteConfig.game_order_key);
return;
case 5:
Get.toNamed(RouteConfig.store_account_key);
return;
case 6:
Get.toNamed(RouteConfig.croak_happy_key);
return;
case 7:
Get.toNamed(RouteConfig.stores_shift_records_key);
return;
}
}
}