logo和名称替换

This commit is contained in:
谢宇宁
2026-10-14 11:23:36 +07:00
parent 1cb514cd02
commit c5c04a7967
478 changed files with 8990 additions and 4948 deletions
@@ -1,7 +1,7 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'mine_publish_sub_logic.dart';
class MinePublishLogic extends GetxController {
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/user/wallet_model.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/indicator/custom_tab_indicator.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/hj_model/user/wallet_model.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/indicator/custom_tab_indicator.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import 'package:provider/provider.dart';
import '../../../hj_utils/widget_util.dart';
@@ -26,7 +26,8 @@ class MinePublishPostPage extends StatefulWidget {
}
}
class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerProviderStateMixin {
class _MinePublishPostPageState extends State<MinePublishPostPage>
with TickerProviderStateMixin {
final tabs = ['已发布', '待审核', '未通过'];
WalletModel? get wallet => globalStore.wallet;
late final tabCtr = TabController(length: tabs.length, vsync: this);
@@ -53,7 +54,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
void _setSelectedTabDatas() {
final logic = Get.find<MinePublishLogic>();
if (tabCtr.index == 2) {
logic.dataSource = List<VideoModel>.from(Get.find<MinePublishSubLogic>(tag: '2').dataList ?? []);
logic.dataSource = List<VideoModel>.from(
Get.find<MinePublishSubLogic>(tag: '2').dataList ?? []);
} else {
logic.dataSource = [];
}
@@ -67,7 +69,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
builder: (controller) {
return Scaffold(
appBar: AppBar(
title: Text("创作中心", style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
title: Text("创作中心",
style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
actions: [
Visibility(
visible: tabCtr.index == 2,
@@ -98,7 +101,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
Consumer<GlobalStore>(
builder: (context, store, child) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 18),
margin: EdgeInsets.symmetric(
horizontal: 16, vertical: 18),
padding: EdgeInsets.fromLTRB(0, 14, 0, 22),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
@@ -109,7 +113,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
_buildItem(
'收益余额',
@@ -121,7 +126,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
'累计收益',
'${wallet?.vidIncome ?? '0'}',
'业绩明细',
() => Get.to(RecordsPage(RecordType.income)),
() =>
Get.to(RecordsPage(RecordType.income)),
),
],
),
@@ -167,7 +173,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
alignment: Alignment.center,
child: Text(
controller.isAllChecked ? '取消全选' : '全选',
style: TextStyle(color: Color(0x99FFFFFF), fontSize: 16),
style: TextStyle(
color: Color(0x99FFFFFF), fontSize: 16),
),
),
),
@@ -186,13 +193,19 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
width: 112,
height: 38,
decoration: BoxDecoration(
color: Color(0xFFF52C56).withValues(alpha: controller.isEmptyChecked ? 0.5 : 1),
color: Color(0xFFF52C56).withValues(
alpha: controller.isEmptyChecked ? 0.5 : 1),
borderRadius: BorderRadius.circular(3),
),
alignment: Alignment.center,
child: Text(
'删除(${controller.checkedList.length})',
style: TextStyle(color: Colors.white.withValues(alpha: controller.isEmptyChecked ? 0.5 : 1), fontSize: 16),
style: TextStyle(
color: Colors.white.withValues(
alpha: controller.isEmptyChecked
? 0.5
: 1),
fontSize: 16),
),
),
),
@@ -232,7 +245,8 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
labelColor: Colors.white.withValues(alpha: .9),
labelStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
unselectedLabelColor: Colors.white.withValues(alpha: 0.35),
unselectedLabelStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w400),
unselectedLabelStyle:
const TextStyle(fontSize: 14, fontWeight: FontWeight.w400),
indicator: CustomIndicator(
width: 13,
height: 3,
@@ -242,18 +256,23 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
);
}
_buildItem(String title, String count, String actionTitle, Function() action) {
_buildItem(
String title, String count, String actionTitle, Function() action) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
title,
style: TextStyle(color: Colors.white.withValues(alpha: .7), fontWeight: FontWeight.w500, fontSize: 14),
style: TextStyle(
color: Colors.white.withValues(alpha: .7),
fontWeight: FontWeight.w500,
fontSize: 14),
),
6.sizeBoxH,
Text(
count,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 24),
style: TextStyle(
color: Colors.white, fontWeight: FontWeight.w500, fontSize: 24),
),
6.sizeBoxH,
GestureDetector(
@@ -268,7 +287,10 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
),
child: Text(
actionTitle,
style: const TextStyle(color: Color(0xFF1F2029), fontWeight: FontWeight.w500, fontSize: 12.0),
style: const TextStyle(
color: Color(0xFF1F2029),
fontWeight: FontWeight.w500,
fontSize: 12.0),
),
),
),
@@ -280,7 +302,9 @@ class _MinePublishPostPageState extends State<MinePublishPostPage> with TickerPr
Widget _buildContent() {
return TabBarView(
controller: tabCtr,
physics: inEdit && tabCtr.index == 2 ? const NeverScrollableScrollPhysics() : null,
physics: inEdit && tabCtr.index == 2
? const NeverScrollableScrollPhysics()
: null,
children: [
MinePublishSubPage(status: 1, inEdit: false).keepAlive,
MinePublishSubPage(status: 0, inEdit: false).keepAlive,
@@ -1,6 +1,6 @@
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/base_list_controller.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/base_list_controller.dart';
class MinePublishSubLogic extends ListBaseLogic<VideoModel> {
final int status;
@@ -13,7 +13,8 @@ class MinePublishSubLogic extends ListBaseLogic<VideoModel> {
loadData();
}
void loadData({bool isRefresh = true}) => fetchData(isRefresh: isRefresh, fetch: _fetch);
void loadData({bool isRefresh = true}) =>
fetchData(isRefresh: isRefresh, fetch: _fetch);
Future<(List<VideoModel>?, bool)> _fetch(int page) async {
final res = await MineService.fetchPublishes(page: page, status: status);
@@ -1,20 +1,22 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import '../../community/widget/community_post_widget.dart';
import 'mine_publish_main_logic.dart';
import 'mine_publish_sub_logic.dart';
typedef OnItemCheckCallback = void Function(VideoModel videoModel, bool isChecked);
typedef OnItemCheckCallback = void Function(
VideoModel videoModel, bool isChecked);
class MinePublishSubPage extends StatelessWidget {
final int status;
final bool inEdit;
final OnItemCheckCallback? onItemCheck;
const MinePublishSubPage({super.key, this.status = 0, this.inEdit = false, this.onItemCheck});
const MinePublishSubPage(
{super.key, this.status = 0, this.inEdit = false, this.onItemCheck});
@override
Widget build(BuildContext context) {