page
This commit is contained in:
19
lib/providers/public_provider.dart
Normal file
19
lib/providers/public_provider.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:chat/utils/network/http.dart';
|
||||
import 'package:chat/utils/ui_tools.dart';
|
||||
|
||||
class PublicProvider {
|
||||
/// 检测更新
|
||||
static Future checkUpgrade() async {
|
||||
try {
|
||||
return await Http.get(
|
||||
'version/check',
|
||||
params: {
|
||||
'version': '',
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,21 @@ class UserProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future updateMobile(String mobile) async {}
|
||||
static Future updateMobile(String mobile) async {
|
||||
try {
|
||||
return await Http.post('user/mobile');
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future updateEmail(String email) async {}
|
||||
static Future updateEmail(String email) async {
|
||||
try {
|
||||
return await Http.post('user/email');
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user