Browse Source

Merge branch 'dev' into wr_2023_business

wr_2023_business
wurong 2 years ago
parent
commit
56d0fc49f5
  1. 3
      lib/home/home_page.dart
  2. 1
      lib/mine/mine_page.dart
  3. 184
      lib/order/exchange_order_page.dart
  4. 2
      lib/setting/binding_phone_page.dart
  5. 76
      lib/union/union_list.dart
  6. 7
      pubspec.lock
  7. 2
      pubspec.yaml

3
lib/home/home_page.dart

@ -537,9 +537,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
// }),
///
if(coupons != null && coupons.length != 0)
DiscountZone(coupons),
///-
if(homeRank != null && homeRank.commodityZone.length != 0)
HomeRecommendGoods(homeRank),
///
@ -550,6 +552,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
WelfareCore(),
///
if(homeRank != null && homeRank.commodityList.length != 0)
TopSellingList(homeRank),
// ///

1
lib/mine/mine_page.dart

@ -238,7 +238,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
Container(
height: 306.h,
decoration: BoxDecoration(
// color: Color(0xFF32A060)
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),

184
lib/order/exchange_order_page.dart

@ -728,97 +728,97 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
],
),
),
Container(
margin: EdgeInsets.only(left: 16, right: 16, bottom: 8),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Column(
children: [
Row(
children: [
Expanded(
child: Text(
"兑换数量",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF353535)),
)),
InkWell(
onTap: () {
setState(() {
if (buyNum > 1) buyNum -= 1;
});
},
child: Image.asset(
"assets/image/reduce.webp",
width: 22,
height: 22,
),
),
Container(
width: 30,
alignment: Alignment.center,
child: Text(
buyNum.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
),
InkWell(
onTap: () {
setState(() {
if (widget.arguments["payType"] == 1
? (double.parse(widget
.arguments["oneBean"]) *
(buyNum + 1)) >
double.parse(happyBean)
: (widget.arguments["payType"] == 2
? (double.parse(widget.arguments[
"onePrice"]) *
(buyNum + 1)) >
double.parse(points)
: (widget.arguments["price"] ==
null ||
widget.arguments["price"] ==
"0"
? false
: (double.parse(widget
.arguments["price"]) *
(buyNum + 1)) >
double.parse(points)))) {
SmartDialog.showToast("您的积分不足",
alignment: Alignment.center);
return;
}
buyNum += 1;
});
},
child: Image.asset(
"assets/image/add.webp",
width: 22,
height: 22,
),
),
],
),
],
),
),
// Container(
// margin: EdgeInsets.only(left: 16, right: 16, bottom: 8),
// padding: EdgeInsets.all(20),
// decoration: BoxDecoration(
// color: Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// )
// ],
// borderRadius: BorderRadius.all(Radius.circular(8)),
// ),
// child: Column(
// children: [
// Row(
// children: [
// Expanded(
// child: Text(
// "兑换数量",
// style: TextStyle(
// fontWeight: MyFontWeight.regular,
// fontSize: 14.sp,
// color: Color(0xFF353535)),
// )),
// InkWell(
// onTap: () {
// setState(() {
// if (buyNum > 1) buyNum -= 1;
// });
// },
// child: Image.asset(
// "assets/image/reduce.webp",
// width: 22,
// height: 22,
// ),
// ),
// Container(
// width: 30,
// alignment: Alignment.center,
// child: Text(
// buyNum.toString(),
// style: TextStyle(
// color: Colors.black,
// fontSize: 14.sp,
// fontWeight: MyFontWeight.medium,
// ),
// ),
// ),
// InkWell(
// onTap: () {
// setState(() {
// if (widget.arguments["payType"] == 1
// ? (double.parse(widget
// .arguments["oneBean"]) *
// (buyNum + 1)) >
// double.parse(happyBean)
// : (widget.arguments["payType"] == 2
// ? (double.parse(widget.arguments[
// "onePrice"]) *
// (buyNum + 1)) >
// double.parse(points)
// : (widget.arguments["price"] ==
// null ||
// widget.arguments["price"] ==
// "0"
// ? false
// : (double.parse(widget
// .arguments["price"]) *
// (buyNum + 1)) >
// double.parse(points)))) {
// SmartDialog.showToast("您的积分不足",
// alignment: Alignment.center);
// return;
// }
// buyNum += 1;
// });
// },
// child: Image.asset(
// "assets/image/add.webp",
// width: 22,
// height: 22,
// ),
// ),
// ],
// ),
// ],
// ),
// ),
if (widget.arguments["payType"] == 4 ||
(widget.arguments["payType"] == 3 &&
widget.arguments["money"] != "0.00"))
@ -1170,7 +1170,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
"payType": (widget.arguments["payType"] == 1)
? 2
: ((widget.arguments["payType"] == 2) ? 1 : 3),
"number": buyNum,
"number": 1,
"useTyped": widget.arguments["useTyped"],
"payChannel":
handleNeedPay().contains("") ? (checkIndex == 3 ? "1" : "4") : "0",

2
lib/setting/binding_phone_page.dart

@ -351,7 +351,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
Container(
height: 30.h,
width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0),
margin: EdgeInsets.only(bottom:Platform.isIOS ? 5.h:0),
child: TextField(
style: TextStyle(
height: 1.h,

76
lib/union/union_list.dart

@ -11,6 +11,7 @@ import 'package:huixiang/view_widget/request_permission.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shimmer/shimmer.dart';
import '../view_widget/no_data_view.dart';
@ -49,13 +50,20 @@ class _UnionList extends State<UnionList> {
header: MyHeader(),
onRefresh: widget.onRefresh,
child: (widget.storeList == null || widget.storeList.length == 0)
? NoDataView(
src:"assets/image/di_zhi.webp",
isShowBtn: false,
text: "暂无店铺列表~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
):ListView.builder(
? ListView.builder(
itemCount:5,
padding: EdgeInsets.only(
top: 8.h,
bottom: 100.h, /* + (375.h - 88.h) + 4.h*/
),
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return InkWell(
onTap: () {
},
child:sm(),
);
}):ListView.builder(
itemCount:widget.storeList == null ? 0 : widget.storeList.length,
padding: EdgeInsets.only(
top: 8.h,
@ -93,7 +101,8 @@ class _UnionList extends State<UnionList> {
);
}
},
child: buildStoreItem(widget.storeList[position], position),
child:
buildStoreItem(widget.storeList[position], position),
);
})),
)
@ -101,6 +110,57 @@ class _UnionList extends State<UnionList> {
);
}
Widget sm(){
return Container(
margin:EdgeInsets.symmetric(horizontal: 14.w,vertical: 8.h),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
),
height: 223.h,
child:Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: double.infinity,
height: 140.h,
),
),
Padding(padding: EdgeInsets.only(left: 6.w,bottom: 5.h,top: 12.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 108.w,
height: 20.h,
),
),),Padding(padding: EdgeInsets.only(left: 6.w,),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 260.w,
height: 20.h,
),
),),
],
),
);
}
Widget buildSearchItem() {
return Container(
height: 36.h,

7
pubspec.lock

@ -728,6 +728,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.6"
shimmer:
dependency: "direct main"
description:
name: shimmer
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
simple_gesture_detector:
dependency: transitive
description:

2
pubspec.yaml

@ -108,6 +108,8 @@ dependencies:
mqtt_client: ^9.6.8
shimmer: ^3.0.0
# 时间选择器
flutter_datetime_picker: ^1.5.1

Loading…
Cancel
Save