Browse Source

Merge branch 'master' into dev

null_safety
w-R 4 years ago
parent
commit
50cd1afe15
  1. BIN
      android/app/libs/BaiduLBS_Android.jar
  2. BIN
      assets/image/2x/brand_store_bg.png
  3. BIN
      assets/image/2x/brand_store_cj.png
  4. BIN
      assets/image/2x/brand_store_hx.png
  5. BIN
      assets/image/2x/ic_splash_bg.png
  6. BIN
      assets/image/3x/brand_store_bg.png
  7. BIN
      assets/image/3x/brand_store_cj.png
  8. BIN
      assets/image/3x/brand_store_hx.png
  9. BIN
      assets/image/3x/ic_splash_bg.png
  10. BIN
      assets/image/brand_store_bg.png
  11. BIN
      assets/image/brand_store_cj.png
  12. BIN
      assets/image/brand_store_hx.png
  13. BIN
      assets/image/ic_splash_bg.png
  14. 3
      ios/Runner.xcodeproj/project.pbxproj
  15. 14
      ios/Runner/Base.lproj/LaunchScreen.storyboard
  16. 1
      ios/Runner/Info.plist
  17. 12
      lib/home/home_page.dart
  18. 2
      lib/home/points_mall_page.dart
  19. 12
      lib/integral/integral_page.dart
  20. 41
      lib/login/login_page.dart
  21. 2
      lib/mine/mine_vip_level_page.dart
  22. 6
      lib/setting/setting_page.dart
  23. 7
      lib/union/store_details_page.dart
  24. 7
      lib/union/union_details_page.dart

BIN
android/app/libs/BaiduLBS_Android.jar

Binary file not shown.

BIN
assets/image/2x/brand_store_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

BIN
assets/image/2x/brand_store_cj.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

BIN
assets/image/2x/brand_store_hx.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

BIN
assets/image/2x/ic_splash_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
assets/image/3x/brand_store_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

BIN
assets/image/3x/brand_store_cj.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

BIN
assets/image/3x/brand_store_hx.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

BIN
assets/image/3x/ic_splash_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
assets/image/brand_store_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

BIN
assets/image/brand_store_cj.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

BIN
assets/image/brand_store_hx.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

BIN
assets/image/ic_splash_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

3
ios/Runner.xcodeproj/project.pbxproj

@ -872,6 +872,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@ -1098,6 +1099,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@ -1217,6 +1219,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;

14
ios/Runner/Base.lproj/LaunchScreen.storyboard

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--View Controller--> <!--View Controller-->
@ -14,9 +16,11 @@
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="19.5" y="73" width="375" height="750"/>
</imageView> </imageView>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -28,10 +32,10 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="53" y="375"/> <point key="canvasLocation" x="76.811594202898561" y="251.11607142857142"/>
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="LaunchImage" width="168" height="185"/> <image name="LaunchImage" width="375" height="750"/>
</resources> </resources>
</document> </document>

1
ios/Runner/Info.plist

@ -151,6 +151,5 @@
<string>https://hx.lotus-wallet.com/app/</string> <string>https://hx.lotus-wallet.com/app/</string>
<key>io.flutter.embedded_views_preview</key> <key>io.flutter.embedded_views_preview</key>
<string>YES</string> <string>YES</string>
</dict> </dict>
</plist> </plist>

12
lib/home/home_page.dart

@ -181,7 +181,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
moreText: S.of(context).renwuzhongxin, moreText: S.of(context).renwuzhongxin,
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString('token') == null) { if (value.getString('token') == null || value.getString('token') == "") {
loginTips(); loginTips();
} else { } else {
Navigator.of(context).pushNamed('/router/integral_page'); Navigator.of(context).pushNamed('/router/integral_page');
@ -192,7 +192,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
InkWell( InkWell(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString('token') == null) { if (value.getString('token') == null || value.getString('token') == "") {
loginTips(); loginTips();
} else { } else {
Navigator.of(context).pushNamed('/router/integral_page'); Navigator.of(context).pushNamed('/router/integral_page');
@ -213,10 +213,10 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
}, },
), ),
hotList(), hotList(),
// ItemTitle( ItemTitle(
// text: S.of(context).chuangshirendegushi1, text: S.of(context).chuangshirendegushi1,
// imgPath: "assets/image/icon_founder.png", imgPath: "assets/image/icon_founder.png",
// ), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/founder_story_page'); Navigator.of(context).pushNamed('/router/founder_story_page');

2
lib/home/points_mall_page.dart

@ -292,7 +292,7 @@ class _PointsMallPage extends State<PointsMallPage>
arguments: {"goodsId": goods[index].id}); arguments: {"goodsId": goods[index].id});
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
String token = sharedPreferences.getString("token"); String token = sharedPreferences.getString("token");
if (token != null) queryUser(); if (token != null && token != "") queryUser();
} }
_sortChange(item) { _sortChange(item) {

12
lib/integral/integral_page.dart

@ -322,7 +322,7 @@ class _IntegralPage extends State<IntegralPage> {
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500,),
), ),
SizedBox( SizedBox(
height: 10.h, height: 10.h,
@ -442,7 +442,7 @@ class _IntegralPage extends State<IntegralPage> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFF353535)), color: Color(0xFF353535),),
), ),
SizedBox( SizedBox(
height: 10.h, height: 10.h,
@ -465,7 +465,7 @@ class _IntegralPage extends State<IntegralPage> {
mainAxisSpacing: 8.h, mainAxisSpacing: 8.h,
crossAxisSpacing: 18.w, crossAxisSpacing: 18.w,
padding: EdgeInsets.only(bottom: 32.h), padding: EdgeInsets.only(bottom: 32.h),
physics: new NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return signInItem(position); return signInItem(position);
}, },
@ -557,6 +557,8 @@ class _IntegralPage extends State<IntegralPage> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") != null && value.getString("token") != "") {
Navigator.of(context) Navigator.of(context)
.pushNamed('/router/mine_vip_level_page', arguments: { .pushNamed('/router/mine_vip_level_page', arguments: {
"rankLevel": rankLevel, "rankLevel": rankLevel,
@ -565,6 +567,10 @@ class _IntegralPage extends State<IntegralPage> {
"points": "points":
(userinfo != null) ? int.tryParse(userinfo.points) : 0, (userinfo != null) ? int.tryParse(userinfo.points) : 0,
}); });
} else {
}
});
}, },
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

41
lib/login/login_page.dart

@ -289,7 +289,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
xgFlutterPlugin.bindWithIdentifier( xgFlutterPlugin.bindWithIdentifier(
identify: mobile, bindType: XGBindType.account); identify: mobile, bindType: XGBindType.account);
Navigator.of(context).pushNamedAndRemoveUntil('/router/main_page', (route) => false); Navigator.of(context)
.pushNamedAndRemoveUntil('/router/main_page', (route) => false);
} else { } else {
SmartDialog.showToast("${value.msg}", alignment: Alignment.center); SmartDialog.showToast("${value.msg}", alignment: Alignment.center);
} }
@ -365,10 +366,9 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
return AnimatedCrossFade( return AnimatedCrossFade(
firstChild: Container( firstChild: Container(
color: Colors.white, color: Colors.white,
child: Platform.isAndroid child: Image.asset(
? Container() "assets/image/ic_splash_bg.png",
: Container( fit: BoxFit.fill,
// child: Image.asset("name"),
), ),
), ),
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) {
@ -394,7 +394,16 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
], ],
); );
}, },
secondChild: Scaffold( secondChild: uiPage(),
firstCurve: Curves.easeInQuart,
secondCurve: Curves.easeInQuart,
crossFadeState: isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst,
duration: Duration(milliseconds: Platform.isIOS ? 1000 : 1000),
);
}
Widget uiPage() {
return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: GestureDetector( body: GestureDetector(
@ -410,7 +419,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
children: [ children: [
PhotoView( PhotoView(
imageProvider: AssetImage("assets/image/laoban.png"), imageProvider: AssetImage("assets/image/laoban.png"),
initialScale: Platform.isAndroid ? 1.02 : 1.2, initialScale: Platform.isAndroid ? 1.02 : 1.15,
basePosition: alignmentProgress, basePosition: alignmentProgress,
), ),
Positioned( Positioned(
@ -489,16 +498,13 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
top: 0, top: 0,
), ),
Positioned( Positioned(
top: top: MediaQuery.of(context).size.height * 0.1039,
MediaQuery.of(context).size.height * 0.1039,
bottom: 0, bottom: 0,
child: Container( child: Container(
padding: padding: EdgeInsets.symmetric(horizontal: 40.w),
EdgeInsets.symmetric(horizontal: 40.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Opacity( Opacity(
opacity: (255 - changeAlpha) / 255, opacity: (255 - changeAlpha) / 255,
@ -579,8 +585,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
if (widget.arguments != null) { if (widget.arguments != null) {
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
Navigator.of(context) Navigator.of(context).popAndPushNamed('/router/main_page');
.popAndPushNamed('/router/main_page');
} }
}, },
child: Visibility( child: Visibility(
@ -628,12 +633,6 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
], ],
), ),
), ),
),
firstCurve: Curves.easeInOut,
secondCurve: Curves.easeInOut,
crossFadeState:
isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst,
duration: Duration(milliseconds: 1200),
); );
} }

2
lib/mine/mine_vip_level_page.dart

@ -70,7 +70,7 @@ class _MineVipLevelPage extends State<MineVipLevelPage> {
child: Column( child: Column(
children: [ children: [
AspectRatio( AspectRatio(
aspectRatio: 1.8, aspectRatio: 1.7,
child: Swiper( child: Swiper(
viewportFraction: 0.95, viewportFraction: 0.95,
loop: false, loop: false,

6
lib/setting/setting_page.dart

@ -236,14 +236,10 @@ class _SettingPage extends State<SettingPage> {
sharedPreferences.setString("mobile", ""); sharedPreferences.setString("mobile", "");
sharedPreferences.setString("nick", ""); sharedPreferences.setString("nick", "");
Navigator.pushAndRemoveUntil(context, new MaterialPageRoute( Navigator.of(context).pushNamedAndRemoveUntil('/router/login_page', (route) => false);
builder: (BuildContext context) {
if (xgFlutterPlugin != null) { if (xgFlutterPlugin != null) {
xgFlutterPlugin.stopXg(); xgFlutterPlugin.stopXg();
} }
return LoginPage();
},
), (route) => route == null);
} }
Widget settingItem(left, right) { Widget settingItem(left, right) {

7
lib/union/store_details_page.dart

@ -187,9 +187,14 @@ class _StoreDetailsPage extends State<StoreDetailsPage> {
), ),
onTap: () { onTap: () {
if (activity != null) { if (activity != null) {
if (widget.arguments["source"] != null
&& widget.arguments["source"] == activity.storeId) {
Navigator.of(context).pop();
} else {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/union_detail_page', '/router/union_detail_page',
arguments: {"id": activity.storeId}); arguments: {"id": activity.storeId, "source": widget.arguments["activityId"]});
}
} }
}, },
), ),

7
lib/union/union_details_page.dart

@ -743,8 +743,13 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return InkWell( return InkWell(
onTap: () { onTap: () {
if (widget.arguments["source"] != null
&& widget.arguments["source"] == activitys[position].id) {
Navigator.of(context).pop();
} else {
Navigator.of(context).pushNamed('/router/store_detail_page', Navigator.of(context).pushNamed('/router/store_detail_page',
arguments: {"activityId": activitys[position].id}); arguments: {"activityId": activitys[position].id, "source": widget.arguments["id"]});
}
}, },
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),

Loading…
Cancel
Save