|
|
|
@ -34,7 +34,7 @@ class PointsMallPage extends StatefulWidget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _PointsMallPage extends State<PointsMallPage> |
|
|
|
|
with AutomaticKeepAliveClientMixin { |
|
|
|
|
with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin { |
|
|
|
|
var _itemText = S.current.morenpaixu; |
|
|
|
|
|
|
|
|
|
ApiService client; |
|
|
|
@ -42,8 +42,8 @@ class _PointsMallPage extends State<PointsMallPage>
|
|
|
|
|
RefreshController(initialRefresh: false); |
|
|
|
|
List<String> sortString = [ |
|
|
|
|
S.current.morenpaixu, |
|
|
|
|
S.current.duihuanlianggaodaodi, |
|
|
|
|
S.current.duihuanliangdidaogao, |
|
|
|
|
// S.current.duihuanlianggaodaodi, |
|
|
|
|
// S.current.duihuanliangdidaogao, |
|
|
|
|
S.current.jifengaodaodi, |
|
|
|
|
S.current.jifendidaogao, |
|
|
|
|
]; |
|
|
|
@ -180,6 +180,42 @@ class _PointsMallPage extends State<PointsMallPage>
|
|
|
|
|
items: sortItems, |
|
|
|
|
onChanged: _sortChange, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
alignment: Alignment.centerLeft, |
|
|
|
|
child: DefaultTabController( |
|
|
|
|
length: 4, |
|
|
|
|
child:Stack( |
|
|
|
|
children: [ |
|
|
|
|
Padding(padding: EdgeInsets.only(top: 39),child:Divider( |
|
|
|
|
// indent: 0.0, |
|
|
|
|
thickness:1.5, |
|
|
|
|
color: Color(0xffE6E6E6), |
|
|
|
|
)), |
|
|
|
|
TabBar( |
|
|
|
|
isScrollable: true, //可滚动 |
|
|
|
|
indicatorColor: Color(0xff39B54A), |
|
|
|
|
labelColor: Color(0xff32A060), |
|
|
|
|
labelStyle: TextStyle(fontSize: 14), |
|
|
|
|
unselectedLabelStyle: TextStyle( |
|
|
|
|
fontSize: 14, |
|
|
|
|
fontWeight: FontWeight.normal, |
|
|
|
|
), |
|
|
|
|
// controller: tabController, |
|
|
|
|
//未选中文字颜色 |
|
|
|
|
unselectedLabelColor: Color(0xff262626), |
|
|
|
|
indicatorSize: TabBarIndicatorSize.label, |
|
|
|
|
//指示器与文字等宽 |
|
|
|
|
tabs: <Widget>[ |
|
|
|
|
Tab(text: "全部"), |
|
|
|
|
Tab(text: "饮食"), |
|
|
|
|
Tab(text: "生活娱乐"), |
|
|
|
|
Tab(text: "办公"), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GridView.builder( |
|
|
|
|
itemCount: gooods.length, |
|
|
|
|
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 16.h, bottom: 16.h), |
|
|
|
@ -225,19 +261,20 @@ class _PointsMallPage extends State<PointsMallPage>
|
|
|
|
|
case 0: |
|
|
|
|
orderType = 1; |
|
|
|
|
break; |
|
|
|
|
//兑换量 |
|
|
|
|
// case 1: |
|
|
|
|
// orderType = 2; |
|
|
|
|
// orderDesc = true; |
|
|
|
|
// break; |
|
|
|
|
// case 2: |
|
|
|
|
// orderType = 2; |
|
|
|
|
// orderDesc = false; |
|
|
|
|
// break; |
|
|
|
|
case 1: |
|
|
|
|
orderType = 2; |
|
|
|
|
orderDesc = true; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
orderType = 2; |
|
|
|
|
orderDesc = false; |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
orderType = 3; |
|
|
|
|
orderDesc = true; |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
case 2: |
|
|
|
|
orderType = 3; |
|
|
|
|
orderDesc = false; |
|
|
|
|
break; |
|
|
|
@ -274,8 +311,8 @@ class _PointsMallPage extends State<PointsMallPage>
|
|
|
|
|
goods.mainImgPath, |
|
|
|
|
aspectRatio: 1, |
|
|
|
|
radius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(4), |
|
|
|
|
topRight: Radius.circular(4), |
|
|
|
|
topLeft: Radius.circular(2), |
|
|
|
|
topRight: Radius.circular(2), |
|
|
|
|
), |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
errorSrc: "assets/image/default_1.png", |
|
|
|
@ -318,15 +355,14 @@ 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, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
children: [ |
|
|
|
|
// 兑换数量 |
|
|
|
|
// Text( |
|
|
|
|
// S.of(context).yiduihuanjian("${goods.sales}万"), |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// color: Color(0xFFA29E9E), |
|
|
|
|
// fontSize: 10.sp, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).yuan_(goods.worth), |
|
|
|
|
style: TextStyle( |
|
|
|
@ -344,8 +380,6 @@ class _PointsMallPage extends State<PointsMallPage>
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|