Browse Source

1.动态详情,评论-已显示全部—修改;

2.新增加集换卡详情页面;
3.语言-增加部分文本语言并更改;
4.回乡VIP板块更改;原本的VIP卡逻辑暂时不用,换成用户充值200即成为会员,该页面ui调整;(原来逻辑未删减,暂保留不使用)
5.16进制渐变色值的方法,改变亮度暂定统一为95;
6.首页ui调整;邀请好友图片处,原单一图片现更改为轮播效果,新增集换卡引导也放在此处;
7.积分明细页面更改;共用一个页面根据积分跟集换卡的入口,传对应的值,查看对应的数据;
8.积分明细跳转路径更改,新增一个类型带入路径中跳转传入;
9.更改测试版本服务地址;
10.我的页面跟首页更改一致,单一图片改轮播效果;
11.会员中心,会员卡部分更改;将原有写法去掉,重写了会员卡的使用显示,并优化了该页面数据的显示;
12.我的页面,vip等级显示更改;
13.会员卡列表等级接口,实体类新增部分字段;(原定位分数已不用,更改为originScore,后期若用的原字段,需要修改)
14.订单结算页,支付类型更换时queryOrderInfo()接口中。优惠类型做了调整更改;(改修改需要多测试下,尝试多种情况看下,是否有问题;有可能部分情况没有预判到)
15.点单页结算跳转,vipLevelName,vipLevelName字段做了非空判断;
16.UserInfo实体类新增isVip字段;(主要用于查看用户数据是查询该用户是否已是vip卡状态)
17.福利兑换中心页面,我的信息部分ui做调整,新增集换卡数量的显示;
new_revision_app
wurong 2 years ago
parent
commit
1fedcb3e6a
  1. BIN
      assets/image/2x/my_trading.webp
  2. BIN
      assets/image/2x/trading_detail.webp
  3. BIN
      assets/image/2x/trading_history.webp
  4. BIN
      assets/image/2x/trading_logo.webp
  5. BIN
      assets/image/2x/trading_text.webp
  6. BIN
      assets/image/2x/vip_cz.webp
  7. BIN
      assets/image/2x/welfare_yz.webp
  8. BIN
      assets/image/3x/my_trading.webp
  9. BIN
      assets/image/3x/trading_detail.webp
  10. BIN
      assets/image/3x/trading_history.webp
  11. BIN
      assets/image/3x/trading_logo.webp
  12. BIN
      assets/image/3x/trading_text.webp
  13. BIN
      assets/image/3x/vip_cz.webp
  14. BIN
      assets/image/3x/welfare_yz.webp
  15. BIN
      assets/image/my_trading.webp
  16. BIN
      assets/image/trading_detail.webp
  17. BIN
      assets/image/trading_history.webp
  18. BIN
      assets/image/trading_logo.webp
  19. BIN
      assets/image/trading_text.webp
  20. BIN
      assets/image/vip_cz.webp
  21. BIN
      assets/image/welfare_yz.webp
  22. 1
      lib/generated/intl/messages_en.dart
  23. 1
      lib/generated/intl/messages_en_US.dart
  24. 1
      lib/generated/intl/messages_zh_CN.dart
  25. 1
      lib/generated/intl/messages_zh_Hans_CN.dart
  26. 1
      lib/generated/intl/messages_zh_Hant_CN.dart
  27. 1
      lib/generated/intl/messages_zh_TW.dart
  28. 10
      lib/generated/l10n.dart
  29. 57
      lib/home/home_page.dart
  30. 316
      lib/home/trading_card_page.dart
  31. 86
      lib/home/welfare_exchange.dart
  32. 213
      lib/integral/integral_detailed_page.dart
  33. 2
      lib/integral/integral_page.dart
  34. 1
      lib/l10n/intl_en.arb
  35. 1
      lib/l10n/intl_en_US.arb
  36. 1
      lib/l10n/intl_zh_CN.arb
  37. 1
      lib/l10n/intl_zh_Hans_CN.arb
  38. 1
      lib/l10n/intl_zh_Hant_CN.arb
  39. 1
      lib/l10n/intl_zh_TW.arb
  40. 5
      lib/main.dart
  41. 58
      lib/mine/mine_page.dart
  42. 255
      lib/mine/mine_vip/mine_vip_core.dart
  43. 26
      lib/retrofit/data/rank.dart
  44. 3
      lib/retrofit/data/user_info.dart
  45. 2
      lib/retrofit/min_api.dart
  46. 2
      lib/retrofit/retrofit_api.dart
  47. 3
      lib/setting/binding_phone_page.dart
  48. 35
      lib/settlement/settlement.dart
  49. 4
      lib/store/store_order.dart
  50. 8
      lib/utils/flutter_utils.dart
  51. 469
      lib/view_widget/mine_vip_entry.dart
  52. 133
      lib/vip/vip_page.dart
  53. 600
      lib/vip/vip_view/exclusive_coupon.dart
  54. 407
      lib/vip/vip_view/vip_top.dart
  55. 2
      lib/web/web_view/comment_list.dart

BIN
assets/image/2x/my_trading.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
assets/image/2x/trading_detail.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

BIN
assets/image/2x/trading_history.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 B

BIN
assets/image/2x/trading_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
assets/image/2x/trading_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/2x/vip_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
assets/image/2x/welfare_yz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/image/3x/my_trading.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
assets/image/3x/trading_detail.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

BIN
assets/image/3x/trading_history.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/3x/trading_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
assets/image/3x/trading_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
assets/image/3x/vip_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
assets/image/3x/welfare_yz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
assets/image/my_trading.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/trading_detail.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

BIN
assets/image/trading_history.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

BIN
assets/image/trading_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/image/trading_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/image/vip_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/welfare_yz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

1
lib/generated/intl/messages_en.dart

@ -260,6 +260,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("更多"), "gengduo" : MessageLookupByLibrary.simpleMessage("更多"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"),

1
lib/generated/intl/messages_en_US.dart

@ -260,6 +260,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("more"), "gengduo" : MessageLookupByLibrary.simpleMessage("more"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("more good coupons"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("more good coupons"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("more coupons"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("more coupons"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("modify bind phone"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("Changing the background"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("Changing the background"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("Changing the avatar"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("Changing the avatar"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("More preferential"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("More preferential"),

1
lib/generated/intl/messages_zh_CN.dart

@ -260,6 +260,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("更多"), "gengduo" : MessageLookupByLibrary.simpleMessage("更多"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"),

1
lib/generated/intl/messages_zh_Hans_CN.dart

@ -260,6 +260,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("更多"), "gengduo" : MessageLookupByLibrary.simpleMessage("更多"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"),

1
lib/generated/intl/messages_zh_Hant_CN.dart

@ -256,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("更多"), "gengduo" : MessageLookupByLibrary.simpleMessage("更多"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改綁定手機號"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"),

1
lib/generated/intl/messages_zh_TW.dart

@ -258,6 +258,7 @@ class MessageLookup extends MessageLookupByLibrary {
"gengduo" : MessageLookupByLibrary.simpleMessage("更多"), "gengduo" : MessageLookupByLibrary.simpleMessage("更多"),
"gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"),
"gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"), "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"),
"genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改綁定手機號"),
"genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"), "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"),
"genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更換頭像"), "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更換頭像"),
"gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"), "gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"),

10
lib/generated/l10n.dart

@ -7135,6 +7135,16 @@ class S {
); );
} }
/// ``
String get genggaibangdingshoujihao {
return Intl.message(
'更改绑定手机号',
name: 'genggaibangdingshoujihao',
desc: '',
args: [],
);
}
/// `使` /// `使`
String get privacy_policy4 { String get privacy_policy4 {
return Intl.message( return Intl.message(

57
lib/home/home_page.dart

@ -602,26 +602,55 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
Widget spread(){ Widget spread(){
return Container( return Container(
width: double.infinity, width: double.infinity,
height: 80.h, height: 85.h,
margin: EdgeInsets.symmetric(horizontal: 14.w), child: Swiper(
child: GestureDetector( pagination: SwiperPagination(
onTap: (){ alignment: Alignment.bottomCenter,
Navigator.of(context).pushNamed('/router/invite_friends'); margin: EdgeInsets.only(top: 5.h),
// Navigator.of(context).pushNamed('/router/mine_greenery'); builder: DotSwiperPaginationBuilder(
}, size: 8.w,
child: ClipRRect( activeSize: 8.w,
child:Image.asset( space: 5.w,
"assets/image/welfare_spread.webp", activeColor: Colors.white,
width:double.infinity, color: Colors.white.withAlpha(76),
fit: BoxFit.fill,
height:double.infinity,
), ),
borderRadius: BorderRadius.circular(6.w),
), ),
autoplay:true,
duration: 1000,
autoplayDelay: 2000,
itemBuilder: (context, position) {
return GestureDetector(
onTap: (){
if(position == 0){
Navigator.of(context).pushNamed('/router/invite_friends');
}else if(position == 1){
Navigator.of(context).pushNamed('/router/trading_card_page');
}
},
child:Container(
margin: EdgeInsets.symmetric(horizontal:14.w),
child: ClipRRect(
child:Image.asset(
spreadItem[position],
width:double.infinity,
fit: BoxFit.fill,
height:double.infinity,
),
borderRadius: BorderRadius.circular(6.w),
),
),
);
},
itemCount:2,
), ),
); );
} }
final List<String> spreadItem = [
"assets/image/welfare_spread.webp",
"assets/image/welfare_yz.webp",
];
/// ///
toScan() async { toScan() async {
if (await Permission.camera.isPermanentlyDenied) { if (await Permission.camera.isPermanentlyDenied) {

316
lib/home/trading_card_page.dart

@ -0,0 +1,316 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../retrofit/data/user_info.dart';
import '../view_widget/classic_header.dart';
import '../view_widget/my_footer.dart';
class TradingCardPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _TradingCardPage();
}
}
class _TradingCardPage extends State<TradingCardPage> {
ApiService apiService;
final RefreshController refreshController = RefreshController();
UserInfo userInfo;
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), context: context, token: value.getString("token"));
queryUserBalance();
});
}
///
queryUserBalance() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
if (mounted) setState(() {});
refreshController.refreshCompleted();
refreshController.loadComplete();
}else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Stack(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
width: double.infinity,
height: 306.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
title: "",
titleColor: Colors.white,
background: Colors.transparent,
leadingColor: Colors.white,
brightness: Brightness.dark,
),
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Colors.white,
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
queryUserBalance();
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child:Container(
margin: EdgeInsets.symmetric(horizontal:14.w),
child:Column(
children: [
Container(
width: double.infinity,
padding:EdgeInsets.only(top:24.h,bottom: 27.h) ,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 4),
blurRadius: 8,
spreadRadius: 8,
)
],
),
child: Column(
children:[
Image.asset(
"assets/image/my_trading.webp",
width:200.w,
fit: BoxFit.fill,
height:22.h,
),
SizedBox(height:28.h),
Image.asset(
"assets/image/trading_logo.webp",
width:196.w,
fit: BoxFit.fill,
height:150.h,
),
Padding(padding:EdgeInsets.only(top: 21.h,bottom: 17.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"我已收集",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
SizedBox(width: 12.w,),
Text(
(userInfo?.happyBean ?? 0).toString(),
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 18.sp,
fontWeight: MyFontWeight.regular),
)
],
),),
Padding(padding:EdgeInsets.only(bottom:31.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(padding:EdgeInsets.only(right:1.w),
child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_exchange');
},
child: Text(
"兑换区逛逛",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.regular),
),
)),
Image.asset(
"assets/image/icon_right_z.webp",
width:16,
fit: BoxFit.fill,
height:16,
color: Color(0xFF32A060),
)
],
),),
Image.asset(
"assets/image/trading_text.webp",
width:314.w,
fit: BoxFit.cover,
height:98.h,
),
]
),
),
Container(
width: double.infinity,
padding:EdgeInsets.symmetric(vertical: 17.h,horizontal: 32.w) ,
margin: EdgeInsets.only(top:16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 4),
blurRadius: 8,
spreadRadius: 8,
)
],
),
child: Row(
children: [
Image.asset(
"assets/image/trading_history.webp",
width:16.h,
fit: BoxFit.fill,
height:16.h,
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap:(){
Navigator.of(context)
.pushNamed('/router/exchange_history_page');
},
child: Padding(padding:EdgeInsets.only(left: 4.w),
child: Text(
"兑换记录",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular),
)),
),
Spacer(),
Container(
width: 1.w,
height: 35.5.h,
margin: EdgeInsets.symmetric(),
color:Color(0xFFD8D8D8)),
Spacer(),
Image.asset(
"assets/image/trading_detail.webp",
width:16.h,
fit: BoxFit.fill,
height:16.h,
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/integral_detailed_page',arguments:{"titleType":1});
},
child: Padding(padding:EdgeInsets.only(left: 4.w),
child: Text(
"印章明细",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular),
)),)
],
),
),
Container(
width: double.infinity,
padding:EdgeInsets.symmetric(vertical:12.h,horizontal: 11.w) ,
margin: EdgeInsets.only(top:16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 4),
blurRadius: 8,
spreadRadius: 8,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding:EdgeInsets.only(bottom:14.h),
child: Text(
"规则介绍",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold),
),),
Padding(padding:EdgeInsets.only(bottom:12.h),
child: Text(
"(1) 商品中所要求的印章达到方可兑换",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular),
),),
Text(
"(2) 印章卡仅兑换商城指定商品,不能折算现金或兑换其他非指定商品项目",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 12.sp,
height: 1.5.h,
fontWeight: MyFontWeight.regular),
),
],
),
)
],
),
),
),
),
)
],
),
);
}
}

86
lib/home/welfare_exchange.dart

@ -323,7 +323,7 @@ class _WelfareExchange extends State<WelfareExchange>
userInfo.nickname, userInfo.nickname,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.bold,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),
@ -365,65 +365,71 @@ class _WelfareExchange extends State<WelfareExchange>
height: 50.h, height: 50.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
GestureDetector( Row(
onTap: () { children: [
Navigator.of(context) Text(
.pushNamed('/router/integral_detailed_page'); "总积分",
}, style: TextStyle(
child: Row( fontSize: 14.sp,
children: [ fontWeight: MyFontWeight.medium,
Text( color: Color(0xFF4C4C4C),
S.of(context).jifenmingxi,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
),
), ),
Container( ),
width: 20, Padding(padding:EdgeInsets.only(left:2.w),
height: 20, child: Text(
margin: EdgeInsets.only(left: 4), (userInfo != null) ? "${userInfo.points}" : "",
decoration: BoxDecoration( style: TextStyle(
color: Color(0xFF32A060), fontSize: 16.sp,
borderRadius: BorderRadius.circular(10), color: Color(0xFF32A060),
), fontFamily: 'JDZhengHT',
child: Icon( fontWeight: MyFontWeight.medium,
Icons.keyboard_arrow_right,
size: 20,
color: Colors.white,
),
), ),
], ),),
), SizedBox(
width: 4.w,
),
Image.asset(
"assets/image/icon_gold_coin.webp",
width: 18,
height: 18,
)
],
), ),
SizedBox( SizedBox(
height: 4.h, height: 4.h,
), ),
Expanded( Row(
child: Row(
children: [ children: [
Text( Text(
(userInfo != null) ? "${userInfo.points}" : "", "总印章",
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 14.sp,
color: Color(0xFF32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
), ),
), ),
Padding(padding:EdgeInsets.only(left:2.w),
child: Text(
(userInfo != null) ? "${userInfo?.happyBean ?? 0}" : "",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,
),
),),
SizedBox( SizedBox(
width: 6.w, width:4.w,
), ),
Image.asset( Image.asset(
"assets/image/icon_gold_coin.webp", "assets/image/trading_logo.webp",
width: 18, width: 18,
height: 18, height: 18,
) )
], ],
)) ),
], ],
), ),
) )

213
lib/integral/integral_detailed_page.dart

@ -10,14 +10,18 @@ import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/my_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../view_widget/no_data_view.dart';
class IntegralDetailedPage extends StatefulWidget { class IntegralDetailedPage extends StatefulWidget {
final arguments;
IntegralDetailedPage({this.arguments});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _IntegralDetailedPage(); return _IntegralDetailedPage();
@ -34,19 +38,19 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
super.didChangeDependencies(); super.didChangeDependencies();
_tabs = [ _tabs = [
MyTab( MyTab(
text: S.of(context).huode, text: widget.arguments["titleType"] == 1 ? "印章获得" : S.of(context).huode,
), ),
MyTab( MyTab(
text: S.of(context).xiaofei, text: widget.arguments["titleType"] == 1 ? "印章使用" : S.of(context).xiaofei,
), ),
]; ];
tabController = TabController(length: 2, vsync: this) tabController = TabController(length: 2, vsync: this)
..addListener(() { ..addListener(() {
current = 1; current = 1;
if (tabController.index == 0) { if (tabController.index == 0) {
queryDetail("bill_cate_point_get"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :"");
} else { } else {
queryDetail("bill_cate_point_sub"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :"");
} }
}); });
} }
@ -67,17 +71,17 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
apiService = ApiService(Dio(), apiService = ApiService(Dio(),
context: context, token: value.getString("token")), context: context, token: value.getString("token")),
userInfo = UserInfo.fromJson(jsonDecode(value.getString('user'))), userInfo = UserInfo.fromJson(jsonDecode(value.getString('user'))),
queryDetail("bill_cate_point_get"), queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :""),
}); });
} }
int current = 1; int current = 1;
List<UserBill> userBill = []; List<UserBill> userBill = [];
queryDetail(category) async { queryDetail(category,type) async {
BaseData<PageInfo<UserBill>> baseData = await apiService.queryBillInfo({ BaseData<PageInfo<UserBill>> baseData = await apiService.queryBillInfo({
"current": current, "current": current,
"model": {"category": category, "title": "bill_title_point", "type": ""}, "model": {"category": category, "title": widget.arguments["titleType"] == 1 ? "":"bill_title_point", "type": type},
"order": "descending", "order": "descending",
"size": 10, "size": 10,
"sort": "id" "sort": "id"
@ -107,17 +111,17 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
_onRefresh() { _onRefresh() {
current = 1; current = 1;
if (tabController.index == 0) { if (tabController.index == 0) {
queryDetail("bill_cate_point_get"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :"");
} else { } else {
queryDetail("bill_cate_point_sub"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :"");
} }
} }
_loadMore() { _loadMore() {
if (tabController.index == 0) { if (tabController.index == 0) {
queryDetail("bill_cate_point_get"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :"");
} else { } else {
queryDetail("bill_cate_point_sub"); queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :"");
} }
} }
@ -155,29 +159,39 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
titleSpacing: 2, titleSpacing: 2,
leadingWidth: 56, leadingWidth: 56,
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
background: Container( background: Stack(
alignment: Alignment.center, children: [
margin: EdgeInsets.only(top: 56.h), Image.asset(
child: Column( "assets/image/ming_xi.webp",
mainAxisAlignment: MainAxisAlignment.center, width:double.infinity,
crossAxisAlignment: CrossAxisAlignment.center, fit: BoxFit.fill,
children: [ height:259.h,
Text( ),
userInfo != null ? userInfo.points : "0", Container(
style: TextStyle( alignment: Alignment.center,
color: Colors.white, margin: EdgeInsets.only(top: 56.h),
fontWeight: MyFontWeight.medium, child: Column(
fontSize: 48.sp), mainAxisAlignment: MainAxisAlignment.center,
), crossAxisAlignment: CrossAxisAlignment.center,
Text( children: [
S.of(context).wodejifenzhi, Text(
style: TextStyle( userInfo != null ? (widget.arguments["titleType"] == 1 ? (userInfo?.happyBean ?? 0) : userInfo.points) : "0",
color: Color(0xFFF2F2F2), style: TextStyle(
fontSize: 12.sp, color: Colors.white,
fontWeight: MyFontWeight.regular), fontWeight: MyFontWeight.medium,
fontSize: 48.sp),
),
Text(
widget.arguments["titleType"] == 1 ? "我的集卡券" : S.of(context).wodejifenzhi,
style: TextStyle(
color: Color(0xFFF2F2F2),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular),
),
],
), ),
], )
), ],
), ),
), ),
expandedHeight: 228, expandedHeight: 228,
@ -220,74 +234,125 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
), ),
onRefresh: _onRefresh, onRefresh: _onRefresh,
onLoading: _loadMore, onLoading: _loadMore,
child: ListView.builder( child: (userBill == null || userBill.length == 0)
? NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
text: "当前暂无记录哦~",
fontSize: 16.sp,
margin: EdgeInsets.all(60.h),
):ListView.builder(
itemCount: userBill != null ? userBill.length : 0, itemCount: userBill != null ? userBill.length : 0,
padding: EdgeInsets.only(top: 8, bottom: 8), padding: EdgeInsets.only(top: 8, bottom: 8),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 8, 16, 8), margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
padding: EdgeInsets.fromLTRB(14, 7, 16, 7), padding: EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(2)), borderRadius: BorderRadius.all(Radius.circular(6)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(25), color: Colors.black.withAlpha(25),
offset: Offset(0, 1), offset: Offset(0, 2),
blurRadius: 12, blurRadius: 3,
spreadRadius: 0, spreadRadius: 0,
) )
]), ]),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset(
"assets/image/icon_intergral_sign.webp",
width: 36.w,
height: 34.h,
),
SizedBox(
width: 15,
),
Expanded( Expanded(
child: Container( child: Container(
// height: 34.h, // height: 34.h,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Padding(padding: EdgeInsets.only(bottom: 8.h),
userBill[position].name ?? "", child: Text(
// S.of(context).qiandao, userBill[position].type ?? "",
style: TextStyle( // S.of(context).qiandao,
color: Colors.black, style: TextStyle(
fontSize: 12.sp, color: Colors.black,
fontWeight: FontWeight.w400), fontSize: 14.sp,
fontWeight: FontWeight.bold),
),),
Text(
userBill[position].createTime ?? "",
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular),
)
],
), ),
Text( )),
userBill[position].createTime ?? "",
style: TextStyle(
color: Color(0xFF727272),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular),
)
],
),
)),
Container( Container(
margin: EdgeInsets.only(top: 2.h), margin: EdgeInsets.only(top: 2.h),
child: Text( child: Text(
"${tabController.index == 0 ? "+" : "-"}${double.tryParse(userBill[position].number ?? "0").toInt().toString()}", "${tabController.index == 0 ? "+" : "-"}${double.tryParse(userBill[position].number ?? "0").toInt().toString()}",
style: TextStyle( style: TextStyle(
color: Color(0xFF727272), color: Color(0xFF4D4D4D),
fontSize: 12.sp, fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular), fontWeight: MyFontWeight.regular),
), ),
) )
], ],
), )
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Image.asset(
// "assets/image/icon_intergral_sign.webp",
// width: 36.w,
// height: 34.h,
// ),
// SizedBox(
// width: 15,
// ),
// Expanded(
// child: Container(
// // height: 34.h,
// alignment: Alignment.centerLeft,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// userBill[position].type ?? "",
// // S.of(context).qiandao,
// style: TextStyle(
// color: Colors.black,
// fontSize: 12.sp,
// fontWeight: FontWeight.w400),
// ),
// Text(
// userBill[position].createTime ?? "",
// style: TextStyle(
// color: Color(0xFF727272),
// fontSize: 10.sp,
// fontWeight: MyFontWeight.regular),
// )
// ],
// ),
// )),
// Container(
// margin: EdgeInsets.only(top: 2.h),
// child: Text(
// "${tabController.index == 0 ? "+" : "-"}${double.tryParse(userBill[position].number ?? "0").toInt().toString()}",
// style: TextStyle(
// color: Color(0xFF727272),
// fontSize: 12.sp,
// fontWeight: MyFontWeight.regular),
// ),
// )
// ],
// ),
); );
}), }),
), ),

2
lib/integral/integral_page.dart

@ -124,7 +124,7 @@ class _IntegralPage extends State<IntegralPage> {
margin: EdgeInsets.only(right: 16.w), margin: EdgeInsets.only(right: 16.w),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/integral_detailed_page'); Navigator.of(context).pushNamed('/router/integral_detailed_page',arguments:{"titleType":2});
}, },
child: Text( child: Text(
S.of(context).mingxi, S.of(context).mingxi,

1
lib/l10n/intl_en.arb

@ -742,6 +742,7 @@
"pingtaizhifumima":"平台支付密码", "pingtaizhifumima":"平台支付密码",
"xiugai":"修改", "xiugai":"修改",
"bangdingshouji":"绑定手机", "bangdingshouji":"绑定手机",
"genggaibangdingshoujihao":"更改绑定手机号",

1
lib/l10n/intl_en_US.arb

@ -743,6 +743,7 @@
"pingtaizhifumima":"Platform payment password", "pingtaizhifumima":"Platform payment password",
"xiugai":"modify", "xiugai":"modify",
"bangdingshouji":"bind phone", "bangdingshouji":"bind phone",
"genggaibangdingshoujihao":"modify bind phone",

1
lib/l10n/intl_zh_CN.arb

@ -743,6 +743,7 @@
"pingtaizhifumima":"平台支付密码", "pingtaizhifumima":"平台支付密码",
"xiugai":"修改", "xiugai":"修改",
"bangdingshouji":"绑定手机", "bangdingshouji":"绑定手机",
"genggaibangdingshoujihao":"更改绑定手机号",

1
lib/l10n/intl_zh_Hans_CN.arb

@ -743,6 +743,7 @@
"pingtaizhifumima":"平台支付密码", "pingtaizhifumima":"平台支付密码",
"xiugai":"修改", "xiugai":"修改",
"bangdingshouji":"绑定手机", "bangdingshouji":"绑定手机",
"genggaibangdingshoujihao":"更改绑定手机号",

1
lib/l10n/intl_zh_Hant_CN.arb

@ -734,6 +734,7 @@
"pingtaizhifumima":"平臺支付密碼", "pingtaizhifumima":"平臺支付密碼",
"xiugai":"修改", "xiugai":"修改",
"bangdingshouji":"綁定手機", "bangdingshouji":"綁定手機",
"genggaibangdingshoujihao":"更改綁定手機號",

1
lib/l10n/intl_zh_TW.arb

@ -736,6 +736,7 @@
"pingtaizhifumima":"平臺支付密碼", "pingtaizhifumima":"平臺支付密碼",
"xiugai":"修改", "xiugai":"修改",
"bangdingshouji":"綁定手機", "bangdingshouji":"綁定手機",
"genggaibangdingshoujihao":"更改綁定手機號",

5
lib/main.dart

@ -95,6 +95,7 @@ import 'home/guide_page.dart';
import 'home/help_farmers/help_farmers_page.dart'; import 'home/help_farmers/help_farmers_page.dart';
import 'home/home_view/activity_list.dart'; import 'home/home_view/activity_list.dart';
import 'home/start_page.dart'; import 'home/start_page.dart';
import 'home/trading_card_page.dart';
import 'home/welfare_exchange.dart'; import 'home/welfare_exchange.dart';
import 'home/welfare_page.dart'; import 'home/welfare_page.dart';
import 'login/login_store_select.dart'; import 'login/login_store_select.dart';
@ -310,7 +311,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/settlement': (context, {arguments}) => '/router/settlement': (context, {arguments}) =>
Settlement(arguments: arguments), Settlement(arguments: arguments),
'/router/integral_detailed_page': (context, {arguments}) => '/router/integral_detailed_page': (context, {arguments}) =>
IntegralDetailedPage(), IntegralDetailedPage(arguments:arguments),
'/router/write_off_success_page': (context, {arguments}) => '/router/write_off_success_page': (context, {arguments}) =>
WriteOffSuccessPage(), WriteOffSuccessPage(),
'/router/exchange_history_page': (context, {arguments}) => '/router/exchange_history_page': (context, {arguments}) =>
@ -437,4 +438,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
LoginStoreSelect(arguments:arguments), LoginStoreSelect(arguments:arguments),
'/router/binding_phone_page': (context, {arguments}) => '/router/binding_phone_page': (context, {arguments}) =>
BindingPhonePage(arguments:arguments), BindingPhonePage(arguments:arguments),
'/router/trading_card_page': (context, {arguments}) =>
TradingCardPage(),
}; };

58
lib/mine/mine_page.dart

@ -5,6 +5,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart'; import 'package:huixiang/mine/mine_view/mine_calendar.dart';
@ -427,24 +428,57 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
///广 ///广
Widget spreadImage() { Widget spreadImage() {
return Container( return Container(
margin: EdgeInsets.only(right: 14.w, bottom: 30.h, left: 14.w), margin: EdgeInsets.only(bottom: 30.h,),
child: GestureDetector( width: double.infinity,
onTap: () { height: 85.h,
Navigator.of(context).pushNamed('/router/invite_friends'); child: Swiper(
}, pagination: SwiperPagination(
child: ClipRRect( alignment: Alignment.bottomCenter,
child: Image.asset( margin: EdgeInsets.only(top: 5.h),
"assets/image/welfare_spread.webp", builder: DotSwiperPaginationBuilder(
width: double.infinity, size: 8.w,
fit: BoxFit.fill, activeSize: 8.w,
height: 80.h, space: 5.w,
activeColor: Colors.white,
color: Colors.white.withAlpha(76),
), ),
borderRadius: BorderRadius.circular(6.w),
), ),
autoplay:true,
duration: 1000,
autoplayDelay: 2000,
itemBuilder: (context, position) {
return GestureDetector(
onTap: (){
if(position == 0){
Navigator.of(context).pushNamed('/router/invite_friends');
}else if(position == 1){
Navigator.of(context).pushNamed('/router/trading_card_page');
}
},
child:Container(
margin: EdgeInsets.symmetric(horizontal:14.w),
child: ClipRRect(
child:Image.asset(
spreadItem[position],
width:double.infinity,
fit: BoxFit.fill,
height:double.infinity,
),
borderRadius: BorderRadius.circular(6.w),
),
),
);
},
itemCount:2,
), ),
); );
} }
final List<String> spreadItem = [
"assets/image/welfare_spread.webp",
"assets/image/welfare_yz.webp",
];
/// ///
Widget buildNotice() { Widget buildNotice() {
return Container( return Container(

255
lib/mine/mine_vip/mine_vip_core.dart

@ -25,6 +25,8 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/vip_dialog.dart'; import 'package:huixiang/view_widget/vip_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../../retrofit/data/user_info.dart';
class MineVipCore extends StatefulWidget { class MineVipCore extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -42,27 +44,29 @@ class _MineVipCore extends State<MineVipCore> {
List<VipBenefitList> vipBenefitList = []; List<VipBenefitList> vipBenefitList = [];
VipRuleDetails vipRuleDetails; VipRuleDetails vipRuleDetails;
int checkIndex = 0; int checkIndex = 0;
UserInfo userInfo;
int rankNameIndex;
final SwiperController controller = SwiperController(); final SwiperController controller = SwiperController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
userInfo = widget.arguments["userInfo"];
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (widget.arguments["rankLevel"] == 1 && // if (widget.arguments["rankLevel"] == 1 &&
!(value.getBool("FirstYinKa") ?? false)) { // !(value.getBool("FirstYinKa") ?? false)) {
showAlertDialog("银卡会员"); // showAlertDialog("银卡会员");
value.setBool("FirstYinKa", true); // value.setBool("FirstYinKa", true);
} else if (widget.arguments["rankLevel"] == 2 && // } else if (widget.arguments["rankLevel"] == 2 &&
!(value.getBool("FirstJinKa") ?? false)) { // !(value.getBool("FirstJinKa") ?? false)) {
showAlertDialog("金卡会员"); // showAlertDialog("金卡会员");
value.setBool("FirstJinKa", true); // value.setBool("FirstJinKa", true);
} else if (widget.arguments["rankLevel"] == 3 && // } else if (widget.arguments["rankLevel"] == 3 &&
!(value.getBool("FirstGongC") ?? false)) { // !(value.getBool("FirstGongC") ?? false)) {
showAlertDialog("共创会员"); // showAlertDialog("共创会员");
value.setBool("FirstGongC", true); // value.setBool("FirstGongC", true);
} // }
apiService = apiService =
ApiService(Dio(), context: context, token: value.getString("token")); ApiService(Dio(), context: context, token: value.getString("token"));
queryVipLevel(); queryVipLevel();
@ -82,17 +86,36 @@ class _MineVipCore extends State<MineVipCore> {
}); });
} }
String levelTipsName(int position){
if(userInfo.memberRankVo.rankName == ranks[position].rankName)
return S.of(context).dangqiandengji;
else {
int userLevelIndex = ranks.indexWhere((element) => element.rankName == userInfo.memberRankVo.rankName);
if(userLevelIndex+1 == position)
return "下一等级";
else if(userLevelIndex-1 > position)
return "已达到";
else if(userLevelIndex-1 == position)
return "上一等级";
else
return S.of(context).zanweikaitong;
}
}
/// ///
queryVipLevel() async { queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {}); BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {});
if (rankData != null && rankData.isSuccess) { if (rankData != null && rankData.isSuccess) {
ranks.clear(); ranks.clear();
ranks.addAll(rankData.data); ranks.addAll(rankData.data);
rankNameIndex = ranks.indexWhere((element) => element.rankName == userInfo.memberRankVo.rankName);
if(rankNameIndex != -1)
checkIndex = rankNameIndex;
setState(() { setState(() {
controller.move((widget.arguments["rankLevel"] - 1), animation: false); controller.move((widget.arguments["rankLevel"] - 1), animation: false);
}); });
} else { } else {
SmartDialog.showToast(rankData.msg, alignment: Alignment.center); SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center);
} }
} }
@ -214,7 +237,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
)), )),
), ),
if(widget?.arguments["userInfo"] != null) if(userInfo.masterCardRankName != null)
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w), margin: EdgeInsets.only(right: 16.w),
@ -223,7 +246,7 @@ class _MineVipCore extends State<MineVipCore> {
// Navigator.of(context).pushNamed('/router/integral_detailed_page'); // Navigator.of(context).pushNamed('/router/integral_detailed_page');
}, },
child: Text( child: Text(
"${S.of(context).dangqianzhukadengji} : ${widget?.arguments["userInfo"]??""}", "${S.of(context).dangqianzhukadengji} : ${userInfo.masterCardRankName??""}",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 16.sp, fontSize: 16.sp,
@ -250,6 +273,7 @@ class _MineVipCore extends State<MineVipCore> {
viewportFraction: 0.95, viewportFraction: 0.95,
loop: false, loop: false,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
index: checkIndex,
controller: controller, controller: controller,
onIndexChanged: (index) { onIndexChanged: (index) {
setState(() { setState(() {
@ -257,28 +281,29 @@ class _MineVipCore extends State<MineVipCore> {
}); });
}, },
itemBuilder: (context, position) { itemBuilder: (context, position) {
return MineVipView( return vipCar(position);
vipLevel: !(ranks != null && ranks.isNotEmpty) // MineVipView(
? widget.arguments["rankLevel"] // vipLevel: !(ranks != null && ranks.isNotEmpty)
: position + 1, // ? widget.arguments["rankLevel"]
curLevel: widget.arguments["rankLevel"], // : position + 1,
tag: (widget.arguments["rankLevel"] == (position + 1) || // curLevel: widget.arguments["rankLevel"],
!(ranks != null && ranks.isNotEmpty)) // tag: (widget.arguments["rankLevel"] == (position + 1) ||
? "vip" // !(ranks != null && ranks.isNotEmpty))
: "", // ? "vip"
padding: 6.w, // : "",
// rank: !(ranks != null && ranks.isNotEmpty) // padding: 6.w,
// ? 0 // // rank: !(ranks != null && ranks.isNotEmpty)
// : widget.arguments["expendAmount"] ?? 0, // // ? 0
rankMax: !(ranks != null && ranks.isNotEmpty) // // : widget.arguments["expendAmount"] ?? 0,
? 0 // rankMax: !(ranks != null && ranks.isNotEmpty)
: ranks[position].rankOrigin, // ? 0
createTime: widget.arguments["createTime"], // : ranks[position].rankOrigin,
showRank: false, // createTime: widget.arguments["createTime"],
price: !(ranks != null && ranks.isNotEmpty) // showRank: false,
? "0" // price: !(ranks != null && ranks.isNotEmpty)
: ranks[position].price, // ? "0"
); // : ranks[position].price,
// );
}, },
itemCount: itemCount:
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1, (ranks != null && ranks.isNotEmpty) ? ranks.length : 1,
@ -286,6 +311,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
/// ///
if(vipBenefitList != null)
Container( Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
@ -337,6 +363,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
/// ///
if(vipRuleDetails != null)
Container( Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
@ -402,6 +429,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
/// ///
if(vipRuleDetails != null)
Container( Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
@ -462,6 +490,7 @@ class _MineVipCore extends State<MineVipCore> {
), ),
/// ///
if(vipRuleDetails != null)
Container( Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -560,7 +589,6 @@ class _MineVipCore extends State<MineVipCore> {
]), ]),
), ),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(16),
height: 54.h, height: 54.h,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
@ -580,7 +608,7 @@ class _MineVipCore extends State<MineVipCore> {
); );
} }
Widget vipCar(){ Widget vipCar(int position){
return Container( return Container(
margin:EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h), margin:EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h),
width: MediaQuery.of(context).size.width - 32.w, width: MediaQuery.of(context).size.width - 32.w,
@ -588,7 +616,15 @@ class _MineVipCore extends State<MineVipCore> {
2.11 * 2.11 *
AppUtils.textScale(context)), AppUtils.textScale(context)),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), gradient: LinearGradient(
colors: [
AppUtils.getLighterColor(ranks[position]?.color ?? ""),
Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius:BorderRadius.circular(8),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -601,46 +637,6 @@ class _MineVipCore extends State<MineVipCore> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(8),
// bottomRight: Radius.circular(8),
// ),
// ),
// child: Text(
// topLeft,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.white,
// ),
// ),
// ),
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// margin: EdgeInsets.only(top: 10,right: 10),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.circular(10),
// ),
// child: Text(
// S.of(context).chakanquanyi,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFFF5EEE9),
// ),
// ),
// )
// ],
// ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -654,27 +650,26 @@ class _MineVipCore extends State<MineVipCore> {
Container( Container(
padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red, color: Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(8), topLeft: Radius.circular(8),
bottomRight: Radius.circular(8), bottomRight: Radius.circular(8),
), ),
), ),
child: Text( child: Text(levelTipsName(position),
"111",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.white, color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
), ),
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: 13.w), margin: EdgeInsets.only(left: 13.w),
child: Text( child: Text(
"hhh", "VIP ${ranks[position].rankName ?? ""}",
style: TextStyle( style: TextStyle(
color: Colors.grey, color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize:22.sp, fontSize:22.sp,
), ),
@ -702,61 +697,97 @@ class _MineVipCore extends State<MineVipCore> {
bottom: 12.h, bottom: 12.h,
), ),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment:
(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))?
MainAxisAlignment.spaceAround:
MainAxisAlignment.end,
children: [ children: [
Row( if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))
mainAxisAlignment: MainAxisAlignment.spaceBetween, Align(alignment: Alignment.centerRight,
crossAxisAlignment: CrossAxisAlignment.baseline, child: Text(
textBaseline: TextBaseline.alphabetic, (ranks[position].rankName == "共创会员") ? "${AppUtils.calculateDouble(double.tryParse(ranks[position].price??""))}/永久" : (ranks[position]?.originScore ?? 0).toString(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
fontWeight: ranks[position].rankName == "共创会员" ? MyFontWeight.regular : MyFontWeight.bold,
fontSize: ranks[position].rankName == "共创会员" ? 14.sp : 20.sp,
),
),),
if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员"))
Padding(padding:EdgeInsets.only(bottom: 12.h),
child: Row(
children: [ children: [
Expanded( Expanded(child:
child: Text( Text(
"消费¥", "消费满 ¥${userInfo.memberRankVo.nextOrigin ?? "0"} 升级为 ${userInfo?.memberRankVo?.nextName ?? ""}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Colors.black, color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
fontWeight: MyFontWeight.regular, fontWeight:MyFontWeight.regular,
fontSize: 12.sp, fontSize: 14.sp,
),
), ),
flex: 1, )
), ),
Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
TextSpan( TextSpan(
text:"555", text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}",
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.medium,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
),
),
TextSpan(
text: "/${userInfo.memberRankVo.nextOrigin ?? "0"}",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
), ),
), ),
], ],
), ),
), ),
], ],
), ),),
// if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员"))
// if (isUserVip) // Container(
Expanded(child: Row( // height: 8.h,
// child: ClipRRect(
// borderRadius: BorderRadius.circular(6.5),
// child: LinearProgressIndicator(
// value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ?
// (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0,
// backgroundColor: Colors.white,
// color: AppUtils.getLighterColor(ranks[position]?.color ?? ""),
// ),
// ),
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
S.of(context).kaitongriqi( S.of(context).kaitongriqi(
"2021-01-01" (widget.arguments["createTime"] != null && widget.arguments["createTime"] != "")
? widget.arguments["createTime"].split(" ")[0]
: widget.arguments["createTime"]
), ),
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16))
), ),
), ),
Icon( Icon(
Icons.qr_code, Icons.qr_code,
size: 24, size: 24,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
), ),
], ],
),), ),
], ],
), ),
), ),

26
lib/retrofit/data/rank.dart

@ -22,6 +22,10 @@ class Rank {
bool _status; bool _status;
String _updateTime; String _updateTime;
String _updateUser; String _updateUser;
String _color;
String _textColor;
int _originScore;
int _demotionScore;
String get createTime => _createTime; String get createTime => _createTime;
String get createUser => _createUser; String get createUser => _createUser;
@ -35,14 +39,18 @@ class Rank {
bool get status => _status; bool get status => _status;
String get updateTime => _updateTime; String get updateTime => _updateTime;
String get updateUser => _updateUser; String get updateUser => _updateUser;
String get color => _color;
String get textColor => _textColor;
int get originScore => _originScore;
int get demotionScore => _demotionScore;
Rank({ Rank({
String createTime, String createTime,
String createUser, String createUser,
String id, String id,
String rankContent, String rankContent,
String rankImg, String rankImg,
String rankName, String rankName,
int rankOrigin, int rankOrigin,
int level, int level,
bool status, bool status,
@ -60,6 +68,10 @@ class Rank {
_status = status; _status = status;
_updateTime = updateTime; _updateTime = updateTime;
_updateUser = updateUser; _updateUser = updateUser;
_color = color;
_textColor = textColor;
_originScore = originScore;
_demotionScore = demotionScore;
} }
Rank.fromJson(dynamic json) { Rank.fromJson(dynamic json) {
@ -75,6 +87,10 @@ class Rank {
_status = json["status"]; _status = json["status"];
_updateTime = json["updateTime"]; _updateTime = json["updateTime"];
_updateUser = json["updateUser"]; _updateUser = json["updateUser"];
_color = json["color"];
_textColor = json["textColor"];
_originScore = json["originScore"];
_demotionScore = json["demotionScore"];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -91,6 +107,10 @@ class Rank {
map["status"] = _status; map["status"] = _status;
map["updateTime"] = _updateTime; map["updateTime"] = _updateTime;
map["updateUser"] = _updateUser; map["updateUser"] = _updateUser;
map["color"] = _color;
map["textColor"] = _textColor;
map["originScore"] = _originScore;
map["demotionScore"] = _demotionScore;
return map; return map;
} }

3
lib/retrofit/data/user_info.dart

@ -50,6 +50,7 @@ class UserInfo {
String background; String background;
bool hasPayPassword; bool hasPayPassword;
String happyBean; String happyBean;
bool isVip;
factory UserInfo.fromJson(Map<String, dynamic> json) => factory UserInfo.fromJson(Map<String, dynamic> json) =>
UserInfo() UserInfo()
@ -83,6 +84,7 @@ class UserInfo {
..background = json['background'] as String ..background = json['background'] as String
..hasPayPassword = json['hasPayPassword'] as bool ..hasPayPassword = json['hasPayPassword'] as bool
..happyBean = json['happyBean'] as String ..happyBean = json['happyBean'] as String
..isVip = json['isVip'] as bool
..memberRankVo = json['memberRankVo'] == null ..memberRankVo = json['memberRankVo'] == null
? null ? null
: MemberRank.fromJson(json['memberRankVo'] as Map<String, dynamic>); : MemberRank.fromJson(json['memberRankVo'] as Map<String, dynamic>);
@ -118,6 +120,7 @@ class UserInfo {
'background' : this.background, 'background' : this.background,
'hasPayPassword' : this.hasPayPassword, 'hasPayPassword' : this.hasPayPassword,
'happyBean':this.happyBean, 'happyBean':this.happyBean,
'isVip':this.isVip,
'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(), 'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(),
}; };
} }

2
lib/retrofit/min_api.dart

@ -27,7 +27,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";/// const localBaseUrl = "http://192.168.10.78:8765/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.dart

@ -67,7 +67,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8766/app/";/// const localBaseUrl = "http://192.168.10.78:8766/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";/// // const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)

3
lib/setting/binding_phone_page.dart

@ -10,7 +10,6 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -182,7 +181,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}), }),
title: Text( title: Text(
"更换绑定手机号", S.of(context).genggaibangdingshoujihao,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 17.sp, fontSize: 17.sp,

35
lib/settlement/settlement.dart

@ -1275,15 +1275,16 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(settleOrderInfo.isRaise || payChannel == 5) // (settleOrderInfo.isRaise || payChannel == 5)
? "NONE" // ? "NONE"
: ((useVipPriceSelect == false && // : ((useVipPriceSelect == false &&
couponListBean?.id != "" && // couponListBean?.id != "" &&
((promotion?.id ?? productId) != "")) // ((promotion?.id ?? productId) != ""))
? "MEMBER_RANK" // ? "MEMBER_RANK"
: (isVips == false && vipLevelName == "黄金会员") // : (isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK" // ? "MEMBER_RANK"
: "AUTO"), // : "AUTO"),
preferentialType(),
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect, // (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect, // (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect,
count1, count1,
@ -1292,6 +1293,22 @@ class _Settlement extends State<Settlement> {
} }
} }
String preferentialType(){
if(settleOrderInfo.isRaise || payChannel == 5)
return "NONE";
if((((promotion?.id ?? productId) ?? "") != "")){
return "ACTIVITY";
}else if((couponListBean?.id ?? "") != ""){
return "COUPON";
}else if(useVipPriceSelect == true && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){
return "VIP";
}if(useVipPriceSelect == false && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){
return "MEMBER_RANK";
}else {
return "AUTO";
}
}
vipPriceSelect(bool useVipPriceSelect) { vipPriceSelect(bool useVipPriceSelect) {
this.useVipPriceSelect = useVipPriceSelect; this.useVipPriceSelect = useVipPriceSelect;
if (tableId > 0) { if (tableId > 0) {

4
lib/store/store_order.dart

@ -657,8 +657,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
"shoppingCart": shopCarGoods, "shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople, "numberOfPeople": numberOfPeople,
"distance": widget.arguments["distance"], "distance": widget.arguments["distance"],
"vipLevelName": memberVo.memberRankVo.rankName, "vipLevelName": memberVo?.memberRankVo?.rankName ??"",
"isVips": memberVo.isVip, "isVips": memberVo?.isVip ?? false,
"distance": widget.arguments["distance"], "distance": widget.arguments["distance"],
"subscribeParam": miNiDetail?.subscribeParam, "subscribeParam": miNiDetail?.subscribeParam,
}, },

8
lib/utils/flutter_utils.dart

@ -31,12 +31,12 @@ class AppUtils {
///使16 ///使16
static Color getLighterColor(String hexColor) { static Color getLighterColor(String hexColor) {
// 16Color对象 // 16Color对象
Color color = Color(int.parse(hexColor.replaceAll("#", ""), radix: 16)); Color color = Color(int.parse(hexColor.replaceAll("#", "FF"), radix: 16));
// RGB值 // RGB值
int red = color.red + 39; int red = color.red + 95;
int green = color.green + 52; int green = color.green + 95;
int blue = color.blue + 86; int blue = color.blue + 95;
// RGB值不超过255 // RGB值不超过255
red = red > 255 ? 255 : red; red = red > 255 ? 255 : red;

469
lib/view_widget/mine_vip_entry.dart

@ -39,206 +39,315 @@ class MineVipEntry extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (userInfo != null && if (userInfo != null &&
userInfo.memberRankVo != null && userInfo.memberRankVo != null &&
ranks != null && ranks != null &&
ranks.length > 0) { ranks.length > 0) {
curLevel = (ranks.indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1); curLevel = (ranks
vipLevel = curLevel; .indexWhere((element) => element.id == userInfo.memberRankVo.id) +
} 1);
vipLevel = curLevel;
}
if (curLevel == vipLevel) { if (curLevel == vipLevel) {
topLeft = S.of(context).dangqiandengji; topLeft = S.of(context).dangqiandengji;
} else if (vipLevel < curLevel) { } else if (vipLevel < curLevel) {
topLeft = S.of(context).shangyidengji; topLeft = S.of(context).shangyidengji;
} else { } else {
topLeft = S.of(context).zanweikaitong; topLeft = S.of(context).zanweikaitong;
} }
switch (vipLevel) { switch (vipLevel) {
case 1: case 2:
{ {
levelText = "${S.of(context).yinkahuiyuan}"; levelText = ranks[1].rankName;
logoColor = Color(0xFFA0C4E7); logoColor = Color(int.parse(
levelTextColor = Color(0xFF61ABF3); (ranks[1].textColor ?? "").replaceAll("#", "FF"),
levelTextBackdrop = Color(0xFFC1DBF4); radix: 16));
levelTextColor = Color(int.parse(
(ranks[1].textColor ?? "").replaceAll("#", "FF"),
radix: 16));
levelTextBackdrop = Color(int.parse(
(ranks[1].color ?? "").replaceAll("#", "FF"),
radix: 16));
break; break;
} }
case 2: case 3:
{ {
levelText = "${S.of(context).jinkahuiyuan}"; levelText = ranks[2].rankName;
logoColor = Color(0xFFFBB43A); logoColor = Color(int.parse(
levelTextColor = Color(0xFFFBB43A); (ranks[2].textColor ?? "").replaceAll("#", "FF"),
levelTextBackdrop = Color(0xFFFFECD2); radix: 16));
levelTextColor = Color(int.parse(
(ranks[2].textColor ?? "").replaceAll("#", "FF"),
radix: 16));
levelTextBackdrop = Color(int.parse(
(ranks[2].color ?? "").replaceAll("#", "FF"),
radix: 16));
break; break;
} }
case 3: case 4:
{
levelText = ranks[3].rankName;
logoColor = Color(int.parse(
(ranks[3].textColor ?? "").replaceAll("#", "FF"),
radix: 16));
levelTextColor = Color(int.parse(
(ranks[3].textColor ?? "").replaceAll("#", "FF"),
radix: 16));
levelTextBackdrop = Color(int.parse(
(ranks[3].color ?? "").replaceAll("#", "FF"),
radix: 16));
break;
}
case 5:
{ {
levelText = "${S.of(context).gongchuanghuiyuan}"; levelText = ranks[4].rankName;
logoColor = Color(0xFF352822); logoColor = Color(int.parse(
levelTextColor = Color(0xFF92755D); (ranks[4].textColor ?? "").replaceAll("#", "FF"),
levelTextBackdrop = Color(0xFFFFECD2); radix: 16));
levelTextColor = Color(int.parse(
(ranks[4].textColor ?? "").replaceAll("#", "FF"),
radix: 16));
levelTextBackdrop = Color(int.parse(
(ranks[4].color ?? "").replaceAll("#", "FF"),
radix: 16));
break; break;
} }
} }
Widget widget = Container( Widget widget = userInfo.memberRankVo.rankName != null
height:20.h, ? Container(
width: double.infinity, height: 20.h,
child: Row( width: double.infinity,
children: [ child: Row(
Container( children: [
height: double.infinity, Container(
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:4.h), height: double.infinity,
decoration: BoxDecoration( padding: EdgeInsets.symmetric(horizontal: 3.w, vertical: 4.h),
color: logoColor, decoration: BoxDecoration(
borderRadius: BorderRadius.only( color: logoColor,
topLeft: Radius.circular(4), borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4),), topLeft: Radius.circular(4),
boxShadow: [ bottomLeft: Radius.circular(4),
BoxShadow( ),
color: Color(0x08213303).withAlpha(12), boxShadow: [
offset: Offset(0, 2), BoxShadow(
blurRadius: 4, color: Color(0x08213303).withAlpha(12),
spreadRadius: 0, offset: Offset(0, 2),
), blurRadius: 4,
], spreadRadius: 0,
), ),
child: Image.asset( ],
"assets/image/mine_vip_logo.webp", ),
fit: BoxFit.cover, child: Image.asset(
// width: 13.w, "assets/image/mine_vip_logo.webp",
// height: 11.h, fit: BoxFit.cover,
), // width: 13.w,
), // height: 11.h,
Container( ),
height: double.infinity,
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:3.h),
decoration: BoxDecoration(
color: levelTextBackdrop,
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
), ),
Container(
height: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 3.w, vertical: 3.h),
decoration: BoxDecoration(
color: levelTextBackdrop,
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
],
),
child: Row(
children: [
Text(
levelText,
textAlign: TextAlign.center,
style: TextStyle(
color: levelTextColor,
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
Image.asset(
"assets/image/icon_right.webp",
fit: BoxFit.cover,
width: 8,
height: 8,
color: levelTextColor,
),
],
),
)
], ],
), ),
child:Row( )
: Container(
height: 20.h,
width: double.infinity,
child: Row(
children: [ children: [
Text( Container(
levelText, height: double.infinity,
textAlign: TextAlign.center, padding: EdgeInsets.symmetric(horizontal: 3.w, vertical: 4.h),
style: TextStyle( decoration: BoxDecoration(
color: levelTextColor, color: Color(0xFFCACACA),
fontSize: 10.sp, borderRadius: BorderRadius.only(
fontWeight: MyFontWeight.regular, topLeft: Radius.circular(4),
bottomLeft: Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
],
),
child: Image.asset(
"assets/image/mine_vip_logo.webp",
fit: BoxFit.cover,
// width: 13.w,
// height: 11.h,
), ),
), ),
Image.asset( Container(
"assets/image/icon_right.webp", height: double.infinity,
fit: BoxFit.cover, padding: EdgeInsets.symmetric(horizontal: 3.w, vertical: 3.h),
width: 8, decoration: BoxDecoration(
height: 8, color: Color(0xFFFFF8EC),
color: levelTextColor, borderRadius: BorderRadius.only(
), topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
],
),
child: Row(
children: [
Text(
"开通会员",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFFCACACA),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
Image.asset(
"assets/image/icon_right.webp",
fit: BoxFit.cover,
width: 8,
height: 8,
color: Color(0xFFCACACA),
),
],
),
)
], ],
), ),
) );
], // Container(
), // width: double.infinity,
); // padding: EdgeInsets.only(top: 12.h, bottom: 22.h, left: 12.w, right: 12.w),
// Container( // margin: EdgeInsets.only(top: 23.h,left: 13.5.w,right: 13.5.w,bottom:15.h),
// width: double.infinity, // decoration: BoxDecoration(
// padding: EdgeInsets.only(top: 12.h, bottom: 22.h, left: 12.w, right: 12.w), // color: Color(0xFF3D3D5D),
// margin: EdgeInsets.only(top: 23.h,left: 13.5.w,right: 13.5.w,bottom:15.h), // borderRadius: BorderRadius.circular(6),
// decoration: BoxDecoration( // boxShadow: [
// color: Color(0xFF3D3D5D), // BoxShadow(
// borderRadius: BorderRadius.circular(6), // color: Colors.black.withAlpha(12),
// boxShadow: [ // offset: Offset(0, 3),
// BoxShadow( // blurRadius: 14,
// color: Colors.black.withAlpha(12), // spreadRadius: 0,
// offset: Offset(0, 3), // )
// blurRadius: 14, // ],
// spreadRadius: 0, // ),
// ) // child: Column(
// ], // mainAxisAlignment: MainAxisAlignment.start,
// ), // crossAxisAlignment: CrossAxisAlignment.start,
// child: Column( // children: [
// mainAxisAlignment: MainAxisAlignment.start, // Row(
// crossAxisAlignment: CrossAxisAlignment.start, // children: [
// children: [ // Image.asset(
// Row( // "assets/image/vip_logo.webp",
// children: [ // width: 24,
// Image.asset( // height: 24,
// "assets/image/vip_logo.webp", // ),
// width: 24, // SizedBox(
// height: 24, // width: 5.w,
// ), // ),
// SizedBox( // Expanded(
// width: 5.w, // child: Text(
// ), // levelText,
// Expanded( // style: TextStyle(
// child: Text( // fontSize: 16.sp,
// levelText, // fontWeight: MyFontWeight.semi_bold,
// style: TextStyle( // color: Color(0xFFFFEAD2)),
// fontSize: 16.sp, // )),
// fontWeight: MyFontWeight.semi_bold, // Container(
// color: Color(0xFFFFEAD2)), // padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// )), // decoration: BoxDecoration(
// Container( // color: Color(0xFFFFECD2),
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), // borderRadius: BorderRadius.circular(10),
// decoration: BoxDecoration( // ),
// color: Color(0xFFFFECD2), // child: Text(
// borderRadius: BorderRadius.circular(10), // S.of(context).chakanquanyi,
// ), // style: TextStyle(
// child: Text( // fontSize: 12.sp,
// S.of(context).chakanquanyi, // fontWeight: MyFontWeight.semi_bold,
// style: TextStyle( // color: Color(0xFF92755D),
// fontSize: 12.sp, // ),
// fontWeight: MyFontWeight.semi_bold, // ),
// color: Color(0xFF92755D), // )
// ), // ],
// ), // ),
// ) // SizedBox(
// ], // height: 16.h,
// ), // ),
// SizedBox( // Container(
// height: 16.h, // height: 4.h,
// ), // child: ClipRRect(
// Container( // borderRadius: BorderRadius.circular(6.5),
// height: 4.h, // child: LinearProgressIndicator(
// child: ClipRRect( // value: rankMax > (rank ?? 0)
// borderRadius: BorderRadius.circular(6.5), // ? ((vipLevel < curLevel)
// child: LinearProgressIndicator( // ? rankMax / rankMax
// value: rankMax > (rank ?? 0) // : (rank ?? 0) / rankMax)
// ? ((vipLevel < curLevel) // : 0,
// ? rankMax / rankMax // backgroundColor: Color(0xFF222233),
// : (rank ?? 0) / rankMax) // color: Color(0xFFFFECD2),
// : 0, // ),
// backgroundColor: Color(0xFF222233), // ),
// color: Color(0xFFFFECD2), // ),
// ), // SizedBox(
// ), // height: 8.h,
// ), // ),
// SizedBox( // Text(
// height: 8.h, // rank > rankMax
// ), // ? S.of(context).dangqiandengji
// Text( // : "消费金额¥${rank.toStringAsFixed(2).toString()}${S.of(context).xiayidengji}还需¥${(rankMax - (rank ?? 0)).toStringAsFixed(2)}",
// rank > rankMax // style: TextStyle(
// ? S.of(context).dangqiandengji // color: Color(0xFFFFEAD2),
// : "消费金额¥${rank.toStringAsFixed(2).toString()}${S.of(context).xiayidengji}还需¥${(rankMax - (rank ?? 0)).toStringAsFixed(2)}", // fontWeight: MyFontWeight.light,
// style: TextStyle( // fontFamily: 'JDZhengHT',
// color: Color(0xFFFFEAD2), // fontSize: 14.sp,
// fontWeight: MyFontWeight.light, // ),
// fontFamily: 'JDZhengHT', // )
// fontSize: 14.sp, // ],
// ), // ));
// )
// ],
// ));
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
@ -258,7 +367,7 @@ class MineVipEntry extends StatelessWidget {
Navigator.of(context) Navigator.of(context)
.pushNamed('/router/mine_vip_core', arguments: { .pushNamed('/router/mine_vip_core', arguments: {
"rankLevel": curLevel, "rankLevel": curLevel,
"userInfo": userInfo.masterCardRankName, "userInfo": userInfo,
"createTime": (userInfo != null) ? "${userInfo.createTime}" : "", "createTime": (userInfo != null) ? "${userInfo.createTime}" : "",
"expendAmount": "expendAmount":
double.tryParse(userInfo?.expendAmount ?? "0").toInt(), double.tryParse(userInfo?.expendAmount ?? "0").toInt(),

133
lib/vip/vip_page.dart

@ -11,9 +11,12 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../generated/l10n.dart';
import '../retrofit/data/base_data.dart'; import '../retrofit/data/base_data.dart';
import '../retrofit/data/user_info.dart';
import '../retrofit/retrofit_api.dart'; import '../retrofit/retrofit_api.dart';
import '../utils/flutter_utils.dart'; import '../utils/flutter_utils.dart';
import '../utils/font_weight.dart';
import '../view_widget/my_appbar.dart'; import '../view_widget/my_appbar.dart';
@ -30,6 +33,7 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
final RefreshController _refreshController = RefreshController(); final RefreshController _refreshController = RefreshController();
ApiService apiService; ApiService apiService;
VipCardHome vipHome; VipCardHome vipHome;
UserInfo userInfo;
@override @override
@ -41,9 +45,41 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
queryVipHome(); // queryVipHome();
queryUserBalance();
}
///
queryUserBalance() async {
try{
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
}
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {
_refreshController.refreshFailed();
_refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
if (mounted) setState(() {});
_refreshController.refreshCompleted();
_refreshController.loadComplete();
}else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
_refreshController.refreshFailed();
_refreshController.loadFailed();
}
}finally{
setState((){});
}
} }
///Vip季卡
queryVipHome() async { queryVipHome() async {
try{ try{
if (apiService == null) { if (apiService == null) {
@ -68,6 +104,8 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
_refreshController.loadComplete(); _refreshController.loadComplete();
}else{ }else{
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
_refreshController.loadFailed();
_refreshController.refreshFailed();
} }
}finally{ }finally{
setState((){}); setState((){});
@ -88,7 +126,7 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
header: MyHeader(), header: MyHeader(),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
onRefresh: () { onRefresh: () {
queryVipHome(); queryUserBalance();
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
@ -96,14 +134,16 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
VipTop(vipHome,(){ VipTop(vipHome,
queryVipHome(); // (){queryVipHome();}
}), ),
// if(vipHome !=null)
// VipGoodsDiscount(vipHome),
if(vipHome !=null) ExclusiveCoupon(userInfo),
VipGoodsDiscount(vipHome),
ExclusiveCoupon(), vipRule(),
SizedBox(height: 24.h,) SizedBox(height: 24.h,)
], ],
@ -115,6 +155,83 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
); );
} }
///
Widget vipRule(){
return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom:40.h,top:8.h),
width: double.infinity,
padding: EdgeInsets.only(top:14.h, left:20.h, bottom:8.h, right:20.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, //
height: 13.h,
width: 27.w,
),
SizedBox(
width: 4.w,
),
Text(
"会员卡说明",
style: TextStyle(
color: Colors.black,
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
SizedBox(height: 12.h,),
Padding(padding:EdgeInsets.symmetric(vertical: 12.h),
child:Text(
"1.仅限使用储值金额消费时享受VIP权益(使用优惠券及其他支付方式均不享受VIP权益);",
style: TextStyle(
color: Color(0xFF6A6A6A),
fontSize: 13.sp,
height: 1.5.h,
fontWeight: MyFontWeight.regular,
),
)),
Padding(padding:EdgeInsets.symmetric(vertical:6.h),
child:Text(
"2.储值余额不足时不享受VIP权益;",
style: TextStyle(
color: Color(0xFF6A6A6A),
fontSize: 13.sp,
height: 1.5.h,
fontWeight: MyFontWeight.regular,
),
)),
Padding(padding:EdgeInsets.symmetric(vertical: 12.h),
child:Text(
"3.2023年6月1日前储值余额不享受VIP价格;",
style: TextStyle(
color: Color(0xFF6A6A6A),
fontSize: 13.sp,
height: 1.5.h,
fontWeight: MyFontWeight.regular,
),
)),
],
),);
}
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
} }

600
lib/vip/vip_view/exclusive_coupon.dart

@ -4,9 +4,13 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../generated/l10n.dart'; import '../../generated/l10n.dart';
import '../../retrofit/data/user_info.dart';
import '../../view_widget/my_appbar.dart'; import '../../view_widget/my_appbar.dart';
class ExclusiveCoupon extends StatefulWidget { class ExclusiveCoupon extends StatefulWidget {
final UserInfo userInfo;
ExclusiveCoupon(this.userInfo);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _ExclusiveCoupon(); return _ExclusiveCoupon();
@ -16,291 +20,351 @@ class ExclusiveCoupon extends StatefulWidget {
class _ExclusiveCoupon extends State<ExclusiveCoupon> { class _ExclusiveCoupon extends State<ExclusiveCoupon> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Column(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h), children: [
width: double.infinity, (widget?.userInfo?.isVip ?? false)
padding: ? Row(
EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w), mainAxisAlignment: MainAxisAlignment.center,
decoration: BoxDecoration( crossAxisAlignment: CrossAxisAlignment.center,
borderRadius: BorderRadius.circular(6.w), children: [
color: Colors.white, Image.asset(
boxShadow: [ "assets/image/vip_discount_left.webp",
BoxShadow( width: 21.w,
color: Colors.black.withAlpha(12), height: 39.h,
offset: Offset(0, 3), fit: BoxFit.fill,
blurRadius: 14, ),
spreadRadius: 0, SizedBox(
) width: 11.w,
], ),
), Text(
child: Column( S.of(context).huixiangvipkazhuanxiang,
mainAxisAlignment: MainAxisAlignment.start, style: TextStyle(
crossAxisAlignment: CrossAxisAlignment.start, color: Color(0xff32A060),
children: [ fontSize: 15.sp,
Row( fontWeight: MyFontWeight.semi_bold,
children: [
SizedBox(
width: 7.w,
),
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, //
height: 13.h,
width: 27.w,
),
SizedBox(
width: 4.w,
), ),
Text( ),
S.of(context).zhuanxiangyouhuiquan, SizedBox(
style: TextStyle( width: 11.w,
color: Colors.black, ),
fontSize: 15.sp, Image.asset(
fontWeight: MyFontWeight.semi_bold, "assets/image/vip_discount_right.webp",
), width: 21.w,
height: 39.h,
fit: BoxFit.fill,
),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/vip_lock.webp",
width: 20,
height: 20,
fit: BoxFit.cover,
),
SizedBox(
width: 2.w,
),
Text(
"解锁回乡VIP卡获取更多权益",
style: TextStyle(
color: Colors.black,
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
), ),
GestureDetector( ),
behavior: HitTestBehavior.translucent, ],
onTap: () { ),
showAlertDialog(); Container(
}, margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom:16.h,top: 17.h),
child: Container( width: double.infinity,
padding: EdgeInsets.only( padding:
left: 8.w, right: 30.w, top: 3.h, bottom: 3.h), EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w),
child: Image.asset( decoration: BoxDecoration(
"assets/image/vip_tips.webp", borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
width: 7.w,
),
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height: 14, height: 13.h,
width: 14, width: 27.w,
), ),
), SizedBox(
width: 4.w,
),
Text(
"会员卡专享",
style: TextStyle(
color: Colors.black,
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
// GestureDetector(
// behavior: HitTestBehavior.translucent,
// onTap: () {
// showAlertDialog();
// },
// child: Container(
// padding: EdgeInsets.only(
// left: 8.w, right: 30.w, top: 3.h, bottom: 3.h),
// child: Image.asset(
// "assets/image/vip_tips.webp",
// fit: BoxFit.fill, //
// height: 14,
// width: 14,
// ),
// ),
// ),
],
), ),
], SizedBox(
), height: 10.h,
SizedBox( ),
height: 10.h, Container(
), height: 124.h,
Container( margin: EdgeInsets.only(bottom: 16.h),
height: 124.h, child: Stack(
margin: EdgeInsets.only(bottom: 16.h), children: [
child: Stack( Image.asset(
children: [ "assets/image/vip_shop_bj.webp",
Image.asset( fit: BoxFit.fill, //
"assets/image/vip_shop_bj.webp", height: double.infinity,
fit: BoxFit.fill, // width: double.infinity,
height: double.infinity, ),
width: double.infinity, Container(
), child: Row(
Container( mainAxisAlignment: MainAxisAlignment.start,
child: Row( crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, children: [
crossAxisAlignment: CrossAxisAlignment.center, Expanded(
children: [ child: Padding(
Expanded( padding: EdgeInsets.only(top: 25.h, left: 19.w),
child: Padding( child: Column(
padding: EdgeInsets.only(top: 25.h, left: 19.w), mainAxisAlignment: MainAxisAlignment.start,
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, children: [
crossAxisAlignment: CrossAxisAlignment.start, Text(
children: [ "海峡姐妹饮品券",
Text( style: TextStyle(
"海峡姐妹饮品券", color: Color(0xff32A060),
style: TextStyle( fontSize: 15.sp,
color: Color(0xff32A060), fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp, ),
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(
height: 5.h,
),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "6",
style: TextStyle(
fontWeight: MyFontWeight.extra_bold,
fontSize: 36.sp,
fontFamily: 'JDZhengHT',
color: Color(0xffFF7E12),
), ),
), SizedBox(
TextSpan( height: 5.h,
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
), ),
), Text.rich(
], TextSpan(
), children: [
textDirection: TextDirection.ltr, TextSpan(
), text: "6",
], style: TextStyle(
), fontWeight: MyFontWeight.extra_bold,
)), fontSize: 36.sp,
Image.asset( fontFamily: 'JDZhengHT',
"assets/image/vip_shop_hx.webp", color: Color(0xffFF7E12),
fit: BoxFit.fill, // ),
height: 85, ),
width: 85, TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
],
),
)),
Image.asset(
"assets/image/vip_shop_hx.webp",
fit: BoxFit.fill, //
height: 85,
width: 85,
),
],
), ),
], )
), ],
)
],
),
),
Container(
height: 124.h,
margin: EdgeInsets.only(bottom: 16.h),
child: Stack(
children: [
Image.asset(
"assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, //
height: double.infinity,
width: double.infinity,
), ),
Container( ),
child: Row( Container(
mainAxisAlignment: MainAxisAlignment.start, height: 124.h,
crossAxisAlignment: CrossAxisAlignment.center, margin: EdgeInsets.only(bottom: 16.h),
children: [ child: Stack(
Expanded( children: [
child: Padding( Image.asset(
padding: EdgeInsets.only(top: 25.h, left: 19.w), "assets/image/vip_shop_bj.webp",
child: Column( fit: BoxFit.fill, //
mainAxisAlignment: MainAxisAlignment.start, height: double.infinity,
crossAxisAlignment: CrossAxisAlignment.start, width: double.infinity,
children: [ ),
Text( Container(
"前进麦味烘焙券", child: Row(
style: TextStyle( mainAxisAlignment: MainAxisAlignment.start,
color: Color(0xff32A060), crossAxisAlignment: CrossAxisAlignment.center,
fontSize: 15.sp, children: [
fontWeight: MyFontWeight.semi_bold, Expanded(
), child: Padding(
), padding: EdgeInsets.only(top: 25.h, left: 19.w),
SizedBox( child: Column(
height: 5.h, mainAxisAlignment: MainAxisAlignment.start,
), crossAxisAlignment: CrossAxisAlignment.start,
Text.rich( children: [
TextSpan( Text(
children: [ "前进麦味烘焙券",
TextSpan( style: TextStyle(
text: "7", color: Color(0xff32A060),
style: TextStyle( fontSize: 15.sp,
fontWeight: MyFontWeight.extra_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 36.sp, ),
fontFamily: 'JDZhengHT',
color: Color(0xffFF7E12),
), ),
), SizedBox(
TextSpan( height: 5.h,
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
), ),
), Text.rich(
], TextSpan(
), children: [
textDirection: TextDirection.ltr, TextSpan(
), text: "7",
], style: TextStyle(
), fontWeight: MyFontWeight.extra_bold,
)), fontSize: 36.sp,
Image.asset( fontFamily: 'JDZhengHT',
"assets/image/vip_shop_qj.webp", color: Color(0xffFF7E12),
fit: BoxFit.fill, // ),
height: 85, ),
width: 85, TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
],
),
)),
Image.asset(
"assets/image/vip_shop_qj.webp",
fit: BoxFit.fill, //
height: 85,
width: 85,
),
],
), ),
], )
), ],
)
],
),
),
Container(
height: 124.h,
margin: EdgeInsets.only(bottom: 22.h),
child: Stack(
children: [
Image.asset(
"assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, //
height: double.infinity,
width: double.infinity,
), ),
Container( ),
child: Row( Container(
mainAxisAlignment: MainAxisAlignment.start, height: 124.h,
crossAxisAlignment: CrossAxisAlignment.center, margin: EdgeInsets.only(bottom: 22.h),
children: [ child: Stack(
Expanded( children: [
child: Padding( Image.asset(
padding: EdgeInsets.only(top: 25.h, left: 19.w), "assets/image/vip_shop_bj.webp",
child: Column( fit: BoxFit.fill, //
mainAxisAlignment: MainAxisAlignment.start, height: double.infinity,
crossAxisAlignment: CrossAxisAlignment.start, width: double.infinity,
children: [ ),
Text( Container(
"门店火锅券", child: Row(
style: TextStyle( mainAxisAlignment: MainAxisAlignment.start,
color: Color(0xff32A060), crossAxisAlignment: CrossAxisAlignment.center,
fontSize: 15.sp, children: [
fontWeight: MyFontWeight.semi_bold, Expanded(
), child: Padding(
), padding: EdgeInsets.only(top: 25.h, left: 19.w),
SizedBox( child: Column(
height: 5.h, mainAxisAlignment: MainAxisAlignment.start,
), crossAxisAlignment: CrossAxisAlignment.start,
Text.rich( children: [
TextSpan( Text(
children: [ "门店火锅券",
TextSpan( style: TextStyle(
text: "8", color: Color(0xff32A060),
style: TextStyle( fontSize: 15.sp,
fontWeight: MyFontWeight.extra_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 36.sp, ),
fontFamily: 'JDZhengHT',
color: Color(0xffFF7E12),
), ),
), SizedBox(
TextSpan( height: 5.h,
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
), ),
), Text.rich(
], TextSpan(
), children: [
textDirection: TextDirection.ltr, TextSpan(
), text: "8",
], style: TextStyle(
), fontWeight: MyFontWeight.extra_bold,
)), fontSize: 36.sp,
Image.asset( fontFamily: 'JDZhengHT',
"assets/image/vip_shop_hg.webp", color: Color(0xffFF7E12),
fit: BoxFit.fill, // ),
height: 85, ),
width: 85, TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
],
),
)),
Image.asset(
"assets/image/vip_shop_hg.webp",
fit: BoxFit.fill, //
height: 85,
width: 85,
),
],
), ),
], )
), ],
) ),
], ),
), ],
), ),
], )
), ],
); );
} }

407
lib/vip/vip_view/vip_top.dart

@ -20,9 +20,9 @@ import 'package:tobias/tobias.dart' as tobias;
class VipTop extends StatefulWidget { class VipTop extends StatefulWidget {
final VipCardHome vipCardHome; final VipCardHome vipCardHome;
final Function queryVipHome; // final Function queryVipHome;
VipTop(this.vipCardHome, this.queryVipHome); VipTop(this.vipCardHome);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -39,16 +39,16 @@ class _VipTop extends State<VipTop> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
payListen = weChatResponseEventHandler.listen((event) async { // payListen = weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}"); // print("payCallback: ${event.errCode}");
if (event.errCode == 0) { // if (event.errCode == 0) {
widget.queryVipHome(); // widget.queryVipHome();
SmartDialog.showToast("支付成功", alignment: Alignment.center); // SmartDialog.showToast("支付成功", alignment: Alignment.center);
} else { // } else {
SmartDialog.showToast("支付失败", alignment: Alignment.center); // SmartDialog.showToast("支付失败", alignment: Alignment.center);
return; // return;
} // }
}); // });
} }
rechargeVIP() async { rechargeVIP() async {
@ -96,7 +96,7 @@ class _VipTop extends State<VipTop> {
tobias.aliPay(baseData.data["body"]).then((payRes) { tobias.aliPay(baseData.data["body"]).then((payRes) {
if (payRes['resultStatus'] == 9000 || if (payRes['resultStatus'] == 9000 ||
payRes['resultStatus'] == '9000') { payRes['resultStatus'] == '9000') {
widget.queryVipHome(); // widget.queryVipHome();
SmartDialog.showToast("支付成功", SmartDialog.showToast("支付成功",
alignment: Alignment.center); alignment: Alignment.center);
} else { } else {
@ -129,131 +129,132 @@ class _VipTop extends State<VipTop> {
child: Column( child: Column(
children: [ children: [
vipCard(), vipCard(),
if(widget?.vipCardHome?.cards?.length != 0) // if(widget?.vipCardHome?.cards?.length != 0)
SizedBox( // SizedBox(
height: 15.h, // height: 15.h,
), // ),
(!(widget?.vipCardHome?.member?.isVip ?? false)) // (!(widget?.vipCardHome?.member?.isVip ?? false))
? (widget?.vipCardHome?.cards?.length == 0 ? Container():vipCardList()) // ? (widget?.vipCardHome?.cards?.length == 0 ? Container():vipCardList())
: Padding( // : Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w), // padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row( // child: Row(
children: [ // children: [
Expanded( // Expanded(
child: Container( // child: Container(
alignment: Alignment.center, // alignment: Alignment.center,
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h), // horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w), // borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff), // color: Color(0xffffffff),
boxShadow: [ // boxShadow: [
BoxShadow( // BoxShadow(
color: Colors.black.withAlpha(12), // color: Colors.black.withAlpha(12),
offset: Offset(0, 3), // offset: Offset(0, 3),
blurRadius: 14, // blurRadius: 14,
spreadRadius: 0, // spreadRadius: 0,
) // )
], // ],
), // ),
child: Text.rich( // child: Text.rich(
TextSpan( // TextSpan(
children: [ // children: [
TextSpan( // TextSpan(
text: S // text: S
.of(context) // .of(context)
.yixianghuiyuanquanyi, // .yixianghuiyuanquanyi,
style: TextStyle( // style: TextStyle(
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp, // fontSize: 15.sp,
color: Color(0xff32A060), // color: Color(0xff32A060),
), // ),
), // ),
TextSpan( // TextSpan(
text: widget?.vipCardHome?.member // text: widget?.vipCardHome?.member
?.vipDuration // ?.vipDuration
.toString() ?? // .toString() ??
"0", // "0",
style: TextStyle( // style: TextStyle(
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
fontSize: 18.sp, // fontSize: 18.sp,
color: Color(0xffF96519), // color: Color(0xffF96519),
), // ),
), // ),
TextSpan( // TextSpan(
text: "", // text: "",
style: TextStyle( // style: TextStyle(
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp, // fontSize: 15.sp,
color: Color(0xff32A060), // color: Color(0xff32A060),
), // ),
), // ),
], // ],
), // ),
textDirection: TextDirection.ltr, // textDirection: TextDirection.ltr,
))), // ))),
SizedBox( // SizedBox(
width: 10.w, // width: 10.w,
), // ),
Expanded( // Expanded(
child: GestureDetector( // child: GestureDetector(
onTap: () { // onTap: () {
setState(() { // setState(() {
vipRenewShowBottomSheet(); // vipRenewShowBottomSheet();
}); // });
}, // },
child: Container( // child: Container(
alignment: Alignment.center, // alignment: Alignment.center,
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h), // horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w), // borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff), // color: Color(0xffffffff),
boxShadow: [ // boxShadow: [
BoxShadow( // BoxShadow(
color: Colors.black.withAlpha(12), // color: Colors.black.withAlpha(12),
offset: Offset(0, 3), // offset: Offset(0, 3),
blurRadius: 14, // blurRadius: 14,
spreadRadius: 0, // spreadRadius: 0,
) // )
], // ],
), // ),
child: Row( // child: Row(
mainAxisAlignment: // mainAxisAlignment:
MainAxisAlignment.center, // MainAxisAlignment.center,
crossAxisAlignment: // crossAxisAlignment:
CrossAxisAlignment.center, // CrossAxisAlignment.center,
children: [ // children: [
Text( // Text(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "已开通自动续费" : "续费回乡VIP"}", // "${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "已开通自动续费" : "续费回乡VIP"}",
style: TextStyle( // style: TextStyle(
color: Color((widget // color: Color((widget
?.vipCardHome // ?.vipCardHome
?.member // ?.member
?.isVipSubscribe ?? // ?.isVipSubscribe ??
false) // false)
? 0xff3A3936 // ? 0xff3A3936
: 0xff32A060), // : 0xff32A060),
fontSize: 15.sp, // fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
), // ),
), // ),
SizedBox( // SizedBox(
width: 6.w, // width: 6.w,
), // ),
Image.asset( // Image.asset(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "assets/image/vip_xf.webp" : "assets/image/icon_right.webp"}", // "${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "assets/image/vip_xf.webp" : "assets/image/icon_right.webp"}",
width: 16, // width: 16,
height: 16, // height: 16,
fit: BoxFit.fill, // fit: BoxFit.fill,
color: Color(0xff32A060), // color: Color(0xff32A060),
), // ),
], // ],
))), // ))),
) // )
], // ],
), // ),
), // ),
rechargeGuide(),
], ],
), ),
) )
@ -261,6 +262,136 @@ class _VipTop extends State<VipTop> {
); );
} }
///
Widget rechargeGuide() {
return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom:21.h,top:16.h),
width: double.infinity,
padding: EdgeInsets.only(top:14.h, left:12.h, bottom:8.h, right:14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "充值",
style: TextStyle(
fontWeight: MyFontWeight.extra_bold,
fontSize: 18.sp,
fontFamily: 'JDZhengHT',
color: Color(0xFF262626),
),
),
TextSpan(
text: "¥200以上",
style: TextStyle(
fontSize: 18.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
TextSpan(
text: "即开通回乡VIP卡",
style: TextStyle(
fontSize: 18.sp,
color: Color(0xFF262626),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
Padding(
padding: EdgeInsets.only(top: 6.h, bottom: 10.h),
child: Text(
"享受多门店商品9.2折优惠价!",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
)),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"*活动一切解释权归海峡姐妹品牌公司所有",
style: TextStyle(
color: Color(0xFF151515),
fontSize: 8.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/recharge_page');
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(100)),
border: Border.all(
width: 1.w,
color: Color(0xFF32A060),
style: BorderStyle.solid,
),
color: Color(0xFFFFFFFF),
),
padding: EdgeInsets.symmetric(vertical: 4.h,horizontal: 12.w),
child: Row(children: [
Text(
"去储值",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
Image.asset(
"assets/image/icon_right.webp",
width:13,
fit: BoxFit.fill,
height:13,
color: Color(0xFF32A060),
)
]),
),
)
],
)
],
)),
SizedBox(width: 11.h,),
Padding(padding:EdgeInsets.only(top:4.h),
child: Image.asset(
"assets/image/vip_cz.webp",
fit: BoxFit.fill, //
height:50.w,
width: 54.h,
),)
],
),
);
}
///vip卡 ///vip卡
Widget vipCard() { Widget vipCard() {
return Container( return Container(

2
lib/web/web_view/comment_list.dart

@ -128,7 +128,7 @@ class CommentListState extends State<CommentList> {
); );
}, },
), ),
if (memberList != null && memberList.length > 10) // if (memberList != null && memberList.length > 10)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF2F2F2), color: Color(0xFFF2F2F2),

Loading…
Cancel
Save