Browse Source

福利中心更改;增加福利兑换更改

zyh
w-R 3 years ago
parent
commit
304e674902
  1. 3
      lib/home/activity_list_page.dart
  2. 3
      lib/home/home_view/activity_list.dart
  3. 4
      lib/home/home_view/shortcut_operation.dart
  4. 6
      lib/home/points_mall_view/points_goods_title.dart
  5. 493
      lib/home/welfare_exchange.dart
  6. 224
      lib/home/welfare_page.dart
  7. 3
      lib/login/new_login_page.dart
  8. 3
      lib/main.dart
  9. 4
      lib/mine/mine_greenery.dart
  10. 4
      lib/retrofit/min_api.dart
  11. 4
      lib/retrofit/retrofit_api.dart
  12. 12
      lib/settlement/settlement.dart
  13. 2
      lib/settlement/settlement_view/coupon.dart
  14. 26
      lib/settlement/settlement_view/distribution.dart
  15. 17
      lib/store/store_order.dart
  16. 6
      lib/store/store_view/store_info.dart
  17. 40
      lib/view_widget/mine_vip_view.dart
  18. 16
      pubspec.lock

3
lib/home/activity_list_page.dart

@ -10,8 +10,7 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:keframe/frame_separate_widget.dart';
import 'package:keframe/size_cache_widget.dart';
import 'package:keframe/keframe.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

3
lib/home/home_view/activity_list.dart

@ -12,8 +12,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:keframe/frame_separate_widget.dart';
import 'package:keframe/size_cache_widget.dart';
import 'package:keframe/keframe.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

4
lib/home/home_view/shortcut_operation.dart

@ -151,8 +151,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
), ),
Expanded(child: GestureDetector(
onTap: (){
// Navigator.of(context).pushNamed('/router/roll_center_page');
Navigator.of(context).pushNamed('/router/welfare_page');
Navigator.of(context).pushNamed('/router/roll_center_page');
// Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,

6
lib/home/points_mall_view/points_goods_title.dart

@ -42,10 +42,10 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ItemTitle(
text: S.of(context).jifenshangcheng,
// ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp",
),
// ),
// ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp",

493
lib/home/welfare_exchange.dart

@ -0,0 +1,493 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/home/points_mall_view/points_goods_title.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/goods_category.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class WelfareExchange extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _WelfareExchange();
}
}
class _WelfareExchange extends State<WelfareExchange> {
ApiService apiService;
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
int pageNum = 1;
//1-2-3-
int orderType = 1;
//
bool orderDesc = true;
List<Goods> goods = [];
List<Goods> gooods = [];
List<GoodsCategory> gooodsCategorys = [];
UserInfo userInfo;
String categoryId;
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString("token")),
creditGoods(),
});
}
queryUser() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),
});
}
}
creditGoods() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
final SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(Dio(),
context: context, token: value.getString('token'), showLoading: false);
await queryUser();
BaseData<PageInfo<Goods>> goodsData = await apiService.creditGoods({
"orderDesc": true,
"orderType": 1,
"pageNum": 1,
"pageSize": 10,
"state": 1
}).catchError((onError) {
refreshController.refreshFailed();
});
if (goodsData != null && goodsData.isSuccess) {
gooods.clear();
gooods.addAll(goodsData.data.list);
}
BaseData<PageInfo<GoodsCategory>> dataCategory =
await apiService.goodsCategory({
"current": 1,
"map": {},
"model": {"pageNum": 1, "pageSize": 20, "searchKey": ""},
"order": "descending",
"size": 20,
"sort": "sortOrder"
}).catchError((onError) {
refreshController.loadFailed();
refreshController.refreshFailed();
});
if (dataCategory != null &&
dataCategory.isSuccess &&
dataCategory.data != null &&
dataCategory.data.records != null &&
dataCategory.data.records.length > 0) {
gooodsCategorys.clear();
gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu));
gooodsCategorys.addAll(dataCategory.data.records);
}
var param = {
"categoryId": categoryId ?? "",
"orderDesc": orderDesc,
"orderType": orderType,
"pageNum": pageNum,
"pageSize": 10,
"state": 1
};
BaseData<PageInfo<Goods>> pageGoods =
await apiService.creditGoods(param).catchError((onError) {
refreshController.loadFailed();
refreshController.refreshFailed();
});
EasyLoading.dismiss();
if (pageGoods != null && pageGoods.isSuccess) {
if (pageNum == 1) {
goods.clear();
}
goods.addAll(pageGoods.data.list);
refreshController.refreshCompleted();
refreshController.loadComplete();
if (pageGoods.data.pageNum == pageGoods.data.pages) {
refreshController.loadNoData();
} else {
pageNum += 1;
}
} else {
refreshController.loadFailed();
refreshController.refreshFailed();
}
}
_onRefresh() {
creditGoods();
}
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xFFF7F7F7),
child: Stack(
children: [
Container(
// padding: EdgeInsets.only(top: 40.h),
height: 172.h,
decoration: BoxDecoration(
// border: Border.all(color: Colors.white,width: 0.5),
color: Color(0xFF277D4B),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(40),
bottomLeft: Radius.circular(40),
),
),
// child: ClipPath(
//
// clipper: BottonClipper(),
// child: Container(
// color: Colors.deepOrange,
// height: 300,
// ),
// ),
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Colors.transparent,
leadingColor: Colors.white,
title: "福利兑换",
titleColor: Colors.white,
titleSize: 18.sp,
brightness: Brightness.dark,
),
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
setState(() {
_onRefresh();
});
},
physics: BouncingScrollPhysics(),
scrollController: scrollController,
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FutureBuilder(
future: creditGoods(),
builder: (context, snap) {
return Column(
children: [
///
pointUser(),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///,
pointList()
],
);
},
),
),
),
),
),
],
),
);
}
Widget pointUser() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 1),
blurRadius: 8,
spreadRadius: 0,
)
]),
margin: EdgeInsets.all(16),
padding: EdgeInsets.all(16),
child: Row(
children: [
MImage(
userInfo != null ? userInfo.headimg : "",
width: 50,
height: 50,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_user.webp",
fadeSrc: "assets/image/default_user.webp",
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 12.w),
height: 50.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
userInfo == null
? Text(
S.of(context).denglu,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
)
: Text(
userInfo.nickname,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
SizedBox(
height: 2.h,
),
userInfo == null
? Text(
S.of(context).weidengluxinxi,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
)
: Text(
userInfo == null
? ""
: AppUtils.phoneEncode(userInfo?.phone ?? ""),
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
),
],
),
),
flex: 1,
),
userInfo == null
? Icon(
Icons.keyboard_arrow_right,
size: 20,
color: Colors.black,
)
: Container(
margin: EdgeInsets.only(left: 15.w),
height: 50.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
S.of(context).yiyoujifen,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
),
),
SizedBox(
height: 4.h,
),
Text(
(userInfo != null) ? "${userInfo.points}" : "",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF32A060),
fontWeight: FontWeight.bold,
),
),
],
),
)
],
),
);
}
Widget pointList(){
return Container(
child: (goods == null || goods.length == 0)? NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
text: "当前分类暂无商品",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
):GridView.builder(
itemCount:goods == null ? 0 : goods.length,
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
top: 18.h,
bottom: 16.h,
),
shrinkWrap: true,
physics: BouncingScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget数量
crossAxisCount: 2,
//Widget之间间距
crossAxisSpacing: 11.w,
//Widget之间间距
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (261 / 2 + (261 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/integral_store_page',
arguments: {"goodsId": goods[index].id},
);
},
child: pointItem(goods[index]),
);
},
),
);
}
Widget pointItem(Goods goods) {
return Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Stack(
alignment: AlignmentDirectional.topEnd,
fit: StackFit.loose,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
MImage(
goods.mainImgPath,
aspectRatio: 1.1,
fit: BoxFit.cover,
radius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
Expanded(
child: Container(
margin: EdgeInsets.only(
right: 12.w,
top: 10.h,
),padding: EdgeInsets.only(
bottom: 8,
left: 8
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
goods.name,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFF0D0D0D),
height: 1.2,
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
),
),
Spacer(),
Text(
(goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}"),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
),
flex: 1,
),
],
),
],
),
);
}
}

224
lib/home/welfare_page.dart

@ -1,15 +1,17 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
@ -27,10 +29,54 @@ class _WelfarePage extends State<WelfarePage> {
ApiService apiService;
final RefreshController refreshController = RefreshController();
final ScrollController scrollController = ScrollController();
List<Goods> goods = [];
String categoryId;
bool orderDesc = true;
int orderType = 1;
int pageNum = 1;
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), context: context, token: value.getString("token")),
queryGoods(),
});
}
queryGoods() async {
var param = {
"categoryId": categoryId ?? "",
"orderDesc": orderDesc,
"orderType": orderType,
"pageNum": pageNum,
"pageSize": 10,
"state": 1
};
BaseData<PageInfo<Goods>> pageGoods =
await apiService.creditGoods(param).catchError((onError) {
refreshController.loadFailed();
refreshController.refreshFailed();
});
EasyLoading.dismiss();
if (pageGoods != null && pageGoods.isSuccess) {
setState(() {
if (pageNum == 1) {
goods.clear();
}
goods.addAll(pageGoods.data.list);
});
refreshController.refreshCompleted();
refreshController.loadComplete();
if (pageGoods.data.pageNum == pageGoods.data.pages) {
refreshController.loadNoData();
} else {
pageNum += 1;
}
} else {
refreshController.loadFailed();
refreshController.refreshFailed();
}
}
@override
@ -90,7 +136,9 @@ class _WelfarePage extends State<WelfarePage> {
inviteFriends(),
activityTask(),
benefitExchange(),
// activityTask(),
],
);
},
@ -132,7 +180,7 @@ class _WelfarePage extends State<WelfarePage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"本周劵包 ",
S.of(context).lingquanzhongxin,
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 15.sp,
@ -140,7 +188,7 @@ class _WelfarePage extends State<WelfarePage> {
),
),
Text(
"每周上新 ",
"每周上新 ",
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 12.sp,
@ -313,7 +361,7 @@ class _WelfarePage extends State<WelfarePage> {
///
Widget inviteFriends() {
return Container(
margin: EdgeInsets.only(right:14.w,top:24.h,bottom:20.h),
margin: EdgeInsets.only(top:24.h,bottom:20.h),
child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -346,10 +394,171 @@ class _WelfarePage extends State<WelfarePage> {
);
}
///
Widget benefitExchange() {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top:24.h,bottom:20.h),
child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_exchange');
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Text(
"福利兑换",
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),),
Text(
S.of(context).gengduo,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
Icon(
Icons.keyboard_arrow_right,
color: Color(0xFF4D4D4D),
size: 20,
)
],
),
),
SizedBox(height: 12,),
GridView.builder(
itemCount:goods.length>6?6:goods.length,
padding: EdgeInsets.only(
// left: 16.w,
// right: 16.w,
top: 18.h,
bottom: 16.h,
),
shrinkWrap: true,
physics: BouncingScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget数量
crossAxisCount: 2,
//Widget之间间距
crossAxisSpacing: 11.w,
//Widget之间间距
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (261 / 2 + (261 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/integral_store_page',
arguments: {"goodsId": goods[index].id},
);
},
child: exchangeItem(goods[index]),
);
},
)
],
),
);
}
Widget exchangeItem(Goods goods) {
return Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Stack(
alignment: AlignmentDirectional.topEnd,
fit: StackFit.loose,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
MImage(
goods.mainImgPath,
aspectRatio: 1.1,
fit: BoxFit.cover,
radius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
Expanded(
child: Container(
margin: EdgeInsets.only(
right: 12.w,
top: 10.h,
),padding: EdgeInsets.only(
bottom: 8,
left: 8
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
goods.name,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFF0D0D0D),
height: 1.2,
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
),
),
Spacer(),
Text(
(goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}"),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
),
flex: 1,
),
],
),
],
),
);
}
///
Widget activityTask() {
return Container(
margin: EdgeInsets.only(right:14.w,bottom:20.h,),
margin: EdgeInsets.only(bottom:20.h,),
child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -477,4 +686,5 @@ class _WelfarePage extends State<WelfarePage> {
);
}
}

3
lib/login/new_login_page.dart

@ -235,7 +235,8 @@ class _NewLoginPage extends State<NewLoginPage> {
EasyLoading.dismiss();
} else {
SmartDialog.showToast(value?.msg, alignment: Alignment.center);
if(value.msg != null)
SmartDialog.showToast(value?.msg, alignment: Alignment.center);
}
}

3
lib/main.dart

@ -94,6 +94,7 @@ import 'community/report/report_success.dart';
import 'home/guide_page.dart';
import 'home/home_view/activity_list.dart';
import 'home/start_page.dart';
import 'home/welfare_exchange.dart';
import 'home/welfare_page.dart';
import 'login/new_login_page.dart';
import 'main_page.dart';
@ -391,4 +392,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
MineShopDetails(arguments:arguments,),
'/router/coupon_page': (context, {arguments}) =>
CouponPage(),
'/router/welfare_exchange': (context, {arguments}) =>
WelfareExchange(),
};

4
lib/mine/mine_greenery.dart

@ -347,6 +347,10 @@ class _MineGreenery extends State<MineGreenery> {
goods.mainImgPath,
aspectRatio: 1.1,
fit: BoxFit.cover,
radius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),

4
lib/retrofit/min_api.dart

@ -39,7 +39,7 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8765/app/";
const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "http://192.168.10.236:8765/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线
@ -109,7 +109,7 @@ abstract class MinApiService {
}
} else if (map["code"] != 0 && response.request.baseUrl == baseUrl) {
///poi服务请求不需要toast
SmartDialog.showToast(map["msg"], alignment: Alignment.center);
// SmartDialog.showToast(map["msg"], alignment: Alignment.center);
}
debugPrint(
"======================= Min_响应数据结束 =======================\n");

4
lib/retrofit/retrofit_api.dart

@ -70,7 +70,7 @@ part 'retrofit_api.g.dart';
// const base_url = "http://192.168.10.132:8766/app/";///
const localBaseUrl = "http://192.168.10.78:8766/app/";///
const localBaseUrl = "http://192.168.10.236:8766/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl)
@ -131,7 +131,7 @@ abstract class ApiService {
}
} else if (map["code"] != 0 && response.request.baseUrl == baseUrl) {
///poi服务请求不需要toast
SmartDialog.showToast(map["msg"], alignment: Alignment.center);
// SmartDialog.showToast(map["msg"], alignment: Alignment.center);
}
debugPrint("======================= 响应数据结束 =======================\n");
}, onError: (DioError e) {

12
lib/settlement/settlement.dart

@ -113,7 +113,7 @@ class _Settlement extends State<Settlement> {
tenant: tenant,
storeId: storeId,
showLoading: true);
if (promotions != null && promotions != "" || tableId <= 0) {
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
@ -125,7 +125,7 @@ class _Settlement extends State<Settlement> {
actProductSkuId ?? "",
count1,
payChannel);
} else if (coupons != null && coupons != "" || tableId <= 0) {
} else if (coupons != null && coupons != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
@ -818,7 +818,7 @@ class _Settlement extends State<Settlement> {
couponBean: couponListBean);
},
);
if (couponBean != null) {
// if (couponBean != null) {
this.couponListBean = couponBean;
coupons = couponListBean?.promotionName ?? "";
promotions = "";
@ -834,7 +834,7 @@ class _Settlement extends State<Settlement> {
actProductSkuId ?? "",
count1,
payChannel);
}
// }
}
///
@ -847,7 +847,7 @@ class _Settlement extends State<Settlement> {
return SettlementActivity(settleOrderInfo, storeInfo);
},
);
if (pro != null) {
// if (pro != null) {
this.promotion = pro;
promotions = promotion?.name ?? "";
coupons = "";
@ -864,5 +864,5 @@ class _Settlement extends State<Settlement> {
count1,
payChannel);
}
}
// }
}

2
lib/settlement/settlement_view/coupon.dart

@ -167,7 +167,7 @@ class _CouponWidget extends State<CouponWidget> {
margin: EdgeInsets.only(right: 23.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(widget.selected?null:widget.couponList);
Navigator.of(context).pop(widget.couponList);
},
child: Image.asset(
widget.selected

26
lib/settlement/settlement_view/distribution.dart

@ -154,13 +154,15 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1,
child: GestureDetector(
onTap: () {
if (widget.storeInfo.storeName == "一心回乡商城") {
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
return;
}
selectedBtn = 1;
widget.queryAddress(selectedBtn);
// if (widget.storeInfo.storeName == "一心回乡商城") {
// SmartDialog.showToast("该功能暂未开放!",
// alignment: Alignment.center);
// return;
// }
// selectedBtn = 1;
// widget.queryAddress(selectedBtn);
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
},
child: Container(
height: 50.h,
@ -180,11 +182,11 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1,
child: GestureDetector(
onTap: () {
if (widget.storeInfo.storeName == "一心回乡商城") {
selectedBtn = 2;
widget.queryAddress(selectedBtn);
return;
}
// if (widget.storeInfo.storeName == "一心回乡商城") {
// selectedBtn = 2;
// widget.queryAddress(selectedBtn);
// return;
// }
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
},

17
lib/store/store_order.dart

@ -294,7 +294,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
right: 0,
),
Positioned(
child: Container( decoration: BoxDecoration(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
@ -339,7 +340,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
],
),
),
top:225.h,
top:226.h,
bottom: 0,
left: 0,
right: 0,
@ -363,8 +364,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,
indicatorWeight: 1,
indicatorColor: Color(0xFFFAFAFA),
indicatorWeight: 3,
indicatorColor: Color(0xFF32A060),
labelPadding: EdgeInsets.only(
left: 8.w,
right: 8.w,
@ -381,7 +382,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
labelColor: Colors.black,
tabs: [
MyTab(text: S.of(context).diancan),
MyTab(text: S.of(context).diandan),
// MyTab(text: ""),
],
),
@ -618,7 +619,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
Widget buildSwiper() {
return Container(
width: double.infinity,
height: 180.h,
height: 230.h,
child: Swiper(
pagination: SwiperPagination(
alignment: Alignment.bottomCenter,
@ -806,14 +807,14 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (baseDate.data[0].selectDiscount == 1) {
baseDate.data[0].couponList.forEach((element) {
if (element.isMaxCoupon) {
cName = element.promotionName;
// cName = element.promotionName;
cid = element.id;
}
});
} else if (baseDate.data[0].selectDiscount == 2) {
baseDate.data[0].promotionInfoList.forEach((element) {
if (element.isMaxPromotion) {
pName = element.name;
// pName = element.name;
pid = element.id;
}
});

6
lib/store/store_view/store_info.dart

@ -27,10 +27,10 @@ class _StoreInfoView extends State<StoreInfoView> {
margin: EdgeInsets.only(
// left: 16.w,
// right: 16.w,
top: 5.h,
bottom: 6.h,
// top: 5.h,
// bottom: 6.h,
),
height: MediaQuery.of(context).size.width >= 650 ? 180.h :154.h,
height: MediaQuery.of(context).size.width >= 650 ? 180.h :166.h,
padding: EdgeInsets.all(12.w),
decoration: BoxDecoration(
color: Colors.white,

40
lib/view_widget/mine_vip_view.dart

@ -148,6 +148,46 @@ class MineVipView extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(8),
// bottomRight: Radius.circular(8),
// ),
// ),
// child: Text(
// topLeft,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.white,
// ),
// ),
// ),
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// margin: EdgeInsets.only(top: 10,right: 10),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.circular(10),
// ),
// child: Text(
// S.of(context).chakanquanyi,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFFF5EEE9),
// ),
// ),
// )
// ],
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,

16
pubspec.lock

@ -147,7 +147,7 @@ packages:
name: ffi
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
version: "1.2.1"
file:
dependency: transitive
description:
@ -307,7 +307,7 @@ packages:
name: fluwx
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.8.4+1"
version: "3.8.5"
font_awesome_flutter:
dependency: "direct main"
description:
@ -377,7 +377,7 @@ packages:
name: keframe
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.4"
version: "2.0.6"
like_button:
dependency: "direct main"
description:
@ -468,7 +468,7 @@ packages:
name: path_provider_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.5"
version: "2.1.6"
path_provider_platform_interface:
dependency: transitive
description:
@ -482,7 +482,7 @@ packages:
name: path_provider_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.5"
version: "2.0.6"
permission_handler:
dependency: "direct main"
description:
@ -566,7 +566,7 @@ packages:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1+1"
version: "3.1.0"
retrofit:
dependency: "direct main"
description:
@ -629,7 +629,7 @@ packages:
name: shared_preferences_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
version: "2.0.4"
shared_preferences_windows:
dependency: transitive
description:
@ -802,7 +802,7 @@ packages:
name: video_player_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.8"
version: "2.0.10"
wakelock:
dependency: transitive
description:

Loading…
Cancel
Save