auth_service_impl.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import 'package:cpt_auth/modules/login/login_page.dart';
  2. import 'package:cpt_auth/modules/main/main_page.dart';
  3. import 'package:cpt_auth/modules/reset_psd/reset_psd_page.dart';
  4. import 'package:plugin_basic/basic_export.dart';
  5. import 'package:router/componentRouter/auth_service.dart';
  6. import 'package:shared/utils/log_utils.dart';
  7. class AuthServiceImpl extends GetxService implements AuthService {
  8. @override
  9. void onInit() {
  10. super.onInit();
  11. //初始化资源
  12. Log.d("AuthServiceImpl 初始化资源");
  13. }
  14. @override
  15. void onClose() {
  16. super.onClose();
  17. //销毁资源
  18. Log.d("AuthServiceImpl 销毁资源");
  19. }
  20. //默认启动登录页面
  21. @override
  22. void startLoginPage() {
  23. LoginPage.startInstance();
  24. }
  25. //启动登录页面并关闭其他全部页面
  26. @override
  27. void startPopAllLoginPage() {
  28. LoginPage.startWithPopAll();
  29. }
  30. //默认启动重置密码页面
  31. @override
  32. void startResetPasswordPage() {
  33. ResetPasswordPage.startInstance();
  34. }
  35. //启动首页页面并关闭其他全部页面
  36. @override
  37. void startPopAllMainPage() {
  38. MainPage.startWithPopAll();
  39. }
  40. }