浏览代码

[feat]增加推送,登录改为登录弹窗

Destiny 6 月之前
父节点
当前提交
8674efdfc3

+ 2 - 2
ios/AiKeyboard/Info.plist

@@ -2,12 +2,12 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>com.qihuan.zhuiaijianpan</string>
 	</array>
-	<key>ITSAppUsesNonExemptEncryption</key>
-	<false/>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 15 - 0
ios/Podfile.lock

@@ -29,6 +29,13 @@ PODS:
   - in_app_purchase_storekit (0.0.1):
     - Flutter
     - FlutterMacOS
+  - JCore (5.0.2)
+  - JPush (5.6.1):
+    - JCore (>= 4.8.0)
+  - jpush_flutter (0.0.2):
+    - Flutter
+    - JCore (>= 5.0.2)
+    - JPush (= 5.6.1)
   - just_audio (0.0.1):
     - Flutter
     - FlutterMacOS
@@ -103,6 +110,7 @@ DEPENDENCIES:
   - flutter_umeng (from `.symlinks/plugins/flutter_umeng/ios`)
   - gravity_engine (from `.symlinks/plugins/gravity_engine/ios`)
   - in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
+  - jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
   - just_audio (from `.symlinks/plugins/just_audio/darwin`)
   - JXSegmentedView
   - keyboard_android (from `.symlinks/plugins/keyboard_android/ios`)
@@ -130,6 +138,8 @@ SPEC REPOS:
   https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
     - Alamofire
     - Bugly
+    - JCore
+    - JPush
     - JXSegmentedView
     - Kingfisher
     - lottie-ios
@@ -166,6 +176,8 @@ EXTERNAL SOURCES:
     :path: ".symlinks/plugins/gravity_engine/ios"
   in_app_purchase_storekit:
     :path: ".symlinks/plugins/in_app_purchase_storekit/darwin"
+  jpush_flutter:
+    :path: ".symlinks/plugins/jpush_flutter/ios"
   just_audio:
     :path: ".symlinks/plugins/just_audio/darwin"
   keyboard_android:
@@ -209,6 +221,9 @@ SPEC CHECKSUMS:
   flutter_umeng: 9005e3f776ff69868f0d75fbb2f11b33fbafc850
   gravity_engine: 750c5f2424a042f334f1154ece41d916eb148d6a
   in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783
+  JCore: 3effa468af29935edb53e6460ef81fd3c03ee1a8
+  JPush: fcd20c0b2d6d8206af63b8517fa2d11e0a83dc6b
+  jpush_flutter: f4768f1136e16dbb126a57371cb9389f85436c82
   just_audio: a42c63806f16995daf5b219ae1d679deb76e6a79
   JXSegmentedView: cd73555ce2134d1656db2cb383ba9c2f36fb5078
   keyboard_android: f9c2c09930d97b29711ca9d4addc3ffa6253799d

+ 9 - 2
ios/Runner.xcodeproj/project.pbxproj

@@ -168,6 +168,8 @@
 		FE05FA2D2DCE0CFC00CBA944 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
 		FE8F00052DCC4A7B00AA2562 /* AiKeyboard.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AiKeyboard.entitlements; sourceTree = "<group>"; };
 		FE8F00092DCC4D6F00AA2562 /* FlutterMethodChannelManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterMethodChannelManager.swift; sourceTree = "<group>"; };
+		FE9139CA2DE83AB5001A8E42 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
+		FE9139CB2DE83AB5001A8E42 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
 		FED899702DD1D044001808D5 /* KeyboardTipsPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardTipsPopView.swift; sourceTree = "<group>"; };
 		FED899782DD3446A001808D5 /* KeyboardGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardGuideView.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -502,11 +504,11 @@
 			};
 			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
 			compatibilityVersion = "Xcode 9.3";
-			developmentRegion = en;
+			developmentRegion = "zh-Hans";
 			hasScannedForEncodings = 0;
 			knownRegions = (
-				en,
 				Base,
+				"zh-Hans",
 			);
 			mainGroup = 97C146E51CF9000F007C117D;
 			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -766,6 +768,7 @@
 			isa = PBXVariantGroup;
 			children = (
 				97C146FB1CF9000F007C117D /* Base */,
+				FE9139CA2DE83AB5001A8E42 /* zh-Hans */,
 			);
 			name = Main.storyboard;
 			sourceTree = "<group>";
@@ -774,6 +777,7 @@
 			isa = PBXVariantGroup;
 			children = (
 				97C147001CF9000F007C117D /* Base */,
+				FE9139CB2DE83AB5001A8E42 /* zh-Hans */,
 			);
 			name = LaunchScreen.storyboard;
 			sourceTree = "<group>";
@@ -921,6 +925,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
@@ -1053,6 +1058,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
@@ -1110,6 +1116,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";

+ 3 - 0
ios/Runner/AppDelegate.swift

@@ -30,6 +30,9 @@ import UIKit
             self.hasLaunched = true
         }
       
+        JPUSHService.setup(withOption: launchOptions, appKey: "e4c8b538fa1046eccce756de", channel: "appStore", apsForProduction: false)
+//      JPUSHService.setup(withOption: )
+      
         return super.application(application, didFinishLaunchingWithOptions: launchOptions)
   }
     

+ 1 - 0
ios/Runner/Runner-Bridging-Header.h

@@ -1 +1,2 @@
 #import "GeneratedPluginRegistrant.h"
+#import "JPUSHService.h"

+ 2 - 0
ios/Runner/Runner.entitlements

@@ -2,6 +2,8 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+	<key>aps-environment</key>
+	<string>development</string>
 	<key>com.apple.developer.applesignin</key>
 	<array>
 		<string>Default</string>

+ 16 - 5
lib/di/get_it.config.dart

@@ -159,13 +159,24 @@ extension GetItInjectableX on _i174.GetIt {
     gh.factory<_i101.KeyboardTutorialVideoController>(
       () => _i101.KeyboardTutorialVideoController(),
     );
-    gh.factory<_i232.DeleteProfileConfirmController>(
-      () => _i232.DeleteProfileConfirmController(),
+    gh.factory<_i421.KeyboardTutorialVideoIosViewController>(
+      () => _i421.KeyboardTutorialVideoIosViewController(),
+    );
+    gh.factory<_i925.KeyboardTutorialVideoAndroidViewController>(
+      () => _i925.KeyboardTutorialVideoAndroidViewController(),
+    );
+    gh.factory<_i507.KeyboardTutorialController>(
+      () => _i507.KeyboardTutorialController(),
+    );
+    gh.factory<_i842.KeyboardTutorialIosViewController>(
+      () => _i842.KeyboardTutorialIosViewController(),
+    );
+    gh.factory<_i1022.KeyboardTutorialAndroidViewController>(
+      () => _i1022.KeyboardTutorialAndroidViewController(),
     );
-    gh.factory<_i973.SplashController>(() => _i973.SplashController());
     gh.factory<_i333.DiscountController>(() => _i333.DiscountController());
-    gh.factory<_i415.KeyboardMethodHandler>(
-      () => _i415.KeyboardMethodHandler(),
+    gh.factory<_i827.RecoverSubscribeController>(
+      () => _i827.RecoverSubscribeController(),
     );
     gh.singleton<_i482.JpushHelper>(() => _i482.JpushHelper());
     gh.lazySingleton<_i495.WechatLoginService>(

+ 1 - 5
lib/module/character/content/character_group_content_controller.dart

@@ -141,11 +141,7 @@ class CharacterGroupContentController extends BaseController {
     AtmobLog.d(tag, 'characterInfo ${characterInfo.toJson()} ');
     if (isLogin == false) {
       ToastUtil.show('请先登录~');
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
     CharacterDetailsDialog.show(

+ 1 - 5
lib/module/character_custom/detail/character_custom_detail_controller.dart

@@ -331,11 +331,7 @@ class CharacterCustomDetailController extends BaseController {
           StorePage.start();
           ToastUtil.show(error.message);
         } else if (error.code == ErrorCode.noLoginError) {
-          if (PlatformUtil.isIOS) {
-            LoginPage.start();
-          } else {
-            LoginDialog.show();
-          }
+          LoginDialog.show();
         } else {
           ErrorHandler.toastError(error);
         }

+ 1 - 5
lib/module/character_custom/list/character_custom_list_controller.dart

@@ -116,11 +116,7 @@ class CharacterCustomListController extends BaseController {
       if (error is ServerErrorException) {
         if (error.code == ErrorCode.noLoginError) {
           ErrorHandler.toastError(error);
-          if (PlatformUtil.isIOS) {
-            LoginPage.start();
-          } else {
-            LoginDialog.show();
-          }
+          LoginDialog.show();
         } else {
           ToastUtil.show(error.message);
         }

+ 1 - 5
lib/module/intro/intro_controller.dart

@@ -136,11 +136,7 @@ class IntroController extends BaseController {
         ToastUtil.show("您已登录~");
         return;
       }
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
     });
     EventHandler.report(EventId.event_01002);
   }

+ 4 - 20
lib/module/keyboard_manage/keyboard_manage_controller.dart

@@ -455,11 +455,7 @@ class KeyboardManageController extends BaseController
             if (error is ServerErrorException) {
               ErrorHandler.toastError(error);
               if (error.code == ErrorCode.noLoginError) {
-                if (PlatformUtil.isIOS) {
-                  LoginPage.start();
-                } else {
-                  LoginDialog.show();
-                }
+                LoginDialog.show();
               }
             } else {
               ToastUtil.show(StringName.keyboardSaveFailed);
@@ -486,11 +482,7 @@ class KeyboardManageController extends BaseController
             if (error is ServerErrorException) {
               ErrorHandler.toastError(error);
               if (error.code == ErrorCode.noLoginError) {
-                if (PlatformUtil.isIOS) {
-                  LoginPage.start();
-                } else {
-                  LoginDialog.show();
-                }
+                LoginDialog.show();
               }
             } else {
               ToastUtil.show(StringName.keyboardSaveFailed);
@@ -522,11 +514,7 @@ class KeyboardManageController extends BaseController
   clickAddCharacter({required bool isCustom}) {
     if (!isLogin) {
       ToastUtil.show("请先登录");
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
     if (isCustom) {
@@ -552,11 +540,7 @@ class KeyboardManageController extends BaseController
   clickCustomCharacter() {
     if (!isLogin) {
       ToastUtil.show("请先登录");
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
     AtmobLog.i(tag, 'clickCustomCharacter');

+ 4 - 23
lib/module/mine/mine_controller.dart

@@ -69,11 +69,7 @@ class MineController extends BaseController {
     if (isLogin) {
       UserInfoPage.start();
     } else {
-      // if (PlatformUtil.isIOS) {
-      //   LoginPage.start();
-      // } else {
-        LoginDialog.show();
-      // }
+      LoginDialog.show();
     }
     // KeyboardAndroidPlatform.enableFloatingWindow(true);
     // KeyboardAndroidPlatform.openInputMethodSettings();
@@ -88,11 +84,7 @@ class MineController extends BaseController {
       goToCustomerService();
     } else {
       ToastUtil.show('请先登录');
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
   }
@@ -123,13 +115,7 @@ class MineController extends BaseController {
       EventHandler.report(EventId.event_14001);
       UserInfoPage.start();
     } else {
-      // if (PlatformUtil.isIOS) {
-      //   LoginPage.start();
-      // } else {
-        LoginDialog.show();
-      // }
-      // LoginPage.start();
-      // LoginDialog.show();
+      LoginDialog.show();
     }
   }
 
@@ -172,12 +158,7 @@ class MineController extends BaseController {
     } else {
       EventHandler.report(EventId.event_14010);
       ToastUtil.show('请先登录');
-
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
   }

+ 2 - 10
lib/module/profile/profile_controller.dart

@@ -110,11 +110,7 @@ class ProfileController extends BaseController {
         if (error is ServerErrorException) {
           ErrorHandler.toastError(error);
           if (error.code == ErrorCode.noLoginError) {
-            if (PlatformUtil.isIOS) {
-              LoginPage.start();
-            } else {
-              LoginDialog.show();
-            }
+            LoginDialog.show();
           }
         } else {
           AtmobLog.d(tag, " $error");
@@ -130,11 +126,7 @@ class ProfileController extends BaseController {
     if (!isUser) {
       if (isLogin == false) {
         ToastUtil.show('请先登录~');
-        if (PlatformUtil.isIOS) {
-          LoginPage.start();
-        } else {
-          LoginDialog.show();
-        }
+        LoginDialog.show();
         return;
       }
 

+ 1 - 5
lib/module/store/new_discount/new_discount_controller.dart

@@ -314,11 +314,7 @@ class NewDiscountController extends BaseController
               ToastUtil.show(error.message);
             } else if (error.code == ErrorCode.noLoginError) {
               ToastUtil.show(StringName.accountNoLogin);
-              if (PlatformUtil.isIOS) {
-                LoginPage.start();
-              } else {
-                LoginDialog.show();
-              }
+              LoginDialog.show();
             } else {
               ToastUtil.show(error.message);
               paymentFail();

+ 1 - 5
lib/module/store/store_controller.dart

@@ -330,11 +330,7 @@ class StoreController extends BaseController implements PaymentStatusCallback {
               ToastUtil.show(error.message);
             } else if (error.code == ErrorCode.noLoginError) {
               ToastUtil.show(StringName.accountNoLogin);
-              if (PlatformUtil.isIOS) {
-                LoginPage.start();
-              } else {
-                LoginDialog.show();
-              }
+              LoginDialog.show();
             } else {
               ToastUtil.show(error.message);
               paymentFail();

+ 1 - 5
lib/module/zodiac_love_intimacy/future_week/zodiac_love_future_week_controller.dart

@@ -78,11 +78,7 @@ class ZodiacLoveFutureWeekController extends BaseController {
         // 未登录
         if (error.code == ErrorCode.noLoginError) {
           ToastUtil.show(StringName.accountNoLogin);
-          if (PlatformUtil.isIOS) {
-            LoginPage.start();
-          } else {
-            LoginDialog.show();
-          }
+          LoginDialog.show();
         } else if (error.code == ErrorCode.noMember) {
           // 需要VIP
           ToastUtil.show(StringName.needVipTip);

+ 1 - 5
lib/module/zodiac_love_intimacy/tody/zodiac_love_today_controller.dart

@@ -73,11 +73,7 @@ class ZodiacLoveTodayController extends BaseController {
         // 未登录
         if (error.code == ErrorCode.noLoginError) {
           ToastUtil.show(StringName.accountNoLogin);
-          if (PlatformUtil.isIOS) {
-            LoginPage.start();
-          } else {
-            LoginDialog.show();
-          }
+          LoginDialog.show();
         } else if (error.code == ErrorCode.noMember) {
           // 需要VIP
           ToastUtil.show(StringName.needVipTip);

+ 1 - 5
lib/module/zodiac_love_intimacy/zodiac_love_intimacy_controller.dart

@@ -170,11 +170,7 @@ class ZodiacLoveIntimacyController extends BaseController
         // 未登录
         if (error.code == ErrorCode.noLoginError) {
           ToastUtil.show(StringName.accountNoLogin);
-          if (PlatformUtil.isIOS) {
-            LoginPage.start();
-          } else {
-            LoginDialog.show();
-          }
+          LoginDialog.show();
         } else if (error.code == ErrorCode.noMember) {
           // 需要VIP
           ToastUtil.show(StringName.needVipTip);

+ 1 - 5
lib/module/zodiac_love_intimacy/zodiac_love_intimacy_page.dart

@@ -39,11 +39,7 @@ class ZodiacLoveIntimacyPage extends BasePage<ZodiacLoveIntimacyController> {
     // 未登录,要求先登录
     if (!accountRepository.isLogin.value) {
       ToastUtil.show(StringName.accountNoLogin);
-      if (PlatformUtil.isIOS) {
-        LoginPage.start();
-      } else {
-        LoginDialog.show();
-      }
+      LoginDialog.show();
       return;
     }
 

+ 0 - 2
lib/sdk/jpush/jpush_helper.dart

@@ -31,8 +31,6 @@ class JpushHelper {
       _jpush.addEventHandler(
         onReceiveNotification: (Map<String, dynamic> message) async {
           AtmobLog.d(tag, "flutter onReceiveNotification: $message");
-
-
         },
         onOpenNotification: (Map<String, dynamic> message) async {
           AtmobLog.d(tag, "flutter onOpenNotification: $message");

+ 0 - 1
lib/utils/method_chanel_ios_util.dart

@@ -28,7 +28,6 @@ class MethodChanelIOSUtil {
   static Future<dynamic> _handleMethod(MethodCall call) async {
     switch (call.method) {
       case 'navigateToLogin':
-        ToastUtil.show("navigateToLogin");
         LoginPage.start();
         break;
       case 'navigateToMember':

+ 1 - 1
pubspec.yaml

@@ -3,7 +3,7 @@ description: "A new Flutter project."
 
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
-version: 1.1.1+10
+version: 1.1.1+13
 
 environment:
   sdk: ^3.7.0