From 50b7f90b31674e2cdcc55d9c6cf4aaf1d9ffa996 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Mon, 11 Oct 2021 16:21:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=82=B9=E5=8D=95=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/min_api.dart | 6 ++- lib/store/store_order.dart | 34 ++++++++++------- lib/store/store_view/store_order_list.dart | 44 +++++++++++----------- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 3d91dc41..190ce653 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -18,8 +18,8 @@ part 'min_api.g.dart'; // const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 +const base_url = "http://192.168.10.236:8765/app/"; ///费韬 +const baseUrl = "http://192.168.10.236:8765/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; @@ -113,4 +113,6 @@ abstract class MinApiService { Future>> findMiNiGroupList( @Body() Map param,Map header); + + } \ No newline at end of file diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index fb858388..7e95f2ea 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -28,7 +28,7 @@ class StoreOrderPage extends StatefulWidget { final List activitys; final StoreInfo storeInfo; final List productList; - + StoreOrderPage({this.arguments, this.activitys, this.storeInfo,this.productList}); @@ -311,7 +311,7 @@ class _StoreOrderPage extends State ), ), Text( - "¥19.00", + "¥0.00", style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.medium, @@ -480,7 +480,7 @@ class _StoreOrderPage extends State ), ), Text( - "¥19.00", + "¥0.00", style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.medium, @@ -517,15 +517,23 @@ class _StoreOrderPage extends State Positioned( right: 15, top: 14, - child: RoundButton( - width: 17, - height: 17, - text: "1", - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFF32A060), - fontSize: 12.sp, - radius: 100, + child: GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed( + '/router/settlement', + arguments: {}, + ); + }, + child: RoundButton( + width: 17, + height: 17, + text: "1", + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFF32A060), + fontSize: 12.sp, + radius: 100, + ), ), ), ], @@ -621,7 +629,7 @@ class _StoreOrderPage extends State Padding( padding: EdgeInsets.only(left: 8, right: 8), child: Text( - "1", + productList.buyNum.toString(), style: TextStyle( color: Colors.black, fontSize: 14.sp, diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 29fc3454..cc8bb6ec 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -151,7 +151,6 @@ class _StoreOrderListPage extends State { Widget orderItem(FindMiNiGroupList findMiNiGroupList,int index) { return Container( - padding: EdgeInsets.only(top:100.h), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, @@ -247,7 +246,7 @@ class _StoreOrderListPage extends State { ), ), Text( - productListBean.applyPrice, + productListBean.price, style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 11.sp, @@ -268,7 +267,7 @@ class _StoreOrderListPage extends State { ), SizedBox(width: 10), Text( - productListBean.price, + productListBean.applyPrice, style: TextStyle( color: Color(0xFFA29E9E), fontSize: 10.sp, @@ -283,7 +282,7 @@ class _StoreOrderListPage extends State { true ? GestureDetector( onTap: () { - showStoreSelector(); + showStoreSelector(productListBean); }, child: RoundButton( width: 49.w, @@ -308,7 +307,7 @@ class _StoreOrderListPage extends State { Padding( padding: EdgeInsets.only(left: 8, right: 8), child: Text( - "1", + productListBean.buyNum.toString(), style: TextStyle( color: Colors.black, fontSize: 14.sp, @@ -336,7 +335,7 @@ class _StoreOrderListPage extends State { } ///选规格弹窗 - showStoreSelector() { + showStoreSelector(ProductListBean productListBean) { showModalBottomSheet( context: context, backgroundColor: Colors.transparent, @@ -362,7 +361,7 @@ class _StoreOrderListPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - "", + productListBean.imgPath, width: 70, height: 70, fit: BoxFit.cover, @@ -374,7 +373,7 @@ class _StoreOrderListPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "手工啵啵奶茶", + productListBean.productName, style: TextStyle( color: Colors.black, fontSize: 16.sp, @@ -395,7 +394,7 @@ class _StoreOrderListPage extends State { Row( children: [ Text( - "会员价", + S.of(context).huiyuanjia, style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 13.sp, @@ -403,7 +402,7 @@ class _StoreOrderListPage extends State { ), ), Text( - "¥19.00", + productListBean.applyPrice, style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 14.sp, @@ -501,7 +500,7 @@ class _StoreOrderListPage extends State { Padding( padding: EdgeInsets.only(left: 8, right: 8), child: Text( - "1", + productListBean.buyNum.toString(), style: TextStyle( color: Colors.black, fontSize: 14.sp, @@ -522,16 +521,19 @@ class _StoreOrderListPage extends State { SizedBox( height: 24, ), - RoundButton( - width: double.infinity, - height: 54.h, - text: "加入购物车", - textColor: Colors.white, - fontWeight: MyFontWeight.semi_bold, - radius: 27, - backgroup: Color(0xFF32A060), - fontSize: 16.sp, - // padding: EdgeInsets.symmetric(vertical: 5.h), + GestureDetector( + onTap: (){}, + child: RoundButton( + width: double.infinity, + height: 54.h, + text: "加入购物车", + textColor: Colors.white, + fontWeight: MyFontWeight.semi_bold, + radius: 27, + backgroup: Color(0xFF32A060), + fontSize: 16.sp, + // padding: EdgeInsets.symmetric(vertical: 5.h), + ), ), ], ), From 6e13fd3d7df12945418e512e0e55232d57557f4f Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Mon, 11 Oct 2021 16:51:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=82=B9=E5=8D=95=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/min_api.dart | 8 ++------ lib/store/store_order.dart | 2 -- lib/store/store_view/store_order_list.dart | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 428fccb5..190ce653 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -31,21 +31,17 @@ abstract class MinApiService { String baseUrl, BuildContext context, String token, - String tenant, bool showLoading = true, bool pay = false, }) { Map headers = (token == null || token == "") ? {} : {'token': "Bearer $token"}; - if (tenant != null && tenant != "") { - headers["tenant"] = tenant; - } if (pay) { headers["Environment"] = "app"; } dio.options = BaseOptions( - connectTimeout: 10000, - receiveTimeout: 10000, + connectTimeout: 60000, + receiveTimeout: 60000, headers: headers, responseType: ResponseType.json, ); diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 3d895104..e5f35cb0 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -8,7 +8,6 @@ import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart'; -import 'package:huixiang/retrofit/data/user_entity.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/store_view/store_activity.dart'; @@ -18,7 +17,6 @@ import 'package:huixiang/union/union_view/union_coupon.dart'; import 'package:huixiang/union/union_view/vip.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:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index f840ab98..af929898 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -90,7 +90,7 @@ class _StoreOrderListPage extends State { Dio(), context: context, token: minToken, - tenant: tenant, + // tenant: tenant, ); appletGoods(); }