Commit 116cc9923512cd14530bf8c879a741eceb97a047

Authored by liushiyu
2 parents 4e9f4814 5f0f5b1c

Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode

# Conflicts:
#	metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
metaCode/Classes/Environment/CNLiveEnvironment.swift
... ... @@ -13,7 +13,8 @@ let APPId: String = CNLiveEnvironmentManager.shared.appId
13 13 let APPKey: String = CNLiveEnvironmentManager.shared.appKey
14 14 ///当前应用的网络请求域名
15 15 let APPBaseUrl: String! = CNLiveEnvironmentManager.shared.baseUrl
16   -
  16 +///当前应用的Secret
  17 +let APPSecret: String = CNLiveEnvironmentManager.shared.appSecret
17 18  
18 19 ///当前APP的环境
19 20 let APPCurrentEnvironment: CNLiveEnvironment = CNLiveEnvironmentManager.shared.currentEnvironment
... ... @@ -44,6 +45,7 @@ class CNLiveEnvironmentManager: NSObject{
44 45 var appId: String
45 46 var appKey: String
46 47 var baseUrl: String
  48 + var appSecret: String
47 49  
48 50 ///当前环境
49 51 var currentEnvironment: CNLiveEnvironment
... ... @@ -53,6 +55,7 @@ class CNLiveEnvironmentManager: NSObject{
53 55 self.appId = ""
54 56 self.appKey = ""
55 57 self.baseUrl = ""
  58 + self.appSecret = ""
56 59 self.currentEnvironment = .development
57 60 }
58 61 //重新copy 和 mutableCopy 方法
... ... @@ -83,18 +86,21 @@ class CNLiveEnvironmentManager: NSObject{
83 86 func developmentEnvironment(){
84 87 self.appId = "802_li40qhp922"
85 88 self.appKey = "ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac"
  89 + self.appSecret = "3cc9f12db322a3d3656012ef929604cf6d6847471535f9"
86 90 self.baseUrl = "https://api.cnlive.com"
87 91 }
88 92 //testFlight 环境配置
89 93 func testFlightEnvironment(){
90 94 self.appId = "802_li40qhp922"
91 95 self.appKey = "ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac"
  96 + self.appSecret = "3cc9f12db322a3d3656012ef929604cf6d6847471535f9"
92 97 self.baseUrl = "https://api.cnlive.com"
93 98 }
94 99 //production 生产环境配置
95 100 func productionEnvironment(){
96   - self.appId = "802_li40qhp922"
97   - self.appKey = "ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac"
  101 + self.appId = "769_li40lrkt53"
  102 + self.appKey = "064f392f84dfe7bbe9f1eabeda53ea02044213019b0406"
  103 + self.appSecret = "68b5cc42fbdb466d56c2e22b00b1494feec8149f9dd32e"
98 104 self.baseUrl = "https://api.cnlive.com"
99 105 }
100 106  
... ...
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
... ... @@ -10,7 +10,6 @@ import YYCategories
10 10 import CNLiveRequestBastKit
11 11 import HandyJSON
12 12  
13   -
14 13 //验证码发送成功回调
15 14 typealias resultCodeBlock = () -> Void
16 15 //登陆成功回调
... ...