站点登录
This commit is contained in:
@@ -2,6 +2,8 @@ import 'package:get/get.dart';
|
||||
import 'package:getx_scaffold/getx_scaffold.dart';
|
||||
import 'package:ln_jq_app/pages/login/view.dart';
|
||||
|
||||
import '../../../storage_service.dart';
|
||||
|
||||
class ReservationController extends GetxController with BaseControllerMixin {
|
||||
@override
|
||||
String get builderId => 'b_reservation'; // 确保ID与View中一致
|
||||
@@ -50,11 +52,12 @@ class ReservationController extends GetxController with BaseControllerMixin {
|
||||
Get.snackbar('提示', '保存成功!'); // 示例:显示一个成功的提示
|
||||
}
|
||||
|
||||
void logout() {
|
||||
void logout() async{
|
||||
// TODO: 在这里执行退出登录的逻辑
|
||||
// 1. 清理本地缓存的用户信息
|
||||
// 2. 调用退出登录接口
|
||||
// 3. 导航到登录页面
|
||||
//清理本地缓存的用户信息 导航到登录页面
|
||||
HttpService.to.clearAuthorization();
|
||||
await StorageService.to.clearLoginInfo();
|
||||
|
||||
Get.offAll(() => LoginPage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user