Commit 53d314f5a5983fa95bdd0bf476a5e10d5773c3ab

Authored by 张旭
1 parent a10978c7

更改HttpServer域名,增加统一测试接口

LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -161,10 +161,6 @@
161 161 D2029CC91E6EADE10027CD92 /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D2029C6F1E6EADE10027CD92 /* SVProgressHUD.bundle */; };
162 162 D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C711E6EADE10027CD92 /* SVProgressHUD.m */; };
163 163 D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C731E6EADE10027CD92 /* SVRadialGradientLayer.m */; };
164   - D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C7C1E6EADE10027CD92 /* SearchModel.m */; };
165   - D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C7E1E6EADE10027CD92 /* SearchRecomListModel.m */; };
166   - D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C821E6EADE10027CD92 /* SearchHttp.m */; };
167   - D2029CD01E6EADE10027CD92 /* SearchPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029C841E6EADE10027CD92 /* SearchPresenter.m */; };
168 164 D2029CD41E6EADE70027CD92 /* HttpService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CD31E6EADE70027CD92 /* HttpService.m */; };
169 165 D2029D001E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CDF1E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m */; };
170 166 D2029D011E6EAE2E0027CD92 /* UIColor+HexString.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CE11E6EAE2E0027CD92 /* UIColor+HexString.m */; };
... ... @@ -233,7 +229,6 @@
233 229 D25BF8A51E80EC76007FB138 /* 头像.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF8A41E80EC76007FB138 /* 头像.jpg */; };
234 230 D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */; };
235 231 D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */; };
236   - D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; };
237 232 D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */; };
238 233 D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D29E81EC1E88DC5B008C9906 /* PriChatCell.m */; };
239 234 D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2A803071E80BD6F009D6F1C /* TopToolView.m */; };
... ... @@ -620,15 +615,6 @@
620 615 D2029C711E6EADE10027CD92 /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; };
621 616 D2029C721E6EADE10027CD92 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVRadialGradientLayer.h; sourceTree = "<group>"; };
622 617 D2029C731E6EADE10027CD92 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; };
623   - D2029C7B1E6EADE10027CD92 /* SearchModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchModel.h; sourceTree = "<group>"; };
624   - D2029C7C1E6EADE10027CD92 /* SearchModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchModel.m; sourceTree = "<group>"; };
625   - D2029C7D1E6EADE10027CD92 /* SearchRecomListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchRecomListModel.h; sourceTree = "<group>"; };
626   - D2029C7E1E6EADE10027CD92 /* SearchRecomListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchRecomListModel.m; sourceTree = "<group>"; };
627   - D2029C801E6EADE10027CD92 /* HomeProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeProtocol.h; sourceTree = "<group>"; };
628   - D2029C811E6EADE10027CD92 /* SearchHttp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchHttp.h; sourceTree = "<group>"; };
629   - D2029C821E6EADE10027CD92 /* SearchHttp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchHttp.m; sourceTree = "<group>"; };
630   - D2029C831E6EADE10027CD92 /* SearchPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchPresenter.h; sourceTree = "<group>"; };
631   - D2029C841E6EADE10027CD92 /* SearchPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchPresenter.m; sourceTree = "<group>"; };
632 618 D2029CD21E6EADE70027CD92 /* HttpService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpService.h; sourceTree = "<group>"; };
633 619 D2029CD31E6EADE70027CD92 /* HttpService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HttpService.m; sourceTree = "<group>"; };
634 620 D2029CD61E6EADFB0027CD92 /* PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
... ... @@ -769,8 +755,6 @@
769 755 D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTabBar.m; sourceTree = "<group>"; };
770 756 D2888D9A1E6EBF1B003A77C8 /* LVCLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveViewController.h; sourceTree = "<group>"; };
771 757 D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLiveViewController.m; sourceTree = "<group>"; };
772   - D2888DAF1E6EC05F003A77C8 /* TempViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TempViewController.h; sourceTree = "<group>"; };
773   - D2888DB01E6EC05F003A77C8 /* TempViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TempViewController.m; sourceTree = "<group>"; };
774 758 D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; };
775 759 D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; };
776 760 D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; };
... ... @@ -1571,71 +1555,10 @@
1571 1555 8178D41A1F02030500AA78A4 /* PGCSections */,
1572 1556 D2888D951E6EBAA7003A77C8 /* LiveSections */,
1573 1557 D2575C431E76846900E3A8FC /* InteractionSections */,
1574   - D2029C751E6EADE10027CD92 /* ZXSections(例子) */,
1575 1558 );
1576 1559 path = Sections;
1577 1560 sourceTree = "<group>";
1578 1561 };
1579   - D2029C751E6EADE10027CD92 /* ZXSections(例子) */ = {
1580   - isa = PBXGroup;
1581   - children = (
1582   - D2029C761E6EADE10027CD92 /* Temp */,
1583   - );
1584   - name = "ZXSections(例子)";
1585   - path = ZXSections;
1586   - sourceTree = "<group>";
1587   - };
1588   - D2029C761E6EADE10027CD92 /* Temp */ = {
1589   - isa = PBXGroup;
1590   - children = (
1591   - D2029C771E6EADE10027CD92 /* Controller */,
1592   - D2029C7A1E6EADE10027CD92 /* Model */,
1593   - D2029C7F1E6EADE10027CD92 /* Presenter */,
1594   - D2029C851E6EADE10027CD92 /* View */,
1595   - );
1596   - name = Temp;
1597   - path = Home;
1598   - sourceTree = "<group>";
1599   - };
1600   - D2029C771E6EADE10027CD92 /* Controller */ = {
1601   - isa = PBXGroup;
1602   - children = (
1603   - D2888DAF1E6EC05F003A77C8 /* TempViewController.h */,
1604   - D2888DB01E6EC05F003A77C8 /* TempViewController.m */,
1605   - );
1606   - path = Controller;
1607   - sourceTree = "<group>";
1608   - };
1609   - D2029C7A1E6EADE10027CD92 /* Model */ = {
1610   - isa = PBXGroup;
1611   - children = (
1612   - D2029C7B1E6EADE10027CD92 /* SearchModel.h */,
1613   - D2029C7C1E6EADE10027CD92 /* SearchModel.m */,
1614   - D2029C7D1E6EADE10027CD92 /* SearchRecomListModel.h */,
1615   - D2029C7E1E6EADE10027CD92 /* SearchRecomListModel.m */,
1616   - );
1617   - path = Model;
1618   - sourceTree = "<group>";
1619   - };
1620   - D2029C7F1E6EADE10027CD92 /* Presenter */ = {
1621   - isa = PBXGroup;
1622   - children = (
1623   - D2029C801E6EADE10027CD92 /* HomeProtocol.h */,
1624   - D2029C811E6EADE10027CD92 /* SearchHttp.h */,
1625   - D2029C821E6EADE10027CD92 /* SearchHttp.m */,
1626   - D2029C831E6EADE10027CD92 /* SearchPresenter.h */,
1627   - D2029C841E6EADE10027CD92 /* SearchPresenter.m */,
1628   - );
1629   - path = Presenter;
1630   - sourceTree = "<group>";
1631   - };
1632   - D2029C851E6EADE10027CD92 /* View */ = {
1633   - isa = PBXGroup;
1634   - children = (
1635   - );
1636   - path = View;
1637   - sourceTree = "<group>";
1638   - };
1639 1562 D2029CD11E6EADE70027CD92 /* HttpService */ = {
1640 1563 isa = PBXGroup;
1641 1564 children = (
... ... @@ -2356,7 +2279,6 @@
2356 2279 4B45CE981EB86A760079AFB7 /* UILabel+createLabel.m in Sources */,
2357 2280 D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */,
2358 2281 D22831091E77D8D500627701 /* GiftModel.m in Sources */,
2359   - D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */,
2360 2282 4BD8560F1EBACEF80082061D /* CNLiveWebView.m in Sources */,
2361 2283 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */,
2362 2284 D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */,
... ... @@ -2384,14 +2306,12 @@
2384 2306 D2029CB71E6EADE10027CD92 /* NSData+ImageContentType.m in Sources */,
2385 2307 D23DC1551ECC41C100103B0E /* LVCVerifyViewController.m in Sources */,
2386 2308 D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */,
2387   - D2029CD01E6EADE10027CD92 /* SearchPresenter.m in Sources */,
2388 2309 D2029CBE1E6EADE10027CD92 /* SDWebImagePrefetcher.m in Sources */,
2389 2310 D2EBC8991F025D4700F198FB /* LVCVodPlayerFullController.m in Sources */,
2390 2311 D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */,
2391 2312 D2B7B2571E8261EF00ED084E /* ChatBarrOperation.m in Sources */,
2392 2313 D209AD6B1EC580F100D82E3B /* LVCWebViewController.m in Sources */,
2393 2314 810B65011E779B1F00133E15 /* MASLayoutConstraint.m in Sources */,
2394   - D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */,
2395 2315 D2029CA11E6EADE10027CD92 /* NSString+MJExtension.m in Sources */,
2396 2316 4B45CE7A1EB86A590079AFB7 /* MineLiveController.m in Sources */,
2397 2317 D2029BCB1E6EADD70027CD92 /* BaseTableViewCell.m in Sources */,
... ... @@ -2471,7 +2391,6 @@
2471 2391 D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */,
2472 2392 D209AD6E1EC583B700D82E3B /* MineMessageController.m in Sources */,
2473 2393 D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */,
2474   - D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */,
2475 2394 810B65021E779B1F00133E15 /* MASViewAttribute.m in Sources */,
2476 2395 8178D46B1F021ED800AA78A4 /* LVCTelevisionModel.m in Sources */,
2477 2396 D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */,
... ... @@ -2540,7 +2459,6 @@
2540 2459 D2029D061E6EAE2E0027CD92 /* UIView+Extension.m in Sources */,
2541 2460 D25530001E7909AC00DF38A5 /* GiftAnimOperation.m in Sources */,
2542 2461 D2029C9D1E6EADE10027CD92 /* NSObject+MJClass.m in Sources */,
2543   - D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */,
2544 2462 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */,
2545 2463 8178D4711F0239AD00AA78A4 /* LVCPlayerLoadingView.m in Sources */,
2546 2464 D2EBC8A01F034C5500F198FB /* LVCCommentView.m in Sources */,
... ...
LiveVideoCloud.xcodeproj/xcuserdata/cnlive.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted 100644 → 0
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<Bucket
3   - type = "1"
4   - version = "2.0">
5   - <Breakpoints>
6   - <BreakpointProxy
7   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8   - <BreakpointContent
9   - shouldBeEnabled = "Yes"
10   - ignoreCount = "0"
11   - continueAfterRunningActions = "No"
12   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m"
13   - timestampString = "520311553.990673"
14   - startingColumnNumber = "9223372036854775807"
15   - endingColumnNumber = "9223372036854775807"
16   - startingLineNumber = "97"
17   - endingLineNumber = "97"
18   - landmarkName = "-verificationBtnAction"
19   - landmarkType = "7">
20   - </BreakpointContent>
21   - </BreakpointProxy>
22   - <BreakpointProxy
23   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
24   - <BreakpointContent
25   - shouldBeEnabled = "Yes"
26   - ignoreCount = "0"
27   - continueAfterRunningActions = "No"
28   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m"
29   - timestampString = "520311553.990673"
30   - startingColumnNumber = "9223372036854775807"
31   - endingColumnNumber = "9223372036854775807"
32   - startingLineNumber = "211"
33   - endingLineNumber = "211"
34   - landmarkName = "-loginBtnAction"
35   - landmarkType = "7">
36   - </BreakpointContent>
37   - </BreakpointProxy>
38   - <BreakpointProxy
39   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
40   - <BreakpointContent
41   - shouldBeEnabled = "Yes"
42   - ignoreCount = "0"
43   - continueAfterRunningActions = "No"
44   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m"
45   - timestampString = "520311553.990673"
46   - startingColumnNumber = "9223372036854775807"
47   - endingColumnNumber = "9223372036854775807"
48   - startingLineNumber = "225"
49   - endingLineNumber = "225"
50   - landmarkName = "-loginBtnAction"
51   - landmarkType = "7">
52   - </BreakpointContent>
53   - </BreakpointProxy>
54   - <BreakpointProxy
55   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
56   - <BreakpointContent
57   - shouldBeEnabled = "Yes"
58   - ignoreCount = "0"
59   - continueAfterRunningActions = "No"
60   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Views/LVCMineShowCell.m"
61   - timestampString = "520308289.276753"
62   - startingColumnNumber = "9223372036854775807"
63   - endingColumnNumber = "9223372036854775807"
64   - startingLineNumber = "118"
65   - endingLineNumber = "118"
66   - landmarkName = "-loginSuccess"
67   - landmarkType = "7">
68   - </BreakpointContent>
69   - </BreakpointProxy>
70   - <BreakpointProxy
71   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
72   - <BreakpointContent
73   - shouldBeEnabled = "Yes"
74   - ignoreCount = "0"
75   - continueAfterRunningActions = "No"
76   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Views/LVCMineShowCell.m"
77   - timestampString = "520308295.877139"
78   - startingColumnNumber = "9223372036854775807"
79   - endingColumnNumber = "9223372036854775807"
80   - startingLineNumber = "125"
81   - endingLineNumber = "125"
82   - landmarkName = "-loginFailure"
83   - landmarkType = "7">
84   - </BreakpointContent>
85   - </BreakpointProxy>
86   - <BreakpointProxy
87   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
88   - <BreakpointContent
89   - shouldBeEnabled = "Yes"
90   - ignoreCount = "0"
91   - continueAfterRunningActions = "No"
92   - filePath = "LiveVideoCloud/Classes/Sections/Mine/Controllers/LVCMineViewController.m"
93   - timestampString = "520311709.736649"
94   - startingColumnNumber = "9223372036854775807"
95   - endingColumnNumber = "9223372036854775807"
96   - startingLineNumber = "67"
97   - endingLineNumber = "67"
98   - landmarkName = "-changeBtnClick"
99   - landmarkType = "7">
100   - </BreakpointContent>
101   - </BreakpointProxy>
102   - </Breakpoints>
103   -</Bucket>
LiveVideoCloud/AppDelegate/AppDelegate.h
... ... @@ -10,6 +10,8 @@
10 10  
11 11 @interface AppDelegate : UIResponder <UIApplicationDelegate>
12 12  
  13 +@property (nonatomic) BOOL isTestEnvironment;
  14 +
13 15 @property (strong, nonatomic) UIWindow *_Nonnull window;
14 16 @property (nonatomic ,copy) NSString *_Nonnull deviceName;
15 17  
... ...
LiveVideoCloud/AppDelegate/AppDelegate.m
... ... @@ -22,14 +22,17 @@
22 22 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
23 23 self.window.rootViewController = [[ZXTabBarController alloc] init];
24 24  
  25 + //测试环境开关,只在初始化时有效
  26 + self.isTestEnvironment = YES;
  27 +
25 28 //APP 启动是初始化直播SDK
26   - [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:YES];
  29 + [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:self.isTestEnvironment];
27 30  
28 31 //初始化聊天SDK并连接服务器
29   - [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId isTestEnvironment:YES];
  32 + [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId isTestEnvironment:self.isTestEnvironment];
30 33  
31 34 //初始化用户SDK
32   - [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:YES];
  35 + [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:self.isTestEnvironment];
33 36  
34 37 /*
35 38 [[CNLiveChatManager sharedCNLiveChatManager] connectServerSuccess:^{
... ...
LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
... ... @@ -48,7 +48,7 @@
48 48  
49 49 - (void)viewDidLoad {
50 50 [super viewDidLoad];
51   -
  51 +
52 52 self.navigationController.delegate = self;
53 53 self.view.backgroundColor = [UIColor whiteColor];
54 54  
... ... @@ -58,6 +58,7 @@
58 58 #pragma mark - 验证是否有主播权限
59 59 - (void)verifyLiveAuthority {
60 60  
  61 +
61 62 [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
62 63 [SVProgressHUD showWithStatus:@"正在加载..."];
63 64 [LVCVerifyLiveAuthService verifyLiveAuthWithHandler:^(id data, NSError *error) {
... ...
LiveVideoCloud/Classes/Sections/LiveSections/LVCVerifyLiveAuthService.m
... ... @@ -39,7 +39,7 @@
39 39  
40 40 uint8_t digest[CC_SHA1_DIGEST_LENGTH];
41 41  
42   - CC_SHA1(data.bytes, data.length, digest);
  42 + CC_SHA1(data.bytes, (int)data.length, digest);
43 43  
44 44 NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];
45 45  
... ...
LiveVideoCloud/Classes/Sections/ZXSections/Home/Controller/TempViewController.h deleted 100644 → 0
1   -//
2   -// TempViewController.h
3   -// LiveVideoCloud
4   -//
5   -// Created by 张旭 on 2017/3/7.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "BaseViewController.h"
10   -
11   -@interface TempViewController : BaseViewController
12   -
13   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Controller/TempViewController.m deleted 100644 → 0
1   -//
2   -// TempViewController.m
3   -// LiveVideoCloud
4   -//
5   -// Created by 张旭 on 2017/3/7.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "TempViewController.h"
10   -#import "SearchPresenter.h"
11   -//#import "SearchHttp.h"
12   -//#import "SearchModel.h"
13   -//#import "SearchRecomListModel.h"
14   -@interface TempViewController ()
15   -
16   -@property (nonatomic ,strong) SearchPresenter *presenter;
17   -
18   -@end
19   -
20   -@implementation TempViewController
21   -
22   -- (void)viewDidLoad {
23   - [super viewDidLoad];
24   - // Do any additional setup after loading the view.
25   - self.view.backgroundColor = [UIColor redColor];
26   -}
27   -
28   -- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
29   -{
30   - TempViewController *vc = [TempViewController new];
31   - vc.view.backgroundColor = ZXRandomColor;
32   - [self.navigationController pushViewController:vc animated:YES];
33   -}
34   -
35   -- (void)bindAction
36   -{
37   - [self.presenter requestSearchData:^(id _Nullable data) {
38   - NSLog(@"%@",data);
39   - } failure:^(NSError * _Nullable error) {
40   - NSLog(@"%@",error);
41   - }];
42   -}
43   -
44   -- (SearchPresenter *)presenter
45   -{
46   - if (!_presenter)
47   - {
48   - _presenter = [[SearchPresenter alloc] init];
49   - }
50   - return _presenter;
51   -}
52   -
53   -
54   -- (void)didReceiveMemoryWarning {
55   - [super didReceiveMemoryWarning];
56   - // Dispose of any resources that can be recreated.
57   -}
58   -
59   -/*
60   -#pragma mark - Navigation
61   -
62   -// In a storyboard-based application, you will often want to do a little preparation before navigation
63   -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
64   - // Get the new view controller using [segue destinationViewController].
65   - // Pass the selected object to the new view controller.
66   -}
67   -*/
68   -
69   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Model/SearchModel.h deleted 100644 → 0
1   -//
2   -// SearchModel.h
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/12.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "BaseModel.h"
10   -@class SearchRecomListModel;
11   -@interface SearchModel :BaseModel
12   -
13   -@property (nonatomic ,copy) NSString * _Nullable hotMovieName;
14   -@property (nonatomic ,strong) NSArray <SearchRecomListModel *>* _Nullable list;
15   -@property (nonatomic ,copy) NSString * _Nullable title;
16   -
17   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Model/SearchModel.m deleted 100644 → 0
1   -//
2   -// SearchModel.m
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/12.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "SearchModel.h"
10   -
11   -@implementation SearchModel
12   -
13   -- (void)loadModel
14   -{
15   - [super loadModel];
16   -
17   - [SearchModel mj_setupReplacedKeyFromPropertyName:^NSDictionary *{ return @{
18   - @"list":@"recomList",
19   - @"title":@"recomList[0].title",
20   - };}];
21   -
22   - [SearchModel mj_setupObjectClassInArray:^NSDictionary *{
23   - return @{@"list":@"SearchRecomListModel"};
24   -// return @{@"list":[SearchRecomListModel class]};二选一
25   - }];
26   -}
27   -
28   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Model/SearchRecomListModel.h deleted 100644 → 0
1   -//
2   -// SearchRecomListModel.h
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/17.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "BaseModel.h"
10   -
11   -@interface SearchRecomListModel : BaseModel
12   -
13   -@property (nonatomic ,copy) NSString * _Nullable angleImage;
14   -@property (nonatomic ,copy) NSString * _Nullable loadType;
15   -@property (nonatomic ,copy) NSString * _Nullable loadUrl;
16   -@property (nonatomic ,copy) NSString * _Nullable movieId;
17   -@property (nonatomic ,copy) NSString * _Nullable pic;
18   -@property (nonatomic ,copy) NSString * _Nullable title;
19   -
20   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Model/SearchRecomListModel.m deleted 100644 → 0
1   -//
2   -// SearchRecomListModel.m
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/17.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "SearchRecomListModel.h"
10   -
11   -@implementation SearchRecomListModel
12   -
13   -- (void)loadModel
14   -{
15   - [super loadModel];
16   - [SearchRecomListModel mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
17   - return @{@"angleImage":@"angleIcon"};
18   - }];
19   -}
20   -
21   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Presenter/HomeProtocol.h deleted 100644 → 0
1   -//
2   -// HomeProtocol.h
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/2/14.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <Foundation/Foundation.h>
10   -#import <UIKit/UIKit.h>
11   -
12   -typedef void(^SuccessBlock)(id _Nullable data);
13   -typedef void(^FailureBlock)(NSError *_Nullable error);
14   -
15   -@protocol HomeProtocol <NSObject>
16   -
17   -- (void)requestSearchData:(SuccessBlock _Nullable)success failure:(FailureBlock _Nullable)failure;
18   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Presenter/SearchHttp.h deleted 100644 → 0
1   -//
2   -// SearchHttp.h
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/12.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "HttpService.h"
10   -
11   -@interface SearchHttp : HttpService
12   -
13   -+ (NSURLSessionDataTask *)getSearchContentWithHandler:(completionHandler)handler;
14   -
15   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Presenter/SearchHttp.m deleted 100644 → 0
1   -//
2   -// SearchHttp.m
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/1/12.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "SearchHttp.h"
10   -
11   -@implementation SearchHttp
12   -
13   -+ (NSURLSessionDataTask *)getSearchContentWithHandler:(completionHandler)handler
14   -{
15   - NSMutableDictionary *params = @{}.mutableCopy;
16   - completionHandler compleionHandler = ^(id data,NSError *error) {
17   - handler(data,error);
18   - };
19   - return [[HttpService service] sendRequestWithHttpMethod:E_HTTP_REQUEST_METHOD_GET URLPath:[ZXServerUrl getSearchContentURL] parameters:params completionHandler:compleionHandler];
20   -}
21   -
22   -
23   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Presenter/SearchPresenter.h deleted 100644 → 0
1   -//
2   -// SearchPresenter.h
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/2/14.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "HomeProtocol.h"
10   -
11   -@interface SearchPresenter : NSObject <HomeProtocol>
12   -
13   -@end
LiveVideoCloud/Classes/Sections/ZXSections/Home/Presenter/SearchPresenter.m deleted 100644 → 0
1   -//
2   -// SearchPresenter.m
3   -// ZXBaseProject
4   -//
5   -// Created by 张旭 on 2017/2/14.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "SearchPresenter.h"
10   -#import "SearchHttp.h"
11   -#import "SearchModel.h"
12   -
13   -@implementation SearchPresenter
14   -
15   -- (void)requestSearchData:(SuccessBlock)success failure:(FailureBlock)failure
16   -{
17   - [SearchHttp getSearchContentWithHandler:^(id data, NSError *error) {
18   - if (error) {
19   - NSLog(@"error = %@",error);
20   - failure(error);
21   -// FailureBlock failure = ^(NSError *err){
22   -// failure(err);
23   -// };
24   - }
25   - NSLog(@"%@",data);
26   -// SuccessBlock success = ^(id data){
27   -// success(data);
28   -// };
29   - success(data);
30   - SearchModel *model = [SearchModel modelWithDic:data];
31   - NSLog(@"%@",model.list);
32   - }];
33   -}
34   -
35   -@end
LiveVideoCloud/PrefixHeader.pch
... ... @@ -55,6 +55,7 @@
55 55 #import "ProgramModel.h"
56 56 #import "WXApi.h"
57 57 #import "WeiboSDK.h"
  58 + #import "AppDelegate.h"
58 59  
59 60  
60 61 #if TARGET_OS_IPHONE
... ... @@ -92,7 +93,7 @@
92 93 //#define UserAppSceret @"ee844ea67b6be7303b6f5d9365af10ac09933c0828aba7"
93 94  
94 95 #define PlaceholderImage @"placehodler"
95   -
  96 +#define appDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)
96 97  
97 98 #define ThirdLoginSuccess @"ThirdLoginSuccess"
98 99 #define ThirdLoginFailure @"ThirdLoginFailure"
... ...
LiveVideoCloud/UtilKits/ServerUrl/ZXServerUrl.h
... ... @@ -17,16 +17,13 @@
17 17 /** 获取服务器baseUrl */
18 18 + (NSString *)getServerBaseURL;
19 19  
20   -/** 获取聊天服务器baseUrl */
21   -+ (NSString *)getServerChatBaseURL;
  20 +///** 获取聊天服务器baseUrl */
  21 +//+ (NSString *)getServerChatBaseURL;
22 22  
23 23 ////////////////////////////////////////////////////////
24 24 //////////// BusinessUrls
25 25 ////////////////////////////////////////////////////////
26 26  
27   -/** 搜索页内容 */
28   -+ (NSString *)getSearchContentURL;
29   -
30 27 /** 直播列表 */
31 28 + (NSString *)getLiveListURL;
32 29  
... ...
LiveVideoCloud/UtilKits/ServerUrl/ZXServerUrl.m
... ... @@ -9,28 +9,25 @@
9 9 #import "ZXServerUrl.h"
10 10  
11 11 #ifdef DEBUG
12   -static NSString *serverBaseURL = @"http://test.open.cnlive.com/openapi/api2/";//@"http://api.cnlive.com";//通用测试服务器域名
13   -static NSString *serverChatBaseURL = @"http://120.92.4.46:8081";//聊天测试服务器域名
  12 +#define serverBaseURL appDelegate.isTestEnvironment ? @"http://test.open.cnlive.com/openapi/api2" : @"https://api.cnlive.com/open/api2";//@"http://api.cnlive.com";//通用测试服务器域名
  13 +//static NSString *serverChatBaseURL = @"http://120.92.4.46:8081";//聊天测试服务器域名
14 14 #else
15   -static NSString *serverBaseURL = @"https://perapi.svipmovie.com";//通用正式服务器域名
16   -static NSString *serverChatBaseURL = @"https://perapi.svipmovie1.com";//聊天正式服务器域名
  15 +#define serverBaseURL @"https://api.cnlive.com/open/api2";//通用正式服务器域名
  16 +//static NSString *serverChatBaseURL = @"https://perapi.svipmovie1.com";//聊天正式服务器域名
17 17 #endif
18 18  
19 19 ////////////////////////////////////////////////////////
20 20 //////////// 具体请求接口URL
21 21 ////////////////////////////////////////////////////////
22 22  
23   -/** 搜索页内容 */
24   -static NSString *g_SearchContentURL = @"/from/huntKeyWordApi/huntKeyWords.do";//@"api/findMessage";//发现消息
25   -
26 23 /** 直播列表 */
27   -static NSString *g_LiveListURL = @"live_epg/sp/activityList4App";///open/api2/
  24 +static NSString *g_LiveListURL = @"/vod_epg/getVodInfo4App";
28 25  
29 26 /** 直播活动详情 */
30   -static NSString *g_LiveActivityInfoURL = @"/open/api2/live_epg/getLiveActivityPlayInfo4App";
  27 +static NSString *g_LiveActivityInfoURL = @"/live_epg/getLiveActivityPlayInfo4App";
31 28  
32 29 /** 验证主播是否有直播权限 */
33   -static NSString *g_VerifyLiveAuthURL = @"/open/api2/live_epg/channel/info4App";
  30 +static NSString *g_VerifyLiveAuthURL = @"/live_epg/channel/info4App";
34 31  
35 32 @implementation ZXServerUrl
36 33  
... ... @@ -45,37 +42,34 @@ static NSString *g_VerifyLiveAuthURL = @&quot;/open/api2/live_epg/channel/info4App&quot;;
45 42 }
46 43  
47 44 /** 获取聊天服务器baseUrl */
48   -+ (NSString *)getServerChatBaseURL
49   -{
50   - return serverChatBaseURL;
51   -}
  45 +//+ (NSString *)getServerChatBaseURL
  46 +//{
  47 +// return serverChatBaseURL;
  48 +//}
52 49  
53 50 ////////////////////////////////////////////////////////
54 51 //////////// BusinessUrls
55 52 ////////////////////////////////////////////////////////
56 53  
57   -/** 搜索页内容 */
58   -+ (NSString *)getSearchContentURL
59   -{
60   - return [NSString stringWithFormat:@"%@%@", serverBaseURL, g_SearchContentURL];
61   -}
62   -
63 54 /** 直播列表 */
64 55 + (NSString *)getLiveListURL
65 56 {
66   - return [NSString stringWithFormat:@"%@%@", serverBaseURL, g_LiveListURL];
  57 + NSString *url = serverBaseURL;
  58 + return [NSString stringWithFormat:@"%@%@", url, g_LiveListURL];
67 59 }
68 60  
69 61 /** 直播活动详情 */
70 62 + (NSString *)getLiveActivityInfoURL
71 63 {
72   - return [NSString stringWithFormat:@"%@%@", serverBaseURL, g_LiveActivityInfoURL];
  64 + NSString *url = serverBaseURL;
  65 + return [NSString stringWithFormat:@"%@%@", url, g_LiveActivityInfoURL];
73 66 }
74 67  
75 68 /** 验证主播是否有直播权限 */
76 69 + (NSString *)verifyLiveAuthURL
77 70 {
78   - return [NSString stringWithFormat:@"%@%@", serverBaseURL, g_VerifyLiveAuthURL];
  71 + NSString *url = serverBaseURL;
  72 + return [NSString stringWithFormat:@"%@%@", url, g_VerifyLiveAuthURL];
79 73 }
80 74  
81 75 @end
... ...