Browse Source

购物车接口+storeId请求

new_revision_app
wurong 2 years ago
parent
commit
cf0dafb64d
  1. 3
      lib/community/release_dynamic.dart
  2. 3
      lib/main.dart
  3. 4
      lib/retrofit/min_api.dart
  4. 5
      lib/retrofit/min_api.g.dart
  5. 2
      lib/store/shop_details_page.dart
  6. 2
      lib/store/store_order.dart
  7. 37
      lib/utils/video_edit.dart

3
lib/community/release_dynamic.dart

@ -225,8 +225,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
child: Text("视频"),
onPressed: () {
getImageOrVideo(GalleryMode.video);
// Navigator.of(context).pop();
Navigator.of(context).popAndPushNamed('/router/video_edit');
Navigator.of(context).pop();
},
isDefaultAction: true,
isDestructiveAction: false,

3
lib/main.dart

@ -73,7 +73,6 @@ import 'package:huixiang/store/store_view/product_meals_sku.dart';
import 'package:huixiang/test_page.dart';
import 'package:huixiang/union/location_map_page.dart';
import 'package:huixiang/utils/ImgCachePath.dart';
import 'package:huixiang/utils/video_edit.dart';
import 'package:huixiang/vip/user_vip_service_page.dart';
import 'package:huixiang/web/web_page.dart';
@ -428,8 +427,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
VipPayCode(),
'/router/system_notice': (context, {arguments}) =>
SystemNotice(),
'/router/video_edit': (context, {arguments}) =>
VideoEdit(),
'/router/store_html': (context, {arguments}) =>
StoreHtml(arguments:arguments),
};

4
lib/retrofit/min_api.dart

@ -150,8 +150,8 @@ abstract class MinApiService {
Future<BaseData<List<ShoppingCart>>> getShoppingCart(@Query("tableId") int tableId);
///
@GET("shoppingcart/delCart")
Future<BaseData<bool>> clearShoppingCart();
@GET("shoppingcart/delCart?storeId={storeId}")
Future<BaseData<bool>> clearShoppingCart(@Query("storeId") String storeId);
///
@PUT("shoppingcart")

5
lib/retrofit/min_api.g.dart

@ -131,12 +131,13 @@ class _MinApiService implements MinApiService {
}
@override
Future<BaseData<bool>> clearShoppingCart() async {
Future<BaseData<bool>> clearShoppingCart(storeId) async {
ArgumentError.checkNotNull(storeId, 'storeId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'shoppingcart/delCart',
'shoppingcart/delCart?storeId=$storeId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',

2
lib/store/shop_details_page.dart

@ -302,7 +302,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
///
clearShopCar() async {
BaseData<bool> baseData = await minService.clearShoppingCart();
BaseData<bool> baseData = await minService.clearShoppingCart(storeId);
if (baseData.isSuccess) {
shopCarGoods = null;
setState(() {});

2
lib/store/store_order.dart

@ -727,7 +727,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
///
clearShopCar() async {
BaseData<bool> baseData = await minService.clearShoppingCart();
BaseData<bool> baseData = await minService.clearShoppingCart(storeId);
if (baseData.isSuccess) {
shopCarGoods = null;
setState(() {});

37
lib/utils/video_edit.dart

@ -1,37 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
class VideoEdit extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _VideoEdit();
}
}
class _VideoEdit extends State<VideoEdit> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: MyAppBar(
title:"视频编辑",
titleColor: Colors.black,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
),
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,
child:Text("hdjhcd"
)),
);
}
}
Loading…
Cancel
Save