mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-26 05:16:01 +08:00
opt: search panel
This commit is contained in:
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPalaX/common/skeleton/media_bangumi.dart';
|
import 'package:PiliPalaX/common/skeleton/media_bangumi.dart';
|
||||||
import 'package:PiliPalaX/common/skeleton/video_card_h.dart';
|
import 'package:PiliPalaX/common/skeleton/video_card_h.dart';
|
||||||
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
|
||||||
import 'package:PiliPalaX/models/common/search_type.dart';
|
import 'package:PiliPalaX/models/common/search_type.dart';
|
||||||
|
|
||||||
import '../../common/constants.dart';
|
import '../../common/constants.dart';
|
||||||
@@ -75,41 +74,7 @@ class _SearchPanelState extends State<SearchPanel>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody(LoadingState loadingState) {
|
Widget _buildBody(LoadingState loadingState) {
|
||||||
if (loadingState is Success) {
|
if (loadingState is Loading) {
|
||||||
switch (widget.searchType) {
|
|
||||||
case SearchType.video:
|
|
||||||
return SearchVideoPanel(
|
|
||||||
ctr: _searchPanelController,
|
|
||||||
list: loadingState.response,
|
|
||||||
);
|
|
||||||
case SearchType.media_bangumi:
|
|
||||||
return searchBangumiPanel(
|
|
||||||
context,
|
|
||||||
_searchPanelController,
|
|
||||||
loadingState.response,
|
|
||||||
);
|
|
||||||
case SearchType.bili_user:
|
|
||||||
return searchUserPanel(
|
|
||||||
context,
|
|
||||||
_searchPanelController,
|
|
||||||
loadingState.response,
|
|
||||||
);
|
|
||||||
case SearchType.live_room:
|
|
||||||
return searchLivePanel(
|
|
||||||
context,
|
|
||||||
_searchPanelController,
|
|
||||||
loadingState.response,
|
|
||||||
);
|
|
||||||
case SearchType.article:
|
|
||||||
return searchArticlePanel(
|
|
||||||
context,
|
|
||||||
_searchPanelController,
|
|
||||||
loadingState.response,
|
|
||||||
);
|
|
||||||
default:
|
|
||||||
return const SizedBox();
|
|
||||||
}
|
|
||||||
} else if (loadingState is Loading) {
|
|
||||||
return CustomScrollView(
|
return CustomScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
@@ -141,15 +106,39 @@ class _SearchPanelState extends State<SearchPanel>
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return CustomScrollView(
|
switch (widget.searchType) {
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
case SearchType.video:
|
||||||
slivers: [
|
return SearchVideoPanel(
|
||||||
HttpError(
|
ctr: _searchPanelController,
|
||||||
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
loadingState: loadingState,
|
||||||
fn: _searchPanelController.onReload,
|
);
|
||||||
),
|
case SearchType.media_bangumi:
|
||||||
],
|
return searchBangumiPanel(
|
||||||
);
|
context,
|
||||||
|
_searchPanelController,
|
||||||
|
loadingState,
|
||||||
|
);
|
||||||
|
case SearchType.bili_user:
|
||||||
|
return searchUserPanel(
|
||||||
|
context,
|
||||||
|
_searchPanelController,
|
||||||
|
loadingState,
|
||||||
|
);
|
||||||
|
case SearchType.live_room:
|
||||||
|
return searchLivePanel(
|
||||||
|
context,
|
||||||
|
_searchPanelController,
|
||||||
|
loadingState,
|
||||||
|
);
|
||||||
|
case SearchType.article:
|
||||||
|
return searchArticlePanel(
|
||||||
|
context,
|
||||||
|
_searchPanelController,
|
||||||
|
loadingState,
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||||
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
||||||
import 'package:PiliPalaX/pages/search_panel/controller.dart';
|
import 'package:PiliPalaX/pages/search_panel/controller.dart';
|
||||||
import 'package:PiliPalaX/pages/video/detail/reply/view.dart'
|
import 'package:PiliPalaX/pages/video/detail/reply/view.dart'
|
||||||
@@ -11,7 +13,7 @@ import 'package:PiliPalaX/utils/utils.dart';
|
|||||||
|
|
||||||
import '../../../utils/grid.dart';
|
import '../../../utils/grid.dart';
|
||||||
|
|
||||||
Widget searchArticlePanel(BuildContext context, searchPanelCtr, list) {
|
Widget searchArticlePanel(BuildContext context, searchPanelCtr, loadingState) {
|
||||||
TextStyle textStyle = TextStyle(
|
TextStyle textStyle = TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.outline);
|
color: Theme.of(context).colorScheme.outline);
|
||||||
@@ -71,114 +73,141 @@ Widget searchArticlePanel(BuildContext context, searchPanelCtr, list) {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverGrid(
|
loadingState is Success
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
? SliverPadding(
|
||||||
mainAxisSpacing: StyleString.safeSpace,
|
padding: EdgeInsets.only(
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
bottom: StyleString.safeSpace +
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
MediaQuery.of(context).padding.bottom,
|
||||||
childAspectRatio: StyleString.aspectRatio * 2.4,
|
),
|
||||||
mainAxisExtent: 0),
|
sliver: SliverGrid(
|
||||||
delegate: SliverChildBuilderDelegate(
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
(BuildContext context, int index) {
|
mainAxisSpacing: StyleString.safeSpace,
|
||||||
return InkWell(
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
onTap: () {
|
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||||
Get.toNamed('/htmlRender', parameters: {
|
childAspectRatio: StyleString.aspectRatio * 2.4,
|
||||||
'url': 'www.bilibili.com/read/cv${list[index].id}',
|
mainAxisExtent: 0,
|
||||||
'title': list[index].subTitle,
|
),
|
||||||
'id': 'cv${list[index].id}',
|
delegate: SliverChildBuilderDelegate(
|
||||||
'dynamicType': 'read'
|
(BuildContext context, int index) {
|
||||||
});
|
return InkWell(
|
||||||
},
|
onTap: () {
|
||||||
child: Padding(
|
Get.toNamed('/htmlRender', parameters: {
|
||||||
padding: const EdgeInsets.symmetric(
|
'url':
|
||||||
horizontal: StyleString.safeSpace),
|
'www.bilibili.com/read/cv${loadingState.response[index].id}',
|
||||||
child: LayoutBuilder(
|
'title': loadingState.response[index].subTitle,
|
||||||
builder: (context, boxConstraints) {
|
'id': 'cv${loadingState.response[index].id}',
|
||||||
final double width = (boxConstraints.maxWidth -
|
'dynamicType': 'read'
|
||||||
StyleString.cardSpace *
|
});
|
||||||
6 /
|
},
|
||||||
MediaQuery.textScalerOf(context).scale(1.0)) /
|
child: Padding(
|
||||||
2;
|
padding: const EdgeInsets.symmetric(
|
||||||
return Container(
|
horizontal: StyleString.safeSpace),
|
||||||
constraints: const BoxConstraints(minHeight: 88),
|
child: LayoutBuilder(
|
||||||
height: width / StyleString.aspectRatio,
|
builder: (context, boxConstraints) {
|
||||||
child: Row(
|
final double width = (boxConstraints.maxWidth -
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
StyleString.cardSpace *
|
||||||
children: <Widget>[
|
6 /
|
||||||
if (list[index].imageUrls != null &&
|
MediaQuery.textScalerOf(context)
|
||||||
list[index].imageUrls.isNotEmpty)
|
.scale(1.0)) /
|
||||||
AspectRatio(
|
2;
|
||||||
aspectRatio: StyleString.aspectRatio,
|
return Container(
|
||||||
child: LayoutBuilder(
|
constraints: const BoxConstraints(minHeight: 88),
|
||||||
builder: (context, boxConstraints) {
|
height: width / StyleString.aspectRatio,
|
||||||
double maxWidth = boxConstraints.maxWidth;
|
child: Row(
|
||||||
double maxHeight = boxConstraints.maxHeight;
|
|
||||||
return NetworkImgLayer(
|
|
||||||
width: maxWidth,
|
|
||||||
height: maxHeight,
|
|
||||||
src: list[index].imageUrls.first,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: <Widget>[
|
||||||
RichText(
|
if (loadingState.response[index].imageUrls !=
|
||||||
maxLines: 2,
|
null &&
|
||||||
text: TextSpan(
|
loadingState
|
||||||
children: [
|
.response[index].imageUrls.isNotEmpty)
|
||||||
for (var i in list[index].title) ...[
|
AspectRatio(
|
||||||
TextSpan(
|
aspectRatio: StyleString.aspectRatio,
|
||||||
text: i['text'],
|
child: LayoutBuilder(
|
||||||
style: TextStyle(
|
builder: (context, boxConstraints) {
|
||||||
fontWeight: FontWeight.w400,
|
double maxWidth =
|
||||||
letterSpacing: 0.3,
|
boxConstraints.maxWidth;
|
||||||
color: i['type'] == 'em'
|
double maxHeight =
|
||||||
? Theme.of(context)
|
boxConstraints.maxHeight;
|
||||||
.colorScheme
|
return NetworkImgLayer(
|
||||||
.primary
|
width: maxWidth,
|
||||||
: Theme.of(context)
|
height: maxHeight,
|
||||||
.colorScheme
|
src: loadingState
|
||||||
.onSurface,
|
.response[index].imageUrls.first,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(
|
||||||
|
10, 2, 6, 0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
RichText(
|
||||||
|
maxLines: 2,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
for (var i in loadingState
|
||||||
|
.response[index].title) ...[
|
||||||
|
TextSpan(
|
||||||
|
text: i['text'],
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w400,
|
||||||
|
letterSpacing: 0.3,
|
||||||
|
color: i['type'] == 'em'
|
||||||
|
? Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.primary
|
||||||
|
: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
const Spacer(),
|
||||||
],
|
Text(
|
||||||
|
Utils.dateFormat(
|
||||||
|
loadingState
|
||||||
|
.response[index].pubTime,
|
||||||
|
formatType: 'detail'),
|
||||||
|
style: textStyle),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'${loadingState.response[index].view}浏览',
|
||||||
|
style: textStyle),
|
||||||
|
Text(' • ', style: textStyle),
|
||||||
|
Text(
|
||||||
|
'${loadingState.response[index].reply}评论',
|
||||||
|
style: textStyle),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
|
||||||
Text(
|
|
||||||
Utils.dateFormat(list[index].pubTime,
|
|
||||||
formatType: 'detail'),
|
|
||||||
style: textStyle),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text('${list[index].view}浏览',
|
|
||||||
style: textStyle),
|
|
||||||
Text(' • ', style: textStyle),
|
|
||||||
Text('${list[index].reply}评论',
|
|
||||||
style: textStyle),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
childCount: loadingState.response.length,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
)
|
||||||
},
|
: HttpError(
|
||||||
childCount: list.length,
|
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
||||||
),
|
fn: searchPanelCtr.onReload,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||||
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPalaX/common/constants.dart';
|
import 'package:PiliPalaX/common/constants.dart';
|
||||||
@@ -6,26 +8,36 @@ import 'package:PiliPalaX/utils/utils.dart';
|
|||||||
|
|
||||||
import '../../../utils/grid.dart';
|
import '../../../utils/grid.dart';
|
||||||
|
|
||||||
Widget searchLivePanel(BuildContext context, ctr, list) {
|
Widget searchLivePanel(BuildContext context, ctr, loadingState) {
|
||||||
return Padding(
|
return loadingState is Success
|
||||||
padding: const EdgeInsets.only(
|
? GridView.builder(
|
||||||
left: StyleString.safeSpace, right: StyleString.safeSpace),
|
padding: const EdgeInsets.only(
|
||||||
child: GridView.builder(
|
left: StyleString.safeSpace,
|
||||||
primary: false,
|
right: StyleString.safeSpace,
|
||||||
controller: ctr!.scrollController,
|
bottom: StyleString.safeSpace,
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
),
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth,
|
primary: false,
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
controller: ctr!.scrollController,
|
||||||
mainAxisSpacing: StyleString.safeSpace,
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
childAspectRatio: StyleString.aspectRatio,
|
maxCrossAxisExtent: Grid.maxRowWidth,
|
||||||
mainAxisExtent: MediaQuery.textScalerOf(context).scale(80),
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
),
|
mainAxisSpacing: StyleString.safeSpace,
|
||||||
itemCount: list.length,
|
childAspectRatio: StyleString.aspectRatio,
|
||||||
itemBuilder: (context, index) {
|
mainAxisExtent: MediaQuery.textScalerOf(context).scale(80),
|
||||||
return LiveItem(liveItem: list![index]);
|
),
|
||||||
},
|
itemCount: loadingState.response.length,
|
||||||
),
|
itemBuilder: (context, index) {
|
||||||
);
|
return LiveItem(liveItem: loadingState.response[index]);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
HttpError(
|
||||||
|
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
||||||
|
fn: ctr.onReload,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class LiveItem extends StatelessWidget {
|
class LiveItem extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||||
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -11,164 +13,191 @@ import 'package:PiliPalaX/utils/utils.dart';
|
|||||||
|
|
||||||
import '../../../utils/grid.dart';
|
import '../../../utils/grid.dart';
|
||||||
|
|
||||||
Widget searchBangumiPanel(BuildContext context, ctr, list) {
|
Widget searchBangumiPanel(BuildContext context, ctr, loadingState) {
|
||||||
TextStyle style =
|
TextStyle style =
|
||||||
TextStyle(fontSize: Theme.of(context).textTheme.labelMedium!.fontSize);
|
TextStyle(fontSize: Theme.of(context).textTheme.labelMedium!.fontSize);
|
||||||
return CustomScrollView(
|
return CustomScrollView(
|
||||||
controller: ctr.scrollController,
|
controller: ctr.scrollController,
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverGrid(
|
loadingState is Success
|
||||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
? SliverPadding(
|
||||||
mainAxisSpacing: StyleString.safeSpace,
|
padding: EdgeInsets.only(
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
bottom: StyleString.safeSpace +
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
MediaQuery.of(context).padding.bottom,
|
||||||
mainAxisExtent: 160,
|
|
||||||
),
|
|
||||||
delegate: SliverChildBuilderDelegate((BuildContext context, int index) {
|
|
||||||
var i = list![index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
/// TODO 番剧详情页面
|
|
||||||
// Get.toNamed('/video?bvid=${i.bvid}&cid=${i.cid}', arguments: {
|
|
||||||
// 'videoItem': i,
|
|
||||||
// 'heroTag': Utils.makeHeroTag(i.id),
|
|
||||||
// 'videoType': SearchType.media_bangumi
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(StyleString.safeSpace,
|
|
||||||
StyleString.safeSpace, StyleString.safeSpace, 2),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Stack(
|
|
||||||
children: [
|
|
||||||
NetworkImgLayer(
|
|
||||||
width: 111,
|
|
||||||
height: 148,
|
|
||||||
src: i.cover,
|
|
||||||
),
|
|
||||||
PBadge(
|
|
||||||
text: i.mediaType == 1 ? '番剧' : '国创',
|
|
||||||
top: 6.0,
|
|
||||||
right: 4.0,
|
|
||||||
bottom: null,
|
|
||||||
left: null,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
RichText(
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.onSurface),
|
|
||||||
children: [
|
|
||||||
for (var i in i.title) ...[
|
|
||||||
TextSpan(
|
|
||||||
text: i['text'],
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: MediaQuery.textScalerOf(context)
|
|
||||||
.scale(Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.titleSmall!
|
|
||||||
.fontSize!),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: i['type'] == 'em'
|
|
||||||
? Theme.of(context).colorScheme.primary
|
|
||||||
: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.onSurface,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 12),
|
|
||||||
Text('评分:${i.mediaScore['score'].toString()}',
|
|
||||||
style: style),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(i.areas, style: style),
|
|
||||||
const SizedBox(width: 3),
|
|
||||||
const Text('·'),
|
|
||||||
const SizedBox(width: 3),
|
|
||||||
Text(Utils.dateFormat(i.pubtime).toString(),
|
|
||||||
style: style),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(i.styles, style: style),
|
|
||||||
const SizedBox(width: 3),
|
|
||||||
const Text('·'),
|
|
||||||
const SizedBox(width: 3),
|
|
||||||
Text(i.indexShow, style: style),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 18),
|
|
||||||
SizedBox(
|
|
||||||
height: 32,
|
|
||||||
child: ElevatedButton(
|
|
||||||
onPressed: () async {
|
|
||||||
SmartDialog.showLoading(msg: '获取中...');
|
|
||||||
var res = await SearchHttp.bangumiInfo(
|
|
||||||
seasonId: i.seasonId);
|
|
||||||
SmartDialog.dismiss().then((value) {
|
|
||||||
if (res['status']) {
|
|
||||||
EpisodeItem episode =
|
|
||||||
res['data'].episodes.first;
|
|
||||||
int? epId = res['data']
|
|
||||||
.userStatus
|
|
||||||
?.progress
|
|
||||||
?.lastEpId;
|
|
||||||
if (epId == null) {
|
|
||||||
epId = episode.epId;
|
|
||||||
} else {
|
|
||||||
for (var item in res['data'].episodes) {
|
|
||||||
if (item.epId == epId) {
|
|
||||||
episode = item;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String bvid = episode.bvid!;
|
|
||||||
int cid = episode.cid!;
|
|
||||||
String pic = episode.cover!;
|
|
||||||
String heroTag = Utils.makeHeroTag(cid);
|
|
||||||
Get.toNamed(
|
|
||||||
'/video?bvid=$bvid&cid=$cid&seasonId=${i.seasonId}&epid=$epId',
|
|
||||||
arguments: {
|
|
||||||
'pic': pic,
|
|
||||||
'heroTag': heroTag,
|
|
||||||
'videoType': SearchType.media_bangumi,
|
|
||||||
'bangumiItem': res['data'],
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
SmartDialog.showToast(res['msg']);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: const Text('观看'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
sliver: SliverGrid(
|
||||||
|
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
|
mainAxisSpacing: StyleString.safeSpace,
|
||||||
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
|
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||||
|
mainAxisExtent: 160,
|
||||||
|
),
|
||||||
|
delegate: SliverChildBuilderDelegate(
|
||||||
|
(BuildContext context, int index) {
|
||||||
|
var i = loadingState.response[index];
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
/// TODO 番剧详情页面
|
||||||
|
// Get.toNamed('/video?bvid=${i.bvid}&cid=${i.cid}', arguments: {
|
||||||
|
// 'videoItem': i,
|
||||||
|
// 'heroTag': Utils.makeHeroTag(i.id),
|
||||||
|
// 'videoType': SearchType.media_bangumi
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(
|
||||||
|
StyleString.safeSpace,
|
||||||
|
StyleString.safeSpace,
|
||||||
|
StyleString.safeSpace,
|
||||||
|
2),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
NetworkImgLayer(
|
||||||
|
width: 111,
|
||||||
|
height: 148,
|
||||||
|
src: i.cover,
|
||||||
|
),
|
||||||
|
PBadge(
|
||||||
|
text: i.mediaType == 1 ? '番剧' : '国创',
|
||||||
|
top: 6.0,
|
||||||
|
right: 4.0,
|
||||||
|
bottom: null,
|
||||||
|
left: null,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
RichText(
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface),
|
||||||
|
children: [
|
||||||
|
for (var i in i.title) ...[
|
||||||
|
TextSpan(
|
||||||
|
text: i['text'],
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: MediaQuery.textScalerOf(
|
||||||
|
context)
|
||||||
|
.scale(Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleSmall!
|
||||||
|
.fontSize!),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: i['type'] == 'em'
|
||||||
|
? Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.primary
|
||||||
|
: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Text('评分:${i.mediaScore['score'].toString()}',
|
||||||
|
style: style),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(i.areas, style: style),
|
||||||
|
const SizedBox(width: 3),
|
||||||
|
const Text('·'),
|
||||||
|
const SizedBox(width: 3),
|
||||||
|
Text(
|
||||||
|
Utils.dateFormat(i.pubtime)
|
||||||
|
.toString(),
|
||||||
|
style: style),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(i.styles, style: style),
|
||||||
|
const SizedBox(width: 3),
|
||||||
|
const Text('·'),
|
||||||
|
const SizedBox(width: 3),
|
||||||
|
Text(i.indexShow, style: style),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 18),
|
||||||
|
SizedBox(
|
||||||
|
height: 32,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
SmartDialog.showLoading(msg: '获取中...');
|
||||||
|
var res = await SearchHttp.bangumiInfo(
|
||||||
|
seasonId: i.seasonId);
|
||||||
|
SmartDialog.dismiss().then((value) {
|
||||||
|
if (res['status']) {
|
||||||
|
EpisodeItem episode =
|
||||||
|
res['data'].episodes.first;
|
||||||
|
int? epId = res['data']
|
||||||
|
.userStatus
|
||||||
|
?.progress
|
||||||
|
?.lastEpId;
|
||||||
|
if (epId == null) {
|
||||||
|
epId = episode.epId;
|
||||||
|
} else {
|
||||||
|
for (var item
|
||||||
|
in res['data'].episodes) {
|
||||||
|
if (item.epId == epId) {
|
||||||
|
episode = item;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String bvid = episode.bvid!;
|
||||||
|
int cid = episode.cid!;
|
||||||
|
String pic = episode.cover!;
|
||||||
|
String heroTag =
|
||||||
|
Utils.makeHeroTag(cid);
|
||||||
|
Get.toNamed(
|
||||||
|
'/video?bvid=$bvid&cid=$cid&seasonId=${i.seasonId}&epid=$epId',
|
||||||
|
arguments: {
|
||||||
|
'pic': pic,
|
||||||
|
'heroTag': heroTag,
|
||||||
|
'videoType':
|
||||||
|
SearchType.media_bangumi,
|
||||||
|
'bangumiItem': res['data'],
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: const Text('观看'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
childCount: loadingState.response.length,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: HttpError(
|
||||||
|
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
||||||
|
fn: ctr.onReload,
|
||||||
),
|
),
|
||||||
);
|
|
||||||
}, childCount: list.length),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||||
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
||||||
import 'package:PiliPalaX/pages/search_panel/controller.dart';
|
import 'package:PiliPalaX/pages/search_panel/controller.dart';
|
||||||
import 'package:PiliPalaX/pages/video/detail/reply/view.dart'
|
import 'package:PiliPalaX/pages/video/detail/reply/view.dart'
|
||||||
@@ -11,7 +13,7 @@ import 'package:PiliPalaX/utils/utils.dart';
|
|||||||
import '../../../common/constants.dart';
|
import '../../../common/constants.dart';
|
||||||
import '../../../utils/grid.dart';
|
import '../../../utils/grid.dart';
|
||||||
|
|
||||||
Widget searchUserPanel(BuildContext context, searchPanelCtr, list) {
|
Widget searchUserPanel(BuildContext context, searchPanelCtr, loadingState) {
|
||||||
TextStyle style = TextStyle(
|
TextStyle style = TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.outline);
|
color: Theme.of(context).colorScheme.outline);
|
||||||
@@ -71,73 +73,85 @@ Widget searchUserPanel(BuildContext context, searchPanelCtr, list) {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverGrid(
|
loadingState is Success
|
||||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
? SliverPadding(
|
||||||
mainAxisSpacing: StyleString.cardSpace,
|
padding: EdgeInsets.only(
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
bottom: StyleString.safeSpace +
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
MediaQuery.of(context).padding.bottom,
|
||||||
mainAxisExtent: 56),
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
sliver: SliverGrid(
|
||||||
(BuildContext context, int index) {
|
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
var i = list![index];
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
String heroTag = Utils.makeHeroTag(i!.mid);
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
return InkWell(
|
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||||
onTap: () => Get.toNamed('/member?mid=${i.mid}',
|
mainAxisExtent: 56,
|
||||||
arguments: {'heroTag': heroTag, 'face': i.upic}),
|
),
|
||||||
child: Row(
|
delegate: SliverChildBuilderDelegate(
|
||||||
children: [
|
(BuildContext context, int index) {
|
||||||
const SizedBox(width: 15),
|
var i = loadingState.response[index];
|
||||||
Hero(
|
String heroTag = Utils.makeHeroTag(i!.mid);
|
||||||
tag: heroTag,
|
return InkWell(
|
||||||
child: NetworkImgLayer(
|
onTap: () => Get.toNamed('/member?mid=${i.mid}',
|
||||||
width: 42,
|
arguments: {'heroTag': heroTag, 'face': i.upic}),
|
||||||
height: 42,
|
child: Row(
|
||||||
src: i.upic,
|
|
||||||
type: 'avatar',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const SizedBox(width: 15),
|
||||||
i!.uname,
|
Hero(
|
||||||
style: const TextStyle(
|
tag: heroTag,
|
||||||
fontSize: 14,
|
child: NetworkImgLayer(
|
||||||
|
width: 42,
|
||||||
|
height: 42,
|
||||||
|
src: i.upic,
|
||||||
|
type: 'avatar',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 10),
|
||||||
Image.asset(
|
Column(
|
||||||
'assets/images/lv/lv${i!.level}.png',
|
mainAxisSize: MainAxisSize.max,
|
||||||
height: 11,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
semanticLabel: '等级${i.level}',
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
),
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
i!.uname,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/lv/lv${i!.level}.png',
|
||||||
|
height: 11,
|
||||||
|
semanticLabel: '等级${i.level}',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text('粉丝:${i.fans} ', style: style),
|
||||||
|
Text(' 视频:${i.videos}', style: style)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (i.officialVerify['desc'] != '')
|
||||||
|
Text(
|
||||||
|
i.officialVerify['desc'],
|
||||||
|
style: style,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
);
|
||||||
children: [
|
},
|
||||||
Text('粉丝:${i.fans} ', style: style),
|
childCount: loadingState.response.length,
|
||||||
Text(' 视频:${i.videos}', style: style)
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
if (i.officialVerify['desc'] != '')
|
|
||||||
Text(
|
|
||||||
i.officialVerify['desc'],
|
|
||||||
style: style,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
)
|
||||||
},
|
: HttpError(
|
||||||
childCount: list!.length,
|
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
||||||
),
|
fn: searchPanelCtr.onReload,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||||
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
import 'package:PiliPalaX/pages/search/widgets/search_text.dart';
|
||||||
|
import 'package:PiliPalaX/pages/video/detail/reply/view.dart'
|
||||||
|
show MySliverPersistentHeaderDelegate;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -12,99 +16,114 @@ import '../../../utils/grid.dart';
|
|||||||
class SearchVideoPanel extends StatelessWidget {
|
class SearchVideoPanel extends StatelessWidget {
|
||||||
SearchVideoPanel({
|
SearchVideoPanel({
|
||||||
required this.ctr,
|
required this.ctr,
|
||||||
required this.list,
|
required this.loadingState,
|
||||||
Key? key,
|
Key? key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final SearchPanelController ctr;
|
final SearchPanelController ctr;
|
||||||
final List list;
|
final dynamic loadingState;
|
||||||
|
|
||||||
final VideoPanelController controller = Get.put(VideoPanelController());
|
final VideoPanelController controller = Get.put(VideoPanelController());
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return CustomScrollView(
|
||||||
children: [
|
controller: ctr.scrollController,
|
||||||
// 分类筛选
|
slivers: [
|
||||||
Container(
|
SliverPersistentHeader(
|
||||||
width: context.width,
|
pinned: false,
|
||||||
height: 34,
|
floating: true,
|
||||||
padding: const EdgeInsets.only(
|
delegate: MySliverPersistentHeaderDelegate(
|
||||||
left: StyleString.safeSpace, top: 0, right: 12),
|
child: Container(
|
||||||
child: Row(
|
width: context.width,
|
||||||
children: [
|
height: 34,
|
||||||
Expanded(
|
color: Theme.of(context).colorScheme.surface,
|
||||||
child: SingleChildScrollView(
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
scrollDirection: Axis.horizontal,
|
child: Row(
|
||||||
child: Obx(
|
children: [
|
||||||
() => Wrap(
|
Expanded(
|
||||||
// spacing: ,
|
child: SingleChildScrollView(
|
||||||
children: [
|
scrollDirection: Axis.horizontal,
|
||||||
for (var i in controller.filterList) ...[
|
child: Obx(
|
||||||
CustomFilterChip(
|
() => Wrap(
|
||||||
label: i['label'],
|
// spacing: ,
|
||||||
type: i['type'],
|
children: [
|
||||||
selectedType: controller.selectedType.value,
|
for (var i in controller.filterList) ...[
|
||||||
callFn: (bool selected) async {
|
CustomFilterChip(
|
||||||
print('selected: $selected');
|
label: i['label'],
|
||||||
controller.selectedType.value = i['type'];
|
type: i['type'],
|
||||||
ctr.order.value =
|
selectedType: controller.selectedType.value,
|
||||||
i['type'].toString().split('.').last;
|
callFn: (bool selected) async {
|
||||||
SmartDialog.showLoading(msg: 'loading');
|
print('selected: $selected');
|
||||||
await ctr.onRefresh();
|
controller.selectedType.value = i['type'];
|
||||||
SmartDialog.dismiss();
|
ctr.order.value =
|
||||||
},
|
i['type'].toString().split('.').last;
|
||||||
),
|
SmartDialog.showLoading(msg: 'loading');
|
||||||
]
|
await ctr.onRefresh();
|
||||||
],
|
SmartDialog.dismiss();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const VerticalDivider(indent: 7, endIndent: 8),
|
||||||
),
|
const SizedBox(width: 3),
|
||||||
const VerticalDivider(indent: 7, endIndent: 8),
|
SizedBox(
|
||||||
const SizedBox(width: 3),
|
width: 32,
|
||||||
SizedBox(
|
height: 32,
|
||||||
width: 32,
|
child: IconButton(
|
||||||
height: 32,
|
tooltip: '筛选',
|
||||||
child: IconButton(
|
style: ButtonStyle(
|
||||||
tooltip: '筛选',
|
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||||
style: ButtonStyle(
|
),
|
||||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
onPressed: () =>
|
||||||
|
controller.onShowFilterDialog(context, ctr),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.filter_list_outlined,
|
||||||
|
size: 18,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onPressed: () => controller.onShowFilterDialog(context, ctr),
|
],
|
||||||
icon: Icon(
|
|
||||||
Icons.filter_list_outlined,
|
|
||||||
size: 18,
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
loadingState is Success
|
||||||
child: CustomScrollView(
|
? SliverPadding(
|
||||||
controller: ctr.scrollController,
|
padding: EdgeInsets.only(
|
||||||
slivers: [
|
left: StyleString.safeSpace,
|
||||||
SliverPadding(
|
right: StyleString.safeSpace,
|
||||||
padding: const EdgeInsets.all(StyleString.safeSpace),
|
bottom: StyleString.safeSpace +
|
||||||
|
MediaQuery.of(context).padding.bottom,
|
||||||
|
),
|
||||||
sliver: SliverGrid(
|
sliver: SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
mainAxisSpacing: StyleString.safeSpace,
|
mainAxisSpacing: StyleString.safeSpace,
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
crossAxisSpacing: StyleString.safeSpace,
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||||
childAspectRatio: StyleString.aspectRatio * 2.4,
|
childAspectRatio: StyleString.aspectRatio * 2.4,
|
||||||
mainAxisExtent: 0),
|
mainAxisExtent: 0,
|
||||||
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(BuildContext context, int index) {
|
(BuildContext context, int index) {
|
||||||
return VideoCardH(
|
return VideoCardH(
|
||||||
videoItem: list[index], showPubdate: true);
|
videoItem: loadingState.response[index],
|
||||||
|
showPubdate: true,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
childCount: list.length,
|
childCount: loadingState.response.length,
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
],
|
)
|
||||||
)),
|
: HttpError(
|
||||||
|
errMsg: loadingState is Error ? loadingState.errMsg : '没有相关数据',
|
||||||
|
fn: ctr.onReload,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user