Browse Source

Merge branch 'dev' into wr_2023_business

# Conflicts:
#	lib/store/store_view/store_info.dart
wr_2023_business
wurong 1 year ago
parent
commit
b14979eaba
  1. 6
      ios/Runner.xcodeproj/project.pbxproj
  2. 2
      lib/generated/intl/messages_en.dart
  3. 2
      lib/generated/intl/messages_zh_CN.dart
  4. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  5. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  6. 2
      lib/generated/intl/messages_zh_TW.dart
  7. 4
      lib/generated/l10n.dart
  8. 2
      lib/l10n/intl_en.arb
  9. 2
      lib/l10n/intl_zh_CN.arb
  10. 2
      lib/l10n/intl_zh_Hans_CN.arb
  11. 2
      lib/l10n/intl_zh_Hant_CN.arb
  12. 2
      lib/l10n/intl_zh_TW.arb
  13. 2
      lib/main.dart
  14. 45
      lib/order/exchange_history_page.dart
  15. 8
      lib/order/exchange_order_page.dart
  16. 221
      lib/order/store_selector_page.dart
  17. 3
      lib/retrofit/data/exchange_order.dart
  18. 9
      lib/retrofit/data/min_order_info.dart
  19. 4
      lib/retrofit/retrofit_api.dart
  20. 26
      lib/retrofit/retrofit_api.g.dart
  21. 23
      lib/setting/about_page.dart
  22. 17
      lib/settlement/settlement.dart
  23. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart
  24. 54
      lib/store/store_view/store_info.dart
  25. 1
      lib/union/union_page.dart

6
ios/Runner.xcodeproj/project.pbxproj

@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.17; MARKETING_VERSION = 3.2.18;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.17; MARKETING_VERSION = 3.2.18;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu", "$(PROJECT_DIR)/Runner/baidu",
); );
MARKETING_VERSION = 3.2.17; MARKETING_VERSION = 3.2.18;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",

2
lib/generated/intl/messages_en.dart

@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary {
"duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"),
"duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"),
"duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"),
"duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"),
"duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"),
"duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"),
"duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"),

2
lib/generated/intl/messages_zh_CN.dart

@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary {
"duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"),
"duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"),
"duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"),
"duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"),
"duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"),
"duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"),
"duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary {
"duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"),
"duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"),
"duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"),
"duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"),
"duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"),
"duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"),
"duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -217,7 +217,7 @@ class MessageLookup extends MessageLookupByLibrary {
"duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"),
"duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"),
"duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"),
"duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"),
"duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"),
"duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"),
"duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"),

2
lib/generated/intl/messages_zh_TW.dart

@ -219,7 +219,7 @@ class MessageLookup extends MessageLookupByLibrary {
"duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"),
"duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"),
"duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"),
"duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"),
"duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"),
"duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"),
"duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"),

4
lib/generated/l10n.dart

@ -1965,10 +1965,10 @@ class S {
); );
} }
/// `` /// ``
String get duihuanhouwugegongzuori { String get duihuanhouwugegongzuori {
return Intl.message( return Intl.message(
'兑换后五个工作日可前往门店', '兑换后五个工作日可前往门店',
name: 'duihuanhouwugegongzuori', name: 'duihuanhouwugegongzuori',
desc: '', desc: '',
args: [], args: [],

2
lib/l10n/intl_en.arb

@ -192,7 +192,7 @@
"lingqufangshi": "领取方式", "lingqufangshi": "领取方式",
"ziti": "自提", "ziti": "自提",
"qingxuanzhemendian": "请选择门店", "qingxuanzhemendian": "请选择门店",
"duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店",
"duihuanshangpinxiangqing": "兑换商品详情", "duihuanshangpinxiangqing": "兑换商品详情",
"querenduihuan": "确认兑换", "querenduihuan": "确认兑换",
"yiwanchengdingdan": "已完成订单", "yiwanchengdingdan": "已完成订单",

2
lib/l10n/intl_zh_CN.arb

@ -192,7 +192,7 @@
"lingqufangshi": "领取方式", "lingqufangshi": "领取方式",
"ziti": "自提", "ziti": "自提",
"qingxuanzhemendian": "请选择门店", "qingxuanzhemendian": "请选择门店",
"duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店",
"duihuanshangpinxiangqing": "兑换商品详情", "duihuanshangpinxiangqing": "兑换商品详情",
"querenduihuan": "确认兑换", "querenduihuan": "确认兑换",
"yiwanchengdingdan": "已完成订单", "yiwanchengdingdan": "已完成订单",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -192,7 +192,7 @@
"lingqufangshi": "领取方式", "lingqufangshi": "领取方式",
"ziti": "自提", "ziti": "自提",
"qingxuanzhemendian": "请选择门店", "qingxuanzhemendian": "请选择门店",
"duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店",
"duihuanshangpinxiangqing": "兑换商品详情", "duihuanshangpinxiangqing": "兑换商品详情",
"querenduihuan": "确认兑换", "querenduihuan": "确认兑换",
"yiwanchengdingdan": "已完成订单", "yiwanchengdingdan": "已完成订单",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -194,7 +194,7 @@
"lingqufangshi": "领取方式", "lingqufangshi": "领取方式",
"ziti": "自提", "ziti": "自提",
"qingxuanzhemendian": "请选择门店", "qingxuanzhemendian": "请选择门店",
"duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店",
"duihuanshangpinxiangqing": "兑换商品详情", "duihuanshangpinxiangqing": "兑换商品详情",
"querenduihuan": "确认兑换", "querenduihuan": "确认兑换",
"yiwanchengdingdan": "已完成订单", "yiwanchengdingdan": "已完成订单",

2
lib/l10n/intl_zh_TW.arb

@ -194,7 +194,7 @@
"lingqufangshi": "领取方式", "lingqufangshi": "领取方式",
"ziti": "自提", "ziti": "自提",
"qingxuanzhemendian": "请选择门店", "qingxuanzhemendian": "请选择门店",
"duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店",
"duihuanshangpinxiangqing": "兑换商品详情", "duihuanshangpinxiangqing": "兑换商品详情",
"querenduihuan": "确认兑换", "querenduihuan": "确认兑换",
"yiwanchengdingdan": "已完成订单", "yiwanchengdingdan": "已完成订单",

2
lib/main.dart

@ -347,7 +347,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/edit_name': (context, {arguments}) => EditName(arguments: arguments), '/router/edit_name': (context, {arguments}) => EditName(arguments: arguments),
'/router/edit_signature': (context, {arguments}) => EditSignature(arguments: arguments), '/router/edit_signature': (context, {arguments}) => EditSignature(arguments: arguments),
'/router/mine_card_invalid': (context, {arguments}) => MineCardInvalidPage(), '/router/mine_card_invalid': (context, {arguments}) => MineCardInvalidPage(),
'/router/store_selector_page': (context, {arguments}) => StoreSelectorPage(), '/router/store_selector_page': (context, {arguments}) => StoreSelectorPage(arguments: arguments,),
'/router/web_page': (context, {arguments}) => WebPage(arguments: arguments), '/router/web_page': (context, {arguments}) => WebPage(arguments: arguments),
'/router/web_turntable_activity': (context, {arguments}) => WebTurntableActivity(), '/router/web_turntable_activity': (context, {arguments}) => WebTurntableActivity(),
'/router/help_feedback_page': (context, {arguments}) => HelpFeedbackPage(), '/router/help_feedback_page': (context, {arguments}) => HelpFeedbackPage(),

45
lib/order/exchange_history_page.dart

@ -251,7 +251,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
S.of(context).chuangjianshijian(exchangeOrder.createTime), "创建时间 : ${exchangeOrder.createTime}",
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -260,7 +260,10 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
), ),
Text( Text(
exchangeOrder.payStatus != 1 ? "未支付": exchangeOrder.payStatus != 1 ? "未支付":
orderStatus(exchangeOrder.state), ((exchangeOrder.useTyped ==1)?((exchangeOrder.sendStatus==3 || exchangeOrder.sendStatus == 9)?"已自提":"待提货")
:(exchangeOrder.useTyped == 2 ?((exchangeOrder.sendStatus==1)?"待发货"
:"已发货")
:orderStatus(exchangeOrder.state))),
style: TextStyle( style: TextStyle(
color: Color(0xFFFE951E), color: Color(0xFFFE951E),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -276,6 +279,36 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
Container( Container(
child: Column( child: Column(
children: [ children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"自提门店" + " :",
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
SizedBox(
width: 8.w,
),
Expanded(
child: Text(
exchangeOrder.storeName ?? "",
style: TextStyle(
color: Colors.black,
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
)
],
),
SizedBox(
height: 8.h,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -479,6 +512,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
if(exchangeOrder.useTyped != 3) if(exchangeOrder.useTyped != 3)
(exchangeOrder.useTyped == 1 ? (exchangeOrder.useTyped == 1 ?
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
// if (exchangeOrder.state == 1) { // if (exchangeOrder.state == 1) {
// receive2Card(exchangeOrder.id); // receive2Card(exchangeOrder.id);
@ -495,6 +529,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
child: buildBtnStatus(exchangeOrder.state), child: buildBtnStatus(exchangeOrder.state),
): ):
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
setState(() { setState(() {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@ -508,7 +543,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
}); });
}); });
}, },
child: buildBtnStatusTow(exchangeOrder.state), child: buildBtnStatusTow(exchangeOrder.sendStatus),
)) ))
], ],
) )
@ -525,7 +560,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
} }
Widget buildBtnStatus(state) { Widget buildBtnStatus(state) {
if (state == 1) { if (state ==1) {
return RoundButton( return RoundButton(
padding: EdgeInsets.fromLTRB(8, 4, 8, 4), padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
text: S.of(context).chakanhexiaoma, text: S.of(context).chakanhexiaoma,
@ -548,7 +583,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
} }
Widget buildBtnStatusTow(state) { Widget buildBtnStatusTow(state) {
if (state == 1) { if (state == 2) {
return RoundButton( return RoundButton(
padding: EdgeInsets.fromLTRB(8, 4, 8, 4), padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
text: S.of(context).chakanwuliu, text: S.of(context).chakanwuliu,

8
lib/order/exchange_order_page.dart

@ -199,7 +199,9 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
child: Row( child: Row(
children: [ children: [
Text( Text(
S.of(context).zitidizhi, widget.arguments[
"useTyped"] ==
1?S.of(context).zitidizhi:"收货地址",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
@ -266,7 +268,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
Visibility( Visibility(
visible: widget.arguments["useTyped"] != 3, visible: widget.arguments["useTyped"] != 3,
child: Text( child: Text(
S.of(context).zitishijian, widget.arguments["useTyped"] == 1?S.of(context).zitishijian:"发货时间",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535)), color: Color(0xFF353535)),
@ -1134,7 +1136,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
toAddressPicker() async { toAddressPicker() async {
if (widget.arguments["useTyped"] == 1) { if (widget.arguments["useTyped"] == 1) {
dynamic result = dynamic result =
await Navigator.of(context).pushNamed('/router/store_selector_page'); await Navigator.of(context).pushNamed('/router/store_selector_page',arguments: {"creditGoodsId":widget.arguments["goodsId"]});
if (result == null) return; if (result == null) return;
storeId = result["id"]; storeId = result["id"];
address = result["address"]; address = result["address"];

221
lib/order/store_selector_page.dart

@ -21,7 +21,14 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../view_widget/no_data_view.dart';
class StoreSelectorPage extends StatefulWidget { class StoreSelectorPage extends StatefulWidget {
final Map<String, dynamic> arguments;
///
StoreSelectorPage({this.arguments});
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _StoreSelectorPage(); return _StoreSelectorPage();
@ -30,194 +37,32 @@ class StoreSelectorPage extends StatefulWidget {
class _StoreSelectorPage extends State<StoreSelectorPage> { class _StoreSelectorPage extends State<StoreSelectorPage> {
ApiService apiService; ApiService apiService;
List<Store> exchangeStoreList;
LocationFlutterPlugin aMapFlutterLocation;
@override
void dispose() {
super.dispose();
aMapFlutterLocation.stopLocation();
}
@override @override
void initState() { void initState() {
super.initState(); super.initState();
exchangeShop(widget.arguments["creditGoodsId"]);
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(),
showLoading: true,
context: context, token: value.getString('token'));
});
if (aMapFlutterLocation == null) {
aMapFlutterLocation = LocationFlutterPlugin();
}
aMapFlutterLocation.singleLocationCallback(callback: (BaiduLocation result) {
if (result != null &&
result.latitude != null &&
result.longitude != null) {
print("location: $result");
aMapFlutterLocation.stopLocation();
latLng = BMFCoordinate(result.latitude, result.longitude);
BMFCalculateUtils.coordConvert(
coordinate: latLng,
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL)
.then((value) {
this.latLng = value;
saveLatLng(
value, result.province, result.city, result.district);
queryStore("${value.latitude}", "${value.longitude}",
result.province, result.city, result.district);
});
}
});
aMapFlutterLocation.prepareLoc({
"coorType": "bd09ll",
"isNeedAddres": false,
"isNeedAltitude": false,
"isNeedLocationPoiList": false,
"isNeedLocationDescribe": false,
"isNeedNewVersionRgc": false,
"scanspan": 0,
"openGps": true,
"locationMode": 2,
}, {
"locationMode": "kCLLocationAccuracyBest",
"locationTimeout": 10,
"reGeocodeTimeout": 10,
"activityType": "CLActivityTypeAutomotiveNavigation",
"BMKLocationCoordinateType": "BMKLocationCoordinateTypeBMK09LL",
"isNeedNewVersionRgc": false,
});
startLocation();
}
saveLatLng(BMFCoordinate latLng, province, city, district) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString("latitude", "${latLng.latitude}");
await prefs.setString("longitude", "${latLng.longitude}");
await prefs.setString("province", province ?? "");
await prefs.setString("city", city ?? "");
await prefs.setString("district", district ?? "");
} }
List<Store> storeList; ///
BMFCoordinate latLng; exchangeShop(creditGoodsId) async {
if (apiService == null) {
startLocation() async { SharedPreferences value = await SharedPreferences.getInstance();
if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) { apiService = ApiService(
enableLocation(); Dio(),
return;
}
if (await Permission.location.isPermanentlyDenied) {
requestDialog();
} else if (await Permission.location.isGranted) {
EasyLoading.show(status: S.of(context).zhengzaijiazai);
aMapFlutterLocation.startLocation();
Future.delayed(Duration(seconds: 6), () {
EasyLoading.dismiss();
});
} else if (await Permission.location.isUndetermined) {
await Permission.location.request();
} else {
if (Platform.isIOS) {
//
requestDialog();
} else {
await Permission.location.request();
}
}
}
enableLocation() {
showCupertinoDialog(
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_permission_location_bg.webp",
S.of(context).nindingweigongnengweikaiqi,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).dakaidingwei,
(result) async {
if (result) {
final AndroidIntent intent = AndroidIntent(
action: 'action_location_source_settings',
package: "com.zsw.huixiang");
await intent.launch();
// startLocation();
}
},
heightRatioWithWidth: 0.82,
);
},
);
}
requestDialog() {
showCupertinoDialog(
context: context, context: context,
builder: (context) { showLoading: true,
return RequestPermission( token: value.getString("token"),
"assets/image/icon_permission_location_bg.webp", );
S.of(context).nindingweiquanxianweiyunxu, }
S.of(context).weilexiangnintuijianfujindemendianxinxi, BaseData<List<Store>> baseData = await apiService
S.of(context).kaiqiquanxian, .storeListByCreditId(creditGoodsId)
(result) async { .catchError((error) {});
if (result) {
await openAppSettings();
if (await Permission.location.isGranted) {
startLocation();
}
}
},
heightRatioWithWidth: 0.82,
);
});
}
getLatLng() async {
SharedPreferences.getInstance().then(
(value) => {
if (value.containsKey("latitude") &&
value.containsKey("longitude") &&
value.containsKey("province") &&
value.containsKey("city") &&
value.containsKey("district"))
{
latLng = BMFCoordinate(double.tryParse(value.getString("latitude")),
double.tryParse(value.getString("longitude"))),
queryStore(
value.getString("latitude"),
value.getString("longitude"),
value.getString("province"),
value.getString("city"),
value.getString("district"),
),
}
else
{
queryStore("", "", "", "", ""),
}
},
);
}
queryStore(latitude, longitude, province, city, district) async {
BaseData<List<Store>> baseData = await apiService.queryStore({
"city": "",
"district": "",
"latitude": latitude,
"longitude": longitude,
"province": "",
"searchKey": ""
});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
storeList = baseData.data; setState((){
if (mounted) setState(() {}); exchangeStoreList = baseData.data;
});
} }
} }
@ -236,8 +81,16 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: ListView.builder( child: (exchangeStoreList == null || exchangeStoreList.length == 0)
itemCount: storeList != null ? storeList.length : 0, ? NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
text: "当前暂无自提门店可选择",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
)
: ListView.builder(
itemCount: exchangeStoreList != null ? exchangeStoreList.length : 0,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return GestureDetector( return GestureDetector(
@ -246,7 +99,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
groupValue = position; groupValue = position;
}); });
}, },
child: buildStoreItem(storeList[position], position), child: buildStoreItem(exchangeStoreList[position], position),
); );
}), }),
), ),
@ -257,7 +110,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
alignment: Alignment.center); alignment: Alignment.center);
return; return;
} }
Store store = storeList[groupValue]; Store store = exchangeStoreList[groupValue];
Navigator.of(context).pop({ Navigator.of(context).pop({
"id": store.id, "id": store.id,
"address": store.address, "address": store.address,

3
lib/retrofit/data/exchange_order.dart

@ -17,6 +17,7 @@ class ExchangeOrder {
int payType; int payType;
int sendStatus; int sendStatus;
String address; String address;
String storeName;
String recAddress; String recAddress;
int state; int state;
int useTyped; int useTyped;
@ -38,6 +39,7 @@ class ExchangeOrder {
..payType = json['payType'] as int ..payType = json['payType'] as int
..sendStatus = json['sendStatus'] as int ..sendStatus = json['sendStatus'] as int
..address = json['address'] as String ..address = json['address'] as String
..storeName = json['storeName'] as String
..recAddress = json['recAddress'] as String ..recAddress = json['recAddress'] as String
..state = json['state'] as int ..state = json['state'] as int
..useTyped = json['useTyped'] as int ..useTyped = json['useTyped'] as int
@ -63,6 +65,7 @@ class ExchangeOrder {
'payType':this.payType, 'payType':this.payType,
'sendStatus': this.sendStatus, 'sendStatus': this.sendStatus,
'address': this.address, 'address': this.address,
'storeName': this.storeName,
'recAddress': this.recAddress, 'recAddress': this.recAddress,
'state': this.state, 'state': this.state,
'useTyped': this.useTyped, 'useTyped': this.useTyped,

9
lib/retrofit/data/min_order_info.dart

@ -66,8 +66,9 @@ class MinOrderInfo {
int orderSource, int orderSource,
dynamic address, dynamic address,
dynamic discountPercent, dynamic discountPercent,
String discountAmount, String discountAmount,
dynamic discountType, dynamic discountType,
dynamic uniqueDiscountType,
dynamic discountMoney, dynamic discountMoney,
dynamic overTime, dynamic overTime,
List<OrderProductVOList> orderProductVOList, List<OrderProductVOList> orderProductVOList,
@ -153,6 +154,7 @@ class MinOrderInfo {
this.discountPercent = discountPercent; this.discountPercent = discountPercent;
this.discountAmount = discountAmount; this.discountAmount = discountAmount;
this.discountType = discountType; this.discountType = discountType;
this.uniqueDiscountType = uniqueDiscountType;
this.discountMoney = discountMoney; this.discountMoney = discountMoney;
this.overTime = overTime; this.overTime = overTime;
this.orderProductVOList = orderProductVOList; this.orderProductVOList = orderProductVOList;
@ -241,6 +243,7 @@ class MinOrderInfo {
this.discountPercent = json['discountPercent']; this.discountPercent = json['discountPercent'];
this.discountAmount = json['discountAmount']; this.discountAmount = json['discountAmount'];
this.discountType = json['discountType']; this.discountType = json['discountType'];
this.uniqueDiscountType = json['uniqueDiscountType'];
this.discountMoney = json['discountMoney']; this.discountMoney = json['discountMoney'];
this.overTime = json['overTime']; this.overTime = json['overTime'];
if (json['orderProductVOList'] != null) { if (json['orderProductVOList'] != null) {
@ -332,6 +335,7 @@ class MinOrderInfo {
dynamic discountPercent; dynamic discountPercent;
String discountAmount; String discountAmount;
dynamic discountType; dynamic discountType;
dynamic uniqueDiscountType;
dynamic discountMoney; dynamic discountMoney;
dynamic overTime; dynamic overTime;
List<OrderProductVOList> orderProductVOList; List<OrderProductVOList> orderProductVOList;
@ -420,6 +424,7 @@ class MinOrderInfo {
map['discountPercent'] = this.discountPercent; map['discountPercent'] = this.discountPercent;
map['discountAmount'] = this.discountAmount; map['discountAmount'] = this.discountAmount;
map['discountType'] = this.discountType; map['discountType'] = this.discountType;
map['uniqueDiscountType'] = this.uniqueDiscountType;
map['discountMoney'] = this.discountMoney; map['discountMoney'] = this.discountMoney;
map['overTime'] = this.overTime; map['overTime'] = this.overTime;
if (this.orderProductVOList != null) { if (this.orderProductVOList != null) {

4
lib/retrofit/retrofit_api.dart

@ -561,4 +561,8 @@ abstract class ApiService {
///- ///-
@GET("/auth/sendVerify/{mobile}") @GET("/auth/sendVerify/{mobile}")
Future<BaseData> changeSendVerify(@Path("mobile") String mobile); Future<BaseData> changeSendVerify(@Path("mobile") String mobile);
///
@GET("/store/storeListByCreditId/{creditGoodsId}")
Future<BaseData<List<Store>>> storeListByCreditId(@Path("creditGoodsId") String creditGoodsId);
} }

26
lib/retrofit/retrofit_api.g.dart

@ -2183,7 +2183,7 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>(
'/auth/sendVerify//$mobile', '/auth/sendVerify/$mobile',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -2197,4 +2197,28 @@ class _ApiService implements ApiService {
); );
return value; return value;
} }
@override
Future<BaseData<List<Store>>> storeListByCreditId(creditGoodsId) async {
ArgumentError.checkNotNull(creditGoodsId, 'creditGoodsId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/store/storeListByCreditId/$creditGoodsId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<Store>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<Store>(
(i) => Store.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
} }

23
lib/setting/about_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/update_dialog.dart'; import 'package:huixiang/view_widget/update_dialog.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info/package_info.dart';
import 'package:url_launcher/url_launcher.dart';
class AboutPage extends StatefulWidget { class AboutPage extends StatefulWidget {
@override @override
@ -80,9 +81,14 @@ class _AboutPage extends State<AboutPage> {
SizedBox( SizedBox(
height: 20.h, height: 20.h,
), ),
settingItem( GestureDetector(
S.of(context).dangqianbanben, onTap: (){
S.of(context).banben(version), // updateApp();
},
child:settingItem(
S.of(context).dangqianbanben,
S.of(context).banben(version),
)
), ),
// textItem(S.of(context).tebieshengming), // textItem(S.of(context).tebieshengming),
InkWell( InkWell(
@ -171,6 +177,17 @@ class _AboutPage extends State<AboutPage> {
); );
} }
updateApp() async {
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 {
throw 'Could not launch $url';
}
}
Widget settingSingleItem(right) { Widget settingSingleItem(right) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 0, 16, 0), margin: EdgeInsets.fromLTRB(16, 0, 16, 0),

17
lib/settlement/settlement.dart

@ -197,7 +197,7 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(!placeOrder) ? "NONE" : "AUTO", "AUTO",
// useVipPriceSelect, // useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1, count1,
@ -608,8 +608,7 @@ class _Settlement extends State<Settlement> {
// : widget.arguments["cid"] ?? ""; // : widget.arguments["cid"] ?? "";
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; // placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect;
// placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; // placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect;
placeOrderFirst.promotionInfoDTO.discountType = placeOrderFirst.promotionInfoDTO.discountType = (!placeOrder) ? "AUTO" :settleOrderInfo?.discountType ?? "";
settleOrderInfo?.discountType ?? "";
placeOrderFirst.recMobile = placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; (mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -1529,13 +1528,13 @@ class _Settlement extends State<Settlement> {
selectedBtn != 2) selectedBtn != 2)
? diningStatus ? diningStatus
: selectedBtn, : selectedBtn,
couponBean?.id, ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean?.id,
0, 0,
productId ?? 0, ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0 ? "AUTO" : "COUPON", (couponBean?.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON",
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
@ -1569,13 +1568,13 @@ class _Settlement extends State<Settlement> {
selectedBtn != 2) selectedBtn != 2)
? diningStatus ? diningStatus
: selectedBtn, : selectedBtn,
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0,
0, 0,
0, (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro?.id ?? 0) ?? productId),
(pro?.id ?? 0) ?? productId,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0 ? "AUTO" : "ACTIVITY", (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"),
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,

2
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -633,7 +633,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
String discountPrice() { String discountPrice() {
if (widget.minOrderInfo != null) { if (widget.minOrderInfo != null) {
return AppUtils.calculateDouble( return AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")+double.tryParse(widget.minOrderInfo?.couponSubPrice ?? "0")); double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0"));
} else if (widget.tableId < 0) { } else if (widget.tableId < 0) {
return "0"; return "0";
} else { } else {

54
lib/store/store_view/store_info.dart

@ -164,23 +164,8 @@ class _StoreInfoView extends State<StoreInfoView> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(
child: Text(
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}",
maxLines: 2,
textAlign: TextAlign.justify,
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
),
SizedBox(
width: 8.w,
),
GestureDetector( GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/location_map', '/router/location_map',
@ -192,22 +177,49 @@ class _StoreInfoView extends State<StoreInfoView> {
); );
}, },
child:Container( child:Container(
padding:EdgeInsets.only(left: 8.w,right: 8.w) , color: Colors.transparent,
padding:EdgeInsets.only(right: 8.w) ,
child: Image.asset( child: Image.asset(
"assets/image/icon_union_location.webp", "assets/image/icon_union_location.webp",
width: 24.w, width: 20,
height: 24.h, height: 20,
), ),
), ),
), ),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/location_map',
arguments: {
"lat": widget.storeInfo.latitude,
"lng": widget.storeInfo.longitude,
"storeName": widget.storeInfo.storeName,
},
);
},
child: Text(
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}",
maxLines: 2,
textAlign: TextAlign.justify,
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
),
),
if((widget?.storeInfo?.tel ?? "") != "") if((widget?.storeInfo?.tel ?? "") != "")
GestureDetector( GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
showCallMobile(); showCallMobile();
}, },
child: Container( child: Container(
padding:EdgeInsets.only(left: 8.w) , padding:EdgeInsets.only(left: 16.w,right: 8.w) ,
child: Image.asset( child: Image.asset(
"assets/image/icon_union_call.webp", "assets/image/icon_union_call.webp",
width: 24, width: 24,

1
lib/union/union_page.dart

@ -256,6 +256,7 @@ class UnionPageState extends State<UnionPage>
: ((tabController.index == 2 && index == -1) || index == 2 : ((tabController.index == 2 && index == -1) || index == 2
? "DRINKSTORE" ? "DRINKSTORE"
: "HAPPYSTORE")), : "HAPPYSTORE")),
"exchange":false,
}).catchError((error) { }).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center); alignment: Alignment.center);

Loading…
Cancel
Save