Merge branch 'feature-liveRoomRender'
This commit is contained in:
@ -68,7 +68,7 @@ class Request {
|
|||||||
// 从cookie中获取 csrf token
|
// 从cookie中获取 csrf token
|
||||||
static Future<String> getCsrf() async {
|
static Future<String> getCsrf() async {
|
||||||
List<Cookie> cookies = await cookieManager.cookieJar
|
List<Cookie> cookies = await cookieManager.cookieJar
|
||||||
.loadForRequest(Uri.parse(HttpString.apiBaseUrl));
|
.loadForRequest(Uri.parse(HttpString.baseUrl));
|
||||||
String token = '';
|
String token = '';
|
||||||
if (cookies.where((e) => e.name == 'bili_jct').isNotEmpty) {
|
if (cookies.where((e) => e.name == 'bili_jct').isNotEmpty) {
|
||||||
token = cookies.firstWhere((e) => e.name == 'bili_jct').value;
|
token = cookies.firstWhere((e) => e.name == 'bili_jct').value;
|
||||||
@ -82,9 +82,12 @@ class Request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<Cookie> cookies = await cookieManager.cookieJar
|
final List<Cookie> cookies = await cookieManager.cookieJar
|
||||||
.loadForRequest(Uri.parse(HttpString.baseUrl));
|
.loadForRequest(Uri.parse(HttpString.apiBaseUrl));
|
||||||
buvid = cookies.firstWhere((cookie) => cookie.name == 'buvid3').value;
|
buvid = cookies
|
||||||
if (buvid == null) {
|
.firstWhere((cookie) => cookie.name == 'buvid3',
|
||||||
|
orElse: () => Cookie('buvid3', ''))
|
||||||
|
.value;
|
||||||
|
if (buvid == null || buvid!.isEmpty) {
|
||||||
try {
|
try {
|
||||||
var result = await Request().get(
|
var result = await Request().get(
|
||||||
"${HttpString.apiBaseUrl}/x/frontend/finger/spi",
|
"${HttpString.apiBaseUrl}/x/frontend/finger/spi",
|
||||||
|
|||||||
@ -312,25 +312,28 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 消息列表
|
// 消息列表
|
||||||
Obx(
|
Visibility(
|
||||||
() => Align(
|
visible: !isLandscape,
|
||||||
alignment: Alignment.bottomCenter,
|
child: Obx(
|
||||||
child: Container(
|
() => Align(
|
||||||
margin: EdgeInsets.only(
|
alignment: Alignment.bottomCenter,
|
||||||
bottom: 90 + padding.bottom,
|
child: Container(
|
||||||
),
|
margin: EdgeInsets.only(
|
||||||
height: Get.size.height -
|
bottom: 90 + padding.bottom,
|
||||||
(padding.top +
|
),
|
||||||
kToolbarHeight +
|
height: Get.size.height -
|
||||||
(_liveRoomController.isPortrait.value
|
(padding.top +
|
||||||
? Get.size.width
|
kToolbarHeight +
|
||||||
: Get.size.width * 9 / 16) +
|
(_liveRoomController.isPortrait.value
|
||||||
100 +
|
? Get.size.width
|
||||||
padding.bottom),
|
: Get.size.width * 9 / 16) +
|
||||||
child: buildMessageListUI(
|
100 +
|
||||||
context,
|
padding.bottom),
|
||||||
_liveRoomController,
|
child: buildMessageListUI(
|
||||||
_scrollController,
|
context,
|
||||||
|
_liveRoomController,
|
||||||
|
_scrollController,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user