Browse Source

门店地址点击事件的解决;

dev
huixiang_app 1 year ago
parent
commit
99e5f8406e
  1. 47
      lib/store/store_order.dart

47
lib/store/store_order.dart

@ -97,7 +97,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
minLogin(SharedPreferences shared) async { minLogin(SharedPreferences shared) async {
EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); EasyLoading.show(
status: S.of(context).zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
apiService = ApiService( apiService = ApiService(
Dio(), Dio(),
context: context, context: context,
@ -127,7 +129,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
storeId: storeId, storeId: storeId,
); );
queryMemberInfo(); queryMemberInfo();
queryShopCar().then((value) { queryShopCar().then((value) {
@ -244,7 +245,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
context), context),
sliver: SliverAppBar( sliver: SliverAppBar(
expandedHeight: (storeInfo != null && expandedHeight: (storeInfo != null &&
storeInfo.couponVOList != null) storeInfo.couponVOList != null)
? 400.h ? 400.h
: 395.h, : 395.h,
floating: false, floating: false,
@ -327,7 +328,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
/// ///
StoreInfoView(storeInfo,widget.arguments["distance"],), StoreInfoView(
storeInfo,
widget.arguments["distance"],
),
// Padding(padding:EdgeInsets.only(left: 14.w), // Padding(padding:EdgeInsets.only(left: 14.w),
// child: Text( // child: Text(
// S.of(context).diandan, // S.of(context).diandan,
@ -655,7 +659,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
"shoppingCart": shopCarGoods, "shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople, "numberOfPeople": numberOfPeople,
"distance": widget.arguments["distance"], "distance": widget.arguments["distance"],
"vipLevelName": memberVo?.memberRankVo?.rankName ??"", "vipLevelName": memberVo?.memberRankVo?.rankName ?? "",
"isVips": memberVo?.isVip ?? false, "isVips": memberVo?.isVip ?? false,
"subscribeParam": miNiDetail?.subscribeParam, "subscribeParam": miNiDetail?.subscribeParam,
}, },
@ -753,7 +757,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
_queryMiNiDetail(String id, int count) async { _queryMiNiDetail(String id, int count) async {
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); EasyLoading.show(
status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black);
if (count < 0) { if (count < 0) {
shopCarGoods.shoppingCartSkuItemList.forEach((element) async { shopCarGoods.shoppingCartSkuItemList.forEach((element) async {
if (element.productId == id) { if (element.productId == id) {
@ -1054,17 +1059,17 @@ class _Title extends State<Title> {
double maxScrollExtent = widget.controller.position.maxScrollExtent; double maxScrollExtent = widget.controller.position.maxScrollExtent;
double alphaHeight = (kToolbarHeight) / 2; double alphaHeight = (kToolbarHeight) / 2;
double alphaProgress = maxScrollExtent - widget.controller.offset; double alphaProgress = maxScrollExtent - widget.controller.offset;
double alphatemp = 0; double alphaTemp = 0;
if (alphaProgress <= 1) { if (alphaProgress <= 1) {
alphatemp = 1; alphaTemp = 1;
} else if (alphaProgress <= alphaHeight) { } else if (alphaProgress <= alphaHeight) {
alphatemp = alphaTemp =
(((alphaHeight - alphaProgress) / alphaHeight) > 0.5) ? 1 : 0; (((alphaHeight - alphaProgress) / alphaHeight) > 0.5) ? 1 : 0;
} else { } else {
alphatemp = 0; alphaTemp = 0;
} }
if (alpha != alphatemp && mounted) { if (alpha != alphaTemp && mounted) {
alpha = alphatemp; alpha = alphaTemp;
print("object: $alpha"); print("object: $alpha");
widget.scrollChange(alpha); widget.scrollChange(alpha);
setState(() {}); setState(() {});
@ -1076,14 +1081,16 @@ class _Title extends State<Title> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(bottom: 38.h), margin: EdgeInsets.only(bottom: 38.h),
child: Text( child: alpha == 0
widget.title ?? "", ? null
style: TextStyle( : Text(
color: Colors.black.withOpacity(alpha), widget.title ?? "",
fontWeight: FontWeight.bold, style: TextStyle(
fontSize: 18.sp, color: Colors.black,
), fontWeight: FontWeight.bold,
), fontSize: 18.sp,
),
),
); );
} }
} }

Loading…
Cancel
Save