Browse Source

更改

master
w-R 3 years ago
parent
commit
3f35e01b38
  1. 1
      lib/generated/intl/messages_en.dart
  2. 1
      lib/generated/intl/messages_zh_CN.dart
  3. 1
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 1
      lib/generated/intl/messages_zh_Hant_CN.dart
  5. 1
      lib/generated/intl/messages_zh_TW.dart
  6. 10
      lib/generated/l10n.dart
  7. 1
      lib/l10n/intl_en.arb
  8. 1
      lib/l10n/intl_zh_CN.arb
  9. 1
      lib/l10n/intl_zh_Hans_CN.arb
  10. 1
      lib/l10n/intl_zh_Hant_CN.arb
  11. 1
      lib/l10n/intl_zh_TW.arb
  12. 10
      lib/order/order_detail_page.dart
  13. 103
      lib/union/union_details_page.dart
  14. 50
      lib/union/union_view/store_activity.dart
  15. 162
      lib/union/union_view/store_info.dart
  16. 32
      lib/union/union_view/union_coupon.dart
  17. 37
      lib/web/web_view/comment_list.dart

1
lib/generated/intl/messages_en.dart

@ -154,6 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"),
"denglu" : MessageLookupByLibrary.simpleMessage("登录"),
"diancan" : MessageLookupByLibrary.simpleMessage("点餐"),
"diandan" : MessageLookupByLibrary.simpleMessage("点单"),
"dianhua" : MessageLookupByLibrary.simpleMessage("电话"),
"dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"),
"dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"),

1
lib/generated/intl/messages_zh_CN.dart

@ -154,6 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"),
"denglu" : MessageLookupByLibrary.simpleMessage("登录"),
"diancan" : MessageLookupByLibrary.simpleMessage("点餐"),
"diandan" : MessageLookupByLibrary.simpleMessage("点单"),
"dianhua" : MessageLookupByLibrary.simpleMessage("电话"),
"dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"),
"dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"),

1
lib/generated/intl/messages_zh_Hans_CN.dart

@ -154,6 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"),
"denglu" : MessageLookupByLibrary.simpleMessage("登录"),
"diancan" : MessageLookupByLibrary.simpleMessage("点餐"),
"diandan" : MessageLookupByLibrary.simpleMessage("点单"),
"dianhua" : MessageLookupByLibrary.simpleMessage("电话"),
"dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"),
"dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"),

1
lib/generated/intl/messages_zh_Hant_CN.dart

@ -154,6 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用戶取餐"),
"denglu" : MessageLookupByLibrary.simpleMessage("登錄"),
"diancan" : MessageLookupByLibrary.simpleMessage("點餐"),
"diandan" : MessageLookupByLibrary.simpleMessage("點單"),
"dianhua" : MessageLookupByLibrary.simpleMessage("電話"),
"dianjidenglu" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"),
"dianwolingqu" : MessageLookupByLibrary.simpleMessage("點我領取"),

1
lib/generated/intl/messages_zh_TW.dart

@ -154,6 +154,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用戶取餐"),
"denglu" : MessageLookupByLibrary.simpleMessage("登錄"),
"diancan" : MessageLookupByLibrary.simpleMessage("點餐"),
"diandan" : MessageLookupByLibrary.simpleMessage("點單"),
"dianhua" : MessageLookupByLibrary.simpleMessage("電話"),
"dianjidenglu" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"),
"dianwolingqu" : MessageLookupByLibrary.simpleMessage("點我領取"),

10
lib/generated/l10n.dart

@ -4985,6 +4985,16 @@ class S {
);
}
/// ``
String get diandan {
return Intl.message(
'点单',
name: 'diandan',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

1
lib/l10n/intl_en.arb

@ -516,6 +516,7 @@
"ninyichenggonglingquyouhuiquan": "您已成功领取优惠劵,请在",
"kabaokeshiyong": "卡包-可使用",
"zhongchakan": "中查看",
"diandan": "点单",

1
lib/l10n/intl_zh_CN.arb

@ -518,6 +518,7 @@
"ninyichenggonglingquyouhuiquan": "您已成功领取优惠劵,请在",
"kabaokeshiyong": "卡包-可使用",
"zhongchakan": "中查看",
"diandan": "点单",

1
lib/l10n/intl_zh_Hans_CN.arb

@ -518,6 +518,7 @@
"ninyichenggonglingquyouhuiquan": "您已成功领取优惠劵,请在",
"kabaokeshiyong": "卡包-可使用",
"zhongchakan": "中查看",
"diandan": "点单",

1
lib/l10n/intl_zh_Hant_CN.arb

@ -511,6 +511,7 @@
"ninyichenggonglingquyouhuiquan": "您已成功領取優惠券,請在",
"kabaokeshiyong": "卡包-可使用",
"zhongchakan": "中查看",
"diandan": "點單",

1
lib/l10n/intl_zh_TW.arb

@ -510,6 +510,7 @@
"ninyichenggonglingquyouhuiquan": "您已成功領取優惠券,請在",
"kabaokeshiyong": "卡包-可使用",
"zhongchakan": "中查看",
"diandan": "點單",

10
lib/order/order_detail_page.dart

@ -9,17 +9,10 @@ import 'package:huixiang/order/order_view/order_status.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:huixiang/view_widget/text_image_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart';
class OrderDetailPage extends StatefulWidget {
final arguments;
@ -313,8 +306,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
Text(
S
.of(context)
S.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle(
fontSize: 20.sp,

103
lib/union/union_details_page.dart

@ -21,6 +21,7 @@ import 'package:huixiang/union/union_view/vip.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/receive_success.dart';
import 'package:path_provider/path_provider.dart';
@ -82,17 +83,45 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
future: queryStoreInfo(),
builder: (context, snapshot) {
return Scaffold(
appBar: MyAppBar(
background: Color(0xFFF7F7F7),
title: storeInfo == null
? (widget.arguments["storeName"] ?? "")
: storeInfo.storeName,
titleColor: Colors.black87,
titleSize: 18.sp,
leadingColor: Colors.black,
// appBar: MyAppBar(
// background: Color(0xFFF7F7F7),
// // title: storeInfo == null
// // ? (widget.arguments["storeName"] ?? "")
// // : storeInfo.storeName,
// title: "",
// titleColor: Colors.black87,
// titleSize: 18.sp,
// leadingColor: Colors.black,
// ),
body:
Stack(
children: [
MImage(
storeInfo != null && storeInfo.bannerList != null?
storeInfo.bannerList.first.imgUrl:"",
width: double.infinity,
height: 190.h,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
body: Column(
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height:54.h,),
Padding(padding:EdgeInsets.only(left: 17.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child:Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
)
),),
SizedBox(height:29.h,),
Expanded(
child: SmartRefresher(
controller: refreshController,
@ -110,45 +139,49 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
///
StoreInfos(storeInfo),
///VIP信息
Vip(storeInfo, _receiveVip, isReceive),
///
UnionCoupon(storeInfo, _receiveCoupon),
///VIP信息
Vip(storeInfo, _receiveVip, isReceive),
///
StoreActivity(widget.arguments, activitys),
],
),
),
),
flex: 1,
),
InkWell(
onTap: _loginMin,
child: Container(
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
decoration: BoxDecoration(
color: isEnable() ? Color(0xFF32A060) : Color(0xFFD8D8D8),
borderRadius: BorderRadius.vertical(
top: Radius.circular(4),
),
),
alignment: Alignment.center,
child: Text(
isEnable()
? S.of(context).jinrushangdian
: S.of(context).zanwuxianshangjindian,
style: TextStyle(
fontSize: 16.sp,
color: isEnable() ? Colors.white : Color(0xFFA0A0A0),
fontWeight: MyFontWeight.semi_bold,
),
),
// flex: 1,
),
// InkWell(
// onTap: _loginMin,
// child: Container(
// padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
// decoration: BoxDecoration(
// color: isEnable() ? Color(0xFF32A060) : Color(0xFFD8D8D8),
// borderRadius: BorderRadius.vertical(
// top: Radius.circular(4),
// ),
// ),
// alignment: Alignment.center,
// child: Text(
// isEnable()
// ? S.of(context).jinrushangdian
// : S.of(context).zanwuxianshangjindian,
// style: TextStyle(
// fontSize: 16.sp,
// color: isEnable() ? Colors.white : Color(0xFFA0A0A0),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// ),
// ),
],
),
],
),
);
},
);

50
lib/union/union_view/store_activity.dart

@ -1,13 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class StoreActivity extends StatefulWidget {
@ -25,17 +22,50 @@ class StoreActivity extends StatefulWidget {
}
class _StoreActivity extends State<StoreActivity> {
int page = 0;
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.only(top: 20.h, bottom: 20.h),
child: ItemTitle(
text: S.of(context).xindianhuodong,
imgPath: "assets/image/icon_union_start_store.png",
alignment:Alignment.centerLeft,
margin: EdgeInsets.only(top: 20.h, bottom: 20.h,left: 17.w),
child: Row(
children: [
GestureDetector(
onTap: (){setState(() {
page = 0;
});},
child: Text(
S.of(context).diandan,
textAlign: TextAlign.center,
style: TextStyle(
color: page==0?Colors.black:Colors.grey,
fontSize: page==0?16.sp:14.sp,
fontWeight: page==0?FontWeight.bold:FontWeight.normal,
),
),
),
Padding(padding: EdgeInsets.only(left: 10)),
GestureDetector(
onTap: (){setState(() {
page = 1;
});},
child: Text(
S.of(context).xindianhuodong,
textAlign: TextAlign.center,
style: TextStyle(
color: page==1?Colors.black:Colors.grey,
fontSize: page==1?16.sp:14.sp,
fontWeight: page==1?FontWeight.bold:FontWeight.normal,
),
),
),
],
),
),
page == 0 ? order():
(widget.activitys != null && widget.activitys.length > 0)
? Container(
margin: EdgeInsets.only(bottom: 30.h),
@ -62,6 +92,12 @@ class _StoreActivity extends State<StoreActivity> {
);
}
Widget order(){
return Container(
child: Text("点单页面!"),
);
}
Widget buildSwiper2Bottom() {
return Container(

162
lib/union/union_view/store_info.dart

@ -11,7 +11,6 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:url_launcher/url_launcher.dart';
class StoreInfos extends StatefulWidget {
final StoreInfo storeInfo;
StoreInfos(this.storeInfo);
@ -20,12 +19,164 @@ class StoreInfos extends StatefulWidget {
State<StatefulWidget> createState() {
return _StoreInfos();
}
}
class _StoreInfos extends State<StoreInfos> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.fromLTRB(17, 20, 15, 8),
padding: EdgeInsets.fromLTRB(10, 20, 10, 14),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
),
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.storeInfo != null ? widget.storeInfo.storeName : "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 18.sp,
color: Colors.black,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
height: 8.h,
),
Row(
children: [
Text(
S.of(context).ren(
widget.storeInfo != null
? widget.storeInfo.perCapitaConsumption
: "",
),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
),
SizedBox(
width: 22.w,
),
Row(
children: itemServer(
widget.storeInfo != null
? widget.storeInfo.businessService
: "",
),
),
],
),
SizedBox(
height: 12.h,
),
Text(
widget.storeInfo != null ? widget.storeInfo.address : "",
maxLines: 2,
textAlign: TextAlign.justify,
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
SizedBox(
height: 4.h,
),
Text(
S.of(context).yingyeshijian(widget.storeInfo == null
? ""
: (widget.storeInfo.openStartTime == null &&
widget.storeInfo.openEndTime == null)
? S.of(context).quantian
: "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} "
"- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"),
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
],
)),
Column(
children: [
MImage(
widget.storeInfo != null ? widget.storeInfo.logo : "",
width: 69,
height: 69,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
SizedBox(
height: 21.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
InkWell(
onTap: () {
if (widget.storeInfo == null ||
widget.storeInfo.latitude == null ||
widget.storeInfo.longitude == null ||
widget.storeInfo.latitude == "" ||
widget.storeInfo.longitude == "") return;
Navigator.of(context)
.pushNamed('/router/location_map', arguments: {
"lat": widget.storeInfo.latitude,
"lng": widget.storeInfo.longitude,
"storeName": widget.storeInfo.storeName,
});
},
child: Image.asset(
"assets/image/icon_union_location.png",
width: 24.w,
height: 24.h,
),
),
SizedBox(
width: 16.w,
),
InkWell(
onTap: () {
showCallMobile();
},
child: Image.asset(
"assets/image/icon_union_call.png",
width: 24,
height: 24,
),
),
],
),
],
)
],
),
);
return AspectRatio(
aspectRatio: 1,
child: Container(
@ -226,13 +377,13 @@ class _StoreInfos extends State<StoreInfos> {
),
);
},
itemCount: (widget.storeInfo != null && widget.storeInfo.bannerList != null)
itemCount:
(widget.storeInfo != null && widget.storeInfo.bannerList != null)
? widget.storeInfo.bannerList.length
: 1),
);
}
List<Widget> itemServer(String businessService) {
if (businessService == null || businessService == "") return [];
var list = businessService.split(",");
@ -293,7 +444,4 @@ class _StoreInfos extends State<StoreInfos> {
throw 'Could not launch $url';
}
}
}

32
lib/union/union_view/union_coupon.dart

@ -29,27 +29,27 @@ class _UnionCoupon extends State<UnionCoupon> {
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.h, bottom: 10.h),
child: ItemTitle(
text: S.of(context).youhuiquan,
imgPath: "assets/image/icon_union_coupons.png",
),
),
// Container(
// margin: EdgeInsets.only(top: 10.h, bottom: 10.h),
// child: ItemTitle(
// text: S.of(context).youhuiquan,
// imgPath: "assets/image/icon_union_coupons.png",
// ),
// ),
(widget.storeInfo != null && widget.storeInfo.couponVOList != null)
? buildCoupon()
: Container(
width: double.infinity,
height: 50.h,
height: 0.h,
alignment: Alignment.center,
child: Text(
S.of(context).zanwuyouhuiquankelingqu,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFA0A0A0),
),
),
// child: Text(
// S.of(context).zanwuyouhuiquankelingqu,
// style: TextStyle(
// fontSize: 14.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFFA0A0A0),
// ),
// ),
),
],
);

37
lib/web/web_view/comment_list.dart

@ -23,6 +23,7 @@ class CommentList extends StatefulWidget {
final bool isKeyBoardShow;
final Function reply;
final Function delCommentTips;
final double fontSize;
CommentList(
Key key,
@ -32,6 +33,7 @@ class CommentList extends StatefulWidget {
this.isKeyBoardShow,
this.reply,
this.delCommentTips,
this.fontSize
) : super(key: key);
@override
@ -102,8 +104,8 @@ class _CommentList extends State<CommentList> {
Text(
S.of(context).pinglun_(commentTotal.toString()),
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
fontSize:widget.fontSize+4,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A),
),
),
@ -112,10 +114,10 @@ class _CommentList extends State<CommentList> {
),
Text(
S.of(context).xihuan_(
"${(widget.article?.likes ?? widget.activity?.likes) ?? "0"}"),
"${widget.article?.likes ?? widget.activity?.likes ?? "0"}"),
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
fontSize:widget.fontSize+4,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A),
),
),
@ -161,7 +163,7 @@ class _CommentList extends State<CommentList> {
child: Text(
S.of(context).yixiansquanbupinglun,
style: TextStyle(
fontSize: 14.sp,
fontSize:widget.fontSize+2,
color: Color(0xff353535),
),
),
@ -179,8 +181,8 @@ class _CommentList extends State<CommentList> {
child: Text(
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
fontSize:widget.fontSize+2,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
@ -277,7 +279,7 @@ class _CommentList extends State<CommentList> {
),
Expanded(
child: Container(
height: 60.h,
// height: 60.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
@ -288,8 +290,8 @@ class _CommentList extends State<CommentList> {
TextSpan(
text: memberList.username,
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
fontSize:widget.fontSize+2,
color: Colors.black,
),
),
@ -297,12 +299,15 @@ class _CommentList extends State<CommentList> {
),
textDirection: TextDirection.ltr,
),
SizedBox(
height: 3.h,
),
Text(
memberList.createTime,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontSize:widget.fontSize,
color: Color(0xff808080),
),
),
@ -353,7 +358,7 @@ class _CommentList extends State<CommentList> {
text,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 12.sp,
fontSize:widget.fontSize,
),
);
},
@ -375,7 +380,7 @@ class _CommentList extends State<CommentList> {
child: Text(
memberList.content,
style: TextStyle(
fontSize: 14.sp,
fontSize:widget.fontSize+2,
color: Color(0xff1A1A1A),
),
),
@ -400,7 +405,7 @@ class _CommentList extends State<CommentList> {
Text(
"${memberList.parentUserName}:" ?? "",
style: TextStyle(
fontSize: 12.sp,
fontSize: widget.fontSize,
color: Color(0xff808080),
),
),
@ -409,7 +414,7 @@ class _CommentList extends State<CommentList> {
child: Text(
memberList.parentContent ?? "",
style: TextStyle(
fontSize: 12.sp,
fontSize:widget.fontSize,
color: Color(0xff808080),
),
),

Loading…
Cancel
Save