|
|
@@ -12,7 +12,9 @@ import 'pages/loginFirst.dart';
|
|
|
|
|
|
class MobileCyberGamesApp extends StatelessWidget {
|
|
|
final Store<AppState> store;
|
|
|
+
|
|
|
MobileCyberGamesApp(this.store);
|
|
|
+
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return StoreProvider(
|
|
|
@@ -30,9 +32,9 @@ void main() async {
|
|
|
));
|
|
|
final prefs = await SharedPreferences.getInstance();
|
|
|
HttpManager.token = prefs.getString('token') ??
|
|
|
- "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkOWU0MDdhNy1iODU2LTQ0ZjAtYmM1Yy0yMGI4NmY4MWM4MTEiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MDczODk4MCwic3ViIjoiODQ2NjQiLCJleHAiOjE1NTA5OTgxODB9.sowgrK2LHLiVAZL4MFC2rgapD9ves8nCyZKlKaWtydY";
|
|
|
+ "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZWM2OTMxMy01Yjc3LTRlMTctOTcwOC0wYTZhM2JhZmZhM2EiLCJpc3MiOiJhZG1pbiIsImlhdCI6MTU1MTA3OTMzMCwic3ViIjoiODQ3MDMiLCJleHAiOjE1NTEzMzg1MzB9.6olL1T38rYRLBwKtTbFSI4cEMAbQf4iWVr1xXLObu8g";
|
|
|
Result result = await HttpManager.get("userInfo/getUserInfo");
|
|
|
- AppState state = AppState();
|
|
|
+ AppState state = AppState.empty();
|
|
|
if (result.success && result.data != null) {
|
|
|
state.isLogin = true;
|
|
|
UserInfo userInfo = UserInfo.fromJson(result.data);
|