Browse Source

积分商城更改

null_safety
w-R 4 years ago
parent
commit
e07d281be5
  1. 84
      lib/home/points_mall_page.dart
  2. 12
      lib/login/login_page.dart
  3. 24
      pubspec.lock
  4. 4
      pubspec.yaml

84
lib/home/points_mall_page.dart

@ -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,
),
),
],
)
],
),
],

12
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<LoginPage> 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,

24
pubspec.lock

@ -49,14 +49,14 @@ packages:
name: args
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
version: "2.2.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0"
version: "2.6.1"
barcode:
dependency: transitive
description:
@ -385,6 +385,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
fluttertoast:
dependency: "direct main"
description:
name: fluttertoast
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.0.7"
glob:
dependency: transitive
description:
@ -623,13 +630,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.0"
photo_view:
dependency: "direct main"
description:
name: photo_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.11.1"
platform:
dependency: transitive
description:
@ -858,7 +858,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19"
version: "0.3.0"
timing:
dependency: transitive
description:
@ -970,7 +970,7 @@ packages:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.5"
version: "2.2.5"
xdg_directories:
dependency: transitive
description:
@ -993,5 +993,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.13.0 <3.0.0"
flutter: ">=2.0.0"

4
pubspec.yaml

@ -63,7 +63,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
@ -80,7 +80,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

Loading…
Cancel
Save