Commit b5e11e8f5b2e59c9a884db231d6b78a47c34e928
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
# Conflicts: # metaCode/Classes/Main/HomePage/Controller/WebController/CNWebViewController.swift
Showing
16 changed files
with
199 additions
and
213 deletions
metaCode/Classes/Common/Util/CNLiveCommonQiniuTool.swift
| @@ -95,15 +95,15 @@ class UploadManager: NSObject { | @@ -95,15 +95,15 @@ class UploadManager: NSObject { | ||
| 95 | param.setValue("2", forKey: "storageType") | 95 | param.setValue("2", forKey: "storageType") |
| 96 | param.setValue(kBucketName_QN, forKey: "bucket") | 96 | param.setValue(kBucketName_QN, forKey: "bucket") |
| 97 | let custom_param = NSMutableDictionary() | 97 | let custom_param = NSMutableDictionary() |
| 98 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 99 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 98 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 99 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 100 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 100 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 101 | CNLiveNetworking.setupShowResult(true) | 101 | CNLiveNetworking.setupShowResult(true) |
| 102 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 102 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 103 | CNLiveNetworking.setupShowDataResult(false) | 103 | CNLiveNetworking.setupShowDataResult(false) |
| 104 | CNLiveNetworking.setupSignRequestKey(APPKey)//APPKey_wjj APPKey | 104 | CNLiveNetworking.setupSignRequestKey(APPKey)//APPKey_wjj APPKey |
| 105 | 105 | ||
| 106 | - CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/vod_epg/getUploadAuthForApp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 106 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveMCEnvironmentManager.shared.img_token_url)/vod_epg/getUploadAuthForApp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 107 | hiddenLoading() | 107 | hiddenLoading() |
| 108 | 108 | ||
| 109 | if (error == nil) { | 109 | if (error == nil) { |
metaCode/Classes/Environment/CNLiveEnvironment.swift
| @@ -9,44 +9,44 @@ import Foundation | @@ -9,44 +9,44 @@ import Foundation | ||
| 9 | import CNLiveEnvironment | 9 | import CNLiveEnvironment |
| 10 | 10 | ||
| 11 | ///当前应用的APPID | 11 | ///当前应用的APPID |
| 12 | -let APPId: String = CNLiveEnvironmentManager.shared.appId | 12 | +let APPId: String = CNLiveMCEnvironmentManager.shared.appId |
| 13 | ///当前应用的APPKey | 13 | ///当前应用的APPKey |
| 14 | -let APPKey: String = CNLiveEnvironmentManager.shared.appKey | 14 | +let APPKey: String = CNLiveMCEnvironmentManager.shared.appKey |
| 15 | ///网家家应用的APPID | 15 | ///网家家应用的APPID |
| 16 | -let APPId_wjj: String = CNLiveEnvironmentManager.shared.appId_wjj | 16 | +let APPId_wjj: String = CNLiveMCEnvironmentManager.shared.appId_wjj |
| 17 | ///网家家应用的APPKey | 17 | ///网家家应用的APPKey |
| 18 | -let APPKey_wjj: String = CNLiveEnvironmentManager.shared.appKey_wjj | 18 | +let APPKey_wjj: String = CNLiveMCEnvironmentManager.shared.appKey_wjj |
| 19 | ///网家家B端应用的APPID | 19 | ///网家家B端应用的APPID |
| 20 | -let APPId_wjj_b: String = CNLiveEnvironmentManager.shared.appId_wjj_b | 20 | +let APPId_wjj_b: String = CNLiveMCEnvironmentManager.shared.appId_wjj_b |
| 21 | ///网家家B端应用的APPKey | 21 | ///网家家B端应用的APPKey |
| 22 | -let APPKey_wjj_b: String = CNLiveEnvironmentManager.shared.appKey_wjj_b | 22 | +let APPKey_wjj_b: String = CNLiveMCEnvironmentManager.shared.appKey_wjj_b |
| 23 | ///当前应用的登录请求域名 | 23 | ///当前应用的登录请求域名 |
| 24 | -let APPLoginHost: String! = CNLiveEnvironmentManager.shared.loginHost | 24 | +let APPLoginHost: String! = CNLiveMCEnvironmentManager.shared.loginHost |
| 25 | ///当前应用的Secret | 25 | ///当前应用的Secret |
| 26 | -let APPSecret: String = CNLiveEnvironmentManager.shared.appSecret | 26 | +let APPSecret: String = CNLiveMCEnvironmentManager.shared.appSecret |
| 27 | ///当前应用的部分请求接口 | 27 | ///当前应用的部分请求接口 |
| 28 | -let APPBaseMCUrl: String = CNLiveEnvironmentManager.shared.base_mc_url | 28 | +let APPBaseMCUrl: String = CNLiveMCEnvironmentManager.shared.base_mc_url |
| 29 | /// 网家家内接口 | 29 | /// 网家家内接口 |
| 30 | -let APPBaseWjjUrl: String = CNLiveEnvironmentManager.shared.base_wjj_url | 30 | +let APPBaseWjjUrl: String = CNLiveMCEnvironmentManager.shared.base_wjj_url |
| 31 | /// 网家家B端内接口 | 31 | /// 网家家B端内接口 |
| 32 | -let APPBaseWjjBUrl: String = CNLiveEnvironmentManager.shared.base_wjj_b_url | 32 | +let APPBaseWjjBUrl: String = CNLiveMCEnvironmentManager.shared.base_wjj_b_url |
| 33 | /// 网家家内电商接口 | 33 | /// 网家家内电商接口 |
| 34 | -let APPBaseWjjShopUrl: String = CNLiveEnvironmentManager.shared.base_mjj_shop_url | 34 | +let APPBaseWjjShopUrl: String = CNLiveMCEnvironmentManager.shared.base_mjj_shop_url |
| 35 | /// cms接口 | 35 | /// cms接口 |
| 36 | -let APPBaseCMSUrl: String = CNLiveEnvironmentManager.shared.base_cms_url | 36 | +let APPBaseCMSUrl: String = CNLiveMCEnvironmentManager.shared.base_cms_url |
| 37 | /// 用户云接口 | 37 | /// 用户云接口 |
| 38 | -let APPBaseTokenUrl: String = CNLiveEnvironmentManager.shared.img_token_url | 38 | +let APPBaseTokenUrl: String = CNLiveMCEnvironmentManager.shared.img_token_url |
| 39 | /// cms_api接口 | 39 | /// cms_api接口 |
| 40 | -let APPBaseCMSClassUrl: String = CNLiveEnvironmentManager.shared.base_cms_class_url | 40 | +let APPBaseCMSClassUrl: String = CNLiveMCEnvironmentManager.shared.base_cms_class_url |
| 41 | ///当前APP的环境 | 41 | ///当前APP的环境 |
| 42 | -let APPCurrentEnvironment: CNLiveEnvironment = CNLiveEnvironmentManager.shared.currentEnvironment | 42 | +let APPCurrentEnvironment: CNLiveEnvironment = CNLiveMCEnvironmentManager.shared.currentEnvironment |
| 43 | 43 | ||
| 44 | ///是否是开发环境 | 44 | ///是否是开发环境 |
| 45 | -let IsDevEnvironment: Bool = (CNLiveEnvironmentManager.shared.currentEnvironment == .development) | 45 | +let IsDevEnvironment: Bool = (CNLiveMCEnvironmentManager.shared.currentEnvironment == .development) |
| 46 | ///是否是testFlight 环境 | 46 | ///是否是testFlight 环境 |
| 47 | -let IsTestFlightEnvironment: Bool = (CNLiveEnvironmentManager.shared.currentEnvironment == .testFlight) | 47 | +let IsTestFlightEnvironment: Bool = (CNLiveMCEnvironmentManager.shared.currentEnvironment == .testFlight) |
| 48 | ///是否是线上环境 | 48 | ///是否是线上环境 |
| 49 | -let IsProductionEnvironment: Bool = (CNLiveEnvironmentManager.shared.currentEnvironment == .production) | 49 | +let IsProductionEnvironment: Bool = (CNLiveMCEnvironmentManager.shared.currentEnvironment == .production) |
| 50 | 50 | ||
| 51 | //UniversalLink地址 | 51 | //UniversalLink地址 |
| 52 | let universalLinkURL: String = "https://metacode.cnlive.com" | 52 | let universalLinkURL: String = "https://metacode.cnlive.com" |
| @@ -66,10 +66,10 @@ enum CNLiveEnvironment { | @@ -66,10 +66,10 @@ enum CNLiveEnvironment { | ||
| 66 | 66 | ||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | -class CNLiveEnvironmentManager: NSObject{ | 69 | +class CNLiveMCEnvironmentManager: NSObject{ |
| 70 | 70 | ||
| 71 | //单例类 | 71 | //单例类 |
| 72 | - static let shared = CNLiveEnvironmentManager() | 72 | + static let shared = CNLiveMCEnvironmentManager() |
| 73 | 73 | ||
| 74 | var appId: String | 74 | var appId: String |
| 75 | var appKey: String | 75 | var appKey: String |
| @@ -136,13 +136,13 @@ class CNLiveEnvironmentManager: NSObject{ | @@ -136,13 +136,13 @@ class CNLiveEnvironmentManager: NSObject{ | ||
| 136 | switch environment { | 136 | switch environment { |
| 137 | case .development: | 137 | case .development: |
| 138 | self.developmentEnvironment() | 138 | self.developmentEnvironment() |
| 139 | - CNLiveEnvironmentManager.shared.setupEnvironment(environment: .development) | 139 | + CNLiveEnvironmentManager.setEnvironment(.debugInHouse, isNewHomePage: true) |
| 140 | case .testFlight: | 140 | case .testFlight: |
| 141 | self.testFlightEnvironment() | 141 | self.testFlightEnvironment() |
| 142 | - CNLiveEnvironmentManager.shared.setupEnvironment(environment: .testFlight) | 142 | + CNLiveEnvironmentManager.setEnvironment(.testFlight, isNewHomePage: true) |
| 143 | case .production: | 143 | case .production: |
| 144 | self.productionEnvironment() | 144 | self.productionEnvironment() |
| 145 | - CNLiveEnvironmentManager.shared.setupEnvironment(environment: .production) | 145 | + CNLiveEnvironmentManager.setEnvironment(.productionAppStore, isNewHomePage: true) |
| 146 | } | 146 | } |
| 147 | } | 147 | } |
| 148 | 148 |
metaCode/Classes/Main/HomePage/Controller/WebController/CNWebViewController.swift
| @@ -49,20 +49,6 @@ class CNWebViewController:CNLiveBaseViewController ,WKNavigationDelegate{ | @@ -49,20 +49,6 @@ class CNWebViewController:CNLiveBaseViewController ,WKNavigationDelegate{ | ||
| 49 | } | 49 | } |
| 50 | set{ | 50 | set{ |
| 51 | _url = newValue! | 51 | _url = newValue! |
| 52 | - if (_url != nil){ | ||
| 53 | -// let webUrl: URL! = _url! | ||
| 54 | -// webView.load(URLRequest.init(url:webUrl)) | ||
| 55 | -// webView.evaluateJavaScript("navigator.userAgent") { [self] result, error in | ||
| 56 | -// let userAgent = result as! String | ||
| 57 | -// if error == nil && userAgent.count > 0 { | ||
| 58 | -// if !userAgent.contains(CNLiveEnvironmentManager.shared.base_web_UA) { | ||
| 59 | -// let newUserAgent = userAgent + CNLiveEnvironmentManager.shared.base_web_UA | ||
| 60 | -// webView.customUserAgent = newUserAgent | ||
| 61 | -// } | ||
| 62 | -// } | ||
| 63 | -// webView.load(URLRequest.init(url:webUrl)) | ||
| 64 | -// } | ||
| 65 | - } | ||
| 66 | } | 52 | } |
| 67 | } | 53 | } |
| 68 | 54 |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveDownSlideViewModel.swift
| @@ -29,8 +29,8 @@ class CNLiveDownSlideViewModel:NSObject{ | @@ -29,8 +29,8 @@ class CNLiveDownSlideViewModel:NSObject{ | ||
| 29 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 29 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 30 | CNLiveNetworking.setupShowDataResult(false) | 30 | CNLiveNetworking.setupShowDataResult(false) |
| 31 | let custom_param = NSMutableDictionary() | 31 | let custom_param = NSMutableDictionary() |
| 32 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 33 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 32 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 33 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 34 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 34 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 35 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getPage", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 35 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getPage", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 36 | hiddenLoading() | 36 | hiddenLoading() |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopConsoleViewModel.swift
| @@ -19,8 +19,8 @@ class CNLiveShopConsoleViewModel: NSObject { | @@ -19,8 +19,8 @@ class CNLiveShopConsoleViewModel: NSObject { | ||
| 19 | CNLiveNetworking.setupShowDataResult(false) | 19 | CNLiveNetworking.setupShowDataResult(false) |
| 20 | CNLiveNetworking.setupDSRequest(true) | 20 | CNLiveNetworking.setupDSRequest(true) |
| 21 | let custom_param = NSMutableDictionary() | 21 | let custom_param = NSMutableDictionary() |
| 22 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 23 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 22 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 23 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 24 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 24 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 25 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/isSellerNew", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 25 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/isSellerNew", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 26 | hiddenLoading() | 26 | hiddenLoading() |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopDetailViewModel.swift
| @@ -22,8 +22,8 @@ class CNLiveShopDetailViewModel:NSObject{ | @@ -22,8 +22,8 @@ class CNLiveShopDetailViewModel:NSObject{ | ||
| 22 | CNLiveNetworking.setupShowDataResult(false) | 22 | CNLiveNetworking.setupShowDataResult(false) |
| 23 | CNLiveNetworking.setupDSRequest(true) | 23 | CNLiveNetworking.setupDSRequest(true) |
| 24 | let custom_param = NSMutableDictionary() | 24 | let custom_param = NSMutableDictionary() |
| 25 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 26 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 25 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 26 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 27 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 27 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 28 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/index", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 28 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/index", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 29 | hiddenLoading() | 29 | hiddenLoading() |
metaCode/Classes/Main/HomePage/ViewModel/GoodsManager/CNLiveShopGoodListViewModel.swift
| @@ -37,8 +37,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -37,8 +37,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 37 | CNLiveNetworking.setupShowDataResult(false) | 37 | CNLiveNetworking.setupShowDataResult(false) |
| 38 | CNLiveNetworking.setupDSRequest(true) | 38 | CNLiveNetworking.setupDSRequest(true) |
| 39 | let custom_param = NSMutableDictionary() | 39 | let custom_param = NSMutableDictionary() |
| 40 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 41 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 40 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 41 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 42 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 42 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 43 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 43 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 44 | hiddenLoading() | 44 | hiddenLoading() |
| @@ -76,8 +76,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -76,8 +76,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 76 | CNLiveNetworking.setupShowDataResult(false) | 76 | CNLiveNetworking.setupShowDataResult(false) |
| 77 | CNLiveNetworking.setupDSRequest(true) | 77 | CNLiveNetworking.setupDSRequest(true) |
| 78 | let custom_param = NSMutableDictionary() | 78 | let custom_param = NSMutableDictionary() |
| 79 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 80 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 79 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 80 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 81 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 81 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 82 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 82 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 83 | hiddenLoading() | 83 | hiddenLoading() |
| @@ -143,8 +143,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -143,8 +143,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 143 | CNLiveNetworking.setupShowDataResult(false) | 143 | CNLiveNetworking.setupShowDataResult(false) |
| 144 | CNLiveNetworking.setupDSRequest(true) | 144 | CNLiveNetworking.setupDSRequest(true) |
| 145 | let custom_param = NSMutableDictionary() | 145 | let custom_param = NSMutableDictionary() |
| 146 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 147 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 146 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 147 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 148 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 148 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 149 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsAdd", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 149 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsAdd", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 150 | hiddenLoading() | 150 | hiddenLoading() |
| @@ -203,8 +203,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -203,8 +203,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 203 | CNLiveNetworking.setupShowDataResult(false) | 203 | CNLiveNetworking.setupShowDataResult(false) |
| 204 | CNLiveNetworking.setupDSRequest(true) | 204 | CNLiveNetworking.setupDSRequest(true) |
| 205 | let custom_param = NSMutableDictionary() | 205 | let custom_param = NSMutableDictionary() |
| 206 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 207 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 206 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 207 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 208 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 208 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 209 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEdit", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 209 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEdit", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 210 | hiddenLoading() | 210 | hiddenLoading() |
| @@ -232,8 +232,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -232,8 +232,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 232 | CNLiveNetworking.setupShowDataResult(false) | 232 | CNLiveNetworking.setupShowDataResult(false) |
| 233 | CNLiveNetworking.setupDSRequest(true) | 233 | CNLiveNetworking.setupDSRequest(true) |
| 234 | let custom_param = NSMutableDictionary() | 234 | let custom_param = NSMutableDictionary() |
| 235 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 236 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 235 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 236 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 237 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 237 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 238 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/goodsInfo", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 238 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/goodsInfo", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 239 | hiddenLoading() | 239 | hiddenLoading() |
| @@ -266,8 +266,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -266,8 +266,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 266 | CNLiveNetworking.setupShowDataResult(false) | 266 | CNLiveNetworking.setupShowDataResult(false) |
| 267 | CNLiveNetworking.setupDSRequest(true) | 267 | CNLiveNetworking.setupDSRequest(true) |
| 268 | let custom_param = NSMutableDictionary() | 268 | let custom_param = NSMutableDictionary() |
| 269 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 270 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 269 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 270 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 271 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 271 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 272 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEditAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 272 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEditAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 273 | hiddenLoading() | 273 | hiddenLoading() |
| @@ -292,8 +292,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -292,8 +292,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 292 | CNLiveNetworking.setupShowDataResult(false) | 292 | CNLiveNetworking.setupShowDataResult(false) |
| 293 | CNLiveNetworking.setupDSRequest(true) | 293 | CNLiveNetworking.setupDSRequest(true) |
| 294 | let custom_param = NSMutableDictionary() | 294 | let custom_param = NSMutableDictionary() |
| 295 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 296 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 295 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 296 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 297 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 297 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 298 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/changeGoodsState", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 298 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/changeGoodsState", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 299 | hiddenLoading() | 299 | hiddenLoading() |
| @@ -318,8 +318,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -318,8 +318,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 318 | CNLiveNetworking.setupShowDataResult(false) | 318 | CNLiveNetworking.setupShowDataResult(false) |
| 319 | CNLiveNetworking.setupDSRequest(true) | 319 | CNLiveNetworking.setupDSRequest(true) |
| 320 | let custom_param = NSMutableDictionary() | 320 | let custom_param = NSMutableDictionary() |
| 321 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 322 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 321 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 322 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 323 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 323 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 324 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGroup", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 324 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGroup", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 325 | hiddenLoading() | 325 | hiddenLoading() |
| @@ -351,8 +351,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | @@ -351,8 +351,8 @@ class CNLiveShopGoodListViewModel:NSObject{ | ||
| 351 | CNLiveNetworking.setupShowDataResult(false) | 351 | CNLiveNetworking.setupShowDataResult(false) |
| 352 | CNLiveNetworking.setupDSRequest(true) | 352 | CNLiveNetworking.setupDSRequest(true) |
| 353 | let custom_param = NSMutableDictionary() | 353 | let custom_param = NSMutableDictionary() |
| 354 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 355 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 354 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 355 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 356 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 356 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 357 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/cateList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 357 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/cateList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 358 | hiddenLoading() | 358 | hiddenLoading() |
metaCode/Classes/Main/HomePage/ViewModel/ShopClassify/CNLiveShopClassilyViewModel.swift
| @@ -27,8 +27,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | @@ -27,8 +27,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | ||
| 27 | CNLiveNetworking.setupShowDataResult(false) | 27 | CNLiveNetworking.setupShowDataResult(false) |
| 28 | CNLiveNetworking.setupDSRequest(true) | 28 | CNLiveNetworking.setupDSRequest(true) |
| 29 | let custom_param = NSMutableDictionary() | 29 | let custom_param = NSMutableDictionary() |
| 30 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 31 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 30 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 31 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 32 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 32 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 33 | 33 | ||
| 34 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/addCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 34 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/addCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -52,8 +52,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | @@ -52,8 +52,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | ||
| 52 | CNLiveNetworking.setupShowDataResult(false) | 52 | CNLiveNetworking.setupShowDataResult(false) |
| 53 | CNLiveNetworking.setupDSRequest(true) | 53 | CNLiveNetworking.setupDSRequest(true) |
| 54 | let custom_param = NSMutableDictionary() | 54 | let custom_param = NSMutableDictionary() |
| 55 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 56 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 55 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 56 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 57 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 57 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 58 | 58 | ||
| 59 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/cateList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 59 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/cateList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -85,8 +85,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | @@ -85,8 +85,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | ||
| 85 | CNLiveNetworking.setupShowDataResult(false) | 85 | CNLiveNetworking.setupShowDataResult(false) |
| 86 | CNLiveNetworking.setupDSRequest(true) | 86 | CNLiveNetworking.setupDSRequest(true) |
| 87 | let custom_param = NSMutableDictionary() | 87 | let custom_param = NSMutableDictionary() |
| 88 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 89 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 88 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 89 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 90 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 90 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 91 | 91 | ||
| 92 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 92 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -110,8 +110,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | @@ -110,8 +110,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ | ||
| 110 | CNLiveNetworking.setupShowDataResult(false) | 110 | CNLiveNetworking.setupShowDataResult(false) |
| 111 | CNLiveNetworking.setupDSRequest(true) | 111 | CNLiveNetworking.setupDSRequest(true) |
| 112 | let custom_param = NSMutableDictionary() | 112 | let custom_param = NSMutableDictionary() |
| 113 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 114 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 113 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 114 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 115 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 115 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 116 | 116 | ||
| 117 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/delCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 117 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/delCate", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
metaCode/Classes/Main/HomePage/ViewModel/ShopCoupon/CNLiveShopCouponViewModel.swift
| @@ -130,8 +130,8 @@ class CNLiveShopCouponViewModel:NSObject{ | @@ -130,8 +130,8 @@ class CNLiveShopCouponViewModel:NSObject{ | ||
| 130 | param.setValue(totalNum, forKey: "num") | 130 | param.setValue(totalNum, forKey: "num") |
| 131 | param.setValue(goodsId, forKey: "goods_id") | 131 | param.setValue(goodsId, forKey: "goods_id") |
| 132 | let custom_param = NSMutableDictionary() | 132 | let custom_param = NSMutableDictionary() |
| 133 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 134 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 133 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 134 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 135 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 135 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 136 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 136 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 137 | CNLiveNetworking.setupShowDataResult(false) | 137 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -154,8 +154,8 @@ class CNLiveShopCouponViewModel:NSObject{ | @@ -154,8 +154,8 @@ class CNLiveShopCouponViewModel:NSObject{ | ||
| 154 | CNLiveNetworking.setupShowDataResult(false) | 154 | CNLiveNetworking.setupShowDataResult(false) |
| 155 | CNLiveNetworking.setupDSRequest(true) | 155 | CNLiveNetworking.setupDSRequest(true) |
| 156 | let custom_param = NSMutableDictionary() | 156 | let custom_param = NSMutableDictionary() |
| 157 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 158 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 157 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 158 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 159 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 159 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 160 | 160 | ||
| 161 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/shopCouponList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 161 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/shopCouponList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -179,8 +179,8 @@ class CNLiveShopCouponViewModel:NSObject{ | @@ -179,8 +179,8 @@ class CNLiveShopCouponViewModel:NSObject{ | ||
| 179 | CNLiveNetworking.setupShowDataResult(false) | 179 | CNLiveNetworking.setupShowDataResult(false) |
| 180 | CNLiveNetworking.setupDSRequest(true) | 180 | CNLiveNetworking.setupDSRequest(true) |
| 181 | let custom_param = NSMutableDictionary() | 181 | let custom_param = NSMutableDictionary() |
| 182 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 183 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 182 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 183 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 184 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 184 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 185 | 185 | ||
| 186 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCouponAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 186 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCouponAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -221,8 +221,8 @@ class CNLiveShopCouponViewModel:NSObject{ | @@ -221,8 +221,8 @@ class CNLiveShopCouponViewModel:NSObject{ | ||
| 221 | CNLiveNetworking.setupShowDataResult(false) | 221 | CNLiveNetworking.setupShowDataResult(false) |
| 222 | CNLiveNetworking.setupDSRequest(true) | 222 | CNLiveNetworking.setupDSRequest(true) |
| 223 | let custom_param = NSMutableDictionary() | 223 | let custom_param = NSMutableDictionary() |
| 224 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 225 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 224 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 225 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 226 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 226 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 227 | 227 | ||
| 228 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCoupon", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 228 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCoupon", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -249,8 +249,8 @@ class CNLiveShopCouponViewModel:NSObject{ | @@ -249,8 +249,8 @@ class CNLiveShopCouponViewModel:NSObject{ | ||
| 249 | CNLiveNetworking.setupShowDataResult(false) | 249 | CNLiveNetworking.setupShowDataResult(false) |
| 250 | CNLiveNetworking.setupDSRequest(true) | 250 | CNLiveNetworking.setupDSRequest(true) |
| 251 | let custom_param = NSMutableDictionary() | 251 | let custom_param = NSMutableDictionary() |
| 252 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 253 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 252 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 253 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 254 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 254 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 255 | 255 | ||
| 256 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/delCoupon", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 256 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/delCoupon", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
metaCode/Classes/Main/HomePages/ViewModel/CNLiveHomePageViewModel.swift
| @@ -16,8 +16,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -16,8 +16,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 16 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 16 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 17 | CNLiveNetworking.setupShowDataResult(false) | 17 | CNLiveNetworking.setupShowDataResult(false) |
| 18 | let custom_param = NSMutableDictionary() | 18 | let custom_param = NSMutableDictionary() |
| 19 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 20 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 19 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 20 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 21 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 21 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 22 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/commonApi/homePageConfigList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 22 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/commonApi/homePageConfigList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 23 | hiddenLoading() | 23 | hiddenLoading() |
| @@ -47,8 +47,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -47,8 +47,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 47 | CNLiveNetworking.setupShowDataResult(false) | 47 | CNLiveNetworking.setupShowDataResult(false) |
| 48 | 48 | ||
| 49 | let custom_param = NSMutableDictionary() | 49 | let custom_param = NSMutableDictionary() |
| 50 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 51 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 50 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 51 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 52 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 52 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 53 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseCMSUrl+"/contentApi/albumCollect", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 53 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseCMSUrl+"/contentApi/albumCollect", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 54 | hiddenLoading() | 54 | hiddenLoading() |
| @@ -73,8 +73,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -73,8 +73,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 73 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 73 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 74 | CNLiveNetworking.setupShowDataResult(false) | 74 | CNLiveNetworking.setupShowDataResult(false) |
| 75 | let custom_param = NSMutableDictionary() | 75 | let custom_param = NSMutableDictionary() |
| 76 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 77 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 76 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 77 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 78 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 78 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 79 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/myAlbum", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 79 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/myAlbum", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 80 | hiddenLoading() | 80 | hiddenLoading() |
| @@ -111,8 +111,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -111,8 +111,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 111 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 111 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 112 | CNLiveNetworking.setupShowDataResult(false) | 112 | CNLiveNetworking.setupShowDataResult(false) |
| 113 | let custom_param = NSMutableDictionary() | 113 | let custom_param = NSMutableDictionary() |
| 114 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 115 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 114 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 115 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 116 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 116 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 117 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getBlockContents", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 117 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getBlockContents", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 118 | hiddenLoading() | 118 | hiddenLoading() |
| @@ -139,8 +139,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -139,8 +139,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 139 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 139 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 140 | CNLiveNetworking.setupShowDataResult(false) | 140 | CNLiveNetworking.setupShowDataResult(false) |
| 141 | let custom_param = NSMutableDictionary() | 141 | let custom_param = NSMutableDictionary() |
| 142 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 143 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 142 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 143 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 144 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 144 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 145 | 145 | ||
| 146 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getAlbumMsg", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 146 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getAlbumMsg", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -171,8 +171,8 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -171,8 +171,8 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 171 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 171 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 172 | CNLiveNetworking.setupShowDataResult(false) | 172 | CNLiveNetworking.setupShowDataResult(false) |
| 173 | let custom_param = NSMutableDictionary() | 173 | let custom_param = NSMutableDictionary() |
| 174 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 175 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 174 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 175 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 176 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 176 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 177 | 177 | ||
| 178 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/ugcApi/albumList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 178 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/ugcApi/albumList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| @@ -206,10 +206,10 @@ class CNLiveHomePageViewModel:NSObject{ | @@ -206,10 +206,10 @@ class CNLiveHomePageViewModel:NSObject{ | ||
| 206 | CNLiveNetworking.setupShowDataResult(false) | 206 | CNLiveNetworking.setupShowDataResult(false) |
| 207 | 207 | ||
| 208 | let custom_param = NSMutableDictionary() | 208 | let custom_param = NSMutableDictionary() |
| 209 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 210 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 209 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 210 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 211 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 211 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 212 | - CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/pom/orderVideoByPoint", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in | 212 | + CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveMCEnvironmentManager.shared.img_token_url)/pom/orderVideoByPoint", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 213 | hiddenLoading() | 213 | hiddenLoading() |
| 214 | if (error == nil) { | 214 | if (error == nil) { |
| 215 | let resp = result as! NSDictionary | 215 | let resp = result as! NSDictionary |
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
| @@ -38,8 +38,8 @@ class CNLiveLoginViewModel : NSObject { | @@ -38,8 +38,8 @@ class CNLiveLoginViewModel : NSObject { | ||
| 38 | showLoading(message: "") | 38 | showLoading(message: "") |
| 39 | let param = ["mobile":phone,"countryCode":code] | 39 | let param = ["mobile":phone,"countryCode":code] |
| 40 | let custom_param = NSMutableDictionary() | 40 | let custom_param = NSMutableDictionary() |
| 41 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 42 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 41 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 42 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 43 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 43 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 44 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 44 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 45 | CNLiveNetworking.setupShowDataResult(false) | 45 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -95,8 +95,8 @@ class CNLiveLoginViewModel : NSObject { | @@ -95,8 +95,8 @@ class CNLiveLoginViewModel : NSObject { | ||
| 95 | showLoading(message: "") | 95 | showLoading(message: "") |
| 96 | let param = ["userName":userName,"countryCode":countryCode,"verificationCode":verCode,"inviterId":""] | 96 | let param = ["userName":userName,"countryCode":countryCode,"verificationCode":verCode,"inviterId":""] |
| 97 | let custom_param = NSMutableDictionary() | 97 | let custom_param = NSMutableDictionary() |
| 98 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 99 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 98 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 99 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 100 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 100 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 101 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 101 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 102 | CNLiveNetworking.setupShowDataResult(false) | 102 | CNLiveNetworking.setupShowDataResult(false) |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| @@ -66,8 +66,8 @@ class CNLiveMineViewModel: NSObject { | @@ -66,8 +66,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 66 | param.setValue(UserInfoManager.shared.userInfo.token, forKey: "token") | 66 | param.setValue(UserInfoManager.shared.userInfo.token, forKey: "token") |
| 67 | showLoading(message: "") | 67 | showLoading(message: "") |
| 68 | let custom_param = NSMutableDictionary() | 68 | let custom_param = NSMutableDictionary() |
| 69 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 70 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 69 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 70 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 71 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 71 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 72 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 72 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 73 | CNLiveNetworking.setupShowDataResult(false) | 73 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -106,8 +106,8 @@ class CNLiveMineViewModel: NSObject { | @@ -106,8 +106,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 106 | param.setValue(UserInfoManager.shared.userInfo.access_token, forKey: "access_token") | 106 | param.setValue(UserInfoManager.shared.userInfo.access_token, forKey: "access_token") |
| 107 | showLoading(message: "修改头像中...") | 107 | showLoading(message: "修改头像中...") |
| 108 | let custom_param = NSMutableDictionary() | 108 | let custom_param = NSMutableDictionary() |
| 109 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 110 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 109 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 110 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 111 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 111 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 112 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 112 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 113 | CNLiveNetworking.setupShowDataResult(false) | 113 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -154,8 +154,8 @@ class CNLiveMineViewModel: NSObject { | @@ -154,8 +154,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 154 | param.setValue(APPSecret, forKey: "secret") | 154 | param.setValue(APPSecret, forKey: "secret") |
| 155 | showLoading(message: "") | 155 | showLoading(message: "") |
| 156 | let custom_param = NSMutableDictionary() | 156 | let custom_param = NSMutableDictionary() |
| 157 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 158 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 157 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 158 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 159 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 159 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 160 | CNLiveNetworking.setAllowRequestDefaultArgument(false) | 160 | CNLiveNetworking.setAllowRequestDefaultArgument(false) |
| 161 | CNLiveNetworking.setupShowDataResult(false) | 161 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -212,8 +212,8 @@ class CNLiveMineViewModel: NSObject { | @@ -212,8 +212,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 212 | param.setValue(UIDevice.current.identifierForVendor?.uuidString.replacingOccurrences(of: "-", with: "") ?? "", forKey: "deviceId") | 212 | param.setValue(UIDevice.current.identifierForVendor?.uuidString.replacingOccurrences(of: "-", with: "") ?? "", forKey: "deviceId") |
| 213 | showLoading(message: "") | 213 | showLoading(message: "") |
| 214 | let custom_param = NSMutableDictionary() | 214 | let custom_param = NSMutableDictionary() |
| 215 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 216 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 215 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 216 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 217 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 217 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 218 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 218 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 219 | CNLiveNetworking.setupShowDataResult(false) | 219 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -240,8 +240,8 @@ class CNLiveMineViewModel: NSObject { | @@ -240,8 +240,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 240 | static func requestMessage(resultBlock: @escaping resultNewsBlock) { | 240 | static func requestMessage(resultBlock: @escaping resultNewsBlock) { |
| 241 | showLoading(message: "") | 241 | showLoading(message: "") |
| 242 | let custom_param = NSMutableDictionary() | 242 | let custom_param = NSMutableDictionary() |
| 243 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 244 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 243 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 244 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 245 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 245 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 246 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 246 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 247 | CNLiveNetworking.setupShowDataResult(false) | 247 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -279,8 +279,8 @@ class CNLiveMineViewModel: NSObject { | @@ -279,8 +279,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 279 | param.setValue("30", forKey: "pageSize") | 279 | param.setValue("30", forKey: "pageSize") |
| 280 | param.setValue("\(page)", forKey: "page") | 280 | param.setValue("\(page)", forKey: "page") |
| 281 | let custom_param = NSMutableDictionary() | 281 | let custom_param = NSMutableDictionary() |
| 282 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 283 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 282 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 283 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 284 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 284 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 285 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 285 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 286 | CNLiveNetworking.setupShowDataResult(false) | 286 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -341,8 +341,8 @@ class CNLiveMineViewModel: NSObject { | @@ -341,8 +341,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 341 | param.setValue("\(page)", forKey: "page") | 341 | param.setValue("\(page)", forKey: "page") |
| 342 | param.setValue("30", forKey: "pageSize") | 342 | param.setValue("30", forKey: "pageSize") |
| 343 | let custom_param = NSMutableDictionary() | 343 | let custom_param = NSMutableDictionary() |
| 344 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 345 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 344 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 345 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 346 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 346 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 347 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 347 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 348 | CNLiveNetworking.setupShowDataResult(false) | 348 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -429,8 +429,8 @@ class CNLiveMineViewModel: NSObject { | @@ -429,8 +429,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 429 | request.httpBody = data | 429 | request.httpBody = data |
| 430 | showLoading(message: "") | 430 | showLoading(message: "") |
| 431 | let custom_param = NSMutableDictionary() | 431 | let custom_param = NSMutableDictionary() |
| 432 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 433 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 432 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 433 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 434 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 434 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 435 | CNLiveNetworking.setAllowRequestDefaultArgument(false) | 435 | CNLiveNetworking.setAllowRequestDefaultArgument(false) |
| 436 | CNLiveNetworking.setupShowDataResult(false) | 436 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -473,8 +473,8 @@ class CNLiveMineViewModel: NSObject { | @@ -473,8 +473,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 473 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 473 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 474 | param.setValue(identityId, forKey: "identityId") | 474 | param.setValue(identityId, forKey: "identityId") |
| 475 | let custom_param = NSMutableDictionary() | 475 | let custom_param = NSMutableDictionary() |
| 476 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 477 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 476 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 477 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 478 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 478 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 479 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 479 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 480 | CNLiveNetworking.setupShowDataResult(false) | 480 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -556,8 +556,8 @@ class CNLiveMineViewModel: NSObject { | @@ -556,8 +556,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 556 | let param = NSMutableDictionary() | 556 | let param = NSMutableDictionary() |
| 557 | param.setValue("2", forKey: "appType") | 557 | param.setValue("2", forKey: "appType") |
| 558 | let custom_param = NSMutableDictionary() | 558 | let custom_param = NSMutableDictionary() |
| 559 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 560 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 559 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 560 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 561 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 561 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 562 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 562 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 563 | CNLiveNetworking.setupShowDataResult(false) | 563 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -603,8 +603,8 @@ class CNLiveMineViewModel: NSObject { | @@ -603,8 +603,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 603 | param.setValue("\(page)", forKey: "page") | 603 | param.setValue("\(page)", forKey: "page") |
| 604 | param.setValue("10", forKey: "pageSize") | 604 | param.setValue("10", forKey: "pageSize") |
| 605 | let custom_param = NSMutableDictionary() | 605 | let custom_param = NSMutableDictionary() |
| 606 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 607 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 606 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 607 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 608 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 608 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 609 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 609 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 610 | CNLiveNetworking.setupShowDataResult(false) | 610 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -678,8 +678,8 @@ class CNLiveMineViewModel: NSObject { | @@ -678,8 +678,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 678 | let param = NSMutableDictionary() | 678 | let param = NSMutableDictionary() |
| 679 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 679 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 680 | let custom_param = NSMutableDictionary() | 680 | let custom_param = NSMutableDictionary() |
| 681 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 682 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 681 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 682 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 683 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 683 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 684 | CNLiveNetworking.setupShowDataResult(false) | 684 | CNLiveNetworking.setupShowDataResult(false) |
| 685 | CNLiveNetworking.setupDSRequest(true) | 685 | CNLiveNetworking.setupDSRequest(true) |
| @@ -730,11 +730,11 @@ class CNLiveMineViewModel: NSObject { | @@ -730,11 +730,11 @@ class CNLiveMineViewModel: NSObject { | ||
| 730 | let param = NSMutableDictionary() | 730 | let param = NSMutableDictionary() |
| 731 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 731 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 732 | let custom_param = NSMutableDictionary() | 732 | let custom_param = NSMutableDictionary() |
| 733 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 734 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 733 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 734 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 735 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 735 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 736 | CNLiveNetworking.setupShowDataResult(false) | 736 | CNLiveNetworking.setupShowDataResult(false) |
| 737 | - CNLiveNetworking.setupSignRequestKey(CNLiveEnvironmentManager.shared.appKey_wjj) | 737 | + CNLiveNetworking.setupSignRequestKey(CNLiveMCEnvironmentManager.shared.appKey_wjj) |
| 738 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 738 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 739 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjUrl+"/Daren/integral/getTasks.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in | 739 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjUrl+"/Daren/integral/getTasks.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in |
| 740 | hiddenLoading() | 740 | hiddenLoading() |
| @@ -784,11 +784,11 @@ class CNLiveMineViewModel: NSObject { | @@ -784,11 +784,11 @@ class CNLiveMineViewModel: NSObject { | ||
| 784 | param.setValue("10", forKey: "pageSize") | 784 | param.setValue("10", forKey: "pageSize") |
| 785 | param.setValue("\(page)", forKey: "pageNo") | 785 | param.setValue("\(page)", forKey: "pageNo") |
| 786 | let custom_param = NSMutableDictionary() | 786 | let custom_param = NSMutableDictionary() |
| 787 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 788 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 787 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 788 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 789 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 789 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 790 | CNLiveNetworking.setupShowDataResult(false) | 790 | CNLiveNetworking.setupShowDataResult(false) |
| 791 | - CNLiveNetworking.setupSignRequestKey(CNLiveEnvironmentManager.shared.appKey_wjj) | 791 | + CNLiveNetworking.setupSignRequestKey(CNLiveMCEnvironmentManager.shared.appKey_wjj) |
| 792 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 792 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 793 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/transaction/getTransactionRecord.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in | 793 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/transaction/getTransactionRecord.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in |
| 794 | hiddenLoading() | 794 | hiddenLoading() |
| @@ -829,12 +829,12 @@ class CNLiveMineViewModel: NSObject { | @@ -829,12 +829,12 @@ class CNLiveMineViewModel: NSObject { | ||
| 829 | param.setValue("10", forKey: "pageSize") | 829 | param.setValue("10", forKey: "pageSize") |
| 830 | param.setValue("\(page)", forKey: "pageNo") | 830 | param.setValue("\(page)", forKey: "pageNo") |
| 831 | let custom_param = NSMutableDictionary() | 831 | let custom_param = NSMutableDictionary() |
| 832 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 833 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 832 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 833 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 834 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 834 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 835 | CNLiveNetworking.setupShowDataResult(false) | 835 | CNLiveNetworking.setupShowDataResult(false) |
| 836 | CNLiveNetworking.setupShowResult(true) | 836 | CNLiveNetworking.setupShowResult(true) |
| 837 | - CNLiveNetworking.setupSignRequestKey(CNLiveEnvironmentManager.shared.appKey_wjj) | 837 | + CNLiveNetworking.setupSignRequestKey(CNLiveMCEnvironmentManager.shared.appKey_wjj) |
| 838 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 838 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 839 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/integral/myIntegralRecord.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in | 839 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/integral/myIntegralRecord.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in |
| 840 | hiddenLoading() | 840 | hiddenLoading() |
| @@ -867,11 +867,11 @@ class CNLiveMineViewModel: NSObject { | @@ -867,11 +867,11 @@ class CNLiveMineViewModel: NSObject { | ||
| 867 | let param = NSMutableDictionary() | 867 | let param = NSMutableDictionary() |
| 868 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 868 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 869 | let custom_param = NSMutableDictionary() | 869 | let custom_param = NSMutableDictionary() |
| 870 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 871 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 870 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 871 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 872 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 872 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 873 | CNLiveNetworking.setupShowDataResult(false) | 873 | CNLiveNetworking.setupShowDataResult(false) |
| 874 | - CNLiveNetworking.setupSignRequestKey(CNLiveEnvironmentManager.shared.appKey_wjj) | 874 | + CNLiveNetworking.setupSignRequestKey(CNLiveMCEnvironmentManager.shared.appKey_wjj) |
| 875 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 875 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 876 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/integral/checkIn.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in | 876 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjUrl+"/Daren/integral/checkIn.action", param: (param as! [AnyHashable : Any]), cacheType: .networkOnly) { task, result, error in |
| 877 | hiddenLoading() | 877 | hiddenLoading() |
| @@ -902,8 +902,8 @@ class CNLiveMineViewModel: NSObject { | @@ -902,8 +902,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 902 | let param = NSMutableDictionary() | 902 | let param = NSMutableDictionary() |
| 903 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 903 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 904 | let custom_param = NSMutableDictionary() | 904 | let custom_param = NSMutableDictionary() |
| 905 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 906 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 905 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 906 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 907 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 907 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 908 | CNLiveNetworking.setupShowDataResult(false) | 908 | CNLiveNetworking.setupShowDataResult(false) |
| 909 | CNLiveNetworking.setupDSRequest(true) | 909 | CNLiveNetworking.setupDSRequest(true) |
| @@ -938,8 +938,8 @@ class CNLiveMineViewModel: NSObject { | @@ -938,8 +938,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 938 | /// - resultBlock: 返回 | 938 | /// - resultBlock: 返回 |
| 939 | static func requestApplyShopUserInAction(paramDict: NSDictionary,resultBlock: @escaping resultNewsBlock) { | 939 | static func requestApplyShopUserInAction(paramDict: NSDictionary,resultBlock: @escaping resultNewsBlock) { |
| 940 | let custom_param = NSMutableDictionary() | 940 | let custom_param = NSMutableDictionary() |
| 941 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 942 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 941 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 942 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 943 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 943 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 944 | CNLiveNetworking.setupShowDataResult(false) | 944 | CNLiveNetworking.setupShowDataResult(false) |
| 945 | CNLiveNetworking.setupDSRequest(true) | 945 | CNLiveNetworking.setupDSRequest(true) |
| @@ -973,8 +973,8 @@ class CNLiveMineViewModel: NSObject { | @@ -973,8 +973,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 973 | let param = NSMutableDictionary() | 973 | let param = NSMutableDictionary() |
| 974 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 974 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 975 | let custom_param = NSMutableDictionary() | 975 | let custom_param = NSMutableDictionary() |
| 976 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 977 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 976 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 977 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 978 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 978 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 979 | CNLiveNetworking.setupShowDataResult(false) | 979 | CNLiveNetworking.setupShowDataResult(false) |
| 980 | CNLiveNetworking.setupDSRequest(true) | 980 | CNLiveNetworking.setupDSRequest(true) |
| @@ -1009,8 +1009,8 @@ class CNLiveMineViewModel: NSObject { | @@ -1009,8 +1009,8 @@ class CNLiveMineViewModel: NSObject { | ||
| 1009 | let param = NSMutableDictionary() | 1009 | let param = NSMutableDictionary() |
| 1010 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "loginSid") | 1010 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "loginSid") |
| 1011 | let custom_param = NSMutableDictionary() | 1011 | let custom_param = NSMutableDictionary() |
| 1012 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 1013 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 1012 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 1013 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 1014 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 1014 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 1015 | CNLiveNetworking.setupShowDataResult(false) | 1015 | CNLiveNetworking.setupShowDataResult(false) |
| 1016 | CNLiveNetworking.setupSignRequestKey(APPKey_wjj) | 1016 | CNLiveNetworking.setupSignRequestKey(APPKey_wjj) |
metaCode/Classes/Main/ShopPage/ViewModel/CNLiveShopViewModel.swift
| @@ -21,8 +21,8 @@ class CNLiveShopViewModel: NSObject { | @@ -21,8 +21,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 21 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 21 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 22 | param.setValue("\(page)", forKey: "page") | 22 | param.setValue("\(page)", forKey: "page") |
| 23 | let custom_param = NSMutableDictionary() | 23 | let custom_param = NSMutableDictionary() |
| 24 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 25 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 24 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 25 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 26 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 26 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 27 | CNLiveNetworking.setupShowDataResult(false) | 27 | CNLiveNetworking.setupShowDataResult(false) |
| 28 | CNLiveNetworking.setupDSRequest(true) | 28 | CNLiveNetworking.setupDSRequest(true) |
| @@ -67,8 +67,8 @@ class CNLiveShopViewModel: NSObject { | @@ -67,8 +67,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 67 | param.setValue(state, forKey: "state") | 67 | param.setValue(state, forKey: "state") |
| 68 | param.setValue(keyword, forKey: "keyword") | 68 | param.setValue(keyword, forKey: "keyword") |
| 69 | let custom_param = NSMutableDictionary() | 69 | let custom_param = NSMutableDictionary() |
| 70 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 71 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 70 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 71 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 72 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 72 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 73 | CNLiveNetworking.setupShowDataResult(false) | 73 | CNLiveNetworking.setupShowDataResult(false) |
| 74 | CNLiveNetworking.setupDSRequest(true) | 74 | CNLiveNetworking.setupDSRequest(true) |
| @@ -116,8 +116,8 @@ class CNLiveShopViewModel: NSObject { | @@ -116,8 +116,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 116 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 116 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 117 | param.setValue(orderId, forKey: "id") | 117 | param.setValue(orderId, forKey: "id") |
| 118 | let custom_param = NSMutableDictionary() | 118 | let custom_param = NSMutableDictionary() |
| 119 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 120 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 119 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 120 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 121 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 121 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 122 | CNLiveNetworking.setupShowDataResult(false) | 122 | CNLiveNetworking.setupShowDataResult(false) |
| 123 | CNLiveNetworking.setupDSRequest(true) | 123 | CNLiveNetworking.setupDSRequest(true) |
| @@ -154,8 +154,8 @@ class CNLiveShopViewModel: NSObject { | @@ -154,8 +154,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 154 | let param = NSMutableDictionary() | 154 | let param = NSMutableDictionary() |
| 155 | param.setValue(orderId, forKey: "id") | 155 | param.setValue(orderId, forKey: "id") |
| 156 | let custom_param = NSMutableDictionary() | 156 | let custom_param = NSMutableDictionary() |
| 157 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 158 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 157 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 158 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 159 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 159 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 160 | CNLiveNetworking.setupShowDataResult(false) | 160 | CNLiveNetworking.setupShowDataResult(false) |
| 161 | CNLiveNetworking.setupDSRequest(true) | 161 | CNLiveNetworking.setupDSRequest(true) |
| @@ -203,8 +203,8 @@ class CNLiveShopViewModel: NSObject { | @@ -203,8 +203,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 203 | let param = NSMutableDictionary() | 203 | let param = NSMutableDictionary() |
| 204 | param.setValue(orderId, forKey: "id") | 204 | param.setValue(orderId, forKey: "id") |
| 205 | let custom_param = NSMutableDictionary() | 205 | let custom_param = NSMutableDictionary() |
| 206 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 207 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 206 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 207 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 208 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 208 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 209 | CNLiveNetworking.setupShowDataResult(false) | 209 | CNLiveNetworking.setupShowDataResult(false) |
| 210 | CNLiveNetworking.setupDSRequest(true) | 210 | CNLiveNetworking.setupDSRequest(true) |
| @@ -255,8 +255,8 @@ class CNLiveShopViewModel: NSObject { | @@ -255,8 +255,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 255 | param.setValue(desc, forKey: "desc") | 255 | param.setValue(desc, forKey: "desc") |
| 256 | } | 256 | } |
| 257 | let custom_param = NSMutableDictionary() | 257 | let custom_param = NSMutableDictionary() |
| 258 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 259 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 258 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 259 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 260 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 260 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 261 | CNLiveNetworking.setupShowDataResult(false) | 261 | CNLiveNetworking.setupShowDataResult(false) |
| 262 | CNLiveNetworking.setupDSRequest(true) | 262 | CNLiveNetworking.setupDSRequest(true) |
| @@ -294,8 +294,8 @@ class CNLiveShopViewModel: NSObject { | @@ -294,8 +294,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 294 | let param = NSMutableDictionary() | 294 | let param = NSMutableDictionary() |
| 295 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id") | 295 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id") |
| 296 | let custom_param = NSMutableDictionary() | 296 | let custom_param = NSMutableDictionary() |
| 297 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 298 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 297 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 298 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 299 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 299 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 300 | CNLiveNetworking.setupShowDataResult(false) | 300 | CNLiveNetworking.setupShowDataResult(false) |
| 301 | CNLiveNetworking.setupDSRequest(true) | 301 | CNLiveNetworking.setupDSRequest(true) |
| @@ -354,8 +354,8 @@ class CNLiveShopViewModel: NSObject { | @@ -354,8 +354,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 354 | param.setValue(expressId, forKey: "express_id") | 354 | param.setValue(expressId, forKey: "express_id") |
| 355 | param.setValue(expressNum, forKey: "express_num") | 355 | param.setValue(expressNum, forKey: "express_num") |
| 356 | let custom_param = NSMutableDictionary() | 356 | let custom_param = NSMutableDictionary() |
| 357 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 358 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 357 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 358 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 359 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 359 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 360 | CNLiveNetworking.setupShowDataResult(false) | 360 | CNLiveNetworking.setupShowDataResult(false) |
| 361 | CNLiveNetworking.setupDSRequest(true) | 361 | CNLiveNetworking.setupDSRequest(true) |
| @@ -396,8 +396,8 @@ class CNLiveShopViewModel: NSObject { | @@ -396,8 +396,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 396 | } catch _ {} | 396 | } catch _ {} |
| 397 | } | 397 | } |
| 398 | let custom_param = NSMutableDictionary() | 398 | let custom_param = NSMutableDictionary() |
| 399 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 400 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 399 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 400 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 401 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 401 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 402 | CNLiveNetworking.setupShowDataResult(false) | 402 | CNLiveNetworking.setupShowDataResult(false) |
| 403 | CNLiveNetworking.setupDSRequest(true) | 403 | CNLiveNetworking.setupDSRequest(true) |
| @@ -430,8 +430,8 @@ class CNLiveShopViewModel: NSObject { | @@ -430,8 +430,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 430 | /// - resultBlock: 返回 | 430 | /// - resultBlock: 返回 |
| 431 | static func requestExpressList(resultBlock: @escaping resultShopBlock) { | 431 | static func requestExpressList(resultBlock: @escaping resultShopBlock) { |
| 432 | let custom_param = NSMutableDictionary() | 432 | let custom_param = NSMutableDictionary() |
| 433 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 434 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 433 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 434 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 435 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 435 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 436 | CNLiveNetworking.setupShowDataResult(false) | 436 | CNLiveNetworking.setupShowDataResult(false) |
| 437 | CNLiveNetworking.setupDSRequest(true) | 437 | CNLiveNetworking.setupDSRequest(true) |
| @@ -478,8 +478,8 @@ class CNLiveShopViewModel: NSObject { | @@ -478,8 +478,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 478 | let param = NSMutableDictionary() | 478 | let param = NSMutableDictionary() |
| 479 | param.setValue(orderId, forKey: "id") | 479 | param.setValue(orderId, forKey: "id") |
| 480 | let custom_param = NSMutableDictionary() | 480 | let custom_param = NSMutableDictionary() |
| 481 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 482 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 481 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 482 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 483 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 483 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 484 | CNLiveNetworking.setupShowDataResult(false) | 484 | CNLiveNetworking.setupShowDataResult(false) |
| 485 | CNLiveNetworking.setupDSRequest(true) | 485 | CNLiveNetworking.setupDSRequest(true) |
| @@ -539,8 +539,8 @@ class CNLiveShopViewModel: NSObject { | @@ -539,8 +539,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 539 | url = "/api/v1/getRefundExpress" | 539 | url = "/api/v1/getRefundExpress" |
| 540 | } | 540 | } |
| 541 | let custom_param = NSMutableDictionary() | 541 | let custom_param = NSMutableDictionary() |
| 542 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 543 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 542 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 543 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 544 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 544 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 545 | CNLiveNetworking.setupShowDataResult(false) | 545 | CNLiveNetworking.setupShowDataResult(false) |
| 546 | CNLiveNetworking.setupDSRequest(true) | 546 | CNLiveNetworking.setupDSRequest(true) |
| @@ -593,8 +593,8 @@ class CNLiveShopViewModel: NSObject { | @@ -593,8 +593,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 593 | param.setValue("2", forKey: "type") | 593 | param.setValue("2", forKey: "type") |
| 594 | } | 594 | } |
| 595 | let custom_param = NSMutableDictionary() | 595 | let custom_param = NSMutableDictionary() |
| 596 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 597 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 596 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 597 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 598 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 598 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 599 | CNLiveNetworking.setupShowDataResult(false) | 599 | CNLiveNetworking.setupShowDataResult(false) |
| 600 | CNLiveNetworking.setupDSRequest(true) | 600 | CNLiveNetworking.setupDSRequest(true) |
| @@ -645,8 +645,8 @@ class CNLiveShopViewModel: NSObject { | @@ -645,8 +645,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 645 | param.setValue(keyword, forKey: "keyword") | 645 | param.setValue(keyword, forKey: "keyword") |
| 646 | param.setValue("\(page)", forKey: "page") | 646 | param.setValue("\(page)", forKey: "page") |
| 647 | let custom_param = NSMutableDictionary() | 647 | let custom_param = NSMutableDictionary() |
| 648 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 649 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 648 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 649 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 650 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 650 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 651 | CNLiveNetworking.setupShowDataResult(false) | 651 | CNLiveNetworking.setupShowDataResult(false) |
| 652 | CNLiveNetworking.setupDSRequest(true) | 652 | CNLiveNetworking.setupDSRequest(true) |
| @@ -849,8 +849,8 @@ class CNLiveShopViewModel: NSObject { | @@ -849,8 +849,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 849 | param.setValue(goodsId, forKey: "goods_id") | 849 | param.setValue(goodsId, forKey: "goods_id") |
| 850 | print("创建优惠券数据===>\(param)") | 850 | print("创建优惠券数据===>\(param)") |
| 851 | let custom_param = NSMutableDictionary() | 851 | let custom_param = NSMutableDictionary() |
| 852 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 853 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 852 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 853 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 854 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 854 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 855 | CNLiveNetworking.setupShowDataResult(false) | 855 | CNLiveNetworking.setupShowDataResult(false) |
| 856 | CNLiveNetworking.setupDSRequest(true) | 856 | CNLiveNetworking.setupDSRequest(true) |
| @@ -910,8 +910,8 @@ class CNLiveShopViewModel: NSObject { | @@ -910,8 +910,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 910 | param.setValue(model.goods_id, forKey: "goods_id") | 910 | param.setValue(model.goods_id, forKey: "goods_id") |
| 911 | print("修改优惠券数据===>\(param)") | 911 | print("修改优惠券数据===>\(param)") |
| 912 | let custom_param = NSMutableDictionary() | 912 | let custom_param = NSMutableDictionary() |
| 913 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 914 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 913 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 914 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 915 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 915 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 916 | CNLiveNetworking.setupShowDataResult(false) | 916 | CNLiveNetworking.setupShowDataResult(false) |
| 917 | CNLiveNetworking.setupDSRequest(true) | 917 | CNLiveNetworking.setupDSRequest(true) |
| @@ -949,8 +949,8 @@ class CNLiveShopViewModel: NSObject { | @@ -949,8 +949,8 @@ class CNLiveShopViewModel: NSObject { | ||
| 949 | let param = NSMutableDictionary() | 949 | let param = NSMutableDictionary() |
| 950 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") | 950 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") |
| 951 | let custom_param = NSMutableDictionary() | 951 | let custom_param = NSMutableDictionary() |
| 952 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 953 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 952 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 953 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 954 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 954 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 955 | CNLiveNetworking.setupShowDataResult(false) | 955 | CNLiveNetworking.setupShowDataResult(false) |
| 956 | CNLiveNetworking.setupDSRequest(true) | 956 | CNLiveNetworking.setupDSRequest(true) |
metaCode/Classes/Main/Util/CNLiveCommonManager.swift
| @@ -36,8 +36,8 @@ class CNLiveCommonManager: NSObject{ | @@ -36,8 +36,8 @@ class CNLiveCommonManager: NSObject{ | ||
| 36 | CNLiveNetworking.setupShowDataResult(false) | 36 | CNLiveNetworking.setupShowDataResult(false) |
| 37 | CNLiveNetworking.setupDSRequest(true) | 37 | CNLiveNetworking.setupDSRequest(true) |
| 38 | let custom_param = NSMutableDictionary() | 38 | let custom_param = NSMutableDictionary() |
| 39 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 40 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 39 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 40 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 41 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 41 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 42 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/Api/Index3/get_time", param: nil, cacheType: .networkOnly) { task, result, error in | 42 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/Api/Index3/get_time", param: nil, cacheType: .networkOnly) { task, result, error in |
| 43 | if error == nil{ | 43 | if error == nil{ |
metaCode/Classes/Main/VideoPage/ViewModel/CNLiveShortVideoViewModel.swift
| @@ -23,8 +23,8 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -23,8 +23,8 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 23 | param.setValue("10", forKey: "pageSize") | 23 | param.setValue("10", forKey: "pageSize") |
| 24 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 24 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 25 | let custom_param = NSMutableDictionary() | 25 | let custom_param = NSMutableDictionary() |
| 26 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 27 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 26 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 27 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 28 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 28 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 29 | CNLiveNetworking.setupShowDataResult(false) | 29 | CNLiveNetworking.setupShowDataResult(false) |
| 30 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 30 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -89,8 +89,8 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -89,8 +89,8 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 89 | param.setValue(aid, forKey: "aid") | 89 | param.setValue(aid, forKey: "aid") |
| 90 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 90 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 91 | let custom_param = NSMutableDictionary() | 91 | let custom_param = NSMutableDictionary() |
| 92 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 93 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 92 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 93 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 94 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 94 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 95 | CNLiveNetworking.setupShowDataResult(false) | 95 | CNLiveNetworking.setupShowDataResult(false) |
| 96 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 96 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -139,7 +139,7 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -139,7 +139,7 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 139 | param.setValue(contentId, forKey: "contentId") | 139 | param.setValue(contentId, forKey: "contentId") |
| 140 | param.setValue(support ? "0":"1", forKey: "support") | 140 | param.setValue(support ? "0":"1", forKey: "support") |
| 141 | } | 141 | } |
| 142 | - param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | 142 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 143 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 143 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 144 | param.setValue(contentTitle, forKey: "contentTitle") | 144 | param.setValue(contentTitle, forKey: "contentTitle") |
| 145 | param.setValue(contentSid, forKey: "contentSid") | 145 | param.setValue(contentSid, forKey: "contentSid") |
| @@ -148,8 +148,8 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -148,8 +148,8 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 148 | param.setValue("i", forKey: "plat") | 148 | param.setValue("i", forKey: "plat") |
| 149 | param.setValue("", forKey: "contentTag") | 149 | param.setValue("", forKey: "contentTag") |
| 150 | let custom_param = NSMutableDictionary() | 150 | let custom_param = NSMutableDictionary() |
| 151 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 152 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 151 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 152 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 153 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 153 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 154 | CNLiveNetworking.setupShowDataResult(false) | 154 | CNLiveNetworking.setupShowDataResult(false) |
| 155 | CNLiveNetworking.setupShowResult(true) | 155 | CNLiveNetworking.setupShowResult(true) |
| @@ -192,8 +192,8 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -192,8 +192,8 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 192 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 192 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 193 | param.setValue(type ? "2": "1", forKey: "type") | 193 | param.setValue(type ? "2": "1", forKey: "type") |
| 194 | let custom_param = NSMutableDictionary() | 194 | let custom_param = NSMutableDictionary() |
| 195 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 196 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 195 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 196 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 197 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 197 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 198 | CNLiveNetworking.setupShowDataResult(false) | 198 | CNLiveNetworking.setupShowDataResult(false) |
| 199 | CNLiveNetworking.setupShowDataResult(true) | 199 | CNLiveNetworking.setupShowDataResult(true) |
| @@ -234,13 +234,13 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -234,13 +234,13 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 234 | let param = NSMutableDictionary() | 234 | let param = NSMutableDictionary() |
| 235 | param.setValue(pid, forKey: "topicId") | 235 | param.setValue(pid, forKey: "topicId") |
| 236 | param.setValue("i", forKey: "plat") | 236 | param.setValue("i", forKey: "plat") |
| 237 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 237 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 238 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 238 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 239 | param.setValue("\(page)", forKey: "seqId") | 239 | param.setValue("\(page)", forKey: "seqId") |
| 240 | param.setValue("10", forKey: "count") | 240 | param.setValue("10", forKey: "count") |
| 241 | let custom_param = NSMutableDictionary() | 241 | let custom_param = NSMutableDictionary() |
| 242 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 243 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 242 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 243 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 244 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 244 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 245 | CNLiveNetworking.setupShowDataResult(false) | 245 | CNLiveNetworking.setupShowDataResult(false) |
| 246 | CNLiveNetworking.setupShowResult(true) | 246 | CNLiveNetworking.setupShowResult(true) |
| @@ -282,14 +282,14 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -282,14 +282,14 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 282 | static func requestCommentWithSend(videoId: String, comment: String, isAuthor: Bool,reultShortVideoBlock: @escaping resultShortVideoBlock) { | 282 | static func requestCommentWithSend(videoId: String, comment: String, isAuthor: Bool,reultShortVideoBlock: @escaping resultShortVideoBlock) { |
| 283 | let param = NSMutableDictionary() | 283 | let param = NSMutableDictionary() |
| 284 | param.setValue(videoId, forKey: "topicId") | 284 | param.setValue(videoId, forKey: "topicId") |
| 285 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 285 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 286 | param.setValue("i", forKey: "plat") | 286 | param.setValue("i", forKey: "plat") |
| 287 | param.setValue(comment.qmui_trim, forKey: "comment") | 287 | param.setValue(comment.qmui_trim, forKey: "comment") |
| 288 | param.setValue(isAuthor ? "1" : "0", forKey: "isAuthor") | 288 | param.setValue(isAuthor ? "1" : "0", forKey: "isAuthor") |
| 289 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 289 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 290 | let custom_param = NSMutableDictionary() | 290 | let custom_param = NSMutableDictionary() |
| 291 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 292 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 291 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 292 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 293 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 293 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 294 | CNLiveNetworking.setupShowDataResult(false) | 294 | CNLiveNetworking.setupShowDataResult(false) |
| 295 | CNLiveNetworking.setupDSRequest(false) | 295 | CNLiveNetworking.setupDSRequest(false) |
| @@ -330,15 +330,15 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -330,15 +330,15 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 330 | static func requestCommentWithReply(commentId: String, comment: String, toSid: String, fromSid: String, level: String,reultShortVideoBlock: @escaping resultShortVideoBlock) { | 330 | static func requestCommentWithReply(commentId: String, comment: String, toSid: String, fromSid: String, level: String,reultShortVideoBlock: @escaping resultShortVideoBlock) { |
| 331 | let param = NSMutableDictionary() | 331 | let param = NSMutableDictionary() |
| 332 | param.setValue(commentId, forKey: "commentId") | 332 | param.setValue(commentId, forKey: "commentId") |
| 333 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 333 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 334 | param.setValue(comment, forKey: "comment") | 334 | param.setValue(comment, forKey: "comment") |
| 335 | param.setValue(toSid, forKey: "toSid") | 335 | param.setValue(toSid, forKey: "toSid") |
| 336 | param.setValue(fromSid, forKey: "fromSid") | 336 | param.setValue(fromSid, forKey: "fromSid") |
| 337 | param.setValue(level, forKey: "level") | 337 | param.setValue(level, forKey: "level") |
| 338 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 338 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 339 | let custom_param = NSMutableDictionary() | 339 | let custom_param = NSMutableDictionary() |
| 340 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 341 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 340 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 341 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 342 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 342 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 343 | CNLiveNetworking.setupShowDataResult(false) | 343 | CNLiveNetworking.setupShowDataResult(false) |
| 344 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 344 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -375,13 +375,13 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -375,13 +375,13 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 375 | let param = NSMutableDictionary() | 375 | let param = NSMutableDictionary() |
| 376 | param.setValue(commentId, forKey: "commentId") | 376 | param.setValue(commentId, forKey: "commentId") |
| 377 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 377 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 378 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 378 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 379 | param.setValue("i", forKey: "plat") | 379 | param.setValue("i", forKey: "plat") |
| 380 | param.setValue("\(seqId)", forKey: "seqId")//从 时间戳 开始 | 380 | param.setValue("\(seqId)", forKey: "seqId")//从 时间戳 开始 |
| 381 | param.setValue("10", forKey: "count") | 381 | param.setValue("10", forKey: "count") |
| 382 | let custom_param = NSMutableDictionary() | 382 | let custom_param = NSMutableDictionary() |
| 383 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 384 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 383 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 384 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 385 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 385 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 386 | CNLiveNetworking.setupShowDataResult(false) | 386 | CNLiveNetworking.setupShowDataResult(false) |
| 387 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 387 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -432,12 +432,12 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -432,12 +432,12 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 432 | static func requestCommentDelete(videoId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) { | 432 | static func requestCommentDelete(videoId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) { |
| 433 | let param = NSMutableDictionary() | 433 | let param = NSMutableDictionary() |
| 434 | param.setValue(commentId, forKey: "commentId") | 434 | param.setValue(commentId, forKey: "commentId") |
| 435 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 435 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 436 | param.setValue(videoId, forKey: "topicId") | 436 | param.setValue(videoId, forKey: "topicId") |
| 437 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 437 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 438 | let custom_param = NSMutableDictionary() | 438 | let custom_param = NSMutableDictionary() |
| 439 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 440 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 439 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 440 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 441 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 441 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 442 | CNLiveNetworking.setupShowDataResult(false) | 442 | CNLiveNetworking.setupShowDataResult(false) |
| 443 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 443 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -472,12 +472,12 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -472,12 +472,12 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 472 | static func requestCommentReplyDelete(replyId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) { | 472 | static func requestCommentReplyDelete(replyId: String, commentId: String, reultShortVideoBlock: @escaping resultShortVideoBlock) { |
| 473 | let param = NSMutableDictionary() | 473 | let param = NSMutableDictionary() |
| 474 | param.setValue(commentId, forKey: "commentId") | 474 | param.setValue(commentId, forKey: "commentId") |
| 475 | - param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | 475 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 476 | param.setValue(replyId, forKey: "replyId") | 476 | param.setValue(replyId, forKey: "replyId") |
| 477 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 477 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 478 | let custom_param = NSMutableDictionary() | 478 | let custom_param = NSMutableDictionary() |
| 479 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | ||
| 480 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | 479 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| 480 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey, forKey: "appKey") | ||
| 481 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 481 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 482 | CNLiveNetworking.setupShowDataResult(false) | 482 | CNLiveNetworking.setupShowDataResult(false) |
| 483 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | 483 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| @@ -519,12 +519,12 @@ class CNLiveShortVideoViewModel: NSObject { | @@ -519,12 +519,12 @@ class CNLiveShortVideoViewModel: NSObject { | ||
| 519 | param.setValue("ugc_hd_reply:\(contentId)", forKey: "id") | 519 | param.setValue("ugc_hd_reply:\(contentId)", forKey: "id") |
| 520 | } | 520 | } |
| 521 | param.setValue(support ? "0":"1", forKey: "support") | 521 | param.setValue(support ? "0":"1", forKey: "support") |
| 522 | - param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | 522 | + param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 523 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 523 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 524 | param.setValue("i", forKey: "plat") | 524 | param.setValue("i", forKey: "plat") |
| 525 | let custom_param = NSMutableDictionary() | 525 | let custom_param = NSMutableDictionary() |
| 526 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | ||
| 527 | - custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | 526 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId_wjj, forKey: "appId") |
| 527 | + custom_param.setValue(CNLiveMCEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | ||
| 528 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 528 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 529 | CNLiveNetworking.setupShowDataResult(false) | 529 | CNLiveNetworking.setupShowDataResult(false) |
| 530 | CNLiveNetworking.setupShowResult(true) | 530 | CNLiveNetworking.setupShowResult(true) |
metaCode/Classes/Other/AppDelegate.swift
| @@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | @@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | //设置APP环境 | 40 | //设置APP环境 |
| 41 | - CNLiveEnvironmentManager.shared.setupEnvironment(environment: .production) | 41 | + CNLiveMCEnvironmentManager.shared.setupEnvironment(environment: .production) |
| 42 | 42 | ||
| 43 | window = UIWindow.init(frame: UIScreen.main.bounds) | 43 | window = UIWindow.init(frame: UIScreen.main.bounds) |
| 44 | window?.backgroundColor = KVCBackgroupColor | 44 | window?.backgroundColor = KVCBackgroupColor |