mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
login/exp log
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -929,4 +929,10 @@ class Api {
|
||||
static const String updateReserve = '/x/new-reserve/up/reserve/update';
|
||||
|
||||
static const String reserveInfo = '/x/new-reserve/up/reserve/info';
|
||||
|
||||
static const String loginLog = '/x/member/web/login/log';
|
||||
|
||||
static const String expLog = '/x/member/web/exp/log';
|
||||
|
||||
static const String moralLog = '/x/member/web/moral/log';
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/models/user/stat.dart';
|
||||
import 'package:PiliPlus/models_new/coin_log/data.dart';
|
||||
import 'package:PiliPlus/models_new/history/data.dart';
|
||||
import 'package:PiliPlus/models_new/later/data.dart';
|
||||
import 'package:PiliPlus/models_new/login_log/data.dart';
|
||||
import 'package:PiliPlus/models_new/media_list/data.dart';
|
||||
import 'package:PiliPlus/models_new/space_setting/data.dart';
|
||||
import 'package:PiliPlus/models_new/sub/sub/data.dart';
|
||||
@@ -413,4 +414,34 @@ class UserHttp {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<LoginLogData>> loginLog() async {
|
||||
final res = await Request().get(
|
||||
Api.loginLog,
|
||||
queryParameters: {
|
||||
'jsonp': 'jsonp',
|
||||
'web_location': '333.33',
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(LoginLogData.fromJson(res.data['data']));
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<CoinLogData>> expLog() async {
|
||||
final res = await Request().get(
|
||||
Api.expLog,
|
||||
queryParameters: {
|
||||
'jsonp': 'jsonp',
|
||||
'web_location': '333.33',
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(CoinLogData.fromJson(res.data['data']));
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user