Browse Source

兑换历史:

更改自提,配送状态:自提:待取货-已自提;
                配送:待发货-已发货;
新增自提门店显示;
自提,配送都有各自跳转的核销码,查看物流按钮,字段类型判断错误导致没显示,已更改配送-显示查看物流按钮,自提暂未更改(产品方面表示暂时不要);【主要更改字段sendStatus】
兑换历史实体类新增,门店名字字段;
兑换订单确认页面,更改配送时的文本显示(收货地址,发货时间);
兑换订单确认页面,自提,选择门店更改,该门店选择列表,不再使用店铺列表接口,改使用,新接口:兑换店铺列表(/store/storeListByCreditId/{creditGoodsId});
订单结算页的更改,火锅已优惠显示:原总优惠+优惠券优惠,现在改成,只显示总优惠字段的优惠即可!
店铺列表接口,传参数时多传exchange(兑换)字段,如果是兑换商品门店列表选择时,该字段传true,普通门店列表使用时传:false
new_revision_app
wurong 2 years ago
parent
commit
12c6256261
  1. 2
      lib/generated/intl/messages_en.dart
  2. 2
      lib/generated/intl/messages_zh_CN.dart
  3. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  5. 2
      lib/generated/intl/messages_zh_TW.dart
  6. 4
      lib/generated/l10n.dart
  7. 2
      lib/l10n/intl_en.arb
  8. 2
      lib/l10n/intl_zh_CN.arb
  9. 2
      lib/l10n/intl_zh_Hans_CN.arb
  10. 2
      lib/l10n/intl_zh_Hant_CN.arb
  11. 2
      lib/l10n/intl_zh_TW.arb
  12. 2
      lib/main.dart
  13. 43
      lib/order/exchange_history_page.dart
  14. 8
      lib/order/exchange_order_page.dart
  15. 217
      lib/order/store_selector_page.dart
  16. 3
      lib/retrofit/data/exchange_order.dart
  17. 4
      lib/retrofit/retrofit_api.dart
  18. 26
      lib/retrofit/retrofit_api.g.dart
  19. 19
      lib/setting/about_page.dart
  20. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart
  21. 1
      lib/union/union_page.dart

2
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("兑换历史"),

2
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("兑换历史"),

2
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("兑换历史"),

2
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("兌換歷史"),

2
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("兌換歷史"),

4
lib/generated/l10n.dart

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

2
lib/l10n/intl_en.arb

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

2
lib/l10n/intl_zh_CN.arb

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

2
lib/l10n/intl_zh_Hans_CN.arb

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

2
lib/l10n/intl_zh_Hant_CN.arb

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

2
lib/l10n/intl_zh_TW.arb

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

2
lib/main.dart

@ -325,7 +325,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/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(),

43
lib/order/exchange_history_page.dart

@ -251,7 +251,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
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<ExchangeHistoryList>
),
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<ExchangeHistoryList>
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<ExchangeHistoryList>
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<ExchangeHistoryList>
child: buildBtnStatus(exchangeOrder.state),
):
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
Navigator.of(context).pushNamed(
@ -508,7 +543,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
});
});
},
child: buildBtnStatusTow(exchangeOrder.state),
child: buildBtnStatusTow(exchangeOrder.sendStatus),
))
],
)
@ -548,7 +583,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
}
Widget buildBtnStatusTow(state) {
if (state == 1) {
if (state == 2) {
return RoundButton(
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
text: S.of(context).chakanwuliu,

8
lib/order/exchange_order_page.dart

@ -199,7 +199,9 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
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<ExchangeOrderPage> {
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<ExchangeOrderPage> {
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"];

217
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<String, dynamic> arguments;
///
StoreSelectorPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _StoreSelectorPage();
@ -30,194 +37,32 @@ class StoreSelectorPage extends StatefulWidget {
class _StoreSelectorPage extends State<StoreSelectorPage> {
ApiService apiService;
LocationFlutterPlugin aMapFlutterLocation;
@override
void dispose() {
super.dispose();
aMapFlutterLocation.stopLocation();
}
List<Store> 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 ?? "");
}
List<Store> 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,
);
},
);
exchangeShop(widget.arguments["creditGoodsId"]);
}
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("", "", "", "", ""),
}
},
showLoading: true,
token: value.getString("token"),
);
}
queryStore(latitude, longitude, province, city, district) async {
BaseData<List<Store>> baseData = await apiService.queryStore({
"city": "",
"district": "",
"latitude": latitude,
"longitude": longitude,
"province": "",
"searchKey": ""
});
BaseData<List<Store>> 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<StoreSelectorPage> {
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<StoreSelectorPage> {
groupValue = position;
});
},
child: buildStoreItem(storeList[position], position),
child: buildStoreItem(exchangeStoreList[position], position),
);
}),
),
@ -257,7 +110,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
alignment: Alignment.center);
return;
}
Store store = storeList[groupValue];
Store store = exchangeStoreList[groupValue];
Navigator.of(context).pop({
"id": store.id,
"address": store.address,

3
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,

4
lib/retrofit/retrofit_api.dart

@ -561,4 +561,8 @@ abstract class ApiService {
///-
@GET("/auth/sendVerify/{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 _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/sendVerify//$mobile',
'/auth/sendVerify/$mobile',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -2197,4 +2197,28 @@ class _ApiService implements ApiService {
);
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;
}
}

19
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<AboutPage> {
SizedBox(
height: 20.h,
),
settingItem(
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<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) {
return Container(
margin: EdgeInsets.fromLTRB(16, 0, 16, 0),

2
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -633,7 +633,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
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 {

1
lib/union/union_page.dart

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

Loading…
Cancel
Save