diff --git a/android/app/build.gradle b/android/app/build.gradle
index aa38b250..f35fed4c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -184,7 +184,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
+// implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
diff --git a/assets/image/2x/mine_order.webp b/assets/image/2x/mine_order.webp
new file mode 100644
index 00000000..4d92bd9f
Binary files /dev/null and b/assets/image/2x/mine_order.webp differ
diff --git a/assets/image/2x/mine_vip_logo.webp b/assets/image/2x/mine_vip_logo.webp
new file mode 100644
index 00000000..a971662e
Binary files /dev/null and b/assets/image/2x/mine_vip_logo.webp differ
diff --git a/assets/image/2x/set.webp b/assets/image/2x/set.webp
new file mode 100644
index 00000000..8bdaa12c
Binary files /dev/null and b/assets/image/2x/set.webp differ
diff --git a/assets/image/2x/vip_code.webp b/assets/image/2x/vip_code.webp
new file mode 100644
index 00000000..86e339cf
Binary files /dev/null and b/assets/image/2x/vip_code.webp differ
diff --git a/assets/image/2x/wallet.webp b/assets/image/2x/wallet.webp
new file mode 100644
index 00000000..9b4d7b70
Binary files /dev/null and b/assets/image/2x/wallet.webp differ
diff --git a/assets/image/2x/write_off_bg.webp b/assets/image/2x/write_off_bg.webp
new file mode 100644
index 00000000..e79aaf50
Binary files /dev/null and b/assets/image/2x/write_off_bg.webp differ
diff --git a/assets/image/3x/mine_order.webp b/assets/image/3x/mine_order.webp
new file mode 100644
index 00000000..129eb519
Binary files /dev/null and b/assets/image/3x/mine_order.webp differ
diff --git a/assets/image/3x/mine_vip_logo.webp b/assets/image/3x/mine_vip_logo.webp
new file mode 100644
index 00000000..00256821
Binary files /dev/null and b/assets/image/3x/mine_vip_logo.webp differ
diff --git a/assets/image/3x/set.webp b/assets/image/3x/set.webp
new file mode 100644
index 00000000..394ccc26
Binary files /dev/null and b/assets/image/3x/set.webp differ
diff --git a/assets/image/3x/vip_code.webp b/assets/image/3x/vip_code.webp
new file mode 100644
index 00000000..f7e16151
Binary files /dev/null and b/assets/image/3x/vip_code.webp differ
diff --git a/assets/image/3x/wallet.webp b/assets/image/3x/wallet.webp
new file mode 100644
index 00000000..7c248128
Binary files /dev/null and b/assets/image/3x/wallet.webp differ
diff --git a/assets/image/3x/write_off_bg.webp b/assets/image/3x/write_off_bg.webp
new file mode 100644
index 00000000..7a201a30
Binary files /dev/null and b/assets/image/3x/write_off_bg.webp differ
diff --git a/assets/image/mine_order.webp b/assets/image/mine_order.webp
new file mode 100644
index 00000000..c53b1869
Binary files /dev/null and b/assets/image/mine_order.webp differ
diff --git a/assets/image/mine_vip_logo.webp b/assets/image/mine_vip_logo.webp
new file mode 100644
index 00000000..239b516f
Binary files /dev/null and b/assets/image/mine_vip_logo.webp differ
diff --git a/assets/image/set.webp b/assets/image/set.webp
new file mode 100644
index 00000000..1c16f9b6
Binary files /dev/null and b/assets/image/set.webp differ
diff --git a/assets/image/vip_code.webp b/assets/image/vip_code.webp
new file mode 100644
index 00000000..05bc301b
Binary files /dev/null and b/assets/image/vip_code.webp differ
diff --git a/assets/image/wallet.webp b/assets/image/wallet.webp
new file mode 100644
index 00000000..d8ae8010
Binary files /dev/null and b/assets/image/wallet.webp differ
diff --git a/assets/image/write_off_bg.webp b/assets/image/write_off_bg.webp
new file mode 100644
index 00000000..819df9f7
Binary files /dev/null and b/assets/image/write_off_bg.webp differ
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 8d4492f9..9625e105 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 11.0
diff --git a/ios/Podfile b/ios/Podfile
index 14ddc14b..76ffa523 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
- platform :ios, '10.0'
+ platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -33,8 +33,18 @@ target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
+#post_install do |installer|
+# installer.pods_project.targets.each do |target|
+# flutter_additional_ios_build_settings(target)
+# end
+#end
+
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
+ target.build_configurations.each do |config|
+ config.build_settings['ENABLE_BITCODE'] = 'NO'
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
+ end
end
end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 8719b45b..5c696545 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -22,6 +22,8 @@ PODS:
- BaiduMapKit/Utils (6.5.1):
- BaiduMapKit/Base
- BMKLocationKit (2.0.4)
+ - emoji_picker_flutter (0.0.1):
+ - Flutter
- Flutter (1.0.0)
- flutter_baidu_mapapi_base (3.1.0):
- BaiduMapKit/Utils (= 6.5.1)
@@ -238,6 +240,7 @@ PODS:
- SDWebImage
DEPENDENCIES:
+ - emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- Flutter (from `Flutter`)
- flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`)
- flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`)
@@ -276,6 +279,8 @@ SPEC REPOS:
- ZLPhotoBrowser-objc
EXTERNAL SOURCES:
+ emoji_picker_flutter:
+ :path: ".symlinks/plugins/emoji_picker_flutter/ios"
Flutter:
:path: Flutter
flutter_baidu_mapapi_base:
@@ -325,6 +330,7 @@ SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777
BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780
+ emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37
flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434
@@ -355,6 +361,6 @@ SPEC CHECKSUMS:
webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232
ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736
-PODFILE CHECKSUM: 77c662d4cd560e96445691f5bf7f29e2b140072c
+PODFILE CHECKSUM: 9a26c1c4037e42be4afc95d70f8bd02a4b989a1c
COCOAPODS: 1.11.3
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 4c6caf70..700e6296 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -617,7 +617,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 7;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
- MARKETING_VERSION = 3.1.7;
+ MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -819,7 +819,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 7;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
- MARKETING_VERSION = 3.1.7;
+ MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -912,7 +912,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CURRENT_PROJECT_VERSION = 7;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
- MARKETING_VERSION = 3.1.7;
+ MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
diff --git a/lib/base_state.dart b/lib/base_state.dart
index 8d293697..916e047a 100644
--- a/lib/base_state.dart
+++ b/lib/base_state.dart
@@ -1,12 +1,11 @@
-
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:shared_preferences/shared_preferences.dart';
-abstract class BaseState extends State with WidgetsBindingObserver {
-
+abstract class BaseState extends State
+ with WidgetsBindingObserver {
@override
void dispose() {
super.dispose();
@@ -60,8 +59,10 @@ abstract class BaseState extends State with Widgets
params["activityId"] = pushMap["info"];
break;
case 3:
- routeName = "/router/union_detail_page";
+ routeName = "/router/store_order";
params["id"] = pushMap["info"];
+ params["tenant"] = pushMap["tenant"];
+ params["storeName"] = pushMap["storeName"];
break;
case 4:
routeName = "/router/integral_store_page";
@@ -71,6 +72,18 @@ abstract class BaseState extends State with Widgets
routeName = "/router/order_details";
params["id"] = pushMap["info"];
break;
+ case 6:
+ routeName = "/router/community_details";
+ params["businessId"] = pushMap["info"];
+ break;
+ case 8:
+ routeName = "/router/mine_wallet";
+ params["id"] = pushMap["info"];
+ break;
+ case 9:
+ routeName = "/router/welfare_page";
+ params["id"] = pushMap["info"];
+ break;
}
sharedPreferences.setString("pushData", "");
print("xgPushClickAction: routeName: $routeName");
@@ -79,6 +92,4 @@ abstract class BaseState extends State with Widgets
}
}
}
-
-
-}
\ No newline at end of file
+}
diff --git a/lib/community/community_child_page.dart b/lib/community/community_child_page.dart
index b154c9d4..6982bc7a 100644
--- a/lib/community/community_child_page.dart
+++ b/lib/community/community_child_page.dart
@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.dart';
import 'package:huixiang/retrofit/data/article.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@@ -15,6 +16,8 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
+import '../utils/flutter_utils.dart';
+
class CommunityChildPage extends StatefulWidget {
final String typeStr;
final Function onScroll;
@@ -84,6 +87,8 @@ class CommunityChildPageState extends State
"pageSize": 10,
"searchKey": searchKey ?? ""
}).catchError((error) {
+ SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
+ alignment: Alignment.center);
if (searchKey == null) {
refreshController.refreshFailed();
refreshController.loadFailed();
@@ -101,6 +106,7 @@ class CommunityChildPageState extends State
element.content = jsonEncode(baseData.data.list[0].subjectInfo);
element.mainTitle = baseData.data.list[0].subject;
element.followed = baseData.data.list[0].selfFollow;
+ element.liked = baseData.data.list[0].selfLike;
element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar;
element.authorName = baseData.data.list[0].memberInfo?.nickname;
element.location = baseData.data.list[0].location;
@@ -123,6 +129,7 @@ class CommunityChildPageState extends State
article.content = jsonEncode(element.subjectInfo);
article.mainTitle = element.subject;
article.followed = element.selfFollow;
+ article.liked = element.selfLike;
article.authorHeadImg = element.memberInfo?.avatar;
article.authorName = element.memberInfo?.nickname;
article.location = element.location;
@@ -206,6 +213,7 @@ class CommunityChildPageState extends State
setState(() {});
});
setState(() {});
+
},
);
},
diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart
index 89bf4e40..84bce1f9 100644
--- a/lib/community/community_details.dart
+++ b/lib/community/community_details.dart
@@ -1,3 +1,5 @@
+import 'dart:ui';
+
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@@ -26,9 +28,11 @@ class CommunityDetails extends StatefulWidget {
}
}
-class _CommunityDetails extends State with WidgetsBindingObserver {
+class _CommunityDetails extends State
+ with WidgetsBindingObserver {
double height = 0;
double commentHeight = 60.h;
+
// ComunityComment comunity;
String parenId = "0";
final GlobalKey commentKey = GlobalKey();
@@ -44,18 +48,23 @@ class _CommunityDetails extends State with WidgetsBindingObser
Article article;
String businessId;
+ final GlobalKey inputKey = GlobalKey();
+ final TextEditingController commentTextController = TextEditingController();
+ bool emojiShowing = false;
+ static double keyboard_height=300;
+ double keyboard = -1;
+ bool needShowSmiley = false;
+ bool needHideSmiley = false;
- @override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) {
+ isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0;
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)
+ if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@@ -68,6 +77,18 @@ class _CommunityDetails extends State with WidgetsBindingObser
});
}
});
+ if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
+ needShowSmiley = false;
+ setState(() {
+ emojiShowing = true;
+ });
+ }
+ if(needHideSmiley && window.viewInsets.bottom > 0.1) {
+ needHideSmiley = false;
+ setState(() {
+ emojiShowing = false;
+ });
+ }
}
@override
@@ -76,11 +97,45 @@ class _CommunityDetails extends State with WidgetsBindingObser
// comunity = widget.arguments["comment"];
businessId = widget.arguments["businessId"];
WidgetsBinding.instance.addObserver(this);
+ commentFocus.addListener(_focusNodeListener);
_queryMemberCommentList();
queryDetails(businessId);
}
+ void _focusNodeListener() {
+ /*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
+ setState(() {
+ smileyPadGone = true;
+ });
+ }*/
+ }
+
+ _onTextFieldTap() {
+ if(emojiShowing) {
+ needHideSmiley = true;
+ }
+ }
+
+ _onSmileyTap() {
+ if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
+ needShowSmiley = true;
+ commentFocus.unfocus();
+ } else {
+ setState(() {
+ emojiShowing = !emojiShowing;
+ isKeyBoardShow = emojiShowing;
+ });
+ }
+ }
+
+ @override
+ void dispose(){
+ WidgetsBinding.instance.removeObserver(this);
+ commentFocus.removeListener(_focusNodeListener);
+ super.dispose();
+ }
+
///详情接口
queryDetails(id) async {
SharedPreferences value = await SharedPreferences.getInstance();
@@ -90,8 +145,8 @@ class _CommunityDetails extends State with WidgetsBindingObser
context: context,
token: value.getString("token"),
);
- BaseData baseData = await apiService.informationInfo(id)
- .catchError((onError) {
+ BaseData baseData =
+ await apiService.informationInfo(id).catchError((onError) {
debugPrint(onError.toString());
});
if (baseData != null && baseData.isSuccess) {
@@ -103,105 +158,122 @@ class _CommunityDetails extends State with WidgetsBindingObser
@override
Widget build(BuildContext context) {
- return Scaffold(
- appBar: MyAppBar(
- title: S.of(context).dongtaixiangqing,
- titleColor: Colors.black,
- titleSize: 18.sp,
- background: Colors.white,
- leading: true,
- leadingColor: Colors.black,
- ),
- body: GestureDetector(
- behavior: HitTestBehavior.translucent,
- onTap: () {
+ double h = MediaQuery.of(context).viewInsets.bottom;
+ if(h > 0 && keyboard < h) {
+ keyboard = h;
+ setState(() {
+ });
+ }
+ return GestureDetector(
+ behavior: HitTestBehavior.translucent,
+ onTap: () {
+ setState(() {
+ emojiShowing = false;
+ isKeyBoardShow = emojiShowing;
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: Scaffold(
+ // resizeToAvoidBottomInset: false,
+ appBar: MyAppBar(
+ title: S.of(context).dongtaixiangqing,
+ titleColor: Colors.black,
+ titleSize: 18.sp,
+ background: Colors.white,
+ leading: true,
+ leadingColor: Colors.black,
+ ),
+ body: 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,
+ keyboard_height,
+ keyboard,
+ emojiShowing,
+ commentFocus,
+ commentTextController,
+ _toComment,
+ _onSmileyTap,
+ _onTextFieldTap,
+ _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 +294,7 @@ class _CommunityDetails extends State with WidgetsBindingObser
"content": content,
"parentId": parenId,
"relationalId": businessId,
- "relationalType":4
+ "relationalType": 4
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState;
@@ -241,28 +313,16 @@ class _CommunityDetails extends State 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,
);
}
- final GlobalKey inputKey = GlobalKey();
- 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);
@@ -300,14 +360,14 @@ class _CommunityDetails extends State with WidgetsBindingObser
Dio(),
context: context,
token: sharedPreferences.getString("token"),
- showLoading: false,
+ showLoading: true,
);
BaseData> 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;
diff --git a/lib/community/community_list.dart b/lib/community/community_list.dart
index 7c532043..358af6f8 100644
--- a/lib/community/community_list.dart
+++ b/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 createState() {
@@ -88,39 +80,43 @@ class _CommunityList extends State {
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 {
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 {
),
),
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 {
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 {
Expanded(
child: InkWell(
child: RoundButton(
- text:S.of(context).queding,
+ text: S.of(context).queding,
textColor: Colors.white,
radius: 4,
padding: EdgeInsets.all(12),
diff --git a/lib/community/community_page.dart b/lib/community/community_page.dart
index d767da25..61a91406 100644
--- a/lib/community/community_page.dart
+++ b/lib/community/community_page.dart
@@ -79,6 +79,7 @@ class _CommunityPage extends State
return Scaffold(
appBar: MyAppBar(
leading: false,
+ centerTitle: true,
titleChild: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width - 60.w,
diff --git a/lib/community/community_view/class_details.dart b/lib/community/community_view/class_details.dart
index e1632f2d..1a1652fc 100644
--- a/lib/community/community_view/class_details.dart
+++ b/lib/community/community_view/class_details.dart
@@ -1,4 +1,5 @@
import 'dart:convert';
+import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
@@ -53,11 +54,17 @@ class _ClassDetails extends State with WidgetsBindingObserver {
int chapterIndex = 0;
double height = 0;
var isShowMore = false;
+ bool emojiShowing = false;
+ static double keyboard_height=300;
+ double keyboard = -1;
+ bool needShowSmiley = false;
+ bool needHideSmiley = false;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
+ commentFocus.addListener(_focusNodeListener);
courseDetails(widget.arguments["id"]);
queryChapterList(widget.arguments["id"]);
}
@@ -70,6 +77,7 @@ class _ClassDetails extends State with WidgetsBindingObserver {
Dio(),
context: context,
token: value.getString("token"),
+ showLoading: true
);
}
BaseData> baseData =
@@ -114,6 +122,7 @@ class _ClassDetails extends State with WidgetsBindingObserver {
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
+ if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@@ -126,282 +135,364 @@ class _ClassDetails extends State with WidgetsBindingObserver {
});
}
});
+ if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
+ needShowSmiley = false;
+ setState(() {
+ emojiShowing = true;
+ });
+ }
+ if(needHideSmiley && window.viewInsets.bottom > 0.1) {
+ needHideSmiley = false;
+ setState(() {
+ emojiShowing = false;
+ });
+ }
+ }
+
+ void _focusNodeListener() {
+ /*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
+ setState(() {
+ smileyPadGone = true;
+ });
+ }*/
+ }
+
+ _onTextFieldTap() {
+ if(emojiShowing) {
+ needHideSmiley = true;
+ }
+ }
+
+ _onSmileyTap() {
+ if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
+ needShowSmiley = true;
+ commentFocus.unfocus();
+ } else {
+ setState(() {
+ emojiShowing = !emojiShowing;
+ isKeyBoardShow = emojiShowing;
+ });
+ }
+ }
+
+ @override
+ void dispose(){
+ WidgetsBinding.instance.removeObserver(this);
+ commentFocus.removeListener(_focusNodeListener);
+ super.dispose();
}
@override
Widget build(BuildContext context) {
+ double h = MediaQuery.of(context).viewInsets.bottom;
+ if(h > 0 && keyboard <= 0) {
+ setState(() {
+ keyboard = h;
+ });
+ }
return AnnotatedRegion(
- value: SystemUiOverlayStyle.light,
- child: Material(child: Scaffold(
- body: GestureDetector(
- behavior: HitTestBehavior.translucent,
- onTap: () {
- FocusScope.of(context).requestFocus(FocusNode());
- },
- child:Container(
- // margin: EdgeInsets.only(top:25),
- child: Column(
- children: [
- Expanded(
- child: SingleChildScrollView(
- physics: BouncingScrollPhysics(),
- child: Column(
- children: [
- Container(
- child:Stack(
+ value: SystemUiOverlayStyle.light,
+ child: Material(
+ child: Scaffold(
+ body: GestureDetector(
+ behavior: HitTestBehavior.translucent,
+ onTap: () {
+ setState(() {
+ emojiShowing = false;
+ isKeyBoardShow = emojiShowing;
+ FocusScope.of(context).requestFocus(FocusNode());
+ });
+ },
+ child: Container(
+ // margin: EdgeInsets.only(top:25),
+ child: Column(
+ children: [
+ Expanded(
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
children: [
- ClassDetailsVideo(key:videoKey,exitFull: (){setState(() {});},
- coverImg: chapterList.length > chapterIndex
- ? chapterList[chapterIndex].content.coverImg
- : "",isShowImg: this.isShowImg,
- changeShowImg: (isShowImg){setState(() {
- this.isShowImg = isShowImg;
- });},heightFun: (height) {
- this.height = height +
- MediaQuery
- .of(context)
- .padding
- .top +
- kToolbarHeight +
- 24;
- if (mounted) setState(() {});
- },),
Container(
- margin: EdgeInsets.only(
- top: 40.h, left: 16.w, right: 16.w),
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
+ height: MediaQuery.of(context).size.width / 1.5,
+ child: Stack(
children: [
- GestureDetector(
- child: Image.asset(
- "assets/image/integral_return.webp",
- width: 24,
- height: 24,
- ),
- onTap: () {
- Navigator.of(context).pop(
- course != null ? course.viewers + 1 : 0);
+ ClassDetailsVideo(
+ key: videoKey,
+ exitFull: () {
+ setState(() {});
+ },
+ coverImg:
+ chapterList.length > chapterIndex
+ ? chapterList[chapterIndex]
+ .content
+ .coverImg
+ : "",
+ isShowImg: this.isShowImg,
+ changeShowImg: (isShowImg) {
+ setState(() {
+ this.isShowImg = isShowImg;
+ });
+ },
+ heightFun: (height) {
+ this.height = height +
+ MediaQuery.of(context).padding.top +
+ kToolbarHeight +
+ 24;
+ if (mounted) setState(() {});
},
),
- ],
- ),
- ),
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.only(bottom: 16.h),
- padding: EdgeInsets.only(left: 16, top: 16, right: 10),
- decoration: BoxDecoration(
- color: Colors.white,
- boxShadow: [
- BoxShadow(
- color: Colors.black.withAlpha(12),
- offset: Offset(0, 2),
- blurRadius: 14,
- spreadRadius: 0,
- )
- ],
- ),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Container(
- // height: 22.h,
- padding:EdgeInsets.only(left:2,right:2),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(2),
- border: Border.all(
- width: 1,
- color: Color(0xFFFF7A1A),
- style: BorderStyle.solid,
- ),
- ),
- child: Text(
- (course?.tags != null &&
- course.tags.length > 0)
- ? course.tags[0]
- : "",
- overflow:TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 14.sp,
- fontWeight: MyFontWeight.medium,
- color: Color(0xFFFF7A1A),
+ Container(
+ margin: EdgeInsets.only(
+ top: 40.h, left: 16.w, right: 16.w),
+ decoration: BoxDecoration(
+ color: Colors.transparent,
),
- ),
- ),
- SizedBox(
- width: 6.w,
- ),
- Expanded(
- child: Text(
- course != null ? course.subject : "",
- overflow: TextOverflow.ellipsis,
- maxLines: 2,
- style: TextStyle(
- fontSize: 16.sp,
- fontWeight: MyFontWeight.semi_bold,
- color: Color(0xFF1A1A1A),
+ child: Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ GestureDetector(
+ child: Image.asset(
+ "assets/image/integral_return.webp",
+ width: 24,
+ height: 24,
+ ),
+ onTap: () {
+ Navigator.of(context).pop(
+ course != null
+ ? course.viewers + 1
+ : 0);
+ },
+ ),
+ ],
),
),
- flex: 1,
- ),
- // GestureDetector(
- // onTap: () {
- // share();
- // },
- // child: Icon(
- // Icons.share,
- // size: 24,
- // color: Colors.black,
- // ),
- // ),
- // SizedBox(width: 15.w,),
- ],
- ),
- SizedBox(
- height: 10.h,
+ ],
+ ),
),
- Padding(
- padding: EdgeInsets.only(right: 16),
- child: Row(
+ Container(
+ margin: EdgeInsets.only(bottom: 16.h),
+ padding: EdgeInsets.only(
+ left: 16, top: 16, right: 10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withAlpha(12),
+ offset: Offset(0, 2),
+ blurRadius: 14,
+ spreadRadius: 0,
+ )
+ ],
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Expanded(
- child: Text(
- "${S.of(context).jiangshi}:${course != null ? course.author.name : ""}",
- overflow: TextOverflow.ellipsis,
- maxLines: 2,
- style: TextStyle(
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- color: Colors.black,
+ Row(
+ children: [
+ Container(
+ // height: 22.h,
+ padding: EdgeInsets.only(
+ left: 2, right: 2),
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ borderRadius:
+ BorderRadius.circular(2),
+ border: Border.all(
+ width: 1,
+ color: Color(0xFFFF7A1A),
+ style: BorderStyle.solid,
+ ),
),
- )),
- Text(
- "${S.of(context).bofangcishu}:",
- style: TextStyle(
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- color: Color(0xFF808080),
+ child: Text(
+ (course?.tags != null &&
+ course.tags.length > 0)
+ ? course.tags[0]
+ : "",
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFFFF7A1A),
+ ),
+ ),
+ ),
+ SizedBox(
+ width: 6.w,
+ ),
+ Expanded(
+ child: Text(
+ course != null
+ ? course.subject
+ : "",
+ overflow: TextOverflow.ellipsis,
+ maxLines: 2,
+ style: TextStyle(
+ fontSize: 16.sp,
+ fontWeight:
+ MyFontWeight.semi_bold,
+ color: Color(0xFF1A1A1A),
+ ),
+ ),
+ flex: 1,
+ ),
+ // GestureDetector(
+ // onTap: () {
+ // share();
+ // },
+ // child: Icon(
+ // Icons.share,
+ // size: 24,
+ // color: Colors.black,
+ // ),
+ // ),
+ // SizedBox(width: 15.w,),
+ ],
+ ),
+ SizedBox(
+ height: 10.h,
+ ),
+ Padding(
+ padding: EdgeInsets.only(right: 16),
+ child: Row(
+ children: [
+ Expanded(
+ child: Text(
+ "${S.of(context).jiangshi}:${course != null ? course.author.name : ""}",
+ overflow: TextOverflow.ellipsis,
+ maxLines: 2,
+ style: TextStyle(
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ color: Colors.black,
+ ),
+ )),
+ Text(
+ "${S.of(context).bofangcishu}:",
+ style: TextStyle(
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF808080),
+ ),
+ ),
+ SizedBox(
+ width: 4,
+ ),
+ Text(
+ course != null
+ ? course.viewers.toString()
+ : "",
+ overflow: TextOverflow.ellipsis,
+ maxLines: 2,
+ style: TextStyle(
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF808080),
+ ),
+ ),
+ ],
),
),
SizedBox(
- width: 4,
+ height: 10.h,
),
Text(
- course != null
- ? course.viewers.toString()
- : "",
- overflow: TextOverflow.ellipsis,
- maxLines: 2,
+ course != null ? course.introduce : "",
+ overflow: isShowMore
+ ? TextOverflow.visible
+ : TextOverflow.ellipsis,
+ maxLines: isShowMore ? 10 : 2,
style: TextStyle(
fontSize: 12.sp,
+ height: 1.2.h,
fontWeight: MyFontWeight.regular,
- color: Color(0xFF808080),
+ color: Colors.black,
),
),
+ SizedBox(height: 3.h),
+ GestureDetector(
+ onTap: () {
+ setState(() {
+ isShowMore = !isShowMore;
+ });
+ },
+ child: Align(
+ alignment: Alignment.center,
+ child: Icon(
+ (isShowMore != null && !isShowMore)
+ ? Icons.keyboard_arrow_down
+ : Icons.keyboard_arrow_up,
+ color: Colors.black,
+ size: 24,
+ ),
+ ),
+ ),
+ SizedBox(height: 3.h),
],
),
),
- SizedBox(
- height: 10.h,
- ),
- Text(
- course != null ? course.introduce : "",
- overflow: isShowMore
- ? TextOverflow.visible
- : TextOverflow.ellipsis,
- maxLines: isShowMore ? 10 : 2,
- style: TextStyle(
- fontSize: 12.sp,
- height: 1.2.h,
- fontWeight: MyFontWeight.regular,
- color: Colors.black,
- ),
- ),
- SizedBox(height: 3.h),
- GestureDetector(
- onTap: () {
+ anthology(),
+ CommentList(
+ commentKey,
+ course?.likes ?? course?.likes ?? 0,
+ widget.arguments["id"],
+ 3,
+ isKeyBoardShow,
+ _reply,
+ _delCommentTips,
+ 12.sp,
+ requestApiFinish: (total) {
setState(() {
- isShowMore = !isShowMore;
+ commentTotal = total;
});
},
- child:Align(
- alignment: Alignment.center,
- child: Icon(
- (isShowMore != null && !isShowMore)
- ? Icons.keyboard_arrow_down
- : Icons.keyboard_arrow_up,
- color: Colors.black,
- size: 24,
+ ),
+ if (commentTotal == 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),
+ ),
),
),
- ),
- SizedBox(height: 3.h),
],
),
),
- anthology(),
- CommentList(
- commentKey,
- course?.likes ?? course?.likes ?? 0,
- widget.arguments["id"],
- 3,
- isKeyBoardShow,
- _reply,
- _delCommentTips,
- 12.sp,
- requestApiFinish: (total) {
- setState(() {
- commentTotal = total;
- });
- },
- ),
- if (commentTotal == 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,
+ ),
+
+ /// 富文本评论的输入框
+ InputComment(
+ inputKey,
+ hintText,
+ isKeyBoardShow,
+ keyboard_height,
+ keyboard,
+ emojiShowing,
+ commentFocus,
+ commentTextController,
+ _toComment,
+ _onSmileyTap,
+ _onTextFieldTap,
+ _queryMemberComment,
+ _queryCourseLikes,
+ isLike: course?.selfLiked,
+ ),
+ ],
),
- flex: 1,
- ),
- /// 富文本评论的输入框
- InputComment(
- inputKey,
- hintText,
- isKeyBoardShow,
- commentFocus,
- commentTextController,
- _toComment,
- _queryMemberComment,
- _queryCourseLikes,
- isLike: course?.selfLiked,
- ),
- ],
- ),
- )),
- ),)
- );
+ )),
+ ),
+ ));
}
Widget anthology() {
@@ -563,16 +654,16 @@ class _ClassDetails extends State with WidgetsBindingObserver {
share() async {
SSDKMap params = SSDKMap()
..setGeneral(
- course.subject != null
- ? course.subject
- : "",
+ course.subject != null ? course.subject : "",
course != null ? course.introduce : "",
[
chapterList[chapterIndex].content.coverImg != null
- ? chapterList[chapterIndex].content.coverImg:"",
+ ? chapterList[chapterIndex].content.coverImg
+ : "",
],
chapterList[chapterIndex].content.fileUrl != null
- ? chapterList[chapterIndex].content.fileUrl:"",
+ ? chapterList[chapterIndex].content.fileUrl
+ : "",
"",
buildShareUrl(),
"",
@@ -590,12 +681,12 @@ class _ClassDetails extends State with WidgetsBindingObserver {
if (platform == ShareSDKPlatforms.line) {
params.map["type"] = SSDKContentTypes.text.value;
params.map["text"] =
- "${course.subject ?? ""} ${buildShareUrl()}";
+ "${course.subject ?? ""} ${buildShareUrl()}";
}
SharesdkPlugin.share(platform, params,
- (state, userData, contentEntity, error) {
- print("share!$state");
- });
+ (state, userData, contentEntity, error) {
+ print("share!$state");
+ });
});
});
}
diff --git a/lib/community/community_view/class_details_video.dart b/lib/community/community_view/class_details_video.dart
index abbf7d71..e34f7516 100644
--- a/lib/community/community_view/class_details_video.dart
+++ b/lib/community/community_view/class_details_video.dart
@@ -138,16 +138,16 @@ class ClassDetailsVideoState extends State {
? Container(
color: Colors.black,
width: width,
- // height: width / 7 * 5,
- height: height,
+ height:MediaQuery.of(context).size.width / 1.5,
+ // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: chewies = Chewie(
controller: chewieAudioController,
),
)
: Container(
width: width,
- // height:width / 7 * 5,
- height: height,
+ height:MediaQuery.of(context).size.width / 1.5,
+ // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
)),
if (widget.isShowImg)
GestureDetector(
@@ -160,8 +160,8 @@ class ClassDetailsVideoState extends State {
},
child: Container(
width: width,
- // height: width / 7 * 5,
- height: height,
+ height: MediaQuery.of(context).size.width / 1.5,
+ // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
color: Colors.black,
child: Stack(
children: [
diff --git a/lib/community/community_view/class_list_view.dart b/lib/community/community_view/class_list_view.dart
index 3bf6d6a3..7d3c1982 100644
--- a/lib/community/community_view/class_list_view.dart
+++ b/lib/community/community_view/class_list_view.dart
@@ -217,7 +217,7 @@ class _ClassListView extends State {
maxLines: 2,
style: TextStyle(
fontSize: 13.sp,
- height: 1.2.h,
+ height: 1.5.h,
fontWeight: MyFontWeight.medium,
color: Colors.black,
),
diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart
index 22260e31..ae5e917b 100644
--- a/lib/community/community_view/community_dynamic.dart
+++ b/lib/community/community_view/community_dynamic.dart
@@ -149,11 +149,28 @@ class _CommunityDynamic extends State {
}
}
- goPersonalPage()async{
- await Navigator.of(context)
- .pushNamed('/router/personal_page', arguments: {
- "memberId":
- (widget.article.author == widget.userId)
+ ///给文章/活动点赞
+ _queryInformationLikes(isLikes) async {
+ if (apiService == null) {
+ SharedPreferences value = await SharedPreferences.getInstance();
+ apiService = ApiService(
+ Dio(),
+ context: context,
+ token: value.getString("token"),
+ );
+ }
+ BaseData baseData = await apiService
+ .informationLikes(widget.article.id)
+ .catchError((onError) {});
+ if (baseData != null && baseData.isSuccess) {
+ widget.exitFull();
+ setState(() {});
+ }
+ }
+
+ goPersonalPage() async {
+ await Navigator.of(context).pushNamed('/router/personal_page', arguments: {
+ "memberId": (widget.article.author == widget.userId)
? "0"
: widget.article.author,
});
@@ -168,7 +185,7 @@ class _CommunityDynamic extends State {
margin: EdgeInsets.only(top: 2.h),
key: globalKey,
alignment: Alignment.topCenter,
- padding: EdgeInsets.only(left: 16.w,top: 16.h,right: 16.w),
+ padding: EdgeInsets.only(left: 16.w, top: 16.h, right: 16.w),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@@ -209,7 +226,7 @@ class _CommunityDynamic extends State {
},
child: MImage(
(widget?.article?.authorHeadImg ??
- "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"),
+ ""),
width: 44,
height: 44,
isCircle: true,
@@ -228,7 +245,10 @@ class _CommunityDynamic extends State {
Text(
widget?.article?.authorName ?? "",
style: TextStyle(
- fontSize: MediaQuery.of(context).size.width >= 650 ? 12.sp :15.sp,
+ fontSize:
+ MediaQuery.of(context).size.width >= 650
+ ? 12.sp
+ : 15.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
@@ -236,7 +256,10 @@ class _CommunityDynamic extends State {
Text(
widget?.article?.createTime ?? "",
style: TextStyle(
- fontSize: MediaQuery.of(context).size.width >= 650 ? 10.sp :13.sp,
+ fontSize:
+ MediaQuery.of(context).size.width >= 650
+ ? 10.sp
+ : 13.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
@@ -301,52 +324,56 @@ class _CommunityDynamic extends State {
SizedBox(
height: 12.h,
),
- widget.isList ? Text(
- widget?.article?.mainTitle ?? "",
- maxLines:5,
- overflow: TextOverflow.ellipsis,
- style: TextStyle(
- color: Color(0xFF1A1A1A),
- fontWeight: MyFontWeight.regular,
- fontSize: 15.sp,
- ),
- ) :Text(
- widget?.article?.mainTitle ?? "",
- style: TextStyle(
- color: Color(0xFF1A1A1A),
- fontWeight: MyFontWeight.regular,
- fontSize: 15.sp,
- ),
- ),
+ widget.isList
+ ? Text(
+ widget?.article?.mainTitle ?? "",
+ maxLines: 5,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ color: Color(0xFF1A1A1A),
+ fontWeight: MyFontWeight.regular,
+ fontSize: 15.sp,
+ ),
+ )
+ : Text(
+ widget?.article?.mainTitle ?? "",
+ style: TextStyle(
+ color: Color(0xFF1A1A1A),
+ fontWeight: MyFontWeight.regular,
+ fontSize: 15.sp,
+ ),
+ ),
buildMedia(widget?.article?.content),
SizedBox(
- height:8.h,
+ height: 8.h,
),
if (widget.article.location != "")
- Padding(padding:EdgeInsets.only(bottom:7),
- child: Row(
- children: [
- Icon(
- Icons.place,
- size: 16,
- color: Color(0xFFB3B2B2),
- ),
- SizedBox(
- width: 2,
- ),
- Expanded(
- child: Text(
- widget?.article?.location ?? "",
- overflow: TextOverflow.ellipsis,
- maxLines: 1,
- style: TextStyle(
- fontSize: 12.sp,
- fontWeight: MyFontWeight.medium,
- color: Color(0xFFB3B2B2),
- ),
- )),
- ],
- ),),
+ Padding(
+ padding: EdgeInsets.only(bottom: 7),
+ child: Row(
+ children: [
+ Icon(
+ Icons.place,
+ size: 16,
+ color: Color(0xFFB3B2B2),
+ ),
+ SizedBox(
+ width: 2,
+ ),
+ Expanded(
+ child: Text(
+ widget?.article?.location ?? "",
+ overflow: TextOverflow.ellipsis,
+ maxLines: 1,
+ style: TextStyle(
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFFB3B2B2),
+ ),
+ )),
+ ],
+ ),
+ ),
if (!widget.isDetails)
SizedBox(
height: 5.h,
@@ -355,111 +382,124 @@ class _CommunityDynamic extends State {
Container(
// padding: EdgeInsets.only(bottom: 16),
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Expanded(
- child: Container(
- padding: EdgeInsets.only(bottom: 16.h),
- child:Row(
- // mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SvgPicture.asset(
- "assets/svg/liulanliang.svg",
- width: 16,
- height: 16,
- ),
- SizedBox(
- width: 5.w,
- ),
- Text(
- (widget.article != null)
- ? "${widget.article.viewers}"
- : "",
- style: TextStyle(
- fontSize: 14.sp,
- fontFamily: 'JDZhengHT',
- fontWeight: MyFontWeight.regular,
- color: Color(0xFF1A1A1A),
- ),
- ),
- ],
- )),
- ),
- Expanded(
- child:Container(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Container(
padding: EdgeInsets.only(bottom: 16.h),
- child:Row(
- // mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SvgPicture.asset(
- "assets/svg/pinglun.svg",
- width: 16,
- height: 16,
- ),
- SizedBox(
- width: 5.w,
- ),
- Text(
- "${widget.article.comments ?? 0}",
- style: TextStyle(
- fontSize: 14.sp,
- fontFamily: 'JDZhengHT',
- fontWeight: MyFontWeight.regular,
- color: Color(0xFF1A1A1A),
- ),
- ),
- ],
- ))),
- Expanded(
- child:Container(
- padding: EdgeInsets.only(bottom: 16.h),
- child:Row(
- // mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SvgPicture.asset(
- "assets/svg/xihuan.svg",
- 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 ?? "")
+ child: Row(
+ children: [
+ SvgPicture.asset(
+ "assets/svg/liulanliang.svg",
+ width: 16,
+ height: 16,
+ ),
+ SizedBox(
+ width: 5.w,
+ ),
+ Text(
+ (widget.article != null)
+ ? "${widget.article.viewers}"
+ : "",
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontFamily: 'JDZhengHT',
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF1A1A1A),
+ ),
+ ),
+ ],
+ )),
+ ),
+ Expanded(
+ child: Container(
+ padding: EdgeInsets.only(bottom: 16.h),
+ child: Row(
+ children: [
+ SvgPicture.asset(
+ "assets/svg/pinglun.svg",
+ width: 16,
+ height: 16,
+ ),
+ SizedBox(
+ width: 5.w,
+ ),
+ Text(
+ "${widget.article.comments ?? 0}",
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontFamily: 'JDZhengHT',
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF1A1A1A),
+ ),
+ ),
+ ],
+ ))),
Expanded(
child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {
- setState(() {
- choiceShowBottomSheet();
- });
- },
- child: Container(
- padding: EdgeInsets.only(top:3.h,bottom: 16.h),
- alignment: Alignment.center,
- // color: Colors.red,
- child: Icon(
- Icons.more_horiz,
- color: Colors.black,
+ 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(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ setState(() {
+ choiceShowBottomSheet();
+ });
+ },
+ child: Container(
+ padding:
+ EdgeInsets.only(top: 3.h, bottom: 16.h),
+ alignment: Alignment.center,
+ // color: Colors.red,
+ child: Icon(
+ Icons.more_horiz,
+ color: Colors.black,
+ ),
+ ))),
+ ],
+ ),
+ ),
],
),
),
@@ -794,14 +834,11 @@ class _CommunityDynamic extends State {
topLeft: const Radius.circular(25.0),
topRight: const Radius.circular(25.0))),
child: Container(
- width: 130.w,
height: 130.h,
child: Column(
children: [
- SizedBox(
- height: 10.h,
- ),
GestureDetector(
+ behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
Navigator.of(context).pop();
@@ -809,6 +846,9 @@ class _CommunityDynamic extends State {
});
},
child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(top: 10.h),
+ padding: EdgeInsets.symmetric(vertical: 5.h),
child: Row(
children: [
SizedBox(
@@ -841,37 +881,42 @@ class _CommunityDynamic extends State {
color: Color(0xFFF7F7F7),
),
GestureDetector(
+ behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
Navigator.of(context)
- .popAndPushNamed('/router/report_page',arguments: {
- "userName":widget?.article?.authorName ?? "",
- "authorId":widget?.article?.author ?? "",
+ .popAndPushNamed('/router/report_page', arguments: {
+ "userName": widget?.article?.authorName ?? "",
+ "authorId": widget?.article?.author ?? "",
});
});
},
- child: Row(
- children: [
- SizedBox(
- width: 4.w,
- ),
- SvgPicture.asset(
- "assets/svg/ju_b.svg",
- width: 20,
- height: 20,
- ),
- SizedBox(
- width: 15.w,
- ),
- Text(
- S.of(context).jubaogaineirong,
- style: TextStyle(
- fontSize: 17.sp,
- fontWeight: MyFontWeight.medium,
- color: Color(0xFF1A1A1A),
+ child: Container(
+ width: double.infinity,
+ padding: EdgeInsets.symmetric(vertical: 5.h),
+ child: Row(
+ children: [
+ SizedBox(
+ width: 4.w,
),
- ),
- ],
+ SvgPicture.asset(
+ "assets/svg/ju_b.svg",
+ width: 20,
+ height: 20,
+ ),
+ SizedBox(
+ width: 15.w,
+ ),
+ Text(
+ S.of(context).jubaogaineirong,
+ style: TextStyle(
+ fontSize: 17.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFF1A1A1A),
+ ),
+ ),
+ ],
+ ),
))
],
),
diff --git a/lib/community/community_view/home_class.dart b/lib/community/community_view/home_class.dart
index 2649c8ab..d8f8c2ad 100644
--- a/lib/community/community_view/home_class.dart
+++ b/lib/community/community_view/home_class.dart
@@ -67,7 +67,7 @@ class _HomeClass extends State {
),
),
Container(
- height: 195,
+ height: 195.h,
margin: EdgeInsets.only(top: 10.h),
child: ListView.builder(
scrollDirection: Axis.horizontal,
diff --git a/lib/community/new_community_details.dart b/lib/community/new_community_details.dart
index 62dafc65..5b904034 100644
--- a/lib/community/new_community_details.dart
+++ b/lib/community/new_community_details.dart
@@ -1,3 +1,4 @@
+import 'dart:ui';
import 'dart:convert';
import 'package:dio/dio.dart';
@@ -55,6 +56,11 @@ class _NewCommunityDetails extends State with WidgetsBindin
Article article;
String commentsId;
String userId;
+ bool emojiShowing =false;
+ static double keyboard_height=300;
+ double keyboard = -1;
+ bool needShowSmiley = false;
+ bool needHideSmiley = false;
@override
void initState() {
@@ -62,6 +68,7 @@ class _NewCommunityDetails extends State with WidgetsBindin
commentsId = widget.arguments["commentsId"];
userId = widget.arguments["userId"];
WidgetsBinding.instance.addObserver(this);
+ commentFocus.addListener(_focusNodeListener);
queryDetails(commentsId);
}
@@ -105,6 +112,7 @@ class _NewCommunityDetails extends State with WidgetsBindin
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
+ if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@@ -117,10 +125,61 @@ class _NewCommunityDetails extends State with WidgetsBindin
});
}
});
+ if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
+ needShowSmiley = false;
+ setState(() {
+ emojiShowing = true;
+ });
+ }
+ if(needHideSmiley && window.viewInsets.bottom > 0.1) {
+ needHideSmiley = false;
+ setState(() {
+ emojiShowing = false;
+ });
+ }
+ }
+
+ void _focusNodeListener() {
+ /*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
+ setState(() {
+ smileyPadGone = true;
+ });
+ }*/
+ }
+
+ _onTextFieldTap() {
+ if(emojiShowing) {
+ needHideSmiley = true;
+ }
+ }
+
+ _onSmileyTap() {
+ if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
+ needShowSmiley = true;
+ commentFocus.unfocus();
+ } else {
+ setState(() {
+ emojiShowing = !emojiShowing;
+ isKeyBoardShow = emojiShowing;
+ });
+ }
+ }
+
+ @override
+ void dispose(){
+ WidgetsBinding.instance.removeObserver(this);
+ commentFocus.removeListener(_focusNodeListener);
+ super.dispose();
}
@override
Widget build(BuildContext context) {
+ double h = MediaQuery.of(context).viewInsets.bottom;
+ if(h > 0 && keyboard with WidgetsBindin
inputKey,
hintText,
isKeyBoardShow,
+ keyboard_height,
+ keyboard,
+ emojiShowing,
commentFocus,
commentTextController,
_toComment,
+ _onSmileyTap,
+ _onTextFieldTap,
_queryMemberComment,
_queryInformationLikes,
isLike: article?.liked ?? false,
diff --git a/lib/community/photo_view_gallery_screen.dart b/lib/community/photo_view_gallery_screen.dart
index 78d91382..5b301b22 100644
--- a/lib/community/photo_view_gallery_screen.dart
+++ b/lib/community/photo_view_gallery_screen.dart
@@ -42,41 +42,47 @@ class _PhotoViewGalleryScreenState extends State {
left: 0,
bottom: 0,
right: 0,
- child: Container(
- child: PhotoViewGallery.builder(
- scrollPhysics: const BouncingScrollPhysics(),
- builder: (BuildContext context, int index) {
- return PhotoViewGalleryPageOptions(
- imageProvider: NetworkToFileImage(
- url: widget.images[index],
- file: fileFromDocsDir(widget.images[index].toString()
- .replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")),
- debug: true,
- ),
- );
- },
- itemCount: widget.images.length,
- loadingBuilder: (context, progress) => Center(
- child: Container(
- width: 20.0,
- height: 20.0,
- child: CircularProgressIndicator(
- value: progress == null
- ? null
- : progress.cumulativeBytesLoaded /
- progress.expectedTotalBytes,
+ child: GestureDetector(
+ onTap: (){
+ Navigator.of(context).pop();
+ },
+ child: Container(
+ color: Colors.black,
+ child: PhotoViewGallery.builder(
+ scrollPhysics: const BouncingScrollPhysics(),
+ builder: (BuildContext context, int index) {
+ return PhotoViewGalleryPageOptions(
+ imageProvider: NetworkToFileImage(
+ url: widget.images[index],
+ file: fileFromDocsDir(widget.images[index].toString()
+ .replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")),
+ debug: true,
+ ),
+ );
+ },
+ itemCount: widget.images.length,
+ loadingBuilder: (context, progress) => Center(
+ child: Container(
+ width: 20.0,
+ height: 20.0,
+ child: CircularProgressIndicator(
+ value: progress == null
+ ? null
+ : progress.cumulativeBytesLoaded /
+ progress.expectedTotalBytes,
+ ),
),
),
- ),
- backgroundDecoration: null,
- pageController: widget.controller,
- enableRotation: false,
- onPageChanged: (index){
- setState(() {
- currentIndex=index;
- });
- },
- )
+ backgroundDecoration: null,
+ pageController: widget.controller,
+ enableRotation: false,
+ onPageChanged: (index){
+ setState(() {
+ currentIndex=index;
+ });
+ },
+ )
+ ),
),
),
Positioned(//图片index显示
diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart
index 1486d54c..47f6d6d2 100644
--- a/lib/generated/intl/messages_en.dart
+++ b/lib/generated/intl/messages_en.dart
@@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@@ -406,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("有机生活"),
@@ -420,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("明细"),
@@ -565,6 +570,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@@ -607,6 +613,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@@ -676,6 +683,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
diff --git a/lib/generated/intl/messages_en_US.dart b/lib/generated/intl/messages_en_US.dart
index 0bddbe0b..5f7fea35 100644
--- a/lib/generated/intl/messages_en_US.dart
+++ b/lib/generated/intl/messages_en_US.dart
@@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("For:Any store dedicated to returning home"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("Homecoming Headlines"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("Home Return VIP Card Exclusive Rights"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("Homecoming VIP Membership Card Rules Agreement"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("Membership Level"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("Member Level Description"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("Member Rules Description"),
@@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("Activity information"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("The goods have been delivered"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("liked"),
"input_code" : MessageLookupByLibrary.simpleMessage("Mobile phone verification code"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("Please enter the verification code"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("Fill in the invitation code"),
@@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("Open now"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("Get it now"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("Sign in immediately"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("Use Now"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("Experience Now"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("Open now"),
"likexufei" : MessageLookupByLibrary.simpleMessage("Renew now"),
@@ -406,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"),
@@ -420,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"),
@@ -565,6 +570,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("Use Date"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("Instructions for Use"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("Use Conditions"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("Use Details"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("Ship To Address"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please enter the detailed receiving address"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("Delivery address"),
@@ -607,6 +613,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("finish"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("Place an order once"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("Forgot password"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("Play healthy"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("Automatically generated after improving birthday information"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("Exclusive coupon for improving birthday information"),
@@ -676,6 +683,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"),
"xuanji" : MessageLookupByLibrary.simpleMessage("Selection"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("Renewal member"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("Learning Health"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("Renewal Home VIP"),
@@ -751,8 +759,8 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("In transit"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("Online Customer Service"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("Online ordering is not supported temporarily"),
- "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("Not yet unlocked"),
- "zanweikaifang" : MessageLookupByLibrary.simpleMessage("Not yet open"),
+ "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("Not unlocked"),
+ "zanweikaifang" : MessageLookupByLibrary.simpleMessage("Not open"),
"zanweikaitong" : MessageLookupByLibrary.simpleMessage("Not yet open"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("No comment, please comment"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("Temporary wireless shopping"),
diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart
index 11f7b57c..c6ed4607 100644
--- a/lib/generated/intl/messages_zh_CN.dart
+++ b/lib/generated/intl/messages_zh_CN.dart
@@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@@ -406,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("有机生活"),
@@ -420,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("明细"),
@@ -565,6 +570,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@@ -607,6 +613,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@@ -676,6 +683,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart
index 59c93d09..39e563c8 100644
--- a/lib/generated/intl/messages_zh_Hans_CN.dart
+++ b/lib/generated/intl/messages_zh_Hans_CN.dart
@@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@@ -406,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("有机生活"),
@@ -420,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("明细"),
@@ -565,6 +570,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@@ -607,6 +613,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@@ -676,6 +683,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart
index e4a0deaf..974a5f96 100644
--- a/lib/generated/intl/messages_zh_Hant_CN.dart
+++ b/lib/generated/intl/messages_zh_Hant_CN.dart
@@ -289,6 +289,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"),
@@ -313,6 +314,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("獲贊"),
"input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"),
@@ -385,6 +387,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"),
@@ -402,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("有機生活"),
@@ -416,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("明細"),
@@ -560,6 +565,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"),
"shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"),
@@ -601,6 +607,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "),
@@ -670,6 +677,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),
@@ -746,7 +754,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暫未解鎖"),
- "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暂未开放"),
+ "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暫未開放"),
"zanweikaitong" : MessageLookupByLibrary.simpleMessage("暫未開通"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),
diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart
index a011baca..dc3695e1 100644
--- a/lib/generated/intl/messages_zh_TW.dart
+++ b/lib/generated/intl/messages_zh_TW.dart
@@ -291,6 +291,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"),
+ "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"),
@@ -315,6 +316,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"),
+ "huozan" : MessageLookupByLibrary.simpleMessage("獲贊"),
"input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"),
@@ -387,6 +389,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"),
+ "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"),
@@ -404,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("有機生活"),
@@ -418,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("明細"),
@@ -562,6 +567,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
+ "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收貨地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"),
@@ -604,6 +610,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"),
+ "wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "),
@@ -673,6 +680,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
+ "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),
diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart
index de8d5e66..de8a06e8 100644
--- a/lib/generated/l10n.dart
+++ b/lib/generated/l10n.dart
@@ -6875,6 +6875,86 @@ class S {
);
}
+ /// `回乡VIP会员卡规则协议`
+ String get huixiangxieyi {
+ return Intl.message(
+ '回乡VIP会员卡规则协议',
+ name: 'huixiangxieyi',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `获赞`
+ String get huozan {
+ return Intl.message(
+ '获赞',
+ name: 'huozan',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `使用详情`
+ String get shiyongxiangqing {
+ return Intl.message(
+ '使用详情',
+ name: 'shiyongxiangqing',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `立即使用`
+ String get lijishiyong {
+ return Intl.message(
+ '立即使用',
+ name: 'lijishiyong',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `忘记密码`
+ String get wangjimima {
+ return Intl.message(
+ '忘记密码',
+ name: 'wangjimima',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `请选择商品的领取方式`
+ String get xuanzeshangpinlingqufangshi {
+ return Intl.message(
+ '请选择商品的领取方式',
+ name: 'xuanzeshangpinlingqufangshi',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `门店余额`
+ 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(
diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart
index e418f8ad..8973c95c 100644
--- a/lib/home/home_page.dart
+++ b/lib/home/home_page.dart
@@ -111,10 +111,12 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin {
///活动海报弹窗
posterShowAlertDialog(ActivityPos activityPos) {
+ var today = DateTime.now().day;
SharedPreferences.getInstance().then((value) {
- if((value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
+ if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
return;
value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};");
+ value.setInt("today", today);
//显示对话框
showDialog(
context: context,
@@ -503,7 +505,10 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin {
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
- child: Column(
+ child: FutureBuilder(
+ future: queryHome(),
+ builder: (context, snapshot) {
+ return Column(
children: [
///banner
HomeBanner(bannerData, controller),
@@ -579,7 +584,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin {
},
),
],
- ),
+ );})
),
),
),
diff --git a/lib/home/welfare_exchange.dart b/lib/home/welfare_exchange.dart
index 16a1aeba..b1ee3566 100644
--- a/lib/home/welfare_exchange.dart
+++ b/lib/home/welfare_exchange.dart
@@ -28,7 +28,8 @@ class WelfareExchange extends StatefulWidget {
}
}
-class _WelfareExchange extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin{
+class _WelfareExchange extends State
+ with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ApiService apiService;
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
@@ -165,7 +166,7 @@ class _WelfareExchange extends State with SingleTickerProvider
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: Colors.transparent,
+ backgroundColor: Colors.white,
body: NestedScrollView(
headerSliverBuilder: (context, inner) {
return [
@@ -195,28 +196,28 @@ class _WelfareExchange extends State with SingleTickerProvider
),
),
flexibleSpace: FlexibleSpaceBar(
- background:Stack(
- children: [
- Container(
- // padding: EdgeInsets.only(top: 40.h),
- height: 172.h,
- decoration: BoxDecoration(
- // border: Border.all(color: Colors.white,width: 0.5),
- color: Color(0xFF277D4B),
- shape: BoxShape.rectangle,
- borderRadius: BorderRadius.only(
- bottomRight: Radius.circular(40.r),
- bottomLeft: Radius.circular(40.r),
- ),
- ),
- ),
- Container(
- alignment: Alignment.topCenter,
- margin: EdgeInsets.only(top: 110.h),
- child: pointUser(),
+ background: Stack(
+ children: [
+ Container(
+ // padding: EdgeInsets.only(top: 40.h),
+ height: 172.h,
+ decoration: BoxDecoration(
+ // border: Border.all(color: Colors.white,width: 0.5),
+ color: Color(0xFF277D4B),
+ shape: BoxShape.rectangle,
+ borderRadius: BorderRadius.only(
+ bottomRight: Radius.circular(40.r),
+ bottomLeft: Radius.circular(40.r),
),
- ],
- )),
+ ),
+ ),
+ Container(
+ alignment: Alignment.topCenter,
+ margin: EdgeInsets.only(top: 110.h),
+ child: pointUser(),
+ ),
+ ],
+ )),
expandedHeight: 258.h,
bottom: PreferredSize(
preferredSize: Size(double.infinity, 0),
@@ -264,7 +265,7 @@ class _WelfareExchange extends State with SingleTickerProvider
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
- enablePullUp: false,
+ enablePullUp: true,
physics: ClampingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(
@@ -408,27 +409,28 @@ class _WelfareExchange extends State with SingleTickerProvider
SizedBox(
height: 4.h,
),
- Expanded(child: Row(
- children: [
- Text(
- (userInfo != null) ? "${userInfo.points}" : "",
- style: TextStyle(
- fontSize: 16.sp,
- color: Color(0xFF32A060),
- fontFamily: 'JDZhengHT',
- fontWeight: MyFontWeight.medium,
- ),
- ),
- SizedBox(
- width: 6.w,
+ Expanded(
+ child: Row(
+ children: [
+ Text(
+ (userInfo != null) ? "${userInfo.points}" : "",
+ style: TextStyle(
+ fontSize: 16.sp,
+ color: Color(0xFF32A060),
+ fontFamily: 'JDZhengHT',
+ fontWeight: MyFontWeight.medium,
),
- Image.asset(
- "assets/image/icon_gold_coin.webp",
- width: 18,
- height: 18,
- )
- ],
- ))
+ ),
+ SizedBox(
+ width: 6.w,
+ ),
+ Image.asset(
+ "assets/image/icon_gold_coin.webp",
+ width: 18,
+ height: 18,
+ )
+ ],
+ ))
],
),
)
diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart
index 94633c35..990cb680 100644
--- a/lib/home/welfare_page.dart
+++ b/lib/home/welfare_page.dart
@@ -50,8 +50,7 @@ class _WelfarePage extends State {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), context: context, token: value.getString("token")),
- queryGoods(),
- queryCoupon(),
+ _onRefresh(),
});
}
@@ -108,6 +107,8 @@ class _WelfarePage extends State {
"searchKey": "",
"state": 0
}).catchError((onError) {
+ SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
+ alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
});
@@ -134,7 +135,7 @@ class _WelfarePage extends State {
_onRefresh(){
queryGoods();
- // queryCoupon();
+ queryCoupon();
}
@@ -262,7 +263,13 @@ class _WelfarePage extends State {
),
],
)),
- AspectRatio(
+ coupon.length == 0?
+ NoDataView(
+ src: "assets/image/ka.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouyouhuiquankeyilingqu,
+ fontSize: 16.sp,
+ ): AspectRatio(
aspectRatio: 1.10,
child: Swiper(
onIndexChanged: (it){
@@ -288,12 +295,11 @@ class _WelfarePage extends State {
children: [
Container(
child: weekList(coupon[position]),
- // weekList(testList2[position]),
),
],
);
},
- itemCount:coupon.length,
+ itemCount:coupon.length ?? 0,
),
)
],
@@ -302,27 +308,30 @@ class _WelfarePage extends State {
}
Widget weekList(List cops){
- return Expanded(child:(cops != null && cops.length > 0)?ListView.builder(
- padding: EdgeInsets.zero,
- itemCount: cops.length,
- scrollDirection: Axis.vertical,
- shrinkWrap: true,
- physics: BouncingScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- },
- child: weekCoupon(cops[position]),
- );
- },
- ):NoDataView(
+ return Expanded(
+ child:(cops == null && cops.length == 0)?
+ NoDataView(
src: "assets/image/ka.webp",
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,
- ),);
+ ):ListView.builder(
+ padding: EdgeInsets.zero,
+ itemCount: cops.length,
+ scrollDirection: Axis.vertical,
+ shrinkWrap: true,
+ physics: BouncingScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ },
+ child: weekCoupon(cops[position]),
+ );
+ },
+ ),);
}
+ ///优惠券列表
Widget weekCoupon(Coupon cop) {
return Container(
height: 95.h,
@@ -396,6 +405,7 @@ class _WelfarePage extends State {
);
}
+ ///优惠券样式
Widget weekWidget(Coupon cop) {
if (cop.bizType == 1) {
return Column(
@@ -581,6 +591,7 @@ class _WelfarePage extends State {
}
}
+ ///优惠券领取状态
Widget weekBtn(Coupon cop) {
if(cop.status == 0)
return Align(
@@ -645,6 +656,7 @@ class _WelfarePage extends State {
);
}
+ ///领取优惠券
receiveCoupon(couponId) async {
couponIndex = swiperIndex;
BaseData baseData = await apiService.receiveCoupon(couponId);
@@ -881,7 +893,6 @@ class _WelfarePage extends State {
);
}
-
String pointPrice(Goods goodsPrice){
if(goodsPrice == null)
return "";
diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb
index cbd7d680..5a7dc9a8 100644
--- a/lib/l10n/intl_en.arb
+++ b/lib/l10n/intl_en.arb
@@ -713,6 +713,17 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
+ "huixiangxieyi":"回乡VIP会员卡规则协议",
+ "zanweikaifang":"暂未开放",
+ "zanweijiesuo":"暂未解锁",
+ "huozan":"获赞",
+ "shiyongxiangqing":"使用详情",
+ "lijishiyong":"立即使用",
+ "wangjimima":"忘记密码",
+ "xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
+ "mendianyue":"门店余额",
+ "lvbizhifu":"绿币支付",
+
diff --git a/lib/l10n/intl_en_US.arb b/lib/l10n/intl_en_US.arb
index a5283cf8..b7d1860b 100644
--- a/lib/l10n/intl_en_US.arb
+++ b/lib/l10n/intl_en_US.arb
@@ -714,6 +714,16 @@
"canyingfuwu":"catering service",
"qiyetuanjian":"Enterprise League Building",
"zhunongjifen":"Farming aid points",
+ "huixiangxieyi":"Homecoming VIP Membership Card Rules Agreement",
+ "zanweikaifang":"Not open",
+ "zanweijiesuo":"Not unlocked",
+ "huozan":"liked",
+ "shiyongxiangqing":"Use Details",
+ "lijishiyong":"Use Now",
+ "wangjimima":"Forgot password",
+ "xuanzeshangpinlingqufangshi":"Please select the picking method of goods",
+ "mendianyue":"store balance",
+ "lvbizhifu":"green payment",
diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb
index edb9f2a0..5f95dbc4 100644
--- a/lib/l10n/intl_zh_CN.arb
+++ b/lib/l10n/intl_zh_CN.arb
@@ -714,6 +714,16 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
+ "huixiangxieyi":"回乡VIP会员卡规则协议",
+ "zanweikaifang":"暂未开放",
+ "zanweijiesuo":"暂未解锁",
+ "huozan":"获赞",
+ "shiyongxiangqing":"使用详情",
+ "lijishiyong":"立即使用",
+ "wangjimima":"忘记密码",
+ "xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
+ "mendianyue":"门店余额",
+ "lvbizhifu":"绿币支付",
diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb
index 5d24beec..7b4fe637 100644
--- a/lib/l10n/intl_zh_Hans_CN.arb
+++ b/lib/l10n/intl_zh_Hans_CN.arb
@@ -714,6 +714,16 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
+ "huixiangxieyi":"回乡VIP会员卡规则协议",
+ "zanweikaifang":"暂未开放",
+ "zanweijiesuo":"暂未解锁",
+ "huozan":"获赞",
+ "shiyongxiangqing":"使用详情",
+ "lijishiyong":"立即使用",
+ "wangjimima":"忘记密码",
+ "xuanzeshangpinlingqufangshi":"请选择商品的领取方式",
+ "mendianyue":"门店余额",
+ "lvbizhifu":"绿币支付",
diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb
index 9c107d87..ae04fcf5 100644
--- a/lib/l10n/intl_zh_Hant_CN.arb
+++ b/lib/l10n/intl_zh_Hant_CN.arb
@@ -705,6 +705,16 @@
"canyingfuwu":"餐飲服務",
"qiyetuanjian":"企業團建",
"zhunongjifen":"助農積分",
+ "huixiangxieyi":"回鄉VIP會員卡規則協定",
+ "zanweikaifang":"暫未開放",
+ "zanweijiesuo":"暫未解鎖",
+ "huozan":"獲贊",
+ "shiyongxiangqing":"使用詳情",
+ "lijishiyong":"立即使用",
+ "wangjimima":"忘記密碼",
+ "xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",
+ "mendianyue":"門店餘額",
+ "lvbizhifu":"綠幣支付",
diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb
index 467affc4..641c5f9a 100644
--- a/lib/l10n/intl_zh_TW.arb
+++ b/lib/l10n/intl_zh_TW.arb
@@ -707,6 +707,16 @@
"canyingfuwu":"餐飲服務",
"qiyetuanjian":"企業團建",
"zhunongjifen":"助農積分",
+ "huixiangxieyi":"回鄉VIP會員卡規則協定",
+ "zanweikaifang":"暫未開放",
+ "zanweijiesuo":"暫未解鎖",
+ "huozan":"獲贊",
+ "shiyongxiangqing":"使用詳情",
+ "lijishiyong":"立即使用",
+ "wangjimima":"忘記密碼",
+ "xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",
+ "mendianyue":"門店餘額",
+ "lvbizhifu":"綠幣支付",
diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart
index 50c904ac..4edfb2e4 100644
--- a/lib/login/new_login_page.dart
+++ b/lib/login/new_login_page.dart
@@ -123,7 +123,7 @@ class _NewLoginPage extends State {
}
if (_sendCodeStatus == 0) {
apiService
- .sendVerify(area,mobile)
+ .sendVerify(area, mobile)
.then((value) => {
if (value.isSuccess)
{_sendCodeStatus = 1, countdown()}
@@ -207,7 +207,12 @@ class _NewLoginPage extends State {
return;
}
var invite = _controllerInviteCode.text;
- var param = {"capcha": code, "mobile": mobile, "invite": invite,"areaCode":area};
+ var param = {
+ "capcha": code,
+ "mobile": mobile,
+ "invite": invite,
+ "areaCode": area
+ };
EasyLoading.show(status: S.of(context).zhengzaijiazai);
BaseData value = await apiService.memberLogin(param).catchError((error) {
print(error.message);
@@ -217,7 +222,8 @@ class _NewLoginPage extends State {
// EasyLoading.show(status: S.of(context).zhengzaijiazai);
if (value != null && value.isSuccess) {
var userInfo = LoginInfo.fromJson(value.data);
- ExamineInstance.instance.isExamine = userInfo.authInfo.account == "13800138000";
+ ExamineInstance.instance.isExamine =
+ userInfo.authInfo.account == "13800138000";
saveUserJson(userInfo.authInfo.toJson());
eventBus.fire(EventType(3));
@@ -257,7 +263,8 @@ class _NewLoginPage extends State {
if (sharedPreferences.containsKey('token') &&
sharedPreferences.getString("token") != null &&
sharedPreferences.getString("token") != "") {
- ExamineInstance.instance.isExamine = sharedPreferences.getString("mobile") == "13800138000";
+ ExamineInstance.instance.isExamine =
+ sharedPreferences.getString("mobile") == "13800138000";
Navigator.of(context).popAndPushNamed('/router/main_page');
} else {
initController();
@@ -383,22 +390,24 @@ class _NewLoginPage extends State {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
- onTap: (){
- Navigator.of(context).pushNamed('/router/phone_address_page').then((value) {
- if(value != null)
- setState(() {
- area = value;
+ onTap: () {
+ Navigator.of(context)
+ .pushNamed('/router/phone_address_page')
+ .then((value) {
+ if (value != null)
+ setState(() {
+ area = value;
+ });
});
- });
- },
- child: Text(
- area,
- style: TextStyle(
- fontWeight: MyFontWeight.regular,
- fontSize: 16.sp,
- color: Color(0xFF1A1A1A),
- ),
- )),
+ },
+ child: Text(
+ area,
+ style: TextStyle(
+ fontWeight: MyFontWeight.regular,
+ fontSize: 16.sp,
+ color: Color(0xFF1A1A1A),
+ ),
+ )),
Icon(
Icons.keyboard_arrow_right,
size: 18,
@@ -454,7 +463,9 @@ class _NewLoginPage extends State {
height: 1.h,
width: MediaQuery.of(context).size.width - 80.h,
// color: statusPhoneLineColor,
- color: _controllerPhone.text== "" ? Color(0xFFE7E3E3):Color(0xFF32A060),
+ color: _controllerPhone.text == ""
+ ? Color(0xFFE7E3E3)
+ : Color(0xFF32A060),
),
SizedBox(
height: 30.h,
@@ -680,8 +691,8 @@ class _NewLoginPage extends State {
// Navigator.of(context).pop();
// } else {
ExamineInstance.instance.isExamine = true;
- Navigator.of(context)
- .popAndPushNamed('/router/main_page');
+ Navigator.of(context)
+ .popAndPushNamed('/router/main_page');
// }
},
child: Container(
@@ -732,7 +743,7 @@ class _NewLoginPage extends State {
showDialog(
context: context,
builder: (BuildContext context) {
- return WillPopScope(
+ return WillPopScope(
onWillPop: () async => false,
child: SimpleDialog(
titlePadding: EdgeInsets.all(10),
@@ -855,7 +866,7 @@ class _NewLoginPage extends State {
});
SharesdkPlugin.uploadPrivacyPermissionStatus(
1,
- (success) => {
+ (success) => {
Navigator.of(context).pop(),
},
);
diff --git a/lib/main.dart b/lib/main.dart
index 41c34173..236b1317 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -110,6 +110,8 @@ 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 'mine/vip_pay_code.dart';
import 'order/bargain_group_order.dart';
import 'mine/personal_page.dart';
import 'order/exchange_write_off_page.dart';
@@ -323,7 +325,7 @@ Map routers = {
'/router/help_feedback_page': (context, {arguments}) => HelpFeedbackPage(),
'/router/founder_story_page': (context, {arguments}) => FounderStoryPage(),
'/router/system_msg_page': (context, {arguments}) => SystemMessagePage(),
- '/router/edit_remarks_page': (context, {arguments}) => EditRemarksPage(),
+ '/router/edit_remarks_page': (context, {arguments}) => EditRemarksPage(arguments: arguments),
// '/router/hot_article_page': (context, {arguments}) => HotArticlePage(),
'/router/address_map_page': (context, {arguments}) => AddressMapPage(),
'/router/roll_center_page': (context, {arguments}) => RollCenterPage(),
@@ -348,7 +350,7 @@ Map routers = {
'/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/main_page': (context, {arguments}) => MainPage(arguments: arguments),
'/router/test_page': (context, {arguments}) => TestPage(),
- '/router/communityFollow': (context, {arguments}) => CommunityFollow(),
+ '/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments),
'/router/releasePage': (context, {arguments}) => ReleasePage(),
'/router/activity_list': (context, {arguments}) => ActivityList(),
'/router/class_details': (context, {arguments}) =>
@@ -417,4 +419,8 @@ Map routers = {
UserVipServicePage(),
'/router/help_farmers_page': (context, {arguments}) =>
HelpFarmersPage(),
+ '/router/scan_web': (context, {arguments}) =>
+ ScanWeb(arguments:arguments),
+ '/router/vip_pay_code': (context, {arguments}) =>
+ VipPayCode(),
};
diff --git a/lib/main_page.dart b/lib/main_page.dart
index 69255113..331f2662 100644
--- a/lib/main_page.dart
+++ b/lib/main_page.dart
@@ -204,7 +204,7 @@ class _MainPage extends State with WidgetsBindingObserver {
myLocPlugin.authAK("ylW2QPlsbERkho7jOgU4GQSeawmdUIoR");
BMFMapSDK.setApiKeyAndCoordType(
'ylW2QPlsbERkho7jOgU4GQSeawmdUIoR',
- BMF_COORD_TYPE.COMMON,
+ BMF_COORD_TYPE.BD09LL,
);
} else if (Platform.isAndroid) {
BMFMapSDK.setCoordType(BMF_COORD_TYPE.BD09LL);
@@ -297,8 +297,10 @@ class _MainPage extends State with WidgetsBindingObserver {
params["activityId"] = pushMap["info"];
break;
case 3:
- routeName = "/router/union_detail_page";
+ routeName = "/router/store_order";
params["id"] = pushMap["info"];
+ params["tenant"] = pushMap["tenant"];
+ params["storeName"] = pushMap["storeName"];
break;
case 4:
routeName = "/router/integral_store_page";
diff --git a/lib/message/system_details.dart b/lib/message/system_details.dart
index 79f27255..8e4742e4 100644
--- a/lib/message/system_details.dart
+++ b/lib/message/system_details.dart
@@ -23,6 +23,7 @@ class SystemDetails extends StatefulWidget {
final Map arguments;
SystemDetails({this.arguments});
+
@override
State createState() {
return _SystemDetails();
@@ -34,6 +35,7 @@ class _SystemDetails extends State {
int pageNum = 1;
List messages = [];
int msgType = 0;
+
// String parenId = "0";
var commentFocus = FocusNode();
String hintText = S.current.liuxianinjingcaidepinglunba;
@@ -43,7 +45,6 @@ class _SystemDetails extends State {
final TextEditingController commentTextController = TextEditingController();
int indexMsg = 0;
-
@override
void initState() {
super.initState();
@@ -56,7 +57,6 @@ class _SystemDetails extends State {
});
}
-
_refresh() {
pageNum = 1;
queryMessage();
@@ -92,13 +92,14 @@ class _SystemDetails extends State {
}
}
- ///关注/取关会员
- _vipFollow(followId,isFollow) async {
+ ///关注/取关会员
+ _vipFollow(followId, isFollow) async {
BaseData baseData = await apiService.follow(followId);
if (baseData != null && baseData.isSuccess) {
// widget.refresh();
queryMessage();
- SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center);
+ SmartDialog.showToast(isFollow ? "取关成功" : "关注成功",
+ alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
@@ -117,16 +118,15 @@ class _SystemDetails extends State {
BaseData baseData = await apiService.memberComment({
"content": content,
"parentId": messageRelational["additionId"].toString(),
- "relationalId":messageRelational["businessId"].toString(),
- "relationalType":4
+ "relationalId": messageRelational["businessId"].toString(),
+ "relationalType": 4
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
commentTextController.text = "";
FocusScope.of(context).unfocus();
Navigator.of(context).pop();
SmartDialog.showToast("发布成功", alignment: Alignment.center);
- }
- else{
+ } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@@ -139,11 +139,19 @@ class _SystemDetails extends State {
appBar: MyAppBar(
background: Colors.white,
leadingColor: Colors.black,
- title: (msgType == 2) ? S.of(context).dingdantongzhi:(msgType == 3) ? S.of(context).chongzhixiaoxi:(msgType == 4) ?"关注":(msgType == 5) ?"点赞":"评论",
+ title: (msgType == 2)
+ ? S.of(context).dingdantongzhi
+ : (msgType == 3)
+ ? S.of(context).chongzhixiaoxi
+ : (msgType == 4)
+ ? S.of(context).guanzhu
+ : (msgType == 5)
+ ? S.of(context).dianzan
+ : S.of(context).pinglun,
titleSize: 18.sp,
titleColor: Colors.black,
),
- body:SmartRefresher(
+ body: SmartRefresher(
enablePullDown: true,
enablePullUp: true,
header: MyHeader(),
@@ -151,7 +159,7 @@ class _SystemDetails extends State {
footer: CustomFooter(
loadStyle: LoadStyle.ShowWhenLoading,
builder: (BuildContext context, LoadStatus mode) {
- return (messages.length == 0)?Container():MyFooter(mode);
+ return (messages.length == 0) ? Container() : MyFooter(mode);
},
),
controller: _refreshController,
@@ -159,76 +167,69 @@ class _SystemDetails extends State {
onLoading: () {
queryMessage();
},
- child:
- Container(
- child: SingleChildScrollView(
- physics: BouncingScrollPhysics(),
- child:
- Container(
- child: Column(
- children: [
- if(msgType == 2)
- orderMessage(),
- if(msgType == 3)
- rechargeMessage(),
- if(msgType == 5)
- fabulousMessage(),
- if(msgType == 6)
- commentMessage(),
- if(msgType == 4)
- followMessage(),
- ],
- ),
- ),
+ child: Container(
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Container(
+ child: Column(
+ children: [
+ if (msgType == 2) orderMessage(),
+ if (msgType == 3) rechargeMessage(),
+ if (msgType == 5) fabulousMessage(),
+ if (msgType == 6) commentMessage(),
+ if (msgType == 4) followMessage(),
+ ],
),
),
+ ),
+ ),
),
);
}
///订单通知
- Widget orderMessage(){
+ Widget orderMessage() {
return Container(
- color: Colors.white,
- width: double.infinity,
- padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w),
- child:Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- (messages == null || messages.length == 0)
- ? NoDataView(
- src: "assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
- : ListView.builder(
- padding: EdgeInsets.only(top: 16),
- itemCount: messages.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- // if (messages[position].typed == 2) {
- // Navigator.of(context)
- // .pushNamed('/router/exchange_order_details');
- // }
- },
- child: orderMessageItem(messages[position]),
- );
- }),
- ],
- )
- );
+ color: Colors.white,
+ width: double.infinity,
+ padding:
+ EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ (messages == null || messages.length == 0)
+ ? NoDataView(
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
+ : ListView.builder(
+ padding: EdgeInsets.only(top: 16),
+ itemCount: messages.length,
+ shrinkWrap: true,
+ physics: NeverScrollableScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ // if (messages[position].typed == 2) {
+ // Navigator.of(context)
+ // .pushNamed('/router/exchange_order_details');
+ // }
+ },
+ child: orderMessageItem(messages[position]),
+ );
+ }),
+ ],
+ ));
}
+
Widget orderMessageItem(Message message) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
- child:
- Column(
+ child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -242,13 +243,13 @@ class _SystemDetails extends State {
(message.typed == 1)
? "assets/image/icon_system_message.webp"
: (message.typed == 2)
- ? "assets/image/icon_system_message.webp"
- : "assets/image/c_z.webp",
+ ? "assets/image/icon_system_message.webp"
+ : "assets/image/c_z.webp",
width: 24.w,
height: 24.h,
),
SizedBox(
- width:8.w,
+ width: 8.w,
),
Text(
(message.typed == 1)
@@ -273,87 +274,89 @@ class _SystemDetails extends State {
),
],
),
- Container(
- width: double.infinity,
- margin: EdgeInsets.only(left:30.w, top:20.h),
- child: Column(
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Expanded(child: Text(
+ Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(left: 30.w, top: 20.h),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Text(
message.content,
maxLines: 2,
- overflow:TextOverflow.ellipsis,
+ overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
),
- ),),
- Icon(
- Icons.keyboard_arrow_right,
- color: Colors.black,
- )
- ],
- ),
- Container(
- margin: EdgeInsets.only(top: 14.h),
- height: 1,
- width: double.infinity,
- color: Color(0XFFF7F7F7),
- )
- ],
- ),
- )
+ ),
+ ),
+ Icon(
+ Icons.keyboard_arrow_right,
+ color: Colors.black,
+ )
+ ],
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 14.h),
+ height: 1,
+ width: double.infinity,
+ color: Color(0XFFF7F7F7),
+ )
+ ],
+ ),
+ )
],
),
);
}
///充值消息通知
- Widget rechargeMessage(){
+ Widget rechargeMessage() {
return Container(
color: Colors.white,
width: double.infinity,
- padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w),
- child:Column(
+ padding:
+ EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w),
+ child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(messages == null || messages.length == 0)
? NoDataView(
- src:"assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
: ListView.builder(
- padding: EdgeInsets.only(top: 16),
- itemCount: messages.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- // if (messages[position].typed == 2) {
- // Navigator.of(context)
- // .pushNamed('/router/exchange_order_details');
- // }
- },
- child: rechargeMessageItem(messages[position]),
- );
- }),
+ padding: EdgeInsets.only(top: 16),
+ itemCount: messages.length,
+ shrinkWrap: true,
+ physics: NeverScrollableScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ // if (messages[position].typed == 2) {
+ // Navigator.of(context)
+ // .pushNamed('/router/exchange_order_details');
+ // }
+ },
+ child: rechargeMessageItem(messages[position]),
+ );
+ }),
],
- )
- );
+ ));
}
+
Widget rechargeMessageItem(Message message) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
- child:
- Column(
+ child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -367,20 +370,20 @@ class _SystemDetails extends State {
(message.typed == 1)
? "assets/image/icon_system_message.webp"
: (message.typed == 2)
- ? "assets/image/icon_system_message.webp"
- : "assets/image/c_z.webp",
+ ? "assets/image/icon_system_message.webp"
+ : "assets/image/c_z.webp",
width: 24.w,
height: 24.h,
),
SizedBox(
- width:8.w,
+ width: 8.w,
),
Text(
(message.typed == 1)
? S.of(context).xitongtongzhi
: (message.typed == 2)
- ? S.of(context).dingdanxiaoxi
- : "充值通知",
+ ? S.of(context).dingdanxiaoxi
+ : "充值通知",
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
@@ -400,7 +403,7 @@ class _SystemDetails extends State {
),
Container(
width: double.infinity,
- margin: EdgeInsets.only(left:30.w, top:20.h),
+ margin: EdgeInsets.only(left: 30.w, top: 20.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -413,20 +416,24 @@ class _SystemDetails extends State {
color: Color(0xFF353535),
),
),
- SizedBox(height:8.h,),
+ SizedBox(
+ height: 8.h,
+ ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
- Expanded(child: Text(
- message.content,
- maxLines: 2,
- overflow:TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFF353535),
+ Expanded(
+ child: Text(
+ message.content,
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ fontSize: 12.sp,
+ color: Color(0xFF353535),
+ ),
),
- ),),
+ ),
Icon(
Icons.keyboard_arrow_right,
color: Colors.black,
@@ -448,171 +455,182 @@ class _SystemDetails extends State {
}
///点赞通知
- Widget fabulousMessage(){
+ Widget fabulousMessage() {
return Container(
color: Colors.white,
width: double.infinity,
- padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w),
- child:Column(
+ padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w),
+ child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(messages == null || messages.length == 0)
? NoDataView(
- src:"assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
: ListView.builder(
- padding: EdgeInsets.only(top: 16),
- itemCount: messages.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- Navigator.of(context).pushNamed(
- '/router/community_details',
- arguments: {
- "businessId":jsonDecode(messages[position].relational)["businessId"].toString(),
- "mid":messages[position].mid
+ padding: EdgeInsets.only(top: 16),
+ itemCount: messages.length,
+ shrinkWrap: true,
+ physics: NeverScrollableScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ Navigator.of(context).pushNamed(
+ '/router/community_details',
+ arguments: {
+ "businessId":
+ jsonDecode(messages[position].relational)[
+ "businessId"]
+ .toString(),
+ "mid": messages[position].mid
+ },
+ );
},
+ child: fabulousMessageItem(messages[position]),
);
- },
- child: fabulousMessageItem(messages[position]),
- );
- }),
+ }),
],
- )
- );
+ ));
}
+
Widget fabulousMessageItem(Message message) {
var messageRelational = jsonDecode(message.relational);
return Container(
- child:
- Row(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ MImage(
+ messageRelational["avatar"] ?? "",
+ width: 44,
+ height: 44,
+ isCircle: true,
+ fit: BoxFit.cover,
+ errorSrc: "assets/image/default_1.webp",
+ fadeSrc: "assets/image/default_1.webp",
+ ),
+ SizedBox(
+ width: 8,
+ ),
+ Expanded(
+ child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- MImage(
- messageRelational["avatar"] ?? "",
- width: 44,
- height: 44,
- isCircle: true,
- fit: BoxFit.cover,
- errorSrc: "assets/image/default_1.webp",
- fadeSrc: "assets/image/default_1.webp",
- ),
- SizedBox(width: 8,),
- Expanded(child:Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
+ Row(
children: [
- Row(
- children: [
- Text(
- messageRelational["nickname"] ?? "",
- style: TextStyle(
- fontWeight: MyFontWeight.semi_bold,
- fontSize: 14.sp,
- color: Color(0xFF1A1A1A))
- ),
- SizedBox(width:8.w,),
- Text(
- "点赞了",
- style:TextStyle(
- fontWeight: MyFontWeight.medium,
+ Text(messageRelational["nickname"] ?? "",
+ style: TextStyle(
+ fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
- color: Color(0xFF32A060),
- ),
- ),
- ],
+ color: Color(0xFF1A1A1A))),
+ SizedBox(
+ width: 8.w,
),
- SizedBox(height: 8,),
Text(
- message.updateTime,
+ "点赞了",
style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFFA29E9E),
- ),
- ),
- SizedBox(height:12.h,),
- Container(
- width: double.infinity,
- color:Color(0xFFF2F2F2),
- padding:EdgeInsets.all(5),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- // Text(
- // "我的评论:",
- // style: TextStyle(
- // fontSize: 12.sp,
- // height: 1.3,
- // fontWeight: MyFontWeight.regular,
- // color: Color(0xFF1A1A1A),
- // ),
- // ),
- MImage(
- messageRelational["nickname"] ,
- width: 38,
- height: 38,
- isCircle: true,
- fit: BoxFit.cover,
- radius: BorderRadius.circular(2),
- errorSrc: "assets/image/default_1.webp",
- fadeSrc: "assets/image/default_1.webp",
- ),
- SizedBox(width:2.w),
- Expanded(child:Text(
- messageRelational["content"] ?? "",
- maxLines: 2,
- overflow:TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 12.sp,
- height: 1.3,
- fontWeight: MyFontWeight.regular,
- color: Color(0xFF808080),
- ),
- ),)
- ],
+ fontWeight: MyFontWeight.medium,
+ fontSize: 14.sp,
+ color: Color(0xFF32A060),
),
),
- Container(
- margin: EdgeInsets.only(top: 16.h,bottom:16.h),
- height: 1.h,
- width: double.infinity,
- color: Color(0xFFF7F7F7),
- ),
],
- )),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Text(
+ message.updateTime,
+ style: TextStyle(
+ fontSize: 12.sp,
+ color: Color(0xFFA29E9E),
+ ),
+ ),
+ SizedBox(
+ height: 12.h,
+ ),
+ Container(
+ width: double.infinity,
+ color: Color(0xFFF2F2F2),
+ padding: EdgeInsets.all(5),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ // Text(
+ // "我的评论:",
+ // style: TextStyle(
+ // fontSize: 12.sp,
+ // height: 1.3,
+ // fontWeight: MyFontWeight.regular,
+ // color: Color(0xFF1A1A1A),
+ // ),
+ // ),
+ MImage(
+ messageRelational["nickname"],
+ width: 38,
+ height: 38,
+ isCircle: true,
+ fit: BoxFit.cover,
+ radius: BorderRadius.circular(2),
+ errorSrc: "assets/image/default_1.webp",
+ fadeSrc: "assets/image/default_1.webp",
+ ),
+ SizedBox(width: 2.w),
+ Expanded(
+ child: Text(
+ messageRelational["content"] ?? "",
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ fontSize: 12.sp,
+ height: 1.3,
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF808080),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 16.h, bottom: 16.h),
+ height: 1.h,
+ width: double.infinity,
+ color: Color(0xFFF7F7F7),
+ ),
],
- ),
+ )),
+ ],
+ ),
);
}
///评论通知
- Widget commentMessage(){
+ Widget commentMessage() {
return Container(
- color: Colors.white,
- width: double.infinity,
- padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w),
- child:Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- (messages == null || messages.length == 0)
- ? NoDataView(
- src:"assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
- : ListView.builder(
+ color: Colors.white,
+ width: double.infinity,
+ padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ (messages == null || messages.length == 0)
+ ? NoDataView(
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
+ : ListView.builder(
padding: EdgeInsets.only(top: 16),
itemCount: messages.length,
shrinkWrap: true,
@@ -623,28 +641,30 @@ class _SystemDetails extends State {
Navigator.of(context).pushNamed(
'/router/community_details',
arguments: {
- "businessId":jsonDecode(messages[position].relational)["businessId"].toString(),
- "mid":messages[position].mid
+ "businessId":
+ jsonDecode(messages[position].relational)[
+ "businessId"]
+ .toString(),
+ "mid": messages[position].mid
},
);
},
- child: commentMessageItem(messages[position],position),
+ child: commentMessageItem(messages[position], position),
);
}),
- ],
- )
- );
+ ],
+ ));
}
- Widget commentMessageItem(Message message,index) {
+
+ Widget commentMessageItem(Message message, index) {
var messageRelational = jsonDecode(message.relational);
return Container(
- child:
- Row(
+ child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MImage(
- messageRelational["avatar"],
+ messageRelational["avatar"],
width: 44,
height: 44,
isCircle: true,
@@ -652,8 +672,11 @@ class _SystemDetails extends State {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
- SizedBox(width: 8,),
- Expanded(child:Column(
+ SizedBox(
+ width: 8,
+ ),
+ Expanded(
+ child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -661,42 +684,46 @@ class _SystemDetails extends State {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Expanded(child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Text(
- messageRelational["nickname"],
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Text(messageRelational["nickname"],
+ style: TextStyle(
+ fontWeight: MyFontWeight.semi_bold,
+ fontSize: 14.sp,
+ color: Color(0xFF1A1A1A))),
+ SizedBox(
+ width: 8.w,
+ ),
+ Text(
+ "评论了",
style: TextStyle(
- fontWeight: MyFontWeight.semi_bold,
- fontSize: 14.sp,
- color: Color(0xFF1A1A1A))
- ),
- SizedBox(width:8.w,),
- Text(
- "评论了",
- style:TextStyle(
- fontWeight: MyFontWeight.medium,
- fontSize: 14.sp,
- color: Color(0xFF32A060),
+ fontWeight: MyFontWeight.medium,
+ fontSize: 14.sp,
+ color: Color(0xFF32A060),
+ ),
),
+ ],
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Text(
+ message.updateTime,
+ style: TextStyle(
+ fontSize: 12.sp,
+ color: Color(0xFFA29E9E),
),
- ],
- ),
- SizedBox(height: 8,),
- Text(
- message.updateTime,
- style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFFA29E9E),
),
- ),
- ],
- ),),
+ ],
+ ),
+ ),
GestureDetector(
- onTap: (){
+ onTap: () {
setState(() {
indexMsg = index;
showDeleteDialog();
@@ -704,9 +731,9 @@ class _SystemDetails extends State {
});
},
child: Container(
- height:22.h,
+ height: 22.h,
width: 40.w,
- padding:EdgeInsets.only(left:2,right:2),
+ padding: EdgeInsets.only(left: 2, right: 2),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(11),
@@ -728,7 +755,9 @@ class _SystemDetails extends State {
)
],
),
- SizedBox(height:8.h,),
+ SizedBox(
+ height: 8.h,
+ ),
// Text(
// messageRelational["content"],
// maxLines: 2,
@@ -785,8 +814,8 @@ class _SystemDetails extends State {
// ),
Container(
width: double.infinity,
- color:Color(0xFFF2F2F2),
- padding:EdgeInsets.all(5),
+ color: Color(0xFFF2F2F2),
+ padding: EdgeInsets.all(5),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -810,23 +839,25 @@ class _SystemDetails extends State {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
- SizedBox(width:2.w),
- Expanded(child:Text(
- messageRelational["content"],
- maxLines: 2,
- overflow:TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 12.sp,
- height: 1.3,
- fontWeight: MyFontWeight.regular,
- color: Color(0xFF808080),
+ SizedBox(width: 2.w),
+ Expanded(
+ child: Text(
+ messageRelational["content"],
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(
+ fontSize: 12.sp,
+ height: 1.3,
+ fontWeight: MyFontWeight.regular,
+ color: Color(0xFF808080),
+ ),
),
- ),)
+ )
],
),
),
Container(
- margin: EdgeInsets.only(top: 16.h,bottom:16.h),
+ margin: EdgeInsets.only(top: 16.h, bottom: 16.h),
height: 1.h,
width: double.infinity,
color: Color(0xFFF7F7F7),
@@ -839,188 +870,195 @@ class _SystemDetails extends State {
}
///关注通知
- Widget followMessage(){
+ Widget followMessage() {
return Container(
color: Colors.white,
width: double.infinity,
- padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w),
- child:Column(
+ padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w),
+ child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(messages == null || messages.length == 0)
? NoDataView(
- src:"assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
: ListView.builder(
- padding: EdgeInsets.only(top: 16),
- itemCount: messages.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- // if (messages[position].typed == 2) {
- // Navigator.of(context)
- // .pushNamed('/router/exchange_order_details');
- // }
- },
- child: followMessageItem(messages[position]),
- );
- }),
+ padding: EdgeInsets.only(top: 16),
+ itemCount: messages.length,
+ shrinkWrap: true,
+ physics: NeverScrollableScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ // if (messages[position].typed == 2) {
+ // Navigator.of(context)
+ // .pushNamed('/router/exchange_order_details');
+ // }
+ },
+ child: followMessageItem(messages[position]),
+ );
+ }),
],
- )
- );
+ ));
}
+
Widget followMessageItem(Message message) {
var messageRelational = jsonDecode(message.relational);
- if(message.relational.startsWith("{"))
- return Container(
- child:
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
-
- MImage(
- messageRelational["avatar"],
- width: 44,
- height: 44,
- isCircle: true,
- fit: BoxFit.cover,
- errorSrc: "assets/image/default_1.webp",
- fadeSrc: "assets/image/default_1.webp",
- ),
- SizedBox(width: 8,),
- Expanded(child:Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
+ if (message.relational.startsWith("{"))
+ return Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ MImage(
+ messageRelational["avatar"],
+ width: 44,
+ height: 44,
+ isCircle: true,
+ fit: BoxFit.cover,
+ errorSrc: "assets/image/default_1.webp",
+ fadeSrc: "assets/image/default_1.webp",
+ ),
+ SizedBox(
+ width: 8,
+ ),
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(
- messageRelational["nickname"],
- style: TextStyle(
- fontWeight: MyFontWeight.semi_bold,
+ Row(
+ children: [
+ Text(messageRelational["nickname"],
+ style: TextStyle(
+ fontWeight: MyFontWeight.semi_bold,
+ fontSize: 14.sp,
+ color: Color(0xFF1A1A1A))),
+ SizedBox(
+ width: 8.w,
+ ),
+ Text(
+ "关注了你",
+ style: TextStyle(
+ fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
- color: Color(0xFF1A1A1A))
+ color: Color(0xFF32A060),
+ ),
+ ),
+ ],
+ ),
+ SizedBox(
+ height: 8,
),
- SizedBox(width:8.w,),
Text(
- "关注了你",
- style:TextStyle(
- fontWeight: MyFontWeight.medium,
- fontSize: 14.sp,
- color: Color(0xFF32A060),
+ message.updateTime,
+ style: TextStyle(
+ fontSize: 12.sp,
+ color: Color(0xFFA29E9E),
),
),
],
),
- SizedBox(height: 8,),
- Text(
- message.updateTime,
- style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFFA29E9E),
+ ),
+ GestureDetector(
+ onTap: () {
+ setState(() {
+ _vipFollow(messageRelational["mid"].toString(),
+ message?.followed ?? false);
+ });
+ },
+ child: RoundButton(
+ height: 21.h,
+ width: 56.w,
+ padding: EdgeInsets.all(2),
+ backgroup: (message?.followed ?? false)
+ ? Color(0xFFE6E6E6)
+ : Color(0xFF32A060),
+ textColor: (message?.followed ?? false)
+ ? Color(0xFF808080)
+ : Colors.white,
+ text: (message?.followed ?? false) ? "已关注" : "回关",
+ radius: 20,
+ icons: Icon(
+ (message?.followed ?? false)
+ ? Icons.check
+ : Icons.add,
+ color: (message?.followed ?? false)
+ ? Color(0xFF808080)
+ : Colors.white,
+ size: 12,
+ ),
+ )
+ // Container(
+ // height: 21.h,
+ // width:56.w,
+ // padding:EdgeInsets.only(left:5,right:5),
+ // alignment: Alignment.center,
+ // decoration: BoxDecoration(
+ // borderRadius: BorderRadius.circular(11),
+ // border: Border.all(
+ // width: 1,
+ // color: Color(0xFF00A359),
+ // style: BorderStyle.solid,
+ // ),
+ // color: (message?.followed ?? false)
+ // ? Color(0xFFE6E6E6)
+ // : Color(0xFF32A060),
+ // ),
+ // child: Row(
+ // children: [
+ // Icon((message?.followed ?? false)
+ // ? Icons.check
+ // : Icons.add,
+ // color:(message?.followed?? false)
+ // ? Color(0xFF808080)
+ // : Colors.white,
+ // size: 16,
+ // ),
+ // Text(
+ // (message?.followed ?? false) ? "已关注" : "回关",
+ // style: TextStyle(
+ // fontSize: 12.sp,
+ // fontWeight: MyFontWeight.medium,
+ // color:(message?.followed ?? false)
+ // ? Color(0xFF808080)
+ // : Colors.white,
+ // ),
+ // ),
+ // ],
+ // ),
+ // )
),
- ),
- ],
- ),),
- GestureDetector(
- onTap: (){
- setState(() {
- _vipFollow(messageRelational["mid"].toString(),message?.followed ?? false);
- });
- },
- child:
- RoundButton(
- height: 21.h,
- width:56.w,
- padding: EdgeInsets.all(2),
- backgroup: (message?.followed ?? false)
- ? Color(0xFFE6E6E6)
- : Color(0xFF32A060),
- textColor: (message?.followed ?? false)
- ? Color(0xFF808080)
- : Colors.white,
- text: (message?.followed ?? false) ? "已关注" : "回关",
- radius:20,
- icons: Icon(
- (message?.followed ?? false)
- ? Icons.check
- : Icons.add,
- color: (message?.followed?? false)
- ? Color(0xFF808080)
- : Colors.white,
- size: 12,
- ),
- )
- // Container(
- // height: 21.h,
- // width:56.w,
- // padding:EdgeInsets.only(left:5,right:5),
- // alignment: Alignment.center,
- // decoration: BoxDecoration(
- // borderRadius: BorderRadius.circular(11),
- // border: Border.all(
- // width: 1,
- // color: Color(0xFF00A359),
- // style: BorderStyle.solid,
- // ),
- // color: (message?.followed ?? false)
- // ? Color(0xFFE6E6E6)
- // : Color(0xFF32A060),
- // ),
- // child: Row(
- // children: [
- // Icon((message?.followed ?? false)
- // ? Icons.check
- // : Icons.add,
- // color:(message?.followed?? false)
- // ? Color(0xFF808080)
- // : Colors.white,
- // size: 16,
- // ),
- // Text(
- // (message?.followed ?? false) ? "已关注" : "回关",
- // style: TextStyle(
- // fontSize: 12.sp,
- // fontWeight: MyFontWeight.medium,
- // color:(message?.followed ?? false)
- // ? Color(0xFF808080)
- // : Colors.white,
- // ),
- // ),
- // ],
- // ),
- // )
- ),
- ],
- ),
- SizedBox(height:8.h,),
- Container(
- margin: EdgeInsets.only(top: 16.h,bottom:16.h),
- height: 1.h,
- width: double.infinity,
- color: Color(0xFFF7F7F7),
- ),
- ],
- )),
- ],
- ),
- );
+ ],
+ ),
+ SizedBox(
+ height: 8.h,
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 16.h, bottom: 16.h),
+ height: 1.h,
+ width: double.infinity,
+ color: Color(0xFFF7F7F7),
+ ),
+ ],
+ )),
+ ],
+ ),
+ );
}
///动态弹窗
@@ -1061,11 +1099,11 @@ class _SystemDetails extends State {
child: TextField(
maxLines: 8,
minLines: 1,
- focusNode:commentFocus,
- controller:commentTextController,
+ focusNode: commentFocus,
+ controller: commentTextController,
decoration: InputDecoration(
border: InputBorder.none,
- hintText:hintText,
+ hintText: hintText,
hintStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xFF868686),
diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart
index 46d07411..48eeff31 100644
--- a/lib/message/system_message.dart
+++ b/lib/message/system_message.dart
@@ -28,13 +28,13 @@ class _SystemMessagePage extends State {
ApiService apiService;
int pageNum = 1;
List messages = [];
- Map msgNumber = {
- "1":0,
- "2":0,
- "3":0,
- "4":0,
- "5":0,
- "6":0,
+ Map msgNumber = {
+ "1": 0,
+ "2": 0,
+ "3": 0,
+ "4": 0,
+ "5": 0,
+ "6": 0,
};
int state = 0;
@@ -75,7 +75,7 @@ class _SystemMessagePage extends State {
List message = [];
message.addAll(baseData.data.list);
message.forEach((element) {
- if(element.typed==2 || element.typed==3){
+ if (element.typed == 2 || element.typed == 3) {
messages.add(element);
}
});
@@ -102,14 +102,15 @@ class _SystemMessagePage extends State {
token: value.getString("token"),
);
}
- BaseData> baseData = await apiService.stats().catchError((onError) {});
+ BaseData> baseData =
+ await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
msgNumber.forEach((key, value) {
msgNumber[key] = 0;
});
baseData.data.forEach((element) {
- if(msgNumber.containsKey(element.name)){
+ if (msgNumber.containsKey(element.name)) {
msgNumber[element.name] = element.number;
}
});
@@ -124,40 +125,35 @@ class _SystemMessagePage extends State {
@override
Widget build(BuildContext context) {
- return WillPopScope(
- onWillPop: () async {
- Navigator.of(context).pop(true);
- return false;
- },
- child:Scaffold(
- appBar: MyAppBar(
- background: Colors.white,
- leadingColor: Colors.black,
- title: S.of(context).xiaoxi,
- titleSize: 18.sp,
- titleColor: Colors.black,
- actions: [
- Container(
- margin: EdgeInsets.only(right: 16.w),
- alignment: Alignment.centerRight,
- child: GestureDetector(
- onTap: () {
- setState(() {
- queryMsgStats();
- });
- },
- child: Text(
- S.of(context).biaojiweiyidu,
- style: TextStyle(
- fontSize: 16.sp,
- fontWeight:MyFontWeight.semi_bold,
- color: Color(0xFF353535),
- ),
- ),
- ),
- ),
- ],
- ),
+ return Scaffold(
+ // appBar: MyAppBar(
+ // background: Colors.white,
+ // leadingColor: Colors.black,
+ // title: S.of(context).xiaoxi,
+ // titleSize: 18.sp,
+ // titleColor: Colors.black,
+ // actions: [
+ // Container(
+ // margin: EdgeInsets.only(right: 16.w),
+ // alignment: Alignment.centerRight,
+ // child: GestureDetector(
+ // onTap: () {
+ // setState(() {
+ // queryMsgStats();
+ // });
+ // },
+ // child: Text(
+ // S.of(context).biaoweiyidu,
+ // style: TextStyle(
+ // fontSize: 16.sp,
+ // fontWeight:MyFontWeight.semi_bold,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // ),
+ // ),
+ // ],
+ // ),
body: SmartRefresher(
enablePullDown: true,
enablePullUp: true,
@@ -166,7 +162,7 @@ class _SystemMessagePage extends State {
footer: CustomFooter(
loadStyle: LoadStyle.ShowWhenLoading,
builder: (BuildContext context, LoadStatus mode) {
- return (messages.length == 0)?Container():MyFooter(mode);
+ return (messages.length == 0) ? Container() : MyFooter(mode);
},
),
controller: _refreshController,
@@ -180,264 +176,317 @@ class _SystemMessagePage extends State {
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
+ padding: EdgeInsets.only(bottom: 30.h),
child: Column(
children: [
+ Container(
+ color: Colors.white,
+ padding: EdgeInsets.only(
+ top: MediaQuery.of(context).padding.top + 10.h,
+ bottom: 15.h,right: 16.w),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ Navigator.of(context).pop();
+ },
+ child: Container(
+ alignment: Alignment.centerRight,
+ margin: EdgeInsets.only(left: 12,),
+ padding: EdgeInsets.all(6),
+ child: Icon(
+ Icons.arrow_back_ios,
+ color: Colors.black,
+ size: 24,
+ ),
+ ),
+ ),
+ Spacer(),
+ Expanded(
+ child: Text(
+ S.of(context).xiaoxi,
+ style: TextStyle(
+ color: Colors.black,
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.regular,
+ ),
+ )),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ setState(() {
+ queryMsgStats();
+ });
+ },
+ child: Container(
+ padding: EdgeInsets.symmetric(horizontal: 10.w),
+ child: Text(
+ S.of(context).biaoweiyidu,
+ style: TextStyle(
+ color: Colors.black,
+ fontSize: 16.sp,
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
newsSurvey(),
- SizedBox(height: 16.h,),
+ SizedBox(
+ height: 16.h,
+ ),
buildMessage(),
],
),
),
),
),
-
),
- ));
+ );
}
- Widget newsSurvey(){
+ Widget newsSurvey() {
return Container(
color: Colors.white,
- padding: EdgeInsets.only(top: 16.h,bottom: 16.h),
+ padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
child: Row(
children: [
- Expanded(child: GestureDetector(
- onTap: (){
- Navigator.of(context)
- .pushNamed('/router/system_details',arguments: {"msgType":5}).then((value) {
- setState(() {
- msgNumber["5"] = 0;
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ Navigator.of(context).pushNamed('/router/system_details',
+ arguments: {"msgType": 5}).then((value) {
+ setState(() {
+ msgNumber["5"] = 0;
+ });
});
- });
- },
- child:Column(
- children: [
- Stack(
- children: [
- Image.asset(
- "assets/image/icon_z.webp",
- width: 40,
- height: 40,
- ),
- if(msgNumber["5"].toString() != "0")
- Container(
- width:48,
- alignment: Alignment.topRight,
- child:Container(
- width:20,
- height:17,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(100),
- border: Border.all(
- width: 1,
- color: Colors.white,
- style: BorderStyle.solid,
- ),
- color:Color(0xFFFF441A),
+ },
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ Image.asset(
+ "assets/image/icon_z.webp",
+ width: 40,
+ height: 40,
),
- child:RoundButton(
- text:msgNumber["5"].toString(),
- textColor: Colors.white,
- fontWeight: MyFontWeight.regular,
- backgroup: Color(0xFFFF441A),
- fontSize:8.sp,
- radius: 100,
- )
+ if (msgNumber["5"].toString() != "0")
+ Container(
+ width: 48,
+ alignment: Alignment.topRight,
+ child: Container(
+ width: 20,
+ height: 17,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(100),
+ border: Border.all(
+ width: 1,
+ color: Colors.white,
+ style: BorderStyle.solid,
+ ),
+ color: Color(0xFFFF441A),
+ ),
+ child: RoundButton(
+ text: msgNumber["5"].toString(),
+ textColor: Colors.white,
+ fontWeight: MyFontWeight.regular,
+ backgroup: Color(0xFFFF441A),
+ fontSize: 8.sp,
+ radius: 100,
+ )),
+ )
+ ],
),
- )
- ],
- ),
- SizedBox(height: 6.h),
- Text(
- S.of(context).dianzan,
- style: TextStyle(
- fontSize: 14.sp,
- fontWeight:MyFontWeight.medium,
- color: Color(0xFF060606),
- ),
- )
- ],
- )
- )
- ),
- Expanded(child:
- GestureDetector(
- onTap: (){
- Navigator.of(context)
- .pushNamed('/router/system_details',arguments: {"msgType":6}).then((value) {
- setState(() {
- msgNumber["6"] = 0;
- });
- });
- },
- child: Column(
- children: [
- Stack(
- children: [
- Image.asset(
- "assets/image/icon_pl.webp",
- width: 40,
- height: 40,
+ SizedBox(height: 6.h),
+ Text(
+ S.of(context).dianzan,
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFF060606),
),
- if(msgNumber["6"].toString() != "0")
- Container(
- width:48,
- alignment: Alignment.topRight,
- child:Container(
- width:16,
- height:16,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(100),
- border: Border.all(
- width: 1,
- color: Colors.white,
- style: BorderStyle.solid,
- ),
- color:Color(0xFFFF441A),
- ),
- child:RoundButton(
- text: msgNumber["6"].toString(),
- textColor: Colors.white,
- fontWeight: MyFontWeight.regular,
- backgroup: Color(0xFFFF441A),
- fontSize:8.sp,
- radius: 100,
- )
+ )
+ ],
+ ))),
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ Navigator.of(context).pushNamed('/router/system_details',
+ arguments: {"msgType": 6}).then((value) {
+ setState(() {
+ msgNumber["6"] = 0;
+ });
+ });
+ },
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ Image.asset(
+ "assets/image/icon_pl.webp",
+ width: 40,
+ height: 40,
),
- )
- ],
- ),
- SizedBox(height: 6.h),
- Text(
- S.of(context).pinglun,
- style: TextStyle(
- fontSize: 14.sp,
- fontWeight:MyFontWeight.medium,
- color: Color(0xFF060606),
+ if (msgNumber["6"].toString() != "0")
+ Container(
+ width: 48,
+ alignment: Alignment.topRight,
+ child: Container(
+ width: 16,
+ height: 16,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(100),
+ border: Border.all(
+ width: 1,
+ color: Colors.white,
+ style: BorderStyle.solid,
+ ),
+ color: Color(0xFFFF441A),
+ ),
+ child: RoundButton(
+ text: msgNumber["6"].toString(),
+ textColor: Colors.white,
+ fontWeight: MyFontWeight.regular,
+ backgroup: Color(0xFFFF441A),
+ fontSize: 8.sp,
+ radius: 100,
+ )),
+ )
+ ],
),
- ),
- ],
- )
- )),
- Expanded(child:
- GestureDetector(
- onTap: (){
- Navigator.of(context)
- .pushNamed('/router/system_details',arguments: {"msgType":4}).then((value) {
- setState(() {
- msgNumber["4"] = 0;
- });
- });
- },
- child:Column(
- children: [
- Stack(
- children: [
- Image.asset(
- "assets/image/icon_gz.webp",
- width: 40,
- height: 40,
+ SizedBox(height: 6.h),
+ Text(
+ S.of(context).pinglun,
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFF060606),
),
- if(msgNumber["4"].toString() != "0")
- Container(
- width:48,
- alignment: Alignment.topRight,
- child:Container(
- width:16,
- height:16,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(100),
- border: Border.all(
- width: 1,
- color: Colors.white,
- style: BorderStyle.solid,
- ),
- color:Color(0xFFFF441A),
- ),
- child:RoundButton(
- text: msgNumber["4"].toString(),
- textColor: Colors.white,
- fontWeight: MyFontWeight.regular,
- backgroup: Color(0xFFFF441A),
- fontSize:8.sp,
- radius: 100,
- )
+ ),
+ ],
+ ))),
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ Navigator.of(context).pushNamed('/router/system_details',
+ arguments: {"msgType": 4}).then((value) {
+ setState(() {
+ msgNumber["4"] = 0;
+ });
+ });
+ },
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ Image.asset(
+ "assets/image/icon_gz.webp",
+ width: 40,
+ height: 40,
),
- )
- ],
- ),
- SizedBox(height: 6.h),
- Text(
- S.of(context).guanzhu,
- style: TextStyle(
- fontSize: 14.sp,
- fontWeight:MyFontWeight.medium,
- color: Color(0xFF060606),
+ if (msgNumber["4"].toString() != "0")
+ Container(
+ width: 48,
+ alignment: Alignment.topRight,
+ child: Container(
+ width: 16,
+ height: 16,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(100),
+ border: Border.all(
+ width: 1,
+ color: Colors.white,
+ style: BorderStyle.solid,
+ ),
+ color: Color(0xFFFF441A),
+ ),
+ child: RoundButton(
+ text: msgNumber["4"].toString(),
+ textColor: Colors.white,
+ fontWeight: MyFontWeight.regular,
+ backgroup: Color(0xFFFF441A),
+ fontSize: 8.sp,
+ radius: 100,
+ )),
+ )
+ ],
),
- ),
- ],
- )
- )
- ),
+ SizedBox(height: 6.h),
+ Text(
+ S.of(context).guanzhu,
+ style: TextStyle(
+ fontSize: 14.sp,
+ fontWeight: MyFontWeight.medium,
+ color: Color(0xFF060606),
+ ),
+ ),
+ ],
+ ))),
],
),
);
}
- Widget buildMessage(){
+ Widget buildMessage() {
return Container(
- color: Colors.white,
- width: double.infinity,
+ color: Colors.white,
+ width: double.infinity,
padding: EdgeInsets.all(20.w),
- child:Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- S.of(context).xitongxiaoxi,
- style: TextStyle(
- fontSize: 16.sp,
- fontWeight:MyFontWeight.semi_bold,
- color: Colors.black,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ S.of(context).xitongxiaoxi,
+ style: TextStyle(
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ color: Colors.black,
+ ),
),
- ),
- (messages == null || messages.length == 0)
- ? NoDataView(
- src: "assets/image/icon_empty.webp",
- isShowBtn: false,
- text: S.of(context).haimeiyouxiaoxi,
- fontSize: 16.sp,
- margin: EdgeInsets.only(top: 120.h),
- )
- :ListView.builder(
- padding: EdgeInsets.only(top: 16),
- itemCount: messages.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- itemBuilder: (context, position) {
- return GestureDetector(
- onTap: () {
- if(messages[position].typed == 2)
- Navigator.of(context)
- .pushNamed('/router/system_details',arguments: {"msgType":2}).then((value) {
- setState(() {
- msgNumber["2"] = 0;
- });
- });
- else if(messages[position].typed == 3)
- Navigator.of(context)
- .pushNamed('/router/system_details',arguments: {"msgType":3}).then((value) {
- setState(() {
- msgNumber["3"] = 0;
- });
- });
- },
- child: buildMessageItem(messages[position]),
- );
- }),
- ],
- )
- );
+ (messages == null || messages.length == 0)
+ ? NoDataView(
+ src: "assets/image/icon_empty.webp",
+ isShowBtn: false,
+ text: S.of(context).haimeiyouxiaoxi,
+ fontSize: 16.sp,
+ margin: EdgeInsets.only(top: 120.h),
+ )
+ : ListView.builder(
+ padding: EdgeInsets.only(top: 16),
+ itemCount: messages.length,
+ shrinkWrap: true,
+ physics: NeverScrollableScrollPhysics(),
+ itemBuilder: (context, position) {
+ return GestureDetector(
+ onTap: () {
+ if (messages[position].typed == 2)
+ Navigator.of(context).pushNamed(
+ '/router/system_details',
+ arguments: {"msgType": 2}).then((value) {
+ setState(() {
+ msgNumber["2"] = 0;
+ });
+ });
+ else if (messages[position].typed == 3)
+ Navigator.of(context).pushNamed(
+ '/router/system_details',
+ arguments: {"msgType": 3}).then((value) {
+ setState(() {
+ msgNumber["3"] = 0;
+ });
+ });
+ },
+ child: buildMessageItem(messages[position]),
+ );
+ }),
+ ],
+ ));
}
Widget buildMessageItem(Message message) {
@@ -469,26 +518,28 @@ class _SystemMessagePage extends State {
(message.typed == 1)
? "assets/image/icon_system_message.webp"
: (message.typed == 2)
- ? "assets/image/icon_system_message.webp"
- : "assets/image/c_z.webp",
+ ? "assets/image/icon_system_message.webp"
+ : "assets/image/c_z.webp",
width: 40.w,
height: 40.h,
),
SizedBox(
- width:12.w,
+ width: 12.w,
),
- Expanded(child:Column(
+ Expanded(
+ child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
- Expanded(child:Text(
+ Expanded(
+ child: Text(
(message.typed == 1)
? S.of(context).xitongtongzhi
: (message.typed == 2)
- ? S.of(context).dingdanxiaoxi
- : S.of(context).chongzhixiaoxi,
+ ? S.of(context).dingdanxiaoxi
+ : S.of(context).chongzhixiaoxi,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
@@ -504,64 +555,67 @@ class _SystemMessagePage extends State {
),
],
),
- SizedBox(height:4.h,),
- (message.typed != 3) ?
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(child:
- Text(
- S.of(context).ninyouyigexindedingdan,
- style: TextStyle(
- fontSize: 10.sp,
- color: Color(0xFF353535),
- ),
- ),),
- if(msgNumber["2"].toString() != "0")
- RoundButton(
- width: 16,
- height: 16,
- text:msgNumber["2"].toString(),
- textColor: Colors.white,
- fontWeight: MyFontWeight.regular,
- backgroup: Color(0xFFFF441A),
- fontSize:10.sp,
- radius: 100,
- ),
- ],
- ):
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(child:
- Text(
- message.content,
- style: TextStyle(
- fontSize: 10.sp,
- color: Color(0xFF353535),
- ),
- )),
- if(msgNumber["3"].toString() != "0")
- RoundButton(
- width: 16,
- height: 16,
- text:msgNumber["3"].toString(),
- textColor: Colors.white,
- fontWeight: MyFontWeight.regular,
- backgroup: Color(0xFFFF441A),
- fontSize:10.sp,
- radius: 100,
- ),
- ],
+ SizedBox(
+ height: 4.h,
),
+ (message.typed != 3)
+ ? Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Text(
+ S.of(context).ninyouyigexindedingdan,
+ style: TextStyle(
+ fontSize: 10.sp,
+ color: Color(0xFF353535),
+ ),
+ ),
+ ),
+ if (msgNumber["2"].toString() != "0")
+ RoundButton(
+ width: 16,
+ height: 16,
+ text: msgNumber["2"].toString(),
+ textColor: Colors.white,
+ fontWeight: MyFontWeight.regular,
+ backgroup: Color(0xFFFF441A),
+ fontSize: 10.sp,
+ radius: 100,
+ ),
+ ],
+ )
+ : Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Text(
+ message.content,
+ style: TextStyle(
+ fontSize: 10.sp,
+ color: Color(0xFF353535),
+ ),
+ )),
+ if (msgNumber["3"].toString() != "0")
+ RoundButton(
+ width: 16,
+ height: 16,
+ text: msgNumber["3"].toString(),
+ textColor: Colors.white,
+ fontWeight: MyFontWeight.regular,
+ backgroup: Color(0xFFFF441A),
+ fontSize: 10.sp,
+ radius: 100,
+ ),
+ ],
+ ),
],
)),
],
),
Container(
- margin: EdgeInsets.only(top: 16.h,bottom:8.h),
+ margin: EdgeInsets.only(top: 16.h, bottom: 8.h),
height: 1.h,
width: double.infinity,
color: Color(0xFFF7F7F7),
diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart
index 153ad73e..04157479 100644
--- a/lib/mine/mine_page.dart
+++ b/lib/mine/mine_page.dart
@@ -8,6 +8,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart';
+import 'package:huixiang/mine/mine_view/mine_navbar.dart';
import 'package:huixiang/mine/mine_view/mine_order.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
@@ -26,13 +27,15 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
+import '../retrofit/data/coupon.dart';
+import '../retrofit/data/page.dart';
import '../utils/flutter_utils.dart';
import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart';
class MinePage extends StatefulWidget {
+ MinePage(Key key) : super(key: key);
- MinePage(Key key): super(key: key);
@override
State createState() {
return MinePageState();
@@ -46,17 +49,21 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
SocialInfo infoNumber;
final RefreshController _refreshController = RefreshController();
int totalMsg = 0;
+ String couponNum;
_toUserInfo() async {
SharedPreferences shared = await SharedPreferences.getInstance();
if (shared.getString("token") == null || shared.getString("token") == "") {
- Navigator.of(context)
- .pushReplacementNamed('/router/new_login_page', arguments: {"login": "login"});
+ Navigator.of(context).pushReplacementNamed('/router/new_login_page',
+ arguments: {"login": "login"});
return;
}
- (Platform.isAndroid&&ExamineInstance.instance.isExamine)?
- await Navigator.of(context).pushNamed('/router/user_info_page'):
- await Navigator.of(context).pushNamed('/router/personal_page',arguments:{"memberId":"0",});
+ (Platform.isAndroid && ExamineInstance.instance.isExamine)
+ ? await Navigator.of(context).pushNamed('/router/user_info_page')
+ : await Navigator.of(context)
+ .pushNamed('/router/personal_page', arguments: {
+ "memberId": "0",
+ });
setState(() {});
}
@@ -71,6 +78,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
super.initState();
querySocialInfo();
queryMsgStats();
+ // queryCard();
eventBus.on().listen((event) {
print("EventType: ${event.type}");
@@ -101,8 +109,8 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
BaseData> rankData =
await apiService.rankList().catchError((onError) {
- SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
- alignment: Alignment.center);
+ SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
+ alignment: Alignment.center);
_refreshController.refreshFailed();
});
if (rankData != null && rankData.isSuccess) {
@@ -110,6 +118,22 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
ranks.addAll(rankData.data);
}
+ BaseData> baseData = await apiService.queryCard({
+ "centre": true,
+ "pageNum": 1,
+ "pageSize": 10,
+ "searchKey": "",
+ "state": 1
+ }).catchError((error) {
+ _refreshController.refreshFailed();
+ });
+ if (baseData != null && baseData.isSuccess) {
+ couponNum = baseData.data.total;
+ _refreshController.refreshCompleted();
+ } else {
+ _refreshController.refreshFailed();
+ }
+
BaseData baseDate =
await apiService.queryInfo().catchError((onError) {
_refreshController.refreshFailed();
@@ -165,7 +189,8 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
token: value.getString("token"),
);
}
- BaseData> baseData = await apiService.stats().catchError((onError) {});
+ BaseData> baseData =
+ await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
totalMsg = 0;
@@ -199,57 +224,59 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
child: SingleChildScrollView(
child: Container(
child: Stack(
- // alignment: Alignment.centerRight,
children: [
Container(
- height: 502.h,
- decoration: BoxDecoration(
- // color: Color(0xFF32A060)
- image: DecorationImage(
- fit: BoxFit.cover,
- image: AssetImage("assets/image/settlement_bg.webp"),
+ height: 306.h,
+ decoration: BoxDecoration(
+ // color: Color(0xFF32A060)
+ image: DecorationImage(
+ fit: BoxFit.fill,
+ image: AssetImage("assets/image/settlement_bg.webp"),
+ ),
),
- ),
),
FutureBuilder(
future: queryUserInfo(),
builder: (context, snapshot) {
return Column(
children: [
-
///我的 用户信息
- MineView(
- userInfo,
- () {
- _toUserInfo();
- },
- () {
- toIntegralPage();
- },
- (){
- setState(() {
- totalMsg =0;
- });
- },
- totalMsg,
- infoNumber
+ MineView(userInfo, () {
+ _toUserInfo();
+ }, () {
+ toIntegralPage();
+ }, () {
+ setState(() {
+ totalMsg = 0;
+ });
+ }, totalMsg,
+ infoNumber,
+ ranks
),
- ///我的 VIP等级信息
- MineVipEntry(
- tag: "vip",
- ranks: ranks,
- userInfo: userInfo,
- rank: double.tryParse(
- userInfo?.expendAmount ?? "0")
- .toInt(),
- rankMax:
- userInfo?.memberRankVo?.nextOrigin ?? 0,
- createTime: userInfo?.createTime ?? "",
+ ///订单/钱包/会员码/设置
+ MineNavbar(
+ couponNum,
+ userInfo,
+ infoNumber,
+ () {
+ toIntegralPage();
+ },
),
+ ///我的 VIP等级信息
+ // MineVipEntry(
+ // tag: "vip",
+ // ranks: ranks,
+ // userInfo: userInfo,
+ // rank: double.tryParse(userInfo?.expendAmount ?? "0")
+ // .toInt(),
+ // rankMax: userInfo?.memberRankVo?.nextOrigin ?? 0,
+ // createTime: userInfo?.createTime ?? "",
+ // ),
+
///我的订单
- MineOrderView(),
+ // MineOrderView(),
///推广图
spreadImage(),
@@ -265,7 +292,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
// ///关注度/粉丝/发布
// attention(),
- //
+
// /// 钱包或领券中心
// WalletCoupon(),
],
@@ -286,15 +313,16 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
Widget attainment() {
return GestureDetector(
behavior: HitTestBehavior.opaque,
- onTap: (){
+ onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo": userInfo},
);
},
- child:Container(
- margin: EdgeInsets.only(left:16.w,right:16.w,bottom:15.h),
- padding: EdgeInsets.only(left:12.w, top:12.h, right:10.w,bottom: 17.h),
+ child: Container(
+ margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 30.h),
+ padding:
+ EdgeInsets.only(left: 12.w, top: 12.h, right: 10.w, bottom: 17.h),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
@@ -320,34 +348,38 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
color: Color(0xFF0D0D0D),
),
),
- SizedBox(height: 9.h,),
+ SizedBox(
+ height: 9.h,
+ ),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
"assets/image/icon_attainment.webp",
- width:54,
- height:54,
+ width: 54,
+ height: 54,
fit: BoxFit.cover,
),
- SizedBox(width: 7.w,),
- Expanded(child:
- Column(
+ SizedBox(
+ width: 7.w,
+ ),
+ Expanded(
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
- "已解锁${infoNumber != null
- ? infoNumber.achievementNumber.toString()
- : "0"}个成就",
+ "已解锁${infoNumber != null ? infoNumber.achievementNumber.toString() : "0"}个成就",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF262626),
),
),
- SizedBox(height:4.w,),
+ SizedBox(
+ height: 4.w,
+ ),
Text(
"完成任务解锁更多成就",
style: TextStyle(
@@ -390,17 +422,17 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin {
///推广图
Widget spreadImage() {
return Container(
- margin: EdgeInsets.only(right:14.w,bottom:15.h,left: 14.w),
+ margin: EdgeInsets.only(right: 14.w, bottom: 30.h, left: 14.w),
child: GestureDetector(
- onTap: (){
+ onTap: () {
Navigator.of(context).pushNamed('/router/invite_friends');
},
- child:ClipRRect(
- child:Image.asset(
+ child: ClipRRect(
+ child: Image.asset(
"assets/image/welfare_spread.webp",
- width:double.infinity,
+ width: double.infinity,
fit: BoxFit.fill,
- height:80.h,
+ height: 80.h,
),
borderRadius: BorderRadius.circular(6.w),
),
diff --git a/lib/mine/mine_view/community_follow.dart b/lib/mine/mine_view/community_follow.dart
index c5a15b18..b0f7acd6 100644
--- a/lib/mine/mine_view/community_follow.dart
+++ b/lib/mine/mine_view/community_follow.dart
@@ -14,6 +14,11 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../fans_page.dart';
class CommunityFollow extends StatefulWidget {
+
+ final Map arguments;
+
+ CommunityFollow({this.arguments});
+
@override
State createState() {
return _CommunityFollow();
@@ -24,11 +29,13 @@ class _CommunityFollow extends State
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ApiService apiService;
SocialInfo infoNumber;
+ int status;
@override
void initState() {
super.initState();
querySocialInfo();
+ status = widget.arguments["status"];
}
///个人社交信息(粉丝/关注数量/成就数量)
@@ -51,6 +58,7 @@ class _CommunityFollow extends State
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
+ initialIndex: status,
child: Scaffold(
appBar: MyAppBar(
title: "",
diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart
index 2e897f8c..6a37dc05 100644
--- a/lib/mine/mine_view/mine_item.dart
+++ b/lib/mine/mine_view/mine_item.dart
@@ -20,7 +20,7 @@ class _MineItem extends State {
@override
Widget build(BuildContext context) {
return Container(
- margin: EdgeInsets.fromLTRB(16.w,0.h, 16.w, 15.h),
+ margin: EdgeInsets.fromLTRB(16.w,0.h, 16.w,30.h),
// padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration(
color: Colors.white,
diff --git a/lib/mine/mine_view/mine_navbar.dart b/lib/mine/mine_view/mine_navbar.dart
new file mode 100644
index 00000000..4ebd8359
--- /dev/null
+++ b/lib/mine/mine_view/mine_navbar.dart
@@ -0,0 +1,301 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:huixiang/generated/l10n.dart';
+import 'package:huixiang/utils/font_weight.dart';
+import 'package:huixiang/view_widget/login_tips_dialog.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import '../../retrofit/data/social_info.dart';
+import '../../retrofit/data/user_info.dart';
+
+class MineNavbar extends StatefulWidget {
+ final String couponNum;
+ final UserInfo userInfo;
+ final SocialInfo infoNumber;
+ final GestureTapCallback toIntegralPage;
+
+ MineNavbar(this.couponNum,this.userInfo,this.infoNumber,this.toIntegralPage);
+
+ @override
+ State createState() {
+ return _MineNavbar();
+ }
+}
+
+class _MineNavbar extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ margin: EdgeInsets.fromLTRB(13.5.w, 15.h, 13.5.w,30.h),
+ padding: EdgeInsets.only(
+ top: 26.h,
+ bottom: 24.h,
+ ),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(6),
+ boxShadow: [
+ BoxShadow(
+ color: Color(0x08213303).withAlpha(12),
+ offset: Offset(0, 2),
+ blurRadius: 4,
+ spreadRadius: 0,
+ ),
+ ],
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ ///订单
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed(
+ '/router/order_history_page',
+ arguments: {"status": 0});
+ });
+ },
+ child: mineTopItem(
+ S.of(context).dingdan,
+ "assets/image/mine_order.webp",
+ ),
+ ),
+ ),
+
+ ///钱包
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/mine_wallet');
+ });
+ },
+ child: mineTopItem(
+ "钱包",
+ "assets/image/wallet.webp",
+ ),
+ ),
+ ),
+
+ ///会员码
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/vip_pay_code');
+ });
+ },
+ child: mineTopItem(
+ "会员码",
+ "assets/image/vip_code.webp",
+ ),
+ ),
+ ),
+
+ ///设置
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/setting_page');
+ });
+ },
+ child: mineTopItem(
+ S.of(context).shezhi,
+ "assets/image/set.webp",
+ ),
+ ),
+ ),
+ ],
+ ),
+ Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(top:17.h,left: 16.w,right: 16.w,bottom: 27.h),
+ child: Flex(
+ children: List.generate(120, (_) {
+ return SizedBox(
+ width: 1,
+ height: 1,
+ child: DecoratedBox(
+ decoration: BoxDecoration(color: Color(0xFFEDEDED)),
+ ),
+ );
+ }),
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ direction: Axis.horizontal,
+ ),
+ ),
+ Row(
+ children: [
+ ///优惠券
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/coupon_page');
+ });
+ },
+ child: mineBottomItem(
+ widget?.couponNum ?? "0",
+ S.of(context).youhuiquan,
+ ),
+ ),
+ ),
+ ///积分
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ widget.toIntegralPage();
+ });
+ },
+ child: mineBottomItem(
+ widget?.userInfo?.points?? "0",
+ "积分",
+ ),
+ ),
+ ),
+ ///关注
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/communityFollow',arguments: {
+ "status":0
+ });
+ });},
+ child: mineBottomItem(
+ "${widget?.infoNumber?.follow ?? "0"}",
+ S.of(context).guanzhu,
+ ),
+ ),
+ ),
+ ///粉丝
+ Expanded(
+ child: InkWell(
+ onTap: () {
+ SharedPreferences.getInstance().then((value) {
+ if (value.getString("token") == null ||
+ value.getString("token") == "") {
+ LoginTipsDialog().show(context);
+ return;
+ }
+ Navigator.of(context).pushNamed('/router/communityFollow',arguments: {
+ "status":1
+ });
+ });
+ },
+ child: mineBottomItem(
+ "${widget?.infoNumber?.fans ?? "0"}",
+ S.of(context).fensi,
+ ),
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ );
+ }
+
+ ///导航栏条目
+ Widget mineTopItem(text, icon) {
+ return Container(
+ color: Colors.white,
+ margin: EdgeInsets.symmetric(vertical: 6.h),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Image.asset(
+ icon,
+ width: 23,
+ height: 23,
+ ),
+ SizedBox(
+ height: 5.h,
+ ),
+ Text(
+ text,
+ style: TextStyle(
+ fontWeight: MyFontWeight.semi_bold,
+ fontSize: 12.sp,
+ color: Color(0xFF0D0D0D),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ ///导航栏条目
+ Widget mineBottomItem(textTop, text) {
+ return Container(
+ color: Colors.white,
+ margin: EdgeInsets.symmetric(vertical: 6.h),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Text(
+ textTop,
+ style: TextStyle(
+ fontWeight: MyFontWeight.medium,
+ fontSize: 18.sp,
+ color: Color(0xFF000000),
+ ),
+ ),
+ SizedBox(
+ height:11.h,
+ ),
+ Text(
+ text,
+ style: TextStyle(
+ fontWeight: MyFontWeight.medium,
+ fontSize: 12.sp,
+ color: Color(0xFF4D4D4D),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart
index d5bd0531..e0292ffe 100644
--- a/lib/mine/mine_view/mine_view.dart
+++ b/lib/mine/mine_view/mine_view.dart
@@ -3,12 +3,9 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
-import 'package:flutter_svg/svg.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
-import 'package:huixiang/retrofit/data/msg_stats.dart';
import 'package:huixiang/retrofit/data/social_info.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
@@ -21,6 +18,9 @@ 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 '../../retrofit/data/rank.dart';
+import '../../view_widget/mine_vip_entry.dart';
// import 'package:qrscan/qrscan.dart' as scanner;
class MineView extends StatefulWidget {
@@ -29,9 +29,11 @@ class MineView extends StatefulWidget {
final GestureTapCallback toIntegralPage;
final Function messageZero;
final int totalMsg;
- final SocialInfo infoNumber;
+ final SocialInfo infoNumber;
+ final List ranks;
- 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,this.ranks);
@override
State createState() {
@@ -41,6 +43,7 @@ class MineView extends StatefulWidget {
class _MineView extends State {
ApiService apiService;
+ String levelText = "普通用户";
///核销用户优惠券
queryWiped(memberCouponId) async {
@@ -60,8 +63,6 @@ class _MineView extends State {
}
}
-
-
@override
Widget build(BuildContext context) {
return Column(
@@ -77,28 +78,30 @@ class _MineView extends State {
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 +109,20 @@ class _MineView extends State {
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,27 +131,27 @@ class _MineView extends State {
padding: EdgeInsets.all(8.h),
child: Image.asset(
"assets/image/icon_scan_qr_code.webp",
- width:32,
- height: 32,
- color: Colors.white,
- ),
- ),
- ),
- InkWell(
- onTap: () {
- Navigator.of(context).pushNamed('/router/setting_page');
- },
- child: Container(
- padding: EdgeInsets.all(8.h),
- margin: EdgeInsets.only(right: 12.w),
- child: Image.asset(
- "assets/image/icon_mine_setting.webp",
width: 32,
height: 32,
color: Colors.white,
),
),
),
+ // InkWell(
+ // onTap: () {
+ // Navigator.of(context).pushNamed('/router/setting_page');
+ // },
+ // child: Container(
+ // padding: EdgeInsets.all(8.h),
+ // margin: EdgeInsets.only(right: 12.w),
+ // child: Image.asset(
+ // "assets/image/icon_mine_setting.webp",
+ // width: 32,
+ // height: 32,
+ // color: Colors.white,
+ // ),
+ // ),
+ // ),
],
),
),
@@ -184,11 +184,12 @@ class _MineView extends State {
} 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 +214,19 @@ class _MineView extends State {
"tableId": int.tryParse(tableId),
},
);
+ return;
+ }
+ String title = uri.queryParameters["title"];
+ if (result.toString().contains("http:") ||
+ result.toString().contains("https:")) {
+ ///扫码跳转任意网页
+ Navigator.of(context).pushNamed(
+ '/router/scan_web',
+ arguments: {
+ "result": result,
+ "title":title,
+ },
+ );
}
} else {
await Permission.camera.request();
@@ -248,21 +262,21 @@ class _MineView extends State {
MImage(
widget.userInfo == null ? "" : widget.userInfo.headimg,
isCircle: true,
- width: 58,
- height: 58,
+ width: 60,
+ height: 60,
fit: BoxFit.cover,
errorSrc: "assets/image/default_user.webp",
fadeSrc: "assets/image/default_user.webp",
),
- Positioned(
- bottom: 0,
- right: 2.w,
- child: Image.asset(
- "assets/image/icon_mine_edit.webp",
- width: 17,
- height: 17,
- ),
- ),
+ // Positioned(
+ // bottom: 0,
+ // right: 2.w,
+ // child: Image.asset(
+ // "assets/image/icon_mine_edit.webp",
+ // width: 17,
+ // height: 17,
+ // ),
+ // ),
],
),
),
@@ -300,7 +314,7 @@ class _MineView extends State {
child: Text(
widget.userInfo == null
? S.of(context).denglu
- : "${widget.userInfo.nickname??""}",
+ : "${widget.userInfo.nickname == "" ? "回乡" : widget.userInfo.nickname}",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@@ -308,12 +322,12 @@ class _MineView extends State {
),
),
),
- 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
@@ -325,34 +339,35 @@ class _MineView extends State {
color: Color(0xFFFFFFFF),
),
)
- : 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),
- ),
- ),
- ],
- ),
+ : mineVip(),
+ // 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),
+ // ),
+ // ),
+ // ],
+ // ),
],
),
),
@@ -375,12 +390,12 @@ class _MineView extends State {
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: [
@@ -410,4 +425,19 @@ class _MineView extends State {
),
);
}
+
+ Widget mineVip(){
+ return Container(
+ child: MineVipEntry(
+ tag: "vip",
+ ranks: widget.ranks,
+ userInfo: widget.userInfo,
+ rank: double.tryParse(widget.userInfo?.expendAmount ?? "0")
+ .toInt(),
+ rankMax: widget.userInfo?.memberRankVo?.nextOrigin ?? 0,
+ createTime: widget.userInfo?.createTime ?? "",
+ ),
+ );
+
+ }
}
diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart
index 04b0b817..11b8a568 100644
--- a/lib/mine/mine_wallet_page.dart
+++ b/lib/mine/mine_wallet_page.dart
@@ -458,7 +458,7 @@ class _MineWalletPage extends State {
Expanded(
flex: 7,
child: Text(
- userBill.title,
+ userBill.type,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp,
diff --git a/lib/mine/personal_page.dart b/lib/mine/personal_page.dart
index 95fa8e8f..4d07ff91 100644
--- a/lib/mine/personal_page.dart
+++ b/lib/mine/personal_page.dart
@@ -98,54 +98,52 @@ class _PersonalPage extends State with WidgetsBindingObserver {
///动态列表
queryCommunity(String searchKey) async {
- if(!isRefresh){
+ if (!isRefresh) {
isRefresh = true;
return;
}
- if(isLoadingData){
+ if (isLoadingData) {
return;
}
isLoadingData = true;
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
- apiService = ApiService(
- Dio(),
+ apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
- showLoading: false
- );
+ showLoading: false);
}
- if(isLoadMore){
+ if (isLoadMore) {
pageNum += 1;
isLoadMore = false;
- }
- else if(searchKey == null)pageNum = 1;
+ } else if (searchKey == null) pageNum = 1;
BaseData> baseData = await apiService.trendList({
"mid": memberId == "0" ? userId : memberId,
"onlyFollow": false,
"onlyMe": true,
- "pageNum": searchKey == null?pageNum:1,
+ "pageNum": searchKey == null ? pageNum : 1,
"pageSize": 10,
- "searchKey": searchKey??""
+ "searchKey": searchKey ?? ""
}).catchError((error) {
- if(searchKey == null) {
+ if (searchKey == null) {
refreshController.refreshFailed();
refreshController.loadFailed();
}
});
- if(searchKey == null){
- refreshController.refreshCompleted();
- refreshController.loadComplete();
+ if (searchKey == null) {
+ refreshController.refreshCompleted();
+ refreshController.loadComplete();
}
if (baseData.isSuccess) {
- if(searchKey != null){
- if(baseData?.data?.list != null && baseData.data.list.isNotEmpty)
+ if (searchKey != null) {
+ if (baseData?.data?.list != null && baseData.data.list.isNotEmpty)
articles.forEach((element) {
- if(element.id == searchKey){
+ if (element.id == searchKey) {
element.content = jsonEncode(baseData.data.list[0].subjectInfo);
- element.mainTitle =baseData.data.list[0].subject;
+ element.mainTitle = baseData.data.list[0].subject;
element.followed = baseData.data.list[0].selfFollow;
+ element.liked = baseData.data.list[0].selfLike;
element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar;
element.authorName = baseData.data.list[0].memberInfo?.nickname;
element.location = baseData.data.list[0].location;
@@ -155,12 +153,10 @@ class _PersonalPage extends State with WidgetsBindingObserver {
element.likes = baseData.data.list[0]?.likes;
element.comments = baseData.data.list[0]?.comments;
this.isRefresh = false;
- setState(() {
- });
+ setState(() {});
}
});
- }
- else{
+ } else {
if (pageNum == 1) {
articles.clear();
}
@@ -168,8 +164,9 @@ class _PersonalPage extends State with WidgetsBindingObserver {
var article = Article();
article.id = element.id;
article.content = jsonEncode(element.subjectInfo);
- article.mainTitle =element.subject;
+ article.mainTitle = element.subject;
article.followed = element.selfFollow;
+ article.liked = element.selfLike;
article.authorHeadImg = element.memberInfo?.avatar;
article.authorName = element.memberInfo?.nickname;
article.location = element.location;
@@ -180,8 +177,7 @@ class _PersonalPage extends State with WidgetsBindingObserver {
article.comments = element?.comments;
articles.add(article);
});
- setState(() {
- });
+ setState(() {});
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
@@ -324,328 +320,333 @@ class _PersonalPage extends State with WidgetsBindingObserver {
@override
Widget build(BuildContext context) {
- return SmartRefresher(
- controller: refreshController,
- enablePullDown: true,
- enablePullUp: true,
- header: MyHeader(),
- footer: CustomFooter(
- builder: (context, mode) {
- return MyFooter(mode);
- },
- ),
- onRefresh: _onRefresh,
- onLoading: () {
- isLoadMore = true;
- setState(() {
- _onRefresh();
- });
- },
- physics: BouncingScrollPhysics(),
- scrollController: scrollController,
- child: SingleChildScrollView(
+ return Scaffold(
+ backgroundColor: Colors.white,
+ body:SmartRefresher(
+ controller: refreshController,
+ enablePullDown: true,
+ enablePullUp: true,
+ header: MyHeader(),
+ footer: CustomFooter(
+ builder: (context, mode) {
+ return MyFooter(mode);
+ },
+ ),
+ onRefresh: _onRefresh,
+ onLoading: () {
+ isLoadMore = true;
+ setState(() {
+ _onRefresh();
+ });
+ },
physics: BouncingScrollPhysics(),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- height: 248,
- color: Color(0xFFFFFFFF),
- // color: Colors.red,
- child: Stack(
- // alignment: Alignment.bottomLeft,
- children: [
- Positioned(
- top: 0,
- left: 0,
- bottom: 36,
- right: 0,
- child: Stack(
- alignment: Alignment.bottomRight,
- children: [
- Container(
- color: Colors.black,
- child: Opacity(
- opacity: 0.9,
- child: MImage(
- memberInfor?.background ?? "",
- width: double.infinity,
- height: 260.h,
- fit: BoxFit.cover,
- errorSrc: "assets/image/default_1.webp",
- fadeSrc: "assets/image/default_1.webp",
- ))),
- Container(
- margin: EdgeInsets.only(
- top: 50.h, left: 16.w, right: 16.w),
- alignment: Alignment.topLeft,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- GestureDetector(
- child: Image.asset(
- "assets/image/integral_return.webp",
- width: 24,
- height: 24,
- ),
- onTap: () {
- Navigator.of(context).pop();
- },
+ scrollController: scrollController,
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ height: 248.h,
+ color: Color(0xFFFFFFFF),
+ // color: Colors.red,
+ child: Stack(
+ // alignment: Alignment.bottomLeft,
+ children: [
+ Positioned(
+ top: 0,
+ left: 0,
+ bottom: 36.h,
+ right: 0,
+ child: Stack(
+ alignment: Alignment.bottomRight,
+ children: [
+ Container(
+ color: Colors.black,
+ child: Opacity(
+ opacity: 0.9,
+ child: MImage(
+ memberInfor?.background ?? "",
+ width: double.infinity,
+ height: 260.h,
+ fit: BoxFit.cover,
+ errorSrc: "assets/image/default_1.webp",
+ fadeSrc: "assets/image/default_1.webp",
+ ))),
+ Container(
+ margin: EdgeInsets.only(
+ top: 50.h, left: 16.w, right: 16.w),
+ alignment: Alignment.topLeft,
+ decoration: BoxDecoration(
+ color: Colors.transparent,
),
- ],
- ),
- ),
- if (memberId == "0")
- Positioned(
- bottom: 9,
- right: 16.w,
- child: GestureDetector(
- onTap: () {
- showImagePicker();
- },
- child: Container(
- padding: EdgeInsets.only(left: 2, right: 2),
- width: 59.w,
- height: 23.h,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(2),
- color: Color(0x80000000),
- ),
- child: Text(
- S.of(context).genghuanbeijing,
- overflow: TextOverflow.ellipsis,
- style: TextStyle(
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- color: Color(0xFFFFFFFF),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ GestureDetector(
+ child: Image.asset(
+ "assets/image/integral_return.webp",
+ width: 24,
+ height: 24,
+ ),
+ onTap: () {
+ Navigator.of(context).pop();
+ },
),
- ),
+ ],
),
),
- ),
- ],
- ),
- ),
- homeInfo(),
- ],
- ),
- ),
- Container(
- color: Color(0xFFFFFFFF),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- margin: EdgeInsets.only(left: 86, top: 12, right: 16),
- child: GestureDetector(
- onTap: () {
- setState(() {
- isShrink = !isShrink;
- });
- },
- child: Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- Expanded(
- flex: 1,
- child: Text(
- memberId == "0"
- ? ((memberInfor?.signature == "")
- ? "还未编辑个性签名~"
- : memberInfor?.signature ?? "")
- : "个性签名: ${(memberInfor?.signature == "") ? "还未编辑个性签名~" : memberInfor?.signature ?? ""}",
- overflow: isShrink
- ? TextOverflow.visible
- : TextOverflow.ellipsis,
- maxLines: isShrink ? 10 : 2,
- style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFF868686),
- fontWeight: MyFontWeight.regular,
- height: 1.5),
- )),
- Icon(
- (isShrink != null && !isShrink)
- ? Icons.chevron_right
- : Icons.keyboard_arrow_up,
- color: Colors.black,
- size: 18,
- ),
- ],
- ),
- )),
- Container(
- margin: EdgeInsets.only(left: 16, right: 16),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(
- child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {},
- child: Container(
- color: Colors.transparent,
- padding: EdgeInsets.all(16),
- child: Column(
- children: [
- Text(
- memberInfor != null
- ? memberInfor.follow.toString()
- : "0",
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 16.sp,
- fontWeight: MyFontWeight.semi_bold,
- ),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- S.of(context).guanzhu,
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- ),
- ),
- ],
- )),
- ),
- ),
- Expanded(
- child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {},
- child: Container(
- color: Colors.transparent,
- padding: EdgeInsets.all(16),
- child: Column(
- children: [
- Text(
- memberInfor != null
- ? memberInfor.fans.toString()
- : "0",
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 16.sp,
- fontWeight: MyFontWeight.semi_bold,
- ),
+ if (memberId == "0")
+ Positioned(
+ bottom: 9.h,
+ right: 16.w,
+ child: GestureDetector(
+ onTap: () {
+ showImagePicker();
+ },
+ child: Container(
+ padding: EdgeInsets.only(left: 2, right: 2),
+ width: 59.w,
+ height: 23.h,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(2),
+ color: Color(0x80000000),
),
- SizedBox(
- height: 4,
- ),
- Text(
- S.of(context).fensi,
+ child: Text(
+ S.of(context).genghuanbeijing,
+ overflow: TextOverflow.ellipsis,
style: TextStyle(
- color: Color(0xFF353535),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
+ color: Color(0xFFFFFFFF),
),
),
- ],
- )),
- ),
- ),
- Expanded(
- child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {},
- child: Container(
- color: Colors.transparent,
- padding: EdgeInsets.all(16),
- child: Column(
- children: [
- Text(
- (memberInfor?.trendTotal ?? 0)
- .toString(),
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 16.sp,
- fontWeight: MyFontWeight.semi_bold,
- ),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- S.of(context).dongtai,
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- ),
- ),
- ],
- )),
- ),
+ ),
+ ),
+ ),
+ ],
),
- Expanded(
+ ),
+ homeInfo(),
+ ],
+ ),
+ ),
+ Container(
+ color: Color(0xFFFFFFFF),
+ margin: EdgeInsets.only(bottom: 30.h),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ margin:
+ EdgeInsets.only(left: 86.w, top: 12.h, right: 16.w),
child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {},
- child: Container(
- color: Colors.transparent,
- padding: EdgeInsets.all(16),
- child: Column(
- children: [
- Text(
- (memberInfor?.gainLikeTotal ?? 0)
- .toString(),
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 16.sp,
- fontWeight: MyFontWeight.semi_bold,
- ),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- "获赞",
+ onTap: () {
+ setState(() {
+ isShrink = !isShrink;
+ });
+ },
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Expanded(
+ flex: 1,
+ child: Text(
+ memberId == "0"
+ ? ((memberInfor?.signature == "")
+ ? "还未编辑个性签名~"
+ : memberInfor?.signature ?? "")
+ : "个性签名: ${(memberInfor?.signature == "") ? "还未编辑个性签名~" : memberInfor?.signature ?? ""}",
+ overflow: isShrink
+ ? TextOverflow.visible
+ : TextOverflow.ellipsis,
+ maxLines: isShrink ? 10 : 2,
style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 12.sp,
- fontWeight: MyFontWeight.regular,
- ),
- ),
- ],
- )),
- ),
+ fontSize: 12.sp,
+ color: Color(0xFF868686),
+ fontWeight: MyFontWeight.regular,
+ height: 1.5.h),
+ )),
+ Icon(
+ (isShrink != null && !isShrink)
+ ? Icons.chevron_right
+ : Icons.keyboard_arrow_up,
+ color: Colors.black,
+ size: 18,
+ ),
+ ],
+ ),
+ )),
+ Container(
+ margin: EdgeInsets.only(left: 16.w, right: 16.w),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {},
+ child: Container(
+ color: Colors.transparent,
+ padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ Text(
+ memberInfor != null
+ ? memberInfor.follow.toString()
+ : "0",
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ ),
+ ),
+ SizedBox(
+ height: 4.h,
+ ),
+ Text(
+ S.of(context).guanzhu,
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ ),
+ ),
+ ],
+ )),
+ ),
+ ),
+ Expanded(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {},
+ child: Container(
+ color: Colors.transparent,
+ padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ Text(
+ memberInfor != null
+ ? memberInfor.fans.toString()
+ : "0",
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ ),
+ ),
+ SizedBox(
+ height: 4.h,
+ ),
+ Text(
+ S.of(context).fensi,
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ ),
+ ),
+ ],
+ )),
+ ),
+ ),
+ Expanded(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {},
+ child: Container(
+ color: Colors.transparent,
+ padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ Text(
+ (memberInfor?.trendTotal ?? 0)
+ .toString(),
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ ),
+ ),
+ SizedBox(
+ height: 4.h,
+ ),
+ Text(
+ S.of(context).dongtai,
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ ),
+ ),
+ ],
+ )),
+ ),
+ ),
+ Expanded(
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {},
+ child: Container(
+ color: Colors.transparent,
+ padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ Text(
+ (memberInfor?.gainLikeTotal ?? 0)
+ .toString(),
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 16.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ ),
+ ),
+ SizedBox(
+ height: 4.h,
+ ),
+ Text(
+ S.of(context).huozan,
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 12.sp,
+ fontWeight: MyFontWeight.regular,
+ ),
+ ),
+ ],
+ )),
+ ),
+ ),
+ ],
),
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.all(16),
- height: 1.h,
- color: Color(0xFFF7F7F7),
+ ),
+ Container(
+ margin: EdgeInsets.all(16),
+ height: 1.h,
+ color: Color(0xFFF7F7F7),
+ ),
+ Padding(
+ padding: EdgeInsets.only(left: 16.w),
+ child: Text(
+ memberId != "0" ? "TA的动态" : "我的动态",
+ style: TextStyle(
+ color: Color(0xFF353535),
+ fontSize: 15.sp,
+ fontWeight: MyFontWeight.semi_bold,
+ ),
+ )),
+ dynamicList(),
+ ],
),
- Padding(
- padding: EdgeInsets.only(left: 16),
- child: Text(
- memberId != "0" ? "TA的动态" : "我的动态",
- style: TextStyle(
- color: Color(0xFF353535),
- fontSize: 15.sp,
- fontWeight: MyFontWeight.semi_bold,
- ),
- )),
- dynamicList()
- ],
- ),
- ),
- ],
- )),
+ ),
+ ],
+ )),
+ )
);
}
@@ -657,8 +658,8 @@ class _PersonalPage extends State with WidgetsBindingObserver {
right: 0,
child: Container(
padding: EdgeInsets.only(
- left: 16,
- right: 16,
+ left: 16.w,
+ right: 16.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@@ -672,7 +673,7 @@ class _PersonalPage extends State with WidgetsBindingObserver {
builder: (context) => PhotoViewGalleryScreen(
images: [
(memberInfor?.headimg ?? "").isEmpty
- ? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"
+ ? "https://i.postimg.cc/Pq6vjfnw/default-1.webp"
: memberInfor?.headimg
], //传入图片list
index: 0, //传入当前点击的图片的index
@@ -691,7 +692,9 @@ class _PersonalPage extends State with WidgetsBindingObserver {
),
SizedBox(width: 10.w),
Text(
- memberInfor?.nickname ?? "",
+ ((memberInfor?.nickname ?? "") == "")
+ ? "回乡"
+ : memberInfor?.nickname,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 16.sp,
@@ -714,14 +717,14 @@ class _PersonalPage extends State with WidgetsBindingObserver {
});
},
child: Container(
- height: 23,
- padding:
- EdgeInsets.only(left: 6, right: 6, bottom: 2, top: 2),
+ height: 23.h,
+ padding: EdgeInsets.only(
+ left: 6.w, right: 6.w, bottom: 2.h, top: 2.h),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(
- width: 1,
+ width: 1.w,
color: Color(0xFF353535),
style: BorderStyle.solid,
),
@@ -749,7 +752,7 @@ class _PersonalPage extends State with WidgetsBindingObserver {
isShowBtn: false,
text: "目前暂无发布动态,要把开心的事讲出来哦~",
fontSize: 16.sp,
- margin: EdgeInsets.only(left: 60.w, right: 60.w),
+ margin: EdgeInsets.only(left: 60.w, right: 60.w, bottom:80.h),
)
: ListView.builder(
physics: NeverScrollableScrollPhysics(),
@@ -760,9 +763,9 @@ class _PersonalPage extends State with WidgetsBindingObserver {
articles[position],
memberId == "0" ? 1 : 0,
exitFull: () {
- // setState(() {
- // _onRefresh();
- // });
+ setState(() {
+ _onRefresh();
+ });
},
removalDynamic: () {
setState(() {
diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart
index 1889cb9e..50219753 100644
--- a/lib/mine/recharge_page.dart
+++ b/lib/mine/recharge_page.dart
@@ -296,6 +296,7 @@ class _RechargePage extends State {
),
),
GestureDetector(
+ behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 2;
@@ -328,6 +329,7 @@ class _RechargePage extends State {
),
SizedBox(height:10.h),
GestureDetector(
+ behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 3;
@@ -632,7 +634,7 @@ class _RechargePage extends State {
Widget checkView(var index) {
return Container(
- padding: EdgeInsets.only(right: 16.w),
+ padding: EdgeInsets.only(right: 16.w,left: 46.w),
alignment: Alignment.center,
child: Image.asset(
checkIndex != index
diff --git a/lib/mine/scan_web.dart b/lib/mine/scan_web.dart
new file mode 100644
index 00000000..b738be34
--- /dev/null
+++ b/lib/mine/scan_web.dart
@@ -0,0 +1,58 @@
+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/view_widget/my_appbar.dart';
+import 'package:webview_flutter/webview_flutter.dart';
+
+class ScanWeb extends StatefulWidget {
+ final Map arguments;
+
+ ScanWeb({this.arguments});
+ @override
+ State createState() {
+ return _ScanWeb();
+ }
+}
+
+class _ScanWeb extends State {
+ var controller = new ScrollController();
+ WebViewController webViewController;
+ String result;
+ String title;
+
+ @override
+ void initState() {
+ super.initState();
+ result = widget.arguments["result"];
+ title = widget.arguments["title"];
+ EasyLoading.show(status: S.current.zhengzaijiazai);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: MyAppBar(
+ title:title ?? "",
+ titleColor: Colors.black,
+ background: Colors.transparent,
+ leadingColor: Colors.black,
+ ),
+ body:
+ WebView(
+ initialUrl:result,
+ javascriptMode: JavascriptMode.unrestricted,
+ onWebViewCreated: (WebViewController controller){
+ webViewController =controller;
+ },
+ onProgress: (int progress) async {
+ if(widget.arguments["title"] != null)
+ return;
+ title = await webViewController?.getTitle();
+ setState((){});
+ EasyLoading.dismiss();
+ },
+ ),
+ );
+ }
+}
diff --git a/lib/mine/user_info_page.dart b/lib/mine/user_info_page.dart
index da182e8b..096cff0a 100644
--- a/lib/mine/user_info_page.dart
+++ b/lib/mine/user_info_page.dart
@@ -35,7 +35,7 @@ class _UserInfoPage extends State {
"headimg": "",
"nickname": "",
"sex": "",
- "signature":""
+ "signature": ""
};
@override
@@ -52,7 +52,8 @@ class _UserInfoPage extends State {
modifyInfo["sex"] = user.sex,
age = AppUtils.getAgeByString(user.birth),
refresh(),
- apiService = ApiService(Dio(), context: context, token: value.getString('token')),
+ apiService = ApiService(Dio(),
+ context: context, token: value.getString('token')),
});
}
@@ -89,7 +90,7 @@ class _UserInfoPage extends State {
Widget userInfo() {
return Container(
- margin: EdgeInsets.only(left:14.w,right: 14.w),
+ margin: EdgeInsets.only(left: 14.w, right: 14.w),
child: Column(
children: [
InkWell(
@@ -97,7 +98,8 @@ class _UserInfoPage extends State {
showImagePicker();
},
child: avatarItem(0, ""),
- ),Container(
+ ),
+ Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
width: double.infinity,
height: 1,
@@ -120,8 +122,11 @@ class _UserInfoPage extends State {
onTap: () {
editSignature();
},
- child:avatarItem(2,
- (modifyInfo["signature"]) == "" ? "还未编辑个性签名~" : modifyInfo["signature"]),
+ child: avatarItem(
+ 2,
+ (modifyInfo["signature"]) == ""
+ ? "还未编辑个性签名~"
+ : modifyInfo["signature"]),
),
Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
@@ -130,7 +135,7 @@ class _UserInfoPage extends State {
color: Color(0xFFF2F2F2),
),
InkWell(
- onTap:(modifyInfo["birth"] == "")?showDateSelector:(){},
+ onTap: (modifyInfo["birth"] == "") ? showDateSelector : () {},
child: avatarItem(
3,
(modifyInfo["birth"] != null && modifyInfo["birth"] != "")
@@ -171,7 +176,8 @@ class _UserInfoPage extends State {
}
editSignature() async {
- dynamic signature = await Navigator.of(context).pushNamed('/router/edit_signature',
+ dynamic signature = await Navigator.of(context).pushNamed(
+ '/router/edit_signature',
arguments: {"signature": modifyInfo['signature']});
if (signature != null && signature != "") {
modifyInfo["signature"] = signature;
@@ -196,7 +202,7 @@ class _UserInfoPage extends State {
builder: (_) {
return CupertinoDatePickerWidget();
});
- if (dateTime != null ) {
+ if (dateTime != null) {
modifyInfo["birth"] = DateFormat("yyyy-MM-dd").format(dateTime);
user.birth = modifyInfo["birth"];
age = AppUtils.getAge(dateTime);
@@ -295,38 +301,38 @@ class _UserInfoPage extends State {
}
// Future cropImage(imagePath) async {
- // File croppedFile = await ImageCropper.cropImage(
- // sourcePath: imagePath,
- // aspectRatioPresets: [
- // CropAspectRatioPreset.square,
- // // CropAspectRatioPreset.ratio3x2,
- // // CropAspectRatioPreset.original,
- // // CropAspectRatioPreset.ratio4x3,
- // // CropAspectRatioPreset.ratio16x9
- // ],
- // aspectRatio: CropAspectRatio(ratioX: 1, ratioY: 1),
- // androidUiSettings: AndroidUiSettings(
- // toolbarTitle: 'Cropper',
- // toolbarColor: Colors.black,
- // toolbarWidgetColor: Colors.white,
- // initAspectRatio: CropAspectRatioPreset.square,
- // hideBottomControls: true,
- // lockAspectRatio: false),
- // iosUiSettings: IOSUiSettings(
- // minimumAspectRatio: 1.0,
- // resetAspectRatioEnabled: false,
- // aspectRatioPickerButtonHidden: true,
- // rectWidth: 500.w,
- // rectHeight: 500.h,
- // ));
- // return croppedFile;
+ // File croppedFile = await ImageCropper.cropImage(
+ // sourcePath: imagePath,
+ // aspectRatioPresets: [
+ // CropAspectRatioPreset.square,
+ // // CropAspectRatioPreset.ratio3x2,
+ // // CropAspectRatioPreset.original,
+ // // CropAspectRatioPreset.ratio4x3,
+ // // CropAspectRatioPreset.ratio16x9
+ // ],
+ // aspectRatio: CropAspectRatio(ratioX: 1, ratioY: 1),
+ // androidUiSettings: AndroidUiSettings(
+ // toolbarTitle: 'Cropper',
+ // toolbarColor: Colors.black,
+ // toolbarWidgetColor: Colors.white,
+ // initAspectRatio: CropAspectRatioPreset.square,
+ // hideBottomControls: true,
+ // lockAspectRatio: false),
+ // iosUiSettings: IOSUiSettings(
+ // minimumAspectRatio: 1.0,
+ // resetAspectRatioEnabled: false,
+ // aspectRatioPickerButtonHidden: true,
+ // rectWidth: 500.w,
+ // rectHeight: 500.h,
+ // ));
+ // return croppedFile;
// }
///调用修改用户信息接口
modifyInfos() async {
var info = await apiService.editInfo(modifyInfo).catchError((onError) {});
if (info.isSuccess) {
- SharedPreferences.getInstance().then((value){
+ SharedPreferences.getInstance().then((value) {
value.setString('user', jsonEncode(modifyInfo));
});
setState(() {
@@ -338,7 +344,9 @@ class _UserInfoPage extends State {
///文件上传
fileUpload() async {
if (filePath != null && filePath != "" && await File(filePath).exists()) {
- BaseData baseData = await apiService.upload(File(filePath), 123123123,false).catchError((onError) {});
+ BaseData baseData = await apiService
+ .upload(File(filePath), 123123123, false)
+ .catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
UploadResult uploadResult = baseData.data;
modifyInfo["headimg"] = uploadResult.url;
@@ -347,8 +355,6 @@ class _UserInfoPage extends State {
}
}
-
-
Widget avatarItem(type, value) {
print("object: $value");
return Container(
@@ -366,7 +372,10 @@ class _UserInfoPage extends State {
flex: 1,
),
buildValue(type, value),
- if (type != 5 && type != 4 && type != 3 && (((modifyInfo["birth"] == "")) || type != 3))
+ if (type != 5 &&
+ type != 4 &&
+ type != 3 &&
+ (((modifyInfo["birth"] == "")) || type != 3))
valueEnd(),
],
),
@@ -375,11 +384,10 @@ class _UserInfoPage extends State {
Widget valueEnd() {
return Container(
- child: Icon(
- Icons.keyboard_arrow_right,
- size: 20.sp,
- )
- );
+ child: Icon(
+ Icons.keyboard_arrow_right,
+ size: 20.sp,
+ ));
}
Widget buildValue(type, value) {
@@ -411,7 +419,7 @@ class _UserInfoPage extends State {
return Text(
value,
maxLines: 1,
- overflow:TextOverflow.ellipsis,
+ overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 13.sp,
@@ -419,10 +427,11 @@ class _UserInfoPage extends State {
),
);
} else {
- return Expanded(child: Text(
+ return Expanded(
+ child: Text(
value,
maxLines: 1,
- overflow:TextOverflow.ellipsis,
+ overflow: TextOverflow.ellipsis,
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: MyFontWeight.regular,
diff --git a/lib/mine/vip_pay_code.dart b/lib/mine/vip_pay_code.dart
new file mode 100644
index 00000000..60305ceb
--- /dev/null
+++ b/lib/mine/vip_pay_code.dart
@@ -0,0 +1,192 @@
+import 'dart:async';
+import 'dart:convert';
+
+import 'package:barcode_widget/barcode_widget.dart';
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bmflocation/flutter_bmflocation.dart';
+import 'package:flutter_easyloading/flutter_easyloading.dart';
+import 'package:huixiang/generated/l10n.dart';
+import 'package:huixiang/retrofit/data/base_data.dart';
+import 'package:huixiang/retrofit/data/product.dart';
+import 'package:huixiang/retrofit/data/vip_card.dart';
+import 'package:huixiang/retrofit/retrofit_api.dart';
+import 'package:huixiang/store/scan.dart';
+import 'package:huixiang/utils/font_weight.dart';
+import 'package:huixiang/utils/location.dart';
+import 'package:huixiang/utils/painter_bg.dart';
+import 'package:huixiang/view_widget/custom_image.dart';
+import 'package:huixiang/view_widget/my_appbar.dart';
+import 'package:huixiang/view_widget/my_footer.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:pull_to_refresh/pull_to_refresh.dart';
+import 'package:qr_flutter/qr_flutter.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+import '../retrofit/data/user_info.dart';
+import '../view_widget/classic_header.dart';
+
+class VipPayCode extends StatefulWidget {
+ @override
+ State createState() {
+ return _VipPayCode();
+ }
+}
+
+class _VipPayCode extends State {
+ ApiService apiService;
+
+ @override
+ void dispose() {
+ super.dispose();
+ refreshController.dispose();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ queryUser();
+ }
+
+ UserInfo userInfo;
+ final RefreshController refreshController = RefreshController();
+ bool vipCodeText = false;
+ Timer _timer;
+ bool isDispose = false;
+
+ ///查询用户信息
+ queryUser() async {
+ try{
+ SharedPreferences value = await SharedPreferences.getInstance();
+ if (apiService == null)
+ apiService = ApiService(
+ Dio(),
+ context: context,
+ token: value.getString("token"),
+ );
+ BaseData baseData =
+ await apiService.queryInfo().catchError((onError) {
+ refreshController.refreshFailed();});
+ if (baseData != null && baseData.isSuccess) {
+ userInfo = baseData.data;
+ SharedPreferences.getInstance().then((value) => {
+ value.setString('user', jsonEncode(baseData.data)),
+ });
+ setState(() {});
+ refreshController.refreshCompleted();
+ }else{
+ refreshController.refreshFailed();
+ }
+ }finally{
+ refreshCode();
+ }
+ }
+
+ refreshCode(){
+ if (_timer != null) return;
+ const oneSec = const Duration(minutes: 2);
+ var callback = ((timer) {
+ if (isDispose) return;
+ queryUser();
+ });
+ _timer = Timer.periodic(oneSec, callback);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: MyAppBar(
+ title: "会员码",
+ background: Color(0xFF32A060),
+ titleColor: Colors.white,
+ brightness: Brightness.dark,
+ leadingColor: Colors.white,
+ ),
+ body: Container(
+ color: Color(0xFF32A060),
+ height: double.infinity,
+ padding: EdgeInsets.only(top: 45.h),
+ child: Stack(
+ alignment: Alignment.topCenter,
+ children: [
+ Container(
+ color: Color(0xFF32A060),
+ // height: 485.h,
+ padding: EdgeInsets.only(top: 47.h),
+ child: Container(
+ height: 438.h,
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withAlpha(12),
+ offset: Offset(0, 2),
+ blurRadius: 14,
+ spreadRadius: 0,
+ ),
+ ],
+ borderRadius: BorderRadius.circular(6),
+ ),
+ margin: EdgeInsets.symmetric(horizontal: 16.w,),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(height: 46.h,),
+ Text(
+ "请保持屏幕常亮,并对准扫码盒或枪口",
+ style: TextStyle(
+ fontWeight: MyFontWeight.regular,
+ fontSize: 12.sp,
+ color: Color(0xFF4D4D4D),
+ ),
+ ),
+ SizedBox(height: 30.h,),
+ QrImage(
+ data: userInfo != null
+ ? (userInfo?.vipScanNo ?? "")
+ : "",
+ version: QrVersions.auto,
+ size: 200.w,
+ gapless: true,
+ ),
+ ],
+ ),
+ ),
+ ),
+ Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(56),
+ color: Color(0xFF32A060),
+ border: Border.all(
+ color: Color(0xFF32A060),
+ width: 8.w,
+ ),
+ ),
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(56),
+ color: Colors.white,
+ border: Border.all(
+ color: Colors.white,
+ width: 2.w,
+ ),
+ ),
+ child: MImage(
+ userInfo?.headimg ?? "",
+ width: 80,
+ height: 80,
+ radius: BorderRadius.circular(56),
+ fit: BoxFit.cover,
+ errorSrc: "assets/image/default_1.webp",
+ fadeSrc: "assets/image/default_1.webp",
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/order/edit_remarks_page.dart b/lib/order/edit_remarks_page.dart
index f30a4f72..638e2dba 100644
--- a/lib/order/edit_remarks_page.dart
+++ b/lib/order/edit_remarks_page.dart
@@ -5,6 +5,9 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class EditRemarksPage extends StatefulWidget {
+ final Map arguments;
+
+ EditRemarksPage({this.arguments});
@override
State createState() {
return _EditRemarksPage();
@@ -14,6 +17,14 @@ class EditRemarksPage extends StatefulWidget {
class _EditRemarksPage extends State {
TextEditingController commentTextController = TextEditingController();
+
+ @override
+ void initState() {
+ super.initState();
+ if((widget.arguments["remake"]??"") != "")
+ commentTextController.text = widget.arguments["remake"];
+ }
+
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -75,7 +86,8 @@ class _EditRemarksPage extends State {
controller: commentTextController,
keyboardType: TextInputType.multiline,
maxLines: 10,
- decoration: InputDecoration(
+ decoration:
+ InputDecoration(
isDense: true,
hintText: '请填写备注信息,例如:面包切一刀',
hintStyle: TextStyle(
@@ -97,7 +109,8 @@ class _EditRemarksPage extends State {
),
GestureDetector(
onTap: (){
- Navigator.pop(context,commentTextController.text);
+ String notes = commentTextController.text;
+ Navigator.pop(context,notes);
},
child: Container(
padding: EdgeInsets.all(16.h),
diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart
index d65341fa..2d348dba 100644
--- a/lib/order/exchange_order_page.dart
+++ b/lib/order/exchange_order_page.dart
@@ -878,7 +878,7 @@ class _ExchangeOrderPage extends State {
width: 10,
),
Text(
- S.of(context).pingtaiyue,
+ S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart
index 260099c0..db277842 100644
--- a/lib/order/order_detail_page.dart
+++ b/lib/order/order_detail_page.dart
@@ -34,11 +34,11 @@ class OrderDetailPage extends StatefulWidget {
class _OrderDetailPage extends State {
ApiService apiService;
MinApiService minService;
+ int jumpState;
@override
void initState() {
super.initState();
-
SharedPreferences.getInstance().then((value) {
apiService = ApiService(
Dio(),
@@ -48,6 +48,7 @@ class _OrderDetailPage extends State {
);
queryDetails();
});
+ jumpState = widget.arguments["jumpState"];
}
/// 小程序登录
@@ -183,6 +184,7 @@ class _OrderDetailPage extends State {
paySelected,
_orderCancel,
orderInfo,
+ jumpState
),
///订单商品
@@ -225,7 +227,7 @@ class _OrderDetailPage extends State {
payResult(BaseData baseData) async{
await queryDetails();
- Future.delayed(Duration(milliseconds: 400), () {
+ Future.delayed(Duration(milliseconds: 800), () {
EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
});
diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart
index eb5ddd9e..84d4ac59 100644
--- a/lib/order/order_history_page.dart
+++ b/lib/order/order_history_page.dart
@@ -70,42 +70,42 @@ class _OrderHistoryPage extends State
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(
@@ -155,7 +155,7 @@ class _OrderHistoryList extends State
return InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/order_details',
- arguments: {"id": orderInfos[position].id});
+ arguments: {"id": orderInfos[position].id,"jumpState":2});
},
child: orderItem(orderInfos[position]),
);
@@ -212,6 +212,7 @@ class _OrderHistoryList extends State
}
setState(() {});
} else {
+ SmartDialog.showToast(baseData?.msg ?? "",alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
@@ -230,9 +231,9 @@ class _OrderHistoryList extends State
});
}
- 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
// ),
// ),
Container(
- margin: EdgeInsets.only(left: 5.w, top: 12.h),
+ margin: EdgeInsets.only(left: 5.w, top: 12.h),
),
Expanded(
child: Container(
@@ -468,6 +469,7 @@ class _OrderHistoryList extends State
text: orderInfo.finalPayPrice,
style: TextStyle(
fontSize: 12.sp,
+
fontWeight: FontWeight.bold,
color: Colors.black,
),
@@ -568,16 +570,11 @@ class _OrderHistoryList extends State
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 baseData = await apiService
- .orderDetail(id)
- .catchError((error) {});
+ BaseData baseData =
+ await apiService.orderDetail(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
return baseData.data;
}
@@ -598,7 +595,9 @@ class _OrderHistoryList extends State
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();
});
diff --git a/lib/order/order_view/order_address.dart b/lib/order/order_view/order_address.dart
index 7ff137ff..30303357 100644
--- a/lib/order/order_view/order_address.dart
+++ b/lib/order/order_view/order_address.dart
@@ -22,6 +22,7 @@ class OrderAddress extends StatefulWidget {
final Function orderCancel;
final Function() carryOnPay;
final OrderInfo orderInfo;
+ final int jumpState;
OrderAddress(
this.orderStatus,
@@ -33,7 +34,8 @@ class OrderAddress extends StatefulWidget {
this.center,
this.carryOnPay,
this.orderCancel,
- this.orderInfo,);
+ this.orderInfo,
+ this.jumpState);
@override
State createState() {
@@ -271,14 +273,18 @@ class _OrderAddress extends State {
widget.orderInfo.storeVO.storeName,
);
} else {
- Navigator.of(context).pushNamed(
- '/router/store_order',
- arguments: {
- "id": widget.orderInfo.storeVO.id,
- "tenant": widget.orderInfo.tenantCode,
- "storeName": widget.orderInfo.storeVO.storeName
- },
- );
+ if(widget.jumpState == 1){
+ Navigator.of(context).pop();
+ }else if(widget.jumpState == 2){
+ Navigator.of(context).popAndPushNamed(
+ '/router/store_order',
+ arguments: {
+ "id": widget.orderInfo.storeVO.id,
+ "tenant": widget.orderInfo.tenantCode,
+ "storeName": widget.orderInfo.storeVO.storeName
+ },
+ );
+ }
}
}
diff --git a/lib/order/order_view/order_pay_selected.dart b/lib/order/order_view/order_pay_selected.dart
index b265c09d..c3ea3250 100644
--- a/lib/order/order_view/order_pay_selected.dart
+++ b/lib/order/order_view/order_pay_selected.dart
@@ -70,7 +70,7 @@ class _OrderPaySelected extends State {
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 {
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 {
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 {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
- "绿币余额",
+ S.of(context).lvbizhifu,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
diff --git a/lib/order/write_off_page.dart b/lib/order/write_off_page.dart
index 26ec1c5e..9eba17ea 100644
--- a/lib/order/write_off_page.dart
+++ b/lib/order/write_off_page.dart
@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:barcode_widget/barcode_widget.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@@ -13,9 +14,13 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';
+import '../view_widget/classic_header.dart';
+import '../view_widget/my_footer.dart';
+
class WriteOffPage extends StatefulWidget {
final arguments;
@@ -31,6 +36,7 @@ class _WriteOffPage extends State {
dynamic coupon;
ApiService apiService;
CouponDetail queryCoupon;
+ final RefreshController refreshController = RefreshController();
@override
void initState() {
@@ -79,248 +85,495 @@ class _WriteOffPage extends State {
background: Color(0xFF32A060),
leadingColor: Colors.white,
),
- body: Container(
- alignment: Alignment.topCenter,
- child: Stack(
- alignment: Alignment.topCenter,
- children: [
- Image.asset(
- "assets/image/icon_write_off_bg.webp",
- width: MediaQuery.of(context).size.width * 0.912,
- fit: BoxFit.fill,
- ),
- LayoutBuilder(builder: (context, constraints) {
- return Container(
- width: constraints.constrainWidth() * 0.912,
- child: Column(
- children: [
- Expanded(
- child: Container(
- child: Column(
- children: [
- Text(
- coupon != null ? coupon["couponName"] : "",
- style: TextStyle(
- fontSize: 16.sp,
- fontWeight: FontWeight.bold,
- color: Color(0xFF353535)),
- ),
- SizedBox(
- height: 8.h,
- ),
- Text(
- (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
- "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
- style: TextStyle(
- fontSize: 12.sp,
- color: Color(0xFF353535),
- ),
- ),
- ],
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- ),
- alignment: Alignment.center,
- ),
- flex: 6,
- ),
- Container(
- margin: EdgeInsets.only(left: 20.w, right: 20.w),
- child: MySeparator(
- width: 5.w,
- height: 1.h,
- color: Color(0xFFA29E9E),
+ body: SmartRefresher(
+ controller: refreshController,
+ enablePullDown: false,
+ enablePullUp: false,
+ header: MyHeader(),
+ footer: CustomFooter(
+ builder: (context, mode) {
+ return MyFooter(mode);
+ },
+ ),
+ physics: BouncingScrollPhysics(),
+ scrollController: ScrollController(),
+ child: Container(
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ Container(
+ alignment: Alignment.topCenter,
+ height: 530.h,
+ child: Stack(
+ alignment: Alignment.topCenter,
+ children: [
+ Image.asset(
+ "assets/image/write_off_bg.webp",
+ width: MediaQuery.of(context).size.width * 0.912,
+ height: 540.h,
+ fit: BoxFit.fill,
),
- ),
- Expanded(
- child: Container(
- alignment: Alignment.center,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Text(
- coupon != null
- ? "${coupon["memberCouponId"].substring(0, 4)} "
- "${coupon["memberCouponId"].substring(4, 8)} "
- "${coupon["memberCouponId"].substring(8, 12)} "
- "${coupon["memberCouponId"].substring(12, 16)} "
- "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
- : "",
- style: TextStyle(
- fontSize: 14.sp,
- wordSpacing: coupon == null
- ? 10
- : (MediaQuery.of(context).size.width -
- 64.w) /
- (((coupon["memberCouponId"].length) * 4)),
- letterSpacing: coupon == null
- ? 8
- : (MediaQuery.of(context).size.width -
- 64.w) /
- (((coupon["memberCouponId"].length) * 4)),
- fontWeight: MyFontWeight.semi_bold,
- color: Color(0xFF353535),
+ LayoutBuilder(builder: (context, constraints) {
+ return Container(
+ alignment: Alignment.center,
+ width: constraints.constrainWidth() * 0.912,
+ padding:EdgeInsets.only(top: 24.h),
+ child: Column(
+ children: [
+ Container(
+ child: Column(
+ children: [
+ Text(
+ coupon != null ? coupon["couponName"] : "",
+ style: TextStyle(
+ fontSize: 16.sp,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF353535)),
+ ),
+ SizedBox(
+ height:11.h,
+ ),
+ Text(
+ (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
+ "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
+ style: TextStyle(
+ fontSize: 12.sp,
+ color: Color(0xFF353535),
+ ),
+ ),
+ ],
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ ),
+ alignment: Alignment.center,
),
- ),
- SizedBox(
- height: 12.h,
- ),
- BarcodeWidget(
- barcode: Barcode.code128(useCode128C: true),
- data: coupon != null ? coupon["memberCouponId"] : "",
- height: 72.h,
- color: Colors.black,
- drawText: false,
- ),
- SizedBox(
- height: 16.h,
- ),
- Expanded(child: QrImage(
- data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
- version: QrVersions.auto,
- size: 200.w,
- gapless: true,
- ),),
- SizedBox(
- height: 35.h,
- ),
- ],
- ),
- margin: EdgeInsets.symmetric(horizontal: 20.w),
- ),
- flex: 27,
- ),
- Container(
- child: MySeparator(
- width: 5.w,
- height: 1.h,
- color: Color(0xFFA29E9E),
- ),
- margin: EdgeInsets.only(left: 20.w, right: 20.w),
- ),
- Expanded(
- child: Container(
- padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- width: 3.w,
- height: 15.h,
- margin:
- EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(3),
- color: Color(0xFF20662A),
- ),
+ Container(
+ margin: EdgeInsets.only(left: 20.w, right: 20.w,top:16.h,bottom:30.h),
+ child: MySeparator(
+ width: 5.w,
+ height: 1.h,
+ color: Color(0xFFA29E9E),
),
- Text(
- S.of(context).shiyongtiaojian,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 14.sp,
- color: Color(0xFF353535),
+ ),
+ Expanded(
+ child: Container(
+ alignment: Alignment.center,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Text(
+ coupon != null
+ ? "${coupon["memberCouponId"].substring(0, 4)} "
+ "${coupon["memberCouponId"].substring(4, 8)} "
+ "${coupon["memberCouponId"].substring(8, 12)} "
+ "${coupon["memberCouponId"].substring(12, 16)} "
+ "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
+ : "",
+ style: TextStyle(
+ fontSize: 14.sp,
+ wordSpacing: coupon == null
+ ? 10
+ : (MediaQuery.of(context).size.width -
+ 64.w) /
+ (((coupon["memberCouponId"].length) * 4)),
+ letterSpacing: coupon == null
+ ? 8
+ : (MediaQuery.of(context).size.width -
+ 64.w) /
+ (((coupon["memberCouponId"].length) * 4)),
+ fontWeight: MyFontWeight.semi_bold,
+ color: Color(0xFF353535),
+ ),
+ ),
+ SizedBox(
+ height: 15.h,
+ ),
+ BarcodeWidget(
+ barcode: Barcode.code128(useCode128C: true),
+ data: coupon != null ? coupon["memberCouponId"] : "",
+ height: 72.h,
+ color: Colors.black,
+ drawText: false,
+ ),
+ SizedBox(
+ height: 16.h,
+ ),
+ Expanded(child: QrImage(
+ data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
+ version: QrVersions.auto,
+ size: 200.w,
+ gapless: true,
+ ),),
+ SizedBox(
+ height: 35.h,
+ ),
+ ],
),
+ margin: EdgeInsets.symmetric(horizontal: 20.w),
),
- ],
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SizedBox(
- width: 11.w,
- ),
- Expanded(
- child: Text(
- S
- .of(context)
- .qianwanghuixiangmendianduihuanhexiao,
- style: TextStyle(
- textBaseline: TextBaseline.alphabetic,
- fontSize: 14.sp,
- color: Color(0xFF353535)),
- ),
- flex: 1,
+ flex: 27,
+ ),
+ Container(
+ child: MySeparator(
+ width: 5.w,
+ height: 1.h,
+ color: Color(0xFFA29E9E),
),
- ],
+ margin: EdgeInsets.only(left: 20.w, right: 20.w,bottom:20.h),
+ ),
+ ],
+ ),
+ );
+ }),
+ //原版本样式
+ // LayoutBuilder(builder: (context, constraints) {
+ // return Container(
+ // width: constraints.constrainWidth() * 0.912,
+ // child: Column(
+ // children: [
+ // Expanded(
+ // child: Container(
+ // child: Column(
+ // children: [
+ // Text(
+ // coupon != null ? coupon["couponName"] : "",
+ // style: TextStyle(
+ // fontSize: 16.sp,
+ // fontWeight: FontWeight.bold,
+ // color: Color(0xFF353535)),
+ // ),
+ // SizedBox(
+ // height: 8.h,
+ // ),
+ // Text(
+ // (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
+ // "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
+ // style: TextStyle(
+ // fontSize: 12.sp,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // ],
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // ),
+ // alignment: Alignment.center,
+ // ),
+ // flex: 6,
+ // ),
+ // Container(
+ // margin: EdgeInsets.only(left: 20.w, right: 20.w),
+ // child: MySeparator(
+ // width: 5.w,
+ // height: 1.h,
+ // color: Color(0xFFA29E9E),
+ // ),
+ // ),
+ // Expanded(
+ // child: Container(
+ // alignment: Alignment.center,
+ // child: Column(
+ // mainAxisAlignment: MainAxisAlignment.center,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // SizedBox(height: 5.h,),
+ // Text(
+ // coupon != null
+ // ? "${coupon["memberCouponId"].substring(0, 4)} "
+ // "${coupon["memberCouponId"].substring(4, 8)} "
+ // "${coupon["memberCouponId"].substring(8, 12)} "
+ // "${coupon["memberCouponId"].substring(12, 16)} "
+ // "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
+ // : "",
+ // style: TextStyle(
+ // fontSize: 14.sp,
+ // wordSpacing: coupon == null
+ // ? 10
+ // : (MediaQuery.of(context).size.width -
+ // 64.w) /
+ // (((coupon["memberCouponId"].length) * 4)),
+ // letterSpacing: coupon == null
+ // ? 8
+ // : (MediaQuery.of(context).size.width -
+ // 64.w) /
+ // (((coupon["memberCouponId"].length) * 4)),
+ // fontWeight: MyFontWeight.semi_bold,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // SizedBox(
+ // height: 12.h,
+ // ),
+ // BarcodeWidget(
+ // barcode: Barcode.code128(useCode128C: true),
+ // data: coupon != null ? coupon["memberCouponId"] : "",
+ // height: 72.h,
+ // color: Colors.black,
+ // drawText: false,
+ // ),
+ // SizedBox(
+ // height: 16.h,
+ // ),
+ // Expanded(child: QrImage(
+ // data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
+ // version: QrVersions.auto,
+ // size: 200.w,
+ // gapless: true,
+ // ),),
+ // SizedBox(
+ // height: 35.h,
+ // ),
+ // ],
+ // ),
+ // margin: EdgeInsets.symmetric(horizontal: 20.w),
+ // ),
+ // flex: 27,
+ // ),
+ // Container(
+ // child: MySeparator(
+ // width: 5.w,
+ // height: 1.h,
+ // color: Color(0xFFA29E9E),
+ // ),
+ // margin: EdgeInsets.only(left: 20.w, right: 20.w),
+ // ),
+ // Expanded(
+ // child: Container(
+ // padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
+ // child: Column(
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // Row(
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // Container(
+ // width: 3.w,
+ // height: 15.h,
+ // margin:
+ // EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
+ // decoration: BoxDecoration(
+ // borderRadius: BorderRadius.circular(3),
+ // color: Color(0xFF20662A),
+ // ),
+ // ),
+ // Text(
+ // S.of(context).shiyongtiaojian,
+ // style: TextStyle(
+ // fontWeight: FontWeight.bold,
+ // fontSize: 14.sp,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // ],
+ // ),
+ // Row(
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // SizedBox(
+ // width: 11.w,
+ // ),
+ // Expanded(
+ // child: Text(
+ // S
+ // .of(context)
+ // .qianwanghuixiangmendianduihuanhexiao,
+ // style: TextStyle(
+ // textBaseline: TextBaseline.alphabetic,
+ // fontSize: 14.sp,
+ // color: Color(0xFF353535)),
+ // ),
+ // flex: 1,
+ // ),
+ // ],
+ // ),
+ // Row(
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // Container(
+ // width: 3.w,
+ // height: 15.h,
+ // margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
+ // decoration: BoxDecoration(
+ // borderRadius: BorderRadius.circular(3),
+ // color: Color(0xFF20662A),
+ // ),
+ // ),
+ // Text(
+ // S.of(context).shiyongshuoming,
+ // style: TextStyle(
+ // fontWeight: FontWeight.bold,
+ // fontSize: 14.sp,
+ // color: Color(0xFF353535)),
+ // ),
+ // ],
+ // ),
+ // Row(
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // SizedBox(
+ // width: 11.w,
+ // ),
+ // Text(
+ // S.of(context).zitiduihuanquan,
+ // style: TextStyle(
+ // textBaseline: TextBaseline.alphabetic,
+ // fontSize: 14.sp,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // ],
+ // ),
+ // Row(
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // children: [
+ // SizedBox(
+ // width: 11.w,
+ // ),
+ // Text(
+ // S.of(context).huixiangrenyimendian,
+ // style: TextStyle(
+ // textBaseline: TextBaseline.alphabetic,
+ // fontSize: 14.sp,
+ // color: Color(0xFF353535),
+ // ),
+ // ),
+ // ],
+ // ),
+ // ],
+ // ),
+ // ),
+ // flex: 13,
+ // ),
+ // Expanded(
+ // child: Container(),
+ // flex: 3,
+ // ),
+ // ],
+ // ),
+ // );
+ // })
+ ],
+ ),
+ ),
+ Container(
+ width: MediaQuery.of(context).size.width * 0.912,
+ padding: EdgeInsets.only(left:18.w, bottom:15.h, right:18.w),
+ margin:EdgeInsets.only(bottom: 21.h),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(6),
+ bottomRight: Radius.circular(6),),
+ color: Colors.white,
+ boxShadow: [
+ BoxShadow(
+ color: Color(0x08213303).withAlpha(12),
+ offset: Offset(0, 2),
+ blurRadius: 3,
+ spreadRadius: 0,
+ ),
+ ],
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ width: 3.w,
+ height: 15.h,
+ margin:
+ EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(3),
+ color: Color(0xFF20662A),
),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- width: 3.w,
- height: 15.h,
- margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(3),
- color: Color(0xFF20662A),
- ),
- ),
- Text(
- S.of(context).shiyongshuoming,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 14.sp,
- color: Color(0xFF353535)),
- ),
- ],
+ ),
+ Text(
+ S.of(context).shiyongtiaojian,
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 14.sp,
+ color: Color(0xFF353535),
),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SizedBox(
- width: 11.w,
- ),
- Text(
- S.of(context).zitiduihuanquan,
- style: TextStyle(
- textBaseline: TextBaseline.alphabetic,
- fontSize: 14.sp,
- color: Color(0xFF353535),
- ),
- ),
- ],
+ ),
+ ],
+ ),
+ SizedBox(height:12.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SizedBox(
+ width: 11.w,
+ ),
+ Expanded(
+ child: Text(
+ S
+ .of(context)
+ .qianwanghuixiangmendianduihuanhexiao,
+ style: TextStyle(
+ textBaseline: TextBaseline.alphabetic,
+ fontSize: 14.sp,
+ height: 1.5.h,
+ color: Color(0xFF353535)),
),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SizedBox(
- width: 11.w,
- ),
- Text(
- S.of(context).huixiangrenyimendian,
- style: TextStyle(
- textBaseline: TextBaseline.alphabetic,
- fontSize: 14.sp,
- color: Color(0xFF353535),
- ),
- ),
- ],
+ flex: 1,
+ ),
+ ],
+ ),
+ SizedBox(height:16.h,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ width: 3.w,
+ height: 15.h,
+ margin: EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(3),
+ color: Color(0xFF20662A),
),
- ],
- ),
+ ),
+ Text(
+ S.of(context).shiyongshuoming,
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 14.sp,
+ color: Color(0xFF353535)),
+ ),
+ ],
),
- flex: 13,
- ),
- Expanded(
- child: Container(),
- flex: 3,
- ),
- ],
- ),
- );
- })
- ],
+ Container(
+ child: Html(
+ data:
+ coupon != null ? coupon["remark"] : "",
+ customImageRenders: {
+ networkSourceMatcher(): networkImageRender(
+ loadingWidget: () {
+ return Container();
+ },
+ ),
+ },
+ ),
+ )
+ ],
+ ),
+ )
+ ],
+ ),
+ ),
),
),
);
diff --git a/lib/qr/qr_code_scan.dart b/lib/qr/qr_code_scan.dart
index c575652d..9376b6a1 100644
--- a/lib/qr/qr_code_scan.dart
+++ b/lib/qr/qr_code_scan.dart
@@ -57,31 +57,81 @@ class _QrCodeScanPage extends State {
right: 0,
),
Positioned(
- child: MyAppBar(
- title: "扫码",
- titleColor: Colors.white,
- leadingColor: Colors.white,
- brightness: Brightness.dark,
- background: Colors.transparent,
- action: Container(
- alignment: Alignment.center,
- margin: EdgeInsets.only(right: 16.w),
- child: GestureDetector(
- onTap: () {
- pickImage();
- },
- child: Text(
- S.of(context).xiangce,
+ child: Container(
+ margin: EdgeInsets.only(left:12.w,right: 16.w,top: 16.h),
+ child:Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: (){
+ Navigator.of(context).pop();
+ },
+ child: Container(
+ padding: EdgeInsets.symmetric(horizontal:10.w),
+ alignment: Alignment.centerLeft,
+ child: Image.asset(
+ "assets/image/return_left.webp",
+ fit: BoxFit.fill,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ Spacer(),
+ Expanded(child:Text(
+ S.of(context).saoma,
style: TextStyle(
- color: Colors.black,
+ color: Colors.white,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
+ )),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ pickImage();
+ },
+ child:Container(
+ padding: EdgeInsets.symmetric(horizontal:10.w),
+ child: Text(
+ S.of(context).xiangce,
+ style: TextStyle(
+ color: Colors.black,
+ fontSize: 18.sp,
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ ),
),
- ),
+ ],
),
),
- top: 0,
+ // MyAppBar(
+ // title: "扫码",
+ // titleColor: Colors.white,
+ // leadingColor: Colors.white,
+ // brightness: Brightness.dark,
+ // background: Colors.transparent,
+ // action: Container(
+ // alignment: Alignment.center,
+ // margin: EdgeInsets.only(right: 16.w),
+ // child: GestureDetector(
+ // onTap: () {
+ // pickImage();
+ // },
+ // child: Text(
+ // S.of(context).xiangce,
+ // style: TextStyle(
+ // color: Colors.black,
+ // fontSize: 18.sp,
+ // fontWeight: FontWeight.bold,
+ // ),
+ // ),
+ // ),
+ // ),
+ // ),
+ top:MediaQuery.of(context).padding.top,
left: 0,
right: 0,
),
diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart
index 24b7c920..26204a46 100644
--- a/lib/retrofit/data/settleOrderInfo.dart
+++ b/lib/retrofit/data/settleOrderInfo.dart
@@ -543,6 +543,7 @@ class MemberVo {
String money,
String activityMoney,
String greenMoney,
+ String raiseMoney,
String expendAmount,
dynamic organic,
String points,
@@ -577,6 +578,7 @@ class MemberVo {
_money = money;
_activityMoney = activityMoney;
_greenMoney = greenMoney;
+ _raiseMoney = raiseMoney;
_expendAmount = expendAmount;
_organic = organic;
_points = points;
@@ -614,6 +616,7 @@ class MemberVo {
_money = json['money'];
_activityMoney = json['activityMoney'];
_greenMoney = json['greenMoney'];
+ _raiseMoney = json['raiseMoney'];
_expendAmount = json['expendAmount'];
_organic = json['organic'];
_points = json['points'];
@@ -649,6 +652,7 @@ class MemberVo {
String _money;
String _activityMoney;
String _greenMoney;
+ String _raiseMoney;
String _expendAmount;
dynamic _organic;
String _points;
@@ -683,6 +687,7 @@ class MemberVo {
String money,
String activityMoney,
String greenMoney,
+ String raiseMoney,
String expendAmount,
dynamic organic,
String points,
@@ -717,6 +722,7 @@ class MemberVo {
money: money ?? _money,
activityMoney: activityMoney ?? _activityMoney,
greenMoney: greenMoney ?? _greenMoney,
+ raiseMoney: raiseMoney ?? _raiseMoney,
expendAmount: expendAmount ?? _expendAmount,
organic: organic ?? _organic,
points: points ?? _points,
@@ -752,6 +758,7 @@ class MemberVo {
String get money => _money;
String get activityMoney => _activityMoney;
String get greenMoney => _greenMoney;
+ String get raiseMoney => _raiseMoney;
String get expendAmount => _expendAmount;
dynamic get organic => _organic;
String get points => _points;
@@ -789,6 +796,7 @@ class MemberVo {
map['money'] = _money;
map['activityMoney'] = _activityMoney;
map['greenMoney'] = _greenMoney;
+ map['raiseMoney'] = _raiseMoney;
map['expendAmount'] = _expendAmount;
map['organic'] = _organic;
map['points'] = _points;
diff --git a/lib/retrofit/data/user_info.dart b/lib/retrofit/data/user_info.dart
index 4b412eac..b3015f2b 100644
--- a/lib/retrofit/data/user_info.dart
+++ b/lib/retrofit/data/user_info.dart
@@ -20,6 +20,7 @@ class UserInfo {
UserInfo();
String vipNo;
+ String vipScanNo;
String nickname;
String headimg;
bool userType;
@@ -54,6 +55,7 @@ class UserInfo {
factory UserInfo.fromJson(Map json) =>
UserInfo()
..vipNo = json['vipNo'] as String
+ ..vipScanNo =json['vipScanNo'] as String
..nickname = json['nickname'] as String
..headimg = json['headimg'] as String
..userType = json['userType'] as bool
@@ -87,6 +89,7 @@ class UserInfo {
Map toJson() => {
'vipNo': this.vipNo,
+ 'vipScanNo':this.vipScanNo,
'nickname': this.nickname,
'headimg': this.headimg,
'userType': this.userType,
diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart
index e1507418..d0cbdfe8 100644
--- a/lib/retrofit/retrofit_api.dart
+++ b/lib/retrofit/retrofit_api.dart
@@ -497,7 +497,7 @@ abstract class ApiService {
Future wiped(@Path("memberCouponId") String memberCouponId);
///查询优惠券详情
- @GET("/coupon/detail/")
+ @GET("/coupon/detail/{memberCouponId}")
Future> couponDetail(@Path("") String memberCouponId);
///查询会员信息
diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart
index 40d5e1d9..49509dc2 100644
--- a/lib/retrofit/retrofit_api.g.dart
+++ b/lib/retrofit/retrofit_api.g.dart
@@ -866,7 +866,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData>.fromJson(
_result.data,
- (json) => PageInfo.fromJson(
+ (json) => ((json??"") == "")?null:PageInfo