Browse Source

物流等部分更新

null_safety
w-R 3 years ago
parent
commit
c6da4bb117
  1. 3
      lib/generated/intl/messages_en.dart
  2. 3
      lib/generated/intl/messages_zh_CN.dart
  3. 3
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 3
      lib/generated/intl/messages_zh_Hant_CN.dart
  5. 3
      lib/generated/intl/messages_zh_TW.dart
  6. 30
      lib/generated/l10n.dart
  7. 6
      lib/l10n/intl_en.arb
  8. 4
      lib/l10n/intl_zh_CN.arb
  9. 3
      lib/l10n/intl_zh_Hans_CN.arb
  10. 3
      lib/l10n/intl_zh_Hant_CN.arb
  11. 3
      lib/l10n/intl_zh_TW.arb
  12. 2
      lib/main.dart
  13. 240
      lib/order/logistics_information_page.dart
  14. 6
      lib/order/order_detail_page.dart
  15. 13
      lib/order/order_history_page.dart
  16. 55
      lib/retrofit/data/logistics.dart
  17. 12
      lib/retrofit/retrofit_api.dart
  18. 938
      lib/retrofit/retrofit_api.g.dart
  19. 19
      lib/union/store_details_page.dart
  20. 26
      lib/utils/status_utils.dart

3
lib/generated/intl/messages_en.dart

@ -323,6 +323,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"),
"qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"),
"qianshou" : MessageLookupByLibrary.simpleMessage("已签收"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"),
@ -451,6 +452,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
"weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
@ -538,6 +540,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yunfei" : MessageLookupByLibrary.simpleMessage("运费"),
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"),
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),

3
lib/generated/intl/messages_zh_CN.dart

@ -322,6 +322,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"),
"qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"),
"qianshou" : MessageLookupByLibrary.simpleMessage("已签收"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"),
@ -450,6 +451,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
"weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
@ -537,6 +539,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yunfei" : MessageLookupByLibrary.simpleMessage("运费"),
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"),
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),

3
lib/generated/intl/messages_zh_Hans_CN.dart

@ -322,6 +322,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"),
"qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"),
"qianshou" : MessageLookupByLibrary.simpleMessage("已签收"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"),
@ -450,6 +451,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
"weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
@ -537,6 +539,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yunfei" : MessageLookupByLibrary.simpleMessage("运费"),
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"),
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),

3
lib/generated/intl/messages_zh_Hant_CN.dart

@ -322,6 +322,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"),
"qiandaowancheng" : MessageLookupByLibrary.simpleMessage("簽到完成"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"),
"qianshou" : MessageLookupByLibrary.simpleMessage("已簽收"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"),
@ -450,6 +451,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"),
"wentijian" : MessageLookupByLibrary.simpleMessage("問題件"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"),
"weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"),
@ -537,6 +539,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yunfei" : MessageLookupByLibrary.simpleMessage("運費"),
"yuyan" : MessageLookupByLibrary.simpleMessage("語言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"),
"zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),

3
lib/generated/intl/messages_zh_TW.dart

@ -322,6 +322,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"),
"qiandaowancheng" : MessageLookupByLibrary.simpleMessage("簽到完成"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"),
"qianshou" : MessageLookupByLibrary.simpleMessage("已簽收"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"),
@ -450,6 +451,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"),
"wentijian" : MessageLookupByLibrary.simpleMessage("問題件"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"),
"weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"),
@ -537,6 +539,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yunfei" : MessageLookupByLibrary.simpleMessage("運費"),
"yuyan" : MessageLookupByLibrary.simpleMessage("語言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"),
"zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),

30
lib/generated/l10n.dart

@ -4695,6 +4695,36 @@ class S {
);
}
/// ``
String get zaituzhong {
return Intl.message(
'运输中',
name: 'zaituzhong',
desc: '',
args: [],
);
}
/// ``
String get qianshou {
return Intl.message(
'已签收',
name: 'qianshou',
desc: '',
args: [],
);
}
/// ``
String get wentijian {
return Intl.message(
'问题件',
name: 'wentijian',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

6
lib/l10n/intl_en.arb

@ -468,11 +468,10 @@
"qingshuruyouxiaoshoujihaoma": "请输入您的有效手机号",
"ruhelingquyouhuiquan": "如何领取优惠券?",
"ruhelingquyouhuiquan1": "点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~",
"ruhedihuanjifen":"如何兑换积分",
"ruhedihuanjifen": "如何兑换积分",
"ruhedihuanjifen1": "点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~",
"ruheqiandao": "如何签到?",
"ruheqiandao1": "1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。",
"youxiaoqixian": "有效期限:",
"changqiyouxiao": "长期有效",
"fasong": "发送",
@ -487,6 +486,9 @@
"ruxutuikuanqingyumendianlianxi": "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系",
"zhidianmendian": "致电门店",
"chakan": "查看",
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",

4
lib/l10n/intl_zh_CN.arb

@ -488,7 +488,9 @@
"ruxutuikuanqingyumendianlianxi": "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系",
"zhidianmendian": "致电门店",
"chakan": "查看",
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",

3
lib/l10n/intl_zh_Hans_CN.arb

@ -488,6 +488,9 @@
"ruxutuikuanqingyumendianlianxi": "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系",
"zhidianmendian": "致电门店",
"chakan": "查看",
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",

3
lib/l10n/intl_zh_Hant_CN.arb

@ -482,6 +482,9 @@
"ruxutuikuanqingyumendianlianxi": "如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫",
"zhidianmendian": "致電門店",
"chakan": "查看",
"zaituzhong": "運輸中",
"qianshou": "已簽收",
"wentijian": "問題件",
"privacy_policy4": "并使用本機號碼登錄"

3
lib/l10n/intl_zh_TW.arb

@ -480,6 +480,9 @@
"ruxutuikuanqingyumendianlianxi": "如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫",
"zhidianmendian": "致電門店",
"chakan": "查看",
"zaituzhong": "運輸中",
"qianshou": "已簽收",
"wentijian": "問題件",
"privacy_policy4": "并使用本機號碼登錄"

2
lib/main.dart

@ -267,7 +267,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
),
'/router/address_map_page': (context, {arguments}) => AddressMapPage(),
'/router/logistics_information_page': (context, {arguments}) =>
LogisticsInformationPage(),
LogisticsInformationPage(arguments: arguments),
'/router/hot_article_details_page': (context, {arguments}) =>
HotArticleDetailsPage(),
'/router/founder_story_page': (context, {arguments}) => FounderStoryPage(),

240
lib/order/logistics_information_page.dart

@ -1,10 +1,21 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/logistics.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LogisticsInformationPage extends StatefulWidget {
final arguments;
LogisticsInformationPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _LogisticsInformationPage();
@ -12,9 +23,43 @@ class LogisticsInformationPage extends StatefulWidget {
}
class _LogisticsInformationPage extends State<LogisticsInformationPage> {
ApiService apiService;
RefreshController _refreshController;
@override
void initState() {
super.initState();
_refreshController = RefreshController();
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), context: context, token: value.getString("token"));
getShippingTrace(widget.arguments["shipperCode"] ?? "",
widget.arguments["logisticsNum"] ?? "");
});
}
List<TracesBean> logistics = [];
String shipStatus = "";
getShippingTrace(String shipperCode, String logisticCode) async {
BaseData baseData = await apiService
.shippingTrace(shipperCode, logisticCode)
.catchError((error) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
Logistics lgs = Logistics.fromMap(baseData.data);
logistics.clear();
logistics.addAll(lgs.traces.reversed);
setState(() {
shipStatus = logisticsStatus(lgs.state);
if (logistics.length > 0) logistics[0].acceptStation += shipStatus;
_refreshController.refreshCompleted();
});
} else {
_refreshController.refreshFailed();
}
}
@override
@ -71,14 +116,20 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
),
SizedBox(
height: 500.h,
child: ListView.builder(
itemCount: 8,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return orderTrackItem(position);
},
),
child: (logistics != null && logistics.length > 0)
? ListView.builder(
itemCount:
logistics != null ? logistics.length : 0,
itemBuilder: (context, position) {
return orderTrackItem(logistics[position],
position, logistics.length);
})
: NoDataView(
isShowBtn: false,
text: "暂无物流信息~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120),
),
),
]),
),
@ -115,7 +166,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
alignment: Alignment.bottomCenter,
children: [
Image.network(
"https://t7.baidu.com/it/u=810585695,3039658333&fm=193&f=GIF",
widget.arguments["skuImg"] ?? "assets/image/default_1.png",
width: 95.w,
height: 95.h,
fit: BoxFit.cover,
@ -132,12 +183,35 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
),
color: Color(0x53000000),
),
child: Text(
S.of(context).gongjijian(3),
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: Colors.white,
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: S.of(context).gong,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
TextSpan(
text:
widget.arguments["productNum"].toString() ?? "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
TextSpan(
text: S.of(context).jian,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
],
),
),
),
@ -164,7 +238,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
fontWeight: FontWeight.w400),
),
Text(
S.of(context).yifahuo,
shipStatus,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
@ -185,7 +259,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
),
),
Text(
"圆通快递",
widget.arguments["logisticsName"] ?? "",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
@ -206,7 +280,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
fontWeight: FontWeight.w400),
),
Text(
"1234567890412",
widget.arguments["logisticsNum"] ?? "",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
@ -225,13 +299,17 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
);
}
Widget orderTrackItem(var position) {
Widget orderTrackItem(TracesBean logistics, var position, var size) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"11-27",
logistics.acceptTime.split(" ")[0],
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
@ -241,8 +319,11 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
height: 5.h,
),
Text(
"12:23",
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w500, color: Color(0xff868686)),
logistics.acceptTime.split(" ")[1],
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w500,
color: Color(0xff868686)),
),
],
),
@ -252,53 +333,98 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
Column(
children: [
Image.asset(
"assets/image/icon_sign.png",
tripStatus(logistics.acceptStation),
width: 24.w,
height: 24.h,
),
Container(
width: 1.w,
height: 30.h,
decoration: new BoxDecoration(
color: position < 7 ? Colors.black : Colors.white,
),
)
if (position != size - 1)
Container(
width: 1.w,
height: 75.h,
decoration: new BoxDecoration(
color: Color(0xffE1E1E1),
),
)
],
),
SizedBox(
width: 28.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).yiqianshou,
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.black),
),
SizedBox(
height: 10.h,
),
Row(
children: [
Text(
"快件已在泉州市签收",
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w400, color: Color(0xff353535)),
),
SizedBox(
width: 9.w,
),
Expanded(
flex: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (logisticsTripStatus(logistics.acceptStation) != "")
Text(
"签收人 张三",
style: TextStyle(fontSize: 12.sp, fontWeight: FontWeight.w400, color: Color(0xff353535)),
logisticsTripStatus(logistics.acceptStation),
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.black),
),
],
),
],
SizedBox(
height: 10.h,
),
Text(
logistics.acceptStation,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
color: Color(0xff353535)),
),
],
),
),
],
);
}
String logisticsStatus(state) {
String logisticsStatus = "";
switch (state) {
case 2:
logisticsStatus = "运输中";
break;
case 3:
logisticsStatus = "已签收";
break;
case 4:
logisticsStatus = "问题件";
break;
}
return logisticsStatus;
}
String tripStatus(String type) {
String tripStatus = "assets/image/icon_sign.png";
if (type.contains("已签收")) {
tripStatus = "assets/image/icon_sign.png";
} else if (type.contains("派送中")) {
tripStatus = "assets/image/icon_delivery.png";
} else if (type.contains("运输中") || type.contains("发往")) {
tripStatus = "assets/image/icon_transport.png";
} else if (type.contains("已发货") || type.contains("分配")) {
tripStatus = "assets/image/icon_deliver_goods.png";
} else if (type.contains("已下单")) {
tripStatus = "assets/image/icon_place_ order.png";
}
return tripStatus;
}
String logisticsTripStatus(String state) {
String logisticsTripStatus = "";
if (state.contains("已签收")) {
logisticsTripStatus = "已签收";
} else if (state.contains("派送中")) {
logisticsTripStatus = "派送中";
} else if (state.contains("运输中") || state.contains("发往")) {
logisticsTripStatus = "运输中";
} else if (state.contains("已发货") || state.contains("分配")) {
logisticsTripStatus = "已发货";
} else if (state.contains("已下单")) {
logisticsTripStatus = "已下单";
}
return logisticsTripStatus;
}
}

6
lib/order/order_detail_page.dart

@ -428,7 +428,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
Text(
S.of(context)
S
.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle(
fontSize: 20.sp,
@ -734,7 +735,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
S.of(context).zhidianmendian,
(open) {
if (open) {
String mobile = (orderInfo != null && orderInfo.storeVO != null)
String mobile = (orderInfo != null &&
orderInfo.storeVO != null)
? (orderInfo.storeVO.mobile ?? "")
: "";
if (mobile != "") {

13
lib/order/order_history_page.dart

@ -428,7 +428,14 @@ class _OrderHistoryList extends State<OrderHistoryList>
orderInfo.isTakeOut,
orderInfo.sendStatus,
orderInfo.refundStatus,
orderInfo.dayFlowCode)
orderInfo.dayFlowCode,
orderInfo.logisticsName,
orderInfo.logisticsNum,
orderInfo.shipperCode,
orderInfo.productList.length,
orderInfo.productList.length > 0
? orderInfo.productList[0].skuImg
: "")
: [],
),
],
@ -466,8 +473,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
children: [
MImage(
e.skuImg,
width: 75.w,
height: 75.h,
width: 75,
height: 75,
fit: BoxFit.contain,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",

55
lib/retrofit/data/logistics.dart

@ -0,0 +1,55 @@
/// logisticCode : ""
/// shipperCode : ""
/// state : 0
/// success : true
/// traces : [{"acceptStation":"","acceptTime":""}]
class Logistics {
String logisticCode;
String shipperCode;
int state;
bool success;
List<TracesBean> traces;
static Logistics fromMap(Map<String, dynamic> map) {
if (map == null) return null;
Logistics logisticsBean = Logistics();
logisticsBean.logisticCode = map['logisticCode'];
logisticsBean.shipperCode = map['shipperCode'];
logisticsBean.state = map['state'];
logisticsBean.success = map['success'];
logisticsBean.traces = List()..addAll(
(map['traces'] as List ?? []).map((o) => TracesBean.fromMap(o))
);
return logisticsBean;
}
Map toJson() => {
"logisticCode": logisticCode,
"shipperCode": shipperCode,
"state": state,
"success": success,
"traces": traces,
};
}
/// acceptStation : ""
/// acceptTime : ""
class TracesBean {
String acceptStation;
String acceptTime;
static TracesBean fromMap(Map<String, dynamic> map) {
if (map == null) return null;
TracesBean tracesBean = TracesBean();
tracesBean.acceptStation = map['acceptStation'];
tracesBean.acceptTime = map['acceptTime'];
return tracesBean;
}
Map toJson() => {
"acceptStation": acceptStation,
"acceptTime": acceptTime,
};
}

12
lib/retrofit/retrofit_api.dart

@ -14,11 +14,11 @@ import 'package:shared_preferences/shared_preferences.dart';
part 'retrofit_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/";
// const baseUrl = "http://192.168.10.236:8766/app/";
const base_url = "http://192.168.10.236:8766/app/";
const baseUrl = "http://192.168.10.236:8766/app/";
///
@ -320,4 +320,8 @@ abstract class ApiService {
@GET("/memberComment/delete/{id}")
Future<BaseData> delComment(@Path("id") String id);
///
@GET("/order/getShippingTrace/{shipperCode}/{logisticCode}")
Future<BaseData> shippingTrace(@Path("shipperCode") String shipperCode,@Path("logisticCode") String logisticCode);
}

938
lib/retrofit/retrofit_api.g.dart

@ -0,0 +1,938 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'retrofit_api.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
// baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
baseUrl ??= 'http://192.168.10.236:8766/app/';
}
final Dio _dio;
String baseUrl;
@override
Future<BaseData> upload(data, folderId) async {
ArgumentError.checkNotNull(data, 'data');
ArgumentError.checkNotNull(folderId, 'folderId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = FormData();
_data.files.add(MapEntry(
'file',
MultipartFile.fromFileSync(data.path,
filename: data.path.split(Platform.pathSeparator).last)));
if (folderId != null) {
_data.fields.add(MapEntry('folderId', folderId.toString()));
}
final _result = await _dio.request<Map<String, dynamic>>('/file/upload',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<dynamic> searchPoi(lat, lng, keywords, size, page) async {
ArgumentError.checkNotNull(lat, 'lat');
ArgumentError.checkNotNull(lng, 'lng');
ArgumentError.checkNotNull(keywords, 'keywords');
ArgumentError.checkNotNull(size, 'size');
ArgumentError.checkNotNull(page, 'page');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request(
'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = _result.data;
return value;
}
@override
Future<BaseData> memberLogin(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/platform/memberLogin',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> sendVerify(mobile) async {
ArgumentError.checkNotNull(mobile, 'mobile');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/sendVerify/$mobile',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditGoods(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditGoods/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> goodsCategory(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditGoodsCategory/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditGoodsById(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/creditGoods/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/info',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> editInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/member/editMemberInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> signInInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/member/signInInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> signIn() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/signIn',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> recharge(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/wallet/recharge',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> receiveCoupon(couponId) async {
ArgumentError.checkNotNull(couponId, 'couponId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/receive?couponId=$couponId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrder(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/create',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> addAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/add',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> deleteAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/delete',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryAddress(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/address/detail/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryMemberAddress() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/address/queryMemberAddress',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> updateAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/update',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryCoupon(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/centreList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryCard(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/packageList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryStore(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/store/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> informationList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/information/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> informationInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/information/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrderReceive(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/receive/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryHome() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/home/home',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryStoreInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/store/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryArticle(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/information/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryBanner(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/banner/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryHomeBrand() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/home/brand',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> minLogin(storeId) async {
ArgumentError.checkNotNull(storeId, 'storeId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/mini/login/$storeId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryBillInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/member/listBill',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> rankList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/rankList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> orderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/order/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> orderDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/order/orderDetail?id=$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> continuePay(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/order/continuePay',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> receiveToCard(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/receive/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> vipList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/vipList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> vipDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/member/vipDetail/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> msgList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryMsg(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> informationLikes(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/information/likes/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> memberComment(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/memberComment',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> memberCommentList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/memberComment/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> commentLike(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/memberComment/likes/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> delComment(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/memberComment/delete/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> shippingTrace(shipperCode, logisticCode) async {
ArgumentError.checkNotNull(shipperCode, 'shipperCode');
ArgumentError.checkNotNull(logisticCode, 'logisticCode');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/order/getShippingTrace/$shipperCode/$logisticCode',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
}

19
lib/union/store_details_page.dart

@ -465,7 +465,8 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
child: Row(
children: [
Text(
S.of(context)
S
.of(context)
.pinglun_(commentTotal.toString()),
style: TextStyle(
fontSize: 16.sp,
@ -795,15 +796,15 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
likeBuilder: (bool isLiked) {
return isLiked
? Image.asset(
"assets/image/icon_like.png",
width: 16,
height: 16,
)
"assets/image/icon_like.png",
width: 16,
height: 16,
)
: Image.asset(
"assets/image/icon_like_h.png",
width: 16,
height: 16,
);
"assets/image/icon_like_h.png",
width: 16,
height: 16,
);
},
isLiked: memberList.liked ?? false,
onTap: (isLiked) async {

26
lib/utils/status_utils.dart

@ -85,8 +85,19 @@ class StatusUtils {
return statusText;
}
static List<Widget> statusBtn(context, payStatus, orderStatus, isTakeOut,
sendStatus, refundStatus, dayFlowCode) {
static List<Widget> statusBtn(
context,
payStatus,
orderStatus,
isTakeOut,
sendStatus,
refundStatus,
dayFlowCode,
logisticsName,
logisticsNum,
shipperCode,
productNum,
skuImg) {
if (refundStatus == 1) {
return [
RoundButton(
@ -243,8 +254,15 @@ class StatusUtils {
margin: EdgeInsets.only(right: 10.w),
child: TextButton(
onPressed: () {
Navigator.of(context)
.pushNamed('/router/logistics_information_page');
Navigator.of(context).pushNamed(
'/router/logistics_information_page',
arguments: {
"logisticsNum": logisticsNum,
"logisticsName": logisticsName,
"shipperCode": shipperCode,
"productNum": productNum,
"skuImg": skuImg
});
},
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),

Loading…
Cancel
Save