Browse Source

回鄉錢包,UI修改

dart3_last
哈哈哈 2 years ago
parent
commit
381b40b572
  1. 2
      lib/generated/intl/messages_en.dart
  2. 2
      lib/generated/intl/messages_zh_CN.dart
  3. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 8
      lib/generated/l10n.dart
  5. 2
      lib/l10n/intl_en.arb
  6. 2
      lib/l10n/intl_zh_CN.arb
  7. 2
      lib/l10n/intl_zh_Hans_CN.arb
  8. 2
      lib/l10n/intl_zh_Hant_CN.arb
  9. 2
      lib/l10n/intl_zh_TW.arb
  10. 113
      lib/login/login_page.dart
  11. 227
      lib/mine/mine_wallet_page.dart

2
lib/generated/intl/messages_en.dart

@ -67,7 +67,7 @@ class MessageLookup extends MessageLookupByLibrary {
static m23(pinglun) => "评论(${pinglun})";
static m24(zongyue, huodongyue, lvbiyue) => "平台总余额:${zongyue}(活动余额${huodongyue} 绿币余额${lvbiyue}";
static m24(zongyue) => "余额:${zongyue}";
static m25(zhe) => "全场${zhe}";

2
lib/generated/intl/messages_zh_CN.dart

@ -67,7 +67,7 @@ class MessageLookup extends MessageLookupByLibrary {
static m23(pinglun) => "评论(${pinglun})";
static m24(zongyue, huodongyue, lvbiyue) => "平台总余额:${zongyue}(活动余额${huodongyue} 绿币余额${lvbiyue}";
static m24(zongyue) => "余额:${zongyue}";
static m25(zhe) => "全场${zhe}";

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -67,7 +67,7 @@ class MessageLookup extends MessageLookupByLibrary {
static m23(pinglun) => "评论(${pinglun})";
static m24(zongyue, huodongyue, lvbiyue) => "平台总余额:${zongyue}(活动余额${huodongyue} 绿币余额${lvbiyue}";
static m24(zongyue) => "余额:${zongyue}";
static m25(zhe) => "全场${zhe}";

8
lib/generated/l10n.dart

@ -6175,13 +6175,13 @@ class S {
);
}
/// `{zongyue}{huodongyue} 绿{lvbiyue} `
String pingtaizongyue(Object zongyue, Object huodongyue, Object lvbiyue) {
/// `{zongyue}`
String pingtaizongyue(Object zongyue) {
return Intl.message(
'平台总余额:$zongyue(活动余额$huodongyue 绿币余额$lvbiyue',
'余额:$zongyue',
name: 'pingtaizongyue',
desc: '',
args: [zongyue, huodongyue, lvbiyue],
args: [zongyue],
);
}

2
lib/l10n/intl_en.arb

@ -644,7 +644,7 @@
"huodongyue": "活动余额",
"xiaofeijilu": "消费记录",
"muqianwujilu": "目前暂未记录哦",
"pingtaizongyue": "平台总余额:{zongyue}(活动余额{huodongyue} 绿币余额{lvbiyue}) ",
"pingtaizongyue": "余额:{zongyue}",

2
lib/l10n/intl_zh_CN.arb

@ -638,7 +638,7 @@
"huodongyue": "活动余额",
"xiaofeijilu": "消费记录",
"muqianwujilu": "目前暂未记录哦",
"pingtaizongyue": "平台总余额:{zongyue}(活动余额{huodongyue} 绿币余额{lvbiyue}) ",
"pingtaizongyue": "余额:{zongyue}",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -638,7 +638,7 @@
"huodongyue": "活动余额",
"xiaofeijilu": "消费记录",
"muqianwujilu": "目前暂未记录哦",
"pingtaizongyue": "平台总余额:{zongyue}(活动余额{huodongyue} 绿币余额{lvbiyue}) ",
"pingtaizongyue": "余额:{zongyue}",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -632,7 +632,7 @@
"yue__": "餘額 {yue}",
"lvbiyue": "綠幣餘額 {yue}",
"huodongyue": "活動餘額 {yue}",
"pingtaizongyue": "平台總餘額:{zongyue}(活動餘額{huodongyue} 綠幣餘額{lvbiyue}) ",
"pingtaizongyue": "餘額:{zongyue}",

2
lib/l10n/intl_zh_TW.arb

@ -634,7 +634,7 @@
"yue__": "餘額 {yue}",
"lvbiyue": "綠幣餘額 {yue}",
"huodongyue": "活動餘額 {yue}",
"pingtaizongyue": "平台總餘額:{zongyue}(活動餘額{huodongyue} 綠幣餘額{lvbiyue}) ",
"pingtaizongyue": "餘額:{zongyue}",

113
lib/login/login_page.dart

@ -1078,69 +1078,70 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
Stack(
alignment: Alignment.bottomCenter,
children: [
Container(
alignment: Alignment.center,
width: double.infinity,
height: MediaQuery.of(context).size.width >= 650 ? 410.h :305.h,
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
child: Text(
S.of(context).xieyitanchuang,
style: TextStyle(
color: Color(0xff4D4D4D),
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
),
Text.rich(
TextSpan(children: [
TextSpan(
text: S.of(context).yinsizhengce1,
IntrinsicHeight(
child: Container(
alignment: Alignment.center,
width: double.infinity,
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
child: Text(
S.of(context).xieyitanchuang,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
height: 1.2.h,
color: Color(0xff727272),
color: Color(0xff4D4D4D),
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
TextSpan(
text: S.of(context).yinsixieyi,
style: TextStyle(
),
Text.rich(
TextSpan(children: [
TextSpan(
text: S.of(context).yinsizhengce1,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xff32A060)),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context)
.popAndPushNamed('/router/treaty_page');
},
height: 1.2.h,
color: Color(0xff727272),
),
),
TextSpan(
text: S.of(context).yinsixieyi,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xff32A060)),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context)
.popAndPushNamed('/router/treaty_page');
},
),
]),
),
SizedBox(
height: 5.h,
),
Text(
S.of(context).yinsizhengce2,
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.2.h,
fontWeight: MyFontWeight.medium,
),
]),
),
SizedBox(
height: 5.h,
),
Text(
S.of(context).yinsizhengce2,
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.2.h,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
height: 16.h,
),
],
SizedBox(
height: 16.h,
),
],
),
),
),
Row(

227
lib/mine/mine_wallet_page.dart

@ -27,9 +27,9 @@ class MineWalletPage extends StatefulWidget {
}
class _MineWalletPage extends State<MineWalletPage> {
dynamic mBalance = 0;
dynamic pBalance = 0; //
dynamic mBalance = 0; //
dynamic mgreenMoney = 0;
dynamic tBalance = 0;
dynamic activityMoney = 0;
@override
@ -48,10 +48,10 @@ class _MineWalletPage extends State<MineWalletPage> {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
userInfo =
UserInfo.fromJson(jsonDecode(sharedPreferences.getString('user')));
mBalance = double.tryParse(userInfo.money);
mgreenMoney = double.tryParse(userInfo.greenMoney);
mBalance = double.tryParse(userInfo.money);
pBalance = mgreenMoney + mBalance;
activityMoney = double.tryParse(userInfo.activityMoney);
tBalance = mBalance - (mgreenMoney ?? 0) - (activityMoney ?? 0);
if (mounted) setState(() {});
String token = sharedPreferences.getString("token");
apiService = ApiService(Dio(), context: context, token: token);
@ -70,8 +70,8 @@ class _MineWalletPage extends State<MineWalletPage> {
userInfo = baseData.data;
mgreenMoney = double.tryParse(userInfo.greenMoney);
activityMoney = double.tryParse(userInfo.activityMoney);
mBalance = double.tryParse(userInfo.money);
tBalance = mBalance - (mgreenMoney ?? 0) - (activityMoney ?? 0);
mBalance = double.tryParse(userInfo.money) + mgreenMoney;
pBalance = mBalance + mgreenMoney;
if (mounted) setState(() {});
}
}
@ -313,10 +313,7 @@ class _MineWalletPage extends State<MineWalletPage> {
Expanded(
flex: 7,
child: Text(
S.of(context).pingtaizongyue(
userBill.balance,
userBill.surplusActivityMoney,
userBill.surplusGreenMoney),
S.of(context).pingtaizongyue(userBill.balance),
style: TextStyle(
color: Color(0xFF727272),
fontSize: 10.sp,
@ -468,7 +465,7 @@ class _MineWalletPage extends State<MineWalletPage> {
width: 24,
),
Text(
"$mBalance",
"$pBalance",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 50,
@ -545,7 +542,7 @@ class _MineWalletPage extends State<MineWalletPage> {
height: 4,
),
Text(
"$tBalance",
"$mBalance",
style: TextStyle(
fontSize: 18,
fontWeight: MyFontWeight.semi_bold,
@ -627,109 +624,109 @@ class _MineWalletPage extends State<MineWalletPage> {
);
}
Widget balance1() {
return Container(
width: double.infinity,
margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 8.h),
padding: EdgeInsets.fromLTRB(24.w, 24.h, 24.w, 24.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Stack(
alignment: Alignment.center,
children: [
Align(
alignment: Alignment.center,
child: Text(
S.of(context).zongzichan,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535),
fontSize: 16.sp,
),
),
),
// GestureDetector(
// onTap: () {
// queryUserBalance();
// },
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Icon(
// Icons.refresh,
// size: 20,
// color: Color(0xFF8A8A8A),
// ),
// Text(
// S.of(context).shuaxin,
// style: TextStyle(
// color: Color(0xFF353535),
// fontSize: 12.sp,
// ),
// ),
// ],
// ),
// ),
],
),
SizedBox(
height: 16.h,
),
Text(
"$mBalance",
style: TextStyle(
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
fontSize: 50.sp,
),
),
// SizedBox(
// height: 4.h,
// ),
// Text(
// S.of(context).keyongyue,
// style: TextStyle(
// color: Color(0xFF20662A),
// fontSize: 16.sp,
// fontWeight: MyFontWeight.regular
// ),
// ),
SizedBox(
height: 24.h,
),
InkWell(
onTap: () {
toRecharge();
},
child: RoundButton(
width: 104.w,
text: S.of(context).lijichongzhi,
textColor: Colors.white,
fontWeight: MyFontWeight.semi_bold,
radius: 15,
backgroup: Color(0xFF32A060),
fontSize: 14.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),
);
}
// Widget balance1() {
// return Container(
// width: double.infinity,
// margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 8.h),
// padding: EdgeInsets.fromLTRB(24.w, 24.h, 24.w, 24.h),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(8),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(25),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// ),
// ],
// ),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Stack(
// alignment: Alignment.center,
// children: [
// Align(
// alignment: Alignment.center,
// child: Text(
// S.of(context).zongzichan,
// style: TextStyle(
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFF353535),
// fontSize: 16.sp,
// ),
// ),
// ),
// // GestureDetector(
// // onTap: () {
// // queryUserBalance();
// // },
// // child: Row(
// // mainAxisAlignment: MainAxisAlignment.end,
// // children: [
// // Icon(
// // Icons.refresh,
// // size: 20,
// // color: Color(0xFF8A8A8A),
// // ),
// // Text(
// // S.of(context).shuaxin,
// // style: TextStyle(
// // color: Color(0xFF353535),
// // fontSize: 12.sp,
// // ),
// // ),
// // ],
// // ),
// // ),
// ],
// ),
// SizedBox(
// height: 16.h,
// ),
// Text(
// "$mBalance",
// style: TextStyle(
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF353535),
// fontSize: 50.sp,
// ),
// ),
// // SizedBox(
// // height: 4.h,
// // ),
// // Text(
// // S.of(context).keyongyue,
// // style: TextStyle(
// // color: Color(0xFF20662A),
// // fontSize: 16.sp,
// // fontWeight: MyFontWeight.regular
// // ),
// // ),
// SizedBox(
// height: 24.h,
// ),
// InkWell(
// onTap: () {
// toRecharge();
// },
// child: RoundButton(
// width: 104.w,
// text: S.of(context).lijichongzhi,
// textColor: Colors.white,
// fontWeight: MyFontWeight.semi_bold,
// radius: 15,
// backgroup: Color(0xFF32A060),
// fontSize: 14.sp,
// padding: EdgeInsets.symmetric(vertical: 5.h),
// ),
// ),
// ],
// ),
// );
// }
toRecharge() async {
await Navigator.of(context).pushNamed('/router/recharge_page');

Loading…
Cancel
Save