cdts/xdts-ios 3/TreeHole/Code/Base/PYAppService.h

108 lines
2.9 KiB
C
Raw Normal View History

2023-07-27 09:20:00 +08:00
//
// QSAppService.h
// QSport
//
// Created by ko1o on 2019/6/6.
// Copyright © 2019年 ko1o. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <WXApi.h>
#import "AppConfig.h"
#import "VIPViewController.h"
#import "KSPhotoBrowser.h"
#import <CoreLocation/CLLocationManager.h>>
@class User, Activity;
FOUNDATION_EXTERN NSString * _Nonnull const LoginSuccessNotification;
FOUNDATION_EXTERN NSString * _Nonnull const LogoutSuccessNotification;
FOUNDATION_EXTERN NSString * _Nonnull const BuyVIPSuccessNotification;
FOUNDATION_EXTERN NSString * _Nonnull const BuyBottleSuccessNotification;
FOUNDATION_EXTERN NSString * _Nonnull const BuyCoinSuccessNotification;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, AuthorizationType) {
AuthorizationTypePhoto, // 相册
AuthorizationTypeCapture, // 相机
AuthorizationTypeMicrophone, // 麦克风
AuthorizationTypeLocation, // 定位权限
};
@interface PYAppService : NSObject <WXApiDelegate>
+ (instancetype)sharedService;
@property (nonatomic, copy)NSString *idfa;
@property (nonatomic, copy)NSString *gyUid;
@property (nonatomic, copy)NSDictionary *gyPreTokenDic;
@property (nonatomic, strong) CLLocationManager *cLLocationManager;
+ (UINavigationController *)currentNavigationController;
+ (UIViewController *)currentViewController;
+ (int)selectedTabItemIndex;
+ (void) setTabbarSelectedItem:(int)itemIndex;
+ (void)showBadgeOnTabBarItemAtIndex:(int)index number:(int)number;
+ (UIWindow *)frontFullScreenWindow;
+ (void)openWebVCWithTitle:(NSString *)title url:(NSString *)url;
+ (void)openSafariVCWithTitle:(NSString *)title url:(NSString *)url;
+ (VIPViewController *)showVipVC:(NSString *)vipSource;
+ (VIPViewController *)sendVipVC:(NSString *)vipSource forUserID:(NSString *)userID;
+ (void)showFastVipToBuy:(NSString *)source;
+ (void)showVipAlertWithPath:(NSString * _Nullable)path title:(NSString *)title msg:(NSString *)msg source:(NSString *)source;
+ (void)pushViewControllerAnimated:(UIViewController *)vc;
+ (BOOL)isPhoneVaild:(NSString *)account;
+ (void)showLoginVC;
+ (BOOL)showLoginVCIfNeed;
+ (BOOL)showBuyVipVCIfNeed;
+ (void)login;
+ (void)logout;
/// 购买体验会员
+ (void)buyTryVIP;
/// 显示授权窗口
+ (BOOL)showAuthorizationWithTypeIfNeed:(AuthorizationType)type;
/// 跳转到系统
+ (void)jumpToSystemAppSettingsPage;
/// 进入单聊
+ (void)chatWithUser:(User *)user;
/// 处理url
+ (BOOL)handleUrl:(NSString *)url;
/// 获取app配置
+ (AppConfig *)appConfig;
+ (void)getAppConfigWithCompletion:(void(^)(AppConfig *config))completion;
/// 发起微信支付
//+ (void)payByWetChatPayWithOrderId:(NSString *)orderId payInfo:(NSDictionary *)payInfo;
/// 跳转用户资料卡页面
+ (void)showUserCardVCWithUserID:(int)userID;
/// 显示上传头像
+ (BOOL)showUploadAvatarAlertIfNeed;
/// 图片查看大图
+ (KSPhotoBrowser *)showImageBrowserWithImageURLs:(NSArray<NSString *> *)imageURLs index:(NSInteger)index;
@end
NS_ASSUME_NONNULL_END