Browse Source

Merge branch 'dev' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	pubspec.lock
null_safety
fmk 4 years ago
parent
commit
e39181c27d
  1. 84
      lib/home/points_mall_page.dart
  2. 12
      lib/login/login_page.dart
  3. 4
      pubspec.yaml

84
lib/home/points_mall_page.dart

@ -34,7 +34,7 @@ class PointsMallPage extends StatefulWidget {
} }
class _PointsMallPage extends State<PointsMallPage> class _PointsMallPage extends State<PointsMallPage>
with AutomaticKeepAliveClientMixin { with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin {
var _itemText = S.current.morenpaixu; var _itemText = S.current.morenpaixu;
ApiService client; ApiService client;
@ -42,8 +42,8 @@ class _PointsMallPage extends State<PointsMallPage>
RefreshController(initialRefresh: false); RefreshController(initialRefresh: false);
List<String> sortString = [ List<String> sortString = [
S.current.morenpaixu, S.current.morenpaixu,
S.current.duihuanlianggaodaodi, // S.current.duihuanlianggaodaodi,
S.current.duihuanliangdidaogao, // S.current.duihuanliangdidaogao,
S.current.jifengaodaodi, S.current.jifengaodaodi,
S.current.jifendidaogao, S.current.jifendidaogao,
]; ];
@ -180,6 +180,42 @@ class _PointsMallPage extends State<PointsMallPage>
items: sortItems, items: sortItems,
onChanged: _sortChange, 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( GridView.builder(
itemCount: gooods.length, itemCount: gooods.length,
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 16.h, bottom: 16.h), 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: case 0:
orderType = 1; orderType = 1;
break; break;
//
// case 1:
// orderType = 2;
// orderDesc = true;
// break;
// case 2:
// orderType = 2;
// orderDesc = false;
// break;
case 1: case 1:
orderType = 2;
orderDesc = true;
break;
case 2:
orderType = 2;
orderDesc = false;
break;
case 3:
orderType = 3; orderType = 3;
orderDesc = true; orderDesc = true;
break; break;
case 4: case 2:
orderType = 3; orderType = 3;
orderDesc = false; orderDesc = false;
break; break;
@ -274,8 +311,8 @@ class _PointsMallPage extends State<PointsMallPage>
goods.mainImgPath, goods.mainImgPath,
aspectRatio: 1, aspectRatio: 1,
radius: BorderRadius.only( radius: BorderRadius.only(
topLeft: Radius.circular(4), topLeft: Radius.circular(2),
topRight: Radius.circular(4), topRight: Radius.circular(2),
), ),
fit: BoxFit.cover, fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
@ -318,15 +355,14 @@ class _PointsMallPage extends State<PointsMallPage>
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( //
S.of(context).yiduihuanjian("${goods.sales}"), // Text(
style: TextStyle( // S.of(context).yiduihuanjian("${goods.sales}"),
color: Color(0xFFA29E9E), // style: TextStyle(
fontSize: 10.sp, // color: Color(0xFFA29E9E),
), // fontSize: 10.sp,
), // ),
Column( // ),
children: [
Text( Text(
S.of(context).yuan_(goods.worth), S.of(context).yuan_(goods.worth),
style: TextStyle( style: TextStyle(
@ -344,8 +380,6 @@ class _PointsMallPage extends State<PointsMallPage>
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
],
)
], ],
), ),
], ],

12
lib/login/login_page.dart

@ -17,7 +17,7 @@ import 'package:flutter/services.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:dio/dio.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'; import 'package:shared_preferences/shared_preferences.dart';
class LoginPage extends StatefulWidget { class LoginPage extends StatefulWidget {
@ -390,11 +390,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
PhotoView( // PhotoView(
imageProvider: AssetImage("assets/image/laoban.png"), // imageProvider: AssetImage("assets/image/laoban.png"),
initialScale: Platform.isAndroid ? 1.02 : 1.2, // initialScale: Platform.isAndroid ? 1.02 : 1.2,
basePosition: alignmentProgress, // basePosition: alignmentProgress,
), // ),
Positioned( Positioned(
top: 54.h, top: 54.h,
left: 28.w, left: 28.w,

4
pubspec.yaml

@ -65,7 +65,7 @@ dependencies:
event_bus: ^2.0.0 event_bus: ^2.0.0
intl: ^0.17.0 intl: ^0.17.0
shared_preferences: ^2.0.6 shared_preferences: ^2.0.6
# fluttertoast: ^8.0.7 fluttertoast: ^8.0.7
flutter_smart_dialog: ^2.1.6 flutter_smart_dialog: ^2.1.6
# url_launcher: ^6.0.5 # url_launcher: ^6.0.5
@ -82,7 +82,7 @@ dependencies:
cached_network_image: ^2.0.0 cached_network_image: ^2.0.0
flutter_html: ^1.3.0 #2.1.0 flutter_html: ^1.3.0 #2.1.0
photo_view: ^0.11.1 # photo_view: ^0.11.1
chewie: ^0.12.2 chewie: ^0.12.2
video_player: ^1.0.1 video_player: ^1.0.1

Loading…
Cancel
Save