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