leon 1 yıl önce
ebeveyn
işleme
e67d92cb10

+ 5 - 4
ios/AppDelegate.mm

@@ -223,14 +223,15 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
 }
 
 //再实现UNUserNotificationCenterDelegate代理的方法
-- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
-{
-    //应用在前台时候接收到本地推送通知、远程推送通知调用此方法
-}
+//- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
+//{
+//    //应用在前台时候接收到本地推送通知、远程推送通知调用此方法
+//}
 
 - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler
 {
     //应用程序在后台,用户通过点击本地推送、远程推送进入app时调用此方法
+  self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(postNotificationData:) userInfo:response repeats:YES];
 }
 
 //iOS 10 消息事件回调

+ 0 - 9
ios/hola/AppDelegate2.h

@@ -1,9 +0,0 @@
-#import <React/RCTBridgeDelegate.h>
-#import <Expo/Expo.h>
-#import <UIKit/UIKit.h>
-
-@interface AppDelegate : EXAppDelegateWrapper <UIApplicationDelegate, RCTBridgeDelegate>
-
-@property (nonatomic, strong) UIWindow *window;
-
-@end

+ 0 - 202
ios/hola/AppDelegate2.mm

@@ -1,202 +0,0 @@
-#import "AppDelegate2.h"
-
-#import <React/RCTBridge.h>
-#import <React/RCTBundleURLProvider.h>
-#import <React/RCTRootView.h>
-
-#import <React/RCTAppSetupUtils.h>
-#import <RCTJPushModule.h>
-#import <JPUSHService.h>
-#if RCT_NEW_ARCH_ENABLED
-#import <React/CoreModulesPlugins.h>
-#import <React/RCTCxxBridgeDelegate.h>
-#import <React/RCTFabricSurfaceHostingProxyRootView.h>
-#import <React/RCTSurfacePresenter.h>
-#import <React/RCTSurfacePresenterBridgeAdapter.h>
-#import <ReactCommon/RCTTurboModuleManager.h>
-
-#import <react/config/ReactNativeConfig.h>
-
-static NSString *const kRNConcurrentRoot = @"concurrentRoot";
-
-@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate,JPUSHRegisterDelegate> {
-  RCTTurboModuleManager *_turboModuleManager;
-  RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
-  std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
-  facebook::react::ContextContainer::Shared _contextContainer;
-}
-@end
-#endif
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
-  // APNS
-    JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
-    if (@available(iOS 12.0, *)) {
-      entity.types = JPAuthorizationOptionNone; //JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSou//nd|JPAuthorizationOptionProvidesAppNotificationSettings;
-    }
-    [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
-  
-  RCTAppSetupPrepareApp(application);
-
-  RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
-
-#if RCT_NEW_ARCH_ENABLED
-  _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
-  _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
-  _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
-  _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
-  bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
-#endif
-
-  NSDictionary *initProps = [self prepareInitialProps];
-  UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"taroDemo" initialProperties:initProps];
-
-  if (@available(iOS 13.0, *)) {
-    rootView.backgroundColor = [UIColor systemBackgroundColor];
-  } else {
-    rootView.backgroundColor = [UIColor whiteColor];
-  }
-
-  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
-  UIViewController *rootViewController = [self.reactDelegate createRootViewController];
-  rootViewController.view = rootView;
-  self.window.rootViewController = rootViewController;
-  [self.window makeKeyAndVisible];
-  [super application:application didFinishLaunchingWithOptions:launchOptions];
-  return YES;
-}
-
-/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
-///
-/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
-/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
-/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
-- (BOOL)concurrentRootEnabled
-{
-  // Switch this bool to turn on and off the concurrent root
-  return true;
-}
-- (NSDictionary *)prepareInitialProps
-{
-  NSMutableDictionary *initProps = [NSMutableDictionary new];
-#ifdef RCT_NEW_ARCH_ENABLED
-  initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
-#endif
-  return initProps;
-}
-
-- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
-{
-#if DEBUG
-  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
-#else
-  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#endif
-}
-
-#if RCT_NEW_ARCH_ENABLED
-
-#pragma mark - RCTCxxBridgeDelegate
-
-- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
-{
-  _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
-                                                             delegate:self
-                                                            jsInvoker:bridge.jsCallInvoker];
-  return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
-}
-
-#pragma mark RCTTurboModuleManagerDelegate
-
-- (Class)getModuleClassFromName:(const char *)name
-{
-  return RCTCoreModulesClassProvider(name);
-}
-
-- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
-                                                      jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
-{
-  return nullptr;
-}
-
-- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
-                                                     initParams:
-                                                         (const facebook::react::ObjCTurboModule::InitParams &)params
-{
-  return nullptr;
-}
-
-- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
-{
-  return RCTAppSetupDefaultModuleFromClass(moduleClass);
-}
-
-#endif
-
-//************************************************JPush start************************************************
-
-//注册 APNS 成功并上报 DeviceToken
-- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
-  [JPUSHService registerDeviceToken:deviceToken];
-}
-
-//iOS 7 APNS
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:  (NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
-  // iOS 10 以下 Required
-  NSLog(@"iOS 7 APNS");
-  [JPUSHService handleRemoteNotification:userInfo];
-  [[NSNotificationCenter defaultCenter] postNotificationName:J_APNS_NOTIFICATION_ARRIVED_EVENT object:userInfo];
-  completionHandler(UIBackgroundFetchResultNewData);
-}
-
-//iOS 10 前台收到消息
-- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center  willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler {
-  NSDictionary * userInfo = notification.request.content.userInfo;
-  if([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
-    // Apns
-    NSLog(@"iOS 10 APNS 前台收到消息");
-    [JPUSHService handleRemoteNotification:userInfo];
-    [[NSNotificationCenter defaultCenter] postNotificationName:J_APNS_NOTIFICATION_ARRIVED_EVENT object:userInfo];
-  }
-  else {
-    // 本地通知 todo
-    NSLog(@"iOS 10 本地通知 前台收到消息");
-    [[NSNotificationCenter defaultCenter] postNotificationName:J_LOCAL_NOTIFICATION_ARRIVED_EVENT object:userInfo];
-  }
-  //需要执行这个方法,选择是否提醒用户,有 Badge、Sound、Alert 三种类型可以选择设置
-  completionHandler(UNNotificationPresentationOptionAlert);
-}
-
-//iOS 10 消息事件回调
-- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler: (void (^)(void))completionHandler {
-  NSDictionary * userInfo = response.notification.request.content.userInfo;
-  if([response.notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
-    // Apns
-    NSLog(@"iOS 10 APNS 消息事件回调");
-    [JPUSHService handleRemoteNotification:userInfo];
-    // 保障应用被杀死状态下,用户点击推送消息,打开app后可以收到点击通知事件
-    [[RCTJPushEventQueue sharedInstance]._notificationQueue insertObject:userInfo atIndex:0];
-    [[NSNotificationCenter defaultCenter] postNotificationName:J_APNS_NOTIFICATION_OPENED_EVENT object:userInfo];
-  }
-  else {
-    // 本地通知
-    NSLog(@"iOS 10 本地通知 消息事件回调");
-    // 保障应用被杀死状态下,用户点击推送消息,打开app后可以收到点击通知事件
-    [[RCTJPushEventQueue sharedInstance]._localNotificationQueue insertObject:userInfo atIndex:0];
-    [[NSNotificationCenter defaultCenter] postNotificationName:J_LOCAL_NOTIFICATION_OPENED_EVENT object:userInfo];
-  }
-  // 系统要求执行这个方法
-  completionHandler();
-}
-
-//自定义消息
-- (void)networkDidReceiveMessage:(NSNotification *)notification {
-  NSDictionary * userInfo = [notification userInfo];
-  [[NSNotificationCenter defaultCenter] postNotificationName:J_CUSTOM_NOTIFICATION_EVENT object:userInfo];
-}
-
-
-@end

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
ios/main.jsbundle


+ 5 - 3
src/features/trackTimeDuration/actions/TrackTimeActions.tsx

@@ -97,7 +97,7 @@ export const endSleep = (start_time: number) => {
             reject(e)
         });
     });
-}
+} 
 
 export const uploadLocalPushInfo = (params) => {
     request({
@@ -110,9 +110,11 @@ export const uploadLocalPushInfo = (params) => {
 
 export const getLocalPush = () => {
     if (process.env.TARO_ENV == 'rn') {
-        PushNotification.checkPermissions((e)=>{
+        console.log('appppple')
+        PushNotification.checkPermissions((res)=>{
+            console.log('sssss',res)
             //允许授权
-            if (e.authorizationStatus == 2){
+            if (res.authorizationStatus == 2){
                 request({
                     url: API_LOCAL_PUSHES, method: 'GET', data: {}
                 }).then(res => {

+ 10 - 7
src/features/trackTimeDuration/components/IndexConsole.tsx

@@ -21,12 +21,13 @@ import CheckAccess from './CheckAccess';
 
 let useNavigation;
 
-let Linking;
-let JPush, checkNotification;
+let Linking,PushNotification;
+let  checkNotification;
 if (process.env.TARO_ENV == 'rn') {
     useNavigation = require("@react-navigation/native").useNavigation
     Linking = require('react-native').Linking;
-    JPush = require('jpush-react-native').default;
+    // JPush = require('jpush-react-native').default;
+    PushNotification = require('react-native-push-notification')
     checkNotification = require('@/utils/native_permission_check').checkNotification;
 }
 let operateType = ''
@@ -547,8 +548,9 @@ export default function IndexConsole(props: { record: any, count: number }) {
                         }
                     }
                     else {
-                        JPush.isNotificationEnabled((res) => {
-                            if (res) {
+                        PushNotification.checkPermissions((res)=>{
+                            //允许授权
+                            if (res.authorizationStatus == 2){
                                 getLocalPush()
                                 // showAlert({
                                 //     title: t('feature.track_time_duration.reminders.fast_end_title'),
@@ -618,8 +620,9 @@ export default function IndexConsole(props: { record: any, count: number }) {
                         }
                     }
                     else {
-                        JPush.isNotificationEnabled((res) => {
-                            if (res) {
+                        PushNotification.checkPermissions((res)=>{
+                            //允许授权
+                            if (res.authorizationStatus == 2){
                                 getLocalPush()
                                 // showAlert({
                                 //     title: t('feature.track_time_duration.reminders.wake_title'),

+ 10 - 7
src/features/trackTimeDuration/components/SetSchedule.rn.tsx

@@ -27,15 +27,16 @@ import { OneSignal } from 'react-native-onesignal';
 
 let useNavigation;
 
-let JPush;
+// let JPush;
 let Linking;
-let checkNotification, uploadPermissions;
+let checkNotification, uploadPermissions,PushNotification;
 if (process.env.TARO_ENV == 'rn') {
     useNavigation = require("@react-navigation/native").useNavigation
     Linking = require('react-native').Linking;
-    JPush = require('jpush-react-native').default;
+    // JPush = require('jpush-react-native').default;
     checkNotification = require('@/utils/native_permission_check').checkNotification;
     uploadPermissions = require('@/utils/native_permission_check').uploadPermissions;
+    PushNotification = require('react-native-push-notification')
 }
 export default function Component() {
     const isFastFirst = true;
@@ -294,8 +295,9 @@ export default function Component() {
     }
 
     function popScheduleAlert(scenario, startTime) {
-        JPush.isNotificationEnabled((res) => {
-            if (res) {
+        PushNotification.checkPermissions((res)=>{
+            //允许授权
+            if (res.authorizationStatus == 2){
                 showAlert({
                     title: t('feature.track_time_duration.reminders.schedule_title'),
                     content: scenario.name == 'FAST' ?
@@ -337,8 +339,9 @@ export default function Component() {
 
     function popMixScheduleAlert(time1, time2) {
         console.log(time1, time2)
-        JPush.isNotificationEnabled((res) => {
-            if (res) {
+        PushNotification.checkPermissions((res)=>{
+            //允许授权
+            if (res.authorizationStatus == 2){
                 showAlert({
                     title: t('feature.track_time_duration.reminders.schedule_title'),
                     content: t('feature.track_time_duration.reminders.enable_schedule_mix_content', { time1: time1, time2: time2 }),

+ 5 - 5
src/features/trackTimeDuration/components/TimelineStage.rn.tsx

@@ -13,7 +13,7 @@ import { rpxToPx } from '@/utils/tools';
 import { AppState } from 'react-native';
 import { useFocusEffect } from '@react-navigation/native';
 import React from 'react';
-import JPush from 'jpush-react-native';
+// import JPush from 'jpush-react-native';
 import { Linking } from 'react-native';
 import { uploadPerm } from '@/services/user';
 
@@ -53,10 +53,10 @@ export default function Component(props: { data: any, title?: string, subTitle?:
 
     function checkPushStatus() {
 
-        JPush.isNotificationEnabled(obj => {
-            setPushEnable(obj)
-            uploadPerm({ push_enabled: obj })
-        })
+        // JPush.isNotificationEnabled(obj => {
+        //     setPushEnable(obj)
+        //     uploadPerm({ push_enabled: obj })
+        // })
     }
 
     function goSetting() {

+ 28 - 26
src/pages/clock/ClockMain.tsx

@@ -65,13 +65,13 @@ let AppState;
 let needScroll = false;
 let showUpdate = false;
 let Linking;
-let JPush;
+let PushNotification;
 let checkNotification, uploadPermissions, NativeAppEventEmitter;
 let messaging;
 
 if (process.env.TARO_ENV == 'rn') {
     messaging = require('@react-native-firebase/messaging').default
-    JPush = require('jpush-react-native').default;
+    PushNotification = require('react-native-push-notification')
     Linking = require('react-native').Linking;
     AppState = require("react-native").AppState
     NativeAppEventEmitter = require("react-native").NativeAppEventEmitter
@@ -157,16 +157,16 @@ export default function Page() {
     useEffect(() => {
 
         if (process.env.TARO_ENV == 'rn') {
-            JPush.setBadge({
-                badge: 0,
-                appBadge: 0
-            })
-            JPush.isNotificationEnabled((res) => {
-                if (res) {
-                    const test = require('@/utils/push').default
-                    test()
-                }
-            })
+            // JPush.setBadge({
+            //     badge: 0,
+            //     appBadge: 0
+            // })
+            // JPush.isNotificationEnabled((res) => {
+            //     if (res) {
+            //         const test = require('@/utils/push').default
+            //         test()
+            //     }
+            // })
 
             AppState.addEventListener('change', handleAppStateChange);
         }
@@ -207,12 +207,12 @@ export default function Page() {
                 }
 
                 // uploadPermissions()
-                JPush.isNotificationEnabled((res) => {
-                    if (res) {
-                        const test = require('@/utils/push').default
-                        test()
-                    }
-                })
+                // JPush.isNotificationEnabled((res) => {
+                //     if (res) {
+                //         const test = require('@/utils/push').default
+                //         test()
+                //     }
+                // })
 
 
                 checkVersionUpdate()
@@ -353,10 +353,10 @@ export default function Page() {
                     Jto.getNotificationAuthStatus()
                 }
             }
-            JPush.setBadge({
-                badge: 0,
-                appBadge: 0
-            })
+            // JPush.setBadge({
+            //     badge: 0,
+            //     appBadge: 0
+            // })
         }
     }
 
@@ -645,8 +645,9 @@ export default function Page() {
             }
         }
         else {
-            JPush.isNotificationEnabled((res) => {
-                if (res) {
+            PushNotification.checkPermissions((res)=>{
+                //允许授权
+                if (res.authorizationStatus == 2){
                     // showAlert({
                     //     title: t('feature.track_time_duration.reminders.schedule_title'),
                     //     content: scenario.name == 'FAST' ?
@@ -703,8 +704,9 @@ export default function Page() {
             }
         }
         else {
-            JPush.isNotificationEnabled((res) => {
-                if (res) {
+            PushNotification.checkPermissions((res)=>{
+                //允许授权
+                if (res.authorizationStatus == 2){
                     // showAlert({
                     //     title: t('feature.track_time_duration.reminders.schedule_title'),
                     //     content: t('feature.track_time_duration.reminders.enable_schedule_mix_content', { time1: time1, time2: time2 }),

+ 9 - 7
src/pages/clock/SetGoal.tsx

@@ -19,13 +19,14 @@ import { getLocalPush } from "@/features/trackTimeDuration/actions/TrackTimeActi
 let OneSignal
 let NativeAppEventEmitter
 let Jto
-let uploadPermissions, checkNotification
+let uploadPermissions, checkNotification,PushNotification
 if (process.env.TARO_ENV == 'rn') {
     OneSignal = require('react-native-onesignal').OneSignal
     NativeAppEventEmitter = require('react-native').NativeAppEventEmitter
     Jto = require('react-native').NativeModules.NativeBridge;
     uploadPermissions = require('@/utils/native_permission_check').uploadPermissions;
     checkNotification = require('@/utils/native_permission_check').checkNotification;
+    PushNotification = require('react-native-push-notification')
 }
 
 export default function SetGoal() {
@@ -357,9 +358,9 @@ export default function SetGoal() {
 
     function popScheduleAlert(scenario, startTime) {
         if (process.env.TARO_ENV === 'rn') {
-            const JPush = require('jpush-react-native').default;
-            JPush.isNotificationEnabled((res) => {
-                if (res) {
+            PushNotification.checkPermissions((res)=>{
+                //允许授权
+                if (res.authorizationStatus == 2){
                     getLocalPush();
                     navigation.popToTop()
                     // showAlert({
@@ -405,10 +406,11 @@ export default function SetGoal() {
     function popMixScheduleAlert(time1, time2) {
         console.log(time1, time2)
         if (process.env.TARO_ENV === 'rn') {
-            const JPush = require('jpush-react-native').default;
+            // const JPush = require('jpush-react-native').default;
             const checkNotification = require('@/utils/native_permission_check').checkNotification;
-            JPush.isNotificationEnabled((res) => {
-                if (res) {
+            PushNotification.checkPermissions((res)=>{
+                //允许授权
+                if (res.authorizationStatus == 2){
                     getLocalPush();
                     navigation.popToTop()
                     // showAlert({

+ 5 - 4
src/utils/native_permission_check.tsx

@@ -1,7 +1,8 @@
 import { getLocalPush } from '@/features/trackTimeDuration/actions/TrackTimeActions';
 import { clientInfo } from '@/services/common';
 import Taro from '@tarojs/taro';
-import JPush from 'jpush-react-native';
+// import JPush from 'jpush-react-native';
+import { PushNotification } from 'react-native-push-notification';
 import { Alert, Linking } from 'react-native';
 import { check, PERMISSIONS, RESULTS, checkMultiple } from 'react-native-permissions';
 // import {OneSignal} from 'react-native-onesignal';
@@ -83,9 +84,9 @@ export const uploadPermissions = () => {
             })
         }
         else {
-            JPush.isNotificationEnabled((res) => {
-                console.log(res)
-                if (res) {
+            PushNotification.checkPermissions((res)=>{
+                //允许授权
+                if (res.authorizationStatus == 2){
                     getLocalPush()
                     clientInfo({
                         perm: {

+ 46 - 46
src/utils/push.tsx

@@ -1,7 +1,7 @@
 
 import showAlert from '@/components/basic/Alert';
 import { clientId } from '@/services/user';
-import JPush from 'jpush-react-native';
+// import JPush from 'jpush-react-native';
 import { title } from 'process';
 import { uploadPermissions } from './native_permission_check';
 import {OneSignal} from 'react-native-onesignal'
@@ -10,53 +10,53 @@ import Taro from '@tarojs/taro';
 export default function jgPush() {
     // const JPush = require('jpush-react-native')
     // debugger
-    JPush.init({ appKey: "7cf918ada725a9e9aecc8a17", channel: "dev", production: false });
-    //连接状态
-    JPush.addConnectEventListener(result => {
-        console.log(result)
-    })
+    // JPush.init({ appKey: "7cf918ada725a9e9aecc8a17", channel: "dev", production: false });
+    // //连接状态
+    // JPush.addConnectEventListener(result => {
+    //     console.log(result)
+    // })
 
-    //通知回调
-    var notificationListener = result => {
-        console.log("notificationListener:" + JSON.stringify(result))
-        // alert(JSON.stringify(result))
-    };
-    JPush.addNotificationListener(notificationListener);
-    //本地通知回调
-    var localNotificationListener = result => {
-        console.log("localNotificationListener:" + JSON.stringify(result))
-    };
-    JPush.addLocalNotificationListener(localNotificationListener);
-    //自定义消息回调
-    var customMessageListener = result => {
-        console.log("customMessageListener:" + JSON.stringify(result))
-    };
-    JPush.addCustomMessageListener(customMessageListener);
-    //应用内消息回调
-    JPush.pageEnterTo("HomePage") // 进入首页,当页面退出时请调用 JPush.pageLeave('HomePage')
-    var inappMessageListener = result => {
-        console.log("inappMessageListener:" + JSON.stringify(result))
-        // alert(JSON.stringify(result))
-    };
-    JPush.addInappMessageListener(inappMessageListener);
-    //tag alias事件回调
-    var tagAliasListener = result => {
-        console.log("tagAliasListener:" + JSON.stringify(result))
-    };
-    JPush.addTagAliasListener(tagAliasListener);
-    //手机号码事件回调
-    var mobileNumberListener = result => {
-        console.log("mobileNumberListener:" + JSON.stringify(result))
-    };
-    JPush.addMobileNumberListener(mobileNumberListener);
+    // //通知回调
+    // var notificationListener = result => {
+    //     console.log("notificationListener:" + JSON.stringify(result))
+    //     // alert(JSON.stringify(result))
+    // };
+    // JPush.addNotificationListener(notificationListener);
+    // //本地通知回调
+    // var localNotificationListener = result => {
+    //     console.log("localNotificationListener:" + JSON.stringify(result))
+    // };
+    // JPush.addLocalNotificationListener(localNotificationListener);
+    // //自定义消息回调
+    // var customMessageListener = result => {
+    //     console.log("customMessageListener:" + JSON.stringify(result))
+    // };
+    // JPush.addCustomMessageListener(customMessageListener);
+    // //应用内消息回调
+    // JPush.pageEnterTo("HomePage") // 进入首页,当页面退出时请调用 JPush.pageLeave('HomePage')
+    // var inappMessageListener = result => {
+    //     console.log("inappMessageListener:" + JSON.stringify(result))
+    //     // alert(JSON.stringify(result))
+    // };
+    // JPush.addInappMessageListener(inappMessageListener);
+    // //tag alias事件回调
+    // var tagAliasListener = result => {
+    //     console.log("tagAliasListener:" + JSON.stringify(result))
+    // };
+    // JPush.addTagAliasListener(tagAliasListener);
+    // //手机号码事件回调
+    // var mobileNumberListener = result => {
+    //     console.log("mobileNumberListener:" + JSON.stringify(result))
+    // };
+    // JPush.addMobileNumberListener(mobileNumberListener);
 
-    JPush.getRegistrationID(obj => {
-        global.registerID = obj.registerID
-        console.log('jiguang id',obj.registerID)
-        setTimeout(() => {
-            clientId()
-        }, 3000)
-    })
+    // JPush.getRegistrationID(obj => {
+    //     global.registerID = obj.registerID
+    //     console.log('jiguang id',obj.registerID)
+    //     setTimeout(() => {
+    //         clientId()
+    //     }, 3000)
+    // })
 
     if (Taro.getSystemInfoSync().platform == 'ios'){
         return;

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor