修复瑞币显示不正确的问题,更换会员权益页图片和头部背景

master
zhangmeng 4 years ago
parent 6178a69ae2
commit 5759ac321f

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

@ -35,6 +35,7 @@ import 'package:recook/widgets/custom_image_button.dart';
import 'package:recook/widgets/input_view.dart';
import 'package:recook/widgets/progress/re_toast.dart';
import 'package:recook/widgets/toast.dart';
import 'package:velocity_x/velocity_x.dart';
class GoodsOrderPage extends StatefulWidget {
final Map arguments;
@ -563,8 +564,8 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
}
_coinTile() {
String text = _orderModel.data.coinTotalAmount > 0
? "可用:¥${_orderModel.data.coinTotalAmount.toStringAsFixed(2)}"
String text = _orderModel.data.coinStatus.coin > 0
? "可用:¥${_orderModel.data.coinStatus.coin.toStringAsFixed(2)}"
: "可用¥0.0";
// _orderModel.data.coupon = null;
return Container(
@ -583,10 +584,14 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
),
Builder(
builder: (context) {
double coin = _orderModel.data.goodsTotalAmount >
_orderModel.data.coinStatus.coin.toDouble()
? _orderModel.data.coinStatus.coin.toDouble()
: _orderModel.data.goodsTotalAmount;
return _titleRow(
"瑞币",
text,
"本单抵扣: ¥${_orderModel.data.coinTotalAmount.toStringAsFixed(2)}",
"本单抵扣: ¥${coin.toStringAsFixed(2)}",
rightTitleColor: Colors.black,
switchValue: _orderModel.data.coinStatus.isUseCoin, // TODO:
switchEnable: switchEnabled,
@ -711,6 +716,7 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
margin: EdgeInsets.only(top: 10),
// height: 55,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(
@ -719,15 +725,16 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
child: Text(
title,
style: titleColor != null
? AppTextStyle.generate(ScreenAdapterUtils.setSp(13.5),
? AppTextStyle.generate(27.sp,
color: titleColor, fontWeight: FontWeight.w400)
: AppTextStyle.generate(ScreenAdapterUtils.setSp(13.5),
: AppTextStyle.generate(27.sp,
fontWeight: FontWeight.w400),
)),
Expanded(
child: Text(
subTitle,
maxLines: 1,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: subTitleColor != null
? AppTextStyle.generate(12 * 2.sp,
color: subTitleColor, fontWeight: FontWeight.w300)
@ -741,11 +748,11 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
rightTitle,
style: rightTitleColor != null
? TextStyle(
fontSize: ScreenAdapterUtils.setSp(13.5),
fontSize: 27.sp,
fontWeight: FontWeight.w400,
color: rightTitleColor)
: TextStyle(
fontSize: ScreenAdapterUtils.setSp(13.5),
fontSize: 27.sp,
fontWeight: FontWeight.w400,
color: Color.fromARGB(255, 249, 62, 13)),
)),

@ -1,3 +1,5 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
@ -67,8 +69,11 @@ class _ShopPageUserRightsPageState
ScreenUtil().statusBarHeight -
kToolbarHeight,
child: Container(
color: AppColor.blackColor,
),
color: Colors.black,
child: Image.asset(
_headBackgroundImage(),
fit: BoxFit.fill,
)),
// child: Image.asset("assets/shop_page_user_rights_bg.png", width: width, height: bgHeight, fit: BoxFit.fill, ),
),
Column(
@ -215,10 +220,38 @@ class _ShopPageUserRightsPageState
);
}
String _headBackgroundImage() {
if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Diamond_1 ||
UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Diamond_2 ||
UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Diamond_3) {
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_DIAMOND_HEAD_JPG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Gold) {
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_GOLD_HEAD_JPG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Silver) {
return R.ASSETS_HEADER_SILVER_HEADER_PNG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Vip &&
(UserLevelTool.currentUserLevelEnum() == UserLevel.Second ||
UserLevelTool.currentUserLevelEnum() == UserLevel.First)) {
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_AND_VIP_HEAD_JPG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Vip &&
(UserLevelTool.currentUserLevelEnum() == UserLevel.Others)) {
// 绿vip
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_AND_VIP_HEAD_JPG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Master &&
(UserLevelTool.currentUserLevelEnum() == UserLevel.Others)) {
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_AND_VIP_HEAD_JPG;
} else if (UserLevelTool.currentRoleLevelEnum() == UserRoleLevel.Master &&
((UserLevelTool.currentUserLevelEnum() == UserLevel.Second ||
UserLevelTool.currentUserLevelEnum() == UserLevel.First))) {
return R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_AND_VIP_HEAD_JPG;
}
return '';
}
_masterLevel23() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER23_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_JPG,
fit: BoxFit.fill,
),
);
@ -227,7 +260,7 @@ class _ShopPageUserRightsPageState
_masterLevel4() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER4_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_MASTER_JPG,
fit: BoxFit.fill,
),
);
@ -236,7 +269,7 @@ class _ShopPageUserRightsPageState
_vip23() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_VIP_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_VIP_JPG,
fit: BoxFit.fill,
),
);
@ -245,7 +278,7 @@ class _ShopPageUserRightsPageState
_vip4() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_VIP4_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_VIP_JPG,
fit: BoxFit.fill,
),
);
@ -254,7 +287,7 @@ class _ShopPageUserRightsPageState
_silver() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_SILVER_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_SILVER_JPG,
fit: BoxFit.fill,
),
);
@ -263,7 +296,7 @@ class _ShopPageUserRightsPageState
_gold() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_GOLD_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_GOLD_JPG,
fit: BoxFit.fill,
),
);
@ -272,7 +305,7 @@ class _ShopPageUserRightsPageState
_diamond() {
return Container(
child: Image.asset(
R.ASSETS_SHOP_PAGE_USER_RIGHTS_DIAMOND_PNG_WEBP,
R.ASSETS_SHOP_PAGE_USER_RIGHTS_DIAMOND_JPG,
fit: BoxFit.fill,
),
);

Loading…
Cancel
Save