Browse Source

Merge branch 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/generated/l10n.dart
	lib/home/home_page.dart
	lib/l10n/intl_en.arb
	lib/l10n/intl_zh_CN.arb
	lib/l10n/intl_zh_TW.arb
	pubspec.lock
null_safety
哈哈哈 4 years ago
parent
commit
f362c21d99
  1. 3
      android/app/src/debug/AndroidManifest.xml
  2. 2
      android/app/src/main/assets/data/dcloud_control.xml
  3. 3
      android/app/src/profile/AndroidManifest.xml
  4. BIN
      assets/image/2x/icon_founder.png
  5. BIN
      assets/image/3x/icon_founder.png
  6. BIN
      assets/image/icon_founder.png
  7. 29
      ios/Runner.xcodeproj/project.pbxproj
  8. 2
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  9. 3
      ios/Runner/AppDelegate.m
  10. 4
      ios/Runner/Info.plist
  11. 1
      ios/Runner/zh-Hans.lproj/LaunchScreen.strings
  12. 1
      ios/Runner/zh-Hans.lproj/Main.strings
  13. 1
      ios/Runner/zh-Hant.lproj/LaunchScreen.strings
  14. 1
      ios/Runner/zh-Hant.lproj/Main.strings
  15. 14
      ios/en.lproj/InfoPlist.strings
  16. 15
      ios/zh-Hans.lproj/InfoPlist.strings
  17. 14
      ios/zh-Hant.lproj/InfoPlist.strings
  18. 5
      lib/generated/intl/messages_en.dart
  19. 6
      lib/generated/intl/messages_zh_CN.dart
  20. 7
      lib/generated/intl/messages_zh_TW.dart
  21. 50
      lib/generated/l10n.dart
  22. 114
      lib/home/home_page.dart
  23. 15
      lib/home/huixiang_brand_page.dart
  24. 6
      lib/home/points_mall_page.dart
  25. 2
      lib/integral/integral_page.dart
  26. 2
      lib/integral_store/integral_store_details_page.dart
  27. 5
      lib/l10n/intl_en.arb
  28. 7
      lib/l10n/intl_zh_TW.arb
  29. 12
      lib/login/login_page.dart
  30. 3
      lib/main_page.dart
  31. 2
      lib/mine/mine_page.dart
  32. 2
      lib/mine/mine_vip_level_page.dart
  33. 229
      lib/order/logistics_information_page.dart
  34. 34
      lib/order/order_detail_page.dart
  35. 7
      lib/order/order_history_page.dart
  36. 3
      lib/order/store_selector_page.dart
  37. 113
      lib/setting/setting_page.dart
  38. 103
      lib/union/union_details_page.dart
  39. 376
      lib/union/union_page.dart
  40. 57
      lib/utils/flutter_utils.dart
  41. 18
      lib/utils/min.dart
  42. 2
      lib/view_widget/custom_image.dart
  43. 298
      pubspec.lock
  44. 4
      pubspec.yaml

3
android/app/src/debug/AndroidManifest.xml

@ -3,5 +3,8 @@
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

2
android/app/src/main/assets/data/dcloud_control.xml

@ -1,4 +1,4 @@
<hbuilder version="1.9.9.80110" debug="false" syncDebug ="true">
<hbuilder version="1.9.9.80110" debug="false" syncDebug ="false">
<apps>
<app appid="__UNI__ACD00DA" appver="1.0"/>
<app appid="__UNI__ACD00DA" appver="1.0"/>

3
android/app/src/profile/AndroidManifest.xml

@ -3,5 +3,8 @@
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

BIN
assets/image/2x/icon_founder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
assets/image/3x/icon_founder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
assets/image/icon_founder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

29
ios/Runner.xcodeproj/project.pbxproj

@ -45,6 +45,7 @@
6EE8F376269581FB00237A5E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F375269581FB00237A5E /* AddressBook.framework */; };
6EE8F3782695820600237A5E /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3772695820600237A5E /* libiconv.tbd */; };
6EE8F37F269582C200237A5E /* UniappPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE8F37E269582C200237A5E /* UniappPlugin.m */; };
899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 899C4C3E26A5179900B44087 /* InfoPlist.strings */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@ -187,6 +188,13 @@
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
89847A4826A14482008C8077 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
899C4C3826A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
899C4C3926A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
899C4C3A26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = "<group>"; };
899C4C3B26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
899C4C3D26A5179900B44087 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
899C4C3F26A5179F00B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
899C4C4026A517A000B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -429,6 +437,7 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
899C4C3E26A5179900B44087 /* InfoPlist.strings */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
@ -518,6 +527,8 @@
knownRegions = (
en,
Base,
"zh-Hans",
"zh-Hant",
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@ -543,6 +554,7 @@
6EE8F3482695816000237A5E /* unincomponents.ttf in Resources */,
6EE8F34A2695816000237A5E /* weexUniJs.js in Resources */,
6EE8F3492695816000237A5E /* weex-polyfill.js in Resources */,
899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */,
6EE8F3462695816000237A5E /* uni-jsframework.js in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -634,10 +646,22 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
899C4C3E26A5179900B44087 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
899C4C3D26A5179900B44087 /* en */,
899C4C3F26A5179F00B44087 /* zh-Hans */,
899C4C4026A517A000B44087 /* zh-Hant */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
899C4C3826A5171500B44087 /* zh-Hans */,
899C4C3A26A5174A00B44087 /* zh-Hant */,
);
name = Main.storyboard;
sourceTree = "<group>";
@ -646,6 +670,8 @@
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
899C4C3926A5171500B44087 /* zh-Hans */,
899C4C3B26A5174A00B44087 /* zh-Hant */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
@ -657,6 +683,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -800,6 +827,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -855,6 +883,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";

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

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

3
ios/Runner/AppDelegate.m

@ -35,7 +35,8 @@
[DCUniMPSDKEngine closeUniMP];
}
if ([method isEqual:@"getAppBasePath"]) {
result([DCUniMPSDKEngine getActiveUniMPAppid]);
NSString * appid = [call.arguments valueForKey:@"appid"];
result([DCUniMPSDKEngine getAppRunPathWithAppid:appid]);
}
if ([method isEqual:@"runingAppid"]) {
result([DCUniMPSDKEngine getActiveUniMPAppid]);

4
ios/Runner/Info.plist

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>回乡</string>
<string>迴響</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -52,7 +52,7 @@
<key>NSLocationAlwaysUsageDescription</key>
<string>是否允许访问位置信息</string>
<key>NSLocationUsageDescription</key>
<string></string>
<string>定位</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>定位</string>
<key>NSMicrophoneUsageDescription</key>

1
ios/Runner/zh-Hans.lproj/LaunchScreen.strings

@ -0,0 +1 @@

1
ios/Runner/zh-Hans.lproj/Main.strings

@ -0,0 +1 @@

1
ios/Runner/zh-Hant.lproj/LaunchScreen.strings

@ -0,0 +1 @@

1
ios/Runner/zh-Hant.lproj/Main.strings

@ -0,0 +1 @@

14
ios/en.lproj/InfoPlist.strings

@ -0,0 +1,14 @@
/*
InfoPlist.strings
Runner
Created by 冯美坎 on 2021/7/19.
*/
CFBundleName="huixiang";
CFBundleDisplayName="huixiang";
NSCameraUsageDescription="您的相机权限将用于更新头像使用";
NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用";
NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";
NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";

15
ios/zh-Hans.lproj/InfoPlist.strings

@ -0,0 +1,15 @@
/*
InfoPlist.strings
Runner
Created by 冯美坎 on 2021/7/19.
*/
CFBundleName="回乡";
CFBundleDisplayName="回乡";
NSCameraUsageDescription="您的相机权限将用于更新头像使用";
NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用";
NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";
NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";

14
ios/zh-Hant.lproj/InfoPlist.strings

@ -0,0 +1,14 @@
/*
InfoPlist.strings
Runner
Created by 冯美坎 on 2021/7/19.
*/
CFBundleName="迴響";
CFBundleDisplayName="迴響";
NSCameraUsageDescription="您的相机权限将用于更新头像使用";
NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用";
NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";
NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店";

5
lib/generated/intl/messages_en.dart

@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary {
"input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"),
"jian" : MessageLookupByLibrary.simpleMessage(""),
"jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"),
"jiesuan" : MessageLookupByLibrary.simpleMessage("结算"),
"jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"),
"jifen" : MessageLookupByLibrary.simpleMessage("积分"),
"jifen_" : m8,
@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"),
"ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"),
"peisong" : MessageLookupByLibrary.simpleMessage("配送"),
@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"),
"qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("输入充值金额(元)"),
"qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"),
@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),
"quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"),
"quanchangzhe" : m15,
"quantian" : MessageLookupByLibrary.simpleMessage("全天"),
"quanxian" : MessageLookupByLibrary.simpleMessage("权限"),
"quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
@ -405,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m28,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"),
"yunfei" : MessageLookupByLibrary.simpleMessage("运费"),
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),

6
lib/generated/intl/messages_zh_CN.dart

@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary {
"input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"),
"jian" : MessageLookupByLibrary.simpleMessage(""),
"jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"),
"jiesuan" : MessageLookupByLibrary.simpleMessage("结算"),
"jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"),
"jifen" : MessageLookupByLibrary.simpleMessage("积分"),
"jifen_" : m8,
@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"),
"ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"),
"peisong" : MessageLookupByLibrary.simpleMessage("配送"),
@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"),
"qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("输入充值金额(元)"),
"qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"),
@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),
"quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"),
"quanchangzhe" : m15,
"quantian" : MessageLookupByLibrary.simpleMessage("全天"),
"quanxian" : MessageLookupByLibrary.simpleMessage("权限"),
"quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
@ -405,12 +409,12 @@ class MessageLookup extends MessageLookupByLibrary {
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m28,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"),
"yunfei" : MessageLookupByLibrary.simpleMessage("运费"),
"yuyan" : MessageLookupByLibrary.simpleMessage("语言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"),
"zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"),
"zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"),
"zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"),
"zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"),

7
lib/generated/intl/messages_zh_TW.dart

@ -53,7 +53,7 @@ class MessageLookup extends MessageLookupByLibrary {
static m16(num) => "取膽號${num}";
static m17(ren) => "${ren}/人";
static m17(ren) => "¥${ren}/人";
static m18(second) => "${second}s后重新發送";
@ -179,6 +179,7 @@ class MessageLookup extends MessageLookupByLibrary {
"input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"),
"jian" : MessageLookupByLibrary.simpleMessage(""),
"jiazaishibai" : MessageLookupByLibrary.simpleMessage("加載失敗"),
"jiesuan" : MessageLookupByLibrary.simpleMessage("結算"),
"jiesuanjine" : MessageLookupByLibrary.simpleMessage("結算金額"),
"jifen" : MessageLookupByLibrary.simpleMessage("積分"),
"jifen_" : m8,
@ -234,6 +235,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"),
"ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一個新訂單"),
"peisong" : MessageLookupByLibrary.simpleMessage("配送"),
@ -253,6 +255,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"),
"qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"),
"qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往一心回乡旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"),
"qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"),
"qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"),
"qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("輸入充值金額(元)"),
"qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"),
@ -272,6 +275,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"),
"quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全場通用"),
"quanchangzhe" : m15,
"quantian" : MessageLookupByLibrary.simpleMessage("全天"),
"quanxian" : MessageLookupByLibrary.simpleMessage("權限"),
"quanxianshezhi" : MessageLookupByLibrary.simpleMessage("權限設置"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"),
@ -405,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yue" : MessageLookupByLibrary.simpleMessage("餘額"),
"yue_" : m28,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"),
"yunfei" : MessageLookupByLibrary.simpleMessage("運費"),
"yuyan" : MessageLookupByLibrary.simpleMessage("語言"),
"zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),

50
lib/generated/l10n.dart

@ -3435,6 +3435,16 @@ class S {
);
}
/// ``
String get nindingweiquanxianweiyunxu {
return Intl.message(
'您未开启位置权限,请点击确定申请权限',
name: 'nindingweiquanxianweiyunxu',
desc: '',
args: [],
);
}
/// `使使`
String get weilexiangnintuijianfujindemendianxinxi {
return Intl.message(
@ -3495,6 +3505,46 @@ class S {
);
}
/// ``
String get quantian {
return Intl.message(
'全天',
name: 'quantian',
desc: '',
args: [],
);
}
/// ``
String get yunfei {
return Intl.message(
'运费',
name: 'yunfei',
desc: '',
args: [],
);
}
/// ``
String get jiesuan {
return Intl.message(
'结算',
name: 'jiesuan',
desc: '',
args: [],
);
}
/// ``
String get qinglihuancun {
return Intl.message(
'清理缓存',
name: 'qinglihuancun',
desc: '',
args: [],
);
}
/// ``
String get guanyuchuangshiren {
return Intl.message(

114
lib/home/home_page.dart

@ -1,6 +1,7 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/article.dart';
@ -16,7 +17,6 @@ import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/hot_item.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -157,7 +157,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
hotList(),
ItemTitle(
text: S.of(context).chuangshirendegushi,
imgPath: "assets/image/icon_today_task.png",
imgPath: "assets/image/icon_founder.png",
),
GestureDetector(
onTap: () {
@ -396,7 +396,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
),
],
),
),
)
],
),
);
@ -453,42 +453,84 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
}
SwiperController swiperController = SwiperController();
brands() {
return Container(
margin: EdgeInsets.only(bottom: 18),
child: AspectRatio(
aspectRatio: 4.16,
child: Swiper(
key: UniqueKey(),
loop: false,
viewportFraction: 0.32,
scale: 0.70,
index: (brandData != null && brandData.length > 1) ? 1 : 0,
itemBuilder: (context, position) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 3, vertical: 15),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(37),
offset: Offset(0, 2),
blurRadius: 5,
spreadRadius: 0,)
],
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: MImage(
brandData != null ? brandData[position].image : "",
radius: BorderRadius.all(Radius.circular(8)),
fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
),
);
},
itemCount: brandData != null ? brandData.length : 0),
height: 90.h,
margin: EdgeInsets.only(bottom: 18.h),
child: ListView.builder(
padding: EdgeInsets.only(left: 10.w, right: 10.w),
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return Container(
height: 60.h,
width: 120.w,
margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(37),
offset: Offset(0, 2),
blurRadius: 5,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: MImage(
brandData != null ? brandData[position].image : "",
radius: BorderRadius.circular(8),
fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
),
);
},
itemCount:
(brandData != null && brandData.length > 0) ? brandData.length : 0,
),
// child: AspectRatio(
// aspectRatio: 4.16,
// child: Swiper(
// scrollDirection: Axis.horizontal,
// controller: swiperController,
// loop: false,
// viewportFraction: 0.32,
// scale: 0.70,
// index: (brandData != null && brandData.length > 0) ? 1 : 0,
// itemBuilder: (context, position) {
// if (brandData == null || brandData.length == 0) {
// return Container();
// }
// return Container(
// margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h),
// decoration: BoxDecoration(
// color: Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(37),
// offset: Offset(0, 2),
// blurRadius: 5,
// spreadRadius: 0,
// )
// ],
// borderRadius: BorderRadius.circular(8),
// ),
// child: MImage(
// brandData != null ? brandData[position].image : "",
// radius: BorderRadius.circular(8),
// fit: BoxFit.cover,
// errorSrc: "assets/image/default_2_1.png",
// fadeSrc: "assets/image/default_2_1.png",
// ),
// );
// },
// itemCount: (brandData != null && brandData.length > 0) ? brandData.length : 1,
// ),
// ),
);
}

15
lib/home/huixiang_brand_page.dart

@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/image_render.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/banner.dart';
@ -30,7 +30,7 @@ class BrandPage extends StatefulWidget {
class _BrandPage extends State<BrandPage>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ScrollController tabController;
ScrollController scrollController;
List<String> images = [
"assets/image/icon_chili.png",
@ -90,9 +90,10 @@ class _BrandPage extends State<BrandPage>
context: context, token: value.getString('token')),
queryHome(),
});
if (scrollController == null)
scrollController = ScrollController();
if (tabController == null) tabController = ScrollController();
tabController.addListener(() {
scrollController.addListener(() {
RenderBox chiliRenderBox =
chiliGlobalKey.currentContext.findRenderObject();
RenderBox milkTeaRenderBox =
@ -172,9 +173,9 @@ class _BrandPage extends State<BrandPage>
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
physics: ClampingScrollPhysics(),
onRefresh: queryHome,
scrollController: tabController,
scrollController: scrollController,
child: Container(
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
@ -283,7 +284,7 @@ class _BrandPage extends State<BrandPage>
breadGlobalKey.currentContext.findRenderObject().parentData;
}
double offset = parendData.offset.dy - 52.h + 20.h;
tabController.animateTo(offset,
scrollController.animateTo(offset,
duration: Duration(seconds: 1), curve: Curves.ease);
},
child: tabItem(text, isSelected, index),

6
lib/home/points_mall_page.dart

@ -4,6 +4,7 @@ import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -14,7 +15,6 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -385,8 +385,8 @@ class _PointsMallPage extends State<PointsMallPage>
children: [
Image.asset(
"assets/image/icon_an_crown.png",
width: 13,
height: 13,
width: 14,
height: 14,
),
SizedBox(
width: 5,

2
lib/integral/integral_page.dart

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -12,7 +13,6 @@ import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

2
lib/integral_store/integral_store_details_page.dart

@ -2,9 +2,9 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/user_info.dart';

5
lib/l10n/intl_en.arb

@ -356,12 +356,17 @@
"gong": "共",
"jian": "件",
"nindingweigongnengweikaiqi": "您定位功能开关未开启,请点击去打開定位",
"nindingweiquanxianweiyunxu": "您未开启位置权限,请点击确定申请权限",
"weilexiangnintuijianfujindemendianxinxi": "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息",
"dengdaishangjiaqueren": "等待商家确认",
"dingdandaifahuo": "订单待发货",
"gengduo": "更多",
"jituanchuangbanren": "集团创办人",
"zhengzaijiazai": "正在加载",
"quantian": "全天",
"yunfei": "运费",
"jiesuan": "结算",
"qinglihuancun": "清理缓存",
"guanyuchuangshiren": "关于创始人",

7
lib/l10n/intl_zh_TW.arb

@ -29,7 +29,7 @@
"jingbilianmenghuiyuandian": "净幣聯盟會員店",
"gongli": "{km}公里",
"manlijiandaijinquan": "滿{man}立減{jian}代金券",
"ren": "{ren}/人",
"ren": "¥{ren}/人",
"youxiaoqizhi": "有效期至{date}",
"huodongjinxingzhong": "活動進行中",
"yiyoujifen": "已有積分",
@ -350,12 +350,17 @@
"gong": "共",
"jian": "件",
"nindingweigongnengweikaiqi": "您定位功能開關未開啟,請點擊去開啟定位",
"nindingweiquanxianweiyunxu": "您未开启位置权限,请点击确定申请权限",
"weilexiangnintuijianfujindemendianxinxi": "為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息",
"dengdaishangjiaqueren": "等待商家確認",
"dingdandaifahuo": "訂單待發貨",
"gengduo": "更多",
"jituanchuangbanren": "集团创办人",
"zhengzaijiazai": "正在加載",
"quantian": "全天",
"yunfei": "運費",
"jiesuan": "結算",
"qinglihuancun": "清理緩存",
"guanyuchuangshiren": "關於創始人",

12
lib/login/login_page.dart

@ -16,7 +16,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:dio/dio.dart';
import 'package:huixiang/view_widget/loading_view.dart';
import 'package:photo_view/photo_view.dart';
// import 'package:photo_view/photo_view.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LoginPage extends StatefulWidget {
@ -380,11 +380,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
child: Stack(
alignment: Alignment.center,
children: [
PhotoView(
imageProvider: AssetImage("assets/image/laoban.png"),
initialScale: Platform.isAndroid ? 1.02 : 1.2,
basePosition: alignmentProgress,
),
// PhotoView(
// imageProvider: AssetImage("assets/image/laoban.png"),
// initialScale: Platform.isAndroid ? 1.02 : 1.2,
// basePosition: alignmentProgress,
// ),
Container(
decoration: BoxDecoration(
color: Color(0xFF32A060).withAlpha(changeAlpha),

3
lib/main_page.dart

@ -136,6 +136,9 @@ class _MainPage extends State<MainPage> {
onTap: () {
setState(() {
clickIndex = index;
// if (index == 1) {
// debugDumpApp();
// }
pageController.jumpToPage(clickIndex);
});
},

2
lib/mine/mine_page.dart

@ -161,7 +161,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
mineList(context),
],
),
buildNotice(),
// buildNotice(),
],
),
),

2
lib/mine/mine_vip_level_page.dart

@ -1,13 +1,13 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/rank.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';

229
lib/order/logistics_information_page.dart

@ -42,64 +42,75 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
titleSpacing: 2,
leadingWidth: 56,
),
body:Container(
body: Container(
height: MediaQuery.of(context).size.height,
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child:Column(
child: Column(
children: [
_orderInformation(),
SizedBox(
height: 16,
),
Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(8),
bottomRight: Radius.circular(4),
Expanded(
child: Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(8),
bottomRight: Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding:EdgeInsets.only(bottom: 32),
child:Text("订单跟踪",style: TextStyle(fontSize:16,fontWeight: FontWeight.bold,color: Color(0xff353535)),),),
SizedBox(
height: 500,
child: ListView.builder(
itemCount: 8,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return orderTrackItem(position);
},
Padding(
padding: EdgeInsets.only(bottom: 32),
child: Text(
"订单跟踪",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color(0xff353535)),
),
),
]
ListView.builder(
itemCount: 8,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return Container(
child: orderTrackItem(position),
);
},
),
],
),
),
),
flex: 1,
)
],
),
),
),
);
}
Widget _orderInformation() {
return Container(
margin: EdgeInsets.only(left: 16,right: 16),
return Container(
margin: EdgeInsets.only(left: 16, right: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
@ -128,8 +139,9 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
fit: BoxFit.cover,
),
Container(
padding: EdgeInsets.only(left: 32,right: 32,top: 5,bottom:5),
decoration:BoxDecoration(
padding:
EdgeInsets.only(left: 32, right: 32, top: 5, bottom: 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(0),
bottomLeft: Radius.circular(4),
@ -138,9 +150,9 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
),
color: Color(0x53000000),
),
child:Text(
child: Text(
"共3件",
style:TextStyle(
style: TextStyle(
fontSize: 12,
color: Colors.white,
),
@ -173,8 +185,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14,
fontWeight: FontWeight.bold
),
fontWeight: FontWeight.bold),
)
],
),
@ -232,60 +243,86 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
}
Widget orderTrackItem(var position) {
return Row(
children: [
Column(
children: [
Text("11-27",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Color(0xff353535)),),
SizedBox(
height:5,
),
Text("12:23",style: TextStyle(fontSize:12,color: Color(0xff868686)),),
],
),
SizedBox(
width: 28,
),
Column(
children: [
Image.asset(
"assets/image/icon_sign.png",
width: 24,
height: 24,
),
Container(
width: 1,
height: 30,
decoration: new BoxDecoration(
color: position < 7 ? Colors.black : Colors.white,
),
)
],
),
SizedBox(
width: 28,
return Container(
width: double.infinity,
height: 50,
child: Row(
children: [
Column(
children: [
Text(
"11-27",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xff353535)),
),
SizedBox(
height: 5,
),
Text(
"12:23",
style: TextStyle(fontSize: 12, color: Color(0xff868686)),
),
],
),
SizedBox(
width: 28,
),
Column(
children: [
Image.asset(
"assets/image/icon_sign.png",
width: 24,
height: 24,
),
Container(
width: 1,
height: 30,
decoration: new BoxDecoration(
color: position < 7 ? Colors.black : Colors.white,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("已签收",style: TextStyle(fontSize:14,fontWeight: FontWeight.bold,color: Colors.black),),
SizedBox(
height: 10,
),
Row(
children: [
Text("快件已在泉州市签收",style: TextStyle(fontSize:12,color: Color(0xff353535)),),
SizedBox(
width: 9,
),
Text("签收人 张三",style: TextStyle(fontSize:12,color: Color(0xff353535)),),
],
)
],
),
SizedBox(
width: 28,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"已签收",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black),
),
SizedBox(
height: 10,
),
Row(
children: [
Expanded(
child: Text(
"快件已在泉州市签收",
style: TextStyle(fontSize: 12, color: Color(0xff353535)),
),
],
),
],
);
flex: 1,
),
SizedBox(
width: 9,
),
Text(
"签收人 张三",
style: TextStyle(fontSize: 12, color: Color(0xff353535)),
),
],
),
],
),
],
),
);
}
}

34
lib/order/order_detail_page.dart

@ -168,11 +168,10 @@ class _OrderDetailPage extends State<OrderDetailPage> {
children: timeWidget(),
),
),
visible: (orderStatus >= 4) ? false : (isTakeOut == 0)
? !(payStatus == 1)
visible: (orderStatus >= 4 || isTakeOut == 2) ? false
: (isTakeOut == 0) ? !(payStatus == 1)
: (isTakeOut == 1)
? !(payStatus == 1 &&
(sendStatus != 2 && sendStatus != 3))
? !(payStatus == 1 && (sendStatus != 2 && sendStatus != 3))
: !(payStatus == 1 && (sendStatus != 1)),
)
],
@ -252,15 +251,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
minute = hourMinutes[1];
}
} else if (isTakeOut == 2) {
if (sendStatus == 1) {
String hourMinute = AppUtils.getHourMinuteByString(
(orderInfo != null && orderInfo.orderDetail != null)
? orderInfo.orderDetail.predictTime
: "");
var hourMinutes = hourMinute.split(":");
hour = hourMinutes[0];
minute = hourMinutes[1];
}
// if (sendStatus == 1) {
// String hourMinute = AppUtils.getHourMinuteByString(
// (orderInfo != null && orderInfo.orderDetail != null)
// ? orderInfo.orderDetail.predictTime
// : "");
// var hourMinutes = hourMinute.split(":");
// hour = hourMinutes[0];
// minute = hourMinutes[1];
// }
}
}
return [
@ -319,7 +318,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
break;
case 3:
title = S.of(context).dengdaiyonghuqucan;
center = S.of(context).qucanhao;
center = S.of(context).qudanhao(orderInfo.dayFlowCode);
break;
case 4:
title = S.of(context).dingdanyiwancheng;
@ -433,7 +432,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"合计",
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
color: Colors.black,
@ -463,7 +462,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
color: Color(0xFF32A060),
padding: EdgeInsets.symmetric(horizontal: 36.w),
child: Text(
"结算",
S.of(context).jiesuan,
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
@ -855,8 +854,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
if (orderInfo.isTakeOut != 0) {
//
widgets.add(
discountItem(Color(0xFFFF7A1A), "配送费", "", "+${orderInfo.postFee}"));
widgets.add(discountItem(Color(0xFFFF7A1A), orderInfo.isTakeOut == 1 ? S.of(context).peisongfei : S.of(context).yunfei, "", "+${orderInfo.postFee}"));
}
if (orderInfo.orderDetail != null &&

7
lib/order/order_history_page.dart

@ -441,7 +441,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
orderInfo.isTakeOut,
orderInfo.sendStatus,
orderInfo.refundStatus,
)
orderInfo.dayFlowCode
)
: [],
),
],
@ -545,7 +546,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
}
List<Widget> statusBtn(
payStatus, orderStatus, isTakeOut, sendStatus, refundStatus) {
payStatus, orderStatus, isTakeOut, sendStatus, refundStatus, dayFlowCode) {
if (refundStatus == 1) {
return [
RoundButton(
@ -671,7 +672,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
margin: EdgeInsets.only(left: 37.w),
alignment: Alignment.centerLeft,
child: Text(
S.of(context).qudanhao("123"),
S.of(context).qudanhao(dayFlowCode),
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,

3
lib/order/store_selector_page.dart

@ -105,7 +105,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
fontSize: 16.0);
}
if (await Permission.location.isPermanentlyDenied) {
//openAppSettings
openAppSettings();
getLatLng();
} else if (await Permission.location.isGranted) {
showCupertinoDialog(
@ -120,6 +120,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
if (permissionStatus.isGranted) {
startLocation();
} else {
openAppSettings();
getLatLng();
}
}

113
lib/setting/setting_page.dart

@ -1,11 +1,18 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/login/login_page.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
class SettingPage extends StatefulWidget {
@override
@ -17,10 +24,18 @@ class SettingPage extends StatefulWidget {
class _SettingPage extends State<SettingPage> {
String locale = "tw";
String cacheTotal = "0B";
@override
void initState() {
super.initState();
setLanguage();
AppUtils.total().then((value) {
cacheTotal = (value > 0) ? "${(value / 1024.0 ~/ 1024.0)}M" : "0B";
setState(() {});
});
}
setLanguage() async {
@ -92,37 +107,38 @@ class _SettingPage extends State<SettingPage> {
GestureDetector(
onTap: () {
showCupertinoModalPopup(
context: context,
builder: (contetx) {
return CupertinoActionSheet(
title: Text("更换语言"),
actions: [
CupertinoActionSheetAction(
child: Text('简体中文'),
onPressed: () {
changeLanguage("zh");
},
isDefaultAction: true,
isDestructiveAction: false,
),
CupertinoActionSheetAction(
child: Text('繁体中文'),
onPressed: () {
changeLanguage("tw");
},
isDefaultAction: true,
isDestructiveAction: false,
),
],
cancelButton: CupertinoActionSheetAction(
context: context,
builder: (contetx) {
return CupertinoActionSheet(
title: Text("更换语言"),
actions: [
CupertinoActionSheetAction(
child: Text('简体中文'),
onPressed: () {
changeLanguage("zh");
},
isDefaultAction: true,
isDestructiveAction: false,
),
CupertinoActionSheetAction(
child: Text('繁体中文'),
onPressed: () {
Navigator.of(context).pop();
changeLanguage("tw");
},
child: Text("取消"),
isDestructiveAction: true,
isDefaultAction: true,
isDestructiveAction: false,
),
);
});
],
cancelButton: CupertinoActionSheetAction(
onPressed: () {
Navigator.of(context).pop();
},
child: Text("取消"),
isDestructiveAction: true,
),
);
},
);
},
child: settingItem(
S.of(context).yuyan,
@ -143,6 +159,12 @@ class _SettingPage extends State<SettingPage> {
Navigator.of(context).pushNamed('/router/help_feedback_page');
},
),
GestureDetector(
child: settingItem(S.of(context).qinglihuancun, cacheTotal),
onTap: () {
clearCache();
},
),
GestureDetector(
child: settingSingleItem(S.of(context).guanyu),
onTap: () {
@ -181,12 +203,35 @@ class _SettingPage extends State<SettingPage> {
);
}
// changeEnv(env){
// SharedPreferences.getInstance().then((value) => {
// value.setString("env", env),
// });
// Navigator.of(context).pop();
// }
clearCache() async {
if (Platform.isAndroid) {
if(!(await Min.isInitialize())) {
await Min.initialize();
}
}
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
List<String> miniAppids = sharedPreferences.getStringList("miniAppid");
if (miniAppids != null && miniAppids.length > 0) {
miniAppids.forEach((element) async {
print("appid: $element");
String path = await Min.getAppBasePath(element);
AppUtils.deleteDirectory(Directory(path));
String filePath = "";
if (Platform.isAndroid) {
filePath = (await getExternalStorageDirectory()).path;
} else {
filePath = (await getApplicationDocumentsDirectory()).path;
}
AppUtils.deleteDirectory(Directory(filePath));
});
sharedPreferences.setStringList("miniAppid", []);
}
cacheTotal = "0B";
setState(() {});
}
changeLanguage(language) {
if (language == "zh") {

103
lib/union/union_details_page.dart

@ -5,6 +5,7 @@ import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -16,9 +17,10 @@ import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -71,30 +73,12 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
title: Text(
storeInfo == null ? "" : storeInfo.storeName,
style: TextStyle(color: Colors.black87),
),
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6.w),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24.w,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
background: Color(0xFFF7F7F7),
title: storeInfo == null ? "" : storeInfo.storeName,
titleColor: Colors.black87,
titleSize: 18.sp,
leadingColor: Colors.black,
),
body: Column(
children: [
@ -378,12 +362,12 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
Widget buildCoupon() {
return Container(
height: 109,
height: 109.h,
child: ListView.builder(
itemCount: (storeInfo != null && storeInfo.couponVOList != null)
? storeInfo.couponVOList.length
: 0,
physics: BouncingScrollPhysics(),
physics: BouncingScrollPhysics(parent: PageScrollPhysics()),
scrollDirection: Axis.horizontal,
itemBuilder: (context, position) {
return Container(
@ -414,7 +398,10 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
margin: EdgeInsets.only(left: 5),
child: Text.rich(TextSpan(children: [
TextSpan(
text: "¥",
text: (storeInfo !=
null &&
storeInfo.couponVOList != null && storeInfo.couponVOList[position]
.bizType == 1) ? "¥" : "",
style: TextStyle(
fontSize: 22.sp,
color: Color(0xFFFF7A1A),
@ -422,7 +409,12 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
),
),
TextSpan(
text: "5",
text: (storeInfo !=
null &&
storeInfo.couponVOList != null && storeInfo.couponVOList[position]
.bizType == 1)
? "${double.tryParse(storeInfo.couponVOList[position].discountAmount).toInt()}"
: "${storeInfo.couponVOList[position].discountPercent}",
style: TextStyle(
fontSize: 36.sp,
color: Color(0xFFFF7A1A),
@ -515,6 +507,8 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
? "${storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}"
: "",
),
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 8.sp,
color: Color(0xFFA29E9E),
@ -524,14 +518,20 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
),
),
),
Container(
height: 25.h,
child: RoundButton(
text: S.of(context).lingqu,
textColor: Colors.white,
backgroup: Color(0xFF32A060),
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
fontSize: 12.sp,
InkWell(
onTap: () {
receiveCoupon(storeInfo.couponVOList[position].id);
},
child: Container(
height: 25.h,
child: RoundButton(
text: S.of(context).lingqu,
textColor: Colors.white,
backgroup: (storeInfo != null && storeInfo
.couponVOList != null && storeInfo.couponVOList[position].status >= 2) ? Colors.grey : Color(0xFF32A060),
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
fontSize: 12.sp,
),
),
),
],
@ -545,6 +545,29 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
);
}
///
receiveCoupon(couponId) async {
BaseData baseData = await apiService.receiveCoupon(couponId);
if (baseData.isSuccess) {
queryStoreInfo();
showAlertDialog();
} else {
Fluttertoast.showToast(msg: baseData.msg);
}
}
///
showAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return ReceiveSuccess();
},
);
}
///VIP
receiveVip() async {
BaseData baseData = await apiService.minLogin(storeInfo.id);
if (baseData != null && baseData.isSuccess) {
@ -697,6 +720,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
position < storeInfo.bannerList.length)
? storeInfo.bannerList[position].imgUrl
: "",
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_2_1.png",
@ -713,7 +737,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
printMin() async {
String miniAppId = storeInfo.mini.miniAppId;
print("print isExistsApp: ${await Min.isExistsApp(miniAppId)}");
print("print getAppBasePath: ${await Min.getAppBasePath()}");
print("print getAppBasePath: ${await Min.getAppBasePath(miniAppId)}");
print("print currentPageUrl: ${await Min.currentPageUrl()}");
print("print runingAppid: ${await Min.runingAppid()}");
print("print getAppVersionInfo: ${await Min.getAppVersionInfo(miniAppId)}");
@ -856,6 +880,9 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
});
if (response.statusCode == 200) {
downText = "下载完成";
SharedPreferences.getInstance().then((value) {
value.setStringList("miniAppid", (value.getStringList("miniAppid") != null ? value.getStringList("miniAppid") : [])..add(appid));
});
state(() {});
Future.delayed(Duration(seconds: 1), () {
if (Navigator.canPop(context)) {

376
lib/union/union_page.dart

@ -38,7 +38,8 @@ class UnionPage extends StatefulWidget {
}
}
class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, WidgetsBindingObserver {
class _UnionPage extends State<UnionPage>
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver {
//使true
CustomStyleOptions _customStyleOptions = CustomStyleOptions(false);
@ -80,7 +81,7 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
print("object: ${MediaQuery.of(context).viewInsets.bottom}");
if(MediaQuery.of(context).viewInsets.bottom == 0){
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (iskeyboardShow) {
iskeyboardShow = false;
//
@ -290,191 +291,179 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
FocusScope.of(context).requestFocus(FocusNode());
},
child: Scaffold(
resizeToAvoidBottomInset: true,
body: NestedScrollView(
physics: PageScrollPhysics(),
headerSliverBuilder: (context, inner) {
return [
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: 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),
);
}),
),
),
),
],
);
},
)),
resizeToAvoidBottomInset: false,
appBar: PreferredSize(
preferredSize: Size(double.infinity, 75.h),
child: buildSearchItem(),
),
body: Column(
children: [
PreferredSize(
preferredSize: Size(double.infinity, 52.h),
child: Container(
padding: EdgeInsets.only(top: 6.h),
color: Color(0xFFFAFAFA),
child: ItemTitle(
text: S.of(context).jingbilianmenghuiyuandian,
imgPath: "assets/image/icon_union_store.png",
),
),
),
buildItem(),
],
),
// body: NestedScrollView(
// physics: PageScrollPhysics(),
// headerSliverBuilder: (context, inner) {
// return [
// 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: Builder(
// builder: (context) {
// return CustomScrollView(
// physics: NeverScrollableScrollPhysics(),
// slivers: [
// SliverOverlapInjector(
// handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
// context),
// ),
// SliverToBoxAdapter(
// child:
// ),
// ],
// );
// },
// ),),
),
);
}
Widget buildItem() {
return 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),
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),
);
}),
),
);
}
startLocation() async {
if (Platform.isAndroid) {
if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) {
enableLocation();
refreshController.refreshCompleted();
return;
}
if (!(await Permission.locationWhenInUse.serviceStatus.isEnabled)) {
enableLocation();
refreshController.refreshCompleted();
return;
}
print("object: isGranted: ${await Permission.location.isGranted}");
print("object: isDenied: ${await Permission.location.isDenied}");
print("object: isLimited: ${await Permission.location.isLimited}");
print("object: isPermanentlyDenied: ${await Permission.location.isPermanentlyDenied}");
print("object: isRestricted: ${await Permission.location.isRestricted}");
print("object: isUndetermined: ${await Permission.location.isUndetermined}");
print("object: shouldShowRequestRationale: ${await Permission.location.shouldShowRequestRationale}");
print("object: status: ${await Permission.location.status}");
print("object: value: -------------------------");
if (await Permission.location.isPermanentlyDenied) {
print("object: requestDialog");
requestDialog();
refreshController.refreshCompleted();
} else if (await Permission.location.isGranted) {
print("object: showLoadingDialog");
showLoadingDialog();
aMapFlutterLocation.startLocation();
} else if (await Permission.location.isUndetermined) {
await Permission.location.request();
refreshController.refreshCompleted();
} else {
if (Platform.isAndroid) {
await Permission.location.request();
} else if (Platform.isIOS) {
if (Platform.isIOS) {
//
iosLocationSetting();
requestDialog();
} else {
await Permission.location.request();
}
refreshController.refreshCompleted();
}
}
iosLocationSetting() async {
enableLocation() {
showCupertinoDialog(
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_permission_location_bg.png",
S.of(context).nindingweigongnengweikaiqi,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).queding,
(result) async {
if (result) {
}
},
heightRatioWithWidth: 0.84,
);
});
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_permission_location_bg.png",
S.of(context).nindingweigongnengweikaiqi,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).dakaidingwei,
(result) async {
if (result) {
final AndroidIntent intent = AndroidIntent(
action: 'action_location_source_settings',
package: "com.zsw.huixiang");
await intent.launch();
// startLocation();
}
},
heightRatioWithWidth: 0.84,
);
},
);
}
enableLocation() {
requestDialog() {
showCupertinoDialog(
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_permission_location_bg.png",
"您定位功能开关未开启,请点击去打開定位",
"为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息",
S.of(context).dakaidingwei,
S.of(context).nindingweiquanxianweiyunxu,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).kaiqiquanxian,
(result) async {
if (result) {
final AndroidIntent intent = AndroidIntent(
action: 'action_location_source_settings',
package: "com.zsw.huixiang");
await intent.launch();
// startLocation();
}
},
heightRatioWithWidth: 0.84,
);
});
}
requestDialog() {
showCupertinoDialog(
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_permission_location_bg.png",
"您未开启位置权限,请点击开启",
"为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息",
S.of(context).kaiqiquanxian, (result) async {
if (result) {
if (Platform.isAndroid) {
final AndroidIntent intent = AndroidIntent(
action: 'action_application_details_settings',
data: 'package:com.zsw.huixiang');
await intent.launch();
await openAppSettings();
if (await Permission.location.isGranted) {
startLocation();
}
}
}
});
},
heightRatioWithWidth: 0.84,
);
});
}
@ -485,6 +474,52 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
_mapController = controller;
}
Widget buildSearchItem() {
return Container(
height: 36.h,
margin: EdgeInsets.fromLTRB(16.w, 40, 16.w, 0),
padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(4)),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
]),
child: TextField(
textInputAction: TextInputAction.search,
onEditingComplete: () {
startLocation();
},
controller: editingController,
cursorHeight: 30.h,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 12.h),
prefixIcon: Icon(
Icons.search,
size: 24,
color: Colors.black,
),
suffixIcon: InkWell(
onTap: () {
editingController.clear();
},
child: Icon(
Icons.close,
size: 19,
color: Colors.grey,
),
),
border: InputBorder.none,
),
),
);
}
Widget buildSliverAppBar(AMapWidget map) {
return SliverAppBar(
//
@ -626,17 +661,21 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
(store.distance ?? 0) > 1000
? S.of(context).gongli(
((store.distance ?? 0) / 1000 * 100).toInt() /
100.0)
: S.of(context).mi(
((store.distance ?? 0) * 100).toInt() / 100.0),
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 12,
Visibility(
child: Text(
(store.distance ?? 0) > 1000
? S.of(context).gongli(
((store.distance ?? 0) / 1000 * 100).toInt() /
100.0)
: S.of(context).mi(
((store.distance ?? 0) * 100).toInt() /
100.0),
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 12,
),
),
visible: store.distance != null,
),
SizedBox(
width: 16.w,
@ -656,7 +695,10 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
)
],
),
Expanded(child: Container(), flex: 1,),
Expanded(
child: Container(),
flex: 1,
),
Container(
child: Text(
S.of(context).manlijiandaijinquan(50, 25),
@ -673,8 +715,8 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
Text(
(store.openStartTime == null &&
store.openEndTime == null)
? "全天"
: "${store.openStartTime}-${store.openEndTime}",
? S.of(context).quantian
: "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))}-${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}",
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 12.sp,
@ -687,7 +729,7 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin, Wi
color: Color(0xFF353535),
fontSize: 12.sp,
),
)
),
],
),
],

57
lib/utils/flutter_utils.dart

@ -1,5 +1,8 @@
import 'dart:io';
import 'package:intl/intl.dart';
import 'package:path_provider/path_provider.dart';
class AppUtils {
@ -69,6 +72,60 @@ class AppUtils {
return DateFormat("HH:mm").format(dateTime); //
}
///
static Future<int> total() async {
Directory tempDir = await getTemporaryDirectory();
if (tempDir == null) return 0;
int total = await _reduce(tempDir);
return total;
}
///
static Future<int> clear() async {
Directory tempDir = await getTemporaryDirectory();
if (tempDir == null) return 0;
await _delete(tempDir);
}
///
static Future<int> _reduce(FileSystemEntity file) async {
///
if (file is File) {
int length = await file.length();
return length;
}
///
if (file is Directory) {
final List<FileSystemEntity> children = file.listSync();
int total = 0;
if (children != null && children.isNotEmpty)
for (final FileSystemEntity child in children)
total += await _reduce(child);
return total;
}
return 0;
}
///
static Future<int> _delete(FileSystemEntity file) async {
if (file is Directory) {
final List<FileSystemEntity> children = file.listSync();
for (final FileSystemEntity child in children) {
await child.delete(recursive: true);
}
} else {
await file.delete();
}
}
///
static Future<int> deleteDirectory(FileSystemEntity file) async {
if (file is Directory) {
final List<FileSystemEntity> children = file.listSync();
for (final FileSystemEntity child in children) {
child.deleteSync(recursive: true);
}
}
}
}

18
lib/utils/min.dart

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/services.dart';
@ -19,11 +20,18 @@ class Min {
return version;
}
static Future<String> getAppBasePath() async {
final String getAppBasePath = await _channel.invokeMethod(
'getAppBasePath',
);
return getAppBasePath;
static Future<String> getAppBasePath(appid) async {
if(Platform.isIOS) {
final String getAppBasePath = await _channel.invokeMethod(
'getAppBasePath', <String, dynamic>{"appid": appid}
);
return getAppBasePath;
} else {
final String getAppBasePath = await _channel.invokeMethod(
'getAppBasePath',
);
return getAppBasePath;
}
}
static Future<String> runingAppid() async {

2
lib/view_widget/custom_image.dart

@ -1,4 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:flutter/material.dart';
class MImage extends StatelessWidget {
@ -28,6 +29,7 @@ class MImage extends StatelessWidget {
borderRadius: radius,
child: CachedNetworkImage(
imageUrl: src,
cacheManager: DefaultCacheManager(),
fadeInDuration: Duration(milliseconds: 300),
fadeOutDuration: Duration(milliseconds: 300),
imageBuilder: (context, provide) {

298
pubspec.lock

File diff suppressed because it is too large Load Diff

4
pubspec.yaml

@ -29,10 +29,12 @@ dependencies:
barcode_widget: ^2.0.1
cupertino_icons: ^1.0.2
flutter_swiper_null_safety: ^1.0.2
# flutter_swiper_null_safety: ^1.0.2
flutter_swiper: ^1.1.6
flutter_staggered_grid_view: ^0.4.0 # Null safety
pull_to_refresh: ^2.0.0 # Null safety
# permission_handler: ^8.1.3
permission_handler: ^5.0.1+1
amap_flutter_map: ^1.0.0
amap_flutter_location: ^2.0.0 # Null safety

Loading…
Cancel
Save