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