关注首页调试
This commit is contained in:
parent
078cf90efe
commit
a78acc0f5c
@ -91,7 +91,7 @@ class _LoginState extends State<Login> {
|
||||
Storage.write('userId', userId);
|
||||
Storage.write('token', obj['access_token']);
|
||||
// 获取用户账户信息
|
||||
final accountRes = await Http.get('${CommonApi.accountInfo}/$userId');
|
||||
final accountRes = await Http.get('${CommonApi.accountInfo}');
|
||||
logger.i(accountRes);
|
||||
// 刷新短视频列表
|
||||
final videoController = Get.find<VideoModuleController>();
|
||||
|
@ -521,7 +521,7 @@ class MyPageState extends State<Vloger> with SingleTickerProviderStateMixin {
|
||||
/// 关注按钮
|
||||
Widget _buildFoucsButton(BuildContext context) {
|
||||
// final vlogerId = '1943510443312078850'; // 18832510385,后面改回博主的id
|
||||
final vlogerId = args['vlogerId'];
|
||||
final vlogerId = args['memberId'];
|
||||
|
||||
return AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
|
@ -4,6 +4,7 @@ library;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../IM/im_core.dart';
|
||||
import '../../behavior/custom_scroll_behavior.dart';
|
||||
import '../../components/keepalive_wrapper.dart';
|
||||
import '../../controller/video_module_controller.dart';
|
||||
@ -13,7 +14,7 @@ import './module/recommend.dart';
|
||||
// import './module/buying.dart';
|
||||
// import './module/drama.dart';
|
||||
// import './module/live.dart';
|
||||
import 'module/friend.dart';
|
||||
import './module/friend.dart';
|
||||
// 引入tab内容模块
|
||||
// import './module/subscribe.dart';
|
||||
|
||||
@ -137,18 +138,19 @@ class _VideoPageState extends State<VideoPage> with SingleTickerProviderStateMix
|
||||
child: PageView(
|
||||
controller: pageController,
|
||||
onPageChanged: (index) {
|
||||
logger.i('$index');
|
||||
// 根据当前 tab 控制对应播放器播放,其它暂停
|
||||
if (index == 0) {
|
||||
// AttentionModule.playVideo();
|
||||
// FriendModule.pauseVideo();
|
||||
AttentionModule.playVideo();
|
||||
// FriendModule.pauseVideo();
|
||||
RecommendModule.pauseVideo();
|
||||
} else if (index == 1) {
|
||||
// AttentionModule.pauseVideo();
|
||||
// FriendModule.playVideo();
|
||||
AttentionModule.pauseVideo();
|
||||
// FriendModule.playVideo();
|
||||
RecommendModule.pauseVideo();
|
||||
} else if (index == 2) {
|
||||
// AttentionModule.pauseVideo();
|
||||
// FriendModule.pauseVideo();
|
||||
AttentionModule.pauseVideo();
|
||||
// FriendModule.pauseVideo();
|
||||
RecommendModule.playVideo();
|
||||
}
|
||||
videoModuleController.updateVideoTabIndex(index);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -185,14 +185,14 @@ class _RecommendModuleState extends State<RecommendModule> {
|
||||
'size': pageSize,
|
||||
});
|
||||
final data = res['data'];
|
||||
|
||||
logger.d('关注用户的视频列表:$data');
|
||||
if (data == null || (data is List && data.isEmpty)) {
|
||||
// MyDialog.toast('没有更多了', icon: Icon(Icons.warning), style: ToastStyle(backgroundColor: Colors.red.withAlpha(200)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (data['rows'] is List) {
|
||||
List videos = data['rows'];
|
||||
if (data['records'] is List) {
|
||||
List videos = data['records'];
|
||||
for (var item in videos) {
|
||||
// print("喜欢:${item['likeCounts']}");
|
||||
// print("评论:${item['commentsCounts']}");
|
||||
|
@ -44,7 +44,7 @@ class UpgradeDialog extends StatelessWidget {
|
||||
onPressed: onConfirm,
|
||||
child: Text("立即更新"),
|
||||
),
|
||||
if (!force)
|
||||
if (force)
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text("暂不更新"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user