Commit 684fa2de94987ab140305aa5f951cf22ea3c48f6
1 parent
ac85ee8f
Exists in
parentassistant
调试接口,优化接口地址
Showing
13 changed files
with
38 additions
and
28 deletions
Show diff stats
ParentAssistant/ParentAssistant.xcodeproj/xcuserdata/caoyang.xcuserdatad/xcschemes/xcschememanagement.plist
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant/AppDelegate.swift
| ... | ... | @@ -74,7 +74,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
| 74 | 74 | if json["status"] == 1 && error == nil{ |
| 75 | 75 | if json.contentData().arrayValue.count>0 { |
| 76 | 76 | let imageResource = ZLaunchAdImageResourceConfigure() |
| 77 | - imageResource.imageNameOrImageURL = HTTPServer.HOSTImage+json.contentData().arrayValue[0]["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 77 | + imageResource.imageNameOrImageURL = HOSTImage+json.contentData().arrayValue[0]["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 78 | 78 | imageResource.imageDuration = 5 |
| 79 | 79 | imageResource.imageFrame = UIScreen.main.bounds |
| 80 | 80 | adView.setImageResource(imageResource, action: { |
| ... | ... | @@ -101,7 +101,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
| 101 | 101 | var images:[String] = [] |
| 102 | 102 | if json.contentData().arrayValue.count>0 { |
| 103 | 103 | for item in json.contentData().arrayValue { |
| 104 | - images.append(HTTPServer.HOSTImage+item["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!) | |
| 104 | + images.append(HOSTImage+item["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!) | |
| 105 | 105 | } |
| 106 | 106 | LaunchIntroductionView.shared(withImages: images, buttonImage: "icon_getin", buttonFrame: CGRect(x: getScreenWidth()/2-551/4, y: getScreenHeight()-150, width: 551/2, height: 45)) |
| 107 | 107 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Information/ChannelViewController.swift
| ... | ... | @@ -182,7 +182,7 @@ extension ChannelViewController:UICollectionViewDataSource,UICollectionViewDeleg |
| 182 | 182 | cell.option.text = item.content |
| 183 | 183 | cell.optionNum.text = "\(item.talkNum)" |
| 184 | 184 | cell.shareNum.text = "\(item.forwardingNum)" |
| 185 | - cell.picture.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+item.image).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 185 | + cell.picture.sd_setImage(with: URL(string: (HOSTImage+item.image).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 186 | 186 | return cell |
| 187 | 187 | // }else{ |
| 188 | 188 | // let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "adiouPlayerCell", for: indexPath) as! AdiouPlayerCell |
| ... | ... | @@ -200,7 +200,7 @@ extension ChannelViewController:UICollectionViewDataSource,UICollectionViewDeleg |
| 200 | 200 | break |
| 201 | 201 | default: |
| 202 | 202 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 203 | - vcs.webURL = "\(HTTPServer.HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 203 | + vcs.webURL = "\(HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 204 | 204 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 205 | 205 | } |
| 206 | 206 | } |
| ... | ... | @@ -248,7 +248,7 @@ extension ChannelViewControllerCell:UICollectionViewDataSource,UICollectionViewD |
| 248 | 248 | |
| 249 | 249 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| 250 | 250 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "channelcell", for: indexPath) as! ChannelSelectViewCollectionViewCell |
| 251 | - cell.image.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+SubchannelList[indexPath.row].channelImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: #imageLiteral(resourceName: "Information_bar_icon")) | |
| 251 | + cell.image.sd_setImage(with: URL(string: (HOSTImage+SubchannelList[indexPath.row].channelImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: #imageLiteral(resourceName: "Information_bar_icon")) | |
| 252 | 252 | cell.channelName.text = SubchannelList[indexPath.row].channelName |
| 253 | 253 | return cell |
| 254 | 254 | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Information/InformationViewController.swift
| ... | ... | @@ -190,7 +190,7 @@ class InformationViewController: UIViewController,UISearchBarDelegate { |
| 190 | 190 | if data.channelContent[index].url != "" { |
| 191 | 191 | vcs.webURL = data.channelContent[index].url |
| 192 | 192 | }else{ |
| 193 | - vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[index].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 193 | + vcs.webURL = (HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[index].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 194 | 194 | } |
| 195 | 195 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 196 | 196 | } |
| ... | ... | @@ -253,7 +253,7 @@ extension InformationViewController:UICollectionViewDataSource,UICollectionViewD |
| 253 | 253 | if topADs.count > 0 { |
| 254 | 254 | var arr:[String]=[] |
| 255 | 255 | for item in topADs{ |
| 256 | - arr.append(HTTPServer.HOSTImage+item.fileSrc) | |
| 256 | + arr.append(HOSTImage+item.fileSrc) | |
| 257 | 257 | } |
| 258 | 258 | cell.headerImageView.imageArray = arr |
| 259 | 259 | } |
| ... | ... | @@ -272,7 +272,7 @@ extension InformationViewController:UICollectionViewDataSource,UICollectionViewD |
| 272 | 272 | cell.option.text = item.content |
| 273 | 273 | cell.optionNum.text = "\(item.lookNum)" |
| 274 | 274 | cell.shareNum.text = "\(item.forwardingNum)" |
| 275 | - cell.picture.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+item.image).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 275 | + cell.picture.sd_setImage(with: URL(string: (HOSTImage+item.image).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 276 | 276 | return cell |
| 277 | 277 | // }else{ |
| 278 | 278 | // let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "adiouPlayerCell", for: indexPath) as! AdiouPlayerCell |
| ... | ... | @@ -294,7 +294,7 @@ extension InformationViewController:UICollectionViewDataSource,UICollectionViewD |
| 294 | 294 | if data.channelContent[indexPath.row].url != "" { |
| 295 | 295 | vcs.webURL = data.channelContent[indexPath.row].url |
| 296 | 296 | }else{ |
| 297 | - vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[indexPath.row].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 297 | + vcs.webURL = (HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[indexPath.row].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 298 | 298 | } |
| 299 | 299 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 300 | 300 | |
| ... | ... | @@ -361,7 +361,7 @@ extension ChannelSelectView:UICollectionViewDataSource,UICollectionViewDelegateF |
| 361 | 361 | |
| 362 | 362 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| 363 | 363 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "channelcell", for: indexPath) as! ChannelSelectViewCollectionViewCell |
| 364 | - cell.image.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+SubchannelList[indexPath.row].channelImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "evaluation_icon_highSchoolEnter")) | |
| 364 | + cell.image.sd_setImage(with: URL(string: (HOSTImage+SubchannelList[indexPath.row].channelImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "evaluation_icon_highSchoolEnter")) | |
| 365 | 365 | cell.channelName.text = SubchannelList[indexPath.row].channelName |
| 366 | 366 | return cell |
| 367 | 367 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/evaluation/EvaluationViewController.swift
| ... | ... | @@ -66,7 +66,7 @@ class EvaluationViewController: UIViewController,CLLocationManagerDelegate,Selec |
| 66 | 66 | if index > 2{ |
| 67 | 67 | return |
| 68 | 68 | } |
| 69 | - courseImage[index].sd_setImage(with: URL(string: (HTTPServer.HOSTImage+item.toolImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 69 | + courseImage[index].sd_setImage(with: URL(string: (HOSTImage+item.toolImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) | |
| 70 | 70 | courseLabel[index].text = item.toolName |
| 71 | 71 | } |
| 72 | 72 | } |
| ... | ... | @@ -234,7 +234,7 @@ class EvaluationViewController: UIViewController,CLLocationManagerDelegate,Selec |
| 234 | 234 | if activityArr[sender.tag-3000].toolUrl != "" { |
| 235 | 235 | vcs.webURL = activityArr[sender.tag-3000].toolUrl |
| 236 | 236 | }else{ |
| 237 | - vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(activityArr[sender.tag-3000].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 237 | + vcs.webURL = (HOSTWAP+"/InformationDetail.aspx?id="+"\(activityArr[sender.tag-3000].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 238 | 238 | } |
| 239 | 239 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 240 | 240 | } |
| ... | ... | @@ -266,7 +266,7 @@ extension EvaluationViewController:UICollectionViewDataSource,UICollectionViewDe |
| 266 | 266 | |
| 267 | 267 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| 268 | 268 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "channelcell", for: indexPath) as! ChannelSelectViewCollectionViewCell |
| 269 | - cell.image.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+toolArr[indexPath.row].toolImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "evaluation_icon_highSchoolEnter")) | |
| 269 | + cell.image.sd_setImage(with: URL(string: (HOSTImage+toolArr[indexPath.row].toolImage).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "evaluation_icon_highSchoolEnter")) | |
| 270 | 270 | cell.channelName.text = toolArr[indexPath.row].toolName |
| 271 | 271 | return cell |
| 272 | 272 | } |
| ... | ... | @@ -276,7 +276,7 @@ extension EvaluationViewController:UICollectionViewDataSource,UICollectionViewDe |
| 276 | 276 | if toolArr[indexPath.row].toolUrl != "" { |
| 277 | 277 | vcs.webURL = toolArr[indexPath.row].toolUrl |
| 278 | 278 | }else{ |
| 279 | - vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(toolArr[indexPath.row].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 279 | + vcs.webURL = (HOSTWAP+"/InformationDetail.aspx?id="+"\(toolArr[indexPath.row].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
| 280 | 280 | } |
| 281 | 281 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 282 | 282 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/MyChildrenViewController.swift
| ... | ... | @@ -43,7 +43,7 @@ class MyChildrenViewController: UIViewController{ |
| 43 | 43 | // MARK: - 我的孩子去订购点击事件 |
| 44 | 44 | @IBAction func orderBuyAction(_ sender: UIButton) { |
| 45 | 45 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 46 | - vcs.webURL = "\(HTTPServer.HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 46 | + vcs.webURL = "\(HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 47 | 47 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 48 | 48 | } |
| 49 | 49 | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/MyViewController.swift
| ... | ... | @@ -214,7 +214,7 @@ extension MyViewController: UITableViewDelegate,UITableViewDataSource{ |
| 214 | 214 | if AccountManager.shared.isOnline() { |
| 215 | 215 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 216 | 216 | vcs.borderline = true |
| 217 | - vcs.webURL = "\(HTTPServer.HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 217 | + vcs.webURL = "\(HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
| 218 | 218 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 219 | 219 | }else{ |
| 220 | 220 | appDelegate.window!.makeToast("请先登录", duration: 1, position: CSToastPositionCenter) |
| ... | ... | @@ -228,13 +228,13 @@ extension MyViewController: UITableViewDelegate,UITableViewDataSource{ |
| 228 | 228 | } |
| 229 | 229 | case 5://意见与反馈 |
| 230 | 230 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 231 | - vcs.webURL = HTTPServer.HOSTWAP+"/FeedBack.aspx?userid=\(AccountManager.shared.userid)" | |
| 231 | + vcs.webURL = HOSTWAP+"/FeedBack.aspx?userid=\(AccountManager.shared.userid)" | |
| 232 | 232 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 233 | 233 | case 6://清除缓存 |
| 234 | 234 | clearCache() |
| 235 | 235 | case 7://关于 |
| 236 | 236 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 237 | - vcs.webURL = HTTPServer.HOSTWAP+"/About.html" | |
| 237 | + vcs.webURL = HOSTWAP+"/About.html" | |
| 238 | 238 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 239 | 239 | default: |
| 240 | 240 | break | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/View/OrderDetailTableViewCell.swift
| ... | ... | @@ -50,7 +50,7 @@ extension OrderDetailTableViewCell: UICollectionViewDelegate,UICollectionViewDat |
| 50 | 50 | } |
| 51 | 51 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| 52 | 52 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
| 53 | - vcs.webURL = "\(HTTPServer.HOSTWAP!)/OrderDetail.aspx?orderid=\(dataSet[indexPath.row].id)" | |
| 53 | + vcs.webURL = "\(HOSTWAP!)/OrderDetail.aspx?orderid=\(dataSet[indexPath.row].id)" | |
| 54 | 54 | self.superVC.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
| 55 | 55 | } |
| 56 | 56 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/report/MoralViewController.swift
| ... | ... | @@ -11,6 +11,7 @@ import UIKit |
| 11 | 11 | class MoralViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { |
| 12 | 12 | |
| 13 | 13 | @IBOutlet weak var tableView: UITableView! |
| 14 | + var data = Array<JSON>() | |
| 14 | 15 | override func viewDidLoad() { |
| 15 | 16 | super.viewDidLoad() |
| 16 | 17 | self.title = "德育报告" |
| ... | ... | @@ -23,9 +24,18 @@ class MoralViewController: UIViewController,UITableViewDelegate,UITableViewDataS |
| 23 | 24 | |
| 24 | 25 | private func downLoadDataFromNet(){ |
| 25 | 26 | |
| 26 | - let params = ["name":"sss"] | |
| 27 | + | |
| 28 | + let params = ["screenId":1,"startDate":"2018-03-08","endDate":"2018-04-08","classId":"70","schoolId":1] as [String : Any] | |
| 29 | + | |
| 27 | 30 | HTTPServer.shared.getEvaluationSceneAnalysis(parameters: params as [String : AnyObject]) { (backData, error) in |
| 28 | - | |
| 31 | + print(backData!) | |
| 32 | + if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { | |
| 33 | + | |
| 34 | +// self.data = SceneEvaluate(j: JSON.fromString(backData)!.contentData()) | |
| 35 | +// if self.data != nil{ | |
| 36 | +// print(self.data) | |
| 37 | +// } | |
| 38 | + } | |
| 29 | 39 | } |
| 30 | 40 | } |
| 31 | 41 | ... | ... |
ParentAssistant/ParentAssistant/Classes/util/Macro.swift
| ... | ... | @@ -72,7 +72,7 @@ let URL_PARENTSERVICE_GETADS="/api/ParentService/GetAds" //嘀 |
| 72 | 72 | |
| 73 | 73 | //MARK: 遠 |
| 74 | 74 | /// 敺瑁雿祕 |
| 75 | -let URL_POST_EVALUATION_ANALYSIS = "/api/EvaluationStatistics/GetEvaluationAlalysis" | |
| 75 | +let URL_POST_EVALUATION_ANALYSIS = "/api/EvaluationLabel/GetStatisticalAnalysis" | |
| 76 | 76 | /// 敺瑁霂行 |
| 77 | 77 | let URL_POST_EVALUATION_ANALYSIS_DETAILS = "/api/EvaluationLabel/GetSceneAnalysisDetails" |
| 78 | 78 | ... | ... |
ParentAssistant/ParentAssistant/Classes/util/utils.swift
| ... | ... | @@ -12,7 +12,7 @@ import Photos |
| 12 | 12 | //MARK: - 服务器和log打印设置 |
| 13 | 13 | class Debug{ |
| 14 | 14 | static let enable=false//是否打印log |
| 15 | - static let isFormal=true//是否是正式服务器 | |
| 15 | + static let isFormal=false//是否是正式服务器 | |
| 16 | 16 | class func log(_ msg:String){ |
| 17 | 17 | if(!Debug.enable){ |
| 18 | 18 | return |
| ... | ... | @@ -109,14 +109,14 @@ class Setting{ |
| 109 | 109 | |
| 110 | 110 | class func saveUserInfo(_ info:String?)->Bool{ |
| 111 | 111 | if let ret=info{ |
| 112 | - UserDefaults.standard.set(ret, forKey: HTTPServer.URL_CURRENT_INFO) | |
| 112 | + UserDefaults.standard.set(ret, forKey: URL_CURRENT_INFO) | |
| 113 | 113 | }else{ |
| 114 | - UserDefaults.standard.set(nil, forKey: HTTPServer.URL_CURRENT_INFO) | |
| 114 | + UserDefaults.standard.set(nil, forKey: URL_CURRENT_INFO) | |
| 115 | 115 | } |
| 116 | 116 | return UserDefaults.standard.synchronize() |
| 117 | 117 | } |
| 118 | 118 | class func getUserInfo()->JSON?{ |
| 119 | - let ob = UserDefaults.standard.string(forKey: HTTPServer.URL_CURRENT_INFO) | |
| 119 | + let ob = UserDefaults.standard.string(forKey: URL_CURRENT_INFO) | |
| 120 | 120 | return JSON.fromString(ob) |
| 121 | 121 | |
| 122 | 122 | } | ... | ... |
ParentAssistant/Pods/Pods.xcodeproj/xcuserdata/caoyang.xcuserdatad/xcschemes/xcschememanagement.plist