mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
add task
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:qinglong_app/base/base_viewmodel.dart';
|
||||
import 'package:qinglong_app/base/http/api.dart';
|
||||
import 'package:qinglong_app/base/http/http.dart';
|
||||
import 'package:qinglong_app/base/http/url.dart';
|
||||
import 'package:qinglong_app/main.dart';
|
||||
@@ -19,13 +20,7 @@ class LoginViewModel extends ViewModel {
|
||||
msg = "";
|
||||
|
||||
notifyListeners();
|
||||
HttpResponse<LoginBean> response = await Http.post<LoginBean>(
|
||||
Url.LOGIN,
|
||||
{
|
||||
"username": userName,
|
||||
"password": password,
|
||||
},
|
||||
);
|
||||
HttpResponse<LoginBean> response = await Api.login(userName, password);
|
||||
|
||||
if (response.success) {
|
||||
userInfoViewModel.updateToken(response.bean?.token ?? "");
|
||||
|
||||
Reference in New Issue
Block a user