|
|
|
@ -43,7 +43,9 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
token: value.getString("token"), |
|
|
|
|
showLoading: false); |
|
|
|
|
userinfo = UserInfo.fromJson(jsonDecode(value.getString("user"))); |
|
|
|
|
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai, animationDurationTemp: Duration(seconds: 1)); |
|
|
|
|
SmartDialog.showLoading( |
|
|
|
|
msg: S.of(context).zhengzaijiazai, |
|
|
|
|
animationDurationTemp: Duration(seconds: 1)); |
|
|
|
|
querySignInfo(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -81,6 +83,7 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
title: S.of(context).jifenxiangqing, |
|
|
|
|
titleColor: Colors.white, |
|
|
|
|
titleSize: 16.sp, |
|
|
|
|
brightness: Brightness.dark, |
|
|
|
|
action: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(right: 16.w), |
|
|
|
@ -292,7 +295,7 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
padding: EdgeInsets.fromLTRB(12.w, 4.h, 12.w, 4.h), |
|
|
|
|
) |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
@ -304,7 +307,7 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
padding: EdgeInsets.all(6), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFFF0F0F2), |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4)), |
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
), |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
@ -318,9 +321,10 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
Text( |
|
|
|
|
"0${position + 1}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w500,), |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 10.h, |
|
|
|
@ -438,9 +442,10 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
Text( |
|
|
|
|
S.of(context).qiandaolingjifen, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF353535),), |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 10.h, |
|
|
|
@ -457,19 +462,20 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
height: 32.h, |
|
|
|
|
), |
|
|
|
|
StaggeredGridView.countBuilder( |
|
|
|
|
crossAxisCount: 4, |
|
|
|
|
shrinkWrap: true, |
|
|
|
|
itemCount: 7, |
|
|
|
|
mainAxisSpacing: 8.h, |
|
|
|
|
crossAxisSpacing: 18.w, |
|
|
|
|
padding: EdgeInsets.only(bottom: 32.h), |
|
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return signInItem(position); |
|
|
|
|
}, |
|
|
|
|
staggeredTileBuilder: (position) { |
|
|
|
|
return StaggeredTile.count(position == 6 ? 2 : 1, 1.28); |
|
|
|
|
}), |
|
|
|
|
crossAxisCount: 4, |
|
|
|
|
shrinkWrap: true, |
|
|
|
|
itemCount: 7, |
|
|
|
|
mainAxisSpacing: 8.h, |
|
|
|
|
crossAxisSpacing: 18.w, |
|
|
|
|
padding: EdgeInsets.only(bottom: 32.h), |
|
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return signInItem(position); |
|
|
|
|
}, |
|
|
|
|
staggeredTileBuilder: (position) { |
|
|
|
|
return StaggeredTile.count(position == 6 ? 2 : 1, 1.28); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: signIn, |
|
|
|
|
child: Container( |
|
|
|
@ -490,7 +496,7 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
radius: 4, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
@ -522,32 +528,33 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
flex: 1, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
signInfo != null ? "${signInfo.point}" : "0", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
fontSize: 21.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
signInfo != null ? "${signInfo.point}" : "0", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
fontSize: 21.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).wodejifenzhi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).wodejifenzhi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
)), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: 2.w, |
|
|
|
|
height: 32.h, |
|
|
|
@ -558,17 +565,17 @@ class _IntegralPage extends State<IntegralPage> {
|
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
|
if (value.getString("token") != null && value.getString("token") != "") { |
|
|
|
|
if (value.getString("token") != null && |
|
|
|
|
value.getString("token") != "") { |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.pushNamed('/router/mine_vip_level_page', arguments: { |
|
|
|
|
"rankLevel": rankLevel, |
|
|
|
|
"createTime": |
|
|
|
|
(userinfo != null) ? "${userinfo.createTime}" : "", |
|
|
|
|
"points": |
|
|
|
|
(userinfo != null) ? int.tryParse(userinfo.points) : 0, |
|
|
|
|
(userinfo != null) ? "${userinfo.createTime}" : "", |
|
|
|
|
"points": (userinfo != null) |
|
|
|
|
? int.tryParse(userinfo.points) |
|
|
|
|
: 0, |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|