Browse Source

1.扫码增加根据http或者https跳转对应网页;

2.回乡钱包-消费列表-消费名字改为type(最详细名称字段)
3.支付方式名字修改;
4.部分优化修改
dart3_last
wurong 2 years ago
parent
commit
db9c79b8b6
  1. 186
      lib/community/community_details.dart
  2. 175
      lib/community/community_list.dart
  3. 83
      lib/community/community_view/community_dynamic.dart
  4. 2
      lib/generated/intl/messages_en.dart
  5. 2
      lib/generated/intl/messages_en_US.dart
  6. 2
      lib/generated/intl/messages_zh_CN.dart
  7. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  8. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  9. 2
      lib/generated/intl/messages_zh_TW.dart
  10. 20
      lib/generated/l10n.dart
  11. 2
      lib/l10n/intl_en.arb
  12. 2
      lib/l10n/intl_en_US.arb
  13. 2
      lib/l10n/intl_zh_CN.arb
  14. 2
      lib/l10n/intl_zh_Hans_CN.arb
  15. 2
      lib/l10n/intl_zh_Hant_CN.arb
  16. 2
      lib/l10n/intl_zh_TW.arb
  17. 3
      lib/main.dart
  18. 2
      lib/mine/mine_page.dart
  19. 135
      lib/mine/mine_view/mine_view.dart
  20. 2
      lib/mine/mine_wallet_page.dart
  21. 2
      lib/mine/personal_page.dart
  22. 49
      lib/mine/scan_web.dart
  23. 94
      lib/order/order_history_page.dart
  24. 8
      lib/order/order_view/order_pay_selected.dart
  25. 2
      lib/retrofit/min_api.dart
  26. 2
      lib/retrofit/retrofit_api.dart
  27. 2
      lib/retrofit/retrofit_api.g.dart
  28. 2
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  29. 6
      lib/settlement/settlement_view/pay_method.dart

186
lib/community/community_details.dart

@ -26,9 +26,11 @@ class CommunityDetails extends StatefulWidget {
}
}
class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObserver {
class _CommunityDetails extends State<CommunityDetails>
with WidgetsBindingObserver {
double height = 0;
double commentHeight = 60.h;
// ComunityComment comunity;
String parenId = "0";
final GlobalKey commentKey = GlobalKey();
@ -44,15 +46,11 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
Article article;
String businessId;
@override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
if (MediaQuery
.of(context)
.viewInsets
.bottom == 0) {
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
@ -90,8 +88,8 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
context: context,
token: value.getString("token"),
);
BaseData<Article> baseData = await apiService.informationInfo(id)
.catchError((onError) {
BaseData<Article> baseData =
await apiService.informationInfo(id).catchError((onError) {
debugPrint(onError.toString());
});
if (baseData != null && baseData.isSuccess) {
@ -117,91 +115,92 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
if(article != null)
CommunityDynamic(
article,
0,
exitFull: () {
setState(() {});
},
userId:widget.arguments !=null ? widget.arguments["userId"] :widget.arguments["mid"],
itemCount: 3,
isDetails: true,
heightFun: (height) {
this.height = height +
MediaQuery
.of(context)
.padding
.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
},
),
CommentList(
commentKey,
article?.likes ?? 0,
businessId,
4,
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total){setState(() {
commentTotal = total;
});},
),
if (memberList == null || memberList.length == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S.of(context)
.zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
child: Container(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
if (article != null)
CommunityDynamic(
article,
0,
exitFull: () {
setState(() {});
},
userId: widget.arguments != null
? widget.arguments["userId"]
: widget.arguments["mid"],
itemCount: 3,
isDetails: true,
heightFun: (height) {
this.height = height +
MediaQuery.of(context).padding.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
},
),
CommentList(
commentKey,
article?.likes ?? 0,
businessId,
4,
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total) {
setState(() {
commentTotal = total;
});
},
),
),
],
if (memberList == null || memberList.length == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
),
],
),
),
flex: 1,
),
),
flex: 1,
),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryInformationLikes,
isLike: article?.liked ?? false,
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryInformationLikes,
isLike: article?.liked ?? false,
),
],
),
],
),
)),
)),
);
}
////
_queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes(businessId).catchError((onError) {});
BaseData baseData =
await apiService.informationLikes(businessId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {});
setState(() {
@ -222,7 +221,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
"content": content,
"parentId": parenId,
"relationalId": businessId,
"relationalType":4
"relationalType": 4
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
@ -241,10 +240,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
scrollController.animateTo(
first.dy +
scrollController.offset -
(kToolbarHeight + MediaQuery
.of(context)
.padding
.top),
(kToolbarHeight + MediaQuery.of(context).padding.top),
duration: Duration(milliseconds: 300),
curve: Curves.easeIn,
);
@ -254,15 +250,9 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
final TextEditingController commentTextController = TextEditingController();
contentHeight() {
double contentHeight = MediaQuery
.of(context)
.size
.height -
double contentHeight = MediaQuery.of(context).size.height -
kToolbarHeight -
MediaQuery
.of(context)
.padding
.top -
MediaQuery.of(context).padding.top -
160.h;
if ((contentHeight - 60.h) > (128.h * memberList.length)) {
commentHeight = contentHeight - (128.h * memberList.length);
@ -303,11 +293,11 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
await apiService.memberCommentList({
"pageNum": 1,
"pageSize": 100,
"relationalId": businessId,
"relationalType":4,
"relationalType": 4,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
commentTotal = baseData.data.size;

175
lib/community/community_list.dart

@ -24,16 +24,8 @@ class CommunityList extends StatefulWidget {
final Function exitFull;
final Function removalDynamic;
CommunityList(
this.comments,
this.userId,
this.commentType,{
this.isList = false,
this.exitFull,
this.removalDynamic
}
);
CommunityList(this.comments, this.userId, this.commentType,
{this.isList = false, this.exitFull, this.removalDynamic});
@override
State<StatefulWidget> createState() {
@ -88,39 +80,43 @@ class _CommunityList extends State<CommunityList> {
children: [
(widget.comments == null || widget.comments.length == 0)
? NoDataView(
src: widget.commentType == 1 ? "assets/image/dong_tai.webp" :"assets/image/guan_zhu.webp",
isShowBtn: false,
text:widget.commentType == 1 ? "目前暂无发布动态,要把开心的事讲出来哦~" :"目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
):
ListView.builder(
padding: EdgeInsets.zero,
itemCount: widget.comments.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/new_community_details', arguments: {
"commentsId": widget.comments[position].id,
"userId":widget.userId,
// exitFull: () {
// setState(() {});
// },
}).then((value) {
widget.exitFull();
setState(() {
});
});
setState(() {});
},
child: communityItem(widget.comments[position], position),
);
},
),
src: widget.commentType == 1
? "assets/image/dong_tai.webp"
: "assets/image/guan_zhu.webp",
isShowBtn: false,
text: widget.commentType == 1
? "目前暂无发布动态,要把开心的事讲出来哦~"
: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
)
: ListView.builder(
padding: EdgeInsets.zero,
itemCount: widget.comments.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/new_community_details',
arguments: {
"commentsId": widget.comments[position].id,
"userId": widget.userId,
// exitFull: () {
// setState(() {});
// },
}).then((value) {
widget.exitFull();
setState(() {});
});
setState(() {});
},
child: communityItem(widget.comments[position], position),
);
},
),
],
));
}
@ -149,7 +145,7 @@ class _CommunityList extends State<CommunityList> {
fit: BoxFit.contain,
radius: BorderRadius.circular(2),
width: MediaQuery.of(context).size.width / 1.5,
height: MediaQuery.of(context).size.width/1.5,
height: MediaQuery.of(context).size.width / 1.5,
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
)),
@ -315,54 +311,55 @@ class _CommunityList extends State<CommunityList> {
),
),
if ((comments?.memberInfo?.mid ?? "") != (widget.userId))
GestureDetector(
onTap: () {
setState(() {
if (widget.commentType == 0) {
comments.selfFollow = !(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,comments?.selfFollow ?? false);
} else {
showDeleteDialog(position);
}
});
},
child:
(widget.commentType == 0) ?
Container(
width: 56.w,
height: 25.h,
alignment: Alignment.center,
child: RoundButton(
GestureDetector(
onTap: () {
setState(() {
if (widget.commentType == 0) {
comments.selfFollow =
!(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,
comments?.selfFollow ?? false);
} else {
showDeleteDialog(position);
}
});
},
child: (widget.commentType == 0)
? Container(
width: 56.w,
height: 25.h,
backgroup: (comments?.selfFollow ?? false)
? Color(0xFFE6E6E6)
: Color(0xFF32A060),
textColor: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
text: (comments?.selfFollow ?? false)
? S.of(context).yiguanzhu
: S.of(context).guanzhu,
radius: 20,
icons: Icon(
(comments?.selfFollow ?? false)
? Icons.check
: Icons.add,
color: (comments?.selfFollow ?? false)
alignment: Alignment.center,
child: RoundButton(
height: 25.h,
backgroup: (comments?.selfFollow ?? false)
? Color(0xFFE6E6E6)
: Color(0xFF32A060),
textColor: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
size: 15,
text: (comments?.selfFollow ?? false)
? S.of(context).yiguanzhu
: S.of(context).guanzhu,
radius: 20,
icons: Icon(
(comments?.selfFollow ?? false)
? Icons.check
: Icons.add,
color: (comments?.selfFollow ?? false)
? Color(0xFF808080)
: Colors.white,
size: 15,
),
))
: Padding(
padding: EdgeInsets.all(20),
child: Icon(
Icons.close,
color: Colors.black,
size: 16,
),
))
: Padding(
padding: EdgeInsets.all(20),
child: Icon(
Icons.close,
color: Colors.black,
size: 16,
),
),
),
),
],
),
SizedBox(
@ -457,7 +454,7 @@ class _CommunityList extends State<CommunityList> {
Expanded(
child: InkWell(
child: BorderText(
text:S.of(context).quxiao,
text: S.of(context).quxiao,
textColor: Color(0xFF32A060),
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -478,7 +475,7 @@ class _CommunityList extends State<CommunityList> {
Expanded(
child: InkWell(
child: RoundButton(
text:S.of(context).queding,
text: S.of(context).queding,
textColor: Colors.white,
radius: 4,
padding: EdgeInsets.all(12),

83
lib/community/community_view/community_dynamic.dart

@ -37,7 +37,7 @@ class CommunityDynamic extends StatefulWidget {
CommunityDynamic(
this.article,
this.commentType,{
this.commentType, {
Key key,
this.itemCount = 9,
this.heightFun,
@ -437,47 +437,46 @@ class _CommunityDynamic extends State<CommunityDynamic> {
],
))),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
widget.article.liked =
!(widget.article.liked ?? false);
_queryInformationLikes(
widget.article.liked ?? false);
});
},
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
children: [
(widget.article.liked ?? false)
? Image.asset(
"assets/image/icon_like.webp",
width: 16,
height: 16,
)
: Image.asset(
"assets/image/icon_like_h.webp",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.likes ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
)
),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
widget.article.liked =
!(widget.article.liked ?? false);
_queryInformationLikes(
widget.article.liked ?? false);
});
},
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
children: [
(widget.article.liked ?? false)
? Image.asset(
"assets/image/icon_like.webp",
width: 16,
height: 16,
)
: Image.asset(
"assets/image/icon_like_h.webp",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.likes ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
)),
if ((widget?.article?.author != widget.userId ?? "") &&
widget.commentType == 0)
Expanded(

2
lib/generated/intl/messages_en.dart

@ -409,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),

2
lib/generated/intl/messages_en_US.dart

@ -409,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("Welcome Back Home"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("balance of green currency"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("green payment"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("Jing Bi"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("Union"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("Organic Life"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("updated every Wednesday"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("Store Selection"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("store balance"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("Please enter the house number"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("Details"),

2
lib/generated/intl/messages_zh_CN.dart

@ -409,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -409,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -405,6 +405,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有機生活"),
@ -419,6 +420,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),

2
lib/generated/intl/messages_zh_TW.dart

@ -407,6 +407,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有機生活"),
@ -421,6 +422,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),

20
lib/generated/l10n.dart

@ -6935,6 +6935,26 @@ class S {
);
}
/// ``
String get mendianyue {
return Intl.message(
'门店余额',
name: 'mendianyue',
desc: '',
args: [],
);
}
/// `绿`
String get lvbizhifu {
return Intl.message(
'绿币支付',
name: 'lvbizhifu',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

2
lib/l10n/intl_en.arb

@ -721,6 +721,8 @@
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
"mendianyue":"门店余额",
"lvbizhifu":"绿币支付",

2
lib/l10n/intl_en_US.arb

@ -722,6 +722,8 @@
"lijishiyong":"Use Now",
"wangjimima":"Forgot password",
"xuanzeshangpinlingqufangshi":"Please select the picking method of goods",
"mendianyue":"store balance",
"lvbizhifu":"green payment",

2
lib/l10n/intl_zh_CN.arb

@ -722,6 +722,8 @@
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
"mendianyue":"门店余额",
"lvbizhifu":"绿币支付",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -722,6 +722,8 @@
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
"mendianyue":"门店余额",
"lvbizhifu":"绿币支付",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -713,6 +713,8 @@
"lijishiyong":"立即使用",
"wangjimima":"忘記密碼",
"xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",
"mendianyue":"門店餘額",
"lvbizhifu":"綠幣支付",

2
lib/l10n/intl_zh_TW.arb

@ -715,6 +715,8 @@
"lijishiyong":"立即使用",
"wangjimima":"忘記密碼",
"xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",
"mendianyue":"門店餘額",
"lvbizhifu":"綠幣支付",

3
lib/main.dart

@ -110,6 +110,7 @@ import 'mine/mine_vip/binding_assistant_card.dart';
import 'mine/mine_vip/legal_right_details.dart';
import 'mine/mine_vip/mine_attainment_page.dart';
import 'mine/mine_vip/mine_vip_core.dart';
import 'mine/scan_web.dart';
import 'order/bargain_group_order.dart';
import 'mine/personal_page.dart';
import 'order/exchange_write_off_page.dart';
@ -417,4 +418,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
UserVipServicePage(),
'/router/help_farmers_page': (context, {arguments}) =>
HelpFarmersPage(),
'/router/scan_web': (context, {arguments}) =>
ScanWeb(arguments:arguments),
};

2
lib/mine/mine_page.dart

@ -259,7 +259,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
// /////
// attention(),
//
// ///
// WalletCoupon(),
],

135
lib/mine/mine_view/mine_view.dart

@ -21,6 +21,7 @@ import 'package:huixiang/view_widget/request_permission.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:webview_flutter/webview_flutter.dart';
// import 'package:qrscan/qrscan.dart' as scanner;
class MineView extends StatefulWidget {
@ -29,9 +30,10 @@ class MineView extends StatefulWidget {
final GestureTapCallback toIntegralPage;
final Function messageZero;
final int totalMsg;
final SocialInfo infoNumber;
final SocialInfo infoNumber;
MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,this.messageZero,this.totalMsg,this.infoNumber);
MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,
this.messageZero, this.totalMsg, this.infoNumber);
@override
State<StatefulWidget> createState() {
@ -60,8 +62,6 @@ class _MineView extends State<MineView> {
}
}
@override
Widget build(BuildContext context) {
return Column(
@ -77,28 +77,30 @@ class _MineView extends State<MineView> {
alignment: Alignment.center,
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/system_msg_page').then((value) {
Navigator.of(context)
.pushNamed('/router/system_msg_page')
.then((value) {
widget.messageZero();
});
},
child: Container(
height: 24.h,
alignment:Alignment.center,
child:Stack(
alignment: Alignment.center,
child: Stack(
children: [
Image.asset(
"assets/image/icon_notices.webp",
width:32,
width: 32,
height: 32,
color: Colors.white,
),
if(widget.totalMsg != 0)
if (widget.totalMsg != 0)
Container(
width:36.w,
width: 36.w,
alignment: Alignment.topRight,
child:Container(
width:22.w,
height:14.h,
child: Container(
width: 22.w,
height: 14.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(
@ -106,23 +108,20 @@ class _MineView extends State<MineView> {
color: Colors.white,
style: BorderStyle.solid,
),
color:Color(0xFFFF441A),
color: Color(0xFFFF441A),
),
child:RoundButton(
text:widget.totalMsg.toString(),
child: RoundButton(
text: widget.totalMsg.toString(),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFFF441A),
fontSize:8.sp,
fontSize: 8.sp,
radius: 100,
)
),
)),
)
],
),
)
)
),
))),
InkWell(
onTap: () {
toScan();
@ -131,7 +130,7 @@ class _MineView extends State<MineView> {
padding: EdgeInsets.all(8.h),
child: Image.asset(
"assets/image/icon_scan_qr_code.webp",
width:32,
width: 32,
height: 32,
color: Colors.white,
),
@ -184,11 +183,12 @@ class _MineView extends State<MineView> {
} else if (await Permission.camera.isGranted) {
// http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512
var result = await Navigator.of(context).pushNamed('/router/qr_scan');
if(result.toString().contains("type\":\"coupon")){
if (result.toString().contains("type\":\"coupon")) {
///
activityShowAlertDialog(result.toString());
return;
}if(result.toString().contains("type\":\"wiped")){
}
if (result.toString().contains("type\":\"wiped")) {
///
queryWiped(jsonDecode(result.toString())["memberCouponId"]);
return;
@ -213,6 +213,17 @@ class _MineView extends State<MineView> {
"tableId": int.tryParse(tableId),
},
);
return;
}
if (result.toString().contains("http:") ||
result.toString().contains("https:")) {
///
Navigator.of(context).pushNamed(
'/router/scan_web',
arguments: {
"result": result,
},
);
}
} else {
await Permission.camera.request();
@ -300,7 +311,7 @@ class _MineView extends State<MineView> {
child: Text(
widget.userInfo == null
? S.of(context).denglu
: "${widget.userInfo.nickname==""?"回乡":widget.userInfo.nickname}",
: "${widget.userInfo.nickname == "" ? "回乡" : widget.userInfo.nickname}",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -308,12 +319,12 @@ class _MineView extends State<MineView> {
),
),
),
if(widget.userInfo.level != 1)
Image.asset(
"assets/image/icon_user.webp",
width: 18.w,
height: 18.h,
),
if (widget.userInfo.level != 1)
Image.asset(
"assets/image/icon_user.webp",
width: 18.w,
height: 18.h,
),
],
),
widget.userInfo == null
@ -326,33 +337,33 @@ class _MineView extends State<MineView> {
),
)
: Row(
children: [
Text(
"${S.of(context).guanzhu} ${widget?.infoNumber?.follow ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
fontFamily: 'JDZhengHT',
color: Color(0xFFFFFFFF),
),
),
Container(
width: 1.w,
height: 12.h,
margin: EdgeInsets.symmetric(horizontal: 3.w),
color: Color(0xFFFFFFFF),
),
Text(
"${S.of(context).fensi} ${widget?.infoNumber?.fans ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
children: [
Text(
"${S.of(context).guanzhu} ${widget?.infoNumber?.follow ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
fontFamily: 'JDZhengHT',
color: Color(0xFFFFFFFF),
),
),
Container(
width: 1.w,
height: 12.h,
margin: EdgeInsets.symmetric(horizontal: 3.w),
color: Color(0xFFFFFFFF),
),
Text(
"${S.of(context).fensi} ${widget?.infoNumber?.fans ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
),
],
),
),
],
),
],
),
),
@ -375,12 +386,12 @@ class _MineView extends State<MineView> {
widget.toIntegralPage();
},
child: Container(
padding: EdgeInsets.only(top: 4.h, bottom: 4.h, right: 16.w,left: 7.w),
padding: EdgeInsets.only(
top: 4.h, bottom: 4.h, right: 16.w, left: 7.w),
margin: EdgeInsets.only(right: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white
),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [

2
lib/mine/mine_wallet_page.dart

@ -458,7 +458,7 @@ class _MineWalletPage extends State<MineWalletPage> {
Expanded(
flex: 7,
child: Text(
userBill.title,
userBill.type,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp,

2
lib/mine/personal_page.dart

@ -434,7 +434,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
Container(
color: Color(0xFFFFFFFF),
margin: EdgeInsets.only(bottom:30.h),
margin: EdgeInsets.only(bottom: 30.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,

49
lib/mine/scan_web.dart

@ -0,0 +1,49 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:webview_flutter/webview_flutter.dart';
class ScanWeb extends StatefulWidget {
final Map<String, dynamic> arguments;
ScanWeb({this.arguments});
@override
State<StatefulWidget> createState() {
return _ScanWeb();
}
}
class _ScanWeb extends State<ScanWeb> {
var controller = new ScrollController();
String result;
@override
void initState() {
super.initState();
result = widget.arguments["result"];
EasyLoading.show(status: S.current.zhengzaijiazai);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top:MediaQuery.of(context).padding.top),
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,
child:
WebView(
initialUrl:result,
javascriptMode: JavascriptMode.unrestricted,
onPageFinished: (initialUrl){
EasyLoading.dismiss();
},
));
}
}

94
lib/order/order_history_page.dart

@ -70,42 +70,42 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: Theme(
data: ThemeData(
splashColor: Colors.transparent, //
highlightColor: Colors.transparent, //
),
child: TabBar(
controller: tabController,
isScrollable: false,
indicatorWeight: 2.w,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Color(0xFF39B54A),
indicatorPadding: EdgeInsets.only(top: 3.h),
unselectedLabelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.normal,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
labelColor: Colors.black,
tabs: [
MyTab(
text: S.of(context).quanbu,
),
MyTab(
text: S.of(context).daifukuan,
),
MyTab(
text: S.of(context).weiwancheng,
data: ThemeData(
splashColor: Colors.transparent, //
highlightColor: Colors.transparent, //
),
MyTab(
text: S.of(context).yiwancheng,
)
],
)),
child: TabBar(
controller: tabController,
isScrollable: false,
indicatorWeight: 2.w,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Color(0xFF39B54A),
indicatorPadding: EdgeInsets.only(top: 3.h),
unselectedLabelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.normal,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
labelColor: Colors.black,
tabs: [
MyTab(
text: S.of(context).quanbu,
),
MyTab(
text: S.of(context).daifukuan,
),
MyTab(
text: S.of(context).weiwancheng,
),
MyTab(
text: S.of(context).yiwancheng,
)
],
)),
),
),
body: TabBarView(
@ -212,6 +212,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
}
setState(() {});
} else {
SmartDialog.showToast(baseData?.msg ?? "",alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
@ -230,9 +231,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
});
}
String orderAllGoods(OrderInfo orderInfo){
String orderAllGoods(OrderInfo orderInfo) {
int count = 0;
if(orderInfo.productList != null){
if (orderInfo.productList != null) {
orderInfo.productList.forEach((element) {
count += element.buyNum;
});
@ -314,7 +315,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ),
// ),
Container(
margin: EdgeInsets.only(left: 5.w, top: 12.h),
margin: EdgeInsets.only(left: 5.w, top: 12.h),
),
Expanded(
child: Container(
@ -568,16 +569,11 @@ class _OrderHistoryList extends State<OrderHistoryList>
queryDetails(id) async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
}
BaseData<OrderInfo> baseData = await apiService
.orderDetail(id)
.catchError((error) {});
BaseData<OrderInfo> baseData =
await apiService.orderDetail(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
return baseData.data;
}
@ -598,7 +594,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
minService,
orderInfo,
(BaseData baseData) {
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
SmartDialog.showToast(
baseData?.msg == "ok" ? "订单支付成功" : baseData?.msg,
alignment: Alignment.center);
Future.delayed(Duration(seconds: 3), () {
_onRefresh();
});

8
lib/order/order_view/order_pay_selected.dart

@ -70,7 +70,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
"助农积分",
S.of(context).zhunongjifen,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -101,7 +101,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Text(
S.of(context).pingtaiyue,
S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -132,7 +132,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
S.of(context).dianpuyue,
S.of(context).mendianyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -164,7 +164,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
"绿币余额",
S.of(context).lvbizhifu,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "https://pos.api.lotus-wallet.com/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.dart

@ -64,7 +64,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8766/app/";///
const localBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.g.dart

@ -866,7 +866,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<PageInfo<OrderInfo>>.fromJson(
_result.data,
(json) => PageInfo<OrderInfo>.fromJson(
(json) => ((json??"") == "")?null:PageInfo<OrderInfo>.fromJson(
json,
(json) => OrderInfo.fromJson(json),
),

2
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -84,7 +84,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
Expanded(
flex: 1,
child: Text(
"VIP价格",
"VIP权益",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,

6
lib/settlement/settlement_view/pay_method.dart

@ -118,7 +118,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
S.of(context).pingtaiyue,
S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -162,7 +162,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
S.of(context).dianpuyue,
S.of(context).mendianyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -215,7 +215,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
"绿币余额",
S.of(context).lvbizhifu,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),

Loading…
Cancel
Save