Browse Source

增加推荐渠道弹窗;

调整点单页,加购按钮位置间距;
new_revision_app
wurong 2 years ago
parent
commit
eeb853b6ce
  1. BIN
      assets/image/2x/channel_jt.webp
  2. BIN
      assets/image/2x/channel_logo.webp
  3. BIN
      assets/image/2x/channel_text.webp
  4. BIN
      assets/image/3x/channel_jt.webp
  5. BIN
      assets/image/3x/channel_logo.webp
  6. BIN
      assets/image/3x/channel_text.webp
  7. BIN
      assets/image/channel_jt.webp
  8. BIN
      assets/image/channel_logo.webp
  9. BIN
      assets/image/channel_text.webp
  10. 4
      lib/generated/intl/messages_en.dart
  11. 4
      lib/generated/intl/messages_en_US.dart
  12. 4
      lib/generated/intl/messages_zh_CN.dart
  13. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  14. 4
      lib/generated/intl/messages_zh_Hant_CN.dart
  15. 4
      lib/generated/intl/messages_zh_TW.dart
  16. 40
      lib/generated/l10n.dart
  17. 53
      lib/home/home_page.dart
  18. 4
      lib/l10n/intl_en.arb
  19. 4
      lib/l10n/intl_en_US.arb
  20. 4
      lib/l10n/intl_zh_CN.arb
  21. 4
      lib/l10n/intl_zh_Hans_CN.arb
  22. 4
      lib/l10n/intl_zh_Hant_CN.arb
  23. 4
      lib/l10n/intl_zh_TW.arb
  24. 3
      lib/login/login_store_select.dart
  25. 2
      lib/mine/mine_page.dart
  26. 743
      lib/settlement/settlement.dart
  27. 8
      lib/store/shop_details_page.dart
  28. 7
      lib/store/store_order.dart
  29. 6
      lib/store/store_view/product_meals_sku.dart
  30. 7
      lib/store/store_view/product_sku.dart
  31. 12
      lib/store/store_view/shop_goods.dart
  32. 207
      lib/view_widget/channel_dialog.dart
  33. 3
      pubspec.yaml

BIN
assets/image/2x/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
assets/image/2x/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
assets/image/3x/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
assets/image/3x/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/3x/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
assets/image/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/image/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

4
lib/generated/intl/messages_en.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_en_US.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("Please fill in the recipient\'s name"),
"qingtong" : MessageLookupByLibrary.simpleMessage("bronze"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("Bronze Member"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("please select specs"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("Please select a store to use"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please select the shipping address"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("Equity Details"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("Picking number"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("channel source"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("Log in"),
"queding" : MessageLookupByLibrary.simpleMessage("OK"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("Are you sure you want to delete this dynamic?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("Refresh failed"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("Refresh Balance"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("Refreshing...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("number"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("Please enter the consignee address"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("Enter payment password"),
"sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("Modification succeeded"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("select success"),
"xuanji" : MessageLookupByLibrary.simpleMessage("Selection"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"),

4
lib/generated/intl/messages_zh_CN.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_zh_Hant_CN.dart

@ -478,6 +478,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"),
@ -505,6 +506,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"),
"queding" : MessageLookupByLibrary.simpleMessage("確定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"),
@ -584,6 +586,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("數量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"),
"sui" : m31,
@ -683,6 +686,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),

4
lib/generated/intl/messages_zh_TW.dart

@ -480,6 +480,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"),
@ -507,6 +508,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"),
"qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"),
"queding" : MessageLookupByLibrary.simpleMessage("確定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"),
@ -587,6 +589,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("數量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"),
"sui" : m31,
@ -686,6 +689,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),

40
lib/generated/l10n.dart

@ -7045,6 +7045,46 @@ class S {
);
}
/// ``
String get qingxianxuanguige {
return Intl.message(
'请先选规格',
name: 'qingxianxuanguige',
desc: '',
args: [],
);
}
/// ``
String get xuanhaola {
return Intl.message(
'选好啦',
name: 'xuanhaola',
desc: '',
args: [],
);
}
/// ``
String get qudaolaiyuan {
return Intl.message(
'渠道来源',
name: 'qudaolaiyuan',
desc: '',
args: [],
);
}
/// ``
String get shuliang {
return Intl.message(
'数量',
name: 'shuliang',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

53
lib/home/home_page.dart

@ -35,7 +35,6 @@ import 'package:huixiang/view_widget/activity_coupons.dart';
import 'package:huixiang/view_widget/activity_poster.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/invite_success_dialog.dart';
import 'package:huixiang/view_widget/new_people_reward.dart';
import 'package:huixiang/view_widget/request_permission.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -117,6 +116,17 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
});
}
///
channelShowAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return ChannelDialog();
},
);
}
final SwiperController controller = SwiperController();
String categoryId;
@ -281,6 +291,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
// }
}
///
queryUserBalance() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {});
@ -292,26 +303,26 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}
///
queryMsgStats() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
// setState(() {
totalMsg = 0;
baseData.data.forEach((element) {
totalMsg += element.number;
// });
});
}
EasyLoading.dismiss();
}
// queryMsgStats() async {
// if (apiService == null) {
// SharedPreferences value = await SharedPreferences.getInstance();
// apiService = ApiService(
// Dio(),
// context: context,
// token: value.getString("token"),
// );
// }
// BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
// if (baseData != null && baseData.isSuccess) {
// // setState(() {
// totalMsg = 0;
// baseData.data.forEach((element) {
// totalMsg += element.number;
// // });
// });
// }
// EasyLoading.dismiss();
// }
///
queryActivity() async {

4
lib/l10n/intl_en.arb

@ -732,6 +732,10 @@
"dianneiyongcan":"店内用餐",
"waidai":"外带",
"dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_en_US.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"store dining",
"waidai":"take away",
"dabaodaodianqu":"pack to shop take away",
"qingxianxuanguige":"please select specs",
"xuanhaola":"select success",
"qudaolaiyuan":"channel source",
"shuliang":"number",

4
lib/l10n/intl_zh_CN.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"店内用餐",
"waidai":"外带",
"dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"店内用餐",
"waidai":"外带",
"dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_zh_Hant_CN.arb

@ -724,6 +724,10 @@
"dianneiyongcan":"店内用餐",
"waidai":"外帶",
"dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"請先選規格",
"xuanhaola":"選好啦",
"qudaolaiyuan":"渠道來源",
"shuliang":"數量",

4
lib/l10n/intl_zh_TW.arb

@ -726,6 +726,10 @@
"dianneiyongcan":"店内用餐",
"waidai":"外帶",
"dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"請先選規格",
"xuanhaola":"選好啦",
"qudaolaiyuan":"渠道來源",
"shuliang":"數量",

3
lib/login/login_store_select.dart

@ -20,7 +20,6 @@ class LoginStoreSelect extends StatefulWidget {
}
class _LoginStoreSelect extends State<LoginStoreSelect> {
ApiService apiService;
ChannelsList channelsList;
int channelIndex = 0;
@ -35,7 +34,7 @@ class _LoginStoreSelect extends State<LoginStoreSelect> {
return Scaffold(
backgroundColor: Colors.white,
appBar: MyAppBar(
title: "渠道来源",
title: S.of(context).qudaolaiyuan,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),

2
lib/mine/mine_page.dart

@ -9,7 +9,6 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart';
import 'package:huixiang/mine/mine_view/mine_navbar.dart';
import 'package:huixiang/mine/mine_view/mine_order.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/retrofit/data/msg_stats.dart';
@ -21,7 +20,6 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:huixiang/view_widget/mine_vip_entry.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart';

743
lib/settlement/settlement.dart

@ -180,7 +180,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(isVips == false || !placeOrder ) ? ((vipLevelName == "黄金会员" && placeOrder) ? "MEMBER_RANK" :"NONE"):"VIP",
(isVips == false || !placeOrder)
? ((vipLevelName == "黄金会员" && placeOrder)
? "MEMBER_RANK"
: "NONE")
: "VIP",
// useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1,
@ -213,72 +217,79 @@ class _Settlement extends State<Settlement> {
try {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"discountType":discountType,
// "useVipPrice":useVipPriceSelect,
// "useBenefit": useBenefitSelect,
"buyNum": buyNum,
"payChannel":payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"NONE",
// useVipPriceSelect,
// useBenefitSelect,
count1,
(tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel,
tableId);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"discountType": discountType,
// "useVipPrice":useVipPriceSelect,
// "useBenefit": useBenefitSelect,
"buyNum": buyNum,
"payChannel": payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if (!isRaiseChannel &&
(tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))) {
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"NONE",
// useVipPriceSelect,
// useBenefitSelect,
count1,
(tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))
? 7
: payChannel,
tableId);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
}finally{
} finally {
setState(() {});
EasyLoading.dismiss();
}
@ -343,29 +354,29 @@ class _Settlement extends State<Settlement> {
}
queryAddress(int selectedBtn) async {
setState(() {
this.selectedBtn = selectedBtn;
});
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
setState(() {
this.selectedBtn = selectedBtn;
});
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude),
@ -393,30 +404,30 @@ class _Settlement extends State<Settlement> {
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
}
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
}
}
///
@ -530,7 +541,13 @@ class _Settlement extends State<Settlement> {
((subscribeParam?.isEnableSubscribe ?? false) == true)
? true
: false; //
placeOrderFirst.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn!=1&&selectedBtn!=2) ? diningStatus : selectedBtn;
placeOrderFirst.isTakeOut =
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true &&
(subscribeParam?.isEnableSubscribe ?? false) == false &&
selectedBtn != 1 &&
selectedBtn != 2)
? diningStatus
: selectedBtn;
placeOrderFirst.notes = remakers +
(reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true
@ -542,7 +559,13 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : ((tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7:payChannel));
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00")
? payChannel = 0
: ((tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))
? 7
: payChannel));
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) ? promotion.id : "";
@ -552,7 +575,8 @@ class _Settlement extends State<Settlement> {
// : widget.arguments["cid"] ?? "";
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect;
// placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect;
placeOrderFirst.promotionInfoDTO.discountType = settleOrderInfo?.discountType ?? "";
placeOrderFirst.promotionInfoDTO.discountType =
settleOrderInfo?.discountType ?? "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -561,7 +585,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.storeId = storeInfo.id;
placeOrderFirst.subcribeTime = subTime ?? ""; //
placeOrderFirst.tableId = "$tableId";
for (int i = 0; i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); i++) {
for (int i = 0;
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0);
i++) {
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList =
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList;
}
@ -803,40 +829,49 @@ class _Settlement extends State<Settlement> {
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake,
memberCouponId, orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId ?? (productId ?? 0),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId ?? 0);
},
queryAddress,
storeInfo,
address,
selectedAddress,
pageType,
widget.arguments["distance"],),
DistributionMode(
(addressId, isTake, memberCouponId, orderId,
promotionId) {
setState(() {
this.selectedBtn = 0;
});
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId ?? (productId ?? 0),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId ?? 0);
},
queryAddress,
storeInfo,
address,
selectedAddress,
pageType,
widget.arguments["distance"],
),
SizedBox(
height: 16.h,
),
if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false
&& selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null)
if ((storeInfo?.pickupType?.dineInTakeStatus ??
false) ==
true &&
(subscribeParam?.isEnableSubscribe ??
false) ==
false &&
selectedBtn != 1 &&
selectedBtn != 2 &&
settleOrderInfo != null)
takeStatus(),
///
@ -857,7 +892,9 @@ class _Settlement extends State<Settlement> {
(coupons != "" || promotions != "")
? false
: useVipPriceSelect,
this.showVipTips,useBenefitSelect,placeOrder),
this.showVipTips,
useBenefitSelect,
placeOrder),
/////
if (settleOrderInfo != null ||
@ -872,20 +909,20 @@ class _Settlement extends State<Settlement> {
couponCount(),
placeOrder,
remakers,
() {
() {
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {
"remake": remakers
}).then((value) => {
setState(() {
if (value != null) remakers = value;
})
});
setState(() {
if (value != null) remakers = value;
})
});
},
tableId,
vipPriceSelect,
() {
() {
setState(() {
this.showVipTips = true;
});
@ -900,9 +937,20 @@ class _Settlement extends State<Settlement> {
subscribeStoresName,
),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo),
if (settleOrderInfo != null &&
placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(
payChannelCheck,
coupons,
promotions,
useVipPriceSelect,
settleOrderInfo,
useBenefitSelect,
tableId,
minOrderInfo),
],
),
),
@ -970,10 +1018,14 @@ class _Settlement extends State<Settlement> {
// return;
// } else
// orderButton = true;
if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) ==
true) &&
(reservationTime == null ||
((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) {
if (subscribeParam != null &&
((subscribeParam.isEnableSubscribe ?? false) ==
true) &&
(reservationTime == null ||
((subscribeParam.stores.length == 1
? subscribeParam.stores[0]
: subscribeStoresName) ==
null))) {
SmartDialog.showToast(
(reservationTime == null)
? S.of(context).qingxuanzeyuyeushijian
@ -1006,161 +1058,190 @@ class _Settlement extends State<Settlement> {
}
////
Widget takeStatus(){
Widget takeStatus() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0D000000),
offset: Offset(0, 1),
blurRadius: 8,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(8),
),
margin: EdgeInsets.only(left: 16.w, right: 16.w,top:6.h,bottom:6.h),
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical:10.h),
child:
Row(children: [
Expanded(child:GestureDetector(
onTap: (){
setState((){
diningStatus = 4;
});
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 4? 2.w:1.w,
color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.fill,
width: 21.w,
height: 31.h,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0D000000),
offset: Offset(0, 1),
blurRadius: 8,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(8),
),
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 6.h, bottom: 6.h),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h),
child: Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
diningStatus = 4;
});
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 4 ? 2.w : 1.w,
color:
diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
SizedBox(width:10.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).tangshi,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color:
diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.fill,
width: 21.w,
height: 31.h,
),
SizedBox(
width: 10.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).tangshi,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
),
SizedBox(height: 6.h,),
Text(
S.of(context).dianneiyongcan,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
SizedBox(
height: 6.h,
),
),
],
)
],
),
),
)),
SizedBox(width: 12.w,),
Expanded(child: GestureDetector(
onTap: (){
setState((){
diningStatus = 3;
});
},
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 3? 2.w : 1.w,
color: diningStatus == 3?Color(0xFF32A060):Color(0xFFDEDEDE),
style: BorderStyle.solid,
Text(
S.of(context).dianneiyongcan,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/dining_w.webp",
fit: BoxFit.fill,
width: 24.w,
height: 26.h,
)),
SizedBox(
width: 12.w,
),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
diningStatus = 3;
});
},
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 3 ? 2.w : 1.w,
color:
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
SizedBox(width:9.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).waidai,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color:
diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/dining_w.webp",
fit: BoxFit.fill,
width: 24.w,
height: 26.h,
),
SizedBox(
width: 9.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).waidai,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
),
SizedBox(height: 6.h,),
Text(
S.of(context).dabaodaodianqu,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
SizedBox(
height: 6.h,
),
),
],
)
],
Text(
S.of(context).dabaodaodianqu,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
),
),
)),
],),
)),
],
),
);
}
payChannelCheck(int payChannel) {
this.payChannel = payChannel;
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id,
0,
(settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(settleOrderInfo.isRaise || payChannel == 5) ?"NONE" : ((useVipPriceSelect == false && couponListBean?.id!="" && ((promotion?.id ?? productId )!= "")) ? "MEMBER_RANK" : (isVips == false &&vipLevelName == "黄金会员")?"MEMBER_RANK":"AUTO"),
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect,
count1,
payChannel,
tableId);}
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(settleOrderInfo.isRaise || payChannel == 5)
? "NONE"
: ((useVipPriceSelect == false &&
couponListBean?.id != "" &&
((promotion?.id ?? productId) != ""))
? "MEMBER_RANK"
: (isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO"),
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect,
count1,
payChannel,
tableId);
}
}
vipPriceSelect(bool useVipPriceSelect) {
@ -1177,12 +1258,13 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(useVipPriceSelect == true) ? "VIP": "MEMBER_RANK",
(useVipPriceSelect == true) ? "VIP" : "MEMBER_RANK",
// useVipPriceSelect,
// useVipPriceSelect == true ? false :useBenefitSelect,
count1,
payChannel,
tableId);}
tableId);
}
}
///
@ -1258,7 +1340,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"COUPON",
(couponBean?.id ?? 0) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO")
: "COUPON",
// useVipPriceSelect,
// useBenefitSelect,
count1,
@ -1293,7 +1379,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"ACTIVITY",
((pro?.id ?? 0) ?? productId) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO")
: "ACTIVITY",
// useVipPriceSelect,
// useBenefitSelect,
count1,
@ -1324,7 +1414,7 @@ class _Settlement extends State<Settlement> {
date.timeZoneOffset.inHours.toString());
}, onConfirm: (date) {
reservationTime = date.toString().substring(0, 16);
subTime = date.add(Duration(hours:8)).toUtc().toIso8601String();
subTime = date.add(Duration(hours: 8)).toUtc().toIso8601String();
setState(() {});
}, currentTime: minTime, locale: LocaleType.zh);
}
@ -1358,17 +1448,17 @@ class _Settlement extends State<Settlement> {
children: [
Expanded(
child: Container(
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical:5.h),
child: Text(
S.of(context).qingxuanzeyuyuemendian,
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 5.h),
child: Text(
S.of(context).qingxuanzeyuyuemendian,
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
GestureDetector(
onTap: () {
setState(() {
@ -1399,9 +1489,10 @@ class _Settlement extends State<Settlement> {
}),
),
GestureDetector(
onTap: (){
onTap: () {
setState(() {
subscribeStoresName = subscribeParam.stores[storesIndex];
subscribeStoresName =
subscribeParam.stores[storesIndex];
});
Navigator.of(context).pop();
},
@ -1410,10 +1501,12 @@ class _Settlement extends State<Settlement> {
height: 40.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color:Color(0xFF32A060),
color: Color(0xFF32A060),
),
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 10.h,),
margin: EdgeInsets.only(
bottom: 10.h,
),
child: Text(
S.of(context).queding,
style: TextStyle(
@ -1436,17 +1529,17 @@ class _Settlement extends State<Settlement> {
Widget storesNameItem(index) {
return Container(
width: double.infinity,
margin: EdgeInsets.symmetric(vertical:8.h),
margin: EdgeInsets.symmetric(vertical: 8.h),
padding: EdgeInsets.symmetric(vertical: 10.h),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:BorderRadius.circular(6),
border: Border.all(
color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7),
width: storesIndex == index ? 1 :0,
),
color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: storesIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7),
width: storesIndex == index ? 1 : 0,
),
color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7),
),
child: Text(
subscribeParam.stores[index],
style: TextStyle(

8
lib/store/shop_details_page.dart

@ -24,8 +24,6 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/border_text.dart';
import '../view_widget/request_permission.dart';
@ -1090,7 +1088,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"数量",
S.of(context).shuliang,
style: TextStyle(
color: Color(0xFFB3B3B3),
fontSize: 12.sp,
@ -1275,7 +1273,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
Expanded(
child: InkWell(
child: BorderText(
text: "取消",
text: S.of(context).quxiao,
textColor: Color(0xFF32A060),
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -1296,7 +1294,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
Expanded(
child: InkWell(
child: RoundButton(
text: "确定",
text: S.of(context).queding,
textColor: Colors.white,
radius: 4,
padding: EdgeInsets.all(12),

7
lib/store/store_order.dart

@ -19,25 +19,19 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/people_num.dart';
import 'package:huixiang/store/store_view/product_sku.dart';
import 'package:huixiang/store/store_view/shop_car.dart';
import 'package:huixiang/store/store_view/store_activity.dart';
import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/store/store_view/store_order_list.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:intl/intl.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/settleOrderInfo.dart';
import '../settlement/settlement.dart';
import '../view_widget/border_text.dart';
import '../view_widget/request_permission.dart';
class StoreOrderPage extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -432,7 +426,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
];
},
body:
///
TabBarView(
physics: NeverScrollableScrollPhysics(),

6
lib/store/store_view/product_meals_sku.dart

@ -356,7 +356,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
"")
GestureDetector(
child: Text(
"选规格",
S.of(context).xuanguige,
style: TextStyle(
color: Colors.black,
fontSize: 13.sp,
@ -638,7 +638,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
.productAttrInfoList
.where((element) => element.selectSku == null)
.isNotEmpty) {
SmartDialog.showToast("请先选择规格",
SmartDialog.showToast(S.of(context).qingxianxuanguige,
alignment: Alignment.center);
return;
}
@ -679,7 +679,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
),
padding: EdgeInsets.symmetric(vertical: 6),
child: Text(
"选好啦",
S.of(context).xuanhaola,
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,

7
lib/store/store_view/product_sku.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
@ -57,7 +56,7 @@ class _ProductSku extends State<ProductSku> {
return;
}
if (productSku == null) return;
selectedPrice = productSku.skuPrice;
selectedPrice = productSku.vipPrice;
String skuId = productSku.id;
if (widget.shopCarGoods == null ||
widget.shopCarGoods.shoppingCartSkuItemList == null) return;
@ -228,7 +227,7 @@ class _ProductSku extends State<ProductSku> {
children: [
Expanded(
child: Text(
"数量",
S.of(context).shuliang,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
@ -313,7 +312,7 @@ class _ProductSku extends State<ProductSku> {
RoundButton(
width: double.infinity,
height: 54.h,
text: "确认",
text: S.of(context).queren,
textColor: Colors.white,
fontWeight: MyFontWeight.semi_bold,
radius: 27,

12
lib/store/store_view/shop_goods.dart

@ -250,7 +250,7 @@ class _ShopGoods extends State<ShopGoods> {
}
},
child: Container(
padding: EdgeInsets.only(right: 16.w),
// padding: EdgeInsets.only(right: 16.w),
child: Stack(
children: [
Container(
@ -259,7 +259,7 @@ class _ShopGoods extends State<ShopGoods> {
top: 4.h,
bottom: 4.h,
),
margin: EdgeInsets.only(right: 8, top: 4),
margin: EdgeInsets.only(right:8.w,top: 4.h),
child: RoundButton(
text: S.of(context).xuanguige,
textColor: Colors.white,
@ -364,7 +364,7 @@ class _ShopGoods extends State<ShopGoods> {
}
},
child: Container(
padding: EdgeInsets.only(left: 6.w, right: 16.w),
padding: EdgeInsets.only(left: 6.w, right:9.w),
child: Image.asset(
"assets/image/add.webp",
width: 22,
@ -401,7 +401,7 @@ class _ShopGoods extends State<ShopGoods> {
top: 4.h,
bottom: 4.h,
),
margin: EdgeInsets.only(right: 8, top: 4),
margin: EdgeInsets.only(right:8.w,top: 4),
child: RoundButton(
text: S.of(context).lijiyuyue,
textColor: Colors.white,
@ -494,7 +494,7 @@ class _ShopGoods extends State<ShopGoods> {
Expanded(
child: InkWell(
child: BorderText(
text: "取消",
text: S.of(context).quxiao,
textColor: Color(0xFF32A060),
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -515,7 +515,7 @@ class _ShopGoods extends State<ShopGoods> {
Expanded(
child: InkWell(
child: RoundButton(
text: "确定",
text: S.of(context).queding,
textColor: Colors.white,
radius: 4,
padding: EdgeInsets.all(12),

207
lib/view_widget/channel_dialog.dart

@ -1,11 +1,15 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/login_info.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/round_button.dart';
import '../retrofit/data/base_data.dart';
import '../retrofit/data/channels_list.dart';
import '../retrofit/retrofit_api.dart';
class ChannelDialog extends StatefulWidget {
@ -17,29 +21,188 @@ class ChannelDialog extends StatefulWidget {
}
class _ChannelDialog extends State<ChannelDialog> {
ApiService apiService;
ChannelsList channelsList;
int channelIndex = 0;
@override
void initState() {
super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai);
queryChannels();
}
queryChannels() async{
apiService = ApiService(Dio(), context: context);
BaseData<ChannelsList> baseData = await apiService.appChannels().catchError((error) {
print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
channelsList = baseData.data;
setState((){});
EasyLoading.dismiss();
} else {
if (baseData?.msg != null)
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@override
Widget build(BuildContext context) {
return SimpleDialog(
titlePadding: EdgeInsets.all(10),
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
return Material(
type: MaterialType.transparency,
child: Center(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 14.w),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(8.r),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
gradient:LinearGradient(
colors:[
Color(0xFFDFFFED),
Color(0xFFFFFFFF),
],
begin: Alignment.topLeft,
end: Alignment.bottomLeft,
)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
alignment: Alignment.topRight,
children: [
Row(
children: [
SizedBox(width: 11.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/image/channel_text.webp",
width: 138.w,
height:24.h,
fit: BoxFit.fill,
),
Padding(padding: EdgeInsets.only(top: 11.h),child: Text(
"您是通过什么途径注册的呢?",
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF353535),
),
),),
],
),
Spacer(),
Image.asset(
"assets/image/channel_logo.webp",
width: 89.w,
height:93.h,
fit: BoxFit.fill,
),
SizedBox(width: 24.w,)
],
),
Container(
margin: EdgeInsets.only(top: 24.h,right: 113.w),
child:Image.asset(
"assets/image/channel_jt.webp",
width: 62.w,
height:15.h,
fit: BoxFit.fill,
),
),
],
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight:260.h),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
margin: EdgeInsets.only(left:12.w,right: 12.w,bottom: 19.h),
child:ListView.builder(
padding: EdgeInsets.only(top: 16.h),
itemCount: (channelsList != null && (channelsList?.channels?.length ?? 0) > 0) ? channelsList.channels.length : 0,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
channelIndex = position;
});
},
child: channelItem(position),
);
}),
),
),
if(channelsList != null && (channelsList.channels.length) > 0)
Align(
alignment:Alignment.center,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pop();
},
child: Text(
"我选好了",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF32A060),
),
),
),
),
SizedBox(height: 16.h,)
],
),
)
],
),
),
),
);
}
Widget channelItem(index){
return Container(
padding: EdgeInsets.only(left:14.w,right: 14.w,bottom: 18.h),
child: Row(
children: [
Expanded(child: Text(
channelsList.channels[index],
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
color: channelIndex == index ? Color(0xFF32A060):Color(0xFF353535),
),
)),
Image.asset(
channelIndex == index
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 15.w,
height: 15.h,
),
],
),
children: [
Column(children: [
GestureDetector(onTap: (){
setState(() {
Navigator.of(context).pop();
});
},child:Image.asset(
"assets/image/yq_qx.webp",
width: 34,
height: 34,
),)
],),
],
);
}
}

3
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.2.10+55
version: 3.2.13+57
environment:
sdk: ">=2.7.0 <3.0.0"
@ -108,6 +108,7 @@ dependencies:
# 时间选择器
flutter_datetime_picker: ^1.5.1
dev_dependencies:
flutter_test:
sdk: flutter

Loading…
Cancel
Save