Browse Source

Merge branch 'master' into dev

# Conflicts:
#	lib/generated/intl/messages_zh_CN.dart
#	lib/retrofit/data/coupon.dart
null_safety
w-R 4 years ago
parent
commit
1491075cfe
  1. BIN
      assets/image/2x/icon_map_marker.png
  2. BIN
      assets/image/3x/icon_map_marker.png
  3. BIN
      assets/image/icon_map_marker.png
  4. 12
      ios/Runner.xcodeproj/project.pbxproj
  5. 2
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  6. 13
      ios/Runner/Base.lproj/Main.storyboard
  7. 64
      lib/generated/intl/messages_zh_CN.dart
  8. 6
      lib/home/activity_list_page.dart
  9. 3
      lib/home/home_page.dart
  10. 2
      lib/integral/integral_page.dart
  11. 2
      lib/l10n/intl_zh_CN.arb
  12. 26
      lib/login/login_page.dart
  13. 6
      lib/main.dart
  14. 3
      lib/mine/manage_address_page.dart
  15. 80
      lib/retrofit/data/activity.dart
  16. 44
      lib/retrofit/data/activity.g.dart
  17. 50
      lib/retrofit/data/address.dart
  18. 40
      lib/retrofit/data/address.g.dart
  19. 32
      lib/retrofit/data/banner.dart
  20. 38
      lib/retrofit/data/banner.g.dart
  21. 29
      lib/retrofit/data/base_data.dart
  22. 30
      lib/retrofit/data/base_data.g.dart
  23. 31
      lib/retrofit/data/brand_data.dart
  24. 33
      lib/retrofit/data/brand_data.g.dart
  25. 95
      lib/retrofit/data/coupon.dart
  26. 64
      lib/retrofit/data/coupon.g.dart
  27. 69
      lib/retrofit/data/coupon_vo.dart
  28. 67
      lib/retrofit/data/coupon_vo.g.dart
  29. 22
      lib/retrofit/data/data_type.dart
  30. 18
      lib/retrofit/data/data_type.g.dart
  31. 24
      lib/retrofit/data/delivery_info.dart
  32. 30
      lib/retrofit/data/delivery_info.g.dart
  33. 55
      lib/retrofit/data/exchange_order.dart
  34. 45
      lib/retrofit/data/exchange_order.g.dart
  35. 73
      lib/retrofit/data/exchange_order_goods.dart
  36. 53
      lib/retrofit/data/exchange_order_goods.g.dart
  37. 1
      lib/retrofit/data/sign_info.dart
  38. 2
      lib/retrofit/data/sign_info.g.dart
  39. 143
      lib/union/union_page.dart

BIN
assets/image/2x/icon_map_marker.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
assets/image/3x/icon_map_marker.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
assets/image/icon_map_marker.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

12
ios/Runner.xcodeproj/project.pbxproj

@ -706,7 +706,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -739,7 +739,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -903,7 +903,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -936,7 +936,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -995,7 +995,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1028,7 +1028,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",

2
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@ -40,7 +40,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

13
ios/Runner/Base.lproj/Main.storyboard

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-26" y="-45"/>
</scene>
</scenes>
</document>

64
lib/generated/intl/messages_zh_CN.dart

@ -41,37 +41,37 @@ class MessageLookup extends MessageLookupByLibrary {
static m10(man, jian) => "${man}立减${jian}代金券";
static m12(mi) => "${mi}";
static m11(mi) => "${mi}";
static m13(zhe) => "全场${zhe}";
static m12(zhe) => "全场${zhe}";
static m14(ren) => "${ren}/人";
static m13(ren) => "¥${ren}/人";
static m15(second) => "${second}s后重新发送";
static m14(second) => "${second}s后重新发送";
static m16(jifen) => "商品积分 ${jifen}积分";
static m15(jifen) => "商品积分 ${jifen}积分";
static m17(jifen) => "实付积分 ${jifen}积分";
static m16(jifen) => "实付积分 ${jifen}积分";
static m18(date) => "使用日期${date}";
static m17(date) => "使用日期${date}";
static m19(sui) => "${sui}";
static m18(sui) => "${sui}";
static m20(num) => "完成${num}";
static m19(num) => "完成${num}";
static m21(time) => "下单时间${time}";
static m20(time) => "下单时间${time}";
static m22(jian) => "已兑换${jian}";
static m21(jian) => "已兑换${jian}";
static m23(time) => "营业时间: ${time}";
static m22(time) => "营业时间: ${time}";
static m24(date) => "有效期至${date}";
static m23(date) => "有效期至${date}";
static m25(yuan) => "${yuan}";
static m24(yuan) => "${yuan}";
static m26(yue) => "余额${yue}";
static m25(yue) => "余额${yue}";
static m27(zuozhe) => "作者${zuozhe}";
static m26(zuozhe) => "作者${zuozhe}";
final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> {
@ -177,7 +177,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("没有更多的数据了"),
"meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mi" : m12,
"mi" : m11,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"),
@ -209,7 +209,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),
"quanchangzhe" : m13,
"quanchangzhe" : m12,
"quanxian" : MessageLookupByLibrary.simpleMessage("权限"),
"quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"),
"queren" : MessageLookupByLibrary.simpleMessage("确认"),
@ -224,23 +224,23 @@ class MessageLookup extends MessageLookupByLibrary {
"quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"),
"remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"),
"remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"),
"ren" : m14,
"ren" : m13,
"renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"),
"resend_in_seconds" : m15,
"resend_in_seconds" : m14,
"ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"),
"send_code" : MessageLookupByLibrary.simpleMessage("发送验证"),
"shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除订单"),
"shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加载"),
"shangpinjifen" : m16,
"shangpinjifen" : m15,
"shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品详情"),
"shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"),
"shezhi" : MessageLookupByLibrary.simpleMessage("设置"),
"shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("释放加载更多"),
"shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"),
"shifujifen" : m17,
"shifujifen" : m16,
"shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"),
"shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"),
"shiyongriqi" : m18,
"shiyongriqi" : m17,
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"),
@ -250,7 +250,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m19,
"sui" : m18,
"tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
@ -259,7 +259,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"),
"waisong" : MessageLookupByLibrary.simpleMessage("外送"),
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m20,
"wancheng_" : m19,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@ -276,7 +276,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),
"xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"),
"xiadanshijian_" : m21,
"xiadanshijian_" : m20,
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相机"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"),
@ -289,9 +289,9 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"),
"xuni" : MessageLookupByLibrary.simpleMessage("虚拟"),
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"),
"yiduihuanjian" : m22,
"yiduihuanjian" : m21,
"yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"),
"yingyeshijian" : m23,
"yingyeshijian" : m22,
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),
"yishiming" : MessageLookupByLibrary.simpleMessage("已实名"),
@ -304,10 +304,10 @@ class MessageLookup extends MessageLookupByLibrary {
"youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"),
"youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"),
"youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"),
"youxiaoqizhi" : m24,
"yuan" : m25,
"youxiaoqizhi" : m23,
"yuan" : m24,
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m26,
"yue_" : m25,
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"),
@ -324,6 +324,6 @@ class MessageLookup extends MessageLookupByLibrary {
"zitishijian" : MessageLookupByLibrary.simpleMessage("自提时间"),
"zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("钻石会员"),
"zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任务得积分"),
"zuozhe" : m27
"zuozhe" : m26
};
}

6
lib/home/activity_list_page.dart

@ -90,8 +90,8 @@ class _ActivityListPage extends State<ActivityListPage>
.pushNamed('/router/store_detail_page', arguments: {
"html": activityList[position].content,
"title": activityList[position].mainTitle,
"time":activityList[position].createTime,
"author":activityList[position].storeName
"time": activityList[position].createTime,
"author": activityList[position].storeName
});
},
child: activityItem(activityList[position]),
@ -104,7 +104,7 @@ class _ActivityListPage extends State<ActivityListPage>
Widget activityItem(Activity activity) {
return AspectRatio(
aspectRatio: 1.38,
aspectRatio: 1.34,
child: Container(
margin: EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 8),
decoration: BoxDecoration(

3
lib/home/home_page.dart

@ -290,7 +290,8 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
itemBuilder: (contetx, index) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/integral_store_page');
Navigator.of(context).pushNamed(
'/router/integral_store_page', arguments: {"goodsId": gooods[index].id});
},
child: buildItem(gooods[index]),
);

2
lib/integral/integral_page.dart

@ -438,7 +438,7 @@ class _IntegralPage extends State<IntegralPage> {
child: RoundButton(
text: S.of(context).lijiqiandao,
textColor: Colors.white,
backgroup: Color(0xFF32A060),
backgroup: (signInfo != null && signInfo.todayHasSignin) ? Colors.grey : Color(0xFF32A060),
fontSize: 16,
padding: EdgeInsets.fromLTRB(16, 6, 16, 6),
radius: 4,

2
lib/l10n/intl_zh_CN.arb

@ -29,7 +29,7 @@
"jingbilianmenghuiyuandian": "净币联盟会员店",
"gongli": "{km}公里",
"manlijiandaijinquan": "满{man}立减{jian}代金券",
"ren": "{ren}/人",
"ren": "¥{ren}/人",
"youxiaoqizhi": "有效期至{date}",
"huodongjinxingzhong": "活动进行中",
"yiyoujifen": "已有积分",

26
lib/login/login_page.dart

@ -468,7 +468,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
),
Container(
height: MediaQuery.of(context).size.height * 0.78,
margin: EdgeInsets.only(top: 56),
margin: EdgeInsets.only(top: 56.h),
alignment: Alignment.topCenter,
child: AspectRatio(
aspectRatio: 1.1,
@ -489,8 +489,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
children: [
Image.asset(
"assets/image/icon_login_logo.png",
width: 91,
height: 91,
width: 91.w,
height: 91.h,
),
SizedBox(
height: 0.596.sh,
@ -538,7 +538,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
top: MediaQuery.of(context).size.height * 0.1039,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 40),
padding: EdgeInsets.symmetric(horizontal: 40.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -548,7 +548,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
child: Text(
"Hello,",
style: TextStyle(
fontSize: 23,
fontSize: 23.sp,
color: Color(0xFF32A060),
),
),
@ -559,15 +559,15 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
Opacity(
opacity: (255 - changeAlpha) / 255,
child: Text(
"欢迎来到一心回乡",
S.of(context).login_splash,
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
color: Color(0xFF32A060),
),
),
),
SizedBox(
height: 20,
height: 20.h,
),
Expanded(
child: inputWidgets(),
@ -596,7 +596,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
borderRadius: BorderRadius.circular(2),
),
child: Text(
"登录",
S.of(context).login,
style: TextStyle(fontSize: 18.sp, color: Colors.white),
),
),
@ -623,7 +623,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
),
),
),
bottom: 33,
bottom: 33.h,
left: 0,
right: 0,
)
@ -801,10 +801,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
borderWidth: 1.w,
radius: 2,
padding: EdgeInsets.only(
left: 6.sp,
right: 6.sp,
top: 6.sp,
bottom: 6.sp,
left: 6.w,
right: 6.w,
),
fontSize: 10.sp,
textColor: _sendCodeStatus == 0 ? Color(0xFF32A060) : Color(0xFFFF7A1A),

6
lib/main.dart

@ -57,7 +57,11 @@ void main() {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
}
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown
]);
runApp(MyApp());
}

3
lib/mine/manage_address_page.dart

@ -41,6 +41,7 @@ class _ManageAddressPage extends State<ManageAddressPage> {
queryMemberAddress() async {
BaseData baseData = await apiService.queryMemberAddress();
if (baseData != null && baseData.isSuccess) {
checkIndex = 0;
addressList = (baseData.data as List<dynamic>)
.map((e) => Address.fromJson(e))
.toList();
@ -282,7 +283,7 @@ class _ManageAddressPage extends State<ManageAddressPage> {
return AlertDialog(
content: Container(
width: MediaQuery.of(context).size.width - 84,
height: 100,
height: 110,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,

80
lib/retrofit/data/activity.dart

@ -1,13 +1,8 @@
import 'package:json_annotation/json_annotation.dart';
part 'activity.g.dart';
@JsonSerializable()
class Activity {
Activity();
String id;
String createTime;
dynamic createUser;
@ -24,8 +19,77 @@ class Activity {
int isDelete;
String storeName;
factory Activity.fromJson(Map<String, dynamic> json) =>
_$ActivityFromJson(json);
Map<String, dynamic> toJson() => _$ActivityToJson(this);
factory Activity.fromJson(Map<String, dynamic> json) => Activity()
..id = json['id']
..createTime = json['createTime']
..createUser = json['createUser']
..updateTime = json['updateTime']
..updateUser = json['updateUser']
..storeId = json['storeId']
..mainTitle = json['mainTitle']
..viceTitle = json['viceTitle']
..content = json['content']
..coverImg = json['coverImg']
..startTime = json['startTime']
..endTime = json['endTime']
..state = json['state']
..isDelete = json['isDelete']
..storeName = json['storeName'];
Map<String, dynamic> toJson() => {
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'storeId': this.storeId,
'mainTitle': this.mainTitle,
'viceTitle': this.viceTitle,
'content': this.content,
'coverImg': this.coverImg,
'startTime': this.startTime,
'endTime': this.endTime,
'state': this.state,
'isDelete': this.isDelete,
'storeName': this.storeName,
};
// Activity _$ActivityFromJson(Map<String, dynamic> json) {
// return Activity()
// ..id = json['id'] as String
// ..createTime = json['createTime'] as String
// ..createUser = json['createUser']
// ..updateTime = json['updateTime'] as String
// ..updateUser = json['updateUser']
// ..storeId = json['storeId'] as String
// ..mainTitle = json['mainTitle'] as String
// ..viceTitle = json['viceTitle'] as String
// ..content = json['content'] as String
// ..coverImg = json['coverImg'] as String
// ..startTime = json['startTime'] as String
// ..endTime = json['endTime'] as String
// ..state = json['state'] as int
// ..isDelete = json['isDelete'] as int
// ..storeName = json['storeName'] as String;
// }
// Map<String, dynamic> _$ActivityToJson(Activity instance) => <String, dynamic>{
// 'id': instance.id,
// 'createTime': instance.createTime,
// 'createUser': instance.createUser,
// 'updateTime': instance.updateTime,
// 'updateUser': instance.updateUser,
// 'storeId': instance.storeId,
// 'mainTitle': instance.mainTitle,
// 'viceTitle': instance.viceTitle,
// 'content': instance.content,
// 'coverImg': instance.coverImg,
// 'startTime': instance.startTime,
// 'endTime': instance.endTime,
// 'state': instance.state,
// 'isDelete': instance.isDelete,
// 'storeName': instance.storeName,
// };
}

44
lib/retrofit/data/activity.g.dart

@ -1,44 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'activity.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Activity _$ActivityFromJson(Map<String, dynamic> json) {
return Activity()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser']
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser']
..storeId = json['storeId'] as String
..mainTitle = json['mainTitle'] as String
..viceTitle = json['viceTitle'] as String
..content = json['content'] as String
..coverImg = json['coverImg'] as String
..startTime = json['startTime'] as String
..endTime = json['endTime'] as String
..state = json['state'] as int
..isDelete = json['isDelete'] as int
..storeName = json['storeName'] as String;
}
Map<String, dynamic> _$ActivityToJson(Activity instance) => <String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'storeId': instance.storeId,
'mainTitle': instance.mainTitle,
'viceTitle': instance.viceTitle,
'content': instance.content,
'coverImg': instance.coverImg,
'startTime': instance.startTime,
'endTime': instance.endTime,
'state': instance.state,
'isDelete': instance.isDelete,
'storeName': instance.storeName,
};

50
lib/retrofit/data/address.dart

@ -1,22 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
/// address : ""
/// area : ""
/// city : ""
/// cityInfo : ""
/// id : 0
/// isDefault : true
/// latitude : 0
/// longitude : 0
/// mid : 0
/// phone : ""
/// province : ""
/// tag : ""
/// username : ""
part 'address.g.dart';
@JsonSerializable()
class Address {
Address();
@ -34,7 +17,34 @@ class Address {
String tag;
String username;
factory Address.fromJson(Map<String, dynamic> json) =>
_$AddressFromJson(json);
Map<String, dynamic> toJson() => _$AddressToJson(this);
factory Address.fromJson(Map<String, dynamic> json) => Address()
..address = json['address'] as String
..area = json['area'] as String
..city = json['city'] as String
..cityInfo = json['cityInfo'] as String
..id = json['id'] as String
..isDefault = json['isDefault'] as bool
..latitude = json['latitude'] as String
..longitude = json['longitude'] as String
..mid = json['mid'] as String
..phone = json['phone'] as String
..province = json['province'] as String
..tag = json['tag'] as String
..username = json['username'] as String;
Map<String, dynamic> toJson() => {
'address': this.address,
'area': this.area,
'city': this.city,
'cityInfo': this.cityInfo,
'id': this.id,
'isDefault': this.isDefault,
'latitude': this.latitude,
'longitude': this.longitude,
'mid': this.mid,
'phone': this.phone,
'province': this.province,
'tag': this.tag,
'username': this.username,
};
}

40
lib/retrofit/data/address.g.dart

@ -1,40 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'address.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Address _$AddressFromJson(Map<String, dynamic> json) {
return Address()
..address = json['address'] as String
..area = json['area'] as String
..city = json['city'] as String
..cityInfo = json['cityInfo'] as String
..id = json['id'] as String
..isDefault = json['isDefault'] as bool
..latitude = json['latitude'] as String
..longitude = json['longitude'] as String
..mid = json['mid'] as String
..phone = json['phone'] as String
..province = json['province'] as String
..tag = json['tag'] as String
..username = json['username'] as String;
}
Map<String, dynamic> _$AddressToJson(Address instance) => <String, dynamic>{
'address': instance.address,
'area': instance.area,
'city': instance.city,
'cityInfo': instance.cityInfo,
'id': instance.id,
'isDefault': instance.isDefault,
'latitude': instance.latitude,
'longitude': instance.longitude,
'mid': instance.mid,
'phone': instance.phone,
'province': instance.province,
'tag': instance.tag,
'username': instance.username,
};

32
lib/retrofit/data/banner.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'banner.g.dart';
@JsonSerializable()
class BannerData {
String content;
String createTime;
@ -18,8 +14,32 @@ class BannerData {
BannerData({this.content, this.createTime, this.createUser, this.id, this.imgUrl, this.isDelete, this.storeId, this.tenantCode, this.type, this.updateTime, this.updateUser});
factory BannerData.fromJson(Map<String, dynamic> json) => _$BannerDataFromJson(json);
factory BannerData.fromJson(Map<String, dynamic> json) => BannerData(
content: json['content'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
id: json['id'] as String,
imgUrl: json['imgUrl'] as String,
isDelete: json['isDelete'] as bool,
storeId: json['storeId'] as String,
tenantCode: json['tenantCode'] as String,
type: json['type'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
);
Map<String, dynamic> toJson() => _$BannerDataToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'content': this.content,
'createTime': this.createTime,
'createUser': this.createUser,
'id': this.id,
'imgUrl': this.imgUrl,
'isDelete': this.isDelete,
'storeId': this.storeId,
'tenantCode': this.tenantCode,
'type': this.type,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
};
}

38
lib/retrofit/data/banner.g.dart

@ -1,38 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'banner.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BannerData _$BannerDataFromJson(Map<String, dynamic> json) {
return BannerData(
content: json['content'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
id: json['id'] as String,
imgUrl: json['imgUrl'] as String,
isDelete: json['isDelete'] as bool,
storeId: json['storeId'] as String,
tenantCode: json['tenantCode'] as String,
type: json['type'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
);
}
Map<String, dynamic> _$BannerDataToJson(BannerData instance) =>
<String, dynamic>{
'content': instance.content,
'createTime': instance.createTime,
'createUser': instance.createUser,
'id': instance.id,
'imgUrl': instance.imgUrl,
'isDelete': instance.isDelete,
'storeId': instance.storeId,
'tenantCode': instance.tenantCode,
'type': instance.type,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
};

29
lib/retrofit/data/base_data.dart

@ -1,9 +1,3 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_data.g.dart';
@JsonSerializable()
class BaseData {
BaseData();
@ -16,7 +10,24 @@ class BaseData {
String path;
String timestamp;
factory BaseData.fromJson(Map<String, dynamic> json) =>
_$BaseDataFromJson(json);
Map<String, dynamic> toJson() => _$BaseDataToJson(this);
factory BaseData.fromJson(Map<String, dynamic> json) => BaseData()
..code = json['code'] as int
..data = json['data']
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
Map<String, dynamic> toJson() => <String, dynamic>{
'code': this.code,
'data': this.data,
'extra': this.extra,
'isError': this.isError,
'isSuccess': this.isSuccess,
'msg': this.msg,
'path': this.path,
'timestamp': this.timestamp,
};
}

30
lib/retrofit/data/base_data.g.dart

@ -1,30 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseData _$BaseDataFromJson(Map<String, dynamic> json) {
return BaseData()
..code = json['code'] as int
..data = json['data']
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
}
Map<String, dynamic> _$BaseDataToJson(BaseData instance) => <String, dynamic>{
'code': instance.code,
'data': instance.data,
'extra': instance.extra,
'isError': instance.isError,
'isSuccess': instance.isSuccess,
'msg': instance.msg,
'path': instance.path,
'timestamp': instance.timestamp,
};

31
lib/retrofit/data/brand_data.dart

@ -1,13 +1,6 @@
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:json_annotation/json_annotation.dart';
part 'brand_data.g.dart';
@JsonSerializable()
class BrandData {
BrandData();
@ -23,9 +16,27 @@ class BrandData {
dynamic ideals;
factory BrandData.fromJson(Map<String, dynamic> json) =>
_$BrandDataFromJson(json);
Map<String, dynamic> toJson() => _$BrandDataToJson(this);
factory BrandData.fromJson(Map<String, dynamic> json) => BrandData()
..bannerList = (json['bannerList'] as List)?.map((e) =>
e == null ? null : BannerData.fromJson(e as Map<String, dynamic>))?.toList()
..company = json['company'] as String
..companyDesc = json['companyDesc'] as String
..originAvatar = json['originAvatar'] as String
..originDesc = json['originDesc'] as String
..originator = json['originator'] as String
..contents = json['contents']
..ideals = json['ideals'];
Map<String, dynamic> toJson() => <String, dynamic>{
'bannerList': this.bannerList.map((e) => e.toJson()).toList(),
'company': this.company,
'companyDesc': this.companyDesc,
'originAvatar': this.originAvatar,
'originDesc': this.originDesc,
'originator': this.originator,
'contents': this.contents,
'ideals': this.ideals,
};
}

33
lib/retrofit/data/brand_data.g.dart

@ -1,33 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'brand_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BrandData _$BrandDataFromJson(Map<String, dynamic> json) {
return BrandData()
..bannerList = (json['bannerList'] as List)
?.map((e) =>
e == null ? null : BannerData.fromJson(e as Map<String, dynamic>))
?.toList()
..company = json['company'] as String
..companyDesc = json['companyDesc'] as String
..originAvatar = json['originAvatar'] as String
..originDesc = json['originDesc'] as String
..originator = json['originator'] as String
..contents = json['contents']
..ideals = json['ideals'];
}
Map<String, dynamic> _$BrandDataToJson(BrandData instance) => <String, dynamic>{
'bannerList': instance.bannerList,
'company': instance.company,
'companyDesc': instance.companyDesc,
'originAvatar': instance.originAvatar,
'originDesc': instance.originDesc,
'originator': instance.originator,
'contents': instance.contents,
'ideals': instance.ideals,
};

95
lib/retrofit/data/coupon.dart

@ -1,42 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
/// bizId : ""
/// bizType : 0
/// centreDisplay : true
/// createTime : ""
/// createUser : 0
/// discountAmount : 0
/// discountPercent : 0
/// fullAmount : 0
/// id : 0
/// isDelete : 0
/// memberCouponId : 0
/// promotionId : 0
/// publishEndTime : ""
/// publishStartTime : ""
/// receiveTime : ""
/// received : true
/// tenantCode : ""
/// updateTime : ""
/// updateUser : 0
/// useEndTime : ""
/// useStartTime : ""
/// useTime : ""
part 'coupon.g.dart';
///{"id":"1409793980522037248","createTime":"2021-06-29 16:40:52",
///"createUser":"1","updateTime":"2021-06-29 16:40:52","updateUser":"1",
///"bizType":5,"fullAmount":"0.00","discountAmount":"0.00","discountPercent":100,
///"bizId":"1409793980488482816","publishStartTime":"2021-06-29 16:39:14",
///"publishEndTime":"2021-06-29 16:39:14","useStartTime":"2021-06-29 16:39:14",
///"useEndTime":"2021-06-29 16:39:14","promotionId":"0","centreDisplay":false,
///"tenantCode":"admin","isDelete":0,"couponName":null,
///"memberCouponId":"1409806872449384448","receiveTime":"2021-06-29 17:32:06",
///"useTime":null,"status":1}
@JsonSerializable()
class Coupon {
Coupon();
Coupon.test(this.couponName,this.status,this.isEx);
@ -68,9 +30,58 @@ class Coupon {
int status;
bool isEx;
factory Coupon.fromJson(Map<String, dynamic> json) => Coupon()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..bizType = json['bizType'] as int
..fullAmount = json['fullAmount'] as String
..discountAmount = json['discountAmount'] as String
..discountPercent = json['discountPercent'] as int
..bizId = json['bizId'] as String
..publishStartTime = json['publishStartTime'] as String
..publishEndTime = json['publishEndTime'] as String
..useStartTime = json['useStartTime'] as String
..useEndTime = json['useEndTime'] as String
..promotionId = json['promotionId'] as String
..centreDisplay = json['centreDisplay'] as bool
..tenantCode = json['tenantCode'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
..receiveTime = json['receiveTime'] as String
..useTime = json['useTime']
..status = json['status'] as int;
factory Coupon.fromJson(Map<String, dynamic> json) =>
_$CouponFromJson(json);
Map<String, dynamic> toJson() => _$CouponToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'bizType': this.bizType,
'fullAmount': this.fullAmount,
'discountAmount': this.discountAmount,
'discountPercent': this.discountPercent,
'bizId': this.bizId,
'publishStartTime': this.publishStartTime,
'publishEndTime': this.publishEndTime,
'useStartTime': this.useStartTime,
'useEndTime': this.useEndTime,
'promotionId': this.promotionId,
'centreDisplay': this.centreDisplay,
'tenantCode': this.tenantCode,
'isDelete': this.isDelete,
'couponName': this.couponName,
'couponImg': this.couponImg,
'couponDescription': this.couponDescription,
'memberCouponId': this.memberCouponId,
'receiveTime': this.receiveTime,
'useTime': this.useTime,
'status': this.status,
};
}

64
lib/retrofit/data/coupon.g.dart

@ -1,64 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'coupon.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Coupon _$CouponFromJson(Map<String, dynamic> json) {
return Coupon()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..bizType = json['bizType'] as int
..fullAmount = json['fullAmount'] as String
..discountAmount = json['discountAmount'] as String
..discountPercent = json['discountPercent'] as int
..bizId = json['bizId'] as String
..publishStartTime = json['publishStartTime'] as String
..publishEndTime = json['publishEndTime'] as String
..useStartTime = json['useStartTime'] as String
..useEndTime = json['useEndTime'] as String
..promotionId = json['promotionId'] as String
..centreDisplay = json['centreDisplay'] as bool
..tenantCode = json['tenantCode'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
..receiveTime = json['receiveTime'] as String
..useTime = json['useTime']
..status = json['status'] as int;
}
Map<String, dynamic> _$CouponToJson(Coupon instance) => <String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'bizType': instance.bizType,
'fullAmount': instance.fullAmount,
'discountAmount': instance.discountAmount,
'discountPercent': instance.discountPercent,
'bizId': instance.bizId,
'publishStartTime': instance.publishStartTime,
'publishEndTime': instance.publishEndTime,
'useStartTime': instance.useStartTime,
'useEndTime': instance.useEndTime,
'promotionId': instance.promotionId,
'centreDisplay': instance.centreDisplay,
'tenantCode': instance.tenantCode,
'isDelete': instance.isDelete,
'couponName': instance.couponName,
'couponImg': instance.couponImg,
'couponDescription': instance.couponDescription,
'memberCouponId': instance.memberCouponId,
'receiveTime': instance.receiveTime,
'useTime': instance.useTime,
'status': instance.status,
};

69
lib/retrofit/data/coupon_vo.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'coupon_vo.g.dart';
@JsonSerializable()
class CouponVo {
String bizId;
num bizType;
@ -33,15 +29,62 @@ class CouponVo {
CouponVo({this.bizId, this.bizType, this.centreDisplay, this.couponDescription, this.couponImg, this.couponName, this.createTime, this.createUser, this.discountAmount, this.discountPercent, this.fullAmount, this.id, this.isDelete, this.memberCouponId, this.promotionId, this.publishEndTime, this.publishStartTime, this.receiveTime, this.received, this.status, this.tenantCode, this.updateTime, this.updateUser, this.useEndTime, this.useStartTime, this.useTime});
//{"id":"1407301814381969408","createTime":"2021-06-22 19:37:54","createUser":"1336877238389309440",
// "updateTime":"2021-06-22 19:37:54","updateUser":"1336877238389309440","bizType":3,"fullAmo
//unt":"0.00","discountAmount":"0.00","discountPercent":100,"bizId":"","publishStartTime":"2021-06-08 12:00:00",
// "publishEndTime":"2021-07-30 12:00:00","useStartTime":"2021-06-09 12:00:00","useEndTime":"2021-06-26 12:00:00",
// "promotionId":"1407301660300017664","centreDisplay":true,"tenantCode":"1174","isDelete":0,"couponName":"兑换券",
// "couponImg":"https://pos.upload.gznl.top/1174/2021/06/0e80c809-4ea5-449d-a8b3-2c7b7e6dc9a7.jpg",
// "couponDescription":"11","memberCouponId":null,"receiveTime":null,"useTime":null,"status":0}
factory CouponVo.fromJson(Map<String, dynamic> json) => _$CouponVoFromJson(json);
factory CouponVo.fromJson(Map<String, dynamic> json) => CouponVo(
bizId: json['bizId'] as String,
bizType: json['bizType'] as num,
centreDisplay: json['centreDisplay'] as bool,
couponDescription: json['couponDescription'] as String,
couponImg: json['couponImg'] as String,
couponName: json['couponName'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
discountAmount: json['discountAmount'] as String,
discountPercent: json['discountPercent'] as num,
fullAmount: json['fullAmount'] as String,
id: json['id'] as String,
isDelete: json['isDelete'] as num,
memberCouponId: json['memberCouponId'] as num,
promotionId: json['promotionId'] as String,
publishEndTime: json['publishEndTime'] as String,
publishStartTime: json['publishStartTime'] as String,
receiveTime: json['receiveTime'] as String,
received: json['received'] as bool,
status: json['status'] as num,
tenantCode: json['tenantCode'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
useEndTime: json['useEndTime'] as String,
useStartTime: json['useStartTime'] as String,
useTime: json['useTime'] as String,
);
Map<String, dynamic> toJson() => _$CouponVoToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'bizId': this.bizId,
'bizType': this.bizType,
'centreDisplay': this.centreDisplay,
'couponDescription': this.couponDescription,
'couponImg': this.couponImg,
'couponName': this.couponName,
'createTime': this.createTime,
'createUser': this.createUser,
'discountAmount': this.discountAmount,
'discountPercent': this.discountPercent,
'fullAmount': this.fullAmount,
'id': this.id,
'isDelete': this.isDelete,
'memberCouponId': this.memberCouponId,
'promotionId': this.promotionId,
'publishEndTime': this.publishEndTime,
'publishStartTime': this.publishStartTime,
'receiveTime': this.receiveTime,
'received': this.received,
'status': this.status,
'tenantCode': this.tenantCode,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'useEndTime': this.useEndTime,
'useStartTime': this.useStartTime,
'useTime': this.useTime,
};
}

67
lib/retrofit/data/coupon_vo.g.dart

@ -1,67 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'coupon_vo.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CouponVo _$CouponVoFromJson(Map<String, dynamic> json) {
return CouponVo(
bizId: json['bizId'] as String,
bizType: json['bizType'] as num,
centreDisplay: json['centreDisplay'] as bool,
couponDescription: json['couponDescription'] as String,
couponImg: json['couponImg'] as String,
couponName: json['couponName'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
discountAmount: json['discountAmount'] as String,
discountPercent: json['discountPercent'] as num,
fullAmount: json['fullAmount'] as String,
id: json['id'] as String,
isDelete: json['isDelete'] as num,
memberCouponId: json['memberCouponId'] as num,
promotionId: json['promotionId'] as String,
publishEndTime: json['publishEndTime'] as String,
publishStartTime: json['publishStartTime'] as String,
receiveTime: json['receiveTime'] as String,
received: json['received'] as bool,
status: json['status'] as num,
tenantCode: json['tenantCode'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
useEndTime: json['useEndTime'] as String,
useStartTime: json['useStartTime'] as String,
useTime: json['useTime'] as String,
);
}
Map<String, dynamic> _$CouponVoToJson(CouponVo instance) => <String, dynamic>{
'bizId': instance.bizId,
'bizType': instance.bizType,
'centreDisplay': instance.centreDisplay,
'couponDescription': instance.couponDescription,
'couponImg': instance.couponImg,
'couponName': instance.couponName,
'createTime': instance.createTime,
'createUser': instance.createUser,
'discountAmount': instance.discountAmount,
'discountPercent': instance.discountPercent,
'fullAmount': instance.fullAmount,
'id': instance.id,
'isDelete': instance.isDelete,
'memberCouponId': instance.memberCouponId,
'promotionId': instance.promotionId,
'publishEndTime': instance.publishEndTime,
'publishStartTime': instance.publishStartTime,
'receiveTime': instance.receiveTime,
'received': instance.received,
'status': instance.status,
'tenantCode': instance.tenantCode,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'useEndTime': instance.useEndTime,
'useStartTime': instance.useStartTime,
'useTime': instance.useTime,
};

22
lib/retrofit/data/data_type.dart

@ -1,16 +1,16 @@
import 'package:json_annotation/json_annotation.dart';
/// desc : "其他"
/// code : "OTHER"
part 'data_type.g.dart';
@JsonSerializable()
class DataType {
DataType();
String desc;
String code;
factory DataType.fromJson(Map<String, dynamic> json) =>
_$DataTypeFromJson(json);
Map<String, dynamic> toJson() => _$DataTypeToJson(this);
}
factory DataType.fromJson(Map<String, dynamic> json) => DataType()
..desc = json['desc'] as String
..code = json['code'] as String;
Map<String, dynamic> toJson() => <String, dynamic>{
'desc': this.desc,
'code': this.code,
};
}

18
lib/retrofit/data/data_type.g.dart

@ -1,18 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'data_type.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
DataType _$DataTypeFromJson(Map<String, dynamic> json) {
return DataType()
..desc = json['desc'] as String
..code = json['code'] as String;
}
Map<String, dynamic> _$DataTypeToJson(DataType instance) => <String, dynamic>{
'desc': instance.desc,
'code': instance.code,
};

24
lib/retrofit/data/delivery_info.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'delivery_info.g.dart';
@JsonSerializable()
class DeliveryInfo {
bool dadaRegStatus;
String dadaSourceId;
@ -14,8 +10,24 @@ class DeliveryInfo {
DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus});
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => _$DeliveryInfoFromJson(json);
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool,
dadaSourceId: json['dadaSourceId'] as String,
dadaStatus: json['dadaStatus'] as bool,
dianwodaRegStatus: json['dianwodaRegStatus'] as bool,
dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool,
);
Map<String, dynamic> toJson() => _$DeliveryInfoToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'dadaRegStatus': this.dadaRegStatus,
'dadaSourceId': this.dadaSourceId,
'dadaStatus': this.dadaStatus,
'dianwodaRegStatus': this.dianwodaRegStatus,
'dianwodaStatus': this.dianwodaStatus,
'meituanRegStatus': this.meituanRegStatus,
'meituanStatus': this.meituanStatus,
};
}

30
lib/retrofit/data/delivery_info.g.dart

@ -1,30 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'delivery_info.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
DeliveryInfo _$DeliveryInfoFromJson(Map<String, dynamic> json) {
return DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool,
dadaSourceId: json['dadaSourceId'] as String,
dadaStatus: json['dadaStatus'] as bool,
dianwodaRegStatus: json['dianwodaRegStatus'] as bool,
dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool,
);
}
Map<String, dynamic> _$DeliveryInfoToJson(DeliveryInfo instance) =>
<String, dynamic>{
'dadaRegStatus': instance.dadaRegStatus,
'dadaSourceId': instance.dadaSourceId,
'dadaStatus': instance.dadaStatus,
'dianwodaRegStatus': instance.dianwodaRegStatus,
'dianwodaStatus': instance.dianwodaStatus,
'meituanRegStatus': instance.meituanRegStatus,
'meituanStatus': instance.meituanStatus,
};

55
lib/retrofit/data/exchange_order.dart

@ -1,25 +1,8 @@
import 'package:huixiang/retrofit/data/exchange_order_goods.dart';
import 'package:json_annotation/json_annotation.dart';
/// id : "1408693824171016192"
/// createTime : "2021-06-26 15:49:15"
/// createUser : "1405494095400402944"
/// updateTime : "2021-06-26 15:49:15"
/// updateUser : "1405494095400402944"
/// storeId : "1174"
/// mid : "1405494095400402944"
/// orderCode : "JF202106261549141"
/// amount : "77"
/// state : 1
/// useTyped : 1
/// isDelete : 0
/// creditOrderDetailList : [{"id":"1408693824410091520","createTime":"2021-06-26 15:49:15","createUser":"1405494095400402944","updateTime":"2021-06-26 15:49:15","updateUser":"1405494095400402944","orderId":"1408693824171016192","goodsId":"1","categoryId":"1","name":"包包包1111","description":"包治百病","worth":"999.00","price":"77","couponId":"0","canPick":true,"canDelivery":false,"goodsMainImg":"https://pos.upload.gznl.top/0000/2020/10/e59fecd9-4533-463b-bef3-59f02b74e58f.jpg","goodsViceImg":"https://pos.upload.gznl.top/0000/2020/10/9c7beb43-9758-44d3-9cde-e09f979faeab.jpg","goodsNumber":1,"isDelete":0}]
part 'exchange_order.g.dart';
@JsonSerializable()
class ExchangeOrder {
ExchangeOrder();
String id;
String createTime;
String createUser;
@ -34,8 +17,38 @@ class ExchangeOrder {
int isDelete;
List<ExchangeOrderGoods> creditOrderDetailList;
factory ExchangeOrder.fromJson(Map<String, dynamic> json) =>
_$ExchangeOrderFromJson(json);
Map<String, dynamic> toJson() => _$ExchangeOrderToJson(this);
factory ExchangeOrder.fromJson(Map<String, dynamic> json) => ExchangeOrder()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..storeId = json['storeId'] as String
..mid = json['mid'] as String
..orderCode = json['orderCode'] as String
..amount = json['amount'] as String
..state = json['state'] as int
..useTyped = json['useTyped'] as int
..isDelete = json['isDelete'] as int
..creditOrderDetailList = (json['creditOrderDetailList'] as List)
?.map((e) => e == null
? null
: ExchangeOrderGoods.fromJson(e as Map<String, dynamic>))
?.toList();
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'storeId': this.storeId,
'mid': this.mid,
'orderCode': this.orderCode,
'amount': this.amount,
'state': this.state,
'useTyped': this.useTyped,
'isDelete': this.isDelete,
'creditOrderDetailList': this.creditOrderDetailList.map((e) => e.toJson()).toList(),
};
}

45
lib/retrofit/data/exchange_order.g.dart

@ -1,45 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'exchange_order.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ExchangeOrder _$ExchangeOrderFromJson(Map<String, dynamic> json) {
return ExchangeOrder()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..storeId = json['storeId'] as String
..mid = json['mid'] as String
..orderCode = json['orderCode'] as String
..amount = json['amount'] as String
..state = json['state'] as int
..useTyped = json['useTyped'] as int
..isDelete = json['isDelete'] as int
..creditOrderDetailList = (json['creditOrderDetailList'] as List)
?.map((e) => e == null
? null
: ExchangeOrderGoods.fromJson(e as Map<String, dynamic>))
?.toList();
}
Map<String, dynamic> _$ExchangeOrderToJson(ExchangeOrder instance) =>
<String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'storeId': instance.storeId,
'mid': instance.mid,
'orderCode': instance.orderCode,
'amount': instance.amount,
'state': instance.state,
'useTyped': instance.useTyped,
'isDelete': instance.isDelete,
'creditOrderDetailList': instance.creditOrderDetailList,
};

73
lib/retrofit/data/exchange_order_goods.dart

@ -1,31 +1,7 @@
import 'package:json_annotation/json_annotation.dart';
/// id : "1408693824410091520"
/// createTime : "2021-06-26 15:49:15"
/// createUser : "1405494095400402944"
/// updateTime : "2021-06-26 15:49:15"
/// updateUser : "1405494095400402944"
/// orderId : "1408693824171016192"
/// goodsId : "1"
/// categoryId : "1"
/// name : "包包包1111"
/// description : "包治百病"
/// worth : "999.00"
/// price : "77"
/// couponId : "0"
/// canPick : true
/// canDelivery : false
/// goodsMainImg : "https://pos.upload.gznl.top/0000/2020/10/e59fecd9-4533-463b-bef3-59f02b74e58f.jpg"
/// goodsViceImg : "https://pos.upload.gznl.top/0000/2020/10/9c7beb43-9758-44d3-9cde-e09f979faeab.jpg"
/// goodsNumber : 1
/// isDelete : 0
part 'exchange_order_goods.g.dart';
@JsonSerializable()
class ExchangeOrderGoods {
ExchangeOrderGoods();
String id;
String createTime;
String createUser;
@ -46,10 +22,47 @@ class ExchangeOrderGoods {
int goodsNumber;
int isDelete;
factory ExchangeOrderGoods.fromJson(Map<String, dynamic> json) =>
_$ExchangeOrderGoodsFromJson(json);
Map<String, dynamic> toJson() => _$ExchangeOrderGoodsToJson(this);
ExchangeOrderGoods()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..orderId = json['orderId'] as String
..goodsId = json['goodsId'] as String
..categoryId = json['categoryId'] as String
..name = json['name'] as String
..description = json['description'] as String
..worth = json['worth'] as String
..price = json['price'] as String
..couponId = json['couponId'] as String
..canPick = json['canPick'] as bool
..canDelivery = json['canDelivery'] as bool
..goodsMainImg = json['goodsMainImg'] as String
..goodsViceImg = json['goodsViceImg'] as String
..goodsNumber = json['goodsNumber'] as int
..isDelete = json['isDelete'] as int;
}
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'orderId': this.orderId,
'goodsId': this.goodsId,
'categoryId': this.categoryId,
'name': this.name,
'description': this.description,
'worth': this.worth,
'price': this.price,
'couponId': this.couponId,
'canPick': this.canPick,
'canDelivery': this.canDelivery,
'goodsMainImg': this.goodsMainImg,
'goodsViceImg': this.goodsViceImg,
'goodsNumber': this.goodsNumber,
'isDelete': this.isDelete,
};
}

53
lib/retrofit/data/exchange_order_goods.g.dart

@ -1,53 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'exchange_order_goods.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ExchangeOrderGoods _$ExchangeOrderGoodsFromJson(Map<String, dynamic> json) {
return ExchangeOrderGoods()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..orderId = json['orderId'] as String
..goodsId = json['goodsId'] as String
..categoryId = json['categoryId'] as String
..name = json['name'] as String
..description = json['description'] as String
..worth = json['worth'] as String
..price = json['price'] as String
..couponId = json['couponId'] as String
..canPick = json['canPick'] as bool
..canDelivery = json['canDelivery'] as bool
..goodsMainImg = json['goodsMainImg'] as String
..goodsViceImg = json['goodsViceImg'] as String
..goodsNumber = json['goodsNumber'] as int
..isDelete = json['isDelete'] as int;
}
Map<String, dynamic> _$ExchangeOrderGoodsToJson(ExchangeOrderGoods instance) =>
<String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'orderId': instance.orderId,
'goodsId': instance.goodsId,
'categoryId': instance.categoryId,
'name': instance.name,
'description': instance.description,
'worth': instance.worth,
'price': instance.price,
'couponId': instance.couponId,
'canPick': instance.canPick,
'canDelivery': instance.canDelivery,
'goodsMainImg': instance.goodsMainImg,
'goodsViceImg': instance.goodsViceImg,
'goodsNumber': instance.goodsNumber,
'isDelete': instance.isDelete,
};

1
lib/retrofit/data/sign_info.dart

@ -9,6 +9,7 @@ part 'sign_info.g.dart';
class SignInfo {
SignInfo();
String point;
bool todayHasSignin;
MemberRank rank;
List<SignIn> signInList;
List<Task> taskList;

2
lib/retrofit/data/sign_info.g.dart

@ -9,6 +9,7 @@ part of 'sign_info.dart';
SignInfo _$SignInfoFromJson(Map<String, dynamic> json) {
return SignInfo()
..point = json['point'] as String
..todayHasSignin = json['todayHasSignin'] as bool
..rank = json['rank'] == null
? null
: MemberRank.fromJson(json['rank'] as Map<String, dynamic>)
@ -25,6 +26,7 @@ SignInfo _$SignInfoFromJson(Map<String, dynamic> json) {
Map<String, dynamic> _$SignInfoToJson(SignInfo instance) => <String, dynamic>{
'point': instance.point,
'todayHasSignin': instance.todayHasSignin,
'rank': instance.rank,
'signInList': instance.signInList,
'taskList': instance.taskList,

143
lib/union/union_page.dart

@ -212,11 +212,22 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
buildMarker() async {
markers.clear();
BitmapDescriptor bitmapDescriptor = await BitmapDescriptor.fromAssetImage(ImageConfiguration(
bundle: DefaultAssetBundle.of(context),
devicePixelRatio: MediaQuery.of(context)?.devicePixelRatio ?? 1.0,
locale: Localizations.localeOf(context),
textDirection: Directionality.of(context),
size: Size(35.w, 35.h),
platform: defaultTargetPlatform,
), "assets/image/icon_map_marker.png");
markers.addAll(storeList.map((element) => Marker(
position: LatLng(double.tryParse(element.latitude),
double.tryParse(element.longitude)),
anchor: Offset(0.5, 0.8),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRose),
anchor: Offset(0.5, 0.9),
clickable: false,
icon: bitmapDescriptor,
infoWindowEnable: true,
)));
setState(() {});
@ -246,55 +257,74 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
child: Scaffold(
resizeToAvoidBottomInset: true,
body: NestedScrollView(
physics: BouncingScrollPhysics(),
physics: PageScrollPhysics(),
headerSliverBuilder: (context, inner) {
return [
buildSliverAppBar(AMapWidget(
initialCameraPosition: CameraPosition(
target: LatLng(30.553111, 114.342366),
zoom: 12.0,
),
onMapCreated: onMapCreated,
apiKey: aMapApiKeys,
touchPoiEnabled: true,
markers: markers.toSet(),
scrollGesturesEnabled: true,
customStyleOptions: _customStyleOptions,
onPoiTouched: (poiTouch) {
FocusScope.of(context).requestFocus(FocusNode());
},
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer()),
].toSet(),
)),
SliverOverlapAbsorber(
sliver: buildSliverAppBar(AMapWidget(
initialCameraPosition: CameraPosition(
target: LatLng(30.553111, 114.342366),
zoom: 12.0,
),
onMapCreated: onMapCreated,
apiKey: aMapApiKeys,
touchPoiEnabled: true,
markers: markers.toSet(),
scrollGesturesEnabled: true,
customStyleOptions: _customStyleOptions,
onPoiTouched: (poiTouch) {
FocusScope.of(context).requestFocus(FocusNode());
},
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer()),
].toSet(),
)),
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
)
];
},
body: Container(
child: SmartRefresher(
controller: refreshController,
enablePullUp: false,
enablePullDown: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
onRefresh: () {
startLocation();
},
child: ListView.builder(
itemCount: storeList == null ? 0 : storeList.length,
padding: EdgeInsets.only(top: 8.h, bottom: 84.h),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/union_detail_page',
arguments: {"id": storeList[position].id});
},
child: buildStoreItem(storeList[position], position),
);
}),
),
),
body: Builder(
builder: (context) {
return CustomScrollView(
physics: NeverScrollableScrollPhysics(),
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
),
SliverToBoxAdapter(
child: Container(
height: MediaQuery.of(context).size.height - 102.h - MediaQuery.of(context).padding.top,
child: SmartRefresher(
controller: refreshController,
enablePullUp: false,
enablePullDown: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
onRefresh: () {
startLocation();
},
child: ListView.builder(
itemCount: storeList == null ? 0 : storeList.length,
padding: EdgeInsets.only(top: 8.h, bottom: 84.h + (375.h - 88.h) + 4.h),
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/union_detail_page',
arguments: {"id": storeList[position].id});
},
child: buildStoreItem(storeList[position], position),
);
}),
),
),
),
],
);
},
)
),
),
);
@ -308,18 +338,6 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
return;
}
}
// bool isShown = await Permission.location.shouldShowRequestRationale;
// if (isShown) {
// Fluttertoast.showToast(
// msg: "shouldShowRequestRationale",
// toastLength: Toast.LENGTH_SHORT,
// gravity: ToastGravity.CENTER,
// timeInSecForIosWeb: 1,
// backgroundColor: Colors.red,
// textColor: Colors.white,
// fontSize: 16.0.sp,
// );
// }
if (await Permission.location.isPermanentlyDenied) {
requestDialog();
refreshController.refreshCompleted();
@ -386,15 +404,16 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
Widget buildSliverAppBar(AMapWidget map) {
return SliverAppBar(
//
// floating: true,
// snap: true,
pinned: true,
floating: true,
snap: true,
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
automaticallyImplyLeading: false,
title: Container(
height: 36.h,
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
margin: EdgeInsets.fromLTRB(16.w,0, 16.w, 0),
padding: EdgeInsets.fromLTRB(13.w, 6.h, 16.w, 6.h),
decoration: BoxDecoration(
color: Colors.white,

Loading…
Cancel
Save