Merge branch 'fix'
This commit is contained in:
@ -554,4 +554,8 @@ class Api {
|
|||||||
/// 系统通知
|
/// 系统通知
|
||||||
static const String messageSystemAPi =
|
static const String messageSystemAPi =
|
||||||
'${HttpString.messageBaseUrl}/x/sys-msg/query_unified_notify';
|
'${HttpString.messageBaseUrl}/x/sys-msg/query_unified_notify';
|
||||||
|
|
||||||
|
/// 系统通知标记已读
|
||||||
|
static const String systemMarkRead =
|
||||||
|
'${HttpString.messageBaseUrl}/x/sys-msg/update_cursor';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -298,7 +298,6 @@ class MsgHttp {
|
|||||||
});
|
});
|
||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
try {
|
try {
|
||||||
print(res.data['data']['system_notify_list']);
|
|
||||||
return {
|
return {
|
||||||
'status': true,
|
'status': true,
|
||||||
'data': res.data['data']['system_notify_list']
|
'data': res.data['data']['system_notify_list']
|
||||||
@ -312,4 +311,23 @@ class MsgHttp {
|
|||||||
return {'status': false, 'date': [], 'msg': res.data['message']};
|
return {'status': false, 'date': [], 'msg': res.data['message']};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 系统消息标记已读
|
||||||
|
static Future systemMarkRead(int cursor) async {
|
||||||
|
String csrf = await Request.getCsrf();
|
||||||
|
var res = await Request().get(Api.systemMarkRead, data: {
|
||||||
|
'csrf': csrf,
|
||||||
|
'cursor': cursor,
|
||||||
|
});
|
||||||
|
if (res.data['code'] == 0) {
|
||||||
|
return {
|
||||||
|
'status': true,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
'status': false,
|
||||||
|
'msg': res.data['message'],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,8 @@ class MemberSeasonsPanel extends StatelessWidget {
|
|||||||
'seasonName': item.meta!.name!,
|
'seasonName': item.meta!.name!,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (category == 1) {
|
// 2为直播回放
|
||||||
|
if (category == 1 || category == 2) {
|
||||||
parameters = {
|
parameters = {
|
||||||
'category': '1',
|
'category': '1',
|
||||||
'mid': item.meta!.mid.toString(),
|
'mid': item.meta!.mid.toString(),
|
||||||
|
|||||||
@ -8,8 +8,20 @@ class MessageSystemController extends GetxController {
|
|||||||
Future queryMessageSystem({String type = 'init'}) async {
|
Future queryMessageSystem({String type = 'init'}) async {
|
||||||
var res = await MsgHttp.messageSystem();
|
var res = await MsgHttp.messageSystem();
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
systemItems.addAll(res['data']);
|
if (type == 'init') {
|
||||||
|
systemItems.value = res['data'];
|
||||||
|
} else {
|
||||||
|
systemItems.addAll(res['data']);
|
||||||
|
}
|
||||||
|
if (systemItems.isNotEmpty) {
|
||||||
|
systemMarkRead(systemItems.first.cursor!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 标记已读
|
||||||
|
void systemMarkRead(int cursor) async {
|
||||||
|
await MsgHttp.systemMarkRead(cursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
late bool autoPlayEnable;
|
late bool autoPlayEnable;
|
||||||
late bool autoPiP;
|
late bool autoPiP;
|
||||||
late Floating floating;
|
late Floating floating;
|
||||||
bool isShowing = true;
|
RxBool isShowing = true.obs;
|
||||||
// 生命周期监听
|
// 生命周期监听
|
||||||
late final AppLifecycleListener _lifecycleListener;
|
late final AppLifecycleListener _lifecycleListener;
|
||||||
late double statusHeight;
|
late double statusHeight;
|
||||||
@ -183,6 +183,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
plPlayerController!.addStatusLister(playerListener);
|
plPlayerController!.addStatusLister(playerListener);
|
||||||
vdCtr.autoPlay.value = true;
|
vdCtr.autoPlay.value = true;
|
||||||
vdCtr.isShowCover.value = false;
|
vdCtr.isShowCover.value = false;
|
||||||
|
isShowing.value = true;
|
||||||
autoEnterPip(status: PlayerStatus.playing);
|
autoEnterPip(status: PlayerStatus.playing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +259,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
plPlayerController!.pause();
|
plPlayerController!.pause();
|
||||||
vdCtr.clearSubtitleContent();
|
vdCtr.clearSubtitleContent();
|
||||||
}
|
}
|
||||||
setState(() => isShowing = false);
|
isShowing.value = false;
|
||||||
super.didPushNext();
|
super.didPushNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,10 +273,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
|
|
||||||
if (plPlayerController != null &&
|
if (plPlayerController != null &&
|
||||||
plPlayerController!.videoPlayerController != null) {
|
plPlayerController!.videoPlayerController != null) {
|
||||||
setState(() {
|
vdCtr.setSubtitleContent();
|
||||||
vdCtr.setSubtitleContent();
|
isShowing.value = true;
|
||||||
isShowing = true;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
vdCtr.isFirstTime = false;
|
vdCtr.isFirstTime = false;
|
||||||
final bool autoplay = autoPlayEnable;
|
final bool autoplay = autoPlayEnable;
|
||||||
@ -652,7 +651,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
tag: heroTag,
|
tag: heroTag,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (isShowing) buildVideoPlayerPanel(),
|
Obx(
|
||||||
|
() => isShowing.value
|
||||||
|
? buildVideoPlayerPanel()
|
||||||
|
: const SizedBox(),
|
||||||
|
),
|
||||||
|
|
||||||
/// 关闭自动播放时 手动播放
|
/// 关闭自动播放时 手动播放
|
||||||
Obx(
|
Obx(
|
||||||
|
|||||||
Reference in New Issue
Block a user