Commit ff47b6f145b8808bed8564fee45f2b1f4117de9e
1 parent
ace27014
接口appid都改
Showing
9 changed files
with
65 additions
and
64 deletions
metaCode/Classes/Main/HomePage/ViewModel/CNLiveDownSlideViewModel.swift
| ... | ... | @@ -29,8 +29,8 @@ class CNLiveDownSlideViewModel:NSObject{ |
| 29 | 29 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 30 | 30 | CNLiveNetworking.setupShowDataResult(false) |
| 31 | 31 | let custom_param = NSMutableDictionary() |
| 32 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 33 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 32 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 33 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 34 | 34 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 35 | 35 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getPage", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 36 | 36 | hiddenLoading() | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopConsoleViewModel.swift
| ... | ... | @@ -19,8 +19,8 @@ class CNLiveShopConsoleViewModel: NSObject { |
| 19 | 19 | CNLiveNetworking.setupShowDataResult(false) |
| 20 | 20 | CNLiveNetworking.setupDSRequest(true) |
| 21 | 21 | let custom_param = NSMutableDictionary() |
| 22 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 23 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 22 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 23 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 24 | 24 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 25 | 25 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/isSellerNew", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 26 | 26 | hiddenLoading() | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/CNLiveShopDetailViewModel.swift
| ... | ... | @@ -22,8 +22,8 @@ class CNLiveShopDetailViewModel:NSObject{ |
| 22 | 22 | CNLiveNetworking.setupShowDataResult(false) |
| 23 | 23 | CNLiveNetworking.setupDSRequest(true) |
| 24 | 24 | let custom_param = NSMutableDictionary() |
| 25 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 26 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 25 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 26 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 27 | 27 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 28 | 28 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/index", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 29 | 29 | hiddenLoading() | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/GoodsManager/CNLiveShopGoodListViewModel.swift
| ... | ... | @@ -37,8 +37,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 37 | 37 | CNLiveNetworking.setupShowDataResult(false) |
| 38 | 38 | CNLiveNetworking.setupDSRequest(true) |
| 39 | 39 | let custom_param = NSMutableDictionary() |
| 40 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 41 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 40 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 41 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 42 | 42 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 43 | 43 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 44 | 44 | hiddenLoading() |
| ... | ... | @@ -76,8 +76,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 76 | 76 | CNLiveNetworking.setupShowDataResult(false) |
| 77 | 77 | CNLiveNetworking.setupDSRequest(true) |
| 78 | 78 | let custom_param = NSMutableDictionary() |
| 79 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 80 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 79 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 80 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 81 | 81 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 82 | 82 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGoodsList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 83 | 83 | hiddenLoading() |
| ... | ... | @@ -143,8 +143,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 143 | 143 | CNLiveNetworking.setupShowDataResult(false) |
| 144 | 144 | CNLiveNetworking.setupDSRequest(true) |
| 145 | 145 | let custom_param = NSMutableDictionary() |
| 146 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 147 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 146 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 147 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 148 | 148 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 149 | 149 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsAdd", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 150 | 150 | hiddenLoading() |
| ... | ... | @@ -203,8 +203,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 203 | 203 | CNLiveNetworking.setupShowDataResult(false) |
| 204 | 204 | CNLiveNetworking.setupDSRequest(true) |
| 205 | 205 | let custom_param = NSMutableDictionary() |
| 206 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 207 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 206 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 207 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 208 | 208 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 209 | 209 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEdit", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 210 | 210 | hiddenLoading() |
| ... | ... | @@ -232,8 +232,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 232 | 232 | CNLiveNetworking.setupShowDataResult(false) |
| 233 | 233 | CNLiveNetworking.setupDSRequest(true) |
| 234 | 234 | let custom_param = NSMutableDictionary() |
| 235 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 236 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 235 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 236 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 237 | 237 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 238 | 238 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/goodsInfo", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 239 | 239 | hiddenLoading() |
| ... | ... | @@ -266,8 +266,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 266 | 266 | CNLiveNetworking.setupShowDataResult(false) |
| 267 | 267 | CNLiveNetworking.setupDSRequest(true) |
| 268 | 268 | let custom_param = NSMutableDictionary() |
| 269 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 270 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 269 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 270 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 271 | 271 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 272 | 272 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/goodsEditAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 273 | 273 | hiddenLoading() |
| ... | ... | @@ -292,8 +292,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 292 | 292 | CNLiveNetworking.setupShowDataResult(false) |
| 293 | 293 | CNLiveNetworking.setupDSRequest(true) |
| 294 | 294 | let custom_param = NSMutableDictionary() |
| 295 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 296 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 295 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 296 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 297 | 297 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 298 | 298 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/changeGoodsState", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 299 | 299 | hiddenLoading() |
| ... | ... | @@ -318,8 +318,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 318 | 318 | CNLiveNetworking.setupShowDataResult(false) |
| 319 | 319 | CNLiveNetworking.setupDSRequest(true) |
| 320 | 320 | let custom_param = NSMutableDictionary() |
| 321 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 322 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 321 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 322 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 323 | 323 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 324 | 324 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/getGroup", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 325 | 325 | hiddenLoading() |
| ... | ... | @@ -351,8 +351,8 @@ class CNLiveShopGoodListViewModel:NSObject{ |
| 351 | 351 | CNLiveNetworking.setupShowDataResult(false) |
| 352 | 352 | CNLiveNetworking.setupDSRequest(true) |
| 353 | 353 | let custom_param = NSMutableDictionary() |
| 354 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 355 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 354 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 355 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 356 | 356 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 357 | 357 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/cateList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 358 | 358 | hiddenLoading() | ... | ... |
metaCode/Classes/Main/HomePage/ViewModel/ShopClassify/CNLiveShopClassilyViewModel.swift
| ... | ... | @@ -27,8 +27,8 @@ class CNLiveShopClassilyViewModel: BaseModel{ |
| 27 | 27 | CNLiveNetworking.setupShowDataResult(false) |
| 28 | 28 | CNLiveNetworking.setupDSRequest(true) |
| 29 | 29 | let custom_param = NSMutableDictionary() |
| 30 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 31 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 30 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 31 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 32 | 32 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 33 | 33 | |
| 34 | 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 | 52 | CNLiveNetworking.setupShowDataResult(false) |
| 53 | 53 | CNLiveNetworking.setupDSRequest(true) |
| 54 | 54 | let custom_param = NSMutableDictionary() |
| 55 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 56 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 55 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 56 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 57 | 57 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 58 | 58 | |
| 59 | 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 | 85 | CNLiveNetworking.setupShowDataResult(false) |
| 86 | 86 | CNLiveNetworking.setupDSRequest(true) |
| 87 | 87 | let custom_param = NSMutableDictionary() |
| 88 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 89 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 88 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 89 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 90 | 90 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 91 | 91 | |
| 92 | 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 | 110 | CNLiveNetworking.setupShowDataResult(false) |
| 111 | 111 | CNLiveNetworking.setupDSRequest(true) |
| 112 | 112 | let custom_param = NSMutableDictionary() |
| 113 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 114 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 113 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 114 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 115 | 115 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 116 | 116 | |
| 117 | 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,10 +130,9 @@ class CNLiveShopCouponViewModel:NSObject{ |
| 130 | 130 | param.setValue(totalNum, forKey: "num") |
| 131 | 131 | param.setValue(goodsId, forKey: "goods_id") |
| 132 | 132 | let custom_param = NSMutableDictionary() |
| 133 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 134 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 133 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 134 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 135 | 135 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 136 | - | |
| 137 | 136 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 138 | 137 | CNLiveNetworking.setupShowDataResult(false) |
| 139 | 138 | CNLiveNetworking.setupDSRequest(true) |
| ... | ... | @@ -155,8 +154,8 @@ class CNLiveShopCouponViewModel:NSObject{ |
| 155 | 154 | CNLiveNetworking.setupShowDataResult(false) |
| 156 | 155 | CNLiveNetworking.setupDSRequest(true) |
| 157 | 156 | let custom_param = NSMutableDictionary() |
| 158 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 159 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 157 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 158 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 160 | 159 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 161 | 160 | |
| 162 | 161 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/shopCouponList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| ... | ... | @@ -180,8 +179,8 @@ class CNLiveShopCouponViewModel:NSObject{ |
| 180 | 179 | CNLiveNetworking.setupShowDataResult(false) |
| 181 | 180 | CNLiveNetworking.setupDSRequest(true) |
| 182 | 181 | let custom_param = NSMutableDictionary() |
| 183 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 184 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 182 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 183 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 185 | 184 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 186 | 185 | |
| 187 | 186 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCouponAttr", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| ... | ... | @@ -222,8 +221,8 @@ class CNLiveShopCouponViewModel:NSObject{ |
| 222 | 221 | CNLiveNetworking.setupShowDataResult(false) |
| 223 | 222 | CNLiveNetworking.setupDSRequest(true) |
| 224 | 223 | let custom_param = NSMutableDictionary() |
| 225 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 226 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 224 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 225 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 227 | 226 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 228 | 227 | |
| 229 | 228 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editCoupon", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| ... | ... | @@ -250,8 +249,8 @@ class CNLiveShopCouponViewModel:NSObject{ |
| 250 | 249 | CNLiveNetworking.setupShowDataResult(false) |
| 251 | 250 | CNLiveNetworking.setupDSRequest(true) |
| 252 | 251 | let custom_param = NSMutableDictionary() |
| 253 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 254 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 252 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 253 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 255 | 254 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 256 | 255 | |
| 257 | 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 | 16 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 17 | 17 | CNLiveNetworking.setupShowDataResult(false) |
| 18 | 18 | let custom_param = NSMutableDictionary() |
| 19 | - custom_param.setValue(APPId, forKey: "appId") | |
| 20 | - custom_param.setValue(APPKey, forKey: "appKey") | |
| 19 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | |
| 20 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | |
| 21 | 21 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 22 | 22 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/commonApi/homePageConfigList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 23 | 23 | hiddenLoading() |
| ... | ... | @@ -45,9 +45,10 @@ class CNLiveHomePageViewModel:NSObject{ |
| 45 | 45 | |
| 46 | 46 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 47 | 47 | CNLiveNetworking.setupShowDataResult(false) |
| 48 | + | |
| 48 | 49 | let custom_param = NSMutableDictionary() |
| 49 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 50 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 50 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 51 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 51 | 52 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 52 | 53 | CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseCMSUrl+"/contentApi/albumCollect", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 53 | 54 | hiddenLoading() |
| ... | ... | @@ -72,8 +73,8 @@ class CNLiveHomePageViewModel:NSObject{ |
| 72 | 73 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 73 | 74 | CNLiveNetworking.setupShowDataResult(false) |
| 74 | 75 | let custom_param = NSMutableDictionary() |
| 75 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 76 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 76 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 77 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 77 | 78 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 78 | 79 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/myAlbum", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 79 | 80 | hiddenLoading() |
| ... | ... | @@ -110,8 +111,8 @@ class CNLiveHomePageViewModel:NSObject{ |
| 110 | 111 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 111 | 112 | CNLiveNetworking.setupShowDataResult(false) |
| 112 | 113 | let custom_param = NSMutableDictionary() |
| 113 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 114 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 114 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 115 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 115 | 116 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 116 | 117 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getBlockContents", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 117 | 118 | hiddenLoading() |
| ... | ... | @@ -138,8 +139,8 @@ class CNLiveHomePageViewModel:NSObject{ |
| 138 | 139 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 139 | 140 | CNLiveNetworking.setupShowDataResult(false) |
| 140 | 141 | let custom_param = NSMutableDictionary() |
| 141 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 142 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 142 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 143 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 143 | 144 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 144 | 145 | |
| 145 | 146 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/contentApi/getAlbumMsg", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| ... | ... | @@ -170,8 +171,8 @@ class CNLiveHomePageViewModel:NSObject{ |
| 170 | 171 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 171 | 172 | CNLiveNetworking.setupShowDataResult(false) |
| 172 | 173 | let custom_param = NSMutableDictionary() |
| 173 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 174 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 174 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 175 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 175 | 176 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 176 | 177 | |
| 177 | 178 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseCMSUrl+"/ugcApi/albumList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| ... | ... | @@ -195,7 +196,7 @@ class CNLiveHomePageViewModel:NSObject{ |
| 195 | 196 | static func orderVideoByPoint(prdId:String,resultBlock: @escaping downSlideResultBlock) { |
| 196 | 197 | let param = NSMutableDictionary() |
| 197 | 198 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 198 | - param.setValue(APPId_wjj, forKey: "sp_id") | |
| 199 | + param.setValue(APPId, forKey: "sp_id") | |
| 199 | 200 | param.setValue(prdId, forKey: "prdId") |
| 200 | 201 | param.setValue("apple", forKey: "frmId") |
| 201 | 202 | param.setValue(CNLiveHomePageViewModel.getRandomOrderId(), forKey: "srvOrderId") |
| ... | ... | @@ -203,10 +204,11 @@ class CNLiveHomePageViewModel:NSObject{ |
| 203 | 204 | CNLiveNetworking.setupShowResult(true) |
| 204 | 205 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 205 | 206 | CNLiveNetworking.setupShowDataResult(false) |
| 206 | - let customParam = NSMutableDictionary() | |
| 207 | - customParam.setValue(APPId, forKey: "appId") | |
| 208 | - customParam.setValue(APPKey, forKey: "appKey") | |
| 209 | - CNLiveNetworking.setupCustomParam(customParam as? [String : String]) | |
| 207 | + | |
| 208 | + let custom_param = NSMutableDictionary() | |
| 209 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId, forKey: "appId") | |
| 210 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey, forKey: "appKey") | |
| 211 | + CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) | |
| 210 | 212 | CNLiveNetworking.requestNetwork(with: .POST, urlString: "\(CNLiveEnvironmentManager.shared.img_token_url)/pom/orderVideoByPoint", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in |
| 211 | 213 | hiddenLoading() |
| 212 | 214 | if (error == nil) { | ... | ... |
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
| ... | ... | @@ -95,8 +95,8 @@ class CNLiveLoginViewModel : NSObject { |
| 95 | 95 | showLoading(message: "") |
| 96 | 96 | let param = ["userName":userName,"countryCode":countryCode,"verificationCode":verCode,"inviterId":""] |
| 97 | 97 | let custom_param = NSMutableDictionary() |
| 98 | - custom_param.setValue(APPId, forKey: "appId") | |
| 99 | - custom_param.setValue(APPKey, forKey: "appKey") | |
| 98 | + custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 99 | + custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 100 | 100 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 101 | 101 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 102 | 102 | CNLiveNetworking.setupShowDataResult(false) | ... | ... |
metaCode/Classes/Main/Util/CNLiveCommonManager.swift
| ... | ... | @@ -36,8 +36,8 @@ class CNLiveCommonManager: NSObject{ |
| 36 | 36 | CNLiveNetworking.setupShowDataResult(false) |
| 37 | 37 | CNLiveNetworking.setupDSRequest(true) |
| 38 | 38 | let custom_param = NSMutableDictionary() |
| 39 | - custom_param.setValue(APPId_wjj, forKey: "appId") | |
| 40 | - custom_param.setValue(APPKey_wjj, forKey: "appKey") | |
| 39 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId") | |
| 40 | + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey") | |
| 41 | 41 | CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) |
| 42 | 42 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/Api/Index3/get_time", param: nil, cacheType: .networkOnly) { task, result, error in |
| 43 | 43 | if error == nil{ | ... | ... |