logo和名称替换
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
//acg模块网络请求
|
||||
|
||||
import 'package:hgmj/hj_model/acg/comic_chapters_model.dart';
|
||||
import 'package:hgmj/hj_model/list_base_model.dart';
|
||||
import 'package:hgmj/hj_model/video_model.dart';
|
||||
import 'package:hgmj/tools_base/net/http_manager.dart';
|
||||
import 'package:wydj/hj_model/acg/comic_chapters_model.dart';
|
||||
import 'package:wydj/hj_model/list_base_model.dart';
|
||||
import 'package:wydj/hj_model/video_model.dart';
|
||||
import 'package:wydj/tools_base/net/http_manager.dart';
|
||||
|
||||
import '../../hj_model/acg/cartoon_more_list.dart';
|
||||
import '../../hj_model/cartoon_media_info.dart';
|
||||
@@ -38,7 +38,8 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
"/tag/media/list",
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
@@ -56,8 +57,8 @@ class ACGService {
|
||||
/// 获取标签详情
|
||||
static Future<TagsBean?> fetchMediaTag(String tagId) async {
|
||||
final param = {'id': tagId};
|
||||
final result =
|
||||
await httpManager.fetchResponseByGET('/media_tag/info', param: param, jsonTransformation: (json) => TagsBean.fromMap(json));
|
||||
final result = await httpManager.fetchResponseByGET('/media_tag/info',
|
||||
param: param, jsonTransformation: (json) => TagsBean.fromMap(json));
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
|
||||
@@ -87,7 +88,8 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media/hot',
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
@@ -146,14 +148,17 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media/ranking',
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
|
||||
//获取动漫内容章节列表 sortType: 0-正序 1-倒序
|
||||
|
||||
static Future<ListBaseModel<ComicChapterInfo>?> getChapterList(String mediaId, int pageNumber, int pageSize, {int? sortType = 0}) async {
|
||||
static Future<ListBaseModel<ComicChapterInfo>?> getChapterList(
|
||||
String mediaId, int pageNumber, int pageSize,
|
||||
{int? sortType = 0}) async {
|
||||
final param = {
|
||||
'pageNumber': pageNumber,
|
||||
'pageSize': pageSize,
|
||||
@@ -163,7 +168,8 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media_content/list',
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<ComicChapterInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<ComicChapterInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
@@ -187,7 +193,8 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media/recommend',
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
@@ -195,8 +202,20 @@ class ACGService {
|
||||
//kind:1动漫 2漫画 3小说 4短剧
|
||||
//sortType:1-最新上架 2-最多观看
|
||||
static Future<MediaSearchListModel?> mediaSearch(
|
||||
{int page = 1, int size = 20, int? kind, String? tagName, int? sortType, String? keyword}) async {
|
||||
final param = {'pageNumber': page, 'pageSize': size, 'kind': kind, 'tagName': tagName, 'sortType': sortType, 'keyword': keyword};
|
||||
{int page = 1,
|
||||
int size = 20,
|
||||
int? kind,
|
||||
String? tagName,
|
||||
int? sortType,
|
||||
String? keyword}) async {
|
||||
final param = {
|
||||
'pageNumber': page,
|
||||
'pageSize': size,
|
||||
'kind': kind,
|
||||
'tagName': tagName,
|
||||
'sortType': sortType,
|
||||
'keyword': keyword
|
||||
};
|
||||
param.removeWhere((k, v) => v == null);
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media/search',
|
||||
@@ -244,7 +263,8 @@ class ACGService {
|
||||
final result = await httpManager.fetchResponseByGET(
|
||||
'/media/topic',
|
||||
param: param,
|
||||
jsonTransformation: (json) => ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
jsonTransformation: (json) =>
|
||||
ListBaseModel<CartoonMediaInfo>.fromJson(json),
|
||||
);
|
||||
return result.isSuccess ? result.data : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user