Browse Source

更改

ff_new
w-R 3 years ago
parent
commit
2a7cbdd44e
  1. 2
      lib/order/order_view/order_address.dart
  2. 2
      lib/qr/qr_share_image.dart
  3. 8
      lib/retrofit/data/min_order_info.dart
  4. 8
      lib/retrofit/min_api.dart
  5. 2
      lib/retrofit/min_api.g.dart
  6. 13
      lib/retrofit/retrofit_api.dart
  7. 8
      lib/retrofit/retrofit_api.g.dart
  8. 5
      lib/settlement/settlement.dart
  9. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart

2
lib/order/order_view/order_address.dart

@ -87,7 +87,7 @@ class _OrderAddress extends State<OrderAddress> {
), ),
), ),
SizedBox( SizedBox(
width: 12.w, width:7.w,
), ),
Expanded( Expanded(
child: Text( child: Text(

2
lib/qr/qr_share_image.dart

@ -136,7 +136,7 @@ class _QrShareImagePage extends State<QrShareImagePage> {
margin: EdgeInsets.only(left: 16.w, right: 24.w), margin: EdgeInsets.only(left: 16.w, right: 24.w),
child: Text( child: Text(
// S.of(context).saomashibieguanzhugongzonghao, // S.of(context).saomashibieguanzhugongzonghao,
S.of(context).beiyaoqingdejiangli, S.of(context).fenxiangyaoqingma,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Color(0xFF2E3552), color: Color(0xFF2E3552),

8
lib/retrofit/data/min_order_info.dart

@ -63,7 +63,7 @@ class MinOrderInfo {
int orderSource, int orderSource,
dynamic address, dynamic address,
dynamic discountPercent, dynamic discountPercent,
dynamic discountAmount, String discountAmount,
dynamic discountType, dynamic discountType,
dynamic discountMoney, dynamic discountMoney,
dynamic overTime, dynamic overTime,
@ -315,7 +315,7 @@ class MinOrderInfo {
int orderSource; int orderSource;
dynamic address; dynamic address;
dynamic discountPercent; dynamic discountPercent;
dynamic discountAmount; String discountAmount;
dynamic discountType; dynamic discountType;
dynamic discountMoney; dynamic discountMoney;
dynamic overTime; dynamic overTime;
@ -452,7 +452,7 @@ class OrderInfoVo {
String postAge, String postAge,
String price, String price,
String orderSum, String orderSum,
dynamic discountAmount, String discountAmount,
dynamic promotionInfoList, dynamic promotionInfoList,
dynamic couponList, dynamic couponList,
String threshold, String threshold,
@ -495,7 +495,7 @@ class OrderInfoVo {
String postAge; String postAge;
String price; String price;
String orderSum; String orderSum;
dynamic discountAmount; String discountAmount;
dynamic promotionInfoList; dynamic promotionInfoList;
dynamic couponList; dynamic couponList;
String threshold; String threshold;

8
lib/retrofit/min_api.dart

@ -21,15 +21,15 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
const base_url = "https://pos.api.lotus-wallet.com/app/"; /// // const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.api.lotus-wallet.com/app/"; /// // const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "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 base_url = "http://192.168.10.236:8765/app/";///
// const baseUrl = "http://192.168.10.236:8765/app/";/// const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.88:8765/app/";/// // const base_url = "http://192.168.10.88:8765/app/";///

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'https://pos.api.lotus-wallet.com/app/'; baseUrl ??= 'http://192.168.10.236:8765/app/';
} }
final Dio _dio; final Dio _dio;

13
lib/retrofit/retrofit_api.dart

@ -56,17 +56,14 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// // const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// // const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "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 base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; /// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.159:8766/app/"; ///
// const baseUrl = "http://192.168.10.159:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
@ -388,7 +385,7 @@ abstract class ApiService {
/// ///
@GET("/order/cancel/{id}") @GET("/order/cancel/{id}")
Future<BaseData<bool>> orderCancel(@Path("id") String id); Future<BaseData<dynamic>> orderCancel(@Path("id") String id);
/// ///
@POST("/order/settlement") @POST("/order/settlement")

8
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; baseUrl ??= 'http://192.168.10.236:8766/app/';
} }
final Dio _dio; final Dio _dio;
@ -1189,7 +1189,7 @@ class _ApiService implements ApiService {
} }
@override @override
Future<BaseData<bool>> orderCancel(id) async { Future<BaseData<dynamic>> orderCancel(id) async {
ArgumentError.checkNotNull(id, 'id'); ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
@ -1203,9 +1203,9 @@ class _ApiService implements ApiService {
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
final value = BaseData<bool>.fromJson( final value = BaseData<dynamic>.fromJson(
_result.data, _result.data,
(json) => json as bool, (json) => json as dynamic,
); );
return value; return value;
} }

5
lib/settlement/settlement.dart

@ -152,6 +152,8 @@ class _Settlement extends State<Settlement> {
setState(() { setState(() {
minOrderInfo = baseData.data; minOrderInfo = baseData.data;
}); });
}else{
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -282,7 +284,8 @@ class _Settlement extends State<Settlement> {
this.downOrder = baseData.data; this.downOrder = baseData.data;
querySettlement(); querySettlement();
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); SmartDialog.showToast("下单失败:订单实付金额不能为0", alignment: Alignment.center);
// SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} else { } else {
/// ///

2
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -383,7 +383,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
String discountPrice(){ String discountPrice(){
if(widget.minOrderInfo != null){ if(widget.minOrderInfo != null){
return (widget.minOrderInfo.discountAmount ?? "0") + double.parse(widget.settleOrderInfo.benefitDiscountAmount ?? "0"); return (widget.minOrderInfo.discountAmount ?? "0") + (widget.settleOrderInfo.benefitDiscountAmount ?? "0");
}else if(widget.tableId < 0){ }else if(widget.tableId < 0){
return "0"; return "0";
}else { }else {

Loading…
Cancel
Save