From a63a15f9e3d8bef6f858a5c22f0889ab27159e0b Mon Sep 17 00:00:00 2001 From: fmk Date: Tue, 14 Feb 2023 18:40:43 +0800 Subject: [PATCH] =?UTF-8?q?ios=EF=BC=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/write_off_bg.webp | Bin 0 -> 17189 bytes assets/image/3x/write_off_bg.webp | Bin 0 -> 35157 bytes assets/image/write_off_bg.webp | Bin 0 -> 5226 bytes ios/Podfile | 10 + ios/Podfile.lock | 8 +- ios/Runner.xcodeproj/project.pbxproj | 6 +- lib/community/community_child_page.dart | 1 - lib/community/community_details.dart | 11 +- lib/community/community_page.dart | 1 + .../community_view/class_details_video.dart | 6 +- lib/community/community_view/home_class.dart | 2 +- lib/community/new_community_details.dart | 2 +- lib/home/home_page.dart | 4 +- lib/main.dart | 2 +- lib/mine/vip_pay_code.dart | 251 +++--- lib/order/write_off_page.dart | 715 ++++++++++++------ lib/retrofit/data/user_info.dart | 3 + lib/retrofit/min_api.dart | 2 +- lib/retrofit/retrofit_api.dart | 4 +- lib/retrofit/retrofit_api.g.dart | 2 +- lib/view_widget/mine_vip_entry.dart | 16 +- lib/view_widget/my_appbar.dart | 4 +- lib/vip/vip_view/vip_top.dart | 5 +- lib/web/web_page.dart | 2 +- lib/web/web_view/input_comment.dart | 7 +- pubspec.lock | 7 + 26 files changed, 647 insertions(+), 424 deletions(-) create mode 100644 assets/image/2x/write_off_bg.webp create mode 100644 assets/image/3x/write_off_bg.webp create mode 100644 assets/image/write_off_bg.webp diff --git a/assets/image/2x/write_off_bg.webp b/assets/image/2x/write_off_bg.webp new file mode 100644 index 0000000000000000000000000000000000000000..e79aaf50e158f07c3c2a679ed0442fac4bc1cedb GIT binary patch literal 17189 zcmeHP`&Uy}77ig`L@`km(^d)iLMuqoK|n+z-~+MhfH#ReLNrd}sxMkhQRI=J^|6XF zGhK`iP*g^dn*hNVnwSTmWV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EabN5PHXi8U!cPXAWrzNIHua*FWK=qH|W&NhBT7HiXgr%IYx$d8MU4|wCG z*G#?pS>wSkI&Z~0Y5W<1vs7?zQuse>@yI%TO6?B`nrVhi@dA!Bf(nV*TOcFT(>NQC zPu`;R3b>bpwg~6ftuQ`!j+(VlWO_iH=jWK4q)DUGKzcz<&O9|kuXY>ulI53P>Htff=mwJDDb+Q;cl(C>gQbQl*`9-pGs@tJ98u+Zxe+mV2I zvWVEOarFuB<|k2RNaTI)@8U<)Uv~N^uz5DDh1eeTVCcnmETZe}8hN&#|m z)xx}R%(>3lk|O0?hmHG;;>rmg+SKc-WHu3jzv7w|A5!YsbEWoJ$>^NAx*lCN%AB)% z*I}P3_{Yr2msJaKdX0YRS7DAAZq?BGUUXCLdpiRoh>29__z9{6$jU_QP^Y+}R09ux zgm<)^mD&NrR@h{PZs)u~O*F%1UQ_tbSQL|~>t|3U6~)2hBPYbA&P2sMcEydfdmw8v zo=y9*b$F)CxFzJC;uOBbZzhR9!RAHk32&;T#T+~fLoehCTyaz_#Qcz~$YXP{kfloY zVcuo>(v57@>7dzD~A7VJ8Mt#wd8 z0E#3)B?wk>18RCe;S#9M0wrjm&JGk4{vH*RjcY#xXBNPj1#o78Ayk7i3%~1`g##-P uoAa#!n$h+_Lfo27u~pIB{Qm(_yV-jH literal 0 HcmV?d00001 diff --git a/assets/image/3x/write_off_bg.webp b/assets/image/3x/write_off_bg.webp new file mode 100644 index 0000000000000000000000000000000000000000..7a201a300e88fbacedb8d8123a5e64452efbc809 GIT binary patch literal 35157 zcmeHQYg`jo+D}4|03z`o1wnKmUJ#5T7Y&4h6h>}UTR}lcjh0$a5JZUtl6WaAMbJqF z-hkS8;9LDZ%OxV%$bvY_v~(|ImQgu%IpQnb?5!W^vK~-+YL3ZnbQ8ljy<dYr{>>mstfim1p9InHeg?_;tXh(qu3AjNfeno*_Dx&t|AhdLZ#6c zPySFuX|`1FhQcAiG9+H2ISkoas#OeL>+(9yG0p4otb!Laz{J(a1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D;h_L?bUb(V-{$oiZdPbqWpH zgi7=rX3z=j=ba?)$y(Ykz@K;-e`NH9|BzcIKvLy^g!u1CD{R#p%@t3&pM77JU=Mfi M+FRcDdhN-71AgXC }); setState(() {}); - // Navigator.of(context).pushNamed( '/router/eom'); }, ); }, diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 30731e72..6c918b2f 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -17,8 +17,6 @@ import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/input_comment.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../web/web_view/input_comment_o.dart'; - class CommunityDetails extends StatefulWidget { final Map arguments; @@ -60,7 +58,7 @@ class _CommunityDetails extends State void didChangeMetrics() { WidgetsBinding.instance.addPostFrameCallback((_) { - // isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0; + isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0; if (!mounted) return; if (MediaQuery.of(context).viewInsets.bottom == 0) { if (isKeyBoardShow) { @@ -108,7 +106,7 @@ class _CommunityDetails extends State void _focusNodeListener() { /*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){ setState(() { - smileyPadGone = true; + emojiShowing = false; }); }*/ } @@ -161,9 +159,9 @@ class _CommunityDetails extends State @override Widget build(BuildContext context) { double h = MediaQuery.of(context).viewInsets.bottom; - if(h > 0 && keyboard <= 0) { + if(h > 0 && keyboard < h) { + keyboard = h; setState(() { - keyboard = h; }); } return GestureDetector( @@ -176,6 +174,7 @@ class _CommunityDetails extends State }); }, child: Scaffold( + // resizeToAvoidBottomInset: false, appBar: MyAppBar( title: S.of(context).dongtaixiangqing, titleColor: Colors.black, 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_video.dart b/lib/community/community_view/class_details_video.dart index 995b5ff6..e34f7516 100644 --- a/lib/community/community_view/class_details_video.dart +++ b/lib/community/community_view/class_details_video.dart @@ -139,7 +139,7 @@ class ClassDetailsVideoState extends State { color: Colors.black, width: width, height:MediaQuery.of(context).size.width / 1.5, - margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), child: chewies = Chewie( controller: chewieAudioController, ), @@ -147,7 +147,7 @@ class ClassDetailsVideoState extends State { : Container( width: width, height:MediaQuery.of(context).size.width / 1.5, - margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), )), if (widget.isShowImg) GestureDetector( @@ -161,7 +161,7 @@ class ClassDetailsVideoState extends State { child: Container( width: width, height: MediaQuery.of(context).size.width / 1.5, - margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), color: Colors.black, child: Stack( children: [ 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 f005b3e2..5b904034 100644 --- a/lib/community/new_community_details.dart +++ b/lib/community/new_community_details.dart @@ -175,7 +175,7 @@ class _NewCommunityDetails extends State with WidgetsBindin @override Widget build(BuildContext context) { double h = MediaQuery.of(context).viewInsets.bottom; - if(h > 0 && keyboard <= 0) { + if(h > 0 && keyboard 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, diff --git a/lib/main.dart b/lib/main.dart index 49f8b9ed..99a6c6eb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -199,7 +199,7 @@ class MyApp extends StatelessWidget { } else if (locales[0].countryCode == "CN"){ locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH'); } else{ - locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US'); + locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'CH'); } return appLocale ?? locale; }, diff --git a/lib/mine/vip_pay_code.dart b/lib/mine/vip_pay_code.dart index 63f18fe4..60305ceb 100644 --- a/lib/mine/vip_pay_code.dart +++ b/lib/mine/vip_pay_code.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:barcode_widget/barcode_widget.dart'; @@ -39,7 +40,6 @@ class _VipPayCode extends State { void dispose() { super.dispose(); refreshController.dispose(); - Location.getInstance().stopLocation(); } @override @@ -51,6 +51,8 @@ class _VipPayCode extends State { UserInfo userInfo; final RefreshController refreshController = RefreshController(); bool vipCodeText = false; + Timer _timer; + bool isDispose = false; ///查询用户信息 queryUser() async { @@ -67,185 +69,122 @@ class _VipPayCode extends State { refreshController.refreshFailed();}); if (baseData != null && baseData.isSuccess) { userInfo = baseData.data; + SharedPreferences.getInstance().then((value) => { + value.setString('user', jsonEncode(baseData.data)), + }); setState(() {}); - SharedPreferences.getInstance().then((value) => { - value.setString('user', jsonEncode(baseData.data)), - }); refreshController.refreshCompleted(); }else{ refreshController.refreshFailed(); } }finally{ - setState((){}); + 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: Colors.white, - titleColor: Colors.black, + background: Color(0xFF32A060), + titleColor: Colors.white, brightness: Brightness.dark, - leadingColor: Colors.black, + leadingColor: Colors.white, ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - physics: BouncingScrollPhysics(), - onRefresh: () { - queryUser(); - }, - child: SingleChildScrollView( - child: Container( - color: Colors.white, - padding: EdgeInsets.only(top: 45.h), - child: Stack( - alignment: Alignment.topCenter, - children: [ - Container( - padding: EdgeInsets.only(top: 50.h), - child: Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 14.w), - padding: EdgeInsets.only(top: 68.h, bottom: 16.h), - decoration: BoxDecoration( - color: Color(0xFF32A060), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 14, - spreadRadius: 0, - ), - ], - borderRadius: BorderRadius.circular(6), + 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, ), - child: Container( - 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), - padding: EdgeInsets.only( - top: 46.h, left:16.w, right: 15.w, bottom: 79.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - GestureDetector( - onTap: (){ - setState(() { - vipCodeText = !vipCodeText; - }); - }, - child: - vipCodeText ? Text( - userInfo != null - ? "${(userInfo?.vipNo ?? "").substring(0, 4)} " - "${(userInfo?.vipNo ?? "").substring(4, 8)} " - "${(userInfo?.vipNo ?? "").substring(8, 12)} " - "${(userInfo?.vipNo ?? "").substring(12, 16)} " - "${(userInfo?.vipNo ?? "").substring(16, (userInfo?.vipNo ?? "").length)}" - : "", - style: TextStyle( - fontSize: 14.sp, - wordSpacing: userInfo == null - ? 10 - : (MediaQuery.of(context).size.width - 64.w) / - ((((userInfo?.vipNo ?? "") - .length) * - 4)), - letterSpacing: userInfo == null - ? 8 - : (MediaQuery.of(context).size.width - 64.w) / - ((((userInfo?.vipNo ?? "") - .length) * - 4)), - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF353535), - ), - ) - :Text( - "轻触可查看会员码数字", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 13.sp, - color: Color(0xFFCACACA), - ), - ), - ), - SizedBox( - height: 12.h, - ), - BarcodeWidget( - barcode: Barcode.code128(useCode128C: true), - data: - userInfo != null ? userInfo?.vipNo : "", - height: 72.h, - color: Colors.black, - drawText: false, - ), - SizedBox( - height: 16.h, - ), - QrImage( - data: userInfo != null - ? (userInfo?.vipNo ?? "") - : "", - version: QrVersions.auto, - size: 200.w, - gapless: true, - ), - ], - ), - ), - ), + ], + borderRadius: BorderRadius.circular(6), ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(56), - color: Colors.white, - border: Border.all( - color: Colors.white, - width: 8.w, - ), - ), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(56), - color: Colors.white, - border: Border.all( - color: Color(0xFF32A060), - width: 2.w, + 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), ), ), - 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", + 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/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/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/min_api.dart b/lib/retrofit/min_api.dart index f7e60731..7e9d7012 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart'; part 'min_api.g.dart'; -const localBaseUrl = "http://192.168.10.78:8765/app/";///本地 +const localBaseUrl = "http://192.168.10.129:8765/app/";///本地 // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///本地 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 06429ed5..d0cbdfe8 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -64,7 +64,7 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -const localBaseUrl = "http://192.168.10.78:8766/app/";///本地 +const localBaseUrl = "http://192.168.10.129:8766/app/";///本地 // const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///本地 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @@ -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 9d5c20d7..49509dc2 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -1862,7 +1862,7 @@ class _ApiService implements ApiService { const _extra = {}; final queryParameters = {}; final _data = {}; - final _result = await _dio.request>('coupon/detail/', + final _result = await _dio.request>('coupon/detail/$memberCouponId', queryParameters: queryParameters, options: RequestOptions( method: 'GET', diff --git a/lib/view_widget/mine_vip_entry.dart b/lib/view_widget/mine_vip_entry.dart index 2c6ae5a0..932d2bd1 100644 --- a/lib/view_widget/mine_vip_entry.dart +++ b/lib/view_widget/mine_vip_entry.dart @@ -81,10 +81,13 @@ class MineVipEntry extends StatelessWidget { } Widget widget = Container( + height:20.h, + width: double.infinity, child: Row( children: [ Container( - padding: EdgeInsets.symmetric(horizontal:4.w,vertical: 3.h), + height: double.infinity, + padding: EdgeInsets.symmetric(horizontal:3.w,vertical:4.h), decoration: BoxDecoration( color: logoColor, borderRadius: BorderRadius.only( @@ -102,12 +105,13 @@ class MineVipEntry extends StatelessWidget { child: Image.asset( "assets/image/mine_vip_logo.webp", fit: BoxFit.cover, - width: 13.w, - height: 11.h, + // width: 13.w, + // height: 11.h, ), ), Container( - padding: EdgeInsets.symmetric(horizontal:2.w,vertical:3.h), + height: double.infinity, + padding: EdgeInsets.symmetric(horizontal:3.w,vertical:3.h), decoration: BoxDecoration( color: levelTextBackdrop, borderRadius: BorderRadius.only( @@ -136,8 +140,8 @@ class MineVipEntry extends StatelessWidget { Image.asset( "assets/image/icon_right.webp", fit: BoxFit.cover, - width: 8.w, - height: 8.h, + width: 8, + height: 8, color: levelTextColor, ), ], diff --git a/lib/view_widget/my_appbar.dart b/lib/view_widget/my_appbar.dart index a464ca01..7a3ce7c5 100644 --- a/lib/view_widget/my_appbar.dart +++ b/lib/view_widget/my_appbar.dart @@ -16,6 +16,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { final Size preferredSize; final double toolbarHeight; final bool leading; + final bool centerTitle; final Brightness brightness; final Function exit; @@ -34,6 +35,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { this.titleSize = 18, this.brightness = Brightness.light, this.leading = true, + this.centerTitle = false, this.exit }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), super(key: key) { @@ -79,7 +81,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { ) : Container(), titleSpacing: 2, - centerTitle: false, + centerTitle: centerTitle, leadingWidth: leading ? 56 : 10.w, title: ((title == null || title == "") && titleChild != null) ? titleChild diff --git a/lib/vip/vip_view/vip_top.dart b/lib/vip/vip_view/vip_top.dart index 74fd97ff..54f11b73 100644 --- a/lib/vip/vip_view/vip_top.dart +++ b/lib/vip/vip_view/vip_top.dart @@ -717,8 +717,7 @@ class _VipTop extends State { topLeft: const Radius.circular(8.0), topRight: const Radius.circular(8.0))), child: Container( - // height: 230.h, - height: 160.h, + height: 230.h, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -800,8 +799,6 @@ class _VipTop extends State { ), ), ), - if (widget?.vipCardHome?.cards[selectIndex]?.autoSubscribe ?? - false) GestureDetector( onTap: () { state(() { diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart index aa53cb2a..148e141d 100644 --- a/lib/web/web_page.dart +++ b/lib/web/web_page.dart @@ -265,7 +265,7 @@ class _WebPage extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { double h = MediaQuery.of(context).viewInsets.bottom; - if(h > 0 && keyboard <= 0) { + if(h > 0 && keyboard < h) { setState(() { keyboard = h; }); diff --git a/lib/web/web_view/input_comment.dart b/lib/web/web_view/input_comment.dart index ad9d7513..4a11f1ae 100644 --- a/lib/web/web_view/input_comment.dart +++ b/lib/web/web_view/input_comment.dart @@ -221,13 +221,14 @@ class _InputComment extends State { Offstage( offstage: !widget.emojiShowing, child: SizedBox( - height: 250.h, + height: widget.keyboard == -1 ? 270 : widget.keyboard, + width: MediaQuery.of(context).size.width, child: EmojiPicker( textEditingController: widget.commentTextController, config: Config( columns: 7, - emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0), + emojiSizeMax: 32 * (Platform.isIOS ? 1.10 : 1.0), verticalSpacing: 0, horizontalSpacing: 0, gridPadding: EdgeInsets.zero, @@ -249,7 +250,7 @@ class _InputComment extends State { textAlign: TextAlign.center, ), loadingIndicator: const SizedBox.shrink(), - tabIndicatorAnimDuration: kTabScrollDuration, + tabIndicatorAnimDuration: Duration(milliseconds: 0), categoryIcons: const CategoryIcons(), buttonMode: ButtonMode.MATERIAL, checkPlatformCompatibility: true, diff --git a/pubspec.lock b/pubspec.lock index 661bac50..fd60a0b3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -113,6 +113,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.10" + emoji_picker_flutter: + dependency: "direct main" + description: + name: emoji_picker_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.1" event_bus: dependency: "direct main" description: