Browse Source

Merge remote-tracking branch 'origin/master'

null_safety
fmk 4 years ago
parent
commit
a6ece1fa33
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 4
      lib/generated/intl/messages_en.dart
  3. 4
      lib/generated/intl/messages_zh_CN.dart
  4. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  5. 4
      lib/generated/intl/messages_zh_Hant_CN.dart
  6. 4
      lib/generated/intl/messages_zh_TW.dart
  7. 40
      lib/generated/l10n.dart
  8. 41
      lib/home/home_page.dart
  9. 165
      lib/home/huixiang_brand_page.dart
  10. 4
      lib/l10n/intl_en.arb
  11. 4
      lib/l10n/intl_zh_CN.arb
  12. 4
      lib/l10n/intl_zh_Hans_CN.arb
  13. 4
      lib/l10n/intl_zh_Hant_CN.arb
  14. 4
      lib/l10n/intl_zh_TW.arb
  15. 176
      lib/login/login_page.dart
  16. 16
      lib/mine/vip_detail_page.dart
  17. 4
      pubspec.lock

12
ios/Runner.xcodeproj/project.pbxproj

@ -846,7 +846,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -880,7 +880,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.23;
MARKETING_VERSION = 1.0.24;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1045,7 +1045,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1079,7 +1079,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.23;
MARKETING_VERSION = 1.0.24;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1137,7 +1137,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1171,7 +1171,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.23;
MARKETING_VERSION = 1.0.24;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",

4
lib/generated/intl/messages_en.dart

@ -217,6 +217,7 @@ class MessageLookup extends MessageLookupByLibrary {
"jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"),
"jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"),
"jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"),
"jujue" : MessageLookupByLibrary.simpleMessage("拒绝"),
"kabao" : MessageLookupByLibrary.simpleMessage("卡包"),
"kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"),
"kaitongriqi" : m11,
@ -369,6 +370,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tijiao" : MessageLookupByLibrary.simpleMessage("提交"),
"tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
@ -426,6 +428,8 @@ class MessageLookup extends MessageLookupByLibrary {
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),
"yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"),
"yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"),
"yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡"),
"yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"),
"yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"),
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),

4
lib/generated/intl/messages_zh_CN.dart

@ -216,6 +216,7 @@ class MessageLookup extends MessageLookupByLibrary {
"jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"),
"jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"),
"jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"),
"jujue" : MessageLookupByLibrary.simpleMessage("拒绝"),
"kabao" : MessageLookupByLibrary.simpleMessage("卡包"),
"kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"),
"kaitongriqi" : m11,
@ -368,6 +369,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tijiao" : MessageLookupByLibrary.simpleMessage("提交"),
"tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
@ -425,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary {
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),
"yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"),
"yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"),
"yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡"),
"yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"),
"yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"),
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -216,6 +216,7 @@ class MessageLookup extends MessageLookupByLibrary {
"jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"),
"jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"),
"jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"),
"jujue" : MessageLookupByLibrary.simpleMessage("拒绝"),
"kabao" : MessageLookupByLibrary.simpleMessage("卡包"),
"kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"),
"kaitongriqi" : m11,
@ -368,6 +369,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tijiao" : MessageLookupByLibrary.simpleMessage("提交"),
"tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
@ -425,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary {
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),
"yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"),
"yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"),
"yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡"),
"yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"),
"yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"),
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),

4
lib/generated/intl/messages_zh_Hant_CN.dart

@ -216,6 +216,7 @@ class MessageLookup extends MessageLookupByLibrary {
"jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集團創始人"),
"jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"),
"jixuzhifu" : MessageLookupByLibrary.simpleMessage("繼續支付"),
"jujue" : MessageLookupByLibrary.simpleMessage("拒絕"),
"kabao" : MessageLookupByLibrary.simpleMessage("卡包"),
"kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("開啓權限"),
"kaitongriqi" : m11,
@ -368,6 +369,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tijiao" : MessageLookupByLibrary.simpleMessage("提交"),
"tingchewei" : MessageLookupByLibrary.simpleMessage("停車位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提現"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "),
"touxiang" : MessageLookupByLibrary.simpleMessage("頭像"),
@ -425,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary {
"yinshi" : MessageLookupByLibrary.simpleMessage("飲食"),
"yinsishengming" : MessageLookupByLibrary.simpleMessage("隱私聲明"),
"yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隱私協議》"),
"yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"),
"yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"),
"yiqiandao" : MessageLookupByLibrary.simpleMessage("已簽到"),
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),

4
lib/generated/intl/messages_zh_TW.dart

@ -216,6 +216,7 @@ class MessageLookup extends MessageLookupByLibrary {
"jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集團創始人"),
"jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"),
"jixuzhifu" : MessageLookupByLibrary.simpleMessage("繼續支付"),
"jujue" : MessageLookupByLibrary.simpleMessage("拒絕"),
"kabao" : MessageLookupByLibrary.simpleMessage("卡包"),
"kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("開啓權限"),
"kaitongriqi" : m11,
@ -368,6 +369,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tijiao" : MessageLookupByLibrary.simpleMessage("提交"),
"tingchewei" : MessageLookupByLibrary.simpleMessage("停車位"),
"tixian" : MessageLookupByLibrary.simpleMessage("提現"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "),
"touxiang" : MessageLookupByLibrary.simpleMessage("頭像"),
@ -425,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary {
"yinshi" : MessageLookupByLibrary.simpleMessage("飲食"),
"yinsishengming" : MessageLookupByLibrary.simpleMessage("隱私聲明"),
"yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隱私協議》"),
"yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"),
"yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"),
"yiqiandao" : MessageLookupByLibrary.simpleMessage("已簽到"),
"yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "),
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),

40
lib/generated/l10n.dart

@ -3985,6 +3985,46 @@ class S {
);
}
/// ``
String get tongyibingjixu {
return Intl.message(
'同意并继续',
name: 'tongyibingjixu',
desc: '',
args: [],
);
}
/// ``
String get jujue {
return Intl.message(
'拒绝',
name: 'jujue',
desc: '',
args: [],
);
}
/// ` 使APP使`
String get yinsizhengce1 {
return Intl.message(
' 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡',
name: 'yinsizhengce1',
desc: '',
args: [],
);
}
/// `     使()`
String get yinsizhengce2 {
return Intl.message(
'     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。',
name: 'yinsizhengce2',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

41
lib/home/home_page.dart

@ -603,8 +603,6 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
}
// SwiperController swiperController = SwiperController();
brands() {
return Container(
height: 90.h,
@ -642,45 +640,6 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
itemCount:
(brandData != null && brandData.length > 0) ? brandData.length : 0,
),
// child: AspectRatio(
// aspectRatio: 4.16,
// child: Swiper(
// scrollDirection: Axis.horizontal,
// controller: swiperController,
// loop: false,
// viewportFraction: 0.32,
// scale: 0.70,
// index: (brandData != null && brandData.length > 0) ? 1 : 0,
// itemBuilder: (context, position) {
// if (brandData == null || brandData.length == 0) {
// return Container();
// }
// return Container(
// margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h),
// decoration: BoxDecoration(
// color: Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(37),
// offset: Offset(0, 2),
// blurRadius: 5,
// spreadRadius: 0,
// )
// ],
// borderRadius: BorderRadius.circular(8),
// ),
// child: MImage(
// brandData != null ? brandData[position].image : "",
// radius: BorderRadius.circular(8),
// fit: BoxFit.cover,
// errorSrc: "assets/image/default_2_1.png",
// fadeSrc: "assets/image/default_2_1.png",
// ),
// );
// },
// itemCount: (brandData != null && brandData.length > 0) ? brandData.length : 1,
// ),
// ),
);
}

165
lib/home/huixiang_brand_page.dart

@ -22,6 +22,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
class BrandPage extends StatefulWidget {
@override
@ -76,9 +77,7 @@ class _BrandPage extends State<BrandPage>
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
queryHome(),
if(value.getBool("isFristLogin")){
showAlertDialog(),
}});
});
eventBus.on<EventType>().listen((event) {
print("object: BrandPage");
@ -95,10 +94,7 @@ class _BrandPage extends State<BrandPage>
super.build(context);
return Scaffold(
appBar: AppBar(
toolbarHeight: 40.h - MediaQuery
.of(context)
.padding
.top,
toolbarHeight: 40.h - MediaQuery.of(context).padding.top,
backgroundColor: Colors.white,
elevation: 0,
),
@ -243,9 +239,7 @@ class _BrandPage extends State<BrandPage>
),
),
TextSpan(
text: " ${S
.of(context)
.jituanchuangbanren}",
text: " ${S.of(context).jituanchuangbanren}",
style: TextStyle(
fontSize: 10.sp,
color: Colors.black,
@ -278,9 +272,7 @@ class _BrandPage extends State<BrandPage>
mainAxisSize: MainAxisSize.max,
children: [
Text(
S
.of(context)
.gengduo,
S.of(context).gengduo,
style: TextStyle(
fontSize: 12.sp,
color: Colors.black,
@ -340,9 +332,7 @@ class _BrandPage extends State<BrandPage>
height: 40.h,
),
Text(
S
.of(context)
.linian,
S.of(context).linian,
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
@ -488,149 +478,6 @@ class _BrandPage extends State<BrandPage>
);
}
showAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return SimpleDialog(
titlePadding: EdgeInsets.all(10),
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6))),
children: <Widget>[
Stack(
alignment: Alignment.bottomCenter,
children: [
Container(
alignment: Alignment.center,
width: double.infinity,
height: 305.h,
// margin: EdgeInsets.only(left: 40.w, right: 40.w),
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
child: Text(
S
.of(context)
.xieyitanchuang,
style: TextStyle(
color: Color(0xff4D4D4D),
fontSize: 18.sp,
fontWeight: FontWeight.bold),
),
),
Text.rich(
TextSpan(children: [
TextSpan(
text:
"     感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.sp,
height: 1.3.h,
color: Color(0xff727272)),
),
TextSpan(
text: S
.of(context)
.yinsixieyi,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.sp,
color: Color(0xff32A060)),
recognizer: TapGestureRecognizer()
..onTap = () {
debugPrint(
"${Navigator.of(context).popAndPushNamed(
'/router/treaty_page')}");
},
),
]),
),
SizedBox(
height: 10.h,
),
Text(
"     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.3.h,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 16.h,
),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
height: 40.h,
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 20.h),
child: BorderText(
padding: EdgeInsets.only(
top: 10.h, bottom: 10.h, left: 36.w, right: 36.w),
text: "拒绝",
fontSize: 12.sp,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1.w,
radius: 23,
),
),
),
SizedBox(
width: 21.w,
),
Container(
height: 40.h,
margin: EdgeInsets.only(bottom: 20.h),
alignment: Alignment.bottomCenter,
child: RoundButton(
text: "同意并继续",
textColor: Colors.white,
fontSize: 12,
callback: () {
Navigator.of(context).pop();
},
padding: EdgeInsets.only(
top: 10.h,
bottom: 10.h,
left: 21.5.w,
right: 21.5.w),
backgroup: Color(0xff32A060),
radius: 23,
),
),
SizedBox(
height: 20.h,
),
],
),
],
)
],
);
},
);
}
/// contentType 0123
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {

4
lib/l10n/intl_en.arb

@ -413,6 +413,10 @@
"xieyitanchuang": "一心回乡用户隐私政策",
"yinsixieyi": "《隐私协议》",
"shiyongmendian": "适用门店",
"tongyibingjixu": "同意并继续",
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",

4
lib/l10n/intl_zh_CN.arb

@ -414,6 +414,10 @@
"xieyitanchuang": "一心回乡用户隐私政策",
"yinsixieyi": "《隐私协议》",
"shiyongmendian": "适用门店",
"tongyibingjixu": "同意并继续",
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -414,6 +414,10 @@
"xieyitanchuang": "一心回乡用户隐私政策",
"yinsixieyi": "《隐私协议》",
"shiyongmendian": "适用门店",
"tongyibingjixu": "同意并继续",
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",

4
lib/l10n/intl_zh_Hant_CN.arb

@ -408,6 +408,10 @@
"xieyitanchuang": "一心回鄉用戶隱私協議",
"yinsixieyi": "《隱私協議》",
"shiyongmendian": "適用門店",
"tongyibingjixu": "同意並繼續",
"jujue": "拒絕",
"yinsizhengce1": " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉",
"yinsizhengce2": "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。",

4
lib/l10n/intl_zh_TW.arb

@ -406,6 +406,10 @@
"xieyitanchuang": "一心回鄉用戶隱私協議",
"yinsixieyi": "《隱私協議》",
"shiyongmendian": "適用門店",
"tongyibingjixu": "同意並繼續",
"jujue": "拒絕",
"yinsizhengce1": " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉",
"yinsizhengce2": "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。",

176
lib/login/login_page.dart

@ -16,8 +16,10 @@ import 'package:flutter/services.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:dio/dio.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:photo_view/photo_view.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
class LoginPage extends StatefulWidget {
@ -55,9 +57,14 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
isLogin() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (sharedPreferences.containsKey('token')
&& sharedPreferences.getString("token") != null
&& sharedPreferences.getString("token") != "") {
if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || !sharedPreferences.getBool("isShowPrivacyPolicy")) {
showAlertDialog();
}
if (sharedPreferences.containsKey('token') &&
sharedPreferences.getString("token") != null &&
sharedPreferences.getString("token") != "") {
Navigator.of(context).popAndPushNamed('/router/main_page');
} else {
client = ApiService(Dio());
@ -89,7 +96,6 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
RenderBox renderBox = loginKey.currentContext.findRenderObject();
offsetBtn = scrollController.offset;
print("offsetBtn: $offsetBtn");
var screenHeight = MediaQuery.of(context).size.height;
var scrollHeight = screenHeight * 1.47;
var height = scrollHeight - renderBox.size.height;
@ -98,7 +104,6 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
(scrollController.offset / (height - chaHeight) * (255)).toInt();
changeAlpha = (changeAlpha > 255 ? 255 : changeAlpha);
changeAlpha = (changeAlpha < 0 ? 0 : changeAlpha);
print("changeAlpha: $changeAlpha");
alpha = (initAlpha +
scrollController.offset /
(height - chaHeight) *
@ -106,7 +111,6 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
.toInt();
alpha = (alpha > 255 ? 255 : alpha);
alpha = (alpha < 0 ? 0 : alpha);
print("alpha: $alpha");
});
_controllerPhone.addListener(() {
@ -155,6 +159,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
Color statusCodeLineColor = Color(0xFF32A060);
_sendCode() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || !sharedPreferences.getBool("isShowPrivacyPolicy")) {
showAlertDialog();
return;
}
if (!checkStatus) {
SmartDialog.showToast(S.of(context).gouxuanxieyi);
return;
@ -216,14 +225,15 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
}
_login() async {
// Navigator.of(context).popAndPushNamed('/router/main_page');
// return;
print("222222");
if (alpha != 255) {
scrollToTop();
return;
}
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || !sharedPreferences.getBool("isShowPrivacyPolicy")) {
showAlertDialog();
return;
}
if (!checkStatus) {
SmartDialog.showToast(S.of(context).gouxuanxieyi);
return;
@ -270,7 +280,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
eventBus.fire(EventType(3));
xgFlutterPlugin.setAccount(mobile, AccountType.CUSTOM);
xgFlutterPlugin.bindWithIdentifier(identify: mobile, bindType: XGBindType.account);
xgFlutterPlugin.bindWithIdentifier(
identify: mobile, bindType: XGBindType.account);
if (widget.arguments != null) {
Navigator.of(context).pop();
@ -890,6 +901,149 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
duration: Duration(milliseconds: 500), curve: Curves.ease);
}
showAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return SimpleDialog(
titlePadding: EdgeInsets.all(10),
backgroundColor: Colors.transparent,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6))),
children: <Widget>[
Stack(
alignment: Alignment.bottomCenter,
children: [
Container(
alignment: Alignment.center,
width: double.infinity,
height: 305.h,
// margin: EdgeInsets.only(left: 40.w, right: 40.w),
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(top: 24.h, bottom: 10.h),
child: Text(
S.of(context).xieyitanchuang,
style: TextStyle(
color: Color(0xff4D4D4D),
fontSize: 18.sp,
fontWeight: FontWeight.bold,),
),
),
Text.rich(
TextSpan(children: [
TextSpan(
text: S.of(context).yinsizhengce1,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.sp,
height: 1.3.h,
color: Color(0xff727272)),
),
TextSpan(
text: S.of(context).yinsixieyi,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.sp,
color: Color(0xff32A060)),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).popAndPushNamed('/router/treaty_page');
},
),
]),
),
SizedBox(
height: 10.h,
),
Text(
S.of(context).yinsizhengce2,
style: TextStyle(
color: Color(0xff727272),
fontSize: 14.sp,
height: 1.3.h,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 16.h,
),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
height: 40.h,
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 20.h),
child: BorderText(
padding: EdgeInsets.only(
top: 10.h, bottom: 10.h, left: 36.w, right: 36.w),
text: S.of(context).jujue,
fontSize: 12.sp,
textColor: Color(0xFF32A060),
borderColor: Color(0xFF32A060),
borderWidth: 1.w,
radius: 23,
),
),
),
SizedBox(
width: 21.w,
),
Container(
height: 40.h,
margin: EdgeInsets.only(bottom: 20.h),
alignment: Alignment.bottomCenter,
child: RoundButton(
text: S.of(context).tongyibingjixu,
textColor: Colors.white,
fontSize: 12,
callback: () {
SharedPreferences.getInstance().then((value) {
value.setBool("isShowPrivacyPolicy", true);
});
SharesdkPlugin.uploadPrivacyPermissionStatus(
1,
(success) => {
Navigator.of(context).pop(),
});
},
padding: EdgeInsets.only(
top: 10.h,
bottom: 10.h,
left: 21.5.w,
right: 21.5.w),
backgroup: Color(0xff32A060),
radius: 23,
),
),
SizedBox(
height: 20.h,
),
],
),
],
)
],
);
},
);
}
bool isPhone(mobile) {
RegExp exp = RegExp(
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');

16
lib/mine/vip_detail_page.dart

@ -163,10 +163,10 @@ class _VipDetailPage extends State<VipDetailPage> {
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: shopItem(),
child: shopItem(orderInfos[position]),
);
},
// itemCount: orderInfos != null ? orderInfos.length : 0,
itemCount: orderInfos != null ? orderInfos.length : 0,
),
),
),
@ -407,7 +407,7 @@ class _VipDetailPage extends State<VipDetailPage> {
);
}
Widget shopItem() {
Widget shopItem(OrderInfo orderInfo) {
return Container(
margin: EdgeInsets.all(16.w),
child: Column(
@ -420,7 +420,7 @@ class _VipDetailPage extends State<VipDetailPage> {
Expanded(
flex: 1,
child: Text(
"百年川椒重庆老火锅(汉街店)",
(orderInfo != null) ? orderInfo.storeName : "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
@ -429,7 +429,7 @@ class _VipDetailPage extends State<VipDetailPage> {
)),
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/union_detail_page');
Navigator.of(context).pushNamed('/router/union_detail_page',arguments: {"id": orderInfo.storeId});
},
child:Text(
"查看",
@ -462,6 +462,7 @@ class _VipDetailPage extends State<VipDetailPage> {
),
Text(
"楚河汉街第一街区万达总部国际C座对面",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
@ -487,7 +488,10 @@ class _VipDetailPage extends State<VipDetailPage> {
Expanded(
flex: 1,
child: Text(
"10:00-22:00",
(orderInfo.storeVO.openStartTime == null &&
orderInfo.storeVO.openEndTime == null)
? S.of(context).quantian
: "${orderInfo.storeVO.openStartTime.substring(0, orderInfo.storeVO.openStartTime.lastIndexOf(":"))}-${orderInfo.storeVO.openEndTime.substring(0, orderInfo.storeVO.openEndTime.lastIndexOf(":"))}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,

4
pubspec.lock

@ -56,7 +56,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.5.0"
barcode:
dependency: transitive
description:
@ -872,7 +872,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.2.19"
timing:
dependency: transitive
description:

Loading…
Cancel
Save