Merge branch 'fix'
This commit is contained in:
@ -45,10 +45,14 @@ class ApiInterceptor extends Interceptor {
|
|||||||
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
||||||
// 处理网络请求错误
|
// 处理网络请求错误
|
||||||
// handler.next(err);
|
// handler.next(err);
|
||||||
SmartDialog.showToast(
|
String url = err.requestOptions.uri.toString();
|
||||||
await dioError(err),
|
print('🌹🌹ApiInterceptor: $url');
|
||||||
displayType: SmartToastType.onlyRefresh,
|
if (!url.contains('heartBeat')) {
|
||||||
);
|
SmartDialog.showToast(
|
||||||
|
await dioError(err),
|
||||||
|
displayType: SmartToastType.onlyRefresh,
|
||||||
|
);
|
||||||
|
}
|
||||||
super.onError(err, handler);
|
super.onError(err, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,8 +88,10 @@ class HistoryController extends GetxController {
|
|||||||
// 观看历史暂停状态
|
// 观看历史暂停状态
|
||||||
Future historyStatus() async {
|
Future historyStatus() async {
|
||||||
var res = await UserHttp.historyStatus();
|
var res = await UserHttp.historyStatus();
|
||||||
pauseStatus.value = res.data['data'];
|
if (res.data['code'] == 0) {
|
||||||
localCache.put(LocalCacheKey.historyPause, res.data['data']);
|
pauseStatus.value = res.data['data'];
|
||||||
|
localCache.put(LocalCacheKey.historyPause, res.data['data']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空观看历史
|
// 清空观看历史
|
||||||
|
@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:media_kit/media_kit.dart';
|
||||||
import 'package:pilipala/common/widgets/network_img_layer.dart';
|
import 'package:pilipala/common/widgets/network_img_layer.dart';
|
||||||
import 'package:pilipala/models/user/fav_folder.dart';
|
import 'package:pilipala/models/user/fav_folder.dart';
|
||||||
import 'package:pilipala/pages/main/index.dart';
|
import 'package:pilipala/pages/main/index.dart';
|
||||||
@ -102,7 +103,11 @@ class _MediaPageState extends State<MediaPage>
|
|||||||
],
|
],
|
||||||
Obx(() => mediaController.userLogin.value
|
Obx(() => mediaController.userLogin.value
|
||||||
? favFolder(mediaController, context)
|
? favFolder(mediaController, context)
|
||||||
: const SizedBox())
|
: const SizedBox()),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).padding.bottom +
|
||||||
|
kBottomNavigationBarHeight,
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -346,6 +346,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(
|
Obx(
|
||||||
() => Video(
|
() => Video(
|
||||||
|
key: ValueKey(_.videoFit.value),
|
||||||
controller: videoController,
|
controller: videoController,
|
||||||
controls: NoVideoControls,
|
controls: NoVideoControls,
|
||||||
pauseUponEnteringBackgroundMode: !enableBackgroundPlay,
|
pauseUponEnteringBackgroundMode: !enableBackgroundPlay,
|
||||||
|
Reference in New Issue
Block a user