CNLiveCMineViewModuleImpl.m
7.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//
// CNLiveCMineViewModuleImpl.m
// CNLiveCMineModule_Example
//
// Created by open on 2021/12/29.
// Copyright © 2021 杨苓玉. All rights reserved.
//
#import "CNLiveCMineViewModuleImpl.h"
#import <CNLiveUserManagement/CNUserInfoManager.h>
//CNLiveSDK
#import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h>
@implementation CNLiveCMineViewModuleImpl
#define CNUserShareModel CNUserShareManager.userInfoModel
/// 我的积分跳转主工程我的客服界面
-(void)pushCMineInteContentForCMainPlatFromCurrentVC:(UIViewController *)currentVC
{
}
/// 我的积分跳转主工程webView界面
/// @param url 链接地址
- (void)pushCMineInteContentForCMainWebViewWithURL:(nonnull NSString *)url statue:(CNLiveCMineIntePushWebViewStatue)statue {
}
- (void)pushCMineInteContentForCMainCustomFunctionVCParam:(nonnull NSDictionary *)param CurrentVC:(nonnull UIViewController *)currentVC {
}
/// 积分任务跳转到不同界面去完成
/// @param param 参数
-(void)pushCMineInteContentForCMainCustomFunctionVCParam:(NSDictionary *)param
{
NSLog(@"跳转不同积分任务=>%@",param);
}
- (void)pushCMinePagesEvent:(NSString *)event{
// [CNLiveStatClick event:event];
}
- (void)saveImageWithImage:(UIImage *)image{
// [[CNVideoAndImageTool sharedCNVideoAndImageTool] saveMediaDataForPhoto:self.codeView.image Video:nil AblumForComplterBlock:^(BOOL success) {
//
// [QMUITips hideAllToastInView:AppKeyWindow animated:YES];
//
// if(success){
// [QMUITips showSucceed:@"已保存到相册" inView:AppKeyWindow hideAfterDelay:1.5];
// }else{
// [QMUITips showError:@"保存图片失败" inView:AppKeyWindow hideAfterDelay:1.5];
// }
// }];
}
/// 获取二维码
/// @param fromT 需要参数
/// @param type 需要参数
- (UIImage *)loadSGQRCodeGenImage:(NSString *)fromT type:(NSString *)type{
// NSDictionary *dic = @{@"content":[EncryptAndDecrypt base64StringFromText:fromT encryptKey:AppDESKey],@"type":type};
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// UIImage *image = [SGQRCodeGenerateManager generateWithLogoQRCodeData:jsonStr logoImageName:@"ewm_lcon" logoScaleToSuperView:0.2];
return [UIImage new];
}
- (void)appLoginOut:(BOOL)closePush{
// //退出登录
// [CNLiveBBASMModuleService accountLogout];
// /*** app音视频退出 ***/
// [[NSNotificationCenter defaultCenter] postNotificationName:WjjChatAudioOrVideoNotifacation object:nil];
//
// [CNAudioOrVideoMananger InitializeDefault];
// [[CNAudioPlayerManager sharedInstance] stopPlaying];
// [[TIMManager sharedInstance] removeMessageListener:[IMAPlatform sharedInstance].conversationMgr];
// UITabBarController *tabbarVC = (UITabBarController *)[AppDelegate sharedAppDelegate].window.rootViewController;
// UINavigationController *nav = [tabbarVC.viewControllers firstObject];
// CNAttentionViewController *attentionVC = [nav.viewControllers firstObject];
// [attentionVC removeAllObserver];
//
// /**关闭人工客服通道*/
// [[CNSobotManager manager] outCurrentUser:NO];
//
// /**退出IM连接*/
// [[IMAPlatform sharedInstance] logout:^{
// [CNLiveDataStepManager requestStepWithLoginOutWithMethod:[CNUserInfoManager manager].userInfoModel.uid];
// [[CNHomePageLoginIMManger manager] removeAllObserver];
// [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_logoutNotification object:nil];
// [CNUserInfoManager loginOut];
// #pragma mark -清空上海电商用户信息
// [[AppDelegate sharedAppDelegate] enterLoginUI];
// [CNShareExtensionGroup deleteMyInfoInShareGroup];
//// [CNShareExtensionModel loginOutTIMPlatServer];
// [[NSUserDefaults standardUserDefaults] setValue:nil forKey:@"findStrangerSwitch"];
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginChannelId"];//游客模式
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginClassifyId"];
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginUrl"];
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:CNWjjIsYiDongBoxUserKey];
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:CNWjjRemoteControlStatusKey];
// [[NSUserDefaults standardUserDefaults] synchronize];
// [[DSCnliveShopSDKManager sharedManager] loginUser:@""];
// [AppDelegate sharedAppDelegate].loginPrepositionUrl = @"";
//
// NSLog(@"----------清除");
//
// } fail:^(int code, NSString *msg) {
// [CNLiveDataStepManager requestStepWithLoginOutWithMethod:[CNUserInfoManager manager].userInfoModel.uid];
// [[CNHomePageLoginIMManger manager] removeAllObserver];
// [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_logoutNotification object:nil];
//
// [CNUserInfoManager loginOut];
// #pragma mark -清空上海电商用户信息
// [[AppDelegate sharedAppDelegate] enterLoginUI];
// [CNShareExtensionGroup deleteMyInfoInShareGroup];
//// [CNShareExtensionModel loginOutTIMPlatServer];
// [[NSUserDefaults standardUserDefaults] setValue:nil forKey:@"findStrangerSwitch"];
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginChannelId"];//游客模式
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginClassifyId"];
// [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"TouristsLoginUrl"];
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:CNWjjIsYiDongBoxUserKey];
// [[NSUserDefaults standardUserDefaults] setBool:NO forKey:CNWjjRemoteControlStatusKey];
// [[NSUserDefaults standardUserDefaults] synchronize];
// [[DSCnliveShopSDKManager sharedManager] loginUser:@""];
// [AppDelegate sharedAppDelegate].loginPrepositionUrl = @"";
// NSLog(@"----------清除");
// }];
}
- (void)sendMessageWithCodeType:(CNLiveMobileType) type mobile:(NSString *)pNumber contryCode:(NSString *)contryCode verificationCode:(NSString *)verifiCode success:(void(^)(id result))success failure:(void(^)(NSDictionary *errorDic))failure{
if (type == CNLiveMobileTypeRegisen) {
[CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeRegister mobile:pNumber countryCode:contryCode success:^(id result) {
if (success) {
success(result);
}
} failure:^(NSDictionary *errorDic) {
if (failure) {
failure(errorDic);
}
}];
}else if (type == CNLiveMobileTypeUpdate){
[CNLiveUserSystemCenter updateMobileWithUid:CNUserShareModel.uid mobile:pNumber countryCode:contryCode verificationCode:verifiCode success:^(id result) {
if (success) {
success(result);
}
} failure:^(NSDictionary *errorDic) {
if (failure) {
failure(errorDic);
}
}];
}
}
- (void)pushCMineContentForCMainPlatWithType:(NSInteger)type param:(NSDictionary *)param contentVC:(UIViewController *)contetVC{
}
- (void)skipType:(NSString*)type to:(NSString*)to shopType:(NSString*)shopType currentVC:(UIViewController*)currentVC{
}
@end