Browse Source

更改

null_safety
w-R 4 years ago
parent
commit
8036db1200
  1. 2
      lib/home/huixiang_brand_page.dart
  2. 16
      lib/home/points_mall_page.dart

2
lib/home/huixiang_brand_page.dart

@ -586,7 +586,7 @@ class _BrandPage extends State<BrandPage>
child: BorderText( child: BorderText(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10.h, bottom: 10.h, left: 36.w, right: 36.w), top: 10.h, bottom: 10.h, left: 36.w, right: 36.w),
text: "不同意", text: "拒绝",
fontSize: 12.sp, fontSize: 12.sp,
textColor: Color(0xFF32A060), textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060), borderColor: Color(0xFF32A060),

16
lib/home/points_mall_page.dart

@ -74,7 +74,9 @@ class _PointsMallPage extends State<PointsMallPage>
refreshUserInfo() { refreshUserInfo() {
SharedPreferences.getInstance().then((value) => { SharedPreferences.getInstance().then((value) => {
client = ApiService(Dio(), client = ApiService(Dio(),
context: context, token: value.getString('token'), showLoading: false), context: context,
token: value.getString('token'),
showLoading: false),
SmartDialog.showLoading(msg: S.current.zhengzaijiazai), SmartDialog.showLoading(msg: S.current.zhengzaijiazai),
creditGoods(categoryId), creditGoods(categoryId),
queryUser(), queryUser(),
@ -134,7 +136,8 @@ class _PointsMallPage extends State<PointsMallPage>
PageInfo pageInfo = PageInfo.fromJson(dataCategory.data); PageInfo pageInfo = PageInfo.fromJson(dataCategory.data);
gooodsCategorys.clear(); gooodsCategorys.clear();
gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu)); gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu));
gooodsCategorys.addAll(pageInfo.records.map((e) => GoodsCategory.fromJson(e)).toList()); gooodsCategorys.addAll(
pageInfo.records.map((e) => GoodsCategory.fromJson(e)).toList());
} }
var param = { var param = {
@ -222,8 +225,7 @@ class _PointsMallPage extends State<PointsMallPage>
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: DefaultTabController( child: DefaultTabController(
length: gooodsCategorys == null length: gooodsCategorys == null ? 0 : gooodsCategorys.length,
? 0 : gooodsCategorys.length,
child: TabBar( child: TabBar(
isScrollable: true, isScrollable: true,
// //
@ -499,6 +501,9 @@ class _PointsMallPage extends State<PointsMallPage>
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF353535)), color: Color(0xFF353535)),
), ),
SizedBox(
height: 8.h,
),
Row( Row(
children: [ children: [
Image.asset( Image.asset(
@ -537,6 +542,9 @@ class _PointsMallPage extends State<PointsMallPage>
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF4C4C4C)), color: Color(0xFF4C4C4C)),
), ),
SizedBox(
height: 4.h,
),
Text( Text(
(userinfo != null) ? "${userinfo.points}" : "", (userinfo != null) ? "${userinfo.points}" : "",
style: TextStyle( style: TextStyle(

Loading…
Cancel
Save