diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 7d2968d0..a8f1f3e9 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary { "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), + "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 4c5a3f81..013804a2 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary { "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), + "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 18dd5d2c..57dd765c 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -221,7 +221,7 @@ class MessageLookup extends MessageLookupByLibrary { "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), + "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 4d9a3ac2..45688e01 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -217,7 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), + "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index ab37c6d0..7a7bab93 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -219,7 +219,7 @@ class MessageLookup extends MessageLookupByLibrary { "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日可前往门店"), + "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index c670ed50..1f610b1e 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1965,10 +1965,10 @@ class S { ); } - /// `兑换后五个工作日可前往门店` + /// `兑换后五个工作日内可前往门店` String get duihuanhouwugegongzuori { return Intl.message( - '兑换后五个工作日可前往门店', + '兑换后五个工作日内可前往门店', name: 'duihuanhouwugegongzuori', desc: '', args: [], diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index a76bd403..5cd89e23 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -192,7 +192,7 @@ "lingqufangshi": "领取方式", "ziti": "自提", "qingxuanzhemendian": "请选择门店", - "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", + "duihuanhouwugegongzuori": "兑换后五个工作日内可前往门店", "duihuanshangpinxiangqing": "兑换商品详情", "querenduihuan": "确认兑换", "yiwanchengdingdan": "已完成订单", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index e512dfa7..a106020b 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -192,7 +192,7 @@ "lingqufangshi": "领取方式", "ziti": "自提", "qingxuanzhemendian": "请选择门店", - "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", + "duihuanhouwugegongzuori": "兑换后五个工作日内可前往门店", "duihuanshangpinxiangqing": "兑换商品详情", "querenduihuan": "确认兑换", "yiwanchengdingdan": "已完成订单", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index a044111d..a5068c4a 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -192,7 +192,7 @@ "lingqufangshi": "领取方式", "ziti": "自提", "qingxuanzhemendian": "请选择门店", - "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", + "duihuanhouwugegongzuori": "兑换后五个工作日内可前往门店", "duihuanshangpinxiangqing": "兑换商品详情", "querenduihuan": "确认兑换", "yiwanchengdingdan": "已完成订单", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index de7201af..75d2921a 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -194,7 +194,7 @@ "lingqufangshi": "领取方式", "ziti": "自提", "qingxuanzhemendian": "请选择门店", - "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", + "duihuanhouwugegongzuori": "兑换后五个工作日内可前往门店", "duihuanshangpinxiangqing": "兑换商品详情", "querenduihuan": "确认兑换", "yiwanchengdingdan": "已完成订单", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 658a8398..07916c48 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -194,7 +194,7 @@ "lingqufangshi": "领取方式", "ziti": "自提", "qingxuanzhemendian": "请选择门店", - "duihuanhouwugegongzuori": "兑换后五个工作日可前往门店", + "duihuanhouwugegongzuori": "兑换后五个工作日内可前往门店", "duihuanshangpinxiangqing": "兑换商品详情", "querenduihuan": "确认兑换", "yiwanchengdingdan": "已完成订单", diff --git a/lib/main.dart b/lib/main.dart index ad3481b1..98ec30b6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -325,7 +325,7 @@ Map routers = { '/router/edit_name': (context, {arguments}) => EditName(arguments: arguments), '/router/edit_signature': (context, {arguments}) => EditSignature(arguments: arguments), '/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_turntable_activity': (context, {arguments}) => WebTurntableActivity(), '/router/help_feedback_page': (context, {arguments}) => HelpFeedbackPage(), diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index be41097f..7fbb4c3e 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -251,7 +251,7 @@ class _ExchangeHistoryList extends State crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - S.of(context).chuangjianshijian(exchangeOrder.createTime), + "创建时间 : ${exchangeOrder.createTime}", style: TextStyle( color: Colors.black, fontWeight: MyFontWeight.semi_bold, @@ -260,7 +260,10 @@ class _ExchangeHistoryList extends State ), Text( 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( color: Color(0xFFFE951E), fontWeight: MyFontWeight.semi_bold, @@ -276,6 +279,36 @@ class _ExchangeHistoryList extends State Container( child: Column( 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( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -479,6 +512,7 @@ class _ExchangeHistoryList extends State if(exchangeOrder.useTyped != 3) (exchangeOrder.useTyped == 1 ? GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { // if (exchangeOrder.state == 1) { // receive2Card(exchangeOrder.id); @@ -495,6 +529,7 @@ class _ExchangeHistoryList extends State child: buildBtnStatus(exchangeOrder.state), ): GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { setState(() { Navigator.of(context).pushNamed( @@ -508,7 +543,7 @@ class _ExchangeHistoryList extends State }); }); }, - child: buildBtnStatusTow(exchangeOrder.state), + child: buildBtnStatusTow(exchangeOrder.sendStatus), )) ], ) @@ -525,7 +560,7 @@ class _ExchangeHistoryList extends State } Widget buildBtnStatus(state) { - if (state == 1) { + if (state ==1) { return RoundButton( padding: EdgeInsets.fromLTRB(8, 4, 8, 4), text: S.of(context).chakanhexiaoma, @@ -548,7 +583,7 @@ class _ExchangeHistoryList extends State } Widget buildBtnStatusTow(state) { - if (state == 1) { + if (state == 2) { return RoundButton( padding: EdgeInsets.fromLTRB(8, 4, 8, 4), text: S.of(context).chakanwuliu, diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart index 57e635cc..1376c09b 100644 --- a/lib/order/exchange_order_page.dart +++ b/lib/order/exchange_order_page.dart @@ -199,7 +199,9 @@ class _ExchangeOrderPage extends State { child: Row( children: [ Text( - S.of(context).zitidizhi, + widget.arguments[ + "useTyped"] == + 1?S.of(context).zitidizhi:"收货地址", style: TextStyle( fontSize: 14.sp, color: Color(0xFF353535), @@ -266,7 +268,7 @@ class _ExchangeOrderPage extends State { Visibility( visible: widget.arguments["useTyped"] != 3, child: Text( - S.of(context).zitishijian, + widget.arguments["useTyped"] == 1?S.of(context).zitishijian:"发货时间", style: TextStyle( fontSize: 14.sp, color: Color(0xFF353535)), @@ -1134,7 +1136,7 @@ class _ExchangeOrderPage extends State { toAddressPicker() async { if (widget.arguments["useTyped"] == 1) { 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; storeId = result["id"]; address = result["address"]; diff --git a/lib/order/store_selector_page.dart b/lib/order/store_selector_page.dart index 6326bc42..e97c7aa6 100644 --- a/lib/order/store_selector_page.dart +++ b/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:flutter_screenutil/flutter_screenutil.dart'; +import '../view_widget/no_data_view.dart'; + class StoreSelectorPage extends StatefulWidget { + final Map arguments; + + ///兑换订单 + StoreSelectorPage({this.arguments}); + @override State createState() { return _StoreSelectorPage(); @@ -30,194 +37,32 @@ class StoreSelectorPage extends StatefulWidget { class _StoreSelectorPage extends State { ApiService apiService; - - LocationFlutterPlugin aMapFlutterLocation; - - @override - void dispose() { - super.dispose(); - aMapFlutterLocation.stopLocation(); - } + List exchangeStoreList; @override void initState() { super.initState(); - - 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 ?? ""); + exchangeShop(widget.arguments["creditGoodsId"]); } - List storeList; - BMFCoordinate latLng; - - startLocation() async { - if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) { - enableLocation(); - 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( + ///兑换门店列表 + exchangeShop(creditGoodsId) async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService( + Dio(), context: context, - builder: (context) { - return RequestPermission( - "assets/image/icon_permission_location_bg.webp", - S.of(context).nindingweiquanxianweiyunxu, - S.of(context).weilexiangnintuijianfujindemendianxinxi, - S.of(context).kaiqiquanxian, - (result) async { - 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> baseData = await apiService.queryStore({ - "city": "", - "district": "", - "latitude": latitude, - "longitude": longitude, - "province": "", - "searchKey": "" - }); + showLoading: true, + token: value.getString("token"), + ); + } + BaseData> baseData = await apiService + .storeListByCreditId(creditGoodsId) + .catchError((error) {}); if (baseData != null && baseData.isSuccess) { - storeList = baseData.data; - if (mounted) setState(() {}); + setState((){ + exchangeStoreList = baseData.data; + }); } } @@ -236,8 +81,16 @@ class _StoreSelectorPage extends State { child: Column( children: [ Expanded( - child: ListView.builder( - itemCount: storeList != null ? storeList.length : 0, + child: (exchangeStoreList == null || exchangeStoreList.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(), itemBuilder: (context, position) { return GestureDetector( @@ -246,7 +99,7 @@ class _StoreSelectorPage extends State { groupValue = position; }); }, - child: buildStoreItem(storeList[position], position), + child: buildStoreItem(exchangeStoreList[position], position), ); }), ), @@ -257,7 +110,7 @@ class _StoreSelectorPage extends State { alignment: Alignment.center); return; } - Store store = storeList[groupValue]; + Store store = exchangeStoreList[groupValue]; Navigator.of(context).pop({ "id": store.id, "address": store.address, diff --git a/lib/retrofit/data/exchange_order.dart b/lib/retrofit/data/exchange_order.dart index 64267fff..fb48bcb5 100644 --- a/lib/retrofit/data/exchange_order.dart +++ b/lib/retrofit/data/exchange_order.dart @@ -17,6 +17,7 @@ class ExchangeOrder { int payType; int sendStatus; String address; + String storeName; String recAddress; int state; int useTyped; @@ -38,6 +39,7 @@ class ExchangeOrder { ..payType = json['payType'] as int ..sendStatus = json['sendStatus'] as int ..address = json['address'] as String + ..storeName = json['storeName'] as String ..recAddress = json['recAddress'] as String ..state = json['state'] as int ..useTyped = json['useTyped'] as int @@ -63,6 +65,7 @@ class ExchangeOrder { 'payType':this.payType, 'sendStatus': this.sendStatus, 'address': this.address, + 'storeName': this.storeName, 'recAddress': this.recAddress, 'state': this.state, 'useTyped': this.useTyped, diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 78a38906..4beff7f6 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -561,4 +561,8 @@ abstract class ApiService { ///修改手机号-发送验证码 @GET("/auth/sendVerify/{mobile}") Future changeSendVerify(@Path("mobile") String mobile); + + ///兑换积分门店列表 + @GET("/store/storeListByCreditId/{creditGoodsId}") + Future>> storeListByCreditId(@Path("creditGoodsId") String creditGoodsId); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 4939dc2e..4f03eb6d 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2183,7 +2183,7 @@ class _ApiService implements ApiService { final queryParameters = {}; final _data = {}; final _result = await _dio.request>( - '/auth/sendVerify//$mobile', + '/auth/sendVerify/$mobile', queryParameters: queryParameters, options: RequestOptions( method: 'GET', @@ -2197,4 +2197,28 @@ class _ApiService implements ApiService { ); return value; } + + @override + Future>> storeListByCreditId(creditGoodsId) async { + ArgumentError.checkNotNull(creditGoodsId, 'creditGoodsId'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + '/store/storeListByCreditId/$creditGoodsId', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData>.fromJson( + _result.data, + (json) => (json as List) + .map( + (i) => Store.fromJson(i as Map)) + .toList()); + return value; + } } diff --git a/lib/setting/about_page.dart b/lib/setting/about_page.dart index 20514dcc..2c385a05 100644 --- a/lib/setting/about_page.dart +++ b/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/update_dialog.dart'; import 'package:package_info/package_info.dart'; +import 'package:url_launcher/url_launcher.dart'; class AboutPage extends StatefulWidget { @override @@ -80,9 +81,14 @@ class _AboutPage extends State { SizedBox( height: 20.h, ), - settingItem( - S.of(context).dangqianbanben, - S.of(context).banben(version), + GestureDetector( + onTap: (){ + // updateApp(); + }, + child:settingItem( + S.of(context).dangqianbanben, + S.of(context).banben(version), + ) ), // textItem(S.of(context).tebieshengming), InkWell( @@ -171,6 +177,17 @@ class _AboutPage extends State { ); } + 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) { return Container( margin: EdgeInsets.fromLTRB(16, 0, 16, 0), diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 0844707c..0fc396f7 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -633,7 +633,7 @@ class _SettlementOrderCommodity extends State { String discountPrice() { if (widget.minOrderInfo != null) { 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) { return "0"; } else { diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index f68ff1f4..19e69013 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -256,6 +256,7 @@ class UnionPageState extends State : ((tabController.index == 2 && index == -1) || index == 2 ? "DRINKSTORE" : "HAPPYSTORE")), + "exchange":false, }).catchError((error) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center);