fix: liveRoom layout error
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,7 +312,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 消息列表
|
// 消息列表
|
||||||
Obx(
|
Visibility(
|
||||||
|
visible: !isLandscape,
|
||||||
|
child: Obx(
|
||||||
() => Align(
|
() => Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -335,6 +337,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// 消息输入框
|
// 消息输入框
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: isPortrait,
|
visible: isPortrait,
|
||||||
|
|||||||
Reference in New Issue
Block a user