mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-22 15:26:30 +08:00
Login 登陆界面
This commit is contained in:
16
lib/utils/data_utils.dart
Normal file
16
lib/utils/data_utils.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'dart:async' show Future;
|
||||
|
||||
import './net_utils.dart';
|
||||
import '../model/user_info.dart';
|
||||
import 'package:flutter_go/api/api.dart';
|
||||
|
||||
|
||||
class DataUtils{
|
||||
// 登陆获取用户信息
|
||||
static Future<UserInfo> doLogin(Map<String,String> params) async{
|
||||
var response = await NetUtils.post(Api.DO_LOGIN, params);
|
||||
print('url:${Api.DO_LOGIN} $response');
|
||||
UserInfo userInfo = UserInfo.fromJson(response['data']);
|
||||
return userInfo;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user