fix: 直播详情页传参
This commit is contained in:
@ -71,6 +71,7 @@ class LiveRoom {
|
|||||||
this.cover,
|
this.cover,
|
||||||
this.roomId,
|
this.roomId,
|
||||||
this.roundStatus,
|
this.roundStatus,
|
||||||
|
this.watchedShow,
|
||||||
});
|
});
|
||||||
|
|
||||||
int? roomStatus;
|
int? roomStatus;
|
||||||
@ -80,6 +81,7 @@ class LiveRoom {
|
|||||||
String? cover;
|
String? cover;
|
||||||
int? roomId;
|
int? roomId;
|
||||||
int? roundStatus;
|
int? roundStatus;
|
||||||
|
Map? watchedShow;
|
||||||
|
|
||||||
LiveRoom.fromJson(Map<String, dynamic> json) {
|
LiveRoom.fromJson(Map<String, dynamic> json) {
|
||||||
roomStatus = json['roomStatus'];
|
roomStatus = json['roomStatus'];
|
||||||
@ -89,5 +91,6 @@ class LiveRoom {
|
|||||||
cover = json['cover'];
|
cover = json['cover'];
|
||||||
roomId = json['roomid'];
|
roomId = json['roomid'];
|
||||||
roundStatus = json['roundStatus'];
|
roundStatus = json['roundStatus'];
|
||||||
|
watchedShow = json['watched_show'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,9 +57,9 @@ class DynamicsController extends GetxController {
|
|||||||
);
|
);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
if (type == 'init') {
|
if (type == 'init') {
|
||||||
dynamicsList!.value = res['data'].items;
|
dynamicsList.value = res['data'].items;
|
||||||
} else {
|
} else {
|
||||||
dynamicsList!.addAll(res['data'].items);
|
dynamicsList.addAll(res['data'].items);
|
||||||
}
|
}
|
||||||
offset = res['data'].offset;
|
offset = res['data'].offset;
|
||||||
page++;
|
page++;
|
||||||
@ -69,7 +69,7 @@ class DynamicsController extends GetxController {
|
|||||||
|
|
||||||
onSelectType(value) async {
|
onSelectType(value) async {
|
||||||
dynamicsType.value = filterTypeList[value - 1]['value'];
|
dynamicsType.value = filterTypeList[value - 1]['value'];
|
||||||
dynamicsList!.value = [DynamicItemModel()];
|
dynamicsList.value = [DynamicItemModel()];
|
||||||
page = 1;
|
page = 1;
|
||||||
initialValue.value = value;
|
initialValue.value = value;
|
||||||
await queryFollowDynamic();
|
await queryFollowDynamic();
|
||||||
@ -128,6 +128,7 @@ class DynamicsController extends GetxController {
|
|||||||
'mid': author.mid,
|
'mid': author.mid,
|
||||||
'face': author.face,
|
'face': author.face,
|
||||||
'roomid': liveRcmd.roomId,
|
'roomid': liveRcmd.roomId,
|
||||||
|
'watched_show': liveRcmd.watchedShow,
|
||||||
});
|
});
|
||||||
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}', arguments: {
|
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}', arguments: {
|
||||||
'liveItem': liveItem,
|
'liveItem': liveItem,
|
||||||
@ -151,7 +152,7 @@ class DynamicsController extends GetxController {
|
|||||||
|
|
||||||
onSelectUp(mid) async {
|
onSelectUp(mid) async {
|
||||||
dynamicsType.value = DynamicsType.values[0];
|
dynamicsType.value = DynamicsType.values[0];
|
||||||
dynamicsList!.value = [DynamicItemModel()];
|
dynamicsList.value = [DynamicItemModel()];
|
||||||
page = 1;
|
page = 1;
|
||||||
queryFollowDynamic();
|
queryFollowDynamic();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -234,7 +234,7 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
Map data = snapshot.data;
|
Map data = snapshot.data;
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
List<DynamicItemModel> list =
|
List<DynamicItemModel> list =
|
||||||
_dynamicsController.dynamicsList!;
|
_dynamicsController.dynamicsList;
|
||||||
return Obx(
|
return Obx(
|
||||||
() => list.length == 1
|
() => list.length == 1
|
||||||
? skeleton()
|
? skeleton()
|
||||||
|
|||||||
@ -70,7 +70,10 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
|||||||
style: const TextStyle(fontSize: 14),
|
style: const TextStyle(fontSize: 14),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
Text(_liveRoomController.liveItem.watchedShow['text_large'],
|
if (_liveRoomController.liveItem.watchedShow != null)
|
||||||
|
Text(
|
||||||
|
_liveRoomController.liveItem.watchedShow['text_large'] ??
|
||||||
|
'',
|
||||||
style: const TextStyle(fontSize: 12)),
|
style: const TextStyle(fontSize: 12)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -303,6 +303,7 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
'uname': memberInfo.name,
|
'uname': memberInfo.name,
|
||||||
'face': memberInfo.face,
|
'face': memberInfo.face,
|
||||||
'roomid': memberInfo.liveRoom.roomId,
|
'roomid': memberInfo.liveRoom.roomId,
|
||||||
|
'watched_show': memberInfo.liveRoom.watchedShow,
|
||||||
});
|
});
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/liveRoom?roomid=${memberInfo.liveRoom.roomId}',
|
'/liveRoom?roomid=${memberInfo.liveRoom.roomId}',
|
||||||
|
|||||||
Reference in New Issue
Block a user