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