Browse Source

Merge remote-tracking branch 'origin/dev' into dev

new_revision_app
fmk 2 years ago
parent
commit
4c3a0bfde9
  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. 52
      lib/home/home_page.dart
  18. 17
      lib/home/start_page.dart
  19. 4
      lib/l10n/intl_en.arb
  20. 4
      lib/l10n/intl_en_US.arb
  21. 4
      lib/l10n/intl_zh_CN.arb
  22. 4
      lib/l10n/intl_zh_Hans_CN.arb
  23. 4
      lib/l10n/intl_zh_Hant_CN.arb
  24. 4
      lib/l10n/intl_zh_TW.arb
  25. 3
      lib/login/login_store_select.dart
  26. 2
      lib/main.dart
  27. 2
      lib/main_page.dart
  28. 2
      lib/mine/mine_page.dart
  29. 223
      lib/settlement/settlement.dart
  30. 4
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  31. 21
      lib/store/shop_details_page.dart
  32. 7
      lib/store/store_order.dart
  33. 6
      lib/store/store_view/product_meals_sku.dart
  34. 7
      lib/store/store_view/product_sku.dart
  35. 12
      lib/store/store_view/shop_goods.dart
  36. 208
      lib/view_widget/channel_dialog.dart
  37. 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(

52
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';
@ -44,6 +43,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../retrofit/data/user_info.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/channel_dialog.dart';
import 'home_view/happy_help_farmers.dart';
import 'home_view/shortcut_operation.dart';
@ -116,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;
@ -280,6 +291,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
// }
}
///
queryUserBalance() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {});
@ -291,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;
// 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();
}
// }
// EasyLoading.dismiss();
// }
///
queryActivity() async {

17
lib/home/start_page.dart

@ -1,15 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class StartPage extends StatefulWidget {
final bool isFirst;
StartPage(this.isFirst);
// final bool isFirst;
//
// StartPage(this.isFirst);
@override
State<StatefulWidget> createState() {
return _StartPage();
@ -36,8 +31,10 @@ class _StartPage extends State<StartPage> {
@override
void initState() {
super.initState();
Future.delayed(Duration(seconds:3), () {
Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ? '/router/guide_Page' : '/router/new_login_page');
Future.delayed(Duration(seconds:2), () {
// Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ?
// '/router/guide_Page' : '/router/new_login_page');
Navigator.of(context).popAndPushNamed('/router/main_page');
});
}
}

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/main.dart

@ -93,6 +93,7 @@ import 'community/report/report_success.dart';
import 'home/guide_page.dart';
import 'home/help_farmers/help_farmers_page.dart';
import 'home/home_view/activity_list.dart';
import 'home/start_page.dart';
import 'home/welfare_exchange.dart';
import 'home/welfare_page.dart';
import 'login/login_store_select.dart';
@ -352,6 +353,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/about_page': (context, {arguments}) => AboutPage(),
'/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/main_page': (context, {arguments}) => MainPage(arguments: arguments),
'/router/start_page': (context, {arguments}) => StartPage(),
'/router/test_page': (context, {arguments}) => TestPage(),
'/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments),
'/router/releasePage': (context, {arguments}) => ReleasePage(),

2
lib/main_page.dart

@ -74,7 +74,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
case AppLifecycleState.resumed: //
pushRoute();
if(DateTime.now().millisecondsSinceEpoch - lastTime > 420000)
Navigator.of(context).popAndPushNamed('/router/main_page');
Navigator.of(context).popAndPushNamed('/router/start_page');
break;
case AppLifecycleState.paused: //
lastTime = DateTime.now().millisecondsSinceEpoch;

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';

223
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")
: "AUTO",
// useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1,
@ -222,11 +226,11 @@ class _Settlement extends State<Settlement> {
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"discountType":discountType,
"discountType": discountType,
// "useVipPrice":useVipPriceSelect,
// "useBenefit": useBenefitSelect,
"buyNum": buyNum,
"payChannel":payChannel,
"payChannel": payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
@ -257,7 +261,10 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){
if (!isRaiseChannel &&
(tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))) {
isRaiseChannel = true;
queryOrderInfo(
address?.id,
@ -272,13 +279,17 @@ class _Settlement extends State<Settlement> {
// useVipPriceSelect,
// useBenefitSelect,
count1,
(tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel,
(tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))
? 7
: payChannel,
tableId);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
}finally{
} finally {
setState(() {});
EasyLoading.dismiss();
}
@ -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,8 +829,9 @@ class _Settlement extends State<Settlement> {
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake,
memberCouponId, orderId, promotionId) {
DistributionMode(
(addressId, isTake, memberCouponId, orderId,
promotionId) {
setState(() {
this.selectedBtn = 0;
});
@ -829,14 +856,22 @@ class _Settlement extends State<Settlement> {
address,
selectedAddress,
pageType,
widget.arguments["distance"],),
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 ||
@ -900,9 +937,20 @@ class _Settlement extends State<Settlement> {
subscribeStoresName,
),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
if (settleOrderInfo != null &&
placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo),
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) ==
if (subscribeParam != null &&
((subscribeParam.isEnableSubscribe ?? false) ==
true) &&
(reservationTime == null ||
((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) {
((subscribeParam.stores.length == 1
? subscribeParam.stores[0]
: subscribeStoresName) ==
null))) {
SmartDialog.showToast(
(reservationTime == null)
? S.of(context).qingxuanzeyuyeushijian
@ -1006,7 +1058,7 @@ class _Settlement extends State<Settlement> {
}
////
Widget takeStatus(){
Widget takeStatus() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
@ -1020,13 +1072,14 @@ class _Settlement extends State<Settlement> {
],
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((){
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;
});
},
@ -1034,13 +1087,15 @@ class _Settlement extends State<Settlement> {
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),
width: diningStatus == 4 ? 2.w : 1.w,
color:
diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
color:
diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -1051,7 +1106,9 @@ class _Settlement extends State<Settlement> {
width: 21.w,
height: 31.h,
),
SizedBox(width:10.w,),
SizedBox(
width: 10.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
@ -1064,7 +1121,9 @@ class _Settlement extends State<Settlement> {
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 6.h,),
SizedBox(
height: 6.h,
),
Text(
S.of(context).dianneiyongcan,
style: TextStyle(
@ -1079,10 +1138,13 @@ class _Settlement extends State<Settlement> {
),
),
)),
SizedBox(width: 12.w,),
Expanded(child: GestureDetector(
onTap: (){
setState((){
SizedBox(
width: 12.w,
),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
diningStatus = 3;
});
},
@ -1091,13 +1153,15 @@ class _Settlement extends State<Settlement> {
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),
width: diningStatus == 3 ? 2.w : 1.w,
color:
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
color:
diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -1108,7 +1172,9 @@ class _Settlement extends State<Settlement> {
width: 24.w,
height: 26.h,
),
SizedBox(width:9.w,),
SizedBox(
width: 9.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
@ -1121,7 +1187,9 @@ class _Settlement extends State<Settlement> {
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 6.h,),
SizedBox(
height: 6.h,
),
Text(
S.of(context).dabaodaodianqu,
style: TextStyle(
@ -1136,7 +1204,8 @@ class _Settlement extends State<Settlement> {
),
),
)),
],),
],
),
);
}
@ -1148,19 +1217,31 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(
address?.id,
selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0,
(settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId,
(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)
? "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);}
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);
}
@ -1359,7 +1449,7 @@ class _Settlement extends State<Settlement> {
Expanded(
child: Container(
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical:5.h),
margin: EdgeInsets.symmetric(vertical: 5.h),
child: Text(
S.of(context).qingxuanzeyuyuemendian,
style: TextStyle(
@ -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,16 +1529,16 @@ 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),
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7),
width: storesIndex == index ? 1 :0,
color: storesIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7),
width: storesIndex == index ? 1 : 0,
),
color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7),
color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7),
),
child: Text(
subscribeParam.stores[index],

4
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 7)
widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ||(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -179,7 +179,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 ||
widget.payChannell == 7 || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK"|| (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect)
? "assets/image/vip_price.webp"

21
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';
@ -94,6 +92,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
///
queryStoreInfo() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
@ -115,7 +114,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
}
minLogin();
}
EasyLoading.dismiss();
// EasyLoading.dismiss();
}
///
@ -147,7 +146,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
this.shopCarGoods = value;
setState(() {});
});
EasyLoading.dismiss();
// EasyLoading.dismiss();
}
});
}
@ -165,6 +164,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
selectSkus.add(element.attrValueList[0].attrValue);
});
});
EasyLoading.dismiss();
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
@ -603,8 +603,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Column(
body: Column(
children: [
Expanded(
child: SmartRefresher(
@ -637,7 +636,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
),
Container(
width: double.infinity,
// padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16.h),
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -787,7 +785,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
)
],
),
),
);
}
@ -830,7 +827,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
),
),
SizedBox(
width: 2,
width: 2.w,
),
Expanded(
child: Text(
@ -1090,7 +1087,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 +1272,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 +1293,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),

208
lib/view_widget/channel_dialog.dart

@ -0,0 +1,208 @@
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/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import '../retrofit/data/base_data.dart';
import '../retrofit/data/channels_list.dart';
import '../retrofit/retrofit_api.dart';
class ChannelDialog extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _ChannelDialog();
}
}
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 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,
),
],
),
);
}
}

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