mod: 优化未登录时用户跳转

This commit is contained in:
guozhigq
2023-09-18 07:55:31 +08:00
parent 8f97431665
commit 566f75f760
2 changed files with 19 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/http/user.dart';
@ -111,4 +112,20 @@ class MineController extends GetxController {
}
Get.forceAppUpdate();
}
pushFollow() {
if (!userLogin.value) {
SmartDialog.showToast('账号未登录');
return;
}
Get.toNamed('/follow?mid=${userInfo.value.mid}');
}
pushFans() {
if (!userLogin.value) {
SmartDialog.showToast('账号未登录');
return;
}
Get.toNamed('/fan?mid=${userInfo.value.mid}');
}
}