From 2bd3756aa1fe75eac5aa7f69a2514c3094bef8c7 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 6 Apr 2022 11:33:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=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 | 10 +++++----- lib/retrofit/min_api.g.dart | 8 ++++---- lib/retrofit/retrofit_api.dart | 8 ++++---- lib/retrofit/retrofit_api.g.dart | 2 +- lib/settlement/settlement.dart | 9 +++------ .../shopping/shopping_cart/shopping_cart_page.dart | 3 +-- lib/store/store_view/store_info.dart | 2 +- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 1ae362e4..7b9705df 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -35,12 +35,12 @@ part 'min_api.g.dart'; // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 -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.236:8765/app/";///费韬 +// const baseUrl = "http://192.168.10.236:8765/app/";///费韬 -// const base_url = "http://192.168.10.139:8765/app/";///詹云久 -// const baseUrl = "http://192.168.10.139:8765/app/";///詹云久 +const base_url = "http://192.168.10.104:8765/app/";///詹云久 +const baseUrl = "http://192.168.10.104:8765/app/";///詹云久 // const base_url = "http://192.168.10.37:8766/app/"; @@ -190,7 +190,7 @@ abstract class MinApiService { ///小程序下单 @POST("order/placeOrderFirst") - Future> placeOrderFirst(@Body() Map param); + Future> placeOrderFirst(@Body() Map param); ///小程序下单加菜 @POST("order/addOrder") diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index f668fdb7..1bf8987c 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8765/app/'; + baseUrl ??= 'http://192.168.10.104:8765/app/'; } final Dio _dio; @@ -269,7 +269,7 @@ class _MinApiService implements MinApiService { } @override - Future> placeOrderFirst(param) async { + Future> placeOrderFirst(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; @@ -284,9 +284,9 @@ class _MinApiService implements MinApiService { extra: _extra, baseUrl: baseUrl), data: _data); - final value = BaseData.fromJson( + final value = BaseData.fromJson( _result.data, - (json) => DownOrder.fromJson(json), + (json) => json, ); return value; } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 512e5b77..75ea9102 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -65,15 +65,15 @@ part 'retrofit_api.g.dart'; // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -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:8766/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; -// const base_url = "http://192.168.10.139:8766/app/";///詹云久 -// const baseUrl = "http://192.168.10.139:8766/app/";///詹云久 +const base_url = "http://192.168.10.104:8766/app/";///詹云久 +const baseUrl = "http://192.168.10.104:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 52368cde..5cfa3725 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; + baseUrl ??= 'http://192.168.10.104:8766/app/'; } final Dio _dio; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index f6e6ea94..cc23c99a 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -413,20 +413,17 @@ class _Settlement extends State { if (tableId == 0) { ///正常的商店下单 - BaseData baseData = await minService + BaseData baseData = await minService .placeOrderFirst(placeOrderFirst.toJson()) .catchError((error) { print("error: $error"); }); if (baseData != null && baseData.isSuccess) { placeOrder = true; - this.downOrder = baseData.data; + this.downOrder = DownOrder.fromJson(baseData.data); querySettlement(); } else { - baseData?.isSuccess ?? false - ? SmartDialog.showToast("下单失败:订单实付金额不能为0", - alignment: Alignment.center) - : SmartDialog.showToast(baseData?.msg ?? "", + SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); } } else { diff --git a/lib/store/shopping/shopping_cart/shopping_cart_page.dart b/lib/store/shopping/shopping_cart/shopping_cart_page.dart index 300ba066..25f8997b 100644 --- a/lib/store/shopping/shopping_cart/shopping_cart_page.dart +++ b/lib/store/shopping/shopping_cart/shopping_cart_page.dart @@ -1,7 +1,6 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -323,7 +322,7 @@ class _ShoppingCartPage extends State height: 32.h, margin: EdgeInsets.only(left: 6.w), decoration: BoxDecoration( - color: isAllSelect ? Color(0xFFFB312B) :Color(0xFFE5E5E5), + color:Color(0xFFFB312B), borderRadius: BorderRadius.circular(16), boxShadow: [ BoxShadow( diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 19dbd3a6..657c2eef 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -30,7 +30,7 @@ class _StoreInfoView extends State { top: 5.h, bottom: 6.h, ), - height: 154.h, + height: 162.h, padding: EdgeInsets.all(12.w), decoration: BoxDecoration( color: Colors.white,