Browse Source

部分增加更改

dart3_last
w-R 2 years ago
parent
commit
f15de1e85b
  1. BIN
      assets/image/2x/lv_bi.webp
  2. BIN
      assets/image/3x/lv_bi.webp
  3. BIN
      assets/image/lv_bi.webp
  4. 3
      lib/main.dart
  5. 10
      lib/order/order_view/order_info.dart
  6. 38
      lib/order/order_view/order_pay_selected.dart
  7. 405
      lib/retrofit/data/miNiDetail.dart
  8. 49
      lib/settlement/settlement_view/pay_method.dart
  9. 15
      lib/store/store_order.dart
  10. 1190
      lib/store/store_view/product_meals_sku.dart
  11. 6
      lib/store/store_view/shop_goods.dart
  12. 2
      lib/view_widget/update_dialog.dart

BIN
assets/image/2x/lv_bi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

BIN
assets/image/3x/lv_bi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/lv_bi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

3
lib/main.dart

@ -70,6 +70,7 @@ import 'package:huixiang/store/shopping/shopping_mall_home.dart';
import 'package:huixiang/setting/user_service_page.dart';
import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/settlement/settlement.dart';
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';
@ -403,4 +404,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
PlatformPayCodeSuccess(arguments:arguments),
'/router/phone_address_page': (context, {arguments}) =>
PhoneAddressPage(),
'/router/product_meals_sku': (context, {arguments}) =>
ProductMealsSku(arguments:arguments),
};

10
lib/order/order_view/order_info.dart

@ -74,15 +74,9 @@ class _OrderInfoView extends State<OrderInfoView> {
case 4:
return "平台会员余额支付";
case 5:
return "美团买单";
return "回乡绿币支付";
case 6:
return "饿了么支付";
case 7:
return "扫呗支付";
case 8:
return "微生活";
case 9:
return "银联支付";
return "活动余额支付";
}
return S.of(context).yue;
}

38
lib/order/order_view/order_pay_selected.dart

@ -118,9 +118,41 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
GestureDetector(
onTap: () {
// Navigator.of(context).pop(1);
// Navigator.of(context).pop(3);
setState(() {
checkIndex = 3;
payIndex = 5;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset("assets/image/lv_bi.webp"),
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
S.of(context).lvbiyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
fontWeight: MyFontWeight.semi_bold,
),
),
),),
checkView(3),
],
),
),
SizedBox(
height: 10,
),
GestureDetector(
onTap: () {
// Navigator.of(context).pop(1);
setState(() {
checkIndex = 4;
payIndex = 1;
});
},
@ -140,7 +172,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
),
),),
checkView(3),
checkView(4),
],
),
),
@ -175,7 +207,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
);
}
var checkIndex = 3;
var checkIndex = 4;
int payIndex = 1;
Widget checkView(var index) {

405
lib/retrofit/data/miNiDetail.dart

@ -242,6 +242,7 @@ class ProductSkuVOListBean {
dynamic version;
dynamic skuAttrCodeDTOList;
List<SkuAttrListBean> skuAttrList;
List<ProductSetMeals> productSetMeals;
dynamic setMealDTOList;
static ProductSkuVOListBean fromJson(Map<String, dynamic> map) {
@ -272,6 +273,9 @@ class ProductSkuVOListBean {
productSkuVOListBean.skuAttrList = []..addAll(
(map['skuAttrList'] as List ?? []).map((o) => SkuAttrListBean.fromJson(o))
);
productSkuVOListBean.productSetMeals = []..addAll(
(map['productSetMeals'] as List ?? []).map((o) => ProductSetMeals.fromJson(o))
);
productSkuVOListBean.setMealDTOList = map['setMealDTOList'];
return productSkuVOListBean;
}
@ -357,6 +361,407 @@ class SkuAttrListBean {
};
}
/// groupName : "酒水选1"
/// totalNumber : 4
/// optionalNumber : 1
/// productInfoList : [{"productId":"1372091668961951744","productName":"白云边12年300ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/34cbd11d-402c-4278-b1e3-8d1d780a8ee5.jpg","allSku":true,"skuInfoList":[{"id":"1372091669003894784","skuName":"","productSkuAttrList":[{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372091668978728960","attrName":"","attrValueList":[{"attrId":"1372091668987117568","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372091974143705088","productName":"白云边9年250ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/333c5280-fe1f-4294-a334-0cf11b0ab7a6.jpg","allSku":true,"skuInfoList":[{"id":"1372091974194036736","skuName":"","productSkuAttrList":[{"id":"1372091974202425344","createTime":"2021-03-17 15:46:34","createUser":"1311123845502992384","updateTime":"2021-03-17 15:46:34","updateUser":"1311123845502992384","skuId":"1372091974194036736","attrId":"1372091974164676608","attrValueId":"1372091974173065216","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372091974164676608","attrName":"","attrValueList":[{"attrId":"1372091974173065216","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372092276561412096","productName":"毛铺紫荞酒500ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/b8869284-ccb8-4c97-8ba7-88a140ac4b08.jpg","allSku":true,"skuInfoList":[{"id":"1372092276607549440","skuName":"","productSkuAttrList":[{"id":"1372092276615938048","createTime":"2021-03-17 15:47:46","createUser":"1311123845502992384","updateTime":"2021-03-17 15:47:46","updateUser":"1311123845502992384","skuId":"1372092276607549440","attrId":"1372092276582383616","attrValueId":"1372092276594966528","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372092276582383616","attrName":"","attrValueList":[{"attrId":"1372092276594966528","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372092499190874112","productName":"毛铺苦荞酒500ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/f5a64d71-9b20-43d3-b992-89a5a270895b.jpg","allSku":true,"skuInfoList":[{"id":"1372092499237011456","skuName":"","productSkuAttrList":[{"id":"1372092499249594368","createTime":"2021-03-17 15:48:39","createUser":"1311123845502992384","updateTime":"2021-03-17 15:48:39","updateUser":"1311123845502992384","skuId":"1372092499237011456","attrId":"1372092499211845632","attrValueId":"1372092499224428544","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372092499211845632","attrName":"","attrValueList":[{"attrId":"1372092499224428544","attrName":"","attrValueList":null}]}],"number":1}]
class ProductSetMeals {
ProductSetMeals({
String groupName,
int totalNumber,
int optionalNumber,
List<ProductInfoList> productInfoList,}){
_groupName = groupName;
_totalNumber = totalNumber;
_optionalNumber = optionalNumber;
_productInfoList = productInfoList;
}
ProductSetMeals.fromJson(dynamic json) {
_groupName = json['groupName'];
_totalNumber = json['totalNumber'];
_optionalNumber = json['optionalNumber'];
if (json['productInfoList'] != null) {
_productInfoList = [];
json['productInfoList'].forEach((v) {
_productInfoList.add(ProductInfoList.fromJson(v));
});
}
}
String _groupName;
int _totalNumber;
int _optionalNumber;
List<ProductInfoList> _productInfoList;
ProductSetMeals copyWith({ String groupName,
int totalNumber,
int optionalNumber,
List<ProductInfoList> productInfoList,
}) => ProductSetMeals( groupName: groupName ?? _groupName,
totalNumber: totalNumber ?? _totalNumber,
optionalNumber: optionalNumber ?? _optionalNumber,
productInfoList: productInfoList ?? _productInfoList,
);
String get groupName => _groupName;
int get totalNumber => _totalNumber;
int get optionalNumber => _optionalNumber;
List<ProductInfoList> get productInfoList => _productInfoList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['groupName'] = _groupName;
map['totalNumber'] = _totalNumber;
map['optionalNumber'] = _optionalNumber;
if (_productInfoList != null) {
map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// productId : "1372091668961951744"
/// productName : "白云边12年300ml"
/// productImg : "https://pos.upload.gznl.top/MDAwMA==/2021/03/34cbd11d-402c-4278-b1e3-8d1d780a8ee5.jpg"
/// allSku : true
/// skuInfoList : [{"id":"1372091669003894784","skuName":"","productSkuAttrList":[{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}]}]
/// productAttrInfoList : [{"attrId":"1372091668978728960","attrName":"","attrValueList":[{"attrId":"1372091668987117568","attrName":"","attrValueList":null}]}]
/// number : 1
class ProductInfoList {
ProductInfoList({
String productId,
String productName,
String productImg,
bool allSku,
List<SkuInfoList> skuInfoList,
List<ProductAttrInfoList> productAttrInfoList,
int number,}){
_productId = productId;
_productName = productName;
_productImg = productImg;
_allSku = allSku;
_skuInfoList = skuInfoList;
_productAttrInfoList = productAttrInfoList;
_number = number;
}
ProductInfoList.fromJson(dynamic json) {
_productId = json['productId'];
_productName = json['productName'];
_productImg = json['productImg'];
_allSku = json['allSku'];
if (json['skuInfoList'] != null) {
_skuInfoList = [];
json['skuInfoList'].forEach((v) {
_skuInfoList.add(SkuInfoList.fromJson(v));
});
}
if (json['productAttrInfoList'] != null) {
_productAttrInfoList = [];
json['productAttrInfoList'].forEach((v) {
_productAttrInfoList.add(ProductAttrInfoList.fromJson(v));
});
}
_number = json['number'];
}
String _productId;
String _productName;
String _productImg;
bool _allSku;
List<SkuInfoList> _skuInfoList;
List<ProductAttrInfoList> _productAttrInfoList;
int _number;
ProductInfoList copyWith({ String productId,
String productName,
String productImg,
bool allSku,
List<SkuInfoList> skuInfoList,
List<ProductAttrInfoList> productAttrInfoList,
int number,
}) => ProductInfoList( productId: productId ?? _productId,
productName: productName ?? _productName,
productImg: productImg ?? _productImg,
allSku: allSku ?? _allSku,
skuInfoList: skuInfoList ?? _skuInfoList,
productAttrInfoList: productAttrInfoList ?? _productAttrInfoList,
number: number ?? _number,
);
String get productId => _productId;
String get productName => _productName;
String get productImg => _productImg;
bool get allSku => _allSku;
List<SkuInfoList> get skuInfoList => _skuInfoList;
List<ProductAttrInfoList> get productAttrInfoList => _productAttrInfoList;
int get number => _number;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['productId'] = _productId;
map['productName'] = _productName;
map['productImg'] = _productImg;
map['allSku'] = _allSku;
if (_skuInfoList != null) {
map['skuInfoList'] = _skuInfoList.map((v) => v.toJson()).toList();
}
if (_productAttrInfoList != null) {
map['productAttrInfoList'] = _productAttrInfoList.map((v) => v.toJson()).toList();
}
map['number'] = _number;
return map;
}
}
/// attrId : "1372091668978728960"
/// attrName : ""
/// attrValueList : [{"attrId":"1372091668987117568","attrName":"","attrValueList":null}]
class ProductAttrInfoList {
ProductAttrInfoList({
String attrId,
String attrName,
List<AttrValueList> attrValueList,}){
_attrId = attrId;
_attrName = attrName;
_attrValueList = attrValueList;
}
ProductAttrInfoList.fromJson(dynamic json) {
_attrId = json['attrId'];
_attrName = json['attrName'];
if (json['attrValueList'] != null) {
_attrValueList = [];
json['attrValueList'].forEach((v) {
_attrValueList.add(AttrValueList.fromJson(v));
});
}
}
String _attrId;
String _attrName;
List<AttrValueList> _attrValueList;
ProductAttrInfoList copyWith({ String attrId,
String attrName,
List<AttrValueList> attrValueList,
}) => ProductAttrInfoList( attrId: attrId ?? _attrId,
attrName: attrName ?? _attrName,
attrValueList: attrValueList ?? _attrValueList,
);
String get attrId => _attrId;
String get attrName => _attrName;
List<AttrValueList> get attrValueList => _attrValueList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['attrId'] = _attrId;
map['attrName'] = _attrName;
if (_attrValueList != null) {
map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// attrId : "1372091668987117568"
/// attrName : ""
/// attrValueList : null
class AttrValueList {
AttrValueList({
String attrId,
String attrName,
dynamic attrValueList,}){
_attrId = attrId;
_attrName = attrName;
_attrValueList = attrValueList;
}
AttrValueList.fromJson(dynamic json) {
_attrId = json['attrId'];
_attrName = json['attrName'];
_attrValueList = json['attrValueList'];
}
String _attrId;
String _attrName;
dynamic _attrValueList;
AttrValueList copyWith({ String attrId,
String attrName,
dynamic attrValueList,
}) => AttrValueList( attrId: attrId ?? _attrId,
attrName: attrName ?? _attrName,
attrValueList: attrValueList ?? _attrValueList,
);
String get attrId => _attrId;
String get attrName => _attrName;
dynamic get attrValueList => _attrValueList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['attrId'] = _attrId;
map['attrName'] = _attrName;
map['attrValueList'] = _attrValueList;
return map;
}
}
/// id : "1372091669003894784"
/// skuName : ""
/// productSkuAttrList : [{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}]
class SkuInfoList {
SkuInfoList({
String id,
String skuName,
List<ProductSkuAttrList> productSkuAttrList,}){
_id = id;
_skuName = skuName;
_productSkuAttrList = productSkuAttrList;
}
SkuInfoList.fromJson(dynamic json) {
_id = json['id'];
_skuName = json['skuName'];
if (json['productSkuAttrList'] != null) {
_productSkuAttrList = [];
json['productSkuAttrList'].forEach((v) {
_productSkuAttrList.add(ProductSkuAttrList.fromJson(v));
});
}
}
String _id;
String _skuName;
List<ProductSkuAttrList> _productSkuAttrList;
SkuInfoList copyWith({ String id,
String skuName,
List<ProductSkuAttrList> productSkuAttrList,
}) => SkuInfoList( id: id ?? _id,
skuName: skuName ?? _skuName,
productSkuAttrList: productSkuAttrList ?? _productSkuAttrList,
);
String get id => _id;
String get skuName => _skuName;
List<ProductSkuAttrList> get productSkuAttrList => _productSkuAttrList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['skuName'] = _skuName;
if (_productSkuAttrList != null) {
map['productSkuAttrList'] = _productSkuAttrList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// id : "1372091669012283392"
/// createTime : "2021-03-17 15:45:21"
/// createUser : "1311123845502992384"
/// updateTime : "2021-03-17 15:45:21"
/// updateUser : "1311123845502992384"
/// skuId : "1372091669003894784"
/// attrId : "1372091668978728960"
/// attrValueId : "1372091668987117568"
/// sortOrder : null
/// isDelete : 0
class ProductSkuAttrList {
ProductSkuAttrList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String skuId,
String attrId,
String attrValueId,
dynamic sortOrder,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_skuId = skuId;
_attrId = attrId;
_attrValueId = attrValueId;
_sortOrder = sortOrder;
_isDelete = isDelete;
}
ProductSkuAttrList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_skuId = json['skuId'];
_attrId = json['attrId'];
_attrValueId = json['attrValueId'];
_sortOrder = json['sortOrder'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _skuId;
String _attrId;
String _attrValueId;
dynamic _sortOrder;
int _isDelete;
ProductSkuAttrList copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String skuId,
String attrId,
String attrValueId,
dynamic sortOrder,
int isDelete,
}) => ProductSkuAttrList( id: id ?? _id,
createTime: createTime ?? _createTime,
createUser: createUser ?? _createUser,
updateTime: updateTime ?? _updateTime,
updateUser: updateUser ?? _updateUser,
skuId: skuId ?? _skuId,
attrId: attrId ?? _attrId,
attrValueId: attrValueId ?? _attrValueId,
sortOrder: sortOrder ?? _sortOrder,
isDelete: isDelete ?? _isDelete,
);
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get skuId => _skuId;
String get attrId => _attrId;
String get attrValueId => _attrValueId;
dynamic get sortOrder => _sortOrder;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['skuId'] = _skuId;
map['attrId'] = _attrId;
map['attrValueId'] = _attrValueId;
map['sortOrder'] = _sortOrder;
map['isDelete'] = _isDelete;
return map;
}
}
/// productId : "1433994980233314304"
/// attrName : "<EFBFBD><EFBFBD>"
/// sortOrder : null

49
lib/settlement/settlement_view/pay_method.dart

@ -19,6 +19,7 @@ class PayMethod extends StatefulWidget {
class _PayMethod extends State<PayMethod> {
String money = "0";
String balance = "0";
String mGreenMoney = "0";
@override
void initState() {
@ -29,6 +30,7 @@ class _PayMethod extends State<PayMethod> {
jsonDecode(value.getString("minMember"));
balance = memberInfo["balance"];
money = memberInfo["money"];
mGreenMoney = memberInfo["greenMoney"];
setState(() {});
});
}
@ -157,10 +159,53 @@ class _PayMethod extends State<PayMethod> {
SizedBox(
height: 10,
),
if(mGreenMoney!="0.00")
GestureDetector(
onTap: () {
setState(() {
checkIndex = 3;
});
widget.payChannelCheck(5);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
checkView(3),
Expanded(
child: Container(),
flex: 1,
),
Text(
"¥$mGreenMoney",
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(
width: 10,
),
Text(
S.of(context).lvbiyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
),
if(mGreenMoney!="0.00")
SizedBox(
height: 10,
),
GestureDetector(
onTap: () {
setState(() {
checkIndex = 4;
widget.payChannelCheck(1);
});
},
@ -168,7 +213,7 @@ class _PayMethod extends State<PayMethod> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
checkView(3),
checkView(4),
Spacer(),
Image.asset("assets/image/icon_we_chat.webp"),
Padding(
@ -190,7 +235,7 @@ class _PayMethod extends State<PayMethod> {
);
}
var checkIndex = 3;
var checkIndex = 4;
Widget checkView(var index) {
return Container(

15
lib/store/store_order.dart

@ -209,7 +209,17 @@ class _StoreOrderPage extends State<StoreOrderPage>
@override
Widget build(BuildContext context) {
return Container(
return WillPopScope(
onWillPop: () async {
if (dialogShowing) {
debugPrint("ssssasdadsasdadasd");
SmartDialog.dismiss();
return false;
} else {
return true;
}
},
child:Container(
color: Colors.white,
child: Stack(
children: [
@ -444,7 +454,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
child:
),*/
),
// if(count() != 0)
Positioned(
bottom: 30,
left: 0,
@ -547,7 +556,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
),
],
));
)));
}
///

1190
lib/store/store_view/product_meals_sku.dart

File diff suppressed because it is too large Load Diff

6
lib/store/store_view/shop_goods.dart

@ -237,8 +237,12 @@ class _ShopGoods extends State<ShopGoods> {
(widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector(
onTap: () {
widget.add(widget.shoppingCartSkuItemListBean);
Navigator.of(context)
.pushNamed('/router/product_meals_sku', arguments: {
"id":widget.productListBean.id,
"storeId":widget.productListBean.storeId
});
},
child: Image.asset(
"assets/image/add.webp",

2
lib/view_widget/update_dialog.dart

@ -149,7 +149,7 @@ class _UpdateDialog extends State<UpdateDialog> {
}
updateApp() async {
String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixaing?release_id=";
String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixiang?release_id=";
if (await canLaunch(url)) {
await launch(url);
} else {

Loading…
Cancel
Save