Browse Source

ios,优化

dart3_last
fmk 2 years ago
parent
commit
a63a15f9e3
  1. BIN
      assets/image/2x/write_off_bg.webp
  2. BIN
      assets/image/3x/write_off_bg.webp
  3. BIN
      assets/image/write_off_bg.webp
  4. 10
      ios/Podfile
  5. 8
      ios/Podfile.lock
  6. 6
      ios/Runner.xcodeproj/project.pbxproj
  7. 1
      lib/community/community_child_page.dart
  8. 11
      lib/community/community_details.dart
  9. 1
      lib/community/community_page.dart
  10. 6
      lib/community/community_view/class_details_video.dart
  11. 2
      lib/community/community_view/home_class.dart
  12. 2
      lib/community/new_community_details.dart
  13. 4
      lib/home/home_page.dart
  14. 2
      lib/main.dart
  15. 135
      lib/mine/vip_pay_code.dart
  16. 367
      lib/order/write_off_page.dart
  17. 3
      lib/retrofit/data/user_info.dart
  18. 2
      lib/retrofit/min_api.dart
  19. 4
      lib/retrofit/retrofit_api.dart
  20. 2
      lib/retrofit/retrofit_api.g.dart
  21. 16
      lib/view_widget/mine_vip_entry.dart
  22. 4
      lib/view_widget/my_appbar.dart
  23. 5
      lib/vip/vip_view/vip_top.dart
  24. 2
      lib/web/web_page.dart
  25. 7
      lib/web/web_view/input_comment.dart
  26. 7
      pubspec.lock

BIN
assets/image/2x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/3x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/image/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

10
ios/Podfile

@ -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

8
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: 27a0f08c504497d82c425d2ccb28d9958a6e156a
PODFILE CHECKSUM: 9a26c1c4037e42be4afc95d70f8bd02a4b989a1c
COCOAPODS: 1.11.3

6
ios/Runner.xcodeproj/project.pbxproj

@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.2.1;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.2.1;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.2.1;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",

1
lib/community/community_child_page.dart

@ -214,7 +214,6 @@ class CommunityChildPageState extends State<CommunityChildPage>
});
setState(() {});
// Navigator.of(context).pushNamed( '/router/eom');
},
);
},

11
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<String, dynamic> arguments;
@ -60,7 +58,7 @@ class _CommunityDetails extends State<CommunityDetails>
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<CommunityDetails>
void _focusNodeListener() {
/*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
setState(() {
smileyPadGone = true;
emojiShowing = false;
});
}*/
}
@ -161,9 +159,9 @@ class _CommunityDetails extends State<CommunityDetails>
@override
Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <= 0) {
setState(() {
if(h > 0 && keyboard < h) {
keyboard = h;
setState(() {
});
}
return GestureDetector(
@ -176,6 +174,7 @@ class _CommunityDetails extends State<CommunityDetails>
});
},
child: Scaffold(
// resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: S.of(context).dongtaixiangqing,
titleColor: Colors.black,

1
lib/community/community_page.dart

@ -79,6 +79,7 @@ class _CommunityPage extends State<CommunityPage>
return Scaffold(
appBar: MyAppBar(
leading: false,
centerTitle: true,
titleChild: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width - 60.w,

6
lib/community/community_view/class_details_video.dart

@ -139,7 +139,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
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<ClassDetailsVideo> {
: 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<ClassDetailsVideo> {
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: [

2
lib/community/community_view/home_class.dart

@ -67,7 +67,7 @@ class _HomeClass extends State<HomeClass> {
),
),
Container(
height: 195,
height: 195.h,
margin: EdgeInsets.only(top: 10.h),
child: ListView.builder(
scrollDirection: Axis.horizontal,

2
lib/community/new_community_details.dart

@ -175,7 +175,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
@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;
});

4
lib/home/home_page.dart

@ -111,10 +111,12 @@ class HomePageState extends State<HomePage> 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,

2
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;
},

135
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<VipPayCode> {
void dispose() {
super.dispose();
refreshController.dispose();
Location.getInstance().stopLocation();
}
@override
@ -51,6 +51,8 @@ class _VipPayCode extends State<VipPayCode> {
UserInfo userInfo;
final RefreshController refreshController = RefreshController();
bool vipCodeText = false;
Timer _timer;
bool isDispose = false;
///
queryUser() async {
@ -67,64 +69,52 @@ class _VipPayCode extends State<VipPayCode> {
refreshController.refreshFailed();});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
setState(() {});
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),
});
setState(() {});
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,
),
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
queryUser();
},
child: SingleChildScrollView(
child: Container(
color: Colors.white,
leadingColor: Colors.white,
),
body: Container(
color: Color(0xFF32A060),
height: double.infinity,
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),
),
// height: 485.h,
padding: EdgeInsets.only(top: 47.h),
child: Container(
height: 438.h,
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
@ -138,72 +128,24 @@ class _VipPayCode extends State<VipPayCode> {
],
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),
margin: EdgeInsets.symmetric(horizontal: 16.w,),
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(
"轻触可查看会员码数字",
SizedBox(height: 46.h,),
Text(
"请保持屏幕常亮,并对准扫码盒或枪口",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 13.sp,
color: Color(0xFFCACACA),
),
),
),
SizedBox(
height: 12.h,
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
data:
userInfo != null ? userInfo?.vipNo : "",
height: 72.h,
color: Colors.black,
drawText: false,
),
SizedBox(
height: 16.h,
),
SizedBox(height: 30.h,),
QrImage(
data: userInfo != null
? (userInfo?.vipNo ?? "")
? (userInfo?.vipScanNo ?? "")
: "",
version: QrVersions.auto,
size: 200.w,
@ -213,13 +155,12 @@ class _VipPayCode extends State<VipPayCode> {
),
),
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(56),
color: Colors.white,
color: Color(0xFF32A060),
border: Border.all(
color: Colors.white,
color: Color(0xFF32A060),
width: 8.w,
),
),
@ -228,7 +169,7 @@ class _VipPayCode extends State<VipPayCode> {
borderRadius: BorderRadius.circular(56),
color: Colors.white,
border: Border.all(
color: Color(0xFF32A060),
color: Colors.white,
width: 2.w,
),
),
@ -246,8 +187,6 @@ class _VipPayCode extends State<VipPayCode> {
],
),
),
),
),
);
}
}

367
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<WriteOffPage> {
dynamic coupon;
ApiService apiService;
CouponDetail queryCoupon;
final RefreshController refreshController = RefreshController();
@override
void initState() {
@ -79,23 +85,43 @@ class _WriteOffPage extends State<WriteOffPage> {
background: Color(0xFF32A060),
leadingColor: Colors.white,
),
body: Container(
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/icon_write_off_bg.webp",
"assets/image/write_off_bg.webp",
width: MediaQuery.of(context).size.width * 0.912,
height: 540.h,
fit: BoxFit.fill,
),
LayoutBuilder(builder: (context, constraints) {
return Container(
alignment: Alignment.center,
width: constraints.constrainWidth() * 0.912,
padding:EdgeInsets.only(top: 24.h),
child: Column(
children: [
Expanded(
child: Container(
Container(
child: Column(
children: [
Text(
@ -106,7 +132,7 @@ class _WriteOffPage extends State<WriteOffPage> {
color: Color(0xFF353535)),
),
SizedBox(
height: 8.h,
height:11.h,
),
Text(
(coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
@ -122,10 +148,8 @@ class _WriteOffPage extends State<WriteOffPage> {
),
alignment: Alignment.center,
),
flex: 6,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
margin: EdgeInsets.only(left: 20.w, right: 20.w,top:16.h,bottom:30.h),
child: MySeparator(
width: 5.w,
height: 1.h,
@ -164,7 +188,7 @@ class _WriteOffPage extends State<WriteOffPage> {
),
),
SizedBox(
height: 12.h,
height: 15.h,
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
@ -197,11 +221,266 @@ class _WriteOffPage extends State<WriteOffPage> {
height: 1.h,
color: Color(0xFFA29E9E),
),
margin: EdgeInsets.only(left: 20.w, right: 20.w),
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,
),
],
),
Expanded(
child: Container(
padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
@ -230,6 +509,7 @@ class _WriteOffPage extends State<WriteOffPage> {
),
],
),
SizedBox(height:12.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -245,12 +525,14 @@ class _WriteOffPage extends State<WriteOffPage> {
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
height: 1.5.h,
color: Color(0xFF353535)),
),
flex: 1,
),
],
),
SizedBox(height:16.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -258,7 +540,7 @@ class _WriteOffPage extends State<WriteOffPage> {
Container(
width: 3.w,
height: 15.h,
margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
margin: EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
@ -273,54 +555,25 @@ class _WriteOffPage extends State<WriteOffPage> {
),
],
),
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),
),
),
Container(
child: Html(
data:
coupon != null ? coupon["remark"] : "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
)
],
),
)
],
),
),
flex: 13,
),
Expanded(
child: Container(),
flex: 3,
),
],
),
);
})
],
),
),
);

3
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<String, dynamic> 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<String, dynamic> toJson() => <String, dynamic>{
'vipNo': this.vipNo,
'vipScanNo':this.vipScanNo,
'nickname': this.nickname,
'headimg': this.headimg,
'userType': this.userType,

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "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/";///线

4
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<BaseData> wiped(@Path("memberCouponId") String memberCouponId);
///
@GET("/coupon/detail/")
@GET("/coupon/detail/{memberCouponId}")
Future<BaseData<CouponDetail>> couponDetail(@Path("") String memberCouponId);
///

2
lib/retrofit/retrofit_api.g.dart

@ -1862,7 +1862,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/',
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/$memberCouponId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',

16
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,
),
],

4
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

5
lib/vip/vip_view/vip_top.dart

@ -717,8 +717,7 @@ class _VipTop extends State<VipTop> {
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<VipTop> {
),
),
),
if (widget?.vipCardHome?.cards[selectIndex]?.autoSubscribe ??
false)
GestureDetector(
onTap: () {
state(() {

2
lib/web/web_page.dart

@ -265,7 +265,7 @@ class _WebPage extends State<WebPage> 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;
});

7
lib/web/web_view/input_comment.dart

@ -221,13 +221,14 @@ class _InputComment extends State<InputComment> {
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<InputComment> {
textAlign: TextAlign.center,
),
loadingIndicator: const SizedBox.shrink(),
tabIndicatorAnimDuration: kTabScrollDuration,
tabIndicatorAnimDuration: Duration(milliseconds: 0),
categoryIcons: const CategoryIcons(),
buttonMode: ButtonMode.MATERIAL,
checkPlatformCompatibility: true,

7
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:

Loading…
Cancel
Save