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,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/indicator/custom_tab_indicator.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/tools_base/indicator/custom_tab_indicator.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import '../../../hj_utils/widget_util.dart';
import 'col_his_buy_logic.dart';
@@ -29,7 +29,8 @@ class ColHisBuyPage extends StatelessWidget {
const ColHisBuyPage(this.type, {super.key});
static Future<T?>? to<T>(PageType type) => Get.to(() => ColHisBuyPage(type), routeName: type.route);
static Future<T?>? to<T>(PageType type) =>
Get.to(() => ColHisBuyPage(type), routeName: type.route);
@override
Widget build(BuildContext context) {
@@ -48,7 +49,10 @@ class ColHisBuyPage extends StatelessWidget {
padding: EdgeInsets.only(right: 16),
child: Text(
logic.isEdit ? '完成' : '编辑',
style: textStyle(14, logic.isEdit ? Color(0xFFFFC000) : Color(0xff666666), FontWeight.w400),
style: textStyle(
14,
logic.isEdit ? Color(0xFFFFC000) : Color(0xff666666),
FontWeight.w400),
),
),
),
@@ -69,7 +73,8 @@ class ColHisBuyPage extends StatelessWidget {
isGradient: true,
),
indicatorWeight: 1,
unselectedLabelStyle: TextStyle(color: Color(0xffcccccc), fontSize: 14, height: 1),
unselectedLabelStyle: TextStyle(
color: Color(0xffcccccc), fontSize: 14, height: 1),
labelStyle: TextStyle(
color: Colors.white,
fontSize: 14,
@@ -80,7 +85,8 @@ class ColHisBuyPage extends StatelessWidget {
tabs: logic.tabs
.map(
(e) => Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h),
padding: EdgeInsets.symmetric(
horizontal: 12.w, vertical: 8.h),
child: Text(e.title),
),
)
@@ -93,7 +99,9 @@ class ColHisBuyPage extends StatelessWidget {
child: TabBarView(
controller: logic.tabCtr,
children: logic.tabs
.map((e) => ColHisBuySubPage(e, pageType: type, isEdit: logic.isEdit).keepAlive)
.map((e) => ColHisBuySubPage(e,
pageType: type, isEdit: logic.isEdit)
.keepAlive)
.toList(),
),
)
@@ -1,17 +1,17 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/cartoon_media_info.dart';
import 'package:hgmj/hj_model/drama_media_info.dart';
import 'package:hgmj/hj_model/list_base_model.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/acg_service.dart';
import 'package:hgmj/hj_utils/api_service/common_service.dart';
import 'package:hgmj/hj_utils/api_service/drama_service.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/history_util.dart';
import 'package:hgmj/tools_base/base_list_controller.dart';
import 'package:hgmj/tools_base/cache/history/drama_resume_store.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:wydj/hj_model/cartoon_media_info.dart';
import 'package:wydj/hj_model/drama_media_info.dart';
import 'package:wydj/hj_model/list_base_model.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/acg_service.dart';
import 'package:wydj/hj_utils/api_service/common_service.dart';
import 'package:wydj/hj_utils/api_service/drama_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/history_util.dart';
import 'package:wydj/tools_base/base_list_controller.dart';
import 'package:wydj/tools_base/cache/history/drama_resume_store.dart';
import 'package:wydj/tools_base/debug_log.dart';
import '../../cartoon/acg_widget_item.dart';
import '../../community/widget/community_post_widget.dart';
@@ -28,7 +28,8 @@ ColHisBuySubLogic instanceLogic(PageType pageType, LoadDataType loadType) {
if (loadType == LoadDataType.drama) return DramaLogic(loadType, pageType);
return switch (pageType) {
PageType.collect => CollectLogic(loadType),
PageType.buy => loadType.isAcg ? BuyAcgLogic(loadType) : BuyVideoLogic(loadType),
PageType.buy =>
loadType.isAcg ? BuyAcgLogic(loadType) : BuyVideoLogic(loadType),
PageType.history => HistoryLogic(loadType),
PageType.like => LikeLogic(loadType),
};
@@ -46,7 +47,8 @@ abstract class ColHisBuySubLogic extends ListBaseLogic {
loadData();
}
void loadData({bool isRefresh = true}) => fetchData(isRefresh: isRefresh, fetch: fetch);
void loadData({bool isRefresh = true}) =>
fetchData(isRefresh: isRefresh, fetch: fetch);
/// 返回 (本页数据, 是否还有下一页),页码由基类算好传进来
Future<(List?, bool)> fetch(int page);
@@ -60,14 +62,27 @@ abstract class ColHisBuySubLogic extends ListBaseLogic {
Widget itemAt(int index) {
final model = dataList![index];
return switch (loadType) {
LoadDataType.video => VideoSimpleCell(videoModel: model, isShowBottom: true,),
LoadDataType.game => VideoSimpleCell(videoModel: model, isFromHY: true, textLines: 1),
LoadDataType.short =>
TiktokSimpleCell(videoModel: model, textLines: 1, isShowBottom: true, isShowTime: true),
LoadDataType.video => VideoSimpleCell(
videoModel: model,
isShowBottom: true,
),
LoadDataType.game =>
VideoSimpleCell(videoModel: model, isFromHY: true, textLines: 1),
LoadDataType.short => TiktokSimpleCell(
videoModel: model,
textLines: 1,
isShowBottom: true,
isShowTime: true),
LoadDataType.pictures => PicSimpleCell(videoModel: model, textLines: 1),
LoadDataType.post => CommunityPostWidget(videoModel: model, tagsColor: this is LikeLogic ? Color(0xFFFFC000) : null,),
LoadDataType.post => CommunityPostWidget(
videoModel: model,
tagsColor: this is LikeLogic ? Color(0xFFFFC000) : null,
),
LoadDataType.collections => SimpleCollectionsItem(model),
LoadDataType.comics || LoadDataType.cartoon || LoadDataType.novel => AcgItemWidget(info: model),
LoadDataType.comics ||
LoadDataType.cartoon ||
LoadDataType.novel =>
AcgItemWidget(info: model),
//短剧卡片右下角挂集数状态,点进去续播
LoadDataType.drama => VideoSimpleCell(
videoModel: model,
@@ -103,10 +118,15 @@ class DramaLogic extends ColHisBuySubLogic {
Future<(List?, bool)> fetch(int page) async {
//历史记录只在本地:播放时写进 dramaResume 那张表,按最后观看时间倒序
final list = pageType == PageType.history
? (await dramaResume.history(page: page, pageSize: _pageSize)).map((e) => e.drama!).toList()
? (await dramaResume.history(page: page, pageSize: _pageSize))
.map((e) => e.drama!)
.toList()
: (await _api(page))?.list ?? [];
//本地和接口都不看 hasNext,满页就当还有
return (list.map((e) => e.toVideoModel(null)).toList(), list.length >= _pageSize);
return (
list.map((e) => e.toVideoModel(null)).toList(),
list.length >= _pageSize
);
}
Future<ListBaseModel<DramaMediaInfo>?> _api(int page) => switch (pageType) {
@@ -145,8 +165,10 @@ class HistoryLogic extends ColHisBuySubLogic {
@override
Future<(List?, bool)> fetch(int page) async {
final List list = loadType.isAcg
? await HistoryUtil.fetch<CartoonMediaInfo>(loadType.historyType, page: page, pageSize: _pageSize)
: await HistoryUtil.fetch<VideoModel>(loadType.historyType, page: page, pageSize: _pageSize);
? await HistoryUtil.fetch<CartoonMediaInfo>(loadType.historyType,
page: page, pageSize: _pageSize)
: await HistoryUtil.fetch<VideoModel>(loadType.historyType,
page: page, pageSize: _pageSize);
//满页说明还有更多,不满即到底
return (list, list.length >= _pageSize);
}
@@ -170,7 +192,8 @@ class BuyAcgLogic extends ColHisBuySubLogic {
@override
Future<(List?, bool)> fetch(int page) async {
final res = await ACGService.fetchAcgBuyData<CartoonMediaInfo>(page, 12, mediaType: loadType.apiType);
final res = await ACGService.fetchAcgBuyData<CartoonMediaInfo>(page, 12,
mediaType: loadType.apiType);
return (res?.list, res?.hasNext ?? false);
}
}
@@ -181,7 +204,8 @@ class BuyVideoLogic extends ColHisBuySubLogic {
@override
Future<(List?, bool)> fetch(int page) async {
final res = await MineService.fetchBuyVideo(newsType: loadType.apiType, page: page, size: 12);
final res = await MineService.fetchBuyVideo(
newsType: loadType.apiType, page: page, size: 12);
return (res?.list, res?.hasNext ?? false);
}
}
@@ -192,7 +216,8 @@ class LikeLogic extends ColHisBuySubLogic {
@override
Future<(List?, bool)> fetch(int page) async {
final res = await MineService.fetchLikes(likeType: loadType.apiType, page: page, size: 12);
final res = await MineService.fetchLikes(
likeType: loadType.apiType, page: page, size: 12);
return (res?.list, res?.hasNext ?? false);
}
@@ -210,8 +235,10 @@ class CollectLogic extends ColHisBuySubLogic {
@override
Future<(List?, bool)> fetch(int page) async {
final ListBaseModel? res = loadType.isAcg
? await ACGService.fetchAcgBooklib<CartoonMediaInfo>(loadType.apiType, page: page, size: 12)
: await MineService.fetchCollectList<VideoModel>(loadType.apiType, page: page, size: 12);
? await ACGService.fetchAcgBooklib<CartoonMediaInfo>(loadType.apiType,
page: page, size: 12)
: await MineService.fetchCollectList<VideoModel>(loadType.apiType,
page: page, size: 12);
return (res?.list, res?.hasNext ?? false);
}
@@ -220,7 +247,8 @@ class CollectLogic extends ColHisBuySubLogic {
final model = dataList![index];
final bool isDeleted;
if (model is VideoModel) {
isDeleted = await MineService.postCollect(model.id, loadType.apiType, false);
isDeleted =
await MineService.postCollect(model.id, loadType.apiType, false);
} else if (model is CartoonMediaInfo) {
isDeleted = await ACGService.deleteBookshelf(model.id ?? '');
} else {
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/mine/collec_history_buy/col_his_buy_page.dart';
import 'package:hgmj/hj_page/mine/collec_history_buy/col_his_buy_sub_logic.dart';
import 'package:hgmj/hj_utils/const.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/mine/collec_history_buy/col_his_buy_page.dart';
import 'package:wydj/hj_page/mine/collec_history_buy/col_his_buy_sub_logic.dart';
import 'package:wydj/hj_utils/const.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
enum LoadDataType {
/// 长视频
+47 -19
View File
@@ -2,17 +2,17 @@ import 'dart:async';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:hgmj/hj_utils/api_service/vid_service.dart';
import 'package:hgmj/hj_utils/light_model.dart';
import 'package:hgmj/hj_utils/store_keys.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/track_event_manager/device_service.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/hj_utils/api_service/vid_service.dart';
import 'package:wydj/hj_utils/light_model.dart';
import 'package:wydj/hj_utils/store_keys.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/track_event_manager/device_service.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:hgmj/tools_base/widget/common_alert.dart';
import 'package:wydj/tools_base/widget/common_alert.dart';
import '../../config/config.dart';
import '../../hj_model/user/user_info_model.dart';
@@ -46,12 +46,37 @@ class MineMainLogic extends GetxController with GetTickerProviderStateMixin {
/// 常用功能: (标题, 图标, 点击事件)
List<(String, String, void Function())> get commonlyUsedFunction => [
("意见反馈", 'mine_menu_2.png'.mineImgPath, () => Get.to(() => const MineFeedbackPage())),
("我的下载", 'mine_follow.png'.mineImgPath, () => Get.to(() => VideoCachePage())),
("我的关注", 'mine_offical.png'.mineImgPath, () => Get.to(() => MineFollowingPage())),
("分享邀请", 'mine_menu_5.png'.mineImgPath, () => Get.to(() => MineSharePage())),
("应用推荐", 'mine_menu_8.png'.mineImgPath, () => Get.to(() => const WelfareHomePage(index: 1), preventDuplicates: false)),
("账号凭证", 'mine_menu_9.png'.mineImgPath, () => Get.dialog(MineAccountIdentityPage())),
(
"意见反馈",
'mine_menu_2.png'.mineImgPath,
() => Get.to(() => const MineFeedbackPage())
),
(
"我的下载",
'mine_follow.png'.mineImgPath,
() => Get.to(() => VideoCachePage())
),
(
"我的关注",
'mine_offical.png'.mineImgPath,
() => Get.to(() => MineFollowingPage())
),
(
"分享邀请",
'mine_menu_5.png'.mineImgPath,
() => Get.to(() => MineSharePage())
),
(
"应用推荐",
'mine_menu_8.png'.mineImgPath,
() => Get.to(() => const WelfareHomePage(index: 1),
preventDuplicates: false)
),
(
"账号凭证",
'mine_menu_9.png'.mineImgPath,
() => Get.dialog(MineAccountIdentityPage())
),
("锁屏密码", 'mine_menu_10.png'.mineImgPath, _toggleLockPassword),
("我的消息", 'mine_menu_11.png'.mineImgPath, () => menuTapEvent(3)),
];
@@ -129,7 +154,8 @@ class MineMainLogic extends GetxController with GetTickerProviderStateMixin {
Get.to(() => MineFollowingPage());
} else if (index == 3) {
//消息中心
await Get.to(() => MessageCenterPage(), opaque: true, preventDuplicates: false);
await Get.to(() => MessageCenterPage(),
opaque: true, preventDuplicates: false);
MineMsgProvider().getMessageTip();
}
}
@@ -143,7 +169,8 @@ class MineMainLogic extends GetxController with GetTickerProviderStateMixin {
confirmText: '确定关闭',
);
if (close) {
Get.toNamed(MinePasswordPage.routeName, arguments: MinePasswordType.close);
Get.toNamed(MinePasswordPage.routeName,
arguments: MinePasswordType.close);
}
} else {
Get.toNamed(
@@ -173,7 +200,8 @@ class MineMainLogic extends GetxController with GetTickerProviderStateMixin {
showToast("获取商店地址失败~");
return;
}
Get.to(H5Page(url: result, showTitle: false, showClose: true), popGesture: true);
Get.to(H5Page(url: result, showTitle: false, showClose: true),
popGesture: true);
}
changeIcon(int index) async {
+35 -21
View File
@@ -3,17 +3,17 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/config/config.dart';
import 'package:hgmj/hj_page/main_page/provider/msg_provider.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/config/config.dart';
import 'package:wydj/hj_page/main_page/provider/msg_provider.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../../hj_utils/widget_util.dart';
@@ -127,7 +127,8 @@ class HomeMinePage extends StatelessWidget {
childAspectRatio: 1,
),
itemBuilder: (context, index) {
final (titleDesc, imagePath, onTap) = logic.commonlyUsedFunction[index];
final (titleDesc, imagePath, onTap) =
logic.commonlyUsedFunction[index];
// 仅「我的消息」带未读红点,按名称判断避免菜单顺序变动后红点错位
final isMessageEntry = titleDesc == _messageMenuTitle;
return InkWell(
@@ -145,7 +146,8 @@ class HomeMinePage extends StatelessWidget {
width: 28,
),
Consumer<MineMsgProvider>(
builder: (context, model, child) => Positioned(
builder: (context, model, child) =>
Positioned(
right: 2,
top: 2,
child: model.buildTipsView(),
@@ -156,7 +158,8 @@ class HomeMinePage extends StatelessWidget {
5.sizeBoxH,
Text(
titleDesc,
style: TextStyle(color: Colors.white, fontSize: 12),
style:
TextStyle(color: Colors.white, fontSize: 12),
),
],
),
@@ -171,14 +174,21 @@ class HomeMinePage extends StatelessWidget {
children: [
Text(
'设置桌面图标',
style: TextStyle(color: Color(0xffEFEFEF), fontSize: 14, fontWeight: FontWeight.w500),
style: TextStyle(
color: Color(0xffEFEFEF),
fontSize: 14,
fontWeight: FontWeight.w500),
),
Spacer(),
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => logic.changeIcon(0),
child: Text(
'恢复默认',
style: TextStyle(color: Color(0xff989898), fontSize: 12, fontWeight: FontWeight.w400),
style: TextStyle(
color: Color(0xff989898),
fontSize: 12,
fontWeight: FontWeight.w400),
),
),
],
@@ -194,7 +204,8 @@ class HomeMinePage extends StatelessWidget {
itemCount: logic.iconList.length,
itemBuilder: (BuildContext context, int index) {
final data = logic.iconList[index];
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () => logic.changeIcon(index),
child: Column(
children: [
@@ -279,7 +290,8 @@ class HomeMinePage extends StatelessWidget {
Expanded(
child: Consumer2<GlobalStore, PreSaleProvider>(
builder: (context, store, provider, child) {
int count = (store.wallet?.downloadCount ?? 0) + (provider.remain?.todayDownloadCount ?? 0);
int count = (store.wallet?.downloadCount ?? 0) +
(provider.remain?.todayDownloadCount ?? 0);
return _buildCountItem(count.toString(), '剩余缓存次数');
},
),
@@ -293,7 +305,8 @@ class HomeMinePage extends StatelessWidget {
child: Consumer2<GlobalStore, PreSaleProvider>(
builder: (context, store, provider, child) {
//预售权益和免费次数的和
final total = (store.wallet?.aiUndressFreeTimes ?? 0) + (provider.remain?.todayAiUndressCount ?? 0);
final total = (store.wallet?.aiUndressFreeTimes ?? 0) +
(provider.remain?.todayAiUndressCount ?? 0);
return _buildCountItem(total.toString(), '剩余AI脱衣次数');
},
),
@@ -313,7 +326,8 @@ class HomeMinePage extends StatelessWidget {
4.sizeBoxH,
Text(
title,
style: textStyle(12, Colors.white.withValues(alpha: .7), FontWeight.w400),
style: textStyle(
12, Colors.white.withValues(alpha: .7), FontWeight.w400),
),
],
);
@@ -1,8 +1,8 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import '../../../hj_model/user/user_info_model.dart';
@@ -3,13 +3,13 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/config/config.dart';
import 'package:hgmj/hj_utils/image_util.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/config/config.dart';
import 'package:wydj/hj_utils/image_util.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:provider/provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
@@ -49,7 +49,8 @@ class MineAccountIdentityPage extends StatelessWidget {
Positioned.fill(
child: ClipRRect(
borderRadius: BorderRadius.circular(9),
child: Image.asset('share_bg.webp'.mineImgPath, fit: BoxFit.fill),
child: Image.asset('share_bg.webp'.mineImgPath,
fit: BoxFit.fill),
),
),
Column(
@@ -62,10 +63,12 @@ class MineAccountIdentityPage extends StatelessWidget {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
border: Border.all(color: Color(0x4DF68804), width: 3),
border: Border.all(
color: Color(0x4DF68804), width: 3),
),
child: NetworkImageLoader(
imageUrl: provider.meInfo?.portrait ?? '',
imageUrl:
provider.meInfo?.portrait ?? '',
width: 82,
height: 82,
borderRadius: 50,
@@ -92,14 +95,18 @@ class MineAccountIdentityPage extends StatelessWidget {
),
),
30.sizeBoxH,
Text("提示*可通过官方客服找回账号", style: TextStyle(fontSize: 12, color: Color(0xffFFC000))),
Text("提示*可通过官方客服找回账号",
style: TextStyle(
fontSize: 12,
color: Color(0xffFFC000))),
10.sizeBoxH,
Center(
child: Container(
padding: EdgeInsets.all(11.w),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("code_bg.webp".mineImgPath),
image: AssetImage(
"code_bg.webp".mineImgPath),
fit: BoxFit.fill,
),
),
@@ -117,7 +124,8 @@ class MineAccountIdentityPage extends StatelessWidget {
width: 100,
height: 100,
child: Center(
child: CupertinoActivityIndicator(
child:
CupertinoActivityIndicator(
color: AppColors.actionRed,
),
),
@@ -129,7 +137,11 @@ class MineAccountIdentityPage extends StatelessWidget {
"APP更新可能会导致会员账号掉线\n请勿删除此凭证,此凭证是您永久有\n效的登陆途径。",
textAlign: TextAlign.center,
defaultStyle: TextStyle(
color: Colors.white.withValues(alpha: .55), fontSize: 12, fontWeight: FontWeight.w400, height: 1.5),
color:
Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
height: 1.5),
patternList: [
EasyRichTextPattern(
targetString: '请勿删除此凭证',
@@ -143,11 +155,13 @@ class MineAccountIdentityPage extends StatelessWidget {
),
Container(
height: 30,
padding: EdgeInsets.symmetric(horizontal: 18, vertical: 3),
padding: EdgeInsets.symmetric(
horizontal: 18, vertical: 3),
child: Text(
'${Config.appName} 官网地址 ${Address.groundUrl}',
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
color:
Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
),
@@ -165,7 +179,8 @@ class MineAccountIdentityPage extends StatelessWidget {
children: [
GestureDetector(
onTap: () async {
var success = await ImageUtil.saveWidgetToAlbum(controller.boundaryKey);
var success = await ImageUtil.saveWidgetToAlbum(
controller.boundaryKey);
if (success) {
showToast("保存成功");
Get.back();
@@ -193,9 +208,11 @@ class MineAccountIdentityPage extends StatelessWidget {
],
),
20.sizeBoxH,
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => Get.back(result: false),
child: Image.asset("close_button.png".commonImgPath, width: 32),
child: Image.asset("close_button.png".commonImgPath,
width: 32),
)
],
),
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'mine_withdrawal_record_page.dart';
@@ -35,14 +35,17 @@ class WithDrawalRecordController extends MineWithdrawalRecordLogic {
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final result = await MineService.getWithdrawDetails(pageNumber: page, pageSize: 10);
final result =
await MineService.getWithdrawDetails(pageNumber: page, pageSize: 10);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
result?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
result?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(result?.list ?? []);
page += 1;
update();
@@ -69,7 +72,9 @@ class GoldBillRecordController extends MineWithdrawalRecordLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -86,13 +91,16 @@ class RechargeRecordController extends MineWithdrawalRecordLogic {
@override
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final res = await MineService.getRechargeBill(pageNumber: page, pageSize: 15);
final res =
await MineService.getRechargeBill(pageNumber: page, pageSize: 15);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -112,13 +120,16 @@ class IncomeRecordController extends MineWithdrawalRecordLogic {
@override
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final res = await MineService.getIncomeRecord(pageNumber: page, pageSize: 15);
final res =
await MineService.getIncomeRecord(pageNumber: page, pageSize: 15);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'mine_withdrawal_record_logic.dart';
@@ -40,16 +40,20 @@ class _RecordsPageState extends State<RecordsPage> {
appBar: AppBar(title: Text(widget.type.title)),
body: pullYsRefresh(
onRefresh: (refreshController) => controller.fetchPageData(),
onLoading: (refreshController) => controller.fetchPageData(isRefresh: false),
onLoading: (refreshController) =>
controller.fetchPageData(isRefresh: false),
onInit: (ctr) => controller.refreshController = ctr,
child: () {
if (controller.isLoading) return LoadingCenterWidget();
if (controller.dataSource.isEmpty) return CErrorWidget(retryOnTap: () => controller.fetchPageData());
if (controller.dataSource.isEmpty)
return CErrorWidget(
retryOnTap: () => controller.fetchPageData());
return ListView.builder(
itemCount: controller.dataSource.length,
padding: EdgeInsets.only(top: 12, left: 16.w, right: 16.w),
itemBuilder: (context, index) => controller.instanceChildItem(index),
itemBuilder: (context, index) =>
controller.instanceChildItem(index),
);
}(),
),
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_model/mine/exchange/bill_item_model.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_model/mine/exchange/bill_item_model.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/toast.dart';
import '../withdraw_details_model.dart';
@@ -27,19 +27,28 @@ class GoldRecordItem extends StatelessWidget {
12.sizeBoxH,
Text(
model.desc ?? '',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
model.createdAt.utcToYMDHM(),
style: TextStyle(color: Colors.white.withValues(alpha: .5), fontSize: 12, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white.withValues(alpha: .5),
fontSize: 12,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
model.tranType ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Color(0xFFFFC000), fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Color(0xFFFFC000),
fontSize: 14,
fontWeight: FontWeight.w400),
),
12.sizeBoxH,
1.line,
@@ -51,12 +60,18 @@ class GoldRecordItem extends StatelessWidget {
12.sizeBoxH,
Text(
'${model.realCount}${model.unit}',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
4.sizeBoxH,
Text(
'余额:${model.realAmount}',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
],
)
@@ -101,7 +116,10 @@ class RechargeRecordItem extends StatelessWidget {
'账单编号' + ': ${model.orderId}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500),
),
),
2.sizeBoxW,
@@ -178,7 +196,10 @@ class InComeRecordItem extends StatelessWidget {
children: [
Text(
"${model.tranType}",
style: const TextStyle(color: Color(0xFFEFEFEF), fontWeight: FontWeight.w500, fontSize: 14.0),
style: const TextStyle(
color: Color(0xFFEFEFEF),
fontWeight: FontWeight.w500,
fontSize: 14.0),
),
Container(
margin: EdgeInsets.symmetric(vertical: 4),
@@ -189,15 +210,24 @@ class InComeRecordItem extends StatelessWidget {
),
Text(
DateTimeUtil.utc2iso(model.createdAt ?? ''),
style: const TextStyle(color: Color(0xFF525252), fontWeight: FontWeight.w400, fontSize: 12.0),
style: const TextStyle(
color: Color(0xFF525252),
fontWeight: FontWeight.w400,
fontSize: 12.0),
),
12.sizeBoxH,
],
),
),
12.sizeBoxW,
Text(model.tranTypeInt == 111 ? "+${model.actualAmount}次" : "+${model.actualAmount}金币",
style: const TextStyle(color: const Color(0xffFFC000), fontWeight: FontWeight.w400, fontSize: 12.0),
Text(
model.tranTypeInt == 111
? "+${model.actualAmount}次"
: "+${model.actualAmount}金币",
style: const TextStyle(
color: const Color(0xffFFC000),
fontWeight: FontWeight.w400,
fontSize: 12.0),
textAlign: TextAlign.left)
],
),
@@ -228,7 +258,10 @@ class _WithdrawalRecordItemState extends State<WithdrawalRecordItem> {
12.sizeBoxH,
Text(
'${(model.money ?? 0) ~/ 100}元',
style: TextStyle(fontSize: 14, color: AppColors.actionRed, fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: AppColors.actionRed,
fontWeight: FontWeight.w500),
),
6.sizeBoxH,
Row(
@@ -238,7 +271,10 @@ class _WithdrawalRecordItemState extends State<WithdrawalRecordItem> {
'账单编号' + ': ${model.id}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 14,
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500),
),
),
InkWell(
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/user/wallet_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:wydj/hj_model/user/wallet_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import '../../../alert/mine/vip_level_dialog.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../track_event_manager/device_service.dart';
import '../mine_profit/bank_card_home_page.dart';
import '../mine_profit/model/alipay_bank_list_model.dart';
@@ -56,8 +56,11 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
void changeWithdrawType(String payType) {
// withdrawType = value;
selectChannel = configData?.channels?.firstWhere((element) => element.payType == payType);
withdrawType = configData?.channels?.indexWhere((e) => e.payType == selectChannel?.payType) ?? 0;
selectChannel = configData?.channels
?.firstWhere((element) => element.payType == payType);
withdrawType = configData?.channels
?.indexWhere((e) => e.payType == selectChannel?.payType) ??
0;
update();
}
@@ -74,7 +77,8 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
actualAmount = withdrawAmoutNum;
} else {
double value = coinTax / 100.0;
final res = (withdrawAmoutNum * double.parse(value.toStringAsFixed(2))).toStringAsFixed(2);
final res = (withdrawAmoutNum * double.parse(value.toStringAsFixed(2)))
.toStringAsFixed(2);
handlingFee = double.parse(res).floor();
actualAmount = withdrawAmoutNum - handlingFee;
}
@@ -105,14 +109,18 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
this.configData = configData;
isLoading = false;
// 优先银行卡,其次 usdt
selectChannel = configData?.channels?.firstWhereOrNull((element) => element.payType == 'bankcard') ??
configData?.channels?.firstWhereOrNull((element) => element.payType == 'usdt');
selectChannel = configData?.channels
?.firstWhereOrNull((element) => element.payType == 'bankcard') ??
configData?.channels
?.firstWhereOrNull((element) => element.payType == 'usdt');
if (selectChannel == null) {
showToast('暂无可用提现通道');
this.configData = null;
} else {
// 必须同步 withdrawType,页面按 channels[withdrawType] 取值,否则会索引错位甚至越界
withdrawType = configData?.channels?.indexWhere((e) => e.payType == selectChannel?.payType) ?? 0;
withdrawType = configData?.channels
?.indexWhere((e) => e.payType == selectChannel?.payType) ??
0;
}
update();
}
@@ -128,7 +136,8 @@ class WithdrawalLogic extends GetxController with GetTickerProviderStateMixin {
if ("bankcard" == selectChannel?.payType) {
//检验银行卡信息
_commonWithdrawReq(true);
} else if ("alipay" == selectChannel?.payType || "usdt" == selectChannel?.payType) {
} else if ("alipay" == selectChannel?.payType ||
"usdt" == selectChannel?.payType) {
_commonWithdrawReq(false);
}
} catch (e) {
+115 -48
View File
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/mine/widgets/gradient_text.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/mine/widgets/gradient_text.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:provider/provider.dart';
import '../../../assets_tool/app_colors.dart';
@@ -63,14 +63,16 @@ class WithdrawalPage extends StatelessWidget {
children: [
Expanded(
child: SingleChildScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
child: Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 12.w, bottom: 18.w),
margin:
EdgeInsets.only(top: 12.w, bottom: 18.w),
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
color: Color(0x0DFFFFFF),
@@ -106,20 +108,33 @@ class WithdrawalPage extends StatelessWidget {
Padding(
padding: EdgeInsets.only(left: 20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Image.asset('coin_icon.webp'.mineImgPath, width: 30),
Image.asset(
'coin_icon.webp'.mineImgPath,
width: 30),
4.sizeBoxW,
Consumer<GlobalStore>(builder: (_, store, __) {
logic.userIncomeModel = store.wallet;
Consumer<GlobalStore>(
builder: (_, store, __) {
logic.userIncomeModel =
store.wallet;
return GradientText(
((store.wallet?.balance ?? 0) * 10 / 100).toStringAsFixed(2),
((store.wallet?.balance ?? 0) *
10 /
100)
.toStringAsFixed(2),
gradient: LinearGradient(
colors: [Color(0xffFFE8BE), Color(0xffE6B764)],
colors: [
Color(0xffFFE8BE),
Color(0xffE6B764)
],
tileMode: TileMode.mirror,
),
style: TextStyle(
fontSize: 31.5, fontWeight: FontWeight.w500), //目前fontSize设置为31.5 设置为32,显示不完全,存在系统bug
fontSize: 31.5,
fontWeight: FontWeight
.w500), //目前fontSize设置为31.5 设置为32,显示不完全,存在系统bug
);
}),
],
@@ -131,12 +146,14 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
'提现币类:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
15.sizeBoxW,
Text(
'人民币',
style: textStyle(14, Color(0x8CFFFFFF), FontWeight.w400),
style: textStyle(
14, Color(0x8CFFFFFF), FontWeight.w400),
),
],
),
@@ -145,34 +162,48 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
"提现金额:",
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: Container(
alignment: Alignment.centerLeft,
height: 40,
padding: EdgeInsets.symmetric(horizontal: 12),
padding:
EdgeInsets.symmetric(horizontal: 12),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: TextField(
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
FilteringTextInputFormatter.allow(
RegExp("[0-9]")),
LengthLimitingTextInputFormatter(9),
],
controller: logic.moneyController,
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
cursorColor: Colors.white.withValues(alpha: 0.7),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
cursorColor:
Colors.white.withValues(alpha: 0.7),
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.only(bottom: 8),
hintStyle: TextStyle(color: Color(0xFF525252), fontSize: 12, fontWeight: FontWeight.w400),
hintText: '单笔提现金额范围 ${_getPayMoneyRange(logic)}元', //"您目前
contentPadding:
EdgeInsets.only(bottom: 8),
hintStyle: TextStyle(
color: Color(0xFF525252),
fontSize: 12,
fontWeight: FontWeight.w400),
hintText:
'单笔提现金额范围 ${_getPayMoneyRange(logic)}元', //"您目前
),
focusNode: logic.focusNode,
onChanged: (value) => logic.calcWithdrawAmount(value)),
onChanged: (value) =>
logic.calcWithdrawAmount(value)),
),
)
],
@@ -182,7 +213,8 @@ class WithdrawalPage extends StatelessWidget {
children: [
Text(
"提现方式:",
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
16.sizeBoxW,
Expanded(
@@ -193,7 +225,10 @@ class WithdrawalPage extends StatelessWidget {
child: Row(
children: logic.configData?.realChannel
.asMap()
.map((index, e) => MapEntry(index, _buildPayTypeUI(e, logic, index)))
.map((index, e) => MapEntry(
index,
_buildPayTypeUI(
e, logic, index)))
.values
.toList() ??
[],
@@ -209,27 +244,34 @@ class WithdrawalPage extends StatelessWidget {
if (_isUsdt(logic)) ...[
Text(
'USDT地址:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: TextField(
textAlignVertical: TextAlignVertical.center,
textAlignVertical:
TextAlignVertical.center,
controller: logic.accountController,
maxLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintText: _getHintText(logic),
hintStyle: TextStyle(color: Color(0xff999999), fontSize: 14, fontWeight: FontWeight.w400),
hintStyle: TextStyle(
color: Color(0xff999999),
fontSize: 14,
fontWeight: FontWeight.w400),
isCollapsed: true,
contentPadding: EdgeInsets.symmetric(
horizontal: 12,
vertical: (32 - textPainter.height) / 2,
vertical:
(32 - textPainter.height) / 2,
),
),
style: TextStyle(
@@ -243,18 +285,21 @@ class WithdrawalPage extends StatelessWidget {
] else ...[
Text(
'银行卡号:',
style: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
style: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
),
10.sizeBoxW,
Expanded(
child: InkWell(enableFeedback: false,
child: InkWell(
enableFeedback: false,
onTap: () => logic.gotoBankList(),
child: Container(
alignment: Alignment.centerLeft,
height: 37,
padding: EdgeInsets.only(left: 10),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
color:
Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(6),
),
child: Row(
@@ -267,12 +312,15 @@ class WithdrawalPage extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: logic.bankModel == null ? Color(0xff525252) : Colors.white,
color: logic.bankModel == null
? Color(0xff525252)
: Colors.white,
),
),
),
6.sizeBoxW,
Icon(Icons.keyboard_arrow_right, color: Colors.white, size: 16),
Icon(Icons.keyboard_arrow_right,
color: Colors.white, size: 16),
10.sizeBoxW,
],
),
@@ -287,10 +335,12 @@ class WithdrawalPage extends StatelessWidget {
id: 'money',
builder: (controller) => EasyRichText(
'手续费率: ${logic.configData?.coinTax ?? 0}% 实际到账金额: ${logic.actualAmount}',
defaultStyle: textStyle(14, Color(0xE5FFFFFF), FontWeight.w500),
defaultStyle: textStyle(
14, Color(0xE5FFFFFF), FontWeight.w500),
patternList: [
EasyRichTextPattern(
targetString: '${logic.configData?.coinTax ?? 0}%',
targetString:
'${logic.configData?.coinTax ?? 0}%',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
@@ -298,7 +348,8 @@ class WithdrawalPage extends StatelessWidget {
),
),
EasyRichTextPattern(
targetString: '实际到账金额: ${logic.handlingFee}',
targetString:
'实际到账金额: ${logic.handlingFee}',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -319,7 +370,10 @@ class WithdrawalPage extends StatelessWidget {
18.sizeBoxH,
Text(
"提现规则:",
style: const TextStyle(color: Color(0xE5FFFFFF), fontWeight: FontWeight.w500, fontSize: 16.0),
style: const TextStyle(
color: Color(0xE5FFFFFF),
fontWeight: FontWeight.w500,
fontSize: 16.0),
),
12.sizeBoxH,
Text(
@@ -328,7 +382,11 @@ class WithdrawalPage extends StatelessWidget {
"2、每次提现收取${logic.configData?.coinTax}%手续费。\n"
"3、仅支持银行卡提现,收款账户卡号与姓名一致,到账时间未72小时内。\n"
"4、申请提现后请随时关注收款账户进款通知,长时间未到账,请及时联系客服。\n",
style: const TextStyle(color: Color(0x8CFFFFFF), fontWeight: FontWeight.w400, fontSize: 12.0, height: 2),
style: const TextStyle(
color: Color(0x8CFFFFFF),
fontWeight: FontWeight.w400,
fontSize: 12.0,
height: 2),
),
30.sizeBoxH,
],
@@ -370,16 +428,24 @@ class WithdrawalPage extends StatelessWidget {
///支付类型
Widget _buildPayTypeUI(Channel channel, WithdrawalLogic logic, int index) {
bool isSelected = logic.selectChannel?.payType == channel.payType;
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () => logic.changeWithdrawType(channel.payType ?? ''),
child: Row(
children: [
Image.asset(channel.payType == 'usdt' ? 'ic_usdt.png'.mineImgPath : 'ic_union.png'.mineImgPath, width: 30),
Image.asset(
channel.payType == 'usdt'
? 'ic_usdt.png'.mineImgPath
: 'ic_union.png'.mineImgPath,
width: 30),
4.sizeBoxW,
Text(_getPayTypeName(channel.payType ?? ""), style: TextStyle(color: Colors.white, fontSize: 14)),
Text(_getPayTypeName(channel.payType ?? ""),
style: TextStyle(color: Colors.white, fontSize: 14)),
10.sizeBoxW,
Image.asset(
isSelected ? 'radio_sel.png'.commonImgPath : 'mine_withdraw_nor.png'.mineImgPath,
isSelected
? 'radio_sel.png'.commonImgPath
: 'mine_withdraw_nor.png'.mineImgPath,
width: 24,
),
24.sizeBoxW,
@@ -421,7 +487,8 @@ class WithdrawalPage extends StatelessWidget {
}
}
bool _isUsdt(WithdrawalLogic logic) => (_currentChannel(logic)?.payType ?? "") == 'usdt';
bool _isUsdt(WithdrawalLogic logic) =>
(_currentChannel(logic)?.payType ?? "") == 'usdt';
// 按 withdrawType 取当前通道,带越界保护(配置异常时不崩溃)
Channel? _currentChannel(WithdrawalLogic logic) {
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import 'message_center_logic.dart';
import 'message_center_sub_page.dart';
@@ -51,7 +51,8 @@ class MessageCenterPage extends StatelessWidget {
controller: logic.tabController,
children: logic.titleArr
.asMap()
.map((key, value) => MapEntry(key, MessageCenterSubPage(logic.typeArr[key]).keepAlive))
.map((key, value) => MapEntry(key,
MessageCenterSubPage(logic.typeArr[key]).keepAlive))
.values
.toList()),
),
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'message_center_sub_page.dart';
@@ -49,7 +49,9 @@ class MessageCommentLogic extends MessageCenterSubLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -67,7 +69,9 @@ class MessageThumbUpLogic extends MessageCenterSubLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
res?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res?.list ?? []);
page += 1;
update();
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import '../../../main.dart';
import 'message_center_sub_controller.dart';
@@ -23,7 +23,8 @@ class MessageCenterSubPage extends StatefulWidget {
State<MessageCenterSubPage> createState() => _MessageCenterSubPageState();
}
class _MessageCenterSubPageState extends State<MessageCenterSubPage> with RouteAware {
class _MessageCenterSubPageState extends State<MessageCenterSubPage>
with RouteAware {
late MessageCenterSubLogic logic;
@override
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_model/message/message_dynamic_list.dart';
import 'package:hgmj/hj_page/user_center_page/user_center_page.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_model/message/message_dynamic_list.dart';
import 'package:wydj/hj_page/user_center_page/user_center_page.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../../community/post_detail_page/post_detail_page.dart';
@@ -18,7 +18,8 @@ class MessageThumbItem extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () => Get.to(() => PostDetailPage(argument: PostDetailPageArgument(id: model.objId, models: []))),
onTap: () => Get.to(() => PostDetailPage(
argument: PostDetailPageArgument(id: model.objId, models: []))),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 12),
margin: EdgeInsets.only(bottom: 12),
@@ -102,7 +103,8 @@ class MessageCommentItem extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
enableFeedback: false,
onTap: () => Get.to(() => PostDetailPage(argument: PostDetailPageArgument(id: model.objId, models: []))),
onTap: () => Get.to(() => PostDetailPage(
argument: PostDetailPageArgument(id: model.objId, models: []))),
child: Container(
padding: EdgeInsets.symmetric(vertical: 18, horizontal: 12),
margin: EdgeInsets.only(bottom: 12),
@@ -115,7 +117,8 @@ class MessageCommentItem extends StatelessWidget {
children: [
InkWell(
enableFeedback: false,
onTap: () => Get.to(() => UserCenterPage(uid: model.sendUid ?? 0)),
onTap: () =>
Get.to(() => UserCenterPage(uid: model.sendUid ?? 0)),
child: NetworkImageLoader(
imageUrl: model.sendAvatar ?? '',
width: 40,
@@ -1,6 +1,6 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_model/mine/official_list_item_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_model/mine/official_list_item_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
class MineDriveLogic extends GetxController {
/// null 表示未加载(loading 态),非 null 表示已加载(可能为空)
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/hj_utils/text_util.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/hj_utils/text_util.dart';
import '../../../hj_model/mine/official_list_item_model.dart';
import '../../../routers/jump_router.dart';
@@ -13,8 +13,10 @@ import 'mine_drive_logic.dart';
class MineDrivePage extends StatelessWidget {
const MineDrivePage({super.key});
static const _titleStyle = TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600);
static const _subtitleStyle = TextStyle(color: Color(0x80FFFFFF), fontSize: 12);
static const _titleStyle =
TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600);
static const _subtitleStyle =
TextStyle(color: Color(0x80FFFFFF), fontSize: 12);
@override
Widget build(BuildContext context) {
@@ -32,9 +34,15 @@ class MineDrivePage extends StatelessWidget {
child: CustomScrollView(
slivers: [
if (controller.groupList.isNotEmpty)
_buildSection(title: '官方社群', subtitle: '一起看片一起分享心得', list: controller.groupList),
_buildSection(
title: '官方社群',
subtitle: '一起看片一起分享心得',
list: controller.groupList),
if (controller.officialList.isNotEmpty)
_buildSection(title: '商务合作', subtitle: '代理合作/商务合作', list: controller.officialList),
_buildSection(
title: '商务合作',
subtitle: '代理合作/商务合作',
list: controller.officialList),
],
),
);
@@ -82,7 +90,8 @@ class MineDrivePage extends StatelessWidget {
alignment: Alignment.center,
child: Row(
children: [
NetworkImageLoader(imageUrl: item.officialImg ?? '', width: 40, height: 40),
NetworkImageLoader(
imageUrl: item.officialImg ?? '', width: 40, height: 40),
12.sizeBoxW,
Expanded(
child: Column(
@@ -91,13 +100,15 @@ class MineDrivePage extends StatelessWidget {
children: [
Text(
item.officialName ?? '',
style: const TextStyle(color: Colors.white, fontSize: 14, height: 1.1),
style: const TextStyle(
color: Colors.white, fontSize: 14, height: 1.1),
),
if (TextUtil.isNotEmpty(item.officialDesc)) ...[
6.sizeBoxH,
Text(
item.officialDesc ?? '',
style: const TextStyle(color: Color(0xff525252), fontSize: 12, height: 1.1),
style: const TextStyle(
color: Color(0xff525252), fontSize: 12, height: 1.1),
),
],
],
@@ -113,7 +124,10 @@ class MineDrivePage extends StatelessWidget {
),
child: const Text(
'立即加入',
style: TextStyle(color: Colors.black, fontSize: 12, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontWeight: FontWeight.w500),
),
),
],
@@ -1,17 +1,18 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/common_service.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/widget/swipe_action_item.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/common_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/widget/swipe_action_item.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../../hj_model/mine/follow_user_list_model.dart';
import 'mine_follow_sub_page.dart';
import 'widget/follow_list_items.dart';
abstract class MineFollowSubLogic extends GetxController with GetTickerProviderStateMixin {
abstract class MineFollowSubLogic extends GetxController
with GetTickerProviderStateMixin {
final int? uid;
MineFollowSubLogic(this.uid);
@@ -58,7 +59,9 @@ class ActressController extends MineFollowSubLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
retModel?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
retModel?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(retModel?.list ?? []);
pageNumber += 1;
update();
@@ -87,7 +90,9 @@ class BloggerController extends MineFollowSubLogic {
dataSource.clear();
refreshController?.refreshCompleted();
}
retModel?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
retModel?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(retModel?.list ?? []);
pageNumber += 1;
update();
@@ -131,13 +136,16 @@ class TopicController extends MineFollowSubLogic {
@override
fetchPageData({bool isRefresh = true}) async {
super.fetchPageData(isRefresh: isRefresh);
final retModel = await MineService.fetchCollectList<TagsBean>("tag", page: pageNumber, size: 10, uid: uid);
final retModel = await MineService.fetchCollectList<TagsBean>("tag",
page: pageNumber, size: 10, uid: uid);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
retModel?.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
retModel?.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(retModel?.list ?? []);
pageNumber += 1;
update();
@@ -1,16 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_model/mine/follow_user_list_model.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_model/mine/follow_user_list_model.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../../community/community_tag_page/community_tag_page.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:wydj/extension/extensions.dart';
/// 关注列表 - 女优项
class FollowActressItem extends StatefulWidget {
@@ -24,7 +24,8 @@ class FollowActressItem extends StatefulWidget {
class _FollowActressItemState extends State<FollowActressItem> {
@override
Widget build(BuildContext context) {
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () {
// type:1 原跳女优主页 ActressMainPage(已下线),pushToPersonCenter 内 type==1 已 return null
// → 当前点击不跳转,待产品确认替代页(objcId 与用户中心 uid 非同一体系,不能直接跳 UserCenterPage)
@@ -77,7 +78,8 @@ class _FollowActressItemState extends State<FollowActressItem> {
GestureDetector(
onTap: () async {
final isFollow = widget.model.hasFollow ?? false;
final res = await MineService.postCollect(widget.model.objcId, 'actresss', !isFollow);
final res = await MineService.postCollect(
widget.model.objcId, 'actresss', !isFollow);
if (res) {
widget.model.hasFollow = !isFollow;
setState(() {});
@@ -85,7 +87,9 @@ class _FollowActressItemState extends State<FollowActressItem> {
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 5.h),
decoration: BoxDecoration(color: Colors.white.withValues(alpha: .3), borderRadius: BorderRadius.circular(40)),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .3),
borderRadius: BorderRadius.circular(40)),
child: Row(
children: [
if (widget.model.hasFollow == true) ...[
@@ -119,7 +123,8 @@ class FollowBloggerItem extends StatefulWidget {
class _FollowBloggerItemState extends State<FollowBloggerItem> {
@override
Widget build(BuildContext context) {
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () {
pushToPersonCenter(widget.model.uid ?? 0);
},
@@ -157,7 +162,10 @@ class _FollowBloggerItemState extends State<FollowBloggerItem> {
'${widget.model.totalWorks ?? 0} 作品',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(fontSize: 12, color: Color(0x8CFFFFFF), fontWeight: FontWeight.w400),
style: TextStyle(
fontSize: 12,
color: Color(0x8CFFFFFF),
fontWeight: FontWeight.w400),
),
),
SizedBox(width: 12),
@@ -166,7 +174,10 @@ class _FollowBloggerItemState extends State<FollowBloggerItem> {
'${widget.model.fans?.countStr} 粉丝',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(fontSize: 12, color: Color(0x8CFFFFFF), fontWeight: FontWeight.w400),
style: TextStyle(
fontSize: 12,
color: Color(0x8CFFFFFF),
fontWeight: FontWeight.w400),
),
),
],
@@ -199,7 +210,8 @@ class FollowTopicItem extends StatefulWidget {
class _FollowTopicItemState extends State<FollowTopicItem> {
@override
Widget build(BuildContext context) {
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () {
Get.to(() => CommunityTagDetailPage(model: widget.model));
},
@@ -217,7 +229,9 @@ class _FollowTopicItemState extends State<FollowTopicItem> {
borderRadius: 8,
),
Container(
decoration: BoxDecoration(color: Colors.black.withValues(alpha: .6), borderRadius: BorderRadius.circular(8)),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: .6),
borderRadius: BorderRadius.circular(8)),
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -248,7 +262,8 @@ class _FollowTopicItemState extends State<FollowTopicItem> {
GestureDetector(
onTap: () async {
final isCollected = widget.model.hasCollected ?? false;
final res = await MineService.postCollect(widget.model.id, "tag", !isCollected);
final res = await MineService.postCollect(
widget.model.id, "tag", !isCollected);
if (res) {
widget.model.hasCollected = !isCollected;
setState(() {});
@@ -258,7 +273,9 @@ class _FollowTopicItemState extends State<FollowTopicItem> {
width: 108,
height: 27,
alignment: Alignment.center,
decoration: BoxDecoration(color: Color(0xffFFC000), borderRadius: BorderRadius.circular(6)),
decoration: BoxDecoration(
color: Color(0xffFFC000),
borderRadius: BorderRadius.circular(6)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -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) {
@@ -3,13 +3,13 @@ import 'dart:convert' as convert;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/widget/common_alert.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/widget/common_alert.dart';
import '../../../../hj_utils/light_model.dart';
import '../../../../hj_utils/store_keys.dart';
import '../../../../tools_base/refresh/pull_refresh.dart';
@@ -58,7 +58,8 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
if (result) {
var result = await lightKV.getString(StoreKeys.LAST_A_ACCOUNT);
if (result != null) {
AccountInfoModel listBean = AccountInfoModel.fromMap(convert.jsonDecode(result));
AccountInfoModel listBean =
AccountInfoModel.fromMap(convert.jsonDecode(result));
if (model.id == listBean.id) {
lightKV.setString(StoreKeys.LAST_A_ACCOUNT, "");
}
@@ -96,12 +97,14 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: Text('选择银行卡', style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
title: Text('选择银行卡',
style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
leading: BackButton(
onPressed: () => Get.back(result: selectItem),
),
actions: [
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () {
isEdit = !isEdit;
if (isEdit) {
@@ -193,7 +196,8 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
} else {
isSelected = selectItem?.id == item?.id;
}
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () {
if (isEdit) {
if (deleteList.contains(item) == true) {
@@ -209,7 +213,9 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
child: Container(
margin: EdgeInsets.only(bottom: 12),
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 18),
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(9)), color: const Color(0x0DFFFFFF)),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9)),
color: const Color(0x0DFFFFFF)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@@ -223,18 +229,27 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
children: [
Text(
item?.getBankName() ?? "",
style: const TextStyle(color: const Color(0xE5ffffff), fontWeight: FontWeight.w500, fontSize: 16.0),
style: const TextStyle(
color: const Color(0xE5ffffff),
fontWeight: FontWeight.w500,
fontSize: 16.0),
),
9.sizeBoxW,
Text(
item?.actName ?? "",
style: const TextStyle(color: const Color(0xE5ffffff), fontWeight: FontWeight.w400, fontSize: 12.0),
style: const TextStyle(
color: const Color(0xE5ffffff),
fontWeight: FontWeight.w400,
fontSize: 12.0),
)
],
),
6.sizeBoxH,
Text("卡号:${item?.act}",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w400, fontSize: 12.0))
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w400,
fontSize: 12.0))
],
),
),
@@ -250,7 +265,9 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
),
),
Icon(
isSelected ? CupertinoIcons.checkmark_circle_fill : CupertinoIcons.circle,
isSelected
? CupertinoIcons.checkmark_circle_fill
: CupertinoIcons.circle,
color: isSelected ? Color(0xFFFFC000) : Color(0x99000000),
),
],
@@ -263,9 +280,11 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
//添加银行卡
_buildCardAddView() {
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () async {
final res = await Get.dialog(AddBankDialog(), barrierColor: Colors.black.withValues(alpha: .7));
final res = await Get.dialog(AddBankDialog(),
barrierColor: Colors.black.withValues(alpha: .7));
if (res != null) {
_getAliListData();
}
@@ -1,15 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:hgmj/tools_base/net/http_manager.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/widget/common_dialog.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/debug_log.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import 'package:wydj/tools_base/net/http_manager.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/widget/common_dialog.dart';
import '../../make_money/alipay_ccdcapi_model.dart';
@@ -33,7 +33,8 @@ class _AddBankDialogState extends State<AddBankDialog> {
children: [
Text(
'添加银行卡',
style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white, fontSize: 20, fontWeight: FontWeight.w500),
),
12.sizeBoxH,
Divider(height: .5, color: Colors.white.withValues(alpha: .1)),
@@ -50,7 +51,10 @@ class _AddBankDialogState extends State<AddBankDialog> {
maxLength: 20,
controller: bankNameCtr,
style: TextStyle(color: Colors.white),
inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z\u4E00-\u9F5a]'))],
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(r'[a-zA-Z\u4E00-\u9F5a]'))
],
decoration: InputDecoration(
border: InputBorder.none,
counterText: '',
@@ -77,8 +81,11 @@ class _AddBankDialogState extends State<AddBankDialog> {
child: TextField(
maxLength: 20,
controller: bankNoCtr,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'[0-9]'))],
style:
TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9]'))
],
keyboardType: TextInputType.number,
decoration: InputDecoration(
border: InputBorder.none,
@@ -117,7 +124,10 @@ class _AddBankDialogState extends State<AddBankDialog> {
),
child: Text(
"立即提交",
style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.w500),
),
),
)
@@ -158,7 +168,8 @@ class _AddBankDialogState extends State<AddBankDialog> {
}
_addBankCard(ApcApiModel model) async {
final res = await MineService.addBankCard(model.key, bankNameCtr.text, model.bank, model.cardType);
final res = await MineService.addBankCard(
model.key, bankNameCtr.text, model.bank, model.cardType);
if (res) {
Get.back(result: true);
}
@@ -2,9 +2,9 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import '../../../tools_base/event_bus/event_bus_util.dart';
import '../../../tools_base/event_bus/events.dart';
@@ -62,7 +62,8 @@ class BindPhoneLogic extends GetxController {
Get.back();
}
} else {
final result = await globalStore.loginByMobile(phoneCtr.text, codeCtr.text);
final result =
await globalStore.loginByMobile(phoneCtr.text, codeCtr.text);
if (result != null) {
showToast('登录成功');
eventBus.emit(ReLoginEvent());
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'bind_phone_logic.dart';
@@ -41,7 +41,9 @@ class BindPhonePage extends StatelessWidget {
children: [
Text(
'手机号',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 16),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 16),
),
12.sizeBoxW,
Expanded(
@@ -58,7 +60,9 @@ class BindPhonePage extends StatelessWidget {
isCollapsed: true,
contentPadding: EdgeInsets.zero,
counterText: '',
hintStyle: TextStyle(color: Colors.white.withValues(alpha: 0.5), fontSize: 14)),
hintStyle: TextStyle(
color: Colors.white.withValues(alpha: 0.5),
fontSize: 14)),
),
)
],
@@ -78,7 +82,9 @@ class BindPhonePage extends StatelessWidget {
children: [
Text(
'验证码',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 16),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 16),
),
12.sizeBoxW,
Expanded(
@@ -95,7 +101,9 @@ class BindPhonePage extends StatelessWidget {
isCollapsed: true,
contentPadding: EdgeInsets.zero,
counterText: '',
hintStyle: TextStyle(color: Colors.white.withValues(alpha: 0.5), fontSize: 14)),
hintStyle: TextStyle(
color: Colors.white.withValues(alpha: 0.5),
fontSize: 14)),
),
),
12.sizeBoxW,
@@ -103,13 +111,17 @@ class BindPhonePage extends StatelessWidget {
onTap: () => controller.onSendCode(),
child: ValueListenableBuilder(
valueListenable: controller.countDownNof,
builder: (BuildContext context, int value, Widget? child) {
builder:
(BuildContext context, int value, Widget? child) {
final iscountdown = value > -1;
return Container(
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 4),
padding: EdgeInsets.symmetric(
horizontal: 4, vertical: 4),
child: Text(
iscountdown ? '${60 - value}秒' : '获取验证码',
style: TextStyle(color: Colors.white.withValues(alpha: 0.5), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.5),
fontSize: 12),
),
);
},
@@ -139,7 +151,10 @@ class BindPhonePage extends StatelessWidget {
),
child: Text(
controller.pageType.buttonTitle,
style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w500),
),
),
)
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/global_store/store.dart';
/// 绑定邀请码逻辑
class InviteBindLogic extends GetxController {
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'invite_bind_logic.dart';
@@ -26,7 +26,10 @@ class InviteBindPage extends StatelessWidget {
// 标题
Text(
'输入邀请码',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 30, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 30,
fontWeight: FontWeight.w500),
),
12.sizeBoxH,
Text(
@@ -46,7 +49,9 @@ class InviteBindPage extends StatelessWidget {
children: [
Text(
'邀请码',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 16),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 16),
),
24.sizeBoxW,
Expanded(
@@ -63,7 +68,9 @@ class InviteBindPage extends StatelessWidget {
isCollapsed: true,
contentPadding: EdgeInsets.zero,
counterText: '',
hintStyle: TextStyle(color: Colors.white.withValues(alpha: 0.35), fontSize: 14)),
hintStyle: TextStyle(
color: Colors.white.withValues(alpha: 0.35),
fontSize: 14)),
),
)
],
@@ -77,7 +84,8 @@ class InviteBindPage extends StatelessWidget {
18.sizeBoxH,
Text(
'邀请1人 获得1天会员',
style: TextStyle(color: Colors.white.withValues(alpha: 0.35), fontSize: 14),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.35), fontSize: 14),
),
30.sizeBoxH,
// 立即绑定按钮
@@ -93,7 +101,10 @@ class InviteBindPage extends StatelessWidget {
),
child: Text(
'立即绑定',
style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w500),
),
),
)
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/mine/exchange_record_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_alert_widget.dart';
import 'package:wydj/hj_model/mine/exchange_record_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/debug_log.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_alert_widget.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
class MineExchangeCodeLogic extends GetxController {
@@ -33,7 +33,9 @@ class MineExchangeCodeLogic extends GetxController {
groupList.addAll(res.data ?? []);
}
refreshController?.refreshCompleted();
(res?.total ?? 0) > (res?.data?.length ?? 0) ? refreshController?.loadComplete() : refreshController?.loadNoData();
(res?.total ?? 0) > (res?.data?.length ?? 0)
? refreshController?.loadComplete()
: refreshController?.loadNoData();
} catch (e) {
refreshController?.refreshCompleted();
refreshController?.loadComplete();
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_model/mine/exchange_record_model.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_model/mine/exchange_record_model.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'mine_code_logic.dart';
@@ -35,7 +35,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
onRefresh: (controller) => _.loadData(),
onLoading: (controller) => _.loadMoreData(),
child: CustomScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
slivers: <Widget>[
SliverToBoxAdapter(
child: _buildContent(_),
@@ -47,7 +48,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
),
),
),
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => _.onExChangeCode(),
child: Container(
height: 44,
@@ -142,7 +144,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
style: TextStyle(color: Colors.white, fontSize: 14),
decoration: InputDecoration(
hintText: '请输入${widget.type == 0 ? '邀请码' : '兑换码'}(字母大写)',
hintStyle: TextStyle(color: Colors.white.withValues(alpha: .35)),
hintStyle:
TextStyle(color: Colors.white.withValues(alpha: .35)),
border: InputBorder.none,
),
),
@@ -212,7 +215,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
alignment: Alignment.center,
child: Text(
item.code ?? '',
style: TextStyle(color: Colors.white.withValues(alpha: .55), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: .55), fontSize: 12),
),
),
),
@@ -224,7 +228,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
item.desc ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Colors.white.withValues(alpha: .55), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: .55), fontSize: 12),
),
),
),
@@ -234,7 +239,8 @@ class _MineExchangeCodePageState extends State<MineExchangeCodePage> {
alignment: Alignment.center,
child: Text(
'${item.createdAt.utcToYMD(gap: '.')}',
style: TextStyle(color: Colors.white.withValues(alpha: .55), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: .55), fontSize: 12),
),
),
),
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../../../hj_utils/permission_util.dart';
import 'bing_phone_page.dart';
@@ -10,7 +10,8 @@ class MineFindAccountPage extends StatelessWidget {
late final dataSource = [
{
'title': '手机号找回',
'ontap': () => Get.to(() => const BindPhonePage(pageType: PhonePageType.find)),
'ontap': () =>
Get.to(() => const BindPhonePage(pageType: PhonePageType.find)),
},
{
'title': '凭证找回',
@@ -58,7 +59,9 @@ class MineFindAccountPage extends StatelessWidget {
children: [
Text(
(data['title'] ?? '').toString(),
style: TextStyle(fontSize: 14, color: Colors.white.withValues(alpha: 0.9)),
style: TextStyle(
fontSize: 14,
color: Colors.white.withValues(alpha: 0.9)),
),
Spacer(),
Icon(
@@ -1,7 +1,7 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_page/splash/splash_page.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_page/splash/splash_page.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/toast.dart';
/// 手势密码用途:设置 / 关闭 / 进 app 解锁校验
enum MinePasswordType { setting, close, check }
@@ -22,8 +22,9 @@ class MinePasswordLogic extends GetxController {
/// 校验/关闭模式下,把手势组件的 [answer] 设为已保存密码,让组件自己判断对错、
/// 画错时展示错误态并停留;设置模式无旧密码,传 null 走 minLength 判断
List<int>? get answer =>
(isCheck || type == MinePasswordType.close) ? List<int>.from(globalStore.password) : null;
List<int>? get answer => (isCheck || type == MinePasswordType.close)
? List<int>.from(globalStore.password)
: null;
/// 画完手势:设置/关闭成功即退出本页,解锁通过则回启动页重走流程
Future<void> onComplete(List<int> result) async {
@@ -37,7 +38,8 @@ class MinePasswordLogic extends GetxController {
case MinePasswordType.close:
if (await globalStore.closeLockPassword(result) == true) Get.back();
case MinePasswordType.check:
if (await globalStore.checkLockPassword(result) == true) Get.toNamed(SplashPage.routeName);
if (await globalStore.checkLockPassword(result) == true)
Get.toNamed(SplashPage.routeName);
}
}
}
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../mine_gesture_pwd/widget/gesture_password_widget.dart';
import 'mine_password_logic.dart';
@@ -31,15 +31,16 @@ class MinePasswordPage extends StatelessWidget {
100.sizeBoxH,
SafeArea(
bottom: false,
child: Image.asset('mine_lock_password.png'.mineImgPath, width: 29),
child: Image.asset('mine_lock_password.png'.mineImgPath,
width: 29),
),
],
if(!logic.isCheck)
129.sizeBoxH,
if (!logic.isCheck) 129.sizeBoxH,
24.sizeBoxH,
Text(
logic.title,
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 18),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9), fontSize: 18),
),
75.sizeBoxH,
GesturePasswordWidget(
@@ -1,13 +1,13 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:image_pickers/image_pickers.dart';
import 'package:hgmj/hj_utils/image_util.dart';
import 'package:hgmj/tools_base/event_bus/event_bus_util.dart';
import 'package:hgmj/tools_base/event_bus/events.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:hgmj/tools_base/net/net_manager.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/image_util.dart';
import 'package:wydj/tools_base/event_bus/event_bus_util.dart';
import 'package:wydj/tools_base/event_bus/events.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import 'package:wydj/tools_base/net/net_manager.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
import '../identity/mine_identity_page.dart';
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
import 'mine_scan_login_logic.dart';
@@ -27,7 +27,8 @@ class _MineScanLoginPageState extends State<MineScanLoginPage> {
backgroundColor: Colors.transparent,
title: Text(
'扫码登录',
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
),
),
body: Stack(
@@ -59,7 +60,10 @@ class _MineScanLoginPageState extends State<MineScanLoginPage> {
12.sizeBoxH,
Text(
'相册',
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w500),
)
],
),
@@ -74,7 +78,10 @@ class _MineScanLoginPageState extends State<MineScanLoginPage> {
12.sizeBoxH,
Text(
'我的凭证',
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w500),
)
],
),
@@ -1,21 +1,21 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hgmj/config/config.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/hj_utils/version_util.dart';
import 'package:hgmj/hj_utils/video_cache_manager.dart';
import 'package:hgmj/tools_base/cache/cache_util.dart';
import 'package:hgmj/tools_base/cache/image_cache_manager.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/image/image_disk_cache.dart';
import 'package:hgmj/tools_base/video_download/video_download_manager.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/config/config.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/hj_utils/version_util.dart';
import 'package:wydj/hj_utils/video_cache_manager.dart';
import 'package:wydj/tools_base/cache/cache_util.dart';
import 'package:wydj/tools_base/cache/image_cache_manager.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/image/image_disk_cache.dart';
import 'package:wydj/tools_base/video_download/video_download_manager.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import 'package:hgmj/tools_base/widget/common_alert.dart';
import 'package:wydj/tools_base/widget/common_alert.dart';
import '../../../alert/splash/update_dialog.dart';
import '../identity/mine_identity_page.dart';
@@ -103,7 +103,8 @@ class _MineSettingPageState extends State<MineSettingPage> {
}
return;
}
Get.to(() => const SettingProfilePage(SettingProfileType.nickName));
Get.to(() =>
const SettingProfilePage(SettingProfileType.nickName));
}),
_buildLine(),
_buildItem(
@@ -167,7 +168,9 @@ class _MineSettingPageState extends State<MineSettingPage> {
onTap: () {
//比对启动页拉到的版本配置,确实有新版才弹更新框
final target = checkUpdate();
target == null ? showToast("当前已是最新版!") : UpdateDialog.show(target);
target == null
? showToast("当前已是最新版!")
: UpdateDialog.show(target);
}),
_buildLine(),
],
@@ -197,7 +200,8 @@ class _MineSettingPageState extends State<MineSettingPage> {
children: [
Text(
title,
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 14),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9), fontSize: 14),
),
Spacer(),
if (avatarUrl != null)
@@ -210,13 +214,15 @@ class _MineSettingPageState extends State<MineSettingPage> {
if (subTitle != null)
Text(
subTitle,
style: TextStyle(color: Colors.white.withValues(alpha: 0.45), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.45), fontSize: 12),
),
if (showCopy) ...[
4.sizeBoxW,
GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(text: '${globalStore.meInfo?.uid}'));
Clipboard.setData(
ClipboardData(text: '${globalStore.meInfo?.uid}'));
showToast('复制成功');
},
child: Container(
@@ -230,7 +236,10 @@ class _MineSettingPageState extends State<MineSettingPage> {
),
child: const Text(
'复制',
style: TextStyle(color: Colors.black, fontSize: 12, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontWeight: FontWeight.w500),
),
),
),
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import 'package:wydj/tools_base/toast.dart';
import 'mine_setting_profile_page.dart';
import 'setting_profile_widget.dart';
@@ -76,7 +76,8 @@ class SettingSloganController extends MineSettingProfilePage {
}
}
MineSettingProfilePage instanceSettingProfileController(SettingProfileType type) {
MineSettingProfilePage instanceSettingProfileController(
SettingProfileType type) {
switch (type) {
case SettingProfileType.nickName:
return SettingNickNameController();
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'mine_setting_profile_logic.dart';
@@ -1,8 +1,8 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/base_list_controller.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/base_list_controller.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/toast.dart';
class SettingAvatarLogic extends ListBaseLogic<String> {
int selectIndex = -1;
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import 'setting_avatar_logic.dart';
@@ -21,11 +21,13 @@ class SettingAvatarPage extends StatelessWidget {
appBar: AppBar(
title: Text('选择头像'),
actions: [
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: controller.confirmChangeAvatar,
child: Text(
'保存',
style: TextStyle(color: Colors.white.withValues(alpha: 0.55), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.55), fontSize: 12),
),
),
16.sizeBoxW,
@@ -48,7 +50,8 @@ class SettingAvatarPage extends StatelessWidget {
10.verticalSpace,
Text(
'当前头像',
style: TextStyle(color: Colors.white.withValues(alpha: 0.55), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.55), fontSize: 12),
),
20.verticalSpace,
Expanded(
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'mine_setting_profile_logic.dart';
@@ -35,21 +35,27 @@ class _SettingNickNameState extends State<SettingNickName> {
child: TextField(
controller: controller.nickNameTfCtr,
maxLength: 20,
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 18),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9), fontSize: 18),
decoration: InputDecoration(
border: InputBorder.none,
hintText: '输入新的昵称',
hintStyle: TextStyle(color: Colors.white.withValues(alpha: 0.35), fontSize: 18),
hintStyle: TextStyle(
color: Colors.white.withValues(alpha: 0.35),
fontSize: 18),
counterText: '',
isCollapsed: true,
contentPadding: EdgeInsets.zero),
),
),
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => controller.nickNameTfCtr.clear(),
child: Container(
padding: EdgeInsets.all(2),
decoration: BoxDecoration(color: Colors.black.withValues(alpha: 0.9), borderRadius: BorderRadius.circular(90)),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.9),
borderRadius: BorderRadius.circular(90)),
child: Image.asset(
'close_button.png'.commonImgPath,
width: 24,
@@ -62,7 +68,8 @@ class _SettingNickNameState extends State<SettingNickName> {
12.sizeBoxH,
Text(
'昵称30天内可修改4次',
style: TextStyle(color: Colors.white.withValues(alpha: 0.35), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.35), fontSize: 12),
)
],
),
@@ -85,7 +92,9 @@ class _SettingSloganState extends State<SettingSlogan> {
return Container(
margin: EdgeInsets.only(left: 16, top: 12, right: 16),
padding: EdgeInsets.all(10),
decoration: BoxDecoration(color: Colors.black.withValues(alpha: .04), borderRadius: BorderRadius.circular(8)),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: .04),
borderRadius: BorderRadius.circular(8)),
constraints: BoxConstraints(
minHeight: 111,
),
+174 -165
View File
@@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/config/config.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/config/config.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:provider/provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
@@ -49,176 +49,185 @@ class MineSharePage extends StatelessWidget {
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
spacing: 10.w,
children: [
RepaintBoundary(
key: boundaryKey,
child: Container(
margin: EdgeInsets.only(top: 30),
padding: EdgeInsets.symmetric(horizontal: 16),
child: SizedBox(
width: 300,
child: Stack(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(9),
child: Image.asset('share_bg.webp'.mineImgPath),
),
// 整张卡片统一响应 meInfo 变化:头像/邀请码/二维码同源刷新
Consumer<GlobalStore>(
builder: (_, provider, __) {
final me = provider.meInfo;
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
spacing: 10.w,
children: [
RepaintBoundary(
key: boundaryKey,
child: Container(
margin: EdgeInsets.only(top: 30),
padding: EdgeInsets.symmetric(horizontal: 16),
child: SizedBox(
width: 300,
child: Stack(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(9),
child: Image.asset('share_bg.webp'.mineImgPath),
),
// 整张卡片统一响应 meInfo 变化:头像/邀请码/二维码同源刷新
Consumer<GlobalStore>(
builder: (_, provider, __) {
final me = provider.meInfo;
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
30.sizeBoxH,
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45),
border: Border.all(
color: Color(0x4DF68804), width: 3),
),
child: NetworkImageLoader(
imageUrl: me?.portrait ?? '',
width: 82,
height: 82,
borderRadius: 45),
),
10.sizeBoxH,
Text(
'我的邀请码',
style: TextStyle(
color: Colors.white.withValues(alpha: .9),
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
10.sizeBoxH,
Text(
me?.promotionCode ?? "",
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
30.sizeBoxH,
Text("每邀请3人,送3天VIP",
style: TextStyle(
fontSize: 14, color: Color(0xffFFC000))),
10.sizeBoxH,
Row(
children: [
30.sizeBoxH,
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45),
border: Border.all(color: Color(0x4DF68804), width: 3),
),
child: NetworkImageLoader(
imageUrl: me?.portrait ?? '', width: 82, height: 82, borderRadius: 45),
),
10.sizeBoxH,
Text(
'我的邀请码',
style: TextStyle(
color: Colors.white.withValues(alpha: .9),
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
10.sizeBoxH,
Text(
me?.promotionCode ?? "",
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
30.sizeBoxH,
Text("每邀请3人,送3天VIP", style: TextStyle(fontSize: 14, color: Color(0xffFFC000))),
10.sizeBoxH,
Row(
children: [
Spacer(),
Center(
child: Container(
padding: EdgeInsets.all(11.w),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("code_bg.webp".mineImgPath),
fit: BoxFit.fill,
),
),
child: Container(
padding: EdgeInsets.all(6.w),
color: Colors.white,
child: QrImageView(
data: me?.promoteURL ?? "",
version: QrVersions.auto,
size: 100,
backgroundColor: Colors.white,
),
),
Spacer(),
Center(
child: Container(
padding: EdgeInsets.all(11.w),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
"code_bg.webp".mineImgPath),
fit: BoxFit.fill,
),
),
Spacer(),
],
),
4.sizeBoxH,
Text(
'提示*苹果手机请用相机扫码/安卓手机\n推荐UC浏览器扫码',
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
),
textAlign: TextAlign.center,
),
6.sizeBoxH,
Container(
height: 30,
padding: EdgeInsets.symmetric(horizontal: 18, vertical: 3),
child: Text(
'${Config.appName} 官网地址 ${Address.groundUrl}',
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
child: Container(
padding: EdgeInsets.all(6.w),
color: Colors.white,
child: QrImageView(
data: me?.promoteURL ?? "",
version: QrVersions.auto,
size: 100,
backgroundColor: Colors.white,
),
),
),
),
Spacer(),
],
);
},
),
],
),
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
padding: EdgeInsets.symmetric(vertical: 12),
child: Column(
children: [
GestureDetector(
onTap: () async {
final ok = await ImageUtil.saveWidgetToAlbum(boundaryKey);
showToast(ok ? "保存成功" : "保存失败,请重试");
),
4.sizeBoxH,
Text(
'提示*苹果手机请用相机扫码/安卓手机\n推荐UC浏览器扫码',
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
),
textAlign: TextAlign.center,
),
6.sizeBoxH,
Container(
height: 30,
padding: EdgeInsets.symmetric(
horizontal: 18, vertical: 3),
child: Text(
'${Config.appName} 官网地址 ${Address.groundUrl}',
style: TextStyle(
color: Colors.white.withValues(alpha: .55),
fontSize: 12,
fontWeight: FontWeight.w400,
),
),
),
],
);
},
child: Container(
height: 44,
alignment: Alignment.center,
margin: EdgeInsets.symmetric(
horizontal: 78,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(22),
color: AppColors.actionRed,
),
child: Text(
"保存图片",
style: TextStyle(
fontSize: 16,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
),
16.sizeBoxH,
GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(text: globalStore.meInfo?.promoteURL ?? ""));
showToast('复制成功');
},
child: Container(
width: 112,
height: 44,
alignment: Alignment.center,
child: Text(
"复制链接",
style: TextStyle(
fontSize: 12,
color: Color(0x8CFFFFFF),
decoration: TextDecoration.underline, // 添加下划线
decorationColor: Color(0xFF11887C), // 下划线颜色
decorationThickness: 1.0, // 下划线粗细
decorationStyle: TextDecorationStyle.solid, // 下划线样式
),
),
),
),
],
),
),
],
)),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
padding: EdgeInsets.symmetric(vertical: 12),
child: Column(
children: [
GestureDetector(
onTap: () async {
final ok = await ImageUtil.saveWidgetToAlbum(boundaryKey);
showToast(ok ? "保存成功" : "保存失败,请重试");
},
child: Container(
height: 44,
alignment: Alignment.center,
margin: EdgeInsets.symmetric(
horizontal: 78,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(22),
color: AppColors.actionRed,
),
child: Text(
"保存图片",
style: TextStyle(
fontSize: 16,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
),
16.sizeBoxH,
GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(
text: globalStore.meInfo?.promoteURL ?? ""));
showToast('复制成功');
},
child: Container(
width: 112,
height: 44,
alignment: Alignment.center,
child: Text(
"复制链接",
style: TextStyle(
fontSize: 12,
color: Color(0x8CFFFFFF),
decoration: TextDecoration.underline, // 添加下划线
decorationColor: Color(0xFF11887C), // 下划线颜色
decorationThickness: 1.0, // 下划线粗细
decorationStyle: TextDecorationStyle.solid, // 下划线样式
),
),
),
),
],
),
),
],
)),
);
}
}
@@ -1,6 +1,6 @@
import 'package:hgmj/hj_model/user/user_income_info_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/user/user_income_info_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/base_list_controller.dart';
import '../../../hj_model/mine/promotion_record.dart';
@@ -21,7 +21,8 @@ class MineShareRecordLogic extends ListBaseLogic<Promotion> {
}
// 邀请记录列表:下拉刷新 / 上拉加载更多(分页、防重入、异常兜底交给基类)
void loadData({bool isRefresh = true}) => fetchData(isRefresh: isRefresh, fetch: _fetch);
void loadData({bool isRefresh = true}) =>
fetchData(isRefresh: isRefresh, fetch: _fetch);
Future<(List<Promotion>?, bool)> _fetch(int page) async {
final resp = await MineService.getBindRecord(10, page);
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_model/mine/promotion_record.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_model/mine/promotion_record.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../../hj_utils/widget_util.dart';
import 'mine_share_record_logic.dart';
@@ -23,7 +23,8 @@ class MineShareRecordPage extends StatelessWidget {
body: Column(
children: [
12.sizeBoxH,
Text('已邀请:${logic.model?.totalInviteUserCount ?? 0}人', style: textStyle(12, Color(0xff525252), FontWeight.w400)),
Text('已邀请:${logic.model?.totalInviteUserCount ?? 0}人',
style: textStyle(12, Color(0xff525252), FontWeight.w400)),
Expanded(
child: pullYsRefresh(
onInit: (ctr) => logic.refreshCtr = ctr,
@@ -48,7 +49,8 @@ class MineShareRecordPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
shrinkWrap: true,
itemCount: list.length,
separatorBuilder: (_, __) => Divider(height: 0.5, color: Colors.white.withValues(alpha: .1)),
separatorBuilder: (_, __) =>
Divider(height: 0.5, color: Colors.white.withValues(alpha: .1)),
itemBuilder: (_, index) => _buildItemView(list[index]),
);
}
@@ -60,9 +62,7 @@ class MineShareRecordPage extends StatelessWidget {
width: double.infinity,
margin: const EdgeInsets.symmetric(vertical: 12),
decoration: BoxDecoration(
color: Color(0x0D1F2029),
borderRadius: BorderRadius.circular(8)
),
color: Color(0x0D1F2029), borderRadius: BorderRadius.circular(8)),
child: Row(
children: [
NetworkImageLoader(
@@ -74,12 +74,18 @@ class MineShareRecordPage extends StatelessWidget {
11.sizeBoxW,
Text(
item.name ?? '',
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 16.0),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 16.0),
),
Spacer(),
Text(
'注册时间:${item.createAt.utcToYMD(gap: '/')}',
style: TextStyle(color: Colors.white.withValues(alpha: .5), fontWeight: FontWeight.w400, fontSize: 12.0),
style: TextStyle(
color: Colors.white.withValues(alpha: .5),
fontWeight: FontWeight.w400,
fontSize: 12.0),
)
],
),
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/api_service/drama_service.dart';
import 'package:hgmj/hj_utils/const.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/api_service/drama_service.dart';
import 'package:wydj/hj_utils/const.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../../../hj_model/video_model.dart';
import '../../../tools_base/toast.dart';
@@ -171,7 +171,8 @@ class _VideoCacheCellState extends State<VideoCacheCell> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: const TextStyle(fontSize: 11, color: Color(0xffd43f61), height: 1.5),
style: const TextStyle(
fontSize: 11, color: Color(0xffd43f61), height: 1.5),
),
),
// 仅下载完成且非动漫显示"保存到相册",避免下载中误触 + 右侧溢出
@@ -218,7 +219,8 @@ class _VideoCacheCellState extends State<VideoCacheCell> {
child: Text(
"${(model.progress * 100).toStringAsFixed(1)}%",
textAlign: TextAlign.right,
style: const TextStyle(fontSize: 11, color: Color(0xffaab2b7), height: 1.2),
style: const TextStyle(
fontSize: 11, color: Color(0xffaab2b7), height: 1.2),
),
),
],
@@ -282,7 +284,8 @@ class _VideoCacheCellState extends State<VideoCacheCell> {
mainAxisSize: MainAxisSize.min, // 按内容收窄,不再固定 120 宽
children: [
Image.asset(
(isDownloading ? "cache_stop.webp" : "cache_start.webp").videoPath,
(isDownloading ? "cache_stop.webp" : "cache_start.webp")
.videoPath,
width: 10,
fit: BoxFit.cover,
),
@@ -323,7 +326,8 @@ class _VideoCacheCellState extends State<VideoCacheCell> {
),
),
child: Image.asset(
(selected ? "cache_selected.webp" : "cache_unselected.webp").videoPath,
(selected ? "cache_selected.webp" : "cache_unselected.webp")
.videoPath,
key: ValueKey(selected),
width: 40,
height: 40,
@@ -366,7 +370,8 @@ class VideoACGCacheCell extends StatelessWidget {
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 12,
color: model.updateStatus == 2 ? Color(0xff757575) : Color(0xffFFC000),
color:
model.updateStatus == 2 ? Color(0xff757575) : Color(0xffFFC000),
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/const.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/const.dart';
import 'package:wydj/tools_base/debug_log.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../hj_model/video_model.dart';
import '../../../tools_base/video_download/video_cache_store.dart';
@@ -13,7 +13,12 @@ class VideoCacheLogic extends GetxController with GetTickerProviderStateMixin {
static const removeAnimDuration = Duration(milliseconds: 260);
//顺序与 _cacheMap 一致
final tabStyles = const [MediaStyle.Video, MediaStyle.ShortVideo, MediaStyle.Drama, MediaStyle.Cartoon];
final tabStyles = const [
MediaStyle.Video,
MediaStyle.ShortVideo,
MediaStyle.Drama,
MediaStyle.Cartoon
];
late final tabTitles = tabStyles.map((e) => e.cacheTabTitle).toList();
@@ -31,7 +36,8 @@ class VideoCacheLogic extends GetxController with GetTickerProviderStateMixin {
List<VideoModel> listOf(MediaStyle style) => _cacheMap[style] ?? const [];
List<VideoModel> get allVideos => [for (final list in _cacheMap.values) ...list];
List<VideoModel> get allVideos =>
[for (final list in _cacheMap.values) ...list];
bool isLoading = true;
bool isEditing = false;
@@ -73,7 +79,9 @@ class VideoCacheLogic extends GetxController with GetTickerProviderStateMixin {
/// cell 挂载时注册自己的局部刷新回调
void registerCellRefresher(VideoModel model, VoidCallback refresh) {
_cellRefreshers.putIfAbsent(VideoDownloadManager.taskKey(model.realVideoUrl), () => {}).add(refresh);
_cellRefreshers
.putIfAbsent(VideoDownloadManager.taskKey(model.realVideoUrl), () => {})
.add(refresh);
}
/// cell 卸载 / 换绑视频时注销
@@ -115,7 +123,8 @@ class VideoCacheLogic extends GetxController with GetTickerProviderStateMixin {
for (final entry in _cacheMap.entries) {
entry.value
..clear()
..addAll(await VideoCacheStore.instance.getMovieCacheVideoList(entry.key));
..addAll(
await VideoCacheStore.instance.getMovieCacheVideoList(entry.key));
}
// 本地记录只有 url,进度/暂停态要逐条问下载器;顺带把 _callback 挂上去
for (final item in allVideos) {
@@ -223,7 +232,8 @@ class VideoCacheLogic extends GetxController with GetTickerProviderStateMixin {
// 表现为「短视频页点下载 → 来缓存页看一眼 → 退回去,那个按钮的进度就再也不动了」。
// _callback 是同一个实例注册在多个 url 上(_loadData 逐个 searchInfo 都传了它),故逐个摘除
for (final item in allVideos) {
VideoDownloadManager.instance.removeCallback(item.realVideoUrl, _callback);
VideoDownloadManager.instance
.removeCallback(item.realVideoUrl, _callback);
}
_cellRefreshers.clear();
tabCtr.dispose();
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/const.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:hgmj/tools_base/widget/stagger_in_item.dart';
import 'package:wydj/hj_utils/const.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/tools_base/widget/stagger_in_item.dart';
import '../../../hj_model/drama_media_info.dart';
import '../../../hj_model/video_model.dart';
@@ -32,7 +32,8 @@ class VideoCachePage extends StatelessWidget {
enableFeedback: false,
onTap: () => logic.editEvent(),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 12),
padding:
const EdgeInsets.symmetric(horizontal: 6, vertical: 12),
alignment: Alignment.centerRight,
child: Text(
logic.isEditing ? "删除" : "编辑",
@@ -58,7 +59,8 @@ class VideoCachePage extends StatelessWidget {
indicatorWeight: 1,
unselectedLabelColor: Color(0x8CFFFFFF),
unselectedLabelStyle: TextStyle(fontSize: 14),
labelStyle: TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
labelStyle: TextStyle(
fontSize: 14, fontWeight: FontWeight.w500),
labelColor: Color(0xE5FFFFFF),
tabs: logic.tabTitles
.map(
@@ -76,7 +78,8 @@ class VideoCachePage extends StatelessWidget {
controller: logic.tabCtr,
children: [
// keepAlive:切 tab 不重建,保留滚动位置,也避免入场动画反复重播
for (final style in logic.tabStyles) _buildGrid(logic, style).keepAlive,
for (final style in logic.tabStyles)
_buildGrid(logic, style).keepAlive,
],
),
)
@@ -96,7 +99,10 @@ class VideoCachePage extends StatelessWidget {
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//短剧跟「热门短剧」橱窗同规格:2 列 168/266
crossAxisCount: style == MediaStyle.ShortVideo || style == MediaStyle.Cartoon ? 3 : 2,
crossAxisCount:
style == MediaStyle.ShortVideo || style == MediaStyle.Cartoon
? 3
: 2,
crossAxisSpacing: 6,
mainAxisSpacing: 12,
childAspectRatio: switch (style) {
@@ -123,7 +129,8 @@ class VideoCachePage extends StatelessWidget {
}
/// 单个缓存 cell:被标记删除时缩放 + 淡出(时长与 logic 一致,播完 logic 才真删数据)
Widget _buildCell(VideoCacheLogic logic, VideoModel videoModel, MediaStyle style) {
Widget _buildCell(
VideoCacheLogic logic, VideoModel videoModel, MediaStyle style) {
final isRemoving = logic.isRemoving(videoModel);
// 退场中屏蔽点击:opacity 到 0 也照样命中手势,否则那 260 毫秒里
// 点到看不见的 cell 会跳进播放页
@@ -159,7 +166,8 @@ class VideoCachePage extends StatelessWidget {
//下载就是为了离线看:有本地文件就直接放,不进二级页——二级页是纯网络播放器
//(VideoPlayerBaseLogic.initPlayer 只认 network),进那儿等于没用上下好的文件,断网还打不开
if (style == MediaStyle.Drama && videoModel.localPath?.isNotEmpty == true) {
_playLocal(videoModel, '${videoModel.title ?? ""} 第${videoModel.episodeNo ?? 1}集');
_playLocal(videoModel,
'${videoModel.title ?? ""} 第${videoModel.episodeNo ?? 1}集');
return;
}
//没下完(或只有下载态没落到文件)的没有本地文件可放,进二级页在线看这一集:
@@ -179,11 +187,13 @@ class VideoCachePage extends StatelessWidget {
_playLocal(videoModel, videoModel.title ?? "");
return;
}
pushToVideoPage(videoModel: videoModel, isCartoon: videoModel.videoType == 1);
pushToVideoPage(
videoModel: videoModel, isCartoon: videoModel.videoType == 1);
}
/// 用本地文件播([SimpleVideoPlayerLogic] 拿到 localPath 就走 PlayerFactory.file)
void _playLocal(VideoModel videoModel, String title) => Get.to(SimpleVideoPlayerPage(
void _playLocal(VideoModel videoModel, String title) =>
Get.to(SimpleVideoPlayerPage(
localPath: videoModel.localPath,
videoUrl: videoModel.realVideoUrl,
title: title,
@@ -2,11 +2,11 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../widgets/gradient_text.dart';
@@ -16,7 +16,8 @@ class UserChargeView extends StatelessWidget {
/// true:旧版文案/配色(会员中心 A / DISABLED)
final bool classic;
const UserChargeView({super.key, this.isFromCoin = false, this.classic = false});
const UserChargeView(
{super.key, this.isFromCoin = false, this.classic = false});
@override
Widget build(BuildContext context) {
@@ -49,7 +50,9 @@ class UserChargeView extends StatelessWidget {
Text(
provider.meInfo == null
? '未知'
: provider.meInfo?.name?.substring(0, min(provider.meInfo?.name?.length ?? 0, 9)) ?? '',
: provider.meInfo?.name?.substring(
0, min(provider.meInfo?.name?.length ?? 0, 9)) ??
'',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: const TextStyle(
@@ -61,7 +64,8 @@ class UserChargeView extends StatelessWidget {
8.sizeBoxW,
if (!provider.isVIP)
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
padding:
const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(color: Color(0x14FFFFFF), width: 1),
@@ -138,7 +142,9 @@ class UserChargeView extends StatelessWidget {
Text(
provider.meInfo == null
? '未知'
: provider.meInfo?.name?.substring(0, min(provider.meInfo?.name?.length ?? 0, 9)) ?? '',
: provider.meInfo?.name?.substring(
0, min(provider.meInfo?.name?.length ?? 0, 9)) ??
'',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
@@ -148,7 +154,8 @@ class UserChargeView extends StatelessWidget {
),
),
12.sizeBoxW,
if (provider.isVIP && vipIcon.isNotEmpty) Image.asset(vipIcon, height: 20),
if (provider.isVIP && vipIcon.isNotEmpty)
Image.asset(vipIcon, height: 20),
],
),
4.sizeBoxH,
@@ -1,6 +1,6 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../hj_model/mine/exchange/recharge_list_model.dart';
import '../../../hj_model/mine/exchange/recharge_type_list_model.dart';
@@ -14,7 +14,8 @@ class MineChargeCoinLogic extends GetxController {
/// 下单埋点上下文(短剧付费墙要带 mediaId/contentId/checkoutContextId 做归因)
final PayOrderTrackInfo? orderTrack;
MineChargeCoinLogic({this.sourcePage = PaySourcePage.unknown, this.orderTrack});
MineChargeCoinLogic(
{this.sourcePage = PaySourcePage.unknown, this.orderTrack});
bool isInitLoading = true; // 首屏加载中
RechargeListModel? model; // 金币充值档位列表
@@ -57,7 +58,8 @@ class MineChargeCoinLogic extends GetxController {
Get.bottomSheet(
OnlinePayPage(
coinRcModel: selectedCoin,
orderTrack: (orderTrack ?? const PayOrderTrackInfo()).copyWith(sourcePage: sourcePage),
orderTrack: (orderTrack ?? const PayOrderTrackInfo())
.copyWith(sourcePage: sourcePage),
),
isScrollControlled: true,
);
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:provider/provider.dart';
import '../../../hj_utils/widget_util.dart';
@@ -20,7 +20,8 @@ class MineChargeCoinPage extends StatelessWidget {
/// 下单来源,入口不传则 UNKNOWN(金币没有专属来源枚举,别拿会员的顶上)
final PaySourcePage sourcePage;
const MineChargeCoinPage({super.key, this.sourcePage = PaySourcePage.unknown});
const MineChargeCoinPage(
{super.key, this.sourcePage = PaySourcePage.unknown});
@override
Widget build(BuildContext context) {
@@ -31,7 +32,8 @@ class MineChargeCoinPage extends StatelessWidget {
return Scaffold(
body: () {
if (controller.isInitLoading) return const LoadingCenterWidget();
if (controller.model == null) return CErrorWidget(retryOnTap: () => controller.loadData());
if (controller.model == null)
return CErrorWidget(retryOnTap: () => controller.loadData());
return Column(
children: [
Expanded(
@@ -50,10 +52,12 @@ class MineChargeCoinPage extends StatelessWidget {
actions: [
InkWell(
enableFeedback: false,
onTap: () => Get.to(RecordsPage(RecordType.recharge)),
onTap: () =>
Get.to(RecordsPage(RecordType.recharge)),
child: Text(
'充值记录',
style: TextStyle(color: Color(0xff666666), fontSize: 16.sp),
style: TextStyle(
color: Color(0xff666666), fontSize: 16.sp),
),
),
18.w.sizeBoxW
@@ -75,7 +79,8 @@ class MineChargeCoinPage extends StatelessWidget {
SliverPadding(
padding: EdgeInsets.symmetric(horizontal: 16),
sliver: SliverGrid.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
mainAxisSpacing: 12,
crossAxisSpacing: 6,
@@ -84,7 +89,8 @@ class MineChargeCoinPage extends StatelessWidget {
itemCount: controller.model?.list?.length ?? 0,
itemBuilder: (BuildContext context, int index) {
final model = controller.model!.list![index];
final isSelected = controller.selectedCoin?.id == model.id;
final isSelected =
controller.selectedCoin?.id == model.id;
return CoinItem(
model,
onTap: () => controller.onSelectCoin(index),
@@ -97,7 +103,8 @@ class MineChargeCoinPage extends StatelessWidget {
SliverToBoxAdapter(
child: Text(
'*如提示【交易失败】【账户风险】等,可重新发起订单,或在15分钟后重试支付。',
style: TextStyle(color: Color(0xff666666), fontSize: 12),
style:
TextStyle(color: Color(0xff666666), fontSize: 12),
).paddingSymmetric(horizontal: 16),
),
],
@@ -122,11 +129,16 @@ class MineChargeCoinPage extends StatelessWidget {
child: Container(
height: 44,
margin: EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(color: AppColors.actionRed, borderRadius: BorderRadius.circular(22)),
decoration: BoxDecoration(
color: AppColors.actionRed,
borderRadius: BorderRadius.circular(22)),
alignment: Alignment.center,
child: Text(
'¥${controller.selectedCoin?.moneyYuan ?? 0}/立即支付',
style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.w500),
),
),
),
@@ -151,7 +163,10 @@ class MineChargeCoinPage extends StatelessWidget {
children: [
Text(
'我的金币余额',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w500),
),
8.sizeBoxH,
Row(
@@ -164,13 +179,17 @@ class MineChargeCoinPage extends StatelessWidget {
final total = (wallet?.amount ?? 0) + (wallet?.income ?? 0);
return Text(
"$total",
style: TextStyle(color: Color(0xffFFD460), fontSize: 32, fontWeight: FontWeight.w600),
style: TextStyle(
color: Color(0xffFFD460),
fontSize: 32,
fontWeight: FontWeight.w600),
);
}),
Spacer(),
InkWell(
enableFeedback: false,
onTap: () => Get.to(RecordsPage(RecordType.bill), opaque: false),
onTap: () =>
Get.to(RecordsPage(RecordType.bill), opaque: false),
child: Container(
alignment: Alignment.center,
height: 30,
@@ -1,11 +1,11 @@
import 'package:carousel_slider/carousel_controller.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:hgmj/alert/vip_guide/guide_manager.dart';
import 'package:hgmj/alert/vip_guide/timed_popup_manager.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/alert/vip_guide/guide_manager.dart';
import 'package:wydj/alert/vip_guide/timed_popup_manager.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../../../alert/vip_guide/guide_countdown_dialog.dart';
import '../../../alert/vip_guide/guide_config.dart';
@@ -35,7 +35,11 @@ class MineChargeVipLogic extends GetxController {
/// 入口透传的整份下单上下文,字段比 [videoId] 全时以它为准(短剧付费墙带 mediaId/contentId/checkoutContextId)
final PayOrderTrackInfo? orderTrack;
MineChargeVipLogic({this.vipID, this.sourcePage = PaySourcePage.vipCenter, this.videoId, this.orderTrack});
MineChargeVipLogic(
{this.vipID,
this.sourcePage = PaySourcePage.vipCenter,
this.videoId,
this.orderTrack});
/// 当前选中的会员卡(页面级状态,多入口各自独立)
VipProductModel? currentProductModel;
@@ -101,7 +105,8 @@ class MineChargeVipLogic extends GetxController {
void _selectCard(VipProductModel card) {
_guideCardId = card.productID;
if (vipProductManager.isLoading || !pageCtr.ready) return;
final index = vipProductManager.vipCards.indexWhere((e) => e.productID == card.productID);
final index = vipProductManager.vipCards
.indexWhere((e) => e.productID == card.productID);
if (index >= 0) pageCtr.animateToPage(index, curve: Curves.fastOutSlowIn);
}
@@ -113,13 +118,17 @@ class MineChargeVipLogic extends GetxController {
/// 数据就绪后按优先级确定默认选中卡,并滚动到对应位置;UI 展示后再上报曝光
void _syncSelection() {
currentProductModel = vipProductManager.defaultVipCard(vipID: _guideCardId ?? vipID, current: currentProductModel);
currentProductModel = vipProductManager.defaultVipCard(
vipID: _guideCardId ?? vipID, current: currentProductModel);
final pid = currentProductModel?.productID;
final index = pid == null ? -1 : vipProductManager.vipCards.indexWhere((e) => e.productID == pid);
final index = pid == null
? -1
: vipProductManager.vipCards.indexWhere((e) => e.productID == pid);
// 会话尽早创建:避免仅在 post-frame 里建,用户快速返回时 onClose 拿不到 session、CLOSE 丢报。
// 必须等有卡数据再建:首次请求失败时卡列表还是空,会把「无实验」快照锁进 session,
// 之后错误页重试成功也不会上报(快照 late final 不可变)。
if (vipProductManager.vipCards.isNotEmpty) _analytics ??= VipCardAnalyticsSession();
if (vipProductManager.vipCards.isNotEmpty)
_analytics ??= VipCardAnalyticsSession();
WidgetsBinding.instance.addPostFrameCallback((_) {
if (isClosed) return;
// 卡列表为空时页面渲染的是错误页,轮播压根没 build,controller 没 attach,
@@ -127,7 +136,8 @@ class MineChargeVipLogic extends GetxController {
if (index >= 0 && pageCtr.ready) pageCtr.jumpToPage(index);
// 曝光必须在 UI 实际展示后上报
_analytics?.reportPageViewAfterPaint();
_analytics?.reportProductImpression(currentProductModel, afterPaint: true);
_analytics?.reportProductImpression(currentProductModel,
afterPaint: true);
});
update();
}
@@ -143,7 +153,8 @@ class MineChargeVipLogic extends GetxController {
final model = data[index];
final card = VipCardItem(
model,
isSelect: currentProductModel?.productID != null && currentProductModel?.productID == model.productID,
isSelect: currentProductModel?.productID != null &&
currentProductModel?.productID == model.productID,
callback: () {
pageCtr.animateToPage(index, curve: Curves.fastOutSlowIn);
},
@@ -202,7 +213,8 @@ class MineChargeVipLogic extends GetxController {
checkoutContextId: base?.checkoutContextId,
sessionId: base?.sessionId ?? _analytics?.sessionId,
experimentId: vipProductManager.isExperimentActive
? (currentProductModel?.experimentId ?? vipProductManager.experimentId)
? (currentProductModel?.experimentId ??
vipProductManager.experimentId)
: null,
experimentVariant: vipProductManager.isExperimentActive
? (currentProductModel?.variant ?? vipProductManager.variant)
@@ -3,11 +3,11 @@ import 'dart:math' as math;
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/unique_tag_mixin.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/unique_tag_mixin.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../../pre_sale/pre_sale_entry.dart';
@@ -37,12 +37,14 @@ class MineChargeVipPage extends StatefulWidget {
}
// 多入口可叠栈,用 per-实例唯一 tag 隔离 controller,避免轮播/选中卡/onReady 串味
class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMixin {
class _MineChargeVipPageState extends State<MineChargeVipPage>
with UniqueTagMixin {
@override
Widget build(BuildContext context) {
return GetBuilder<MineChargeVipLogic>(
tag: uniqueTag,
init: MineChargeVipLogic(vipID: widget.vipID, sourcePage: widget.sourcePage),
init: MineChargeVipLogic(
vipID: widget.vipID, sourcePage: widget.sourcePage),
builder: (logic) => Consumer<VipProductManager>(
builder: (_, mgr, __) {
// ACTIVE+B → 改版 UI;A / DISABLED / 无实验 → 旧版 UI
@@ -59,7 +61,10 @@ class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMix
InkWell(
enableFeedback: false,
onTap: () => Get.to(RecordsPage(RecordType.recharge)),
child: Text('充值记录', style: TextStyle(color: Colors.white.withValues(alpha: .45), fontSize: 12)),
child: Text('充值记录',
style: TextStyle(
color: Colors.white.withValues(alpha: .45),
fontSize: 12)),
),
16.sizeBoxW,
],
@@ -134,7 +139,8 @@ class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMix
),
],
),
Positioned(bottom: 0, left: 0, right: 0, child: _buildPay(classic: classic)),
Positioned(
bottom: 0, left: 0, right: 0, child: _buildPay(classic: classic)),
],
);
}
@@ -179,7 +185,9 @@ class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMix
mainAxisSize: MainAxisSize.min,
children: [
// classic ? _buildClassicCorePrivileges(coreList) : _buildCorePrivileges(coreList),
classic ? _buildClassicMorePrivileges(privileges) : _buildMorePrivileges(privileges),
classic
? _buildClassicMorePrivileges(privileges)
: _buildMorePrivileges(privileges),
],
);
},
@@ -200,7 +208,7 @@ class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMix
if (list.isEmpty) return const SizedBox.shrink();
return Column(
children: [
// const VipSectionTitle("会员权益", classic: true),
// const VipSectionTitle("会员权益", classic: true),
VipMoreSectionTitleImage(),
12.sizeBoxH,
GridView.builder(
@@ -214,7 +222,8 @@ class _MineChargeVipPageState extends State<MineChargeVipPage> with UniqueTagMix
childAspectRatio: 63 / 100,
),
itemCount: list.length,
itemBuilder: (_, index) => VipProductPrivilegeItem(list[index], classic: true),
itemBuilder: (_, index) =>
VipProductPrivilegeItem(list[index], classic: true),
),
],
);
@@ -256,7 +265,8 @@ class _VipMorePrivilegesPanel extends StatefulWidget {
const _VipMorePrivilegesPanel({required this.list, required this.title});
@override
State<_VipMorePrivilegesPanel> createState() => _VipMorePrivilegesPanelState();
State<_VipMorePrivilegesPanel> createState() =>
_VipMorePrivilegesPanelState();
}
class _VipMorePrivilegesPanelState extends State<_VipMorePrivilegesPanel> {
@@ -274,7 +284,8 @@ class _VipMorePrivilegesPanelState extends State<_VipMorePrivilegesPanel> {
@override
Widget build(BuildContext context) {
final canToggle = widget.list.length > _collapsedCount;
final showCount = (!_expanded && canToggle) ? _collapsedCount : widget.list.length;
final showCount =
(!_expanded && canToggle) ? _collapsedCount : widget.list.length;
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
@@ -299,14 +310,16 @@ class _VipMorePrivilegesPanelState extends State<_VipMorePrivilegesPanel> {
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
mainAxisSpacing: 12,
crossAxisSpacing: 10,
childAspectRatio: 72 / 110,
),
itemCount: showCount,
itemBuilder: (_, index) => VipProductPrivilegeItem(widget.list[index]),
itemBuilder: (_, index) =>
VipProductPrivilegeItem(widget.list[index]),
),
if (canToggle) ...[
8.sizeBoxH,
@@ -326,7 +339,9 @@ class _VipMorePrivilegesPanelState extends State<_VipMorePrivilegesPanel> {
),
),
Icon(
_expanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
_expanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
size: 16,
color: Colors.white.withValues(alpha: 0.55),
),
+90 -36
View File
@@ -3,13 +3,13 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/extension/extensions.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/widget/sheet_handle_bar.dart';
import 'package:wydj/extension/extensions.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/widget/sheet_handle_bar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../../assets_tool/app_colors.dart';
@@ -62,13 +62,16 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
CouponModel? coupon;
// 支付方式列表。会员卡与金币档位二选一,getter 每次访问都会重建列表,故每帧只取一次
List<RchgType> get _payTypes => widget.vipProductModel?.rchgTypeUI ?? widget.coinRcModel!.rechargeTypeListUI;
List<RchgType> get _payTypes =>
widget.vipProductModel?.rchgTypeUI ??
widget.coinRcModel!.rechargeTypeListUI;
/// 支付按钮文案:预售(尾款/升级/预订) → 会员卡(升级/普通) → 金币充值
String get _payText {
final vip = widget.vipProductModel;
if (vip == null) return '¥${widget.coinRcModel?.moneyYuan ?? 0}/立即支付';
if (!vip.isPreSale) return '¥${vip.discountedPriceUI}/${vip.isUpgrade == true ? '补差价升级' : '立即支付'}';
if (!vip.isPreSale)
return '¥${vip.discountedPriceUI}/${vip.isUpgrade == true ? '补差价升级' : '立即支付'}';
// 预售:可付尾款优先,其次升级,最后预订
final preSale = PreSaleProvider();
final detail = preSale.preSaleModel?.detailModel;
@@ -110,11 +113,14 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
18.sizeBoxH,
const Text(
'选择支付方式',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500, color: Colors.white),
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.w500, color: Colors.white),
),
18.sizeBoxH,
//支付方式列表
Wrap(children: [for (var i = 0; i < types.length; i++) _payItem(types[i], i)]),
Wrap(children: [
for (var i = 0; i < types.length; i++) _payItem(types[i], i)
]),
//支付小贴士
Padding(
padding: EdgeInsets.only(bottom: 24.h, left: 16, right: 16),
@@ -123,13 +129,15 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
children: [
Text(
'支付小贴士:',
style: textStyle(14, Colors.white.withValues(alpha: .9), FontWeight.w500),
style: textStyle(
14, Colors.white.withValues(alpha: .9), FontWeight.w500),
),
6.sizeBoxH,
Text(
'''1.因超时支付无法到账,请重新发起。
2.每天发起支付不能超过5次,连续发起且未支付,账号可能被加入黑名单。''',
style: textStyle(12, Colors.white.withValues(alpha: .45), FontWeight.w400),
style: textStyle(
12, Colors.white.withValues(alpha: .45), FontWeight.w400),
),
],
),
@@ -148,7 +156,10 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
),
child: Text(
_payText,
style: TextStyle(fontWeight: FontWeight.w500, fontSize: 20.sp, color: Colors.black),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 20.sp,
color: Colors.black),
),
),
),
@@ -178,15 +189,22 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
margin: EdgeInsets.only(bottom: 20.h),
child: Row(
children: [
icon.isEmpty ? const SizedBox(width: 36, height: 36) : Image.asset(icon, width: 36),
icon.isEmpty
? const SizedBox(width: 36, height: 36)
: Image.asset(icon, width: 36),
13.sizeBoxW,
Expanded(
child: Text(
"${type.typeName}",
style: textStyle(16, Colors.white.withValues(alpha: .9), FontWeight.w500),
style: textStyle(
16, Colors.white.withValues(alpha: .9), FontWeight.w500),
),
),
Image.asset(payIndex == index ? 'radio_sel.png'.commonImgPath : 'mine_withdraw_nor.png'.mineImgPath, width: 16),
Image.asset(
payIndex == index
? 'radio_sel.png'.commonImgPath
: 'mine_withdraw_nor.png'.mineImgPath,
width: 16),
],
),
),
@@ -231,10 +249,14 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
contentId: base.contentId,
checkoutContextId: base.checkoutContextId,
experimentId: vipProductManager.isExperimentActive
? (base.experimentId ?? (vip == null ? null : vip.experimentId ?? vipProductManager.experimentId))
? (base.experimentId ??
(vip == null
? null
: vip.experimentId ?? vipProductManager.experimentId))
: null,
experimentVariant: vipProductManager.isExperimentActive
? (base.experimentVariant ?? (vip == null ? null : vip.variant ?? vipProductManager.variant))
? (base.experimentVariant ??
(vip == null ? null : vip.variant ?? vipProductManager.variant))
: null,
);
final urlModel = await MineService.chargeGoldCoin(
@@ -242,7 +264,9 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
productId: productId,
isVip: vip != null,
goldExtraID: coupon?.cId,
finalPayStatus: vip?.isPreSale == true ? PreSaleProvider().preSaleModel?.detailModel?.balancePayment : null,
finalPayStatus: vip?.isPreSale == true
? PreSaleProvider().preSaleModel?.detailModel?.balancePayment
: null,
orderTrack: orderTrack,
);
LoadingHelper.dismissLoading();
@@ -285,10 +309,20 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
vip?.discountedPrice,
source: 'online_pay',
jumpWalletOnInsufficient: false, // 当前就在充值页,余额不足不跳转
finalPayStatus: vip?.isPreSale == true ? PreSaleProvider().preSaleModel?.detailModel?.balancePayment : null,
finalPayStatus: vip?.isPreSale == true
? PreSaleProvider().preSaleModel?.detailModel?.balancePayment
: null,
// 与 /mine/topay 一致:仅实验 ACTIVE 时回传;sessionId 有则带上
experimentId: experimentActive ? (track?.experimentId ?? vip?.experimentId ?? vipProductManager.experimentId) : null,
experimentVariant: experimentActive ? (track?.experimentVariant ?? vip?.variant ?? vipProductManager.variant) : null,
experimentId: experimentActive
? (track?.experimentId ??
vip?.experimentId ??
vipProductManager.experimentId)
: null,
experimentVariant: experimentActive
? (track?.experimentVariant ??
vip?.variant ??
vipProductManager.variant)
: null,
sessionId: track?.sessionId,
//短剧付费墙开卡:金币余额支付这条也要带归因,否则只有第三方充值那条统计得到
mediaId: track?.mediaId,
@@ -307,7 +341,8 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
}
///代充支付:拼装代充参数后跳 H5 收银台
Future<void> _payByDc(bool isVip, RchgType payType, DCModel? dcModel, int? money) async {
Future<void> _payByDc(
bool isVip, RchgType payType, DCModel? dcModel, int? money) async {
// daichong 是所有会员卡/金币档位共用的同一实例,下面的改写只为拼给 H5,必须在副本上做:
// 原地改会把 payInfos 截成单条(支付方式列表变短→下标越界)、ordUrl 被重复拼 host
final dc = dcModel!.clone();
@@ -341,7 +376,8 @@ class _OnlinePayPageState extends State<OnlinePayPage> {
//bt64
final data = base64Encode(utf8.encode(json.encode(dc)));
if (isVip) VipCardAnalyticsSession.markPurchaseOnActiveSessions();
Get.to(H5Page(title: "代理充值", url: "$channel/?data=$data&token=$token"), opaque: false);
Get.to(H5Page(title: "代理充值", url: "$channel/?data=$data&token=$token"),
opaque: false);
}
}
@@ -378,7 +414,9 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
refreshCtr?.refreshCompleted();
_dataSource.clear();
}
_dataSource.length < 20 ? refreshCtr?.loadNoData() : refreshCtr?.loadComplete();
_dataSource.length < 20
? refreshCtr?.loadNoData()
: refreshCtr?.loadComplete();
_dataSource.addAll(res);
page += 1;
setState(() {});
@@ -411,7 +449,10 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
const Center(
child: Text(
'选择加赠券',
style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.w600),
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.w600),
),
)
],
@@ -443,7 +484,9 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
padding: const EdgeInsets.only(left: 24, right: 11),
alignment: Alignment.centerLeft,
width: double.infinity,
decoration: BoxDecoration(color: Color(0xffff891c).withValues(alpha: .4), borderRadius: BorderRadius.circular(4)),
decoration: BoxDecoration(
color: Color(0xffff891c).withValues(alpha: .4),
borderRadius: BorderRadius.circular(4)),
child: Row(
children: [
//券面额
@@ -460,13 +503,18 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
4.sizeBoxW,
Text(
'${model.price ?? 0}',
style: TextStyle(color: Colors.black, fontSize: 24, fontWeight: FontWeight.w500, height: 33 / 24),
style: TextStyle(
color: Colors.black,
fontSize: 24,
fontWeight: FontWeight.w500,
height: 33 / 24),
)
],
),
Text(
'充值加送金币',
style: TextStyle(color: Colors.black.withValues(alpha: .6), fontSize: 12),
style: TextStyle(
color: Colors.black.withValues(alpha: .6), fontSize: 12),
)
],
),
@@ -476,10 +524,11 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
height: 45,
child: DecoratedBox(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.black.withValues(alpha: 0), Colors.black.withValues(alpha: .5), Colors.black.withValues(alpha: 0)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter),
gradient: LinearGradient(colors: [
Colors.black.withValues(alpha: 0),
Colors.black.withValues(alpha: .5),
Colors.black.withValues(alpha: 0)
], begin: Alignment.topCenter, end: Alignment.bottomCenter),
),
),
),
@@ -512,11 +561,16 @@ class _ChoseCouponViewState extends State<ChoseCouponView> {
GestureDetector(
onTap: () => widget.onSelect(model),
child: Container(
decoration: BoxDecoration(color: Color(0xffF68216), borderRadius: BorderRadius.circular(22)),
decoration: BoxDecoration(
color: Color(0xffF68216),
borderRadius: BorderRadius.circular(22)),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5),
child: Text(
'立即使用',
style: TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.w500),
),
),
)
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/widget/common_dialog.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/widget/common_dialog.dart';
import '../../../tools_base/global_store/store.dart';
@@ -43,7 +43,8 @@ class PaySuccessAlert extends StatelessWidget {
),
),
24.sizeBoxH,
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () {
globalStore.updateUserInfo();
Get.back();
@@ -1,10 +1,10 @@
import 'package:flutter/scheduler.dart';
import 'package:hgmj/hj_model/mine/vip_card_analytics_event.dart';
import 'package:hgmj/hj_page/mine/mine_vip/vip_product_manager.dart';
import 'package:hgmj/hj_page/mine/mine_vip/vip_support_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:wydj/hj_model/mine/vip_card_analytics_event.dart';
import 'package:wydj/hj_page/mine/mine_vip/vip_product_manager.dart';
import 'package:wydj/hj_page/mine/mine_vip/vip_support_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/tools_base/debug_log.dart';
import 'package:uuid/uuid.dart';
/// VIP 卡片统计:一次进入会员卡页/购买弹窗对应一个 session,关闭时按是否下单上报。
@@ -33,10 +33,12 @@ class VipCardAnalyticsSession {
bool _purchased = false;
bool _closed = false;
String? _lastImpressedProductId;
/// 同一帧内 jumpToPage + onPageChanged 去重
String? _pendingImpressionProductId;
static String _nowUtc() => DateTimeUtil.format2utc(DateTime.now().toUtc()) ?? '';
static String _nowUtc() =>
DateTimeUtil.format2utc(DateTime.now().toUtc()) ?? '';
/// DISABLED / 无实验 ID:不上报(空 experimentId 会参数错误)
bool get _canReport {
@@ -82,9 +84,11 @@ class VipCardAnalyticsSession {
}
/// 套餐曝光:选中 / 默认选中各算一次;同 product 连续重复不重复报
void reportProductImpression(VipProductModel? product, {bool afterPaint = false}) {
void reportProductImpression(VipProductModel? product,
{bool afterPaint = false}) {
final productId = product?.productID;
if (productId == null || productId.isEmpty || _closed || !_canReport) return;
if (productId == null || productId.isEmpty || _closed || !_canReport)
return;
if (_lastImpressedProductId == productId) return;
void doReport() {
@@ -128,7 +132,8 @@ class VipCardAnalyticsSession {
_closed = true;
_active.remove(this);
if (_purchased) {
debugLog('VipCardAnalytics', 'skip CLOSE_WITHOUT_PURCHASE: already purchased');
debugLog(
'VipCardAnalytics', 'skip CLOSE_WITHOUT_PURCHASE: already purchased');
return;
}
if (!_canReport) {
+57 -22
View File
@@ -3,9 +3,9 @@ import 'dart:math' as math;
import 'package:easy_rich_text/easy_rich_text.dart';
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../main_page/provider/msg_provider.dart';
import 'vip_product_manager.dart';
@@ -17,7 +17,8 @@ class VipCardItem extends StatefulWidget {
final bool isSelect;
final VipProductModel model;
const VipCardItem(this.model, {super.key, this.callback, this.isSelect = false});
const VipCardItem(this.model,
{super.key, this.callback, this.isSelect = false});
@override
State<StatefulWidget> createState() {
@@ -57,7 +58,11 @@ class _VipCardItemState extends State<VipCardItem> {
if (!_isNewerOfferCard) return null;
final layered = MineMsgProvider().countdownConfig;
if (layered != null) {
return (hour: layered.discountHour, min: layered.discountMin, sec: layered.discountSec);
return (
hour: layered.discountHour,
min: layered.discountMin,
sec: layered.discountSec
);
}
final hours = widget.model.showCountdownTime ?? 0;
if (hours <= 0) return null;
@@ -106,10 +111,9 @@ class _VipCardItemState extends State<VipCardItem> {
}
}
String get _title =>
(widget.model.newName?.trim().isNotEmpty == true)
? widget.model.newName!.trim()
: (widget.model.productName ?? '');
String get _title => (widget.model.newName?.trim().isNotEmpty == true)
? widget.model.newName!.trim()
: (widget.model.productName ?? '');
@override
Widget build(BuildContext context) {
@@ -223,7 +227,10 @@ class _VipCardItemState extends State<VipCardItem> {
? const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xffFBF0CD), Color(0xffE5B75D)],
colors: [
Color(0xffFBF0CD),
Color(0xffE5B75D)
],
)
: null,
),
@@ -273,8 +280,10 @@ class _VipCardItemState extends State<VipCardItem> {
Widget _buildBCardBody(bool selected) {
final titleColor = selected ? const Color(0xff3B2B0E) : Color(0xffF6EEDC);
final priceColor = selected ? const Color(0xff3B2B0E) : const Color(0xffF6EEDC);
final originColor = selected ? const Color(0xff6C644F) : const Color(0xff9A927C);
final priceColor =
selected ? const Color(0xff3B2B0E) : const Color(0xffF6EEDC);
final originColor =
selected ? const Color(0xff6C644F) : const Color(0xff9A927C);
final showOrigin = widget.model.originalPriceUI > 0 &&
widget.model.originalPriceUI != widget.model.discountedPriceUI;
@@ -368,7 +377,10 @@ class _VipCardItemState extends State<VipCardItem> {
4.sizeBoxW,
const Text(
'结束',
style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w600),
style: TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600),
),
],
),
@@ -437,8 +449,10 @@ class _VipCardItemState extends State<VipCardItem> {
fg = const Color(0xFFE8C078);
border = Border.all(color: const Color(0xFFE8C078), width: 0.8);
} else {
bg = apiBg ?? (isMostPopular ? const Color(0xCC1A1A1A) : const Color(0xffE1351F));
fg = apiFg ?? (isMostPopular ? const Color(0xFFE8C078) : const Color(0xE5FFFFFF));
bg = apiBg ??
(isMostPopular ? const Color(0xCC1A1A1A) : const Color(0xffE1351F));
fg = apiFg ??
(isMostPopular ? const Color(0xFFE8C078) : const Color(0xE5FFFFFF));
border = (apiBg == null && isMostPopular)
? Border.all(color: const Color(0xFFE8C078), width: 0.8)
: null;
@@ -508,20 +522,29 @@ class _VipCardItemState extends State<VipCardItem> {
),
child: Text(
value,
style: const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.w500, height: 1.0),
style: const TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.w500,
height: 1.0),
),
);
}
Widget _timerColon() => const Padding(
padding: EdgeInsets.symmetric(horizontal: 3),
child: Text(':', style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w600)),
child: Text(':',
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w600)),
);
}
class VipProductPrivilegeItem extends StatelessWidget {
final NewPrivilege? model;
final bool isShowOnePrivilege;
/// true:旧版白字圆图标样式(会员中心 A / DISABLED)
final bool classic;
@@ -547,7 +570,10 @@ class VipProductPrivilegeItem extends StatelessWidget {
Text(
model?.privilegeName ?? '',
maxLines: 1,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white.withValues(alpha: .9)),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: Colors.white.withValues(alpha: .9)),
),
if (!isShowOnePrivilege) ...[
4.sizeBoxH,
@@ -591,7 +617,8 @@ class VipProductPrivilegeItem extends StatelessWidget {
model?.privilegeName ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white),
style: const TextStyle(
fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white),
),
),
if (!isShowOnePrivilege) ...[
@@ -750,7 +777,11 @@ class VipCorePrivilegeCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
NetworkImageLoader(imageUrl: model?.img ?? '', width: 22, height: 22, borderRadius: 0),
NetworkImageLoader(
imageUrl: model?.img ?? '',
width: 22,
height: 22,
borderRadius: 0),
5.sizeBoxH,
ShaderMask(
shaderCallback: (bounds) => const LinearGradient(
@@ -765,7 +796,10 @@ class VipCorePrivilegeCard extends StatelessWidget {
textAlign: TextAlign.center,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w500),
),
),
3.sizeBoxH,
@@ -807,7 +841,8 @@ class VipCorePrivilegeCard extends StatelessWidget {
raw,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: Color(0xff9A927C), fontSize: 11, height: 1.2),
style:
const TextStyle(color: Color(0xff9A927C), fontSize: 11, height: 1.2),
);
}
}
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_alert.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_alert.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import 'mine_charge_vip_logic.dart';
import 'vip_support_model.dart';
@@ -20,7 +20,8 @@ class VipPayButton extends StatelessWidget {
//预售首付或非升级预售 → 预售按钮(透传会员中心 sessionId / 实验字段)
if (product?.isPreSale == true && product?.isUpgrade == false) {
return PreSaleActivityButton(onTap: () async {
await PreSaleProvider().startPay(product!, orderTrack: logic.buildOrderTrack());
await PreSaleProvider()
.startPay(product!, orderTrack: logic.buildOrderTrack());
logic.update();
});
}
@@ -68,7 +69,8 @@ class VipPayButton extends StatelessWidget {
),
child: Text(
_payText,
style: const TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
),
),
);
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_helper.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_helper.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../hj_page/main_page/provider/msg_provider.dart';
import '../../../hj_page/pre_sale/pre_sale_provider.dart';
@@ -24,7 +24,9 @@ class VipProductManager with ChangeNotifier {
/// 空串必须当「未指定」:分层/实验/短剧默认卡没配时下发的都是空串,
/// 不拦会跟 productID 为空的脏数据撞上
VipProductModel? _pick(List<VipProductModel> list, String? id) =>
(id ?? '').isEmpty ? null : list.firstWhereOrNull((e) => e.productID == id);
(id ?? '').isEmpty
? null
: list.firstWhereOrNull((e) => e.productID == id);
// ===== 会员卡数据 =====
@@ -69,7 +71,8 @@ class VipProductManager with ChangeNotifier {
}
/// 角标配色:按套餐 badgeType 匹配皮肤配置
VipBadgeStyle? badgeStyleFor(String? badgeType) => _uiConfig?.styleFor(badgeType);
VipBadgeStyle? badgeStyleFor(String? badgeType) =>
_uiConfig?.styleFor(badgeType);
// ===== 会员卡:请求 / 组装 =====
@@ -143,7 +146,9 @@ class VipProductManager with ChangeNotifier {
return _pick(vipCards, vipID) ??
_pick(vipCards, MineMsgProvider().payTier?.config?.vipCard) ??
_pick(vipCards, _abCardId) ??
(globalStore.meInfo?.isUpgrade == true ? _cheapestUpgrade(vipCards) : null) ??
(globalStore.meInfo?.isUpgrade == true
? _cheapestUpgrade(vipCards)
: null) ??
_pick(vipCards, current?.productID) ?? // 二次刷新时保留当前选中
vipCards.first;
}
@@ -179,7 +184,9 @@ class VipProductManager with ChangeNotifier {
final card = _pick(list, cardId) ??
_pick(list, MineMsgProvider().payTier?.config?.vipCard) ??
_pick(list, _abCardId) ??
(globalStore.meInfo?.isUpgrade == true ? _cheapestUpgrade(list) : null) ??
(globalStore.meInfo?.isUpgrade == true
? _cheapestUpgrade(list)
: null) ??
list.first;
if (card.rchgTypeUI.isEmpty) {
showToast("未配置支付方式,请联系客服");
@@ -199,8 +206,12 @@ class VipProductManager with ChangeNotifier {
contentId: base.contentId,
checkoutContextId: base.checkoutContextId,
// DISABLED:正常下单但不传实验字段
experimentId: isExperimentActive ? (base.experimentId ?? card.experimentId ?? experimentId) : null,
experimentVariant: isExperimentActive ? (base.experimentVariant ?? card.variant ?? variant) : null,
experimentId: isExperimentActive
? (base.experimentId ?? card.experimentId ?? experimentId)
: null,
experimentVariant: isExperimentActive
? (base.experimentVariant ?? card.variant ?? variant)
: null,
);
analytics?.reportPageViewAfterPaint();
analytics?.reportProductImpression(card, afterPaint: true);
@@ -229,7 +240,9 @@ class VipProductManager with ChangeNotifier {
/// 升级比价用价:预售卡用实际待付(已付首款=尾款 balanceAmount / 未付=定金 advanceAmount),普通卡用 discountedPrice(对齐 mrhs)
int _upgradePrice(VipProductModel card) {
if (card.isPreSale) {
return PreSaleProvider().isPayFirst ? (card.balanceAmount ?? 0) : (card.advanceAmount ?? 0);
return PreSaleProvider().isPayFirst
? (card.balanceAmount ?? 0)
: (card.advanceAmount ?? 0);
}
return card.discountedPrice ?? 0;
}
@@ -1,6 +1,6 @@
//会员支持model
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/pre_sale/pre_sale_provider.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/pre_sale/pre_sale_provider.dart';
import '../../../hj_model/mine/exchange/dc_model.dart';
@@ -71,16 +71,22 @@ class VipSupportModel {
bool? isNewUser;
List<VipProductListModel>? list;
List<VipProductModel>? upgradeableVipCardList;
/// A/B 实验状态:ACTIVE / DISABLED
String? experimentStatus;
/// A/B 实验:实验 ID(下单时原样回传;DISABLED 时后端不返回)
String? experimentId;
/// A/B 实验:分组 A / B(下单时原样回传)
String? variant;
/// A/B 实验:默认选中卡 ID
String? defaultProductId;
/// 皮肤 key,如 vip-card-skin-b(视觉皮肤标识,UI 分支仍以 variant 为准)
String? skinKey;
/// 皮肤 UI 配置(背景图 / 角标样式表)
VipUiConfig? uiConfig;
@@ -102,7 +108,8 @@ class VipSupportModel {
});
VipSupportModel.fromJson(Map<String, dynamic>? json) {
daichong = json?['daichong'] != null ? DCModel.fromJson(json?['daichong']) : null;
daichong =
json?['daichong'] != null ? DCModel.fromJson(json?['daichong']) : null;
if (json?['integralList'] != null) {
integralList = <IntegralList>[];
json?['integralList'].forEach((v) {
@@ -115,7 +122,9 @@ class VipSupportModel {
variant = json?['variant']?.toString();
defaultProductId = json?['defaultProductId']?.toString();
skinKey = json?['skinKey']?.toString();
uiConfig = json?['uiConfig'] != null ? VipUiConfig.fromJson(json?['uiConfig']) : null;
uiConfig = json?['uiConfig'] != null
? VipUiConfig.fromJson(json?['uiConfig'])
: null;
/// 升级卡
upgradeableVipCardList = (json?['upgradeableVipCardList'] as List?)
@@ -124,7 +133,8 @@ class VipSupportModel {
if (json?['list'] != null) {
list = <VipProductListModel>[];
json?['list'].forEach((v) {
VipProductListModel vipModel = VipProductListModel.fromJson(v, daichong);
VipProductListModel vipModel =
VipProductListModel.fromJson(v, daichong);
list!.add(vipModel);
});
}
@@ -182,7 +192,14 @@ class IntegralList {
int? type;
String? bgImg;
IntegralList({this.desc, this.duration, this.id, this.img, this.name, this.price, this.type});
IntegralList(
{this.desc,
this.duration,
this.id,
this.img,
this.name,
this.price,
this.type});
IntegralList.fromJson(Map<String, dynamic> json) {
desc = json['desc'];
@@ -214,7 +231,8 @@ class VipProductListModel {
String? positionID;
int? showType;
VipProductListModel({this.list, this.position, this.positionID, this.showType});
VipProductListModel(
{this.list, this.position, this.positionID, this.showType});
VipProductListModel.fromJson(Map<String, dynamic> json, DCModel? daichong) {
if (json['list'] != null) {
@@ -244,8 +262,10 @@ class VipProductListModel {
class VipProductModel {
String? actionDesc;
/// 角标类型,如 MOST_POPULAR
String? badgeType;
/// 角标文案,如「最受欢迎」
String? badgeText;
int? aiUndressCount;
@@ -522,12 +542,12 @@ class VipProductModel {
vipCardDesc = json['vipCardDesc'];
vipLevel = json['vipLevel'];
isPreSale = false;
isUpgrade= json['isUpgrade'];
currentVipName= json['currentVipName'];
currentVipPrice= "${json['currentVipPrice']}";
purchasePrice= json['purchasePrice'];
advanceAmount= json['advanceAmount'];
balanceAmount= json['balanceAmount'];
isUpgrade = json['isUpgrade'];
currentVipName = json['currentVipName'];
currentVipPrice = "${json['currentVipPrice']}";
purchasePrice = json['purchasePrice'];
advanceAmount = json['advanceAmount'];
balanceAmount = json['balanceAmount'];
}
//是否有折扣
@@ -598,12 +618,12 @@ class VipProductModel {
data['videoDiscount'] = videoDiscount;
data['vipCardDesc'] = vipCardDesc;
data['vipLevel'] = vipLevel;
data['isUpgrade']= isUpgrade;
data['currentVipName']= currentVipName;
data['currentVipPrice']= currentVipPrice;
data['purchasePrice']= purchasePrice;
data['advanceAmount']= advanceAmount;
data['balanceAmount']= balanceAmount;
data['isUpgrade'] = isUpgrade;
data['currentVipName'] = currentVipName;
data['currentVipPrice'] = currentVipPrice;
data['purchasePrice'] = purchasePrice;
data['advanceAmount'] = advanceAmount;
data['balanceAmount'] = balanceAmount;
return data;
}
}
@@ -667,7 +687,8 @@ class RchgType {
bool? isOfficial = false; // 官方推荐
int? payMethod;
RchgType({this.channel, this.incTax, this.incrAmount, this.type, this.typeName});
RchgType(
{this.channel, this.incTax, this.incrAmount, this.type, this.typeName});
RchgType.fromJson(Map<String, dynamic> json) {
channel = json['channel'];
+14 -6
View File
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
/// VIP 金色标题渐变 #F5E7BC → #DCAD55
/// 会员中心 / 购买弹窗 / 权益标题等金色文案共用,调色只改此处
@@ -56,6 +56,7 @@ class VipMoreSectionTitleImage extends StatelessWidget {
/// 区块标题:两侧「金渐变横线 + 菱形」+ 居中金渐变文字(会员中心 B / 购买弹窗共用)
class VipSectionTitle extends StatelessWidget {
final String text;
/// true:旧版橙色标题(会员中心 A / DISABLED)
final bool classic;
@@ -71,7 +72,11 @@ class VipSectionTitle extends StatelessWidget {
children: [
_classicDeco(lineFirst: true),
8.sizeBoxW,
Text(text, style: const TextStyle(color: _classicOrange, fontSize: 18, fontWeight: FontWeight.w600)),
Text(text,
style: const TextStyle(
color: _classicOrange,
fontSize: 18,
fontWeight: FontWeight.w600)),
8.sizeBoxW,
_classicDeco(lineFirst: false),
],
@@ -85,7 +90,8 @@ class VipSectionTitle extends StatelessWidget {
VipGradientMask(
child: Text(
text,
style: const TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w600),
style: const TextStyle(
color: Colors.white, fontSize: 20, fontWeight: FontWeight.w600),
),
),
8.sizeBoxW,
@@ -109,7 +115,8 @@ class VipSectionTitle extends StatelessWidget {
// 标题两侧装饰:金渐变细横线 + 菱形(lineFirst=true 横线在外侧,false 镜像)
Widget _buildDeco({required bool lineFirst}) {
const line = VipGradientMask(
child: SizedBox(width: 40, height: 0.5, child: ColoredBox(color: Colors.white)),
child: SizedBox(
width: 40, height: 0.5, child: ColoredBox(color: Colors.white)),
);
return Row(
mainAxisSize: MainAxisSize.min,
@@ -121,7 +128,8 @@ class VipSectionTitle extends StatelessWidget {
Widget get _diamond => Transform.rotate(
angle: 0.7853981633974483,
child: const VipGradientMask(
child: SizedBox(width: 5, height: 5, child: ColoredBox(color: Colors.white)),
child: SizedBox(
width: 5, height: 5, child: ColoredBox(color: Colors.white)),
),
);
}
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_model/mine/exchange/recharge_type_list_model.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_model/mine/exchange/recharge_type_list_model.dart';
import 'package:wydj/hj_utils/screen.dart';
// 金币充值档位卡片
class CoinItem extends StatelessWidget {
@@ -24,7 +24,9 @@ class CoinItem extends StatelessWidget {
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(8),
border: isSelected ? Border.all(width: 1, color: const Color(0xffF9C142)) : null,
border: isSelected
? Border.all(width: 1, color: const Color(0xffF9C142))
: null,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -33,12 +35,14 @@ class CoinItem extends StatelessWidget {
4.sizeBoxH,
Text(
"${model.amount}金币",
style: const TextStyle(color: Color(0xFF656565), fontSize: 14),
style:
const TextStyle(color: Color(0xFF656565), fontSize: 14),
),
4.sizeBoxH,
Text(
'¥${model.moneyYuan}',
style: const TextStyle(color: Color(0xffF9C142), fontWeight: FontWeight.w500),
style: const TextStyle(
color: Color(0xffF9C142), fontWeight: FontWeight.w500),
),
4.sizeBoxH,
],
@@ -53,7 +57,9 @@ class CoinItem extends StatelessWidget {
height: 20,
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 5),
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(12), bottomRight: Radius.circular(12)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12),
bottomRight: Radius.circular(12)),
color: Color(0xffFFD460),
),
child: Text(
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:provider/provider.dart';
import 'package:hgmj/tools_base/widget/sheet_handle_bar.dart';
import 'package:wydj/tools_base/widget/sheet_handle_bar.dart';
import '../../make_money/mine_withdrawal_record_page.dart';
import '../mine_charge_coin_logic.dart';
@@ -21,7 +21,10 @@ class CoinPayBottomSheet extends StatelessWidget {
/// 下单埋点上下文(短剧付费墙充金币要带剧/集/付费墙上下文)
final PayOrderTrackInfo? orderTrack;
const CoinPayBottomSheet({super.key, this.sourcePage = PaySourcePage.videoBottomSheet, this.orderTrack});
const CoinPayBottomSheet(
{super.key,
this.sourcePage = PaySourcePage.videoBottomSheet,
this.orderTrack});
/// 弹窗展示中,防连点叠多个 bottomSheet
static bool _isShowing = false;
@@ -166,7 +169,8 @@ class CoinPayBottomSheet extends StatelessWidget {
children: [
const Text(
'我的金币余额',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
),
8.sizeBoxH,
Row(
@@ -191,7 +195,8 @@ class CoinPayBottomSheet extends StatelessWidget {
const Spacer(),
InkWell(
enableFeedback: false,
onTap: () => Get.to(RecordsPage(RecordType.bill), opaque: false),
onTap: () =>
Get.to(RecordsPage(RecordType.bill), opaque: false),
child: Container(
alignment: Alignment.center,
height: 30,
@@ -1,16 +1,27 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/hj_utils/screen.dart';
class FeedbackQuestionCategoryView extends StatefulWidget {
final Function(String category)? choseCategory;
const FeedbackQuestionCategoryView({super.key, this.choseCategory});
@override
State<FeedbackQuestionCategoryView> createState() => _FeedbackQuestionCategoryViewState();
State<FeedbackQuestionCategoryView> createState() =>
_FeedbackQuestionCategoryViewState();
}
class _FeedbackQuestionCategoryViewState extends State<FeedbackQuestionCategoryView> {
final dataSource = ['账号问题', '影视资源', 'APP体验', '播放失败', '播放卡顿', '分类有误', '充值问题', '其他'];
class _FeedbackQuestionCategoryViewState
extends State<FeedbackQuestionCategoryView> {
final dataSource = [
'账号问题',
'影视资源',
'APP体验',
'播放失败',
'播放卡顿',
'分类有误',
'充值问题',
'其他'
];
String? selectCategory;
@override
@@ -26,7 +37,10 @@ class _FeedbackQuestionCategoryViewState extends State<FeedbackQuestionCategoryV
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4, mainAxisSpacing: 12, crossAxisSpacing: 5, childAspectRatio: 84 / 34),
crossAxisCount: 4,
mainAxisSpacing: 12,
crossAxisSpacing: 5,
childAspectRatio: 84 / 34),
itemCount: dataSource.length,
itemBuilder: (BuildContext context, int index) {
final category = dataSource[index];
@@ -39,13 +53,17 @@ class _FeedbackQuestionCategoryViewState extends State<FeedbackQuestionCategoryV
},
child: Container(
decoration: BoxDecoration(
color: select ? Color(0xffFFC000) : Colors.white.withValues(alpha: .05),
color: select
? Color(0xffFFC000)
: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(3),
),
alignment: Alignment.center,
child: Text(
category,
style: TextStyle(color: select ? const Color(0xff1f2029) : Colors.white, fontSize: 12),
style: TextStyle(
color: select ? const Color(0xff1f2029) : Colors.white,
fontSize: 12),
),
),
);
@@ -58,7 +76,8 @@ class InfomationInputView extends StatefulWidget {
final String title;
final String hint;
final TextEditingController controller;
const InfomationInputView(this.controller, {super.key, this.title = '', this.hint = ''});
const InfomationInputView(this.controller,
{super.key, this.title = '', this.hint = ''});
@override
State<InfomationInputView> createState() => _InfomationInputViewState();
@@ -76,7 +95,10 @@ class _InfomationInputViewState extends State<InfomationInputView> {
width: 90,
child: Text(
widget.title,
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 14, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 14,
fontWeight: FontWeight.w500),
),
),
Expanded(
@@ -88,7 +110,8 @@ class _InfomationInputViewState extends State<InfomationInputView> {
decoration: InputDecoration(
border: InputBorder.none,
hintText: widget.hint,
hintStyle: TextStyle(color: Color(0xff525252), fontSize: 12),
hintStyle:
TextStyle(color: Color(0xff525252), fontSize: 12),
counterText: '',
contentPadding: EdgeInsets.zero,
isDense: true),
@@ -2,10 +2,10 @@ import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/tools_base/file_upload/file_upload_tool.dart';
import 'package:hgmj/tools_base/loading/loading_alert_widget.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/tools_base/file_upload/file_upload_tool.dart';
import 'package:wydj/tools_base/loading/loading_alert_widget.dart';
class MineFeedbackLogic extends GetxController {
/// 问题描述
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'feedback_question_category_view.dart';
import 'mine_feedback_logic.dart';
@@ -19,7 +19,8 @@ class MineFeedbackPage extends StatelessWidget {
appBar: AppBar(
title: Text('意见反馈'),
actions: [
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => Get.to(() => MineQAPage()),
child: Text(
'Q&A',
@@ -37,7 +38,8 @@ class MineFeedbackPage extends StatelessWidget {
children: [
Expanded(
child: SingleChildScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
child: Padding(
padding: EdgeInsets.only(left: 10, right: 10, top: 12),
child: Column(
@@ -58,12 +60,16 @@ class MineFeedbackPage extends StatelessWidget {
24.sizeBoxH,
Text(
'问题描述(必填)',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 18, fontWeight: FontWeight.w600),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 18,
fontWeight: FontWeight.w600),
),
12.sizeBoxH,
Container(
constraints: BoxConstraints(minHeight: 160),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 11),
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 11),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(8),
@@ -72,13 +78,16 @@ class MineFeedbackPage extends StatelessWidget {
children: [
TextField(
maxLines: 8,
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 12),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 12),
maxLength: 300,
controller: controller.inputFeedback,
decoration: InputDecoration(
border: InputBorder.none,
hintText: '请简单描述一下您遇到的问题...',
hintStyle: TextStyle(color: Color(0xff525252), fontSize: 12),
hintStyle: TextStyle(
color: Color(0xff525252), fontSize: 12),
counterStyle: TextStyle(fontSize: 8),
counter: SizedBox(),
contentPadding: EdgeInsets.zero,
@@ -93,7 +102,8 @@ class MineFeedbackPage extends StatelessWidget {
builder: (_, value, __) => Text(
'${value.text.length}/300',
style: TextStyle(
color: Colors.white.withValues(alpha: 0.5),
color:
Colors.white.withValues(alpha: 0.5),
fontSize: 12,
),
),
@@ -103,14 +113,21 @@ class MineFeedbackPage extends StatelessWidget {
),
),
14.sizeBoxH,
InfomationInputView(controller.areaFeedback, title: '所在地区', hint: '例:浙江杭州'),
InfomationInputView(controller.deviceFeedback, title: '设备信息', hint: '例:苹果14'),
InfomationInputView(controller.netFeedback, title: '网络运营商', hint: '电信/联通/移动'),
InfomationInputView(controller.contactFeedback, title: '联系方式', hint: 'QQ/微信/邮箱等'),
InfomationInputView(controller.areaFeedback,
title: '所在地区', hint: '例:浙江杭州'),
InfomationInputView(controller.deviceFeedback,
title: '设备信息', hint: '例:苹果14'),
InfomationInputView(controller.netFeedback,
title: '网络运营商', hint: '电信/联通/移动'),
InfomationInputView(controller.contactFeedback,
title: '联系方式', hint: 'QQ/微信/邮箱等'),
24.sizeBoxH,
Text(
'上传图片',
style: TextStyle(color: Colors.white.withValues(alpha: 0.9), fontSize: 18, fontWeight: FontWeight.w700),
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 18,
fontWeight: FontWeight.w700),
),
12.sizeBoxH,
PhotoManageView(
@@ -119,7 +136,8 @@ class MineFeedbackPage extends StatelessWidget {
24.sizeBoxH,
Text(
'以方便我们给您回复,有效的改进建议,有惊喜赠送哟!',
style: TextStyle(color: Color(0xff525252), fontSize: 12),
style:
TextStyle(color: Color(0xff525252), fontSize: 12),
),
60.sizeBoxH,
],
@@ -138,7 +156,10 @@ class MineFeedbackPage extends StatelessWidget {
),
child: Text(
'提交意见',
style: TextStyle(color: const Color(0xff1f2029), fontSize: 16, fontWeight: FontWeight.w600),
style: TextStyle(
color: const Color(0xff1f2029),
fontSize: 16,
fontWeight: FontWeight.w600),
),
),
),
@@ -3,14 +3,13 @@ import 'dart:math';
import 'package:easy_rich_text/easy_rich_text.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/routers/jump_router.dart';
///帮助反馈
class MineQAPage extends StatefulWidget {
const MineQAPage({super.key});
@override
State<StatefulWidget> createState() => _MineQAPageState();
@@ -22,7 +21,11 @@ class _MineQAPageState extends State<MineQAPage> {
final String url = Address.groundUrl;
late final questionList = [
{"question": "描述文件安装失败?", "answer": "若提示【新的MDM有效负载与旧的有效负载不匹配】,请移除移动设备管理步骤:【设置-通用-设备管理-移动设备管理-移除管理】", 'isOpen': true},
{
"question": "描述文件安装失败?",
"answer": "若提示【新的MDM有效负载与旧的有效负载不匹配】,请移除移动设备管理步骤:【设置-通用-设备管理-移动设备管理-移除管理】",
'isOpen': true
},
{
"question": "怎么找回账号?",
"answer":
@@ -35,8 +38,18 @@ class _MineQAPageState extends State<MineQAPage> {
"1.因超时支付无法到账,请重新发起。\n2.每天发起支付不能超过5次,连续发起且未支付,账号可能被加入黑名单。\n3.支付通道在夜间比较忙碌,尝试多次发起,后台会为您自动切换不同支付通道。\n4.若充值成功,用户权益通常会在数分钟内到账,请刷新APP或重启。",
'isOpen': false
},
{"question": "收到手机报毒提醒?", "answer": "本平台有主要收益为广告赞助,且保证APP安全无毒,因平台主要展示内容为色情属于特殊行业,某些杀毒软件会误报毒提醒,如遇此类提醒请忽略继续使用。", 'isOpen': false},
{"question": "联系方式?", "answer": "商务合作TG: $tg\n${(email != null && email!.isNotEmpty) ? '官方邮箱: $email\n' : ''}永久下载地址: $url", 'isOpen': false},
{
"question": "收到手机报毒提醒?",
"answer":
"本平台有主要收益为广告赞助,且保证APP安全无毒,因平台主要展示内容为色情属于特殊行业,某些杀毒软件会误报毒提醒,如遇此类提醒请忽略继续使用。",
'isOpen': false
},
{
"question": "联系方式?",
"answer":
"商务合作TG: $tg\n${(email != null && email!.isNotEmpty) ? '官方邮箱: $email\n' : ''}永久下载地址: $url",
'isOpen': false
},
];
@override
@@ -63,7 +76,8 @@ class _MineQAPageState extends State<MineQAPage> {
Widget _getItem(int index) {
final item = questionList[index];
final isOpen = item["isOpen"] as bool;
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () {
item["isOpen"] = !isOpen;
setState(() {});
@@ -3,7 +3,7 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:image_pickers/image_pickers.dart';
import 'package:hgmj/tools_base/widget/add_media_source_button.dart';
import 'package:wydj/tools_base/widget/add_media_source_button.dart';
class PhotoManageView extends StatefulWidget {
final Function(List<String> resources)? resourceOnchanged;
+20 -11
View File
@@ -1,12 +1,13 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/common_service.dart';
import 'package:wydj/hj_utils/api_service/common_service.dart';
import '../../../hj_model/mine/happy/happy_model.dart';
import '../../../hj_model/splash/ads_model.dart';
/// 应用推荐页:按分类拉广告位数据,每个分类一个 tab
class LouFengAdLogic extends GetxController with GetSingleTickerProviderStateMixin {
class LouFengAdLogic extends GetxController
with GetSingleTickerProviderStateMixin {
bool isLoading = true;
HappyModel? model; // null 表示加载失败,页面展示重试
@@ -38,11 +39,17 @@ class LouFengAdLogic extends GetxController with GetSingleTickerProviderStateMix
/// 「应用」固定展示,其余分类有 banner 或有应用才建 tab
void _buildTabs() {
_add('应用', AdTabConfig(
bannerAds: _banners(1),
hengAds: model?.hengApp != null ? AdGroup(items: model?.hengApp, title: '官方推荐') : null,
shuAds: model?.shuApp != null ? AdGroup(items: model?.shuApp, title: '热门应用') : null,
));
_add(
'应用',
AdTabConfig(
bannerAds: _banners(1),
hengAds: model?.hengApp != null
? AdGroup(items: model?.hengApp, title: '官方推荐')
: null,
shuAds: model?.shuApp != null
? AdGroup(items: model?.shuApp, title: '热门应用')
: null,
));
final others = [
('炮台', 3, model?.ypApp),
@@ -53,10 +60,12 @@ class LouFengAdLogic extends GetxController with GetSingleTickerProviderStateMix
for (final (name, moduleType, apps) in others) {
final banners = _banners(moduleType);
if (banners.isEmpty && (apps?.isEmpty ?? true)) continue;
_add(name, AdTabConfig(
bannerAds: banners,
shuAds: apps != null ? AdGroup(items: apps, title: '热门推荐') : null,
));
_add(
name,
AdTabConfig(
bannerAds: banners,
shuAds: apps != null ? AdGroup(items: apps, title: '热门推荐') : null,
));
}
// tab 数量随数据变化,controller 要跟着重建
+15 -9
View File
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/unique_tag_mixin.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/unique_tag_mixin.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import 'lou_feng_ad_logic.dart';
import 'widget/recommend_app_page.dart';
@@ -24,7 +24,8 @@ class _LouFengAdPageState extends State<LouFengAdPage> with UniqueTagMixin {
init: LouFengAdLogic(),
builder: (logic) {
if (logic.isLoading) return const LoadingCenterWidget();
if (logic.model == null) return CErrorWidget(retryOnTap: logic.loadData);
if (logic.model == null)
return CErrorWidget(retryOnTap: logic.loadData);
//只有「应用」一个分类时不展示 tab
if (logic.tabs.length <= 1) return _adView(logic, 0);
@@ -35,7 +36,8 @@ class _LouFengAdPageState extends State<LouFengAdPage> with UniqueTagMixin {
Expanded(
child: TabBarView(
controller: logic.tabCtr,
children: List.generate(logic.configs.length, (i) => _adView(logic, i).keepAlive),
children: List.generate(
logic.configs.length, (i) => _adView(logic, i).keepAlive),
),
),
],
@@ -70,7 +72,8 @@ class _LouFengAdPageState extends State<LouFengAdPage> with UniqueTagMixin {
height: 27,
alignment: Alignment.center,
decoration: BoxDecoration(
color: selected ? const Color(0xFFFFC000) : Colors.transparent,
color:
selected ? const Color(0xFFFFC000) : Colors.transparent,
borderRadius: BorderRadius.circular(46),
),
child: Text(
@@ -79,7 +82,9 @@ class _LouFengAdPageState extends State<LouFengAdPage> with UniqueTagMixin {
fontSize: 12,
height: 18 / 12,
fontWeight: selected ? FontWeight.w500 : FontWeight.w400,
color: selected ? const Color(0xFF1F2029) : const Color(0x8CFFFFFF),
color: selected
? const Color(0xFF1F2029)
: const Color(0x8CFFFFFF),
),
),
),
@@ -91,5 +96,6 @@ class _LouFengAdPageState extends State<LouFengAdPage> with UniqueTagMixin {
);
}
Widget _adView(LouFengAdLogic logic, int index) => RecommendAppPage(logic.configs[index]);
Widget _adView(LouFengAdLogic logic, int index) =>
RecommendAppPage(logic.configs[index]);
}
+43 -18
View File
@@ -1,12 +1,12 @@
import 'package:easy_rich_text/easy_rich_text.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/unique_tag_mixin.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/unique_tag_mixin.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../../../config/config.dart';
@@ -41,7 +41,8 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
Stack(
children: [
Positioned.fill(
child: Image.asset("proxy_header_bg.webp".mineImgPath, fit: BoxFit.fill),
child: Image.asset("proxy_header_bg.webp".mineImgPath,
fit: BoxFit.fill),
),
Container(
padding: EdgeInsets.fromLTRB(10, 23, 10, 6),
@@ -63,12 +64,18 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
children: [
Text(
globalStore.meInfo?.name ?? "",
style: const TextStyle(color: Color(0xFFFFFFFF), fontWeight: FontWeight.w700, fontSize: 18.0),
style: const TextStyle(
color: Color(0xFFFFFFFF),
fontWeight: FontWeight.w700,
fontSize: 18.0),
),
5.sizeBoxH,
Text(
"开通会员 畅享专属特权",
style: const TextStyle(color: Color(0xff989898), fontWeight: FontWeight.w400, fontSize: 12),
style: const TextStyle(
color: Color(0xff989898),
fontWeight: FontWeight.w400,
fontSize: 12),
)
],
),
@@ -83,12 +90,18 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
children: [
Text(
"邀请人数",
style: const TextStyle(color: Color(0xB2FFFFFF), fontWeight: FontWeight.w500, fontSize: 12.0),
style: const TextStyle(
color: Color(0xB2FFFFFF),
fontWeight: FontWeight.w500,
fontSize: 12.0),
),
SizedBox(height: 1),
Text(
"${logic.model?.totalInviteUserCount ?? 0}",
style: const TextStyle(color: Color(0xffFFC000), fontWeight: FontWeight.w500, fontSize: 24.0),
style: const TextStyle(
color: Color(0xffFFC000),
fontWeight: FontWeight.w500,
fontSize: 24.0),
)
],
),
@@ -100,13 +113,20 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
Column(
children: [
29.sizeBoxH,
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () {
pushToPageByLink(Config.proxyBanner?.additionalProp?.url ?? "");
pushToPageByLink(
Config.proxyBanner?.additionalProp?.url ??
"");
},
child: Config.proxyBanner?.additionalProp?.banner != null
child: Config.proxyBanner?.additionalProp
?.banner !=
null
? NetworkImageLoader(
imageUrl: Config.proxyBanner?.additionalProp?.banner ?? '',
imageUrl: Config.proxyBanner
?.additionalProp?.banner ??
'',
width: double.infinity,
borderRadius: 0,
)
@@ -129,7 +149,10 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
children: [
Text(
"规则说明",
style: const TextStyle(color: Color(0xFFFFFFFF), fontWeight: FontWeight.bold, fontSize: 18.0),
style: const TextStyle(
color: Color(0xFFFFFFFF),
fontWeight: FontWeight.bold,
fontSize: 18.0),
),
],
),
@@ -140,7 +163,8 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
child: EasyRichText(
'每邀请3名好友成功注册即可获得3天VIP',
textAlign: TextAlign.left,
defaultStyle: TextStyle(fontSize: 12, color: Color(0x73FFFFFF)),
defaultStyle:
TextStyle(fontSize: 12, color: Color(0x73FFFFFF)),
patternList: [
EasyRichTextPattern(
targetString: '3名好友',
@@ -155,7 +179,8 @@ class _MineIncomePageState extends State<MineIncomePage> with UniqueTagMixin {
child: EasyRichText(
'邀请说明:点击【保存二维码】或【复制推广链接】分享给朋友下载即可',
textAlign: TextAlign.left,
defaultStyle: TextStyle(fontSize: 12, color: Color(0x73FFFFFF)),
defaultStyle:
TextStyle(fontSize: 12, color: Color(0x73FFFFFF)),
),
),
MineShareQRView(),
@@ -1,14 +1,15 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/api_service/vid_service.dart';
import 'package:hgmj/hj_utils/const.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/api_service/vid_service.dart';
import 'package:wydj/hj_utils/const.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
//免费专区排序 tab(标题与接口 sort 值绑定)
const _sortTabs = [SortTab('最多收藏', 1), SortTab('最新上架', 2), SortTab('最多观看', 3)];
class MoreFreeVideoLogic extends GetxController with GetTickerProviderStateMixin {
class MoreFreeVideoLogic extends GetxController
with GetTickerProviderStateMixin {
final String vId;
List<String> get sortTitles => _sortTabs.map((e) => e.name).toList();
MoreFreeVideoLogic(this.vId);
@@ -16,7 +17,8 @@ class MoreFreeVideoLogic extends GetxController with GetTickerProviderStateMixin
bool isLoading = true;
int page = 1;
int sort = 0;
late final TabController tabController = TabController(length: _sortTabs.length, vsync: this);
late final TabController tabController =
TabController(length: _sortTabs.length, vsync: this);
RefreshController? refreshController;
List<VideoModel> dataSource = [];
@@ -28,13 +30,16 @@ class MoreFreeVideoLogic extends GetxController with GetTickerProviderStateMixin
isLoading = true;
update();
}
final res = await VidService.fetchFreeSourceList(vId, page: page, sortType: _sortTabs[sort].sort);
final res = await VidService.fetchFreeSourceList(vId,
page: page, sortType: _sortTabs[sort].sort);
isLoading = false;
if (isRefresh) {
dataSource.clear();
refreshController?.refreshCompleted();
}
res.hasNext ?? false ? refreshController?.loadComplete() : refreshController?.loadNoData();
res.hasNext ?? false
? refreshController?.loadComplete()
: refreshController?.loadNoData();
dataSource.addAll(res.list ?? []);
page += 1;
update();
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import '../../home/home_cell_style/video_simple_cell.dart';
import 'more_free_video_logic.dart';
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/user/user_income_info_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/hj_model/user/user_income_info_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import '../make_money/withdrawal_page.dart';
import 'share_details_page.dart';
@@ -69,7 +69,8 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
height: 160,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(color: const Color(0xff1e262e), width: 1),
border:
Border.all(color: const Color(0xff1e262e), width: 1),
color: Color(0xFF131b23)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@@ -84,11 +85,17 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
children: [
Text(
"钱包余额",
style: const TextStyle(color: const Color(0xffb8bbbd), fontWeight: FontWeight.w900, fontSize: 12.0),
style: const TextStyle(
color: const Color(0xffb8bbbd),
fontWeight: FontWeight.w900,
fontSize: 12.0),
),
Text(
"${_model?.totalAmount}",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w500, fontSize: 24.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w500,
fontSize: 24.0),
)
],
),
@@ -96,7 +103,9 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
SizedBox(
height: 57,
width: .5,
child: DecoratedBox(decoration: BoxDecoration(color: Color(0xff444444))),
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xff444444))),
),
Expanded(
child: Column(
@@ -104,11 +113,17 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
children: [
Text(
"累积收益",
style: const TextStyle(color: Color(0xffb8bbbd), fontWeight: FontWeight.w900, fontSize: 12.0),
style: const TextStyle(
color: Color(0xffb8bbbd),
fontWeight: FontWeight.w900,
fontSize: 12.0),
),
Text(
"${_model?.totalIncomeAmount}",
style: const TextStyle(color: Color(0xffffffff), fontWeight: FontWeight.w500, fontSize: 24.0),
style: const TextStyle(
color: Color(0xffffffff),
fontWeight: FontWeight.w500,
fontSize: 24.0),
)
],
),
@@ -116,7 +131,8 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
],
),
),
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => Get.to(WithdrawalPage()),
child: Container(
width: 276,
@@ -129,7 +145,10 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
child: Center(
child: Text(
"立即提现",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w900, fontSize: 12.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w900,
fontSize: 12.0),
),
),
),
@@ -141,7 +160,8 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(color: const Color(0xff1e262e), width: 1),
border:
Border.all(color: const Color(0xff1e262e), width: 1),
color: Color(0xFF131b23),
),
child: GridView.count(
@@ -149,13 +169,17 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
physics: NeverScrollableScrollPhysics(),
crossAxisCount: 2,
childAspectRatio: 5 / 3,
children: incomeList.map((e) => _buildIncomeGItem(e)).toList(),
children:
incomeList.map((e) => _buildIncomeGItem(e)).toList(),
),
),
15.sizeBoxH,
Text(
"推广总统计",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w600, fontSize: 16.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w600,
fontSize: 16.0),
),
15.sizeBoxH,
_buildTGItem("累计推广用户", _model?.totalInviteUserCount ?? '0'),
@@ -174,11 +198,17 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
children: [
Text(
title,
style: const TextStyle(color: const Color(0xffb8bbbd), fontWeight: FontWeight.w400, fontSize: 12.0),
style: const TextStyle(
color: const Color(0xffb8bbbd),
fontWeight: FontWeight.w400,
fontSize: 12.0),
),
Text(
"$value",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w500, fontSize: 18.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w500,
fontSize: 18.0),
),
],
),
@@ -192,11 +222,17 @@ class _ShareDataListPageState extends State<ShareDataListPage> {
children: [
Text(
"${item.value}",
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w900, fontSize: 18.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w900,
fontSize: 18.0),
),
Text(
item.title,
style: const TextStyle(color: const Color(0xffb8bbbd), fontWeight: FontWeight.w400, fontSize: 12.0),
style: const TextStyle(
color: const Color(0xffb8bbbd),
fontWeight: FontWeight.w400,
fontSize: 12.0),
)
],
),
@@ -1,15 +1,14 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_model/user/user_income_info_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.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/user/user_income_info_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'share_data_list_page.dart';
class ShareDetailsPage extends StatefulWidget {
final UserIncomeModel? model;
const ShareDetailsPage({super.key, this.model});
@@ -47,7 +46,9 @@ class _ShareDetailsPageState extends State<ShareDetailsPage> {
if (isRefresh) {
dataSource.clear();
}
res?.hasNext ?? false ? _controller?.loadComplete() : _controller?.loadNoData();
res?.hasNext ?? false
? _controller?.loadComplete()
: _controller?.loadNoData();
dataSource.addAll(res?.items ?? []);
page += 1;
if (mounted) setState(() {});
@@ -79,7 +80,10 @@ class _ShareDetailsPageState extends State<ShareDetailsPage> {
// 收益明细
Text(
"收益明细",
style: const TextStyle(color: const Color(0xffbec4d6), fontWeight: FontWeight.w500, fontSize: 18.0),
style: const TextStyle(
color: const Color(0xffbec4d6),
fontWeight: FontWeight.w500,
fontSize: 18.0),
),
SizedBox(height: 10),
],
@@ -93,7 +97,9 @@ class _ShareDetailsPageState extends State<ShareDetailsPage> {
child: LoadingCenterWidget(),
),
);
if (dataSource.isEmpty) return SliverToBoxAdapter(child: SizedBox(height: 300, child: CErrorWidget()));
if (dataSource.isEmpty)
return SliverToBoxAdapter(
child: SizedBox(height: 300, child: CErrorWidget()));
return SliverList.builder(
itemCount: dataSource.length,
itemBuilder: (_, index) {
@@ -117,11 +123,17 @@ class _ShareDetailsPageState extends State<ShareDetailsPage> {
children: [
Text(
title,
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w400, fontSize: 14.0),
style: const TextStyle(
color: const Color(0xffffffff),
fontWeight: FontWeight.w400,
fontSize: 14.0),
),
Text(
"收益+$value元",
style: const TextStyle(color: const Color(0xffFFC000), fontWeight: FontWeight.w400, fontSize: 14.0),
style: const TextStyle(
color: const Color(0xffFFC000),
fontWeight: FontWeight.w400,
fontSize: 14.0),
),
],
),
@@ -142,11 +154,17 @@ class _ShareDetailsPageState extends State<ShareDetailsPage> {
children: [
Text(
item.title,
style: const TextStyle(color: const Color(0xE5FFFFFF), fontWeight: FontWeight.w400, fontSize: 14.0),
style: const TextStyle(
color: const Color(0xE5FFFFFF),
fontWeight: FontWeight.w400,
fontSize: 14.0),
),
Text(
"${item.value}",
style: const TextStyle(color: const Color(0x8CFFFFFF), fontWeight: FontWeight.w500, fontSize: 20.0),
style: const TextStyle(
color: const Color(0x8CFFFFFF),
fontWeight: FontWeight.w500,
fontSize: 20.0),
),
],
),
+45 -19
View File
@@ -5,12 +5,12 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_page/mine/widgets/integral_exchange_page.dart';
import 'package:hgmj/hj_utils/free_play_manager.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_page/mine/widgets/integral_exchange_page.dart';
import 'package:wydj/hj_utils/free_play_manager.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import 'package:provider/provider.dart';
import '../../../tools_base/global_store/store.dart';
@@ -52,7 +52,8 @@ class SignDailyPage extends StatelessWidget {
id: 'appbar',
builder: (_) => AppBar(
title: const Text('每日签到'),
backgroundColor: const Color(0xff030F18).withValues(alpha: logic.appbarOpacity),
backgroundColor:
const Color(0xff030F18).withValues(alpha: logic.appbarOpacity),
elevation: 0,
),
),
@@ -91,12 +92,18 @@ class SignDailyPage extends StatelessWidget {
children: [
const Text(
'我的积分 ',
style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400),
),
Consumer<GlobalStore>(
builder: (_, provider, __) => Text(
'${globalStore.wallet?.integral ?? 0}',
style: const TextStyle(color: Color(0xffFFC000), fontSize: 24, fontWeight: FontWeight.w700),
style: const TextStyle(
color: Color(0xffFFC000),
fontSize: 24,
fontWeight: FontWeight.w700),
),
),
],
@@ -122,7 +129,10 @@ class SignDailyPage extends StatelessWidget {
padding: EdgeInsets.zero,
isScrollable: true,
tabAlignment: TabAlignment.start,
labelStyle: const TextStyle(fontSize: 16, color: Color(0xffFFC000), fontWeight: FontWeight.w500),
labelStyle: const TextStyle(
fontSize: 16,
color: Color(0xffFFC000),
fontWeight: FontWeight.w500),
unselectedLabelStyle: const TextStyle(
fontSize: 16,
color: Color(0xff999999),
@@ -199,11 +209,17 @@ class SignDailyPage extends StatelessWidget {
globalStore.meInfo?.name ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w500),
),
if ((globalStore.meInfo?.vipLevel ?? 0) > 0) ...[
4.sizeBoxW,
Image.asset(globalStore.meInfo?.vipImageName ?? "", width: 30, height: 18),
Image.asset(
globalStore.meInfo?.vipImageName ?? "",
width: 30,
height: 18),
],
],
),
@@ -211,12 +227,18 @@ class SignDailyPage extends StatelessWidget {
Consumer<PreSaleProvider>(
builder: (context, provider, child) {
final isVip = globalStore.isVIP;
final watch = FreePlayManager().remain?.watchCount ?? 0;
final aiFree = globalStore.wallet?.aiUndressFreeTimes ?? 0;
final aiToday = provider.remain?.todayAiUndressCount ?? 0;
final watch =
FreePlayManager().remain?.watchCount ?? 0;
final aiFree =
globalStore.wallet?.aiUndressFreeTimes ?? 0;
final aiToday =
provider.remain?.todayAiUndressCount ?? 0;
return Text(
isVip ? "剩余AI次数:${max(aiFree + aiToday, 0)}" : "剩余观看次数:${max(watch, 0)}",
style: const TextStyle(fontSize: 12, color: Color(0xff656565)),
isVip
? "剩余AI次数:${max(aiFree + aiToday, 0)}"
: "剩余观看次数:${max(watch, 0)}",
style: const TextStyle(
fontSize: 12, color: Color(0xff656565)),
);
},
)
@@ -236,7 +258,8 @@ class SignDailyPage extends StatelessWidget {
height: 44,
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 5.h),
padding:
EdgeInsets.symmetric(horizontal: 12.w, vertical: 5.h),
margin: EdgeInsets.symmetric(horizontal: 40.w, vertical: 0),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(90)),
@@ -249,7 +272,10 @@ class SignDailyPage extends StatelessWidget {
child: Text(
globalStore.isVIP ? '已开通会员' : '开通VIP不限次数免费观看',
style: TextStyle(
color: Color(globalStore.isVIP ? 0xfffffffff : 0xfffffffff), fontSize: 16, fontWeight: FontWeight.w700),
color: Color(
globalStore.isVIP ? 0xfffffffff : 0xfffffffff),
fontSize: 16,
fontWeight: FontWeight.w700),
),
),
),
@@ -1,12 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/widget/keep_alive_widget.dart';
import 'package:wydj/tools_base/widget/keep_alive_widget.dart';
import '../../../tools_base/indicator/custom_tab_indicator.dart';
import 'lou_feng_ad_page.dart';
class WelfareHomePage extends StatefulWidget {
///默认选中的 tab:0 分享邀请 / 1 应用推荐
final int index;
@@ -18,9 +17,11 @@ class WelfareHomePage extends StatefulWidget {
}
}
class _WelfareHomePageState extends State<WelfareHomePage> with TickerProviderStateMixin {
final tabs = <String>[/*'分享邀请', */"应用推荐"];
late final TabController _tabController = TabController(initialIndex: /*widget.index*/0, length: tabs.length, vsync: this);
class _WelfareHomePageState extends State<WelfareHomePage>
with TickerProviderStateMixin {
final tabs = <String>[/*'分享邀请', */ "应用推荐"];
late final TabController _tabController = TabController(
initialIndex: /*widget.index*/ 0, length: tabs.length, vsync: this);
@override
Widget build(BuildContext context) {
@@ -40,8 +41,12 @@ class _WelfareHomePageState extends State<WelfareHomePage> with TickerProviderSt
child: TabBar(
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 5),
isScrollable: false,
labelStyle: TextStyle(fontSize: 14, color: Color(0xFFFFC000), fontWeight: FontWeight.w400),
unselectedLabelStyle: TextStyle(fontSize: 14, color: Color(0x73FFFFFF)),
labelStyle: TextStyle(
fontSize: 14,
color: Color(0xFFFFC000),
fontWeight: FontWeight.w400),
unselectedLabelStyle:
TextStyle(fontSize: 14, color: Color(0x73FFFFFF)),
indicator: CustomIndicator(
width: 18,
height: 4,
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:video_player/video_player.dart';
import 'checkin_model.dart';
@@ -46,7 +46,10 @@ class CongratulationsRewardDialog extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: prizeList?.map((e) => _buildRewardItem(e.name ?? "", e.icon ?? "")).toList() ?? [],
children: prizeList
?.map((e) => _buildRewardItem(e.name ?? "", e.icon ?? ""))
.toList() ??
[],
),
SizedBox(height: 36),
// 底部按钮
@@ -63,7 +66,8 @@ class CongratulationsRewardDialog extends StatelessWidget {
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24),
border: Border.all(color: const Color(0xFFFFD700), width: 2),
border: Border.all(
color: const Color(0xFFFFD700), width: 2),
),
child: Text(
"兑换好礼",
@@ -115,7 +119,8 @@ class CongratulationsRewardDialog extends StatelessWidget {
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.white.withValues(alpha: .5), width: 0.5)),
border: Border.all(
color: Colors.white.withValues(alpha: .5), width: 0.5)),
padding: EdgeInsets.all(6),
child: NetworkImageLoader(imageUrl: iconPath, fit: BoxFit.contain),
),
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
class CustomProgressBar extends StatelessWidget {
final double progress; // 0 ~ 1
@@ -46,7 +46,8 @@ class CustomProgressBar extends StatelessWidget {
// 小图标(跟随进度,两端不溢出)
Positioned(
left: (width - 18) * progress,
child: Image.asset("ic_sign_indicator.webp".mineImgPath, width: 18, height: 18, fit: BoxFit.cover),
child: Image.asset("ic_sign_indicator.webp".mineImgPath,
width: 18, height: 18, fit: BoxFit.cover),
),
],
);
@@ -1,19 +1,19 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/config/address.dart';
import 'package:hgmj/hj_page/mine/mine_share/mine_share_page.dart';
import 'package:hgmj/hj_page/mine/welfare/sign_daily_logic.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/checkin_model.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/congratulations_reward_dialog.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/sign_dialog.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/sign_in_model.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/config/address.dart';
import 'package:wydj/hj_page/mine/mine_share/mine_share_page.dart';
import 'package:wydj/hj_page/mine/welfare/sign_daily_logic.dart';
import 'package:wydj/hj_page/mine/welfare/widget/checkin_model.dart';
import 'package:wydj/hj_page/mine/welfare/widget/congratulations_reward_dialog.dart';
import 'package:wydj/hj_page/mine/welfare/widget/sign_dialog.dart';
import 'package:wydj/hj_page/mine/welfare/widget/sign_in_model.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
import 'package:video_player/video_player.dart';
import 'package:hgmj/hj_utils/video_view_type.dart';
import 'package:wydj/hj_utils/video_view_type.dart';
/// 每日签到 Logic
/// 负责签到列表加载、签到/补领接口、双倍奖励视频播放、跳转积分兑换 Tab
@@ -155,7 +155,8 @@ class MineSignLogic extends GetxController {
if (parent == null) return;
parent.tabCtr.animateTo(1);
// 等一帧让弹窗 dismiss 后 layout 稳定,再算位置
WidgetsBinding.instance.addPostFrameCallback((_) => _scrollTabKeyBelowAppBar());
WidgetsBinding.instance
.addPostFrameCallback((_) => _scrollTabKeyBelowAppBar());
}
/// 让 parent.tabKey 对应的 widget 滚到 AppBar 下沿
@@ -261,9 +262,11 @@ class _ResignGuideDialog extends StatelessWidget {
const SizedBox(height: 260),
Row(
children: [
Expanded(child: _btn(onCancel, '离开', isPrimary: false)),
Expanded(
child: _btn(onCancel, '离开', isPrimary: false)),
const SizedBox(width: 16),
Expanded(child: _btn(onConfirm, '立即邀请', isPrimary: true)),
Expanded(
child: _btn(onConfirm, '立即邀请', isPrimary: true)),
],
),
],
@@ -277,7 +280,8 @@ class _ResignGuideDialog extends StatelessWidget {
right: 10,
child: GestureDetector(
onTap: onCancel,
child: Image.asset('icon_resign_close.png'.mineImgPath, width: 30, height: 30),
child: Image.asset('icon_resign_close.png'.mineImgPath,
width: 30, height: 30),
),
),
],
@@ -301,7 +305,9 @@ class _ResignGuideDialog extends StatelessWidget {
)
: null,
borderRadius: BorderRadius.circular(25),
border: isPrimary ? null : Border.all(color: const Color(0xFFB7B7B7), width: 1),
border: isPrimary
? null
: Border.all(color: const Color(0xFFB7B7B7), width: 1),
),
child: Text(
text,
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_model/mine/happy/happy_model.dart';
import 'package:hgmj/hj_model/splash/ads_model.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/banner/ads_banner.dart';
import 'package:wydj/hj_model/mine/happy/happy_model.dart';
import 'package:wydj/hj_model/splash/ads_model.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/banner/ads_banner.dart';
import '../../../../tools_base/banner/ads_item.dart';
@@ -46,7 +46,8 @@ class RecommendAppPage extends StatelessWidget {
mainAxisSpacing: 10,
childAspectRatio: 82 / 105,
),
itemBuilder: (_, index) => _buildVItem(model.hengAds!.items![index], index)),
itemBuilder: (_, index) =>
_buildVItem(model.hengAds!.items![index], index)),
)
],
),
@@ -60,10 +61,12 @@ class RecommendAppPage extends StatelessWidget {
padding: EdgeInsets.symmetric(horizontal: 16),
sliver: SliverList.separated(
itemCount: model.shuAds?.items?.length ?? 0,
separatorBuilder: (_, __) => model.shuAds?.title == '热门推荐' ? 10.sizeBoxH : 1.line,
separatorBuilder: (_, __) =>
model.shuAds?.title == '热门推荐' ? 10.sizeBoxH : 1.line,
itemBuilder: (_, index) {
final info = model.shuAds!.items![index];
if (model.shuAds?.title == '热门推荐') return _buildHBItem(info, index);
if (model.shuAds?.title == '热门推荐')
return _buildHBItem(info, index);
return _buildHItem(info, index);
},
),
@@ -81,12 +84,11 @@ class RecommendAppPage extends StatelessWidget {
children: [
Container(
decoration: BoxDecoration(
color: Color(0xFFFFC000),
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
)
),
color: Color(0xFFFFC000),
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
)),
width: 8,
height: 22,
),
@@ -1,8 +1,8 @@
import 'package:easy_rich_text/easy_rich_text.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../../../../tools_base/widget/net_image_widget.dart';
import 'checkin_model.dart';
@@ -13,7 +13,12 @@ class SignInDialog extends StatelessWidget {
final Function? callback;
final List<IntegerExchange>? prizeList;
SignInDialog({super.key, this.signInList, this.continuousDays, this.callback, this.prizeList});
SignInDialog(
{super.key,
this.signInList,
this.continuousDays,
this.callback,
this.prizeList});
@override
Widget build(BuildContext context) {
@@ -26,7 +31,9 @@ class SignInDialog extends StatelessWidget {
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 40),
margin: EdgeInsets.only(top: 50),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), color: Color(0xff0F0F0F), border: Border.all(width: 1, color: Color(0xffFFE7B4))),
borderRadius: BorderRadius.circular(20),
color: Color(0xff0F0F0F),
border: Border.all(width: 1, color: Color(0xffFFE7B4))),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@@ -55,7 +62,9 @@ class SignInDialog extends StatelessWidget {
13.sizeBoxH,
Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(color: Color(0xffFFD900).withValues(alpha: .1), borderRadius: BorderRadius.circular(12)),
decoration: BoxDecoration(
color: Color(0xffFFD900).withValues(alpha: .1),
borderRadius: BorderRadius.circular(12)),
child: Column(
children: [
Text(
@@ -70,7 +79,11 @@ class SignInDialog extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: prizeList?.map((e) => _buildRewardItem(e.name ?? "", e.icon ?? "")).toList() ?? [],
children: prizeList
?.map((e) => _buildRewardItem(
e.name ?? "", e.icon ?? ""))
.toList() ??
[],
),
],
),
@@ -90,7 +103,8 @@ class SignInDialog extends StatelessWidget {
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24),
border: Border.all(color: const Color(0xFFFFD700), width: 2),
border: Border.all(
color: const Color(0xFFFFD700), width: 2),
),
child: Text(
"兑换好礼",
@@ -132,7 +146,11 @@ class SignInDialog extends StatelessWidget {
],
),
),
Positioned(left: 0, right: 0, child: Image.asset('sign_take_top.webp'.mineImgPath, height: 30, fit: BoxFit.contain)),
Positioned(
left: 0,
right: 0,
child: Image.asset('sign_take_top.webp'.mineImgPath,
height: 30, fit: BoxFit.contain)),
],
),
);
@@ -145,7 +163,9 @@ class SignInDialog extends StatelessWidget {
final list = signInList?.take(6).toList() ?? [];
return Container(
height: 68,
decoration: BoxDecoration(color: Colors.white.withValues(alpha: .05), borderRadius: BorderRadius.circular(20)),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(20)),
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
@@ -174,7 +194,9 @@ class SignInDialog extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.white.withValues(alpha: .1),
border: active ? Border.all(color: const Color(0xffFFDA0B), width: 0.5) : null,
border: active
? Border.all(color: const Color(0xffFFDA0B), width: 0.5)
: null,
),
// padding: EdgeInsets.all(5),
child: Column(
@@ -206,13 +228,25 @@ class SignInDialog extends StatelessWidget {
1,
0,
])
: ColorFilter.mode(Colors.transparent, BlendMode.multiply),
child: NetworkImageLoader(imageUrl: item.image!, width: 34, height: 34, fit: BoxFit.contain))
: Image.asset(isSigned == true ? 'checked_in_coin.webp'.mineImgPath : 'check_in_coin.webp'.mineImgPath,
width: 34, height: 34, fit: BoxFit.cover),
: ColorFilter.mode(
Colors.transparent, BlendMode.multiply),
child: NetworkImageLoader(
imageUrl: item.image!,
width: 34,
height: 34,
fit: BoxFit.contain))
: Image.asset(
isSigned == true
? 'checked_in_coin.webp'.mineImgPath
: 'check_in_coin.webp'.mineImgPath,
width: 34,
height: 34,
fit: BoxFit.cover),
Text(
item.prizeName ?? '',
style: TextStyle(color: isSigned == true ? Colors.white : Color(0xffFFD900), fontSize: 10),
style: TextStyle(
color: isSigned == true ? Colors.white : Color(0xffFFD900),
fontSize: 10),
),
],
),
@@ -228,7 +262,8 @@ class SignInDialog extends StatelessWidget {
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.white.withValues(alpha: .2), width: 0.5)),
border: Border.all(
color: Colors.white.withValues(alpha: .2), width: 0.5)),
padding: EdgeInsets.all(6),
child: NetworkImageLoader(imageUrl: iconPath, fit: BoxFit.contain),
),
+223 -88
View File
@@ -2,28 +2,28 @@ import 'dart:async';
import 'package:easy_rich_text/easy_rich_text.dart';
import 'package:flutter/material.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_model/home/module_detail_model.dart';
import 'package:hgmj/hj_model/list_base_model.dart';
import 'package:hgmj/hj_model/mine/task_center_data.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_page/main_page/provider/msg_provider.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/checkin_model.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/custom_progressbar.dart';
import 'package:hgmj/hj_page/mine/welfare/widget/mine_sign_logic.dart';
import 'package:hgmj/hj_page/mine/widgets/gradient_text.dart';
import 'package:hgmj/hj_utils/api_service/common_service.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/api_service/vid_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_model/home/module_detail_model.dart';
import 'package:wydj/hj_model/list_base_model.dart';
import 'package:wydj/hj_model/mine/task_center_data.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_page/main_page/provider/msg_provider.dart';
import 'package:wydj/hj_page/mine/welfare/widget/checkin_model.dart';
import 'package:wydj/hj_page/mine/welfare/widget/custom_progressbar.dart';
import 'package:wydj/hj_page/mine/welfare/widget/mine_sign_logic.dart';
import 'package:wydj/hj_page/mine/widgets/gradient_text.dart';
import 'package:wydj/hj_utils/api_service/common_service.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/api_service/vid_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../../../home/home_cell_style/video_simple_cell.dart';
@@ -41,7 +41,8 @@ final ColorFilter _kGrayFilter = ColorFilter.matrix(<double>[
0.2126, 0.7152, 0.0722, 0, 0, //
0, 0, 0, 1, 0, //
]);
const ColorFilter _kNoFilter = ColorFilter.mode(Colors.transparent, BlendMode.multiply);
const ColorFilter _kNoFilter =
ColorFilter.mode(Colors.transparent, BlendMode.multiply);
// ============================================================
// 1. TaskVIPVideosView:福利页 - VIP/特价视频区
@@ -68,7 +69,8 @@ class _TaskVIPVideosViewState extends State<TaskVIPVideosView> {
if (!mounted) return;
rawData.addAll(res ?? []);
for (final element in res ?? <WareDiscountAreaData>[]) {
dataSource.add(VidService.fetchFreeSourceList(element.id ?? '', size: 4, sortType: 0));
dataSource.add(VidService.fetchFreeSourceList(element.id ?? '',
size: 4, sortType: 0));
}
setState(() {});
}
@@ -82,7 +84,8 @@ class _TaskVIPVideosViewState extends State<TaskVIPVideosView> {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
padding: EdgeInsets.symmetric(horizontal: 18.w),
itemBuilder: (_, index) => FreeAreaVideoGridView(dataSource[index], model: rawData[index]),
itemBuilder: (_, index) =>
FreeAreaVideoGridView(dataSource[index], model: rawData[index]),
);
}
}
@@ -102,17 +105,21 @@ class FreeAreaVideoGridView extends StatelessWidget {
if (!snapshot.hasData) {
return const SizedBox(height: 340, child: LoadingCenterWidget());
}
if (snapshot.hasError || snapshot.data == null || (snapshot.data?.list?.isEmpty ?? true)) {
if (snapshot.hasError ||
snapshot.data == null ||
(snapshot.data?.list?.isEmpty ?? true)) {
return const SizedBox.shrink();
}
return SizedBox(
height: 342,
child: Stack(
children: [
Image.asset('area_discount_bg.webp'.mineImgPath, height: double.infinity, fit: BoxFit.fill),
Image.asset('area_discount_bg.webp'.mineImgPath,
height: double.infinity, fit: BoxFit.fill),
Positioned.fill(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 8),
padding:
const EdgeInsets.symmetric(vertical: 20, horizontal: 8),
child: Column(
children: [
_buildHeader(),
@@ -135,15 +142,19 @@ class FreeAreaVideoGridView extends StatelessWidget {
children: [
Text(
model?.title ?? '',
style: const TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
),
const Spacer(),
GestureDetector(
onTap: () => Get.to(MoreFreeVideoPage(model?.title ?? '', model?.id ?? '')),
onTap: () =>
Get.to(MoreFreeVideoPage(model?.title ?? '', model?.id ?? '')),
child: const Row(
children: [
Text('更多', style: TextStyle(color: Color(0xff999999), fontSize: 12)),
Icon(Icons.arrow_forward_ios_rounded, size: 10, color: Color(0xff999999)),
Text('更多',
style: TextStyle(color: Color(0xff999999), fontSize: 12)),
Icon(Icons.arrow_forward_ios_rounded,
size: 10, color: Color(0xff999999)),
],
),
),
@@ -179,7 +190,11 @@ class FreeAreaVideoGridView extends StatelessWidget {
class TaskCenterVIPGuideView extends StatelessWidget {
TaskCenterVIPGuideView({super.key});
static const _privilegeIcons = ['privilege_gold.webp', 'privilege_ai.webp', 'privilege_game.webp'];
static const _privilegeIcons = [
'privilege_gold.webp',
'privilege_ai.webp',
'privilege_game.webp'
];
static const _privilegeTitles = ['至尊金币', 'AI科技', '成人游戏'];
static const _privilegeSubTs = ['价值100元', '价值500元', '价值1000元'];
@@ -198,7 +213,9 @@ class TaskCenterVIPGuideView extends StatelessWidget {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 15),
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('vip_privilege_bg.webp'.mineImgPath), fit: BoxFit.fill),
image: DecorationImage(
image: AssetImage('vip_privilege_bg.webp'.mineImgPath),
fit: BoxFit.fill),
),
child: Column(
children: [
@@ -223,11 +240,15 @@ class TaskCenterVIPGuideView extends StatelessWidget {
10.sizeBoxW,
EasyRichText(
'开通荣耀至尊卡会员预计年省1800元',
defaultStyle: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
defaultStyle: const TextStyle(
color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
patternList: [
EasyRichTextPattern(
targetString: '荣耀至尊卡|1800元',
style: const TextStyle(color: Color(0xffE3C891), fontSize: 14, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Color(0xffE3C891),
fontSize: 14,
fontWeight: FontWeight.w500),
),
],
),
@@ -252,7 +273,9 @@ class TaskCenterVIPGuideView extends StatelessWidget {
child: Container(
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('privilege_bg.webp'.mineImgPath), fit: BoxFit.fill),
image: DecorationImage(
image: AssetImage('privilege_bg.webp'.mineImgPath),
fit: BoxFit.fill),
),
child: Column(
children: [
@@ -261,25 +284,36 @@ class TaskCenterVIPGuideView extends StatelessWidget {
1.sizeBoxH,
Text(
_privilegeTitles[index],
style: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w600),
style: const TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600),
),
3.sizeBoxH,
Text(_privilegeSubTs[index], style: const TextStyle(color: Color(0xff9FA19F), fontSize: 10)),
Text(_privilegeSubTs[index],
style: const TextStyle(
color: Color(0xff9FA19F), fontSize: 10)),
],
),
),
),
6.sizeBoxH,
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () => Get.to(MineChargeVipPage()),
child: Container(
width: 50,
height: 24,
alignment: Alignment.center,
decoration: BoxDecoration(color: const Color(0xffFFD5A8), borderRadius: BorderRadius.circular(18)),
decoration: BoxDecoration(
color: const Color(0xffFFD5A8),
borderRadius: BorderRadius.circular(18)),
child: const Text(
'待领取',
style: TextStyle(color: Color(0xff692A1F), fontSize: 10, fontWeight: FontWeight.w500),
style: TextStyle(
color: Color(0xff692A1F),
fontSize: 10,
fontWeight: FontWeight.w500),
),
),
),
@@ -294,7 +328,9 @@ class TaskCenterVIPGuideView extends StatelessWidget {
alignment: Alignment.centerLeft,
children: [
Image.asset(
globalStore.isVIP ? 'welfare_vip_bg.webp'.mineImgPath : 'welfare_normal_bg.webp'.mineImgPath,
globalStore.isVIP
? 'welfare_vip_bg.webp'.mineImgPath
: 'welfare_normal_bg.webp'.mineImgPath,
width: double.infinity,
fit: BoxFit.fitWidth,
),
@@ -323,7 +359,10 @@ class TaskCenterVIPGuideView extends StatelessWidget {
children: [
const Text(
'VIP限时特惠 畅享全场',
style: TextStyle(color: Color(0xffF37952), fontSize: 14, fontWeight: FontWeight.w500),
style: TextStyle(
color: Color(0xffF37952),
fontSize: 14,
fontWeight: FontWeight.w500),
),
3.sizeBoxH,
Row(
@@ -331,15 +370,20 @@ class TaskCenterVIPGuideView extends StatelessWidget {
children: [
Text(
globalStore.isVIP
? ((globalStore.meInfo?.vipName == null || globalStore.meInfo?.vipName == '')
? ((globalStore.meInfo?.vipName == null ||
globalStore.meInfo?.vipName == '')
? '至尊永久卡'
: globalStore.meInfo!.vipName!)
: '新人限时特惠',
style: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w500),
),
4.sizeBoxW,
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
padding:
const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: .5),
borderRadius: BorderRadius.circular(32),
@@ -354,7 +398,8 @@ class TaskCenterVIPGuideView extends StatelessWidget {
: cd != null
? '${cd.discountHour}:${cd.discountMin}:${cd.discountSec}'
: '活动已结束',
style: const TextStyle(color: Color(0xff999999), fontSize: 11),
style: const TextStyle(
color: Color(0xff999999), fontSize: 11),
);
},
),
@@ -392,7 +437,9 @@ class TaskCenterVIPGuideView extends StatelessWidget {
),
2.w.sizeBoxW,
SvgPicture.asset(
isVip ? 'vip_upgrade_arrow.svg'.mineImgPath : 'vip_arrow.svg'.mineImgPath,
isVip
? 'vip_upgrade_arrow.svg'.mineImgPath
: 'vip_arrow.svg'.mineImgPath,
width: 12,
),
],
@@ -415,7 +462,8 @@ class MineTaskView extends StatelessWidget {
return ListView.separated(
physics: const ClampingScrollPhysics(),
// 底部加上系统安全区,避免最后一个任务被导航条遮挡
padding: EdgeInsets.fromLTRB(16, 0, 16, 20 + Get.mediaQuery.padding.bottom),
padding:
EdgeInsets.fromLTRB(16, 0, 16, 20 + Get.mediaQuery.padding.bottom),
itemCount: tasks.length,
separatorBuilder: (_, __) => 12.sizeBoxH,
itemBuilder: (_, index) => TaskItem(tasks[index]),
@@ -466,7 +514,11 @@ class _TaskItemState extends State<TaskItem> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
20.sizeBoxH,
NetworkImageLoader(imageUrl: task.img ?? '', width: 40, height: 40, borderRadius: 30),
NetworkImageLoader(
imageUrl: task.img ?? '',
width: 40,
height: 40,
borderRadius: 30),
8.sizeBoxW,
Expanded(
child: Column(
@@ -477,26 +529,36 @@ class _TaskItemState extends State<TaskItem> {
Flexible(
child: Text(
task.title ?? task.subTitle ?? '',
style: const TextStyle(color: Colors.white, fontWeight: FontWeight.w700, fontSize: 14),
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 14),
overflow: TextOverflow.ellipsis,
),
),
if (task.prizesIntegral != null && task.prizesIntegral != 0) ...[
if (task.prizesIntegral != null &&
task.prizesIntegral != 0) ...[
4.sizeBoxW,
Text(
' +${task.prizesIntegral}积分',
style: const TextStyle(color: Color(0xffF54570), fontWeight: FontWeight.w400, fontSize: 12),
style: const TextStyle(
color: Color(0xffF54570),
fontWeight: FontWeight.w400,
fontSize: 12),
),
],
if (task.countdownType == 1) ...[
8.sizeBoxW,
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 3),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(26),
color: const Color(0xffFFA800),
),
child: const Text('限时', style: TextStyle(color: Colors.white, fontSize: 10)),
child: const Text('限时',
style:
TextStyle(color: Colors.white, fontSize: 10)),
),
],
],
@@ -558,7 +620,8 @@ class _TaskItemState extends State<TaskItem> {
return task.desc ?? '';
}
String _formatCountdown(Duration duration) => DateTimeUtil.formatHMS(duration.inSeconds, alwaysHour: true);
String _formatCountdown(Duration duration) =>
DateTimeUtil.formatHMS(duration.inSeconds, alwaysHour: true);
String _getTaskStatus(int? status) {
if (widget.task.countdownType == 1 &&
@@ -595,16 +658,21 @@ class _TaskItemState extends State<TaskItem> {
: const Color(0xffFFC000);
final textColor = isClaimStyle ? const Color(0xff692A1F) : Colors.white;
final isSmall = isClaimStyle || isDone;
return InkWell(enableFeedback: false,
return InkWell(
enableFeedback: false,
onTap: () => _onBtnTap(task, btnText),
child: Container(
width: 70,
height: 32,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(24), color: bgColor),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24), color: bgColor),
child: Center(
child: Text(
btnText,
style: TextStyle(color: textColor, fontWeight: FontWeight.w500, fontSize: isSmall ? 12 : 14),
style: TextStyle(
color: textColor,
fontWeight: FontWeight.w500,
fontSize: isSmall ? 12 : 14),
),
),
),
@@ -634,7 +702,8 @@ class _TaskItemState extends State<TaskItem> {
/// 完成任务(标记 doType 为 1/2 的任务)
Future<void> _doTask(DailyTask task) async {
final needDotask = (task.doType == 1 && task.type == 0) || (task.doType == 2 && task.type == 2);
final needDotask = (task.doType == 1 && task.type == 0) ||
(task.doType == 2 && task.type == 2);
if (!needDotask) return;
final res = await CommonService.doTask(task.id ?? '', task.doType);
if (res) {
@@ -683,11 +752,14 @@ class MineSignView extends StatelessWidget {
children: [
GradientText(
'每日签到领福利',
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
gradient: const LinearGradient(colors: [Color(0xffFFE580), Color(0xffFACC15)]),
style: const TextStyle(
fontSize: 16, fontWeight: FontWeight.w500),
gradient: const LinearGradient(
colors: [Color(0xffFFE580), Color(0xffFACC15)]),
),
4.sizeBoxH,
if (logic.continuousDays <= 7) CustomProgressBar(progress: logic.continuousDays / 7),
if (logic.continuousDays <= 7)
CustomProgressBar(progress: logic.continuousDays / 7),
6.sizeBoxH,
_buildContinuousText(logic.continuousDays),
12.sizeBoxH,
@@ -710,7 +782,8 @@ class MineSignView extends StatelessWidget {
Widget _buildContinuousText(int continuousDays) {
return EasyRichText(
'已连续签到 $continuousDays 天 神秘大礼在等你',
defaultStyle: TextStyle(fontSize: 14, color: Colors.white.withValues(alpha: .55)),
defaultStyle:
TextStyle(fontSize: 14, color: Colors.white.withValues(alpha: .55)),
patternList: [
EasyRichTextPattern(
targetString: '$continuousDays',
@@ -724,11 +797,20 @@ class MineSignView extends StatelessWidget {
Widget _buildSignInGrid(MineSignLogic logic) {
return Column(
children: [
_SignInRow(_SignRowType.title, controller: logic.titleScrollCtr, list: logic.checkList ?? [], logic: logic),
_SignInRow(_SignRowType.title,
controller: logic.titleScrollCtr,
list: logic.checkList ?? [],
logic: logic),
12.sizeBoxH,
_SignInRow(_SignRowType.normal, controller: logic.normalScrollCtr, list: logic.checkList ?? [], logic: logic),
_SignInRow(_SignRowType.normal,
controller: logic.normalScrollCtr,
list: logic.checkList ?? [],
logic: logic),
12.sizeBoxH,
_SignInRow(_SignRowType.vip, controller: logic.vipScrollCtr, list: logic.vipCheckList ?? [], logic: logic),
_SignInRow(_SignRowType.vip,
controller: logic.vipScrollCtr,
list: logic.vipCheckList ?? [],
logic: logic),
],
);
}
@@ -744,7 +826,9 @@ class MineSignView extends StatelessWidget {
height: 38,
alignment: Alignment.center,
decoration: BoxDecoration(
color: isSigned ? Colors.white.withValues(alpha: .3) : const Color(0xffFFC000),
color: isSigned
? Colors.white.withValues(alpha: .3)
: const Color(0xffFFC000),
borderRadius: BorderRadius.circular(24),
),
child: Row(
@@ -787,7 +871,10 @@ class MineSignView extends StatelessWidget {
'立即解锁可领"免费+豪奖"双重奖励',
maxLines: 1,
overflow: TextOverflow.ellipsis,
defaultStyle: TextStyle(fontSize: 12, color: Colors.white.withValues(alpha: .88), fontWeight: FontWeight.w400),
defaultStyle: TextStyle(
fontSize: 12,
color: Colors.white.withValues(alpha: .88),
fontWeight: FontWeight.w400),
patternList: [
EasyRichTextPattern(
targetString: r'"免费\+豪奖"双重奖励',
@@ -806,13 +893,18 @@ class MineSignView extends StatelessWidget {
height: 18,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 6),
decoration: BoxDecoration(color: const Color(0xFFFFD900), borderRadius: BorderRadius.circular(12)),
decoration: BoxDecoration(
color: const Color(0xFFFFD900),
borderRadius: BorderRadius.circular(12)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
'开通会员',
style: TextStyle(fontSize: 10, color: Color(0xFF111111), fontWeight: FontWeight.w500),
style: TextStyle(
fontSize: 10,
color: Color(0xFF111111),
fontWeight: FontWeight.w500),
),
4.sizeBoxW,
Image.asset('ic_vip_enter.png'.mineImgPath, width: 12),
@@ -842,7 +934,8 @@ class _SignInRow extends StatelessWidget {
final List<CheckinPrize> list;
final MineSignLogic? logic;
const _SignInRow(this.type, {required this.controller, required this.list, this.logic});
const _SignInRow(this.type,
{required this.controller, required this.list, this.logic});
bool get _isTitle => type == _SignRowType.title;
bool get _isVip => type == _SignRowType.vip;
@@ -859,7 +952,10 @@ class _SignInRow extends StatelessWidget {
? const Color(0xffFFDA0B).withValues(alpha: .08)
: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(_isTitle ? 0 : 18),
border: _isVip ? const Border(bottom: BorderSide(color: Color(0x99FFD900), width: 1)) : null,
border: _isVip
? const Border(
bottom: BorderSide(color: Color(0x99FFD900), width: 1))
: null,
),
child: Column(
children: [
@@ -877,7 +973,10 @@ class _SignInRow extends StatelessWidget {
Divider(height: 1, color: Colors.white.withValues(alpha: .1)),
4.sizeBoxH,
Image.asset(
(type == _SignRowType.normal ? 'no_vip_bottom.webp' : 'vip_bottom.webp').mineImgPath,
(type == _SignRowType.normal
? 'no_vip_bottom.webp'
: 'vip_bottom.webp')
.mineImgPath,
height: 20,
),
],
@@ -889,19 +988,24 @@ class _SignInRow extends StatelessWidget {
Widget _buildCell(CheckinPrize prize, int i) {
if (_isTitle) {
// 顶部标签:已签到灰底,未签到金底;今日未签到时该格显示"今天"
final isTodayCell = logic != null && !logic!.isSigned && i == logic!.continuousDays;
final isTodayCell =
logic != null && !logic!.isSigned && i == logic!.continuousDays;
return Container(
width: 42,
margin: const EdgeInsets.only(right: 6),
alignment: Alignment.center,
decoration: BoxDecoration(
color: prize.isCheckedIn == true ? Colors.white.withValues(alpha: .1) : const Color(0xffFFD900),
color: prize.isCheckedIn == true
? Colors.white.withValues(alpha: .1)
: const Color(0xffFFD900),
borderRadius: BorderRadius.circular(4),
),
child: Text(
isTodayCell ? '今天' : '第${i + 1}天',
style: TextStyle(
color: prize.isCheckedIn == true ? const Color(0xff999999) : const Color(0xff62020E),
color: prize.isCheckedIn == true
? const Color(0xff999999)
: const Color(0xff62020E),
fontSize: 10,
),
),
@@ -927,7 +1031,9 @@ class _SignDayItem extends StatelessWidget {
/// 灰度滤镜规则:会员行需 isCheckedIn && isReceive 才置灰;普通行只看 isCheckedIn
ColorFilter get _filter {
if (isVipRow) {
return (model.isCheckedIn == true && model.isReceive == true) ? _kGrayFilter : (model.isExpired == true ? _kGrayFilter : _kNoFilter);
return (model.isCheckedIn == true && model.isReceive == true)
? _kGrayFilter
: (model.isExpired == true ? _kGrayFilter : _kNoFilter);
}
return model.isCheckedIn == true ? _kGrayFilter : _kNoFilter;
}
@@ -937,9 +1043,13 @@ class _SignDayItem extends StatelessWidget {
if (isVipRow) {
return (model.isCheckedIn == true && model.isReceive == true)
? 'checked_in_coin.webp'.mineImgPath
: (model.isExpired == true ? 'checked_in_coin.webp'.mineImgPath : 'check_in_coin.webp'.mineImgPath);
: (model.isExpired == true
? 'checked_in_coin.webp'.mineImgPath
: 'check_in_coin.webp'.mineImgPath);
}
return model.isCheckedIn == true ? 'checked_in_coin.webp'.mineImgPath : 'check_in_coin.webp'.mineImgPath;
return model.isCheckedIn == true
? 'checked_in_coin.webp'.mineImgPath
: 'check_in_coin.webp'.mineImgPath;
}
@override
@@ -955,7 +1065,10 @@ class _SignDayItem extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: const Color(0x0DFFFFFF),
border: isVipRow ? const Border(bottom: BorderSide(color: Color(0x99FFD900), width: 1)) : null,
border: isVipRow
? const Border(
bottom: BorderSide(color: Color(0x99FFD900), width: 1))
: null,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -977,11 +1090,18 @@ class _SignDayItem extends StatelessWidget {
hasImg
? ColorFiltered(
colorFilter: _filter,
child: NetworkImageLoader(width: 34, height: 34, fit: BoxFit.contain, imageUrl: model.image!),
child: NetworkImageLoader(
width: 34,
height: 34,
fit: BoxFit.contain,
imageUrl: model.image!),
)
: Image.asset(_defaultImg, width: 34, height: 34, fit: BoxFit.contain),
: Image.asset(_defaultImg,
width: 34, height: 34, fit: BoxFit.contain),
//覆盖在上面的过期图标
if (model.isExpired == true) Image.asset("ic_sign_expired.webp".mineImgPath, width: 31, height: 31, fit: BoxFit.contain)
if (model.isExpired == true)
Image.asset("ic_sign_expired.webp".mineImgPath,
width: 31, height: 31, fit: BoxFit.contain)
],
),
@@ -992,7 +1112,9 @@ class _SignDayItem extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10,
color: model.isCheckedIn == true ? Colors.white : const Color(0xFFFFD900),
color: model.isCheckedIn == true
? Colors.white
: const Color(0xFFFFD900),
),
),
],
@@ -1000,7 +1122,11 @@ class _SignDayItem extends StatelessWidget {
),
// 非 VIP 用户在 VIP 行显示锁
if (!globalStore.isVIP && isVipRow)
Positioned(left: 0, top: 0, child: Image.asset('ic_sign_lock.png'.mineImgPath, width: 18, height: 18)),
Positioned(
left: 0,
top: 0,
child: Image.asset('ic_sign_lock.png'.mineImgPath,
width: 18, height: 18)),
// 可补领标识
if (isVipRow && model.canClaim == true)
Positioned(
@@ -1011,11 +1137,17 @@ class _SignDayItem extends StatelessWidget {
child: GestureDetector(
onTap: () => logic?.doCheckinClaimVip(),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 1),
decoration: BoxDecoration(color: const Color(0xffD70000), borderRadius: BorderRadius.circular(4)),
padding:
const EdgeInsets.symmetric(horizontal: 4, vertical: 1),
decoration: BoxDecoration(
color: const Color(0xffD70000),
borderRadius: BorderRadius.circular(4)),
child: const Text(
'补领',
style: TextStyle(color: Colors.white, fontSize: 8, fontWeight: FontWeight.w500),
style: TextStyle(
color: Colors.white,
fontSize: 8,
fontWeight: FontWeight.w500),
),
),
),
@@ -1023,7 +1155,10 @@ class _SignDayItem extends StatelessWidget {
),
// 高 VIP 等级 + 普通行:显示 +1 标识
if ((globalStore.meInfo?.vipLevel ?? 0) >= 1 && !isVipRow)
Positioned(top: 6, right: 2, child: Image.asset('ic_add2.png'.mineImgPath, width: 11)),
Positioned(
top: 6,
right: 2,
child: Image.asset('ic_add2.png'.mineImgPath, width: 11)),
],
),
);
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:hgmj/tools_base/refresh/pull_refresh.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/tools_base/refresh/pull_refresh.dart';
import '../../../hj_model/mine/credit_record_model.dart';
import 'integral_record_logic.dart';
@@ -30,11 +30,13 @@ class _ExchangeVipPageState extends State<ExchangeVipPage> {
children: [
Expanded(
child: pullYsRefresh(
onInit: (controller) => _.refreshController = controller,
onInit: (controller) =>
_.refreshController = controller,
onRefresh: (controller) => _.loadData(),
onLoading: (controller) => _.loadMoreData(),
child: CustomScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
slivers: <Widget>[
...[
_buildHistoryTable(_),
@@ -92,7 +94,10 @@ class _ExchangeVipPageState extends State<ExchangeVipPage> {
children: [
Text(
item.desc ?? '',
style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w500),
),
Text(
DateTimeUtil.utcTurnYear(item.createdAt),
@@ -105,7 +110,10 @@ class _ExchangeVipPageState extends State<ExchangeVipPage> {
"${item.integral ?? 0}积分",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Color(0xffFFC000), fontSize: 12, fontWeight: FontWeight.w500),
style: TextStyle(
color: Color(0xffFFC000),
fontSize: 12,
fontWeight: FontWeight.w500),
),
],
),
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hgmj/hj_model/mine/task_center_data.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:hgmj/tools_base/loading/loading_center_widget.dart';
import 'package:wydj/hj_model/mine/task_center_data.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/toast.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:wydj/tools_base/loading/loading_center_widget.dart';
import '../../../tools_base/loading/loading_helper.dart';
import '../../../tools_base/widget/net_image_widget.dart';
@@ -41,14 +41,16 @@ class IntegralExchangePage extends StatelessWidget {
color: Color(0xff303030),
borderRadius: BorderRadius.circular(9),
),
padding: EdgeInsets.only(left: 12.w, right: 12.w, top: 16.h, bottom: 9.h),
padding: EdgeInsets.only(
left: 12.w, right: 12.w, top: 16.h, bottom: 9.h),
width: double.infinity,
height: double.infinity,
child: Column(
children: [
Expanded(
child: ClipRRect(
borderRadius: BorderRadius.vertical(top: Radius.circular(9)),
borderRadius:
BorderRadius.vertical(top: Radius.circular(9)),
child: Stack(
alignment: Alignment.centerLeft,
children: [
@@ -68,17 +70,22 @@ class IntegralExchangePage extends StatelessWidget {
Expanded(
child: Text(
'花费${model?.price ?? 0}积分',
style: TextStyle(color: Color(0xFF989898), fontSize: 14.sp),
style: TextStyle(
color: Color(0xFF989898), fontSize: 14.sp),
),
),
GestureDetector(
onTap: () => onExchange(model!),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 9.w, vertical: 3.h),
decoration: BoxDecoration(color: Color(0xffFFC000), borderRadius: BorderRadius.circular(11)),
padding: EdgeInsets.symmetric(
horizontal: 9.w, vertical: 3.h),
decoration: BoxDecoration(
color: Color(0xffFFC000),
borderRadius: BorderRadius.circular(11)),
child: Text(
'立即兑换',
style: TextStyle(color: Color(0xFF141414), fontSize: 12.sp),
style: TextStyle(
color: Color(0xFF141414), fontSize: 12.sp),
),
),
)
@@ -1,6 +1,6 @@
import 'package:get/get.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/debug_log.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/tools_base/debug_log.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../../hj_model/mine/credit_record_model.dart';
@@ -21,14 +21,17 @@ class IntegralRecordLogic extends GetxController {
void loadData({int page = 1}) async {
try {
final res = await MineService.getCreditRecords(pageNumber: page, pageSize: 20);
final res =
await MineService.getCreditRecords(pageNumber: page, pageSize: 20);
if (res.isNotEmpty) {
if (page == 1) groupList.clear();
currentPage = page;
groupList.addAll(res);
}
refreshController?.refreshCompleted();
(res.length) < 20 ? refreshController?.loadNoData() : refreshController?.loadComplete();
(res.length) < 20
? refreshController?.loadNoData()
: refreshController?.loadComplete();
} catch (e) {
refreshController?.refreshCompleted();
refreshController?.loadComplete();
+28 -15
View File
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.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/toast.dart';
import 'package:wydj/assets_tool/images.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/toast.dart';
import 'package:provider/provider.dart';
import '../../home/widget/user_avatar.dart';
@@ -65,7 +65,8 @@ class MineInfoWidget extends StatelessWidget {
),
),
8.sizeBoxW,
if (store.isVIP && vipIcon.isNotEmpty) Image.asset(vipIcon, height: 20),
if (store.isVIP && vipIcon.isNotEmpty)
Image.asset(vipIcon, height: 20),
],
);
},
@@ -74,7 +75,8 @@ class MineInfoWidget extends StatelessWidget {
InkWell(
enableFeedback: false,
onTap: () {
Clipboard.setData(ClipboardData(text: (logic.userInfo?.uid ?? 0).toString()));
Clipboard.setData(ClipboardData(
text: (logic.userInfo?.uid ?? 0).toString()));
showToast('复制成功');
},
child: Text(
@@ -100,7 +102,9 @@ class MineInfoWidget extends StatelessWidget {
padding: EdgeInsets.symmetric(vertical: 5),
decoration: BoxDecoration(
color: Color(0xFFF68804),
borderRadius: BorderRadius.only(topLeft: Radius.circular(15), bottomLeft: Radius.circular(15))),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(15),
bottomLeft: Radius.circular(15))),
margin: EdgeInsets.only(left: 30, top: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -153,7 +157,8 @@ class MineTaskMenuWidget extends StatelessWidget {
final items = [
InkWell(
enableFeedback: false,
onTap: () => Get.to(() => MineChargeVipPage(), preventDuplicates: false),
onTap: () =>
Get.to(() => MineChargeVipPage(), preventDuplicates: false),
child: _buildItem("", 'mine_vip_enter.webp'.mineImgPath, 0),
),
InkWell(
@@ -227,7 +232,10 @@ class MineTaskMenuWidget extends StatelessWidget {
bottom: 10,
child: Text(
title,
style: TextStyle(fontSize: 10, color: Colors.white.withValues(alpha: .55), fontWeight: FontWeight.w400),
style: TextStyle(
fontSize: 10,
color: Colors.white.withValues(alpha: .55),
fontWeight: FontWeight.w400),
),
),
],
@@ -240,12 +248,17 @@ class MineFunchtionGridView extends StatelessWidget {
/// 处理
final functionLabels = ['历史记录', '我的购买', '我的收藏', '我的喜欢'];
final functionImgs = ['mine_collect.png', 'mine_menu_3.png', 'mine_post.png', 'mine_menu_4.png'];
final functionImgs = [
'mine_collect.png',
'mine_menu_3.png',
'mine_post.png',
'mine_menu_4.png'
];
final functions = [
() => ColHisBuyPage.to(PageType.history),
() => ColHisBuyPage.to(PageType.buy),
() => ColHisBuyPage.to(PageType.collect),
() => ColHisBuyPage.to(PageType.like),
() => ColHisBuyPage.to(PageType.history),
() => ColHisBuyPage.to(PageType.buy),
() => ColHisBuyPage.to(PageType.collect),
() => ColHisBuyPage.to(PageType.like),
];
@override
@@ -1,15 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/global_store/store.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/api_service/mine_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/global_store/store.dart';
import 'package:provider/provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
import '../../../config/address.dart';
import '../../../config/config.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../../hj_utils/image_util.dart';
import '../../../tools_base/widget/net_image_widget.dart';
@@ -161,7 +161,8 @@ class _MineShareQRViewState extends State<MineShareQRView> {
),
),
20.sizeBoxH,
InkWell(enableFeedback: false,
InkWell(
enableFeedback: false,
onTap: () async {
final ok = await ImageUtil.saveWidgetToAlbum(boundaryKey);
showToast(ok ? "保存成功" : "保存失败,请重试");
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../../hj_model/home/collection_model.dart';
+47 -21
View File
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_model/splash/domain_source_model.dart';
import 'package:hgmj/hj_page/main_page/provider/msg_provider.dart';
import 'package:hgmj/hj_utils/date_time_util.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_model/splash/domain_source_model.dart';
import 'package:wydj/hj_page/main_page/provider/msg_provider.dart';
import 'package:wydj/hj_utils/date_time_util.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import 'package:provider/provider.dart';
import '../../../tools_base/global_store/store.dart';
@@ -55,15 +55,20 @@ class VipEntryCard extends StatelessWidget {
),
Consumer2<GlobalStore, MineMsgProvider>(
builder: (context, global, provider, child) {
final isUpgrade = global.isVIP && global.meInfo?.isUpgrade == true;
if (global.isVIP) return _vipRow(global, isUpgrade: isUpgrade);
final isUpgrade =
global.isVIP && global.meInfo?.isUpgrade == true;
if (global.isVIP)
return _vipRow(global, isUpgrade: isUpgrade);
// 倒计时态/默认态的切换跟着 tick 走,过期当帧即收起,不必等分层配置刷新回来
return ValueListenableBuilder<int>(
valueListenable: provider.tick,
builder: (_, __, ___) {
final cd = provider.countdownConfig;
if (cd != null) return _newerRow(cd);
return _titleRow(title: '开通会员 享专属特权', subtitle: '解锁专属 畅享无限', buttonText: '开通会员');
return _titleRow(
title: '开通会员 享专属特权',
subtitle: '解锁专属 畅享无限',
buttonText: '开通会员');
},
);
},
@@ -92,12 +97,17 @@ class VipEntryCard extends StatelessWidget {
child: Stack(
children: [
NetworkImageLoader(
imageUrl: config.meTab ?? "", width: 343, height: 64, fit: BoxFit.fill, borderRadius: 0),
imageUrl: config.meTab ?? "",
width: 343,
height: 64,
fit: BoxFit.fill,
borderRadius: 0),
// 倒计时块监听 tick 每秒刷新(过期自动收起)
ValueListenableBuilder<int>(
valueListenable: MineMsgProvider().tick,
builder: (_, __, ___) =>
config.hasDiscountCountdown ? _layeredCountdown(config) : const SizedBox.shrink(),
builder: (_, __, ___) => config.hasDiscountCountdown
? _layeredCountdown(config)
: const SizedBox.shrink(),
),
],
),
@@ -136,7 +146,8 @@ class VipEntryCard extends StatelessWidget {
borderRadius: BorderRadius.circular(3),
border: Border.all(color: const Color(0xffFFE381), width: 0.5),
),
child: Text(value, style: const TextStyle(color: Colors.white, fontSize: 12)),
child: Text(value,
style: const TextStyle(color: Colors.white, fontSize: 12)),
);
}
@@ -169,7 +180,8 @@ class VipEntryCard extends StatelessWidget {
}
return _titleRow(
title: '$vipTitle会员',
subtitle: '到期时间:${DateTimeUtil.utcTurnYear(global.meInfo?.vipExpireDate, char: ".")}',
subtitle:
'到期时间:${DateTimeUtil.utcTurnYear(global.meInfo?.vipExpireDate, char: ".")}',
buttonText: isUpgrade ? '补差价升级' : '会员中心',
onButtonTap: isUpgrade ? () => Get.to(() => MineChargeVipPage()) : null,
);
@@ -177,14 +189,18 @@ class VipEntryCard extends StatelessWidget {
//通用布局:标题+副标题+按钮
Widget _titleRow(
{required String title, required String subtitle, required String buttonText, VoidCallback? onButtonTap}) {
{required String title,
required String subtitle,
required String buttonText,
VoidCallback? onButtonTap}) {
return _cardRow(
left: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
_goldText(title, 16),
Text(subtitle, style: TextStyle(fontSize: 10, color: Color(0xFFE9E8E7))),
Text(subtitle,
style: TextStyle(fontSize: 10, color: Color(0xFFE9E8E7))),
],
),
buttonText: buttonText,
@@ -192,7 +208,10 @@ class VipEntryCard extends StatelessWidget {
);
}
Widget _cardRow({required Widget left, required String buttonText, VoidCallback? onButtonTap}) {
Widget _cardRow(
{required Widget left,
required String buttonText,
VoidCallback? onButtonTap}) {
return Container(
padding: EdgeInsets.only(left: 60, right: 16),
alignment: Alignment.centerLeft,
@@ -208,7 +227,8 @@ class VipEntryCard extends StatelessWidget {
Widget _button(String text, {VoidCallback? onTap}) {
return GestureDetector(
onTap: onTap,
behavior: onTap != null ? HitTestBehavior.opaque : HitTestBehavior.translucent,
behavior:
onTap != null ? HitTestBehavior.opaque : HitTestBehavior.translucent,
child: Container(
alignment: Alignment.center,
height: 26,
@@ -222,7 +242,10 @@ class VipEntryCard extends StatelessWidget {
),
child: Text(
text,
style: TextStyle(fontSize: 10, color: Color(0xFF000000), fontWeight: FontWeight.w600),
style: TextStyle(
fontSize: 10,
color: Color(0xFF000000),
fontWeight: FontWeight.w600),
),
),
);
@@ -235,7 +258,8 @@ class VipEntryCard extends StatelessWidget {
colors: [Color(0xffFAE6D2), Color(0xffFFFFFF)],
).createShader(bounds),
blendMode: BlendMode.srcIn,
child: Text(text, style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.w600)),
child: Text(text,
style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.w600)),
);
}
@@ -259,8 +283,10 @@ class VipEntryCard extends StatelessWidget {
Widget _timeUnit(String val) => Padding(
padding: EdgeInsets.symmetric(horizontal: 2),
child: Text(val, style: TextStyle(fontSize: 12, color: Color(0xFFFF844D))),
child:
Text(val, style: TextStyle(fontSize: 12, color: Color(0xFFFF844D))),
);
Widget _timeColon() => Text(":", style: TextStyle(fontSize: 10, color: Color(0xFFFF844D)));
Widget _timeColon() =>
Text(":", style: TextStyle(fontSize: 10, color: Color(0xFFFF844D)));
}