mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 12:38:34 +00:00
@@ -2,6 +2,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/member.dart';
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/common/member/tab_type.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/data.dart';
|
||||
@@ -255,4 +256,13 @@ class MemberController extends CommonDataController<SpaceData, SpaceData?>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> vipExpAdd() async {
|
||||
var res = await UserHttp.vipExpAdd();
|
||||
if (res['status']) {
|
||||
SmartDialog.showToast('领取成功');
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,22 @@ class _MemberPageState extends State<MemberPage> {
|
||||
),
|
||||
),
|
||||
if (_userController.ownerMid != 0)
|
||||
if (_userController.mid == _userController.ownerMid)
|
||||
if (_userController.mid == _userController.ownerMid) ...[
|
||||
if ((_userController
|
||||
.loadingState.value.data?.card?.vip?.status ??
|
||||
0) >
|
||||
0)
|
||||
PopupMenuItem(
|
||||
onTap: _userController.vipExpAdd,
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.upcoming_outlined, size: 19),
|
||||
SizedBox(width: 10),
|
||||
Text('大会员经验'),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () => Get.toNamed('/spaceSetting'),
|
||||
child: const Row(
|
||||
@@ -147,8 +162,8 @@ class _MemberPageState extends State<MemberPage> {
|
||||
Text('空间设置'),
|
||||
],
|
||||
),
|
||||
)
|
||||
else ...[
|
||||
),
|
||||
] else ...[
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () => showDialog(
|
||||
|
||||
Reference in New Issue
Block a user