fix login dialog can't pop when api server is invalid
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
957e23fa82
commit
5a14945666
@ -133,9 +133,9 @@ class UserModel {
|
||||
}
|
||||
|
||||
static Future<List<dynamic>> queryLoginOptions() async {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
||||
try {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
||||
return jsonDecode(resp.body);
|
||||
} catch (e) {
|
||||
print("queryLoginOptions: jsonDecode resp body failed: ${e.toString()}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user