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

175
lib/community/community_list.dart

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

83
lib/community/community_view/community_dynamic.dart

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

2
lib/generated/intl/messages_en.dart

@ -409,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"), "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"), "lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18, "lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"), "main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"), "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"), "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"), "menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21, "mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "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"), "login_splash" : MessageLookupByLibrary.simpleMessage("Welcome Back Home"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("balance of green currency"), "lvbiyue" : MessageLookupByLibrary.simpleMessage("balance of green currency"),
"lvbiyue_" : m18, "lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("green payment"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("Jing Bi"), "main_menu1" : MessageLookupByLibrary.simpleMessage("Jing Bi"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("Union"), "main_menu2" : MessageLookupByLibrary.simpleMessage("Union"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("Organic Life"), "main_menu3" : MessageLookupByLibrary.simpleMessage("Organic Life"),
@ -423,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("updated every Wednesday"), "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("updated every Wednesday"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"), "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("Store Selection"), "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("Store Selection"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("store balance"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("Please enter the house number"), "menpaihao" : MessageLookupByLibrary.simpleMessage("Please enter the house number"),
"mi" : m21, "mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("Details"), "mingxi" : MessageLookupByLibrary.simpleMessage("Details"),

2
lib/generated/intl/messages_zh_CN.dart

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

2
lib/generated/intl/messages_zh_Hans_CN.dart

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

2
lib/generated/intl/messages_zh_Hant_CN.dart

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

2
lib/generated/intl/messages_zh_TW.dart

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

2
lib/l10n/intl_en.arb

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

2
lib/l10n/intl_en_US.arb

@ -722,6 +722,8 @@
"lijishiyong":"Use Now", "lijishiyong":"Use Now",
"wangjimima":"Forgot password", "wangjimima":"Forgot password",
"xuanzeshangpinlingqufangshi":"Please select the picking method of goods", "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":"立即使用", "lijishiyong":"立即使用",
"wangjimima":"忘记密码", "wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式", "xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
"mendianyue":"门店余额",
"lvbizhifu":"绿币支付",

2
lib/l10n/intl_zh_Hans_CN.arb

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

2
lib/l10n/intl_zh_Hant_CN.arb

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

2
lib/l10n/intl_zh_TW.arb

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

2
lib/mine/mine_wallet_page.dart

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

2
lib/mine/personal_page.dart

@ -434,7 +434,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
), ),
Container( Container(
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
margin: EdgeInsets.only(bottom:30.h), margin: EdgeInsets.only(bottom: 30.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, 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( bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h), preferredSize: Size(double.infinity, 38.h),
child: Theme( child: Theme(
data: ThemeData( data: ThemeData(
splashColor: Colors.transparent, // splashColor: Colors.transparent, //
highlightColor: 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,
), ),
MyTab( child: TabBar(
text: S.of(context).yiwancheng, 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( body: TabBarView(
@ -212,6 +212,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
} }
setState(() {}); setState(() {});
} else { } else {
SmartDialog.showToast(baseData?.msg ?? "",alignment: Alignment.center);
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
} }
@ -230,9 +231,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
}); });
} }
String orderAllGoods(OrderInfo orderInfo){ String orderAllGoods(OrderInfo orderInfo) {
int count = 0; int count = 0;
if(orderInfo.productList != null){ if (orderInfo.productList != null) {
orderInfo.productList.forEach((element) { orderInfo.productList.forEach((element) {
count += element.buyNum; count += element.buyNum;
}); });
@ -314,7 +315,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ), // ),
// ), // ),
Container( Container(
margin: EdgeInsets.only(left: 5.w, top: 12.h), margin: EdgeInsets.only(left: 5.w, top: 12.h),
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -568,16 +569,11 @@ class _OrderHistoryList extends State<OrderHistoryList>
queryDetails(id) async { queryDetails(id) async {
if (apiService == null) { if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance(); SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService( apiService = ApiService(Dio(),
Dio(), context: context, token: value.getString("token"), showLoading: true);
context: context,
token: value.getString("token"),
showLoading: true
);
} }
BaseData<OrderInfo> baseData = await apiService BaseData<OrderInfo> baseData =
.orderDetail(id) await apiService.orderDetail(id).catchError((error) {});
.catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
return baseData.data; return baseData.data;
} }
@ -598,7 +594,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
minService, minService,
orderInfo, orderInfo,
(BaseData baseData) { (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), () { Future.delayed(Duration(seconds: 3), () {
_onRefresh(); _onRefresh();
}); });

8
lib/order/order_view/order_pay_selected.dart

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

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.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 localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/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'; 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 localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/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); data: _data);
final value = BaseData<PageInfo<OrderInfo>>.fromJson( final value = BaseData<PageInfo<OrderInfo>>.fromJson(
_result.data, _result.data,
(json) => PageInfo<OrderInfo>.fromJson( (json) => ((json??"") == "")?null:PageInfo<OrderInfo>.fromJson(
json, json,
(json) => 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( Expanded(
flex: 1, flex: 1,
child: Text( child: Text(
"VIP价格", "VIP权益",
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 14.sp, fontSize: 14.sp,

6
lib/settlement/settlement_view/pay_method.dart

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

Loading…
Cancel
Save