Merge branch 'fix' into alpha
This commit is contained in:
@ -46,7 +46,10 @@ class ApiInterceptor extends Interceptor {
|
||||
void onError(DioException err, ErrorInterceptorHandler handler) async {
|
||||
// 处理网络请求错误
|
||||
// handler.next(err);
|
||||
SmartDialog.showToast(await dioError(err));
|
||||
SmartDialog.showToast(
|
||||
await dioError(err),
|
||||
displayType: SmartToastType.onlyRefresh,
|
||||
);
|
||||
super.onError(err, handler);
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,9 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
fontSize: 15 * fontSizeVal,
|
||||
area: showArea,
|
||||
opacity: opacityVal,
|
||||
hideTop: blockTypes.contains(5),
|
||||
hideScroll: blockTypes.contains(2),
|
||||
hideBottom: blockTypes.contains(4),
|
||||
duration: danmakuSpeedVal * widget.playerController.playbackSpeed,
|
||||
),
|
||||
statusChanged: (isPlaying) {},
|
||||
|
@ -14,7 +14,7 @@ class MemberController extends GetxController {
|
||||
late int mid;
|
||||
Rx<MemberInfoModel> memberInfo = MemberInfoModel().obs;
|
||||
Map? userStat;
|
||||
String? face;
|
||||
RxString face = ''.obs;
|
||||
String? heroTag;
|
||||
Box userInfoCache = GStrorage.userInfo;
|
||||
late int ownerMid;
|
||||
@ -30,7 +30,7 @@ class MemberController extends GetxController {
|
||||
mid = int.parse(Get.parameters['mid']!);
|
||||
userInfo = userInfoCache.get('userInfoCache');
|
||||
ownerMid = userInfo != null ? userInfo.mid : -1;
|
||||
face = Get.arguments['face'] ?? '';
|
||||
face.value = Get.arguments['face'] ?? '';
|
||||
heroTag = Get.arguments['heroTag'] ?? '';
|
||||
relationSearch();
|
||||
}
|
||||
@ -41,6 +41,7 @@ class MemberController extends GetxController {
|
||||
var res = await MemberHttp.memberInfo(mid: mid);
|
||||
if (res['status']) {
|
||||
memberInfo.value = res['data'];
|
||||
face.value = res['data'].face;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -118,7 +119,7 @@ class MemberController extends GetxController {
|
||||
? '关注'
|
||||
: attribute.value == 2
|
||||
? '已关注'
|
||||
: attribute.value == 2
|
||||
: attribute.value == 6
|
||||
? '已互粉'
|
||||
: '已拉黑';
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import 'package:pilipala/common/widgets/network_img_layer.dart';
|
||||
import 'package:pilipala/pages/member/archive/view.dart';
|
||||
import 'package:pilipala/pages/member/dynamic/index.dart';
|
||||
import 'package:pilipala/pages/member/index.dart';
|
||||
import 'package:pilipala/utils/utils.dart';
|
||||
|
||||
import 'widgets/profile.dart';
|
||||
|
||||
@ -30,7 +31,8 @@ class _MemberPageState extends State<MemberPage>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
heroTag = Get.arguments['heroTag'];
|
||||
heroTag =
|
||||
Get.arguments['heroTag'] ?? Utils.makeHeroTag(Get.parameters['mid']);
|
||||
_memberController = Get.put(MemberController(), tag: heroTag);
|
||||
_tabController = TabController(length: 3, vsync: this, initialIndex: 2);
|
||||
_futureBuilderFuture = _memberController.getInfo();
|
||||
@ -80,11 +82,13 @@ class _MemberPageState extends State<MemberPage>
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
width: 35,
|
||||
height: 35,
|
||||
type: 'avatar',
|
||||
src: _memberController.face ?? '',
|
||||
Obx(
|
||||
() => NetworkImgLayer(
|
||||
width: 35,
|
||||
height: 35,
|
||||
type: 'avatar',
|
||||
src: _memberController.face.value,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Obx(
|
||||
@ -145,34 +149,38 @@ class _MemberPageState extends State<MemberPage>
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background: Stack(
|
||||
children: [
|
||||
if (_memberController.face != null)
|
||||
Positioned.fill(
|
||||
bottom: 10,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fitWidth,
|
||||
image: NetworkImage(_memberController.face!),
|
||||
alignment: Alignment.topCenter,
|
||||
isAntiAlias: true,
|
||||
),
|
||||
),
|
||||
foregroundDecoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.background
|
||||
.withOpacity(0.44),
|
||||
Theme.of(context).colorScheme.background,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
stops: const [0.0, 0.46],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => _memberController.face.value != ''
|
||||
? Positioned.fill(
|
||||
bottom: 10,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fitWidth,
|
||||
image: NetworkImage(
|
||||
_memberController.face.value),
|
||||
alignment: Alignment.topCenter,
|
||||
isAntiAlias: true,
|
||||
),
|
||||
),
|
||||
foregroundDecoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.background
|
||||
.withOpacity(0.44),
|
||||
Theme.of(context).colorScheme.background,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
stops: const [0.0, 0.46],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
|
@ -22,7 +22,7 @@ Widget profile(ctr, {loadingStatus = false}) {
|
||||
width: 90,
|
||||
height: 90,
|
||||
type: 'avatar',
|
||||
src: !loadingStatus ? memberInfo.face : ctr.face,
|
||||
src: !loadingStatus ? memberInfo.face : ctr.face.value,
|
||||
),
|
||||
if (!loadingStatus &&
|
||||
memberInfo.liveRoom != null &&
|
||||
|
@ -105,7 +105,7 @@ class SSearchController extends GetxController {
|
||||
Future querySearchSuggest(String value) async {
|
||||
var result = await SearchHttp.searchSuggest(term: value);
|
||||
if (result['status']) {
|
||||
if (result['data'].isNotEmpty) {
|
||||
if (result['data'] is SearchSuggestModel) {
|
||||
searchSuggestList.value = result['data'].tag;
|
||||
}
|
||||
}
|
||||
|
@ -510,6 +510,7 @@ class PlPlayerController {
|
||||
position = Duration.zero;
|
||||
}
|
||||
_position.value = position;
|
||||
_heartDuration = position.inSeconds;
|
||||
if (duration.value.inSeconds != 0) {
|
||||
if (type != 'slider') {
|
||||
/// 拖动进度条调节时,不等待第一帧,防止抖动
|
||||
@ -878,7 +879,7 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
// 记录播放记录
|
||||
Future makeHeartBeat(progress, {type = 'playing'}) async {
|
||||
Future makeHeartBeat(int progress, {type = 'playing'}) async {
|
||||
if (!_enableHeart) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user