mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -50,8 +50,7 @@ class VideoIntroController extends GetxController {
|
||||
Rx<VideoDetailData> videoDetail = VideoDetailData().obs;
|
||||
|
||||
// up主粉丝数
|
||||
Rx<Map<String, dynamic>> userStat =
|
||||
Rx<Map<String, dynamic>>({'follower': '-'});
|
||||
RxMap<String, dynamic> userStat = RxMap<String, dynamic>({'follower': '-'});
|
||||
|
||||
dynamic videoTags;
|
||||
|
||||
@@ -82,8 +81,8 @@ class VideoIntroController extends GetxController {
|
||||
Timer? timer;
|
||||
String heroTag = '';
|
||||
late ModelResult modelResult;
|
||||
Rx<Map<String, dynamic>> queryVideoIntroData =
|
||||
Rx<Map<String, dynamic>>({"status": true});
|
||||
RxMap<String, dynamic> queryVideoIntroData =
|
||||
RxMap<String, dynamic>({"status": true});
|
||||
|
||||
ExpandableController? expandableCtr;
|
||||
|
||||
@@ -181,7 +180,7 @@ class VideoIntroController extends GetxController {
|
||||
SmartDialog.showToast(
|
||||
"${result['code']} ${result['msg']} ${result['data']}");
|
||||
}
|
||||
queryVideoIntroData.value = result;
|
||||
queryVideoIntroData.addAll(result);
|
||||
if (isLogin) {
|
||||
queryAllStatus();
|
||||
queryFollowStatus();
|
||||
@@ -207,10 +206,10 @@ class VideoIntroController extends GetxController {
|
||||
},
|
||||
).then((res) {
|
||||
if (res.data['code'] == 0) {
|
||||
staffRelations.value = {
|
||||
staffRelations.addAll({
|
||||
'status': true,
|
||||
if (res.data['data'] != null) ...res.data['data'],
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -220,7 +219,7 @@ class VideoIntroController extends GetxController {
|
||||
var result =
|
||||
await MemberHttp.memberCardInfo(mid: videoDetail.value.owner!.mid!);
|
||||
if (result['status']) {
|
||||
userStat.value = result['data'];
|
||||
userStat.addAll(result['data']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,7 +348,7 @@ class VideoIntroController extends GetxController {
|
||||
}
|
||||
|
||||
int copyright =
|
||||
(queryVideoIntroData.value['data'] as VideoDetailData?)?.copyright ?? 1;
|
||||
(queryVideoIntroData['data'] as VideoDetailData?)?.copyright ?? 1;
|
||||
if ((copyright != 1 && _coinNum.value >= 1) || _coinNum.value >= 2) {
|
||||
SmartDialog.showToast('达到投币上限啦~');
|
||||
return;
|
||||
|
||||
@@ -298,18 +298,18 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Obx(() => Avatar(
|
||||
avatar: videoIntroController.userStat
|
||||
.value['card']?['face'] ??
|
||||
avatar: videoIntroController
|
||||
.userStat['card']?['face'] ??
|
||||
'',
|
||||
size: 35,
|
||||
badgeSize: 14,
|
||||
isVip: (videoIntroController.userStat
|
||||
.value['card']?['vip']
|
||||
?['status'] ??
|
||||
isVip: (videoIntroController
|
||||
.userStat['card']
|
||||
?['vip']?['status'] ??
|
||||
-1) >
|
||||
0,
|
||||
officialType: videoIntroController
|
||||
.userStat.value['card']
|
||||
.userStat['card']
|
||||
?['official_verify']?['type'],
|
||||
// garbPendantImage: videoIntroController.userStat.value['card']?['pendant']?['image'],
|
||||
)),
|
||||
@@ -320,23 +320,23 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
children: [
|
||||
Obx(
|
||||
() => Text(
|
||||
videoIntroController.userStat
|
||||
.value['card']?['name'] ??
|
||||
videoIntroController
|
||||
.userStat['card']
|
||||
?['name'] ??
|
||||
"",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: (videoIntroController.userStat
|
||||
.value[
|
||||
'card']?['vip']
|
||||
color: (videoIntroController.userStat[
|
||||
'card']
|
||||
?['vip']
|
||||
?['status'] ??
|
||||
-1) >
|
||||
0 &&
|
||||
videoIntroController
|
||||
.userStat
|
||||
.value['card']
|
||||
?[
|
||||
.userStat[
|
||||
'card']?[
|
||||
'vip']?['type'] ==
|
||||
2
|
||||
? context.vipColor
|
||||
@@ -347,7 +347,7 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
const SizedBox(height: 0),
|
||||
Obx(
|
||||
() => Text(
|
||||
'${Utils.numFormat(videoIntroController.userStat.value['follower'])}粉丝 ${videoIntroController.userStat.value['archive_count'] != null ? '${Utils.numFormat(videoIntroController.userStat.value['archive_count'])}视频' : ''}',
|
||||
'${Utils.numFormat(videoIntroController.userStat['follower'])}粉丝 ${videoIntroController.userStat['archive_count'] != null ? '${Utils.numFormat(videoIntroController.userStat['archive_count'])}视频' : ''}',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color:
|
||||
@@ -741,24 +741,23 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() =>
|
||||
videoIntroController.queryVideoIntroData.value["status"]
|
||||
? const SizedBox.shrink()
|
||||
: Center(
|
||||
child: TextButton.icon(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
videoIntroController.queryVideoIntroData
|
||||
.value["status"] = true;
|
||||
videoIntroController.queryVideoIntro();
|
||||
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
||||
videoDetailCtr.isQuerying.not) {
|
||||
videoDetailCtr.queryVideoUrl();
|
||||
}
|
||||
},
|
||||
label: const Text("点此重新加载"),
|
||||
),
|
||||
),
|
||||
() => videoIntroController.queryVideoIntroData["status"]
|
||||
? const SizedBox.shrink()
|
||||
: Center(
|
||||
child: TextButton.icon(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
videoIntroController
|
||||
.queryVideoIntroData["status"] = true;
|
||||
videoIntroController.queryVideoIntro();
|
||||
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
||||
videoDetailCtr.isQuerying.not) {
|
||||
videoDetailCtr.queryVideoUrl();
|
||||
}
|
||||
},
|
||||
label: const Text("点此重新加载"),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 点赞收藏转发 布局样式2
|
||||
if (!isHorizontal) ...[
|
||||
|
||||
Reference in New Issue
Block a user