import 'package:hgdj/hj_model/list_base_model.dart'; import 'package:hgdj/hj_page/live/live_model.dart'; import 'package:hgdj/tools_base/net/http_manager.dart'; import 'package:hgdj/tools_base/net/net_manager.dart'; class LiveService { //获取直播模块 static Future getLiveModuleList() async { int time = netManager.getFixedCurTime().toUtc().millisecondsSinceEpoch ~/ 1000; final param = {'time': time}; final result = await httpManager.fetchResponseByPOST( '/live/module/list/91porn', param: param, jsonTransformation: (json) => LiveMainModel.fromJson(json), ); return result.data; } //获取直播模块 static Future?> getLiveAnchorList({ String? id, int? pageNumber, int? pageSize, }) async { int time = netManager.getFixedCurTime().toUtc().millisecondsSinceEpoch ~/ 1000; final param = { 'time': time, 'id': id, 'pageNumber': pageNumber, 'pageSize': 20, }; final result = await httpManager.fetchResponseByPOST( '/live/anchor/list/91porn', param: param, jsonTransformation: (json) => ListBaseModel.fromJson(json), ); return result.data; } //获取直播详情模块 static Future getLiveAnchorDetail({String? id}) async { int time = netManager.getFixedCurTime().toUtc().millisecondsSinceEpoch ~/ 1000; final param = { 'time': time, 'id': id, }; final result = await httpManager.fetchResponseByPOST( '/live/anchor/watch/91porn', param: param, jsonTransformation: (json) => LiveAnchor.fromJson(json), ); return result.data; } //获取直播详情推荐列表 static Future?> getLiveAnchorRecom({ String? country, int? pageNumber, int? pageSize, }) async { int time = netManager.getFixedCurTime().toUtc().millisecondsSinceEpoch ~/ 1000; final param = { 'time': time, 'country': country, 'pageNumber': pageNumber, 'pageSize': pageSize, }; final result = await httpManager.fetchResponseByPOST( '/live/anchor/recom/91porn', param: param, jsonTransformation: (json) => ListBaseModel.fromJson(json), ); return result.data; } }