mod: 内容分区字段
This commit is contained in:
@ -75,7 +75,7 @@ class SearchHttp {
|
|||||||
required page,
|
required page,
|
||||||
String? order,
|
String? order,
|
||||||
int? duration,
|
int? duration,
|
||||||
int? tid,
|
int? tids,
|
||||||
}) async {
|
}) async {
|
||||||
var reqData = {
|
var reqData = {
|
||||||
'search_type': searchType.type,
|
'search_type': searchType.type,
|
||||||
@ -85,7 +85,7 @@ class SearchHttp {
|
|||||||
'page': page,
|
'page': page,
|
||||||
if (order != null) 'order': order,
|
if (order != null) 'order': order,
|
||||||
if (duration != null) 'duration': duration,
|
if (duration != null) 'duration': duration,
|
||||||
if (tid != null) 'tid': tid,
|
if (tids != null && tids != -1) 'tids': tids,
|
||||||
};
|
};
|
||||||
var res = await Request().get(Api.searchByType, data: reqData);
|
var res = await Request().get(Api.searchByType, data: reqData);
|
||||||
if (res.data['code'] == 0 && res.data['data']['numPages'] > 0) {
|
if (res.data['code'] == 0 && res.data['data']['numPages'] > 0) {
|
||||||
|
@ -18,7 +18,9 @@ class SearchText extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Material(
|
return Material(
|
||||||
color: Theme.of(context)
|
color: isSelect
|
||||||
|
? Theme.of(context).colorScheme.primaryContainer
|
||||||
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.surfaceContainerHighest
|
.surfaceContainerHighest
|
||||||
.withOpacity(0.5),
|
.withOpacity(0.5),
|
||||||
|
@ -16,8 +16,8 @@ class SearchPanelController extends GetxController {
|
|||||||
RxString order = ''.obs;
|
RxString order = ''.obs;
|
||||||
// 视频时长筛选 仅用于搜索视频
|
// 视频时长筛选 仅用于搜索视频
|
||||||
RxInt duration = 0.obs;
|
RxInt duration = 0.obs;
|
||||||
// 视频分区筛选 仅用于搜索视频
|
// 视频分区筛选 仅用于搜索视频 -1时不传
|
||||||
RxInt tid = (-1).obs;
|
RxInt tids = (-1).obs;
|
||||||
|
|
||||||
Future onSearch({type = 'init'}) async {
|
Future onSearch({type = 'init'}) async {
|
||||||
var result = await SearchHttp.searchByType(
|
var result = await SearchHttp.searchByType(
|
||||||
@ -26,7 +26,7 @@ class SearchPanelController extends GetxController {
|
|||||||
page: page.value,
|
page: page.value,
|
||||||
order: searchType!.type != 'video' ? null : order.value,
|
order: searchType!.type != 'video' ? null : order.value,
|
||||||
duration: searchType!.type != 'video' ? null : duration.value,
|
duration: searchType!.type != 'video' ? null : duration.value,
|
||||||
tid: searchType!.type != 'video' ? null : tid.value,
|
tids: searchType!.type != 'video' ? null : tids.value,
|
||||||
);
|
);
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
if (type == 'onRefresh') {
|
if (type == 'onRefresh') {
|
||||||
|
@ -323,7 +323,7 @@ class VideoPanelController extends GetxController {
|
|||||||
SearchPanelController ctr =
|
SearchPanelController ctr =
|
||||||
Get.find<SearchPanelController>(
|
Get.find<SearchPanelController>(
|
||||||
tag: 'video${searchPanelCtr.keyword!}');
|
tag: 'video${searchPanelCtr.keyword!}');
|
||||||
ctr.tid.value = i['value'];
|
ctr.tids.value = i['value'];
|
||||||
Get.back();
|
Get.back();
|
||||||
SmartDialog.showLoading(msg: '获取中');
|
SmartDialog.showLoading(msg: '获取中');
|
||||||
await ctr.onRefresh();
|
await ctr.onRefresh();
|
||||||
|
Reference in New Issue
Block a user