mod: 个人中心注释

This commit is contained in:
guozhigq
2023-09-10 14:42:14 +08:00
parent e3c9e8c13b
commit 3665d6a0f6
4 changed files with 181 additions and 257 deletions

View File

@ -179,59 +179,59 @@ class _MemberPageState extends State<MemberPage>
fontWeight:
FontWeight.bold),
)),
const SizedBox(width: 2),
if (_memberController
.memberInfo.value.sex ==
'')
const Icon(
FontAwesomeIcons.venus,
size: 14,
color: Colors.pink,
),
if (_memberController
.memberInfo.value.sex ==
'')
const Icon(
FontAwesomeIcons.mars,
size: 14,
color: Colors.blue,
),
const SizedBox(width: 4),
Image.asset(
'assets/images/lv/lv${_memberController.memberInfo.value.level}.png',
height: 11,
),
const SizedBox(width: 6),
if (_memberController.memberInfo
.value.vip!.status ==
1 &&
_memberController.memberInfo
.value.vip!.label![
'img_label_uri_hans'] !=
'') ...[
Image.network(
_memberController.memberInfo
.value.vip!.label![
'img_label_uri_hans'],
height: 20,
),
] else if (_memberController
.memberInfo
.value
.vip!
.status ==
1 &&
_memberController.memberInfo
.value.vip!.label![
'img_label_uri_hans_static'] !=
'') ...[
Image.network(
_memberController.memberInfo
.value.vip!.label![
'img_label_uri_hans_static'],
height: 20,
),
]
// const SizedBox(width: 2),
// if (_memberController
// .memberInfo.value.sex ==
// '女')
// const Icon(
// FontAwesomeIcons.venus,
// size: 14,
// color: Colors.pink,
// ),
// if (_memberController
// .memberInfo.value.sex ==
// '男')
// const Icon(
// FontAwesomeIcons.mars,
// size: 14,
// color: Colors.blue,
// ),
// const SizedBox(width: 4),
// Image.asset(
// 'assets/images/lv/lv${_memberController.memberInfo.value.level}.png',
// height: 11,
// ),
// const SizedBox(width: 6),
// if (_memberController.memberInfo
// .value.vip!.status ==
// 1 &&
// _memberController.memberInfo
// .value.vip!.label![
// 'img_label_uri_hans'] !=
// '') ...[
// Image.network(
// _memberController.memberInfo
// .value.vip!.label![
// 'img_label_uri_hans'],
// height: 20,
// ),
// ] else if (_memberController
// .memberInfo
// .value
// .vip!
// .status ==
// 1 &&
// _memberController.memberInfo
// .value.vip!.label![
// 'img_label_uri_hans_static'] !=
// '') ...[
// Image.network(
// _memberController.memberInfo
// .value.vip!.label![
// 'img_label_uri_hans_static'],
// height: 20,
// ),
// ]
],
),
if (_memberController.memberInfo.value

View File

@ -76,79 +76,79 @@ Widget profile(ctr, {loadingStatus = false}) {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.only(left: 10, right: 10),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
InkWell(
onTap: () {
Get.toNamed(
'/follow?mid=${memberInfo.mid}&name=${memberInfo.name}');
},
child: Column(
children: [
Text(
!loadingStatus
? ctr.userStat!['following'].toString()
: '-',
style: const TextStyle(
fontWeight: FontWeight.bold),
),
Text(
'关注',
style: TextStyle(
fontSize: Theme.of(context)
.textTheme
.labelMedium!
.fontSize),
)
],
),
),
InkWell(
onTap: () {
Get.toNamed(
'/fan?mid=${memberInfo.mid}&name=${memberInfo.name}');
},
child: Column(
children: [
Text(
!loadingStatus
? Utils.numFormat(
ctr.userStat!['follower'],
)
: '-',
style: const TextStyle(
fontWeight: FontWeight.bold)),
Text('粉丝',
style: TextStyle(
fontSize: Theme.of(context)
.textTheme
.labelMedium!
.fontSize))
],
),
),
Column(
children: [
const Text('-',
style: TextStyle(fontWeight: FontWeight.bold)),
Text(
'获赞',
style: TextStyle(
fontSize: Theme.of(context)
.textTheme
.labelMedium!
.fontSize),
)
],
),
],
),
),
const SizedBox(height: 10),
// Padding(
// padding: const EdgeInsets.only(left: 10, right: 10),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: [
// InkWell(
// onTap: () {
// Get.toNamed(
// '/follow?mid=${memberInfo.mid}&name=${memberInfo.name}');
// },
// child: Column(
// children: [
// Text(
// !loadingStatus
// ? ctr.userStat!['following'].toString()
// : '-',
// style: const TextStyle(
// fontWeight: FontWeight.bold),
// ),
// Text(
// '关注',
// style: TextStyle(
// fontSize: Theme.of(context)
// .textTheme
// .labelMedium!
// .fontSize),
// )
// ],
// ),
// ),
// InkWell(
// onTap: () {
// Get.toNamed(
// '/fan?mid=${memberInfo.mid}&name=${memberInfo.name}');
// },
// child: Column(
// children: [
// Text(
// !loadingStatus
// ? Utils.numFormat(
// ctr.userStat!['follower'],
// )
// : '-',
// style: const TextStyle(
// fontWeight: FontWeight.bold)),
// Text('粉丝',
// style: TextStyle(
// fontSize: Theme.of(context)
// .textTheme
// .labelMedium!
// .fontSize))
// ],
// ),
// ),
// Column(
// children: [
// const Text('-',
// style: TextStyle(fontWeight: FontWeight.bold)),
// Text(
// '获赞',
// style: TextStyle(
// fontSize: Theme.of(context)
// .textTheme
// .labelMedium!
// .fontSize),
// )
// ],
// ),
// ],
// ),
// ),
// const SizedBox(height: 10),
if (ctr.ownerMid != ctr.mid) ...[
Row(
children: [

View File

@ -138,85 +138,9 @@ class _MinePageState extends State<MinePage> {
_mineController.userInfo.value.uname ?? '点击头像登录',
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(width: 4),
Image.asset(
'assets/images/lv/lv${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}.png',
height: 10,
),
],
),
const SizedBox(height: 5),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text.rich(TextSpan(children: [
TextSpan(
text: '硬币: ',
style:
TextStyle(color: Theme.of(context).colorScheme.outline)),
TextSpan(
text: (_mineController.userInfo.value.money ?? 'pilipala')
.toString(),
style:
TextStyle(color: Theme.of(context).colorScheme.primary)),
]))
],
),
const SizedBox(height: 25),
if (_mineController.userInfo.value.levelInfo != null) ...[
LayoutBuilder(
builder: (context, BoxConstraints box) {
LevelInfo levelInfo = _mineController.userInfo.value.levelInfo;
return SizedBox(
width: box.maxWidth,
height: 24,
child: Stack(
children: [
Positioned(
top: 0,
right: 0,
bottom: 0,
child: Container(
color: Theme.of(context).colorScheme.primary,
height: 24,
constraints:
const BoxConstraints(minWidth: 100), // 设置最小宽度为100
width: box.maxWidth *
(1 - (levelInfo.currentExp! / levelInfo.nextExp!)),
child: Center(
child: Text(
'${levelInfo.currentExp!}/${levelInfo.nextExp!}',
style: TextStyle(
color: Theme.of(context).colorScheme.onPrimary,
fontSize: 12,
),
),
),
),
),
Positioned(
top: 23,
left: 0,
bottom: 0,
child: Container(
width: box.maxWidth *
(_mineController
.userInfo.value.levelInfo!.currentExp! /
_mineController
.userInfo.value.levelInfo!.nextExp!),
height: 1,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
),
),
),
],
),
);
},
),
],
const SizedBox(height: 30),
Padding(
padding: const EdgeInsets.only(left: 12, right: 12),
child: LayoutBuilder(

View File

@ -324,15 +324,15 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
// ),
// const SizedBox(height: 7),
// 点赞收藏转发 布局样式1
// SingleChildScrollView(
// padding: const EdgeInsets.only(top: 7, bottom: 7),
// scrollDirection: Axis.horizontal,
// child: actionRow(
// context,
// videoIntroController,
// videoDetailCtr,
// ),
// ),
SingleChildScrollView(
padding: const EdgeInsets.only(top: 7, bottom: 7),
scrollDirection: Axis.horizontal,
child: actionRow(
context,
videoIntroController,
videoDetailCtr,
),
),
// 点赞收藏转发 布局样式2
// actionGrid(context, videoIntroController),
// 合集
@ -516,52 +516,52 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
Widget actionRow(BuildContext context, videoIntroController, videoDetailCtr) {
return Row(children: [
Obx(
() => ActionRowItem(
icon: const Icon(FontAwesomeIcons.thumbsUp),
onTap: () => videoIntroController.actionLikeVideo(),
selectStatus: videoIntroController.hasLike.value,
loadingStatus: loadingStatus,
text:
!loadingStatus ? widget.videoDetail!.stat!.like!.toString() : '-',
),
),
const SizedBox(width: 8),
Obx(
() => ActionRowItem(
icon: const Icon(FontAwesomeIcons.b),
onTap: () => videoIntroController.actionCoinVideo(),
selectStatus: videoIntroController.hasCoin.value,
loadingStatus: loadingStatus,
text:
!loadingStatus ? widget.videoDetail!.stat!.coin!.toString() : '-',
),
),
const SizedBox(width: 8),
Obx(
() => ActionRowItem(
icon: const Icon(FontAwesomeIcons.heart),
onTap: () => showFavBottomSheet(),
onLongPress: () => showFavBottomSheet(type: 'longPress'),
selectStatus: videoIntroController.hasFav.value,
loadingStatus: loadingStatus,
text: !loadingStatus
? widget.videoDetail!.stat!.favorite!.toString()
: '-',
),
),
const SizedBox(width: 8),
ActionRowItem(
icon: const Icon(FontAwesomeIcons.comment),
onTap: () {
videoDetailCtr.tabCtr.animateTo(1);
},
selectStatus: false,
loadingStatus: loadingStatus,
text:
!loadingStatus ? widget.videoDetail!.stat!.reply!.toString() : '-',
),
const SizedBox(width: 8),
// Obx(
// () => ActionRowItem(
// icon: const Icon(FontAwesomeIcons.thumbsUp),
// onTap: () => videoIntroController.actionLikeVideo(),
// selectStatus: videoIntroController.hasLike.value,
// loadingStatus: loadingStatus,
// text:
// !loadingStatus ? widget.videoDetail!.stat!.like!.toString() : '-',
// ),
// ),
// const SizedBox(width: 8),
// Obx(
// () => ActionRowItem(
// icon: const Icon(FontAwesomeIcons.b),
// onTap: () => videoIntroController.actionCoinVideo(),
// selectStatus: videoIntroController.hasCoin.value,
// loadingStatus: loadingStatus,
// text:
// !loadingStatus ? widget.videoDetail!.stat!.coin!.toString() : '-',
// ),
// ),
// const SizedBox(width: 8),
// Obx(
// () => ActionRowItem(
// icon: const Icon(FontAwesomeIcons.heart),
// onTap: () => showFavBottomSheet(),
// onLongPress: () => showFavBottomSheet(type: 'longPress'),
// selectStatus: videoIntroController.hasFav.value,
// loadingStatus: loadingStatus,
// text: !loadingStatus
// ? widget.videoDetail!.stat!.favorite!.toString()
// : '-',
// ),
// ),
// const SizedBox(width: 8),
// ActionRowItem(
// icon: const Icon(FontAwesomeIcons.comment),
// onTap: () {
// videoDetailCtr.tabCtr.animateTo(1);
// },
// selectStatus: false,
// loadingStatus: loadingStatus,
// text:
// !loadingStatus ? widget.videoDetail!.stat!.reply!.toString() : '-',
// ),
// const SizedBox(width: 8),
ActionRowItem(
icon: const Icon(FontAwesomeIcons.share),
onTap: () => videoIntroController.actionShareVideo(),