diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 18029f9e..22271593 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -34,7 +34,7 @@ class PointsMallPage extends StatefulWidget { } class _PointsMallPage extends State - with AutomaticKeepAliveClientMixin { + with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin { var _itemText = S.current.morenpaixu; ApiService client; @@ -42,8 +42,8 @@ class _PointsMallPage extends State RefreshController(initialRefresh: false); List 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 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: [ + 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 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 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 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 fontWeight: FontWeight.bold, ), ), - ], - ) ], ), ], diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 7a1d2845..79b77ba5 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -17,7 +17,7 @@ import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; -import 'package:photo_view/photo_view.dart'; +// import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LoginPage extends StatefulWidget { @@ -390,11 +390,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: Stack( alignment: Alignment.center, children: [ - PhotoView( - imageProvider: AssetImage("assets/image/laoban.png"), - initialScale: Platform.isAndroid ? 1.02 : 1.2, - basePosition: alignmentProgress, - ), + // PhotoView( + // imageProvider: AssetImage("assets/image/laoban.png"), + // initialScale: Platform.isAndroid ? 1.02 : 1.2, + // basePosition: alignmentProgress, + // ), Positioned( top: 54.h, left: 28.w, diff --git a/pubspec.yaml b/pubspec.yaml index 7b796edd..2752f728 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -65,7 +65,7 @@ dependencies: event_bus: ^2.0.0 intl: ^0.17.0 shared_preferences: ^2.0.6 -# fluttertoast: ^8.0.7 + fluttertoast: ^8.0.7 flutter_smart_dialog: ^2.1.6 # url_launcher: ^6.0.5 @@ -82,7 +82,7 @@ dependencies: cached_network_image: ^2.0.0 flutter_html: ^1.3.0 #2.1.0 - photo_view: ^0.11.1 +# photo_view: ^0.11.1 chewie: ^0.12.2 video_player: ^1.0.1