logo和名称替换
This commit is contained in:
@@ -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 要跟着重建
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
|
||||
@@ -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)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user