38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
|
|
import 'package:get/get.dart';
|
|
import 'api_provider_base.dart';
|
|
|
|
class ApiProvider extends BaseProvider {
|
|
|
|
Future<Response> requestForVCode(String email) => post(getVerificationCodeUrl.toUrl, null,query: {
|
|
'email':email,
|
|
});
|
|
|
|
Future<Response> register(String countryCode, String countryId, String mobile, String password, String uniqueid, String verificationCode) => post(registerUrl.toUrl, null,query: {
|
|
'countryCode':countryCode,
|
|
'countryId':countryId,
|
|
"mobile":mobile,
|
|
'password':password,
|
|
'platId':"2",
|
|
"uniqueid":uniqueid,
|
|
'verificationCode':verificationCode,
|
|
});
|
|
|
|
Future<Response> getSliderVerifyImg(String countryCode, String account) => post(getSliderVerifyImgUrl.toUrl, null,query: {
|
|
'countryCode':countryCode,
|
|
'account':account,
|
|
});
|
|
|
|
Future<Response> checkSliderVerifyImg(String countryCode, String account, String xWidth) => post(checkImgUrl.toUrl, null,query: {
|
|
'countryCode':countryCode,
|
|
'account':account,
|
|
'xWidth':xWidth,
|
|
});
|
|
|
|
Future<Response> login(String email,String password) => post(loginUrl.toUrl, null,query: {'email':email,'password':password});
|
|
|
|
}
|
|
|
|
extension ExtensionString on String {
|
|
String get toUrl => '$this';
|
|
} |