Browse Source

Merge branch 'master' into dev

# Conflicts:
#	lib/address/edit_address_page.dart
#	lib/generated/intl/messages_en.dart
#	lib/generated/l10n.dart
#	lib/home/points_mall_page.dart
#	lib/l10n/intl_en.arb
#	lib/l10n/intl_zh_CN.arb
#	lib/l10n/intl_zh_Hans_CN.arb
#	lib/l10n/intl_zh_Hant_CN.arb
#	lib/l10n/intl_zh_TW.arb
#	lib/mine/mine_page.dart
null_safety
w-R 4 years ago
parent
commit
5095392f9d
  1. 10
      lib/address/edit_address_page.dart
  2. 54
      lib/home/points_mall_page.dart

10
lib/address/edit_address_page.dart

@ -170,19 +170,19 @@ class _EditAddressPage extends State<EditAddressPage> {
String city = addressController.text;
String address = houseNumberController.text;
if (name == null || name == "") {
SmartDialog.showToast(S.of(context).shouhuorenxingming);
SmartDialog.showToast(S.of(context).shouhuorenxingming, alignment: Alignment.center);
return;
}
if (mobile == null || mobile == "") {
SmartDialog.showToast(S.of(context).shouhuorenshoujihao);
SmartDialog.showToast(S.of(context).shouhuorenshoujihao, alignment: Alignment.center);
return;
}
if (city == null || city == "") {
SmartDialog.showToast(S.of(context).shurushouhuorendizhi);
SmartDialog.showToast(S.of(context).shurushouhuorendizhi, alignment: Alignment.center);
return;
}
if (address == null || address == "") {
SmartDialog.showToast(S.of(context).shouhuorenxiangxidizhi);
SmartDialog.showToast(S.of(context).shouhuorenxiangxidizhi, alignment: Alignment.center);
return;
}
BaseData baseData;
@ -220,7 +220,7 @@ class _EditAddressPage extends State<EditAddressPage> {
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast(preAddress == null
? S.of(context).baocunchenggong
: S.of(context).xiugaichenggong);
: S.of(context).xiugaichenggong, alignment: Alignment.center);
Navigator.of(context).pop();
}
}

54
lib/home/points_mall_page.dart

@ -400,15 +400,8 @@ class _PointsMallPage extends State<PointsMallPage>
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
//
// Text(
// S.of(context).yiduihuanjian("${goods.sales}"),
// style: TextStyle(
// color: Color(0xFFA29E9E),
// fontSize: 10.sp,
// ),
// ),
Text(
Expanded(
child: Text(
S.of(context).yuan_(goods.worth),
style: TextStyle(
color: Color(0xFF585858),
@ -417,6 +410,8 @@ class _PointsMallPage extends State<PointsMallPage>
fontSize: 12.sp,
),
),
flex: 1,
),
Text(
S.of(context).jifen_(goods.price),
style: TextStyle(
@ -457,17 +452,10 @@ class _PointsMallPage extends State<PointsMallPage>
return InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null) {
SmartDialog.show(
widget: LoginTips(
click: () {
value.clear();
Navigator.of(context).pushNamed('/router/login_page',
arguments: {"login": "login"});
},
),
clickBgDismissTemp: false,
);
if (value.getString("token") == null ||
value.getString("token") == "") {
Navigator.of(context)
.pushNamed('/router/login_page', arguments: {"login": "login"});
}
});
},
@ -477,16 +465,16 @@ class _PointsMallPage extends State<PointsMallPage>
children: [
MImage(
userinfo != null ? userinfo.headimg : "",
width: 50,
width: 50.w,
height: 50.h,
radius: BorderRadius.all(Radius.circular(100)),
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_user.png",
fadeSrc: "assets/image/default_user.png",
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 15),
margin: EdgeInsets.only(left: 15.w),
height: 50.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -551,7 +539,7 @@ class _PointsMallPage extends State<PointsMallPage>
color: Colors.black,
)
: Container(
margin: EdgeInsets.only(left: 15),
margin: EdgeInsets.only(left: 15.w),
height: 50.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -560,7 +548,7 @@ class _PointsMallPage extends State<PointsMallPage>
Text(
S.of(context).yiyoujifen,
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
fontWeight: FontWeight.bold,
color: Color(0xFF4C4C4C),
),
@ -571,7 +559,7 @@ class _PointsMallPage extends State<PointsMallPage>
Text(
(userinfo != null) ? "${userinfo.points}" : "",
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: Color(0xFFF8BA61),
fontWeight: FontWeight.bold,
),
@ -587,7 +575,7 @@ class _PointsMallPage extends State<PointsMallPage>
banner() {
return Container(
margin: EdgeInsets.only(top: 16),
margin: EdgeInsets.only(top: 16.h),
child: AspectRatio(
aspectRatio: 2.0,
child: Swiper(
@ -598,7 +586,9 @@ class _PointsMallPage extends State<PointsMallPage>
activeSize: 8,
space: 5,
activeColor: Colors.black,
color: Colors.black.withAlpha(76))),
color: Colors.black.withAlpha(76),
),
),
viewportFraction: 0.7,
scale: 0.7,
loop: false,
@ -610,7 +600,8 @@ class _PointsMallPage extends State<PointsMallPage>
child: Container(
margin: EdgeInsets.only(bottom: 40.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8))),
borderRadius: BorderRadius.circular(8),
),
child: MImage(
bannerData != null && position < bannerData.length
? bannerData[position].imgUrl
@ -623,7 +614,8 @@ class _PointsMallPage extends State<PointsMallPage>
),
);
},
itemCount: bannerData != null ? bannerData.length : 1),
itemCount: bannerData != null ? bannerData.length : 1,
),
),
);
}

Loading…
Cancel
Save