Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/mine/vip_card_page.dart
master
fmk 3 years ago
parent
commit
1577197b37
  1. 11
      lib/login/login_page.dart
  2. 49
      lib/mine/vip_card_page.dart
  3. 9
      lib/order/logistics_information_page.dart

11
lib/login/login_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/retrofit/data/user_entity.dart'; import 'package:huixiang/retrofit/data/user_entity.dart';
import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/border_text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -523,7 +524,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
S.of(context).login_splash, S.of(context).login_splash,
style: TextStyle( style: TextStyle(
fontSize: 18.sp, fontSize: 18.sp,
fontWeight: FontWeight.w400, fontWeight: MyFontWeight.regular,
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
), ),
@ -561,7 +562,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
S.of(context).login, S.of(context).login,
style: TextStyle( style: TextStyle(
fontSize: 18.sp, fontSize: 18.sp,
fontWeight: FontWeight.w400, fontWeight: MyFontWeight.regular,
color: Colors.white), color: Colors.white),
), ),
), ),
@ -947,7 +948,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
TextSpan( TextSpan(
text: S.of(context).yinsizhengce1, text: S.of(context).yinsizhengce1,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
fontSize: 14.sp, fontSize: 14.sp,
height: 1.3.h, height: 1.3.h,
color: Color(0xff727272), color: Color(0xff727272),
@ -956,7 +957,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
TextSpan( TextSpan(
text: S.of(context).yinsixieyi, text: S.of(context).yinsixieyi,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xff32A060)), color: Color(0xff32A060)),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
@ -976,7 +977,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
color: Color(0xff727272), color: Color(0xff727272),
fontSize: 14.sp, fontSize: 14.sp,
height: 1.3.h, height: 1.3.h,
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox( SizedBox(

49
lib/mine/vip_card_page.dart

@ -32,8 +32,7 @@ class _VipCardPage extends State<VipCardPage> {
_refreshController = RefreshController(); _refreshController = RefreshController();
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
apiService = apiService = ApiService(Dio(), context: context, token: value.getString("token"));
ApiService(Dio(), context: context, token: value.getString("token"));
queryVipCard(); queryVipCard();
}); });
} }
@ -41,8 +40,7 @@ class _VipCardPage extends State<VipCardPage> {
List<VipCard> coupons = []; List<VipCard> coupons = [];
queryVipCard() async { queryVipCard() async {
BaseData<List<VipCard>> baseData = BaseData<List<VipCard>> baseData = await apiService.vipList({}).catchError((error) {
await apiService.vipList({}).catchError((error) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
}); });
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
@ -72,27 +70,24 @@ class _VipCardPage extends State<VipCardPage> {
controller: _refreshController, controller: _refreshController,
onRefresh: queryVipCard, onRefresh: queryVipCard,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: (coupons != null && coupons.length > 0) child: (coupons != null && coupons.length > 0) ? ListView.builder(
? ListView.builder( padding: EdgeInsets.symmetric(vertical: 8.h),
padding: EdgeInsets.symmetric(vertical: 8.h), itemBuilder: (context, position) {
itemBuilder: (context, position) { return GestureDetector(
return GestureDetector( onTap: () {
onTap: () { Navigator.of(context).pushNamed('/router/vip_details_page',
Navigator.of(context).pushNamed( arguments: {"id": coupons[position].id});
'/router/vip_details_page', },
arguments: {"id": coupons[position].id}); child: vipCardItem(coupons[position]),
}, );
child: vipCardItem(coupons[position]), },
); itemCount: coupons != null ? coupons.length : 0,
}, ) : NoDataView(
itemCount: coupons != null ? coupons.length : 0, isShowBtn: false,
) text: "还没有会员卡~",
: NoDataView( fontSize: 16.sp,
isShowBtn: false, margin: EdgeInsets.only(top: 120.h),
text: "还没有会员卡~", ),
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
),
), ),
), ),
); );
@ -234,8 +229,8 @@ class _VipCardPage extends State<VipCardPage> {
color: Colors.black, color: Colors.black,
), ),
), ),
], ),
), ],),
), ),
], ],
), ),

9
lib/order/logistics_information_page.dart

@ -5,6 +5,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/logistics.dart'; import 'package:huixiang/retrofit/data/logistics.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/no_data_view.dart';
@ -320,7 +321,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
logistics.acceptTime.split(" ")[0], logistics.acceptTime.split(" ")[0],
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
color: Color(0xff353535)), color: Color(0xff353535)),
), ),
SizedBox( SizedBox(
@ -330,7 +331,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
logistics.acceptTime.split(" ")[1], logistics.acceptTime.split(" ")[1],
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
color: Color(0xff868686)), color: Color(0xff868686)),
), ),
], ],
@ -368,7 +369,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
logisticsTripStatus(logistics.acceptStation), logisticsTripStatus(logistics.acceptStation),
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w500, fontWeight: MyFontWeight.medium,
color: Colors.black), color: Colors.black),
), ),
SizedBox( SizedBox(
@ -378,7 +379,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
logistics.acceptStation, logistics.acceptStation,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.w400, fontWeight: MyFontWeight.regular,
color: Color(0xff353535)), color: Color(0xff353535)),
), ),
], ],

Loading…
Cancel
Save