瀏覽代碼

feat:指令

menghui 3 月之前
父節點
當前提交
efb93f0588

文件差異過大導致無法顯示
+ 453 - 446
HBuilder-uniPluginDemo/Pods/Pods.xcodeproj/project.pbxproj


+ 2 - 0
HBuilder-uniPluginDemo/Pods/Target Support Files/PBSDK/PBSDK-umbrella.h

@@ -16,6 +16,7 @@
 #import "NSDictionary+Log.h"
 #import "NSString+unicode.h"
 #import "PBToken.h"
+#import "TokenManager.h"
 #import "PBConstants.h"
 #import "PBDefines.h"
 #import "PBIMCenter.h"
@@ -62,6 +63,7 @@
 #import "CMWarnHUD.h"
 #import "CHTCollectionViewWaterfallLayout.h"
 #import "PBSelectActionSheet.h"
+#import "UIWindow+root.h"
 #import "LMHWaterFallLayout.h"
 
 FOUNDATION_EXPORT double PBSDKVersionNumber;

二進制
HBuilder-uniPluginDemo/uniPlugin.xcworkspace/xcuserdata/zhangling.xcuserdatad/UserInterfaceState.xcuserstate


+ 16 - 0
HBuilder-uniPluginDemo/uniPlugin.xcworkspace/xcuserdata/zhangling.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -52,5 +52,21 @@
             landmarkType = "3">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "3AF1228D-3725-4224-A27E-211479B062B6"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../../playBall/PBSDK/Classes/Pages/controller/live/LiveRoom/View/PBLiveRoomHeadView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "238"
+            endingLineNumber = "238"
+            landmarkName = "-clickTest1"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 3 - 0
WQPlayBallLiveQiu/WQPlayBallLiveQiu/Classes/LiveAppProxy.m

@@ -1,5 +1,7 @@
 
 #import "LiveAppProxy.h"
+#import <PBSDK/PBSDK.h>
+
 
 @implementation LiveAppProxy
 
@@ -9,6 +11,7 @@
 
 - (BOOL)application:(UIApplication *_Nullable)application didFinishLaunchingWithOptions:(NSDictionary *_Nullable)launchOptions {
     NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
+    PBSDK.shared.isUser = true;
     return YES;
 }
 

+ 8 - 5
WQPlayBallLiveQiu/WQPlayBallLiveQiu/Classes/LiveListComponent.m

@@ -8,10 +8,9 @@
 
 #import "LiveListComponent.h"
 #import "DCUni/DCUniConvert.h"
-#import <MapKit/MapKit.h>
 #import "PBHomeViewController.h"
 
-@interface LiveListComponent () <MKMapViewDelegate>
+@interface LiveListComponent () 
 
 
 @property (nonatomic,strong) PBHomeViewController *homeViewController;
@@ -38,11 +37,15 @@
     
     return self.homeViewController.view;
 }
-
+- (PBHomeViewController *)homeViewController{
+    if(!_homeViewController){
+        _homeViewController = [[PBHomeViewController alloc] init];
+    }
+    return _homeViewController;
+}
 - (void)viewDidLoad {
     
-    self.homeViewController = [[PBHomeViewController alloc] init];
-    
+
 }
 
 /// 前端更新属性回调方法

+ 8 - 0
WQPlayBallLiveQiu/WQPlayBallLiveQiu/Classes/LiveModule.m

@@ -10,6 +10,8 @@
 #import "WQOptions.h"
 #import <MJExtension/MJExtension.h>
 #import <PBSDK/PBSDK.h>
+#import "PBUser.h"
+#import "TokenManager.h"
 
 @implementation LiveModule
 - (instancetype)init{
@@ -47,9 +49,15 @@ UNI_EXPORT_METHOD_SYNC(@selector(sendCommand:))
     if(options.cmd == 1000){
         //登陆
         WQCMD1000 * data = [WQCMD1000 mj_objectWithKeyValues:options.data];
+        
+        data.accessToken = @"57ffeb3e3b4f4f80bb38b641afe7b7b0";
+        
+        [[NSUserDefaults standardUserDefaults]setValue:data.accessToken forKey:@"token"];
         PBSDK.shared.accessToken = data.accessToken;
         PBSDK.shared.expiresTime = data.expiresTime;
         PBSDK.shared.refreshToken = data.refreshToken;
+        
+        [TokenManager.shared start];
         //用户信息
         
         

+ 0 - 22
WQPlayBallLiveQiu/WQPlayBallLiveQiu/Classes/TokenManager.h

@@ -1,22 +0,0 @@
-//
-//  TakenManager.h
-//  WQPlayBallLiveQiu
-//
-//  Created by xx on 2024/12/29.
-//
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface TokenManager : NSObject
-
-
-+ (TokenManager *)shared;
-
-@property (nonatomic,assign)double refreshTime;
-
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 64
WQPlayBallLiveQiu/WQPlayBallLiveQiu/Classes/TokenManager.m

@@ -1,64 +0,0 @@
-//
-//  TakenManager.m
-//  WQPlayBallLiveQiu
-//
-//  Created by xx on 2024/12/29.
-//
-
-#import "TokenManager.h"
-#import "PBNetwork.h"
-#import "PBSDK.h"
-#import "PBToken.h"
-#import "MJExtension/MJExtension.h"
-
-
-@interface TokenManager()
-
-@property (nonatomic,strong) NSDate *lastDate;//上次更新时间
-
-
-@end
-
-
-@implementation TokenManager
-
-
-+ (TokenManager *)shared{
-    static dispatch_once_t onceToken;
-    
-    static TokenManager *m = nil;
-    dispatch_once(&onceToken, ^{
-        m = [[TokenManager alloc] init];
-    });
-    return m;
-}
-
-- (instancetype)init
-{
-    self = [super init];
-    if (self) {
-        self.refreshTime = 30*60*60 ;//秒
-    }
-    return self;
-}
-
-
-- (void)start{
-    //
-    
-    [PBNetwork refreshToken:PBSDK.shared.refreshToken successBack:^(PBReslut * _Nonnull reslut) {
-        if(reslut.code == 200){
-            PBToken *token = [PBToken mj_objectWithKeyValues:reslut.data] ;
-            
-            PBSDK.shared.accessToken = token.token;
-            PBSDK.shared.expiresTime = token.expiresTime;
-            PBSDK.shared.refreshToken = token.refreshToken;;
-            
-            
-        }
-    } errorBack:^{
-        
-    }];
-}
-
-@end

部分文件因文件數量過多而無法顯示