细节修改
This commit is contained in:
parent
81e386b038
commit
bda045eb9e
@ -314,7 +314,7 @@ class _IndexPageState extends State<IndexPage> with SingleTickerProviderStateMix
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Image.asset('assets/images/empty.png', width: 100),
|
Image.asset('assets/images/empty.png', width: 50, height: 50),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
|
@ -6,6 +6,8 @@ import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
|||||||
import 'package:loopin/IM/controller/im_user_info_controller.dart';
|
import 'package:loopin/IM/controller/im_user_info_controller.dart';
|
||||||
import 'package:loopin/IM/im_service.dart';
|
import 'package:loopin/IM/im_service.dart';
|
||||||
import 'package:loopin/api/video_api.dart';
|
import 'package:loopin/api/video_api.dart';
|
||||||
|
import 'package:loopin/api/common_api.dart';
|
||||||
|
import 'package:loopin/utils/index.dart';
|
||||||
import 'package:loopin/components/custom_sticky_header.dart';
|
import 'package:loopin/components/custom_sticky_header.dart';
|
||||||
import 'package:loopin/components/my_confirm.dart';
|
import 'package:loopin/components/my_confirm.dart';
|
||||||
import 'package:loopin/components/network_or_asset_image.dart';
|
import 'package:loopin/components/network_or_asset_image.dart';
|
||||||
@ -81,6 +83,7 @@ class MyPageState extends State<MyPage> with SingleTickerProviderStateMixin {
|
|||||||
|
|
||||||
late Callback tabListener;
|
late Callback tabListener;
|
||||||
late Callback scrollListener;
|
late Callback scrollListener;
|
||||||
|
late int vlogLikeCount = 0; // 点赞数量
|
||||||
|
|
||||||
RxBool isPinned = false.obs; // 是否吸顶
|
RxBool isPinned = false.obs; // 是否吸顶
|
||||||
|
|
||||||
@ -114,7 +117,7 @@ class MyPageState extends State<MyPage> with SingleTickerProviderStateMixin {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
tabController.addListener(tabListener);
|
tabController.addListener(tabListener);
|
||||||
|
getUserLikesCount();
|
||||||
// loadData(0);
|
// loadData(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +131,19 @@ class MyPageState extends State<MyPage> with SingleTickerProviderStateMixin {
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取用户的所有视频的点赞数量
|
||||||
|
void getUserLikesCount() async {
|
||||||
|
try {
|
||||||
|
final resData = await Http.get(CommonApi.accountInfo);
|
||||||
|
if(resData != null && resData['code'] == 200){
|
||||||
|
vlogLikeCount = resData['data']['vlogLikeCount']??0;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 添加控制子列表滚动的方法
|
// 添加控制子列表滚动的方法
|
||||||
void scrollInnerList([double? offset]) async {
|
void scrollInnerList([double? offset]) async {
|
||||||
if (isPinned.value) {
|
if (isPinned.value) {
|
||||||
@ -802,7 +818,8 @@ class MyPageState extends State<MyPage> with SingleTickerProviderStateMixin {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Column(children: [Text('9999', style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), SizedBox(height: 3.0), Text('获赞')]),
|
// '已售${Utils.graceNumber(int.tryParse(vlogLikeCount?.toString() ?? '0') ?? 0)}',
|
||||||
|
Column(children: [Text('${Utils.graceNumber(vlogLikeCount)}', style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), SizedBox(height: 3.0), Text('获赞')]),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// 互相关注
|
// 互相关注
|
||||||
|
@ -3,11 +3,13 @@ library;
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:loopin/utils/common.dart';
|
||||||
|
|
||||||
import '../../IM/im_core.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';
|
||||||
|
|
||||||
import './module/attention.dart';
|
import './module/attention.dart';
|
||||||
// import './module/browse.dart';
|
// import './module/browse.dart';
|
||||||
// import './module/buying.dart';
|
// import './module/buying.dart';
|
||||||
@ -114,6 +116,11 @@ class _VideoPageState extends State<VideoPage> with SingleTickerProviderStateMix
|
|||||||
labelPadding: const EdgeInsets.symmetric(horizontal: 10.0),
|
labelPadding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
indicatorPadding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 4.0),
|
indicatorPadding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 4.0),
|
||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
|
// 除了第二个推荐tab,其他tab都校验登录状态
|
||||||
|
if (!Common.isLogin() && index != 2) {
|
||||||
|
Get.toNamed('/login');
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 同步索引
|
// 同步索引
|
||||||
videoModuleController.updateVideoTabIndex(index);
|
videoModuleController.updateVideoTabIndex(index);
|
||||||
pageController.jumpToPage(index);
|
pageController.jumpToPage(index);
|
||||||
|
@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:loopin/utils/common.dart';
|
||||||
import 'package:loopin/IM/controller/chat_controller.dart';
|
import 'package:loopin/IM/controller/chat_controller.dart';
|
||||||
import 'package:loopin/IM/controller/im_user_info_controller.dart';
|
import 'package:loopin/IM/controller/im_user_info_controller.dart';
|
||||||
import 'package:loopin/IM/im_core.dart';
|
import 'package:loopin/IM/im_core.dart';
|
||||||
@ -1170,6 +1171,10 @@ class _RecommendModuleState extends State<RecommendModule> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
if (!Common.isLogin()) {
|
||||||
|
Get.toNamed('/login');
|
||||||
|
return;
|
||||||
|
}
|
||||||
final vlogerId = videoList[index]['memberId'];
|
final vlogerId = videoList[index]['memberId'];
|
||||||
final doIFollowVloger = videoList[index]['doIFollowVloger'];
|
final doIFollowVloger = videoList[index]['doIFollowVloger'];
|
||||||
// 未关注点击才去关注
|
// 未关注点击才去关注
|
||||||
@ -1203,6 +1208,10 @@ class _RecommendModuleState extends State<RecommendModule> {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logger.d('点击了点赞按钮${videoList[index]['doILikeThisVlog']}');
|
logger.d('点击了点赞按钮${videoList[index]['doILikeThisVlog']}');
|
||||||
|
if (!Common.isLogin()) {
|
||||||
|
Get.toNamed('/login');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (videoList[index]['doILikeThisVlog'] == true) {
|
if (videoList[index]['doILikeThisVlog'] == true) {
|
||||||
logger.d('点击了点赞按钮${videoList[index]['doILikeThisVlog']}');
|
logger.d('点击了点赞按钮${videoList[index]['doILikeThisVlog']}');
|
||||||
doUnLikeVideo(videoList[index]);
|
doUnLikeVideo(videoList[index]);
|
||||||
@ -1227,6 +1236,10 @@ class _RecommendModuleState extends State<RecommendModule> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (!Common.isLogin()) {
|
||||||
|
Get.toNamed('/login');
|
||||||
|
return;
|
||||||
|
}
|
||||||
handleComment(index);
|
handleComment(index);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -1242,6 +1255,10 @@ class _RecommendModuleState extends State<RecommendModule> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (!Common.isLogin()) {
|
||||||
|
Get.toNamed('/login');
|
||||||
|
return;
|
||||||
|
}
|
||||||
handleShare(index);
|
handleShare(index);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user