Commit 8b892b8ed654d06afc376d1a9cbbd2f851ec0ca1
Exists in
parentassistant
Merge branch 'parentassistant' of http://git.shunzhi.net/iosgroup/parentassistan…
…t into parentassistant # Conflicts: # ParentAssistant/ParentAssistant/Supporting Files/Base.lproj/Main.storyboard
Showing
27 changed files
with
491 additions
and
70 deletions
Show diff stats
ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj
... | ... | @@ -105,6 +105,7 @@ |
105 | 105 | BFBC06CC2063AE8900CCFAFF /* ZLaunchAdWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBC06C22063AE8800CCFAFF /* ZLaunchAdWindow.swift */; }; |
106 | 106 | BFBC06CD2063AE8900CCFAFF /* ZLaunchImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBC06C32063AE8800CCFAFF /* ZLaunchImageView.swift */; }; |
107 | 107 | BFBC06CE2063AE8900CCFAFF /* ZLaunchLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBC06C42063AE8800CCFAFF /* ZLaunchLog.swift */; }; |
108 | + BFBC06D22064FDDE00CCFAFF /* LaunchIntroductionView.m in Sources */ = {isa = PBXBuildFile; fileRef = BFBC06D12064FDDE00CCFAFF /* LaunchIntroductionView.m */; }; | |
108 | 109 | BFCED888205280B700055373 /* MyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCED887205280B700055373 /* MyViewController.swift */; }; |
109 | 110 | BFCED88B20528DE700055373 /* MyViewControllerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCED88A20528DE700055373 /* MyViewControllerModel.swift */; }; |
110 | 111 | BFEAAAA7205118370072FAAF /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFEAAAA6205118370072FAAF /* TabBarController.swift */; }; |
... | ... | @@ -254,6 +255,8 @@ |
254 | 255 | BFBC06C22063AE8800CCFAFF /* ZLaunchAdWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZLaunchAdWindow.swift; sourceTree = "<group>"; }; |
255 | 256 | BFBC06C32063AE8800CCFAFF /* ZLaunchImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZLaunchImageView.swift; sourceTree = "<group>"; }; |
256 | 257 | BFBC06C42063AE8800CCFAFF /* ZLaunchLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZLaunchLog.swift; sourceTree = "<group>"; }; |
258 | + BFBC06D02064FDDE00CCFAFF /* LaunchIntroductionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchIntroductionView.h; sourceTree = "<group>"; }; | |
259 | + BFBC06D12064FDDE00CCFAFF /* LaunchIntroductionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchIntroductionView.m; sourceTree = "<group>"; }; | |
257 | 260 | BFCED887205280B700055373 /* MyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyViewController.swift; sourceTree = "<group>"; }; |
258 | 261 | BFCED88A20528DE700055373 /* MyViewControllerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyViewControllerModel.swift; sourceTree = "<group>"; }; |
259 | 262 | BFEAAAA6205118370072FAAF /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; }; |
... | ... | @@ -622,6 +625,15 @@ |
622 | 625 | path = ZLaunchAd; |
623 | 626 | sourceTree = "<group>"; |
624 | 627 | }; |
628 | + BFBC06CF2064FDDE00CCFAFF /* LaunchIntroduction */ = { | |
629 | + isa = PBXGroup; | |
630 | + children = ( | |
631 | + BFBC06D02064FDDE00CCFAFF /* LaunchIntroductionView.h */, | |
632 | + BFBC06D12064FDDE00CCFAFF /* LaunchIntroductionView.m */, | |
633 | + ); | |
634 | + path = LaunchIntroduction; | |
635 | + sourceTree = "<group>"; | |
636 | + }; | |
625 | 637 | BFCED886205280B700055373 /* Controller */ = { |
626 | 638 | isa = PBXGroup; |
627 | 639 | children = ( |
... | ... | @@ -663,6 +675,7 @@ |
663 | 675 | BFEAAAAC205257270072FAAF /* libs */ = { |
664 | 676 | isa = PBXGroup; |
665 | 677 | children = ( |
678 | + BFBC06CF2064FDDE00CCFAFF /* LaunchIntroduction */, | |
666 | 679 | BFBC06BA2063AE8800CCFAFF /* ZLaunchAd */, |
667 | 680 | 5980BF5F2061048A00F4A35E /* LZCityPickerClass */, |
668 | 681 | BFEAAAAD205257460072FAAF /* LXCalendar */, |
... | ... | @@ -932,6 +945,7 @@ |
932 | 945 | BFEAAAA9205248AC0072FAAF /* TaskPresentationTableViewCell.swift in Sources */, |
933 | 946 | AD24AA202065FBAF00ECA428 /* SceneTopCell.swift in Sources */, |
934 | 947 | 5980BF6A2061048A00F4A35E /* LZPickerModel.m in Sources */, |
948 | + BFBC06D22064FDDE00CCFAFF /* LaunchIntroductionView.m in Sources */, | |
935 | 949 | BFEAAAA7205118370072FAAF /* TabBarController.swift in Sources */, |
936 | 950 | BF67F3C020590A2F002FDC61 /* SwiftyJSON.swift in Sources */, |
937 | 951 | 599364ED204E62E700C8B371 /* InformationViewController.swift in Sources */, | ... | ... |
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
... | ... | @@ -38,8 +38,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
38 | 38 | }) |
39 | 39 | } |
40 | 40 | setShareSDKSetting() |
41 | + let tabbarVC = Story.instantiateViewControllerWithIdentifier("TabBarController", storyName: "Main") as! TabBarController | |
42 | + self.window?.rootViewController = tabbarVC | |
43 | + self.window?.makeKeyAndVisible() | |
41 | 44 | // 加载广告 |
42 | - requestAD() | |
45 | + requestAD(vc: tabbarVC) | |
43 | 46 | return true |
44 | 47 | } |
45 | 48 | //设置云信的appkey |
... | ... | @@ -60,33 +63,53 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
60 | 63 | YXMessageManager.share.addYXDelegate() |
61 | 64 | } |
62 | 65 | // MARK: - 加载广告页 |
63 | - func requestAD() -> Void { | |
66 | + func requestAD(vc:TabBarController) -> Void { | |
64 | 67 | var position:Int = 0 |
65 | - if Setting.getString("isFirst") == "true" {//是否是第一次下载 | |
68 | + if Setting.getString("isFirst") == "\(AppDelegate.version())" {//是否是第一次下载 | |
66 | 69 | position = 1 |
70 | + let adView = ZLaunchAd.create() | |
71 | + //position 广告位置0-首次广告位1-开屏广告位2-资讯首页3-频道首页4-频道内容5-文章内容页 AccountManager.shared.address | |
72 | + HTTPServer.shared.getAds(["position":position as AnyObject], completionHandler: { (str, error) in | |
73 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | |
74 | + if json["status"] == 1 && error == nil{ | |
75 | + if json.contentData().arrayValue.count>0 { | |
76 | + let imageResource = ZLaunchAdImageResourceConfigure() | |
77 | + imageResource.imageNameOrImageURL = HTTPServer.HOSTImage+json.contentData().arrayValue[0]["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
78 | + imageResource.imageDuration = 5 | |
79 | + imageResource.imageFrame = UIScreen.main.bounds | |
80 | + adView.setImageResource(imageResource, action: { | |
81 | + /// 广告点击 | |
82 | + }) | |
83 | + } | |
84 | + } | |
85 | + }, failHandler: { (error) in | |
86 | + }) | |
87 | + }) | |
67 | 88 | }else{ |
89 | +// Thread.sleep(forTimeInterval: 5.0)//延长启动页面10秒 | |
90 | + let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: getScreenHeight())) | |
91 | + view.backgroundColor = UIColor.white | |
92 | + vc.view.addSubview(view) | |
68 | 93 | position = 0 |
69 | - Setting.save("true", forKey: "isFirst") | |
70 | - } | |
71 | - //position 广告位置0-首次广告位1-开屏广告位2-资讯首页3-频道首页4-频道内容5-文章内容页 AccountManager.shared.address | |
72 | - HTTPServer.shared.getAds(["position":position as AnyObject,"areaName":"" as AnyObject], completionHandler: { (str, error) in | |
73 | - httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | |
74 | - if json["status"] == 1 && error == nil{ | |
75 | - if json.contentData().arrayValue.count>0 { | |
76 | - let adView = ZLaunchAd.create() | |
77 | - let imageResource = ZLaunchAdImageResourceConfigure() | |
78 | - imageResource.imageNameOrImageURL = HTTPServer.HOSTImage+json.contentData().arrayValue[0]["fileSrc"].stringValue | |
79 | - imageResource.imageDuration = 5 | |
80 | - imageResource.imageFrame = UIScreen.main.bounds | |
81 | - adView.setImageResource(imageResource, action: { | |
82 | - /// 广告点击 | |
83 | - }) | |
94 | + let _ = Setting.save("\(AppDelegate.version())", forKey: "isFirst") | |
95 | + //position 广告位置0-首次广告位1-开屏广告位2-资讯首页3-频道首页4-频道内容5-文章内容页 AccountManager.shared.address | |
96 | + HTTPServer.shared.getAds(["position":position as AnyObject], completionHandler: { (str, error) in | |
97 | + view.removeFromSuperview() | |
98 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | |
99 | + if json["status"] == 1 && error == nil{ | |
100 | + var images:[String] = [] | |
101 | + if json.contentData().arrayValue.count>0 { | |
102 | + for item in json.contentData().arrayValue { | |
103 | + NSLog("************\(HTTPServer.HOSTImage+item["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)"); images.append(HTTPServer.HOSTImage+item["fileSrc"].stringValue.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!) | |
104 | + } | |
105 | + LaunchIntroductionView.shared(withImages: images, buttonImage: "icon_getin", buttonFrame: CGRect(x: getScreenWidth()/2-551/4, y: getScreenHeight()-150, width: 551/2, height: 45)) | |
106 | + } | |
84 | 107 | } |
85 | - } | |
86 | - }, failHandler: { (error) in | |
87 | - | |
108 | + }, failHandler: { (error) in | |
109 | + }) | |
88 | 110 | }) |
89 | - }) | |
111 | + | |
112 | + } | |
90 | 113 | } |
91 | 114 | // MARK: - 设置网络 |
92 | 115 | @objc func networkStatusChange() { | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Information/InformationViewController.swift
... | ... | @@ -31,7 +31,7 @@ class InformationViewController: UIViewController,UISearchBarDelegate { |
31 | 31 | searchView.placeholder = "请输入搜索内容" |
32 | 32 | searchView.showsCancelButton = false |
33 | 33 | self.navigationItem.titleView = searchView |
34 | - | |
34 | + self.configTheme() | |
35 | 35 | |
36 | 36 | } |
37 | 37 | |
... | ... | @@ -182,8 +182,11 @@ class InformationViewController: UIViewController,UISearchBarDelegate { |
182 | 182 | //点击资讯进入详情 |
183 | 183 | func pushToInfoView(index:Int){ |
184 | 184 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
185 | - vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[index].id)"+"&areaname="+AccountManager.shared.address)//.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
186 | - | |
185 | + if data.channelContent[index].url != "" { | |
186 | + vcs.webURL = data.channelContent[index].url | |
187 | + }else{ | |
188 | + vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[index].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
189 | + } | |
187 | 190 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
188 | 191 | } |
189 | 192 | |
... | ... | @@ -262,7 +265,7 @@ extension InformationViewController:UICollectionViewDataSource,UICollectionViewD |
262 | 265 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "contentCell", for: indexPath) as! ChannelCollectionViewCell |
263 | 266 | cell.title.text = item.title |
264 | 267 | cell.option.text = item.content |
265 | - cell.optionNum.text = "\(item.talkNum)" | |
268 | + cell.optionNum.text = "\(item.lookNum)" | |
266 | 269 | cell.shareNum.text = "\(item.forwardingNum)" |
267 | 270 | cell.picture.sd_setImage(with: URL(string: (HTTPServer.HOSTImage+item.image).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "navigationBar_backgrounImage")) |
268 | 271 | return cell |
... | ... | @@ -283,10 +286,14 @@ extension InformationViewController:UICollectionViewDataSource,UICollectionViewD |
283 | 286 | break |
284 | 287 | default: |
285 | 288 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
286 | - vcs.webURL = data.channelContent[indexPath.row].url//"\(HTTPServer.HOSTWAP!)/ParentOrderCenter.aspx?userid=\(AccountManager.shared.id())" | |
289 | + if data.channelContent[indexPath.row].url != "" { | |
290 | + vcs.webURL = data.channelContent[indexPath.row].url | |
291 | + }else{ | |
292 | + vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(data.channelContent[indexPath.row].id)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
293 | + } | |
287 | 294 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
288 | 295 | |
289 | - pushToInfoView(index: indexPath.row) | |
296 | +// pushToInfoView(index: indexPath.row) | |
290 | 297 | } |
291 | 298 | } |
292 | 299 | |
... | ... | @@ -407,6 +414,7 @@ class ChannelContentDemol: NSObject { |
407 | 414 | var content:String=""// 资讯内容 , |
408 | 415 | var forwardingNum:Int=0// 资讯转发数 , |
409 | 416 | var talkNum:Int=0 // 评论数 , |
417 | + var lookNum:Int = 0 //浏览数 | |
410 | 418 | var orderById:Int=0// 资讯排序 |
411 | 419 | var isAds:Int=0// 是否为广告 1是广告 |
412 | 420 | init(j:JSON){ |
... | ... | @@ -417,6 +425,7 @@ class ChannelContentDemol: NSObject { |
417 | 425 | content = j["content"].stringValue |
418 | 426 | forwardingNum = j["forwardingNum"].intValue |
419 | 427 | talkNum = j["talkNum"].intValue |
428 | + lookNum = j["lookNum"].intValue | |
420 | 429 | orderById = j["orderById"].intValue |
421 | 430 | isAds = j["isAds"].intValue |
422 | 431 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Information/view/ChannelCollectionViewCell.xib
... | ... | @@ -38,25 +38,25 @@ |
38 | 38 | <color key="textColor" red="0.27503338459999999" green="0.50970917940000005" blue="0.90092128520000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
39 | 39 | <nil key="highlightedColor"/> |
40 | 40 | </label> |
41 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="评论:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lvp-kr-OuU"> | |
42 | - <rect key="frame" x="8" y="72" width="24" height="12"/> | |
41 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="浏览量:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lvp-kr-OuU"> | |
42 | + <rect key="frame" x="8" y="72" width="34" height="12"/> | |
43 | 43 | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
44 | 44 | <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> |
45 | 45 | <nil key="highlightedColor"/> |
46 | 46 | </label> |
47 | 47 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="30" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3KK-be-Vix"> |
48 | - <rect key="frame" x="40" y="72" width="13" height="12"/> | |
48 | + <rect key="frame" x="50" y="72" width="13" height="12"/> | |
49 | 49 | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
50 | 50 | <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> |
51 | 51 | <nil key="highlightedColor"/> |
52 | 52 | </label> |
53 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="转发:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wMQ-5O-LNi"> | |
53 | + <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="转发:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wMQ-5O-LNi"> | |
54 | 54 | <rect key="frame" x="182" y="72" width="24" height="12"/> |
55 | 55 | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
56 | 56 | <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> |
57 | 57 | <nil key="highlightedColor"/> |
58 | 58 | </label> |
59 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="15" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dfn-o9-z6k"> | |
59 | + <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="15" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dfn-o9-z6k"> | |
60 | 60 | <rect key="frame" x="214" y="72" width="11.5" height="12"/> |
61 | 61 | <fontDescription key="fontDescription" type="system" pointSize="10"/> |
62 | 62 | <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/evaluation/EvaluationViewController.swift
... | ... | @@ -229,7 +229,11 @@ class EvaluationViewController: UIViewController,CLLocationManagerDelegate,Selec |
229 | 229 | return |
230 | 230 | } |
231 | 231 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
232 | + if activityArr[sender.tag-3000].toolUrl != "" { | |
232 | 233 | vcs.webURL = activityArr[sender.tag-3000].toolUrl |
234 | + }else{ | |
235 | + vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(activityArr[sender.tag-3000].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
236 | + } | |
233 | 237 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
234 | 238 | } |
235 | 239 | |
... | ... | @@ -267,7 +271,11 @@ extension EvaluationViewController:UICollectionViewDataSource,UICollectionViewDe |
267 | 271 | |
268 | 272 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
269 | 273 | let vcs = Story.instantiateViewControllerWithIdentifier("JSViewController", storyName: "JS") as! JSViewController |
270 | - vcs.webURL = toolArr[indexPath.row].toolUrl | |
274 | + if toolArr[indexPath.row].toolUrl != "" { | |
275 | + vcs.webURL = toolArr[indexPath.row].toolUrl | |
276 | + }else{ | |
277 | + vcs.webURL = (HTTPServer.HOSTWAP+"/InformationDetail.aspx?id="+"\(toolArr[indexPath.row].toolId)"+"&areaname="+AccountManager.shared.address).addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
278 | + } | |
271 | 279 | self.navigationController?.present(vcs.wrapWithNavigationController(), animated: true, completion: nil) |
272 | 280 | } |
273 | 281 | } | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/LoginViewController.swift
... | ... | @@ -14,6 +14,7 @@ class LoginViewController: UIViewController,UITextFieldDelegate { |
14 | 14 | @IBOutlet var phoneTextField: UITextField!//电话号码 |
15 | 15 | @IBOutlet var passwordTextField: UITextField!//密码 |
16 | 16 | @IBOutlet var passwordHiddenBtn: UIButton!//查看密码按钮 |
17 | + @IBOutlet var loginBtn: UIButton! | |
17 | 18 | override func viewDidLoad() { |
18 | 19 | super.viewDidLoad() |
19 | 20 | layoutSubViews() |
... | ... | @@ -61,6 +62,15 @@ class LoginViewController: UIViewController,UITextFieldDelegate { |
61 | 62 | self.view.endEditing(true) |
62 | 63 | return true |
63 | 64 | } |
65 | + func textFieldDidEndEditing(_ textField: UITextField) { | |
66 | + if textField==passwordTextField && phoneTextField.text! != "" && passwordTextField.text! != ""{ | |
67 | + loginBtn.isUserInteractionEnabled = true | |
68 | + loginBtn.backgroundColor = UIColorFromRGB(0xC5DAFF) | |
69 | + }else{ | |
70 | + loginBtn.isUserInteractionEnabled = false | |
71 | + loginBtn.backgroundColor = UIColor.lightGray | |
72 | + } | |
73 | + } | |
64 | 74 | func isMobilePhoneNumber(_ mobile:String)->Bool { |
65 | 75 | let str="^1[0-9]{10}" |
66 | 76 | return NSPredicate(format: "SELF MATCHES %@", str).evaluate(with: mobile) | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/My.storyboard
... | ... | @@ -654,9 +654,9 @@ |
654 | 654 | <constraint firstAttribute="trailing" secondItem="1J2-p5-3X1" secondAttribute="trailing" constant="16" id="zP0-t8-7QU"/> |
655 | 655 | </constraints> |
656 | 656 | </view> |
657 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8rh-jr-h8p"> | |
657 | + <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8rh-jr-h8p"> | |
658 | 658 | <rect key="frame" x="8" y="198" width="359" height="40"/> |
659 | - <color key="backgroundColor" red="0.7725490196" green="0.85490196080000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
659 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | |
660 | 660 | <constraints> |
661 | 661 | <constraint firstAttribute="height" constant="40" id="EUp-oS-yvq"/> |
662 | 662 | </constraints> |
... | ... | @@ -746,6 +746,7 @@ |
746 | 746 | <nil key="simulatedTopBarMetrics"/> |
747 | 747 | <connections> |
748 | 748 | <outlet property="iconImageView" destination="MuP-eU-u8t" id="PTg-zh-c8A"/> |
749 | + <outlet property="loginBtn" destination="8rh-jr-h8p" id="sCl-jk-qmI"/> | |
749 | 750 | <outlet property="passwordHiddenBtn" destination="1J2-p5-3X1" id="nRt-UB-PLr"/> |
750 | 751 | <outlet property="passwordTextField" destination="IOQ-sk-Ckx" id="WdM-7n-kAj"/> |
751 | 752 | <outlet property="phoneTextField" destination="zJR-4G-Ym9" id="9rT-Uj-tRY"/> | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/MyViewController.swift
... | ... | @@ -19,7 +19,7 @@ class MyViewController: UIViewController { |
19 | 19 | @IBOutlet var loginBtn: UIButton!//登录按钮 |
20 | 20 | @IBOutlet var currentInfoBtn: UIButton!//查看个人信息按钮 |
21 | 21 | @IBOutlet var logoutBtn: UIButton! |
22 | - var titleDataSet:[String]=["消息","订购详情","家校通订购","我的孩子","空白","意见与反馈","清除缓存","关于"] | |
22 | + var titleDataSet:[String]=["消息","订购详情","订购中心","我的孩子","空白","意见与反馈","清除缓存","关于"] | |
23 | 23 | var iconDataSet:[String] = ["my_icon_orderMessage","my_icon_orderDetail","my_icon_order","my_icon_children","","my_icon_service","my_icon_cachingClear","my_icon_about"] |
24 | 24 | override func viewDidLoad() { |
25 | 25 | super.viewDidLoad() |
... | ... | @@ -71,7 +71,7 @@ class MyViewController: UIViewController { |
71 | 71 | let info = AccountManager.shared |
72 | 72 | personNameLabel.text = info.name() |
73 | 73 | personNumberLabel.text = info.phone() |
74 | - personIconImageView.sd_setImage(with: URL(string: AccountManager.shared.photo().addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "my_defphoto")) | |
74 | + personIconImageView.sd_setImage(with: URL(string: AccountManager.shared.photo().addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!), placeholderImage: UIImage(named: "defphoto")) | |
75 | 75 | }else{ |
76 | 76 | logoutBtn.isHidden = true |
77 | 77 | personNameLabel.isHidden = true | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/report/ReportViewController.swift
... | ... | @@ -20,14 +20,22 @@ class ReportViewController: UIViewController { |
20 | 20 | //设置顶部按钮 |
21 | 21 | setupNavigationBar() |
22 | 22 | //设置日期页面 |
23 | - setupDateView() | |
23 | +// setupDateView() | |
24 | 24 | } |
25 | 25 | // MARK: - 设置顶部按钮 |
26 | 26 | func setupNavigationBar(){ |
27 | 27 | self.navigationController?.navigationBar.barStyle = UIBarStyle.default// UIColorFromRGB(0xC5DAFF) |
28 | 28 | let backImage = UIImage(named: "navigationBar_backgrounImage") |
29 | 29 | self.navigationController?.navigationBar.setBackgroundImage(backImage, for: UIBarMetrics.default) |
30 | - setuptitleView() | |
30 | + self.configTheme() | |
31 | + self.navigationItem.title = "报告" | |
32 | +// setuptitleView() | |
33 | + | |
34 | + } | |
35 | + func setuptitleView(){ | |
36 | + // MARK: - 设置顶部的titleView | |
37 | + titleView = Bundle.main.loadNibNamed("ReportHeaderView", owner: nil, options: nil)![0] as! ReportHeaderView | |
38 | + titleView.delegate = self | |
31 | 39 | titleView.frame = CGRect(x: 0, y: 0, width: screenWidth, height: 44) |
32 | 40 | self.navigationItem.titleView = titleView |
33 | 41 | titleView.layoutSubviews() |
... | ... | @@ -42,11 +50,6 @@ class ReportViewController: UIViewController { |
42 | 50 | titleView.nameButton.setTitle("未登录", for: UIControlState.normal) |
43 | 51 | } |
44 | 52 | } |
45 | - func setuptitleView(){ | |
46 | - // MARK: - 设置顶部的titleView | |
47 | - titleView = Bundle.main.loadNibNamed("ReportHeaderView", owner: nil, options: nil)![0] as! ReportHeaderView | |
48 | - titleView.delegate = self | |
49 | - } | |
50 | 53 | // MARK: - 设置日期页面 |
51 | 54 | func setupDateView(){ |
52 | 55 | titleView.dateButton.setTitle("\(getCurrentDate())", for: UIControlState.normal) |
... | ... | @@ -55,9 +58,6 @@ class ReportViewController: UIViewController { |
55 | 58 | dateAry = getCurrentWeeks() |
56 | 59 | //添加日历 |
57 | 60 | dateView = LXCalendarView(frame: CGRect(x: 0, y: 0, width: screenWidth, height: screenWidth/2)) |
58 | -// dateView.currentMonthTitleColor = UIColorFromRGB(0xC5DAFF) | |
59 | -// dateView.lastMonthTitleColor = UIColorFromRGB(0xC5DAFF) | |
60 | -// dateView.nextMonthTitleColor = UIColorFromRGB(0xC5DAFF) | |
61 | 61 | dateView.isHaveAnimation = true |
62 | 62 | dateView.isCanScroll = true |
63 | 63 | dateView.isShowLastAndNextBtn = false |
... | ... | @@ -138,7 +138,6 @@ extension ReportViewController: ReportHeaderViewDelegate{ |
138 | 138 | func selectTypeButton() { |
139 | 139 | appDelegate.window!.makeToast("该功能暂不开放", duration: 1, position: CSToastPositionCenter) |
140 | 140 | return |
141 | - appDelegate.window!.makeToast("筛选", duration: 3, position: CSToastPositionCenter) | |
142 | 141 | } |
143 | 142 | } |
144 | 143 | // MARK: - 顶部展示日期 |
... | ... | @@ -147,7 +146,7 @@ extension ReportViewController: UICollectionViewDelegate,UICollectionViewDataSou |
147 | 146 | return CGSize(width: getScreenWidth()/7, height: getScreenWidth()/7) |
148 | 147 | } |
149 | 148 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { |
150 | - return 7 | |
149 | + return 0 | |
151 | 150 | } |
152 | 151 | |
153 | 152 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ... | ... |
ParentAssistant/ParentAssistant/Classes/libs/LaunchIntroduction/LaunchIntroductionView.h
0 → 100755
... | ... | @@ -0,0 +1,63 @@ |
1 | +// | |
2 | +// LaunchIntroductionView.h | |
3 | +// ZYGLaunchIntroductionDemo | |
4 | +// | |
5 | +// Created by ZhangYunguang on 16/4/7. | |
6 | +// Copyright © 2016年 ZhangYunguang. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import <UIKit/UIKit.h> | |
10 | + | |
11 | +#define kScreen_height [[UIScreen mainScreen] bounds].size.height | |
12 | +#define kScreen_width [[UIScreen mainScreen] bounds].size.width | |
13 | + | |
14 | +@interface LaunchIntroductionView : UIView | |
15 | +/** | |
16 | + * 选中page的指示器颜色,默认白色 | |
17 | + */ | |
18 | +@property (nonatomic, strong) UIColor *currentColor; | |
19 | +/** | |
20 | + * 其他状态下的指示器的颜色,默认 | |
21 | + */ | |
22 | +@property (nonatomic, strong) UIColor *nomalColor; | |
23 | +/** | |
24 | + * 不带按钮的引导页,滑动到最后一页,再向右滑直接隐藏引导页 | |
25 | + * | |
26 | + * @param imageNames 背景图片数组 | |
27 | + * | |
28 | + * @return LaunchIntroductionView对象 | |
29 | + */ | |
30 | ++(instancetype)sharedWithImages:(NSArray *) imageNames; | |
31 | +/** | |
32 | + * 带按钮的引导页 | |
33 | + * | |
34 | + * @param imageNames 背景图片数组 | |
35 | + * @param buttonImageName 按钮的图片 | |
36 | + * @param frame 按钮的frame | |
37 | + * | |
38 | + * @return LaunchIntroductionView对象 | |
39 | + */ | |
40 | ++(instancetype)sharedWithImages:(NSArray *) imageNames buttonImage:(NSString *) buttonImageName buttonFrame:(CGRect ) frame; | |
41 | + | |
42 | +/** | |
43 | + 用storyboard创建的project调用此方法 | |
44 | + | |
45 | + @param storyboardName storyboardName | |
46 | + @param imageNames 图片名字数组 | |
47 | + @return LaunchIntroductionView对象 | |
48 | + */ | |
49 | ++ (instancetype)sharedWithStoryboardName:(NSString *)storyboardName images:(NSArray *)imageNames; | |
50 | + | |
51 | +/** | |
52 | + 用storyboard创建的project调用此方法 | |
53 | + | |
54 | + @param storyboardName storyboardName | |
55 | + @param imageNames 图片名字数组 | |
56 | + @param buttonImageName 按钮图片名字 | |
57 | + @param frame 按钮的frame | |
58 | + @return LaunchIntroductionView对象 | |
59 | + */ | |
60 | ++(instancetype)sharedWithStoryboard:(NSString *)storyboardName images:(NSArray *) imageNames buttonImage:(NSString *) buttonImageName buttonFrame:(CGRect ) frame; | |
61 | + | |
62 | + | |
63 | +@end | ... | ... |
ParentAssistant/ParentAssistant/Classes/libs/LaunchIntroduction/LaunchIntroductionView.m
0 → 100755
... | ... | @@ -0,0 +1,199 @@ |
1 | +// | |
2 | +// LaunchIntroductionView.m | |
3 | +// ZYGLaunchIntroductionDemo | |
4 | +// | |
5 | +// Created by ZhangYunguang on 16/4/7. | |
6 | +// Copyright © 2016年 ZhangYunguang. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +#import "LaunchIntroductionView.h" | |
10 | +#import "UIImageView+WebCache.h" | |
11 | +static NSString *const kAppVersion = @"appVersion"; | |
12 | + | |
13 | +@interface LaunchIntroductionView ()<UIScrollViewDelegate> | |
14 | +{ | |
15 | + UIScrollView *launchScrollView; | |
16 | + UIPageControl *page; | |
17 | +} | |
18 | + | |
19 | +@end | |
20 | + | |
21 | +@implementation LaunchIntroductionView | |
22 | +NSArray *images; | |
23 | +BOOL isScrollOut;//在最后一页再次滑动是否隐藏引导页 | |
24 | +CGRect enterBtnFrame; | |
25 | +NSString *enterBtnImage; | |
26 | +static LaunchIntroductionView *launch = nil; | |
27 | +NSString *storyboard; | |
28 | + | |
29 | +#pragma mark - 创建对象-->>不带button | |
30 | ++(instancetype)sharedWithImages:(NSArray *)imageNames{ | |
31 | + images = imageNames; | |
32 | + isScrollOut = YES; | |
33 | + launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)]; | |
34 | + launch.backgroundColor = [UIColor whiteColor]; | |
35 | + return launch; | |
36 | +} | |
37 | + | |
38 | +#pragma mark - 创建对象-->>带button | |
39 | ++(instancetype)sharedWithImages:(NSArray *)imageNames buttonImage:(NSString *)buttonImageName buttonFrame:(CGRect)frame{ | |
40 | + images = imageNames; | |
41 | + isScrollOut = NO; | |
42 | + enterBtnFrame = frame; | |
43 | + enterBtnImage = buttonImageName; | |
44 | + launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)]; | |
45 | + launch.backgroundColor = [UIColor whiteColor]; | |
46 | + return launch; | |
47 | +} | |
48 | +#pragma mark - 用storyboard创建的项目时调用,不带button | |
49 | ++ (instancetype)sharedWithStoryboardName:(NSString *)storyboardName images:(NSArray *)imageNames { | |
50 | + images = imageNames; | |
51 | + storyboard = storyboardName; | |
52 | + isScrollOut = YES; | |
53 | + launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)]; | |
54 | + launch.backgroundColor = [UIColor whiteColor]; | |
55 | + return launch; | |
56 | +} | |
57 | +#pragma mark - 用storyboard创建的项目时调用,带button | |
58 | ++ (instancetype)sharedWithStoryboard:(NSString *)storyboardName images:(NSArray *)imageNames buttonImage:(NSString *)buttonImageName buttonFrame:(CGRect)frame{ | |
59 | + images = imageNames; | |
60 | + isScrollOut = NO; | |
61 | + enterBtnFrame = frame; | |
62 | + storyboard = storyboardName; | |
63 | + enterBtnImage = buttonImageName; | |
64 | + launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)]; | |
65 | + launch.backgroundColor = [UIColor whiteColor]; | |
66 | + return launch; | |
67 | +} | |
68 | +#pragma mark - 初始化 | |
69 | +- (instancetype)initWithFrame:(CGRect)frame | |
70 | +{ | |
71 | + self = [super initWithFrame:frame]; | |
72 | + if (self) { | |
73 | + [self addObserver:self forKeyPath:@"currentColor" options:NSKeyValueObservingOptionNew context:nil]; | |
74 | + [self addObserver:self forKeyPath:@"nomalColor" options:NSKeyValueObservingOptionNew context:nil]; | |
75 | + if ([self isFirstLauch]) { | |
76 | + UIStoryboard *story; | |
77 | + if (storyboard) { | |
78 | + story = [UIStoryboard storyboardWithName:storyboard bundle:nil]; | |
79 | + } | |
80 | + UIWindow *window = [UIApplication sharedApplication].windows.lastObject; | |
81 | + if (story) { | |
82 | + UIViewController * vc = story.instantiateInitialViewController; | |
83 | + window.rootViewController = vc; | |
84 | + [vc.view addSubview:self]; | |
85 | + }else { | |
86 | + [window addSubview:self]; | |
87 | + } | |
88 | + [self addImages]; | |
89 | + }else{ | |
90 | + [self removeFromSuperview]; | |
91 | + } | |
92 | + } | |
93 | + return self; | |
94 | +} | |
95 | +#pragma mark - 判断是不是首次登录或者版本更新 | |
96 | +-(BOOL )isFirstLauch{ | |
97 | + //获取当前版本号 | |
98 | + NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; | |
99 | + NSString *currentAppVersion = infoDic[@"CFBundleShortVersionString"]; | |
100 | + //获取上次启动应用保存的appVersion | |
101 | + NSString *version = [[NSUserDefaults standardUserDefaults] objectForKey:kAppVersion]; | |
102 | + //版本升级或首次登录 | |
103 | + if (version == nil || ![version isEqualToString:currentAppVersion]) { | |
104 | + [[NSUserDefaults standardUserDefaults] setObject:currentAppVersion forKey:kAppVersion]; | |
105 | + [[NSUserDefaults standardUserDefaults] synchronize]; | |
106 | + return YES; | |
107 | + }else{ | |
108 | + return NO; | |
109 | + } | |
110 | +} | |
111 | +#pragma mark - 添加引导页图片 | |
112 | +-(void)addImages{ | |
113 | + [self createScrollView]; | |
114 | +} | |
115 | +#pragma mark - 创建滚动视图 | |
116 | +-(void)createScrollView{ | |
117 | + launchScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)]; | |
118 | + launchScrollView.showsHorizontalScrollIndicator = NO; | |
119 | + launchScrollView.bounces = NO; | |
120 | + launchScrollView.pagingEnabled = YES; | |
121 | + launchScrollView.delegate = self; | |
122 | + launchScrollView.contentSize = CGSizeMake(kScreen_width * images.count, kScreen_height); | |
123 | + [self addSubview:launchScrollView]; | |
124 | + for (int i = 0; i < images.count; i ++) { | |
125 | + UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(i * kScreen_width, 0, kScreen_width, kScreen_height)]; | |
126 | + imageView.contentMode = UIViewContentModeScaleAspectFit; | |
127 | +// imageView.image = [UIImage imageNamed:images[i]]; | |
128 | + [imageView sd_setImageWithURL:[NSURL URLWithString:images[i]]]; | |
129 | + [launchScrollView addSubview:imageView]; | |
130 | + if (i == images.count - 1) { | |
131 | + //判断要不要添加button | |
132 | + if (!isScrollOut) { | |
133 | + UIButton *enterButton = [[UIButton alloc] initWithFrame:CGRectMake(enterBtnFrame.origin.x, enterBtnFrame.origin.y, enterBtnFrame.size.width, enterBtnFrame.size.height)]; | |
134 | + [enterButton setImage:[UIImage imageNamed:enterBtnImage] forState:UIControlStateNormal]; | |
135 | + [enterButton addTarget:self action:@selector(enterBtnClick) forControlEvents:UIControlEventTouchUpInside]; | |
136 | + [imageView addSubview:enterButton]; | |
137 | + imageView.userInteractionEnabled = YES; | |
138 | + } | |
139 | + } | |
140 | + } | |
141 | + page = [[UIPageControl alloc] initWithFrame:CGRectMake(0, kScreen_height - 50, kScreen_width, 30)]; | |
142 | + page.numberOfPages = images.count; | |
143 | + page.backgroundColor = [UIColor clearColor]; | |
144 | + page.currentPage = 0; | |
145 | + page.defersCurrentPageDisplay = YES; | |
146 | + [self addSubview:page]; | |
147 | +} | |
148 | +#pragma mark - 进入按钮 | |
149 | +-(void)enterBtnClick{ | |
150 | + [self hideGuidView]; | |
151 | +} | |
152 | +#pragma mark - 隐藏引导页 | |
153 | +-(void)hideGuidView{ | |
154 | + [UIView animateWithDuration:0.5 animations:^{ | |
155 | + self.alpha = 0; | |
156 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | |
157 | + [self removeFromSuperview]; | |
158 | + }); | |
159 | + | |
160 | + }]; | |
161 | +} | |
162 | +#pragma mark - scrollView Delegate | |
163 | +-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ | |
164 | + int cuttentIndex = (int)(scrollView.contentOffset.x + kScreen_width/2)/kScreen_width; | |
165 | + if (cuttentIndex == images.count - 1) { | |
166 | + if ([self isScrolltoLeft:scrollView]) { | |
167 | + if (!isScrollOut) { | |
168 | + return ; | |
169 | + } | |
170 | + [self hideGuidView]; | |
171 | + } | |
172 | + } | |
173 | +} | |
174 | +-(void)scrollViewDidScroll:(UIScrollView *)scrollView{ | |
175 | + if (scrollView == launchScrollView) { | |
176 | + int cuttentIndex = (int)(scrollView.contentOffset.x + kScreen_width/2)/kScreen_width; | |
177 | + page.currentPage = cuttentIndex; | |
178 | + } | |
179 | +} | |
180 | +#pragma mark - 判断滚动方向 | |
181 | +-(BOOL )isScrolltoLeft:(UIScrollView *) scrollView{ | |
182 | + //返回YES为向左反动,NO为右滚动 | |
183 | + if ([scrollView.panGestureRecognizer translationInView:scrollView.superview].x < 0) { | |
184 | + return YES; | |
185 | + }else{ | |
186 | + return NO; | |
187 | + } | |
188 | +} | |
189 | +#pragma mark - KVO监测值的变化 | |
190 | +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context{ | |
191 | + if ([keyPath isEqualToString:@"currentColor"]) { | |
192 | + page.currentPageIndicatorTintColor = self.currentColor; | |
193 | + } | |
194 | + if ([keyPath isEqualToString:@"nomalColor"]) { | |
195 | + page.pageIndicatorTintColor = self.nomalColor; | |
196 | + } | |
197 | +} | |
198 | + | |
199 | +@end | ... | ... |
ParentAssistant/ParentAssistant/Classes/libs/ZLaunchAd/ZLaunchAd.swift
... | ... | @@ -20,7 +20,7 @@ public class ZLaunchAd: NSObject { |
20 | 20 | /// - adNetRequest: 广告网络请求。如果需要每次进入前台是显示不同的广告图片,网络请求写在此闭包中 |
21 | 21 | /// - Returns: ZLaunchAdView |
22 | 22 | @discardableResult |
23 | - @objc public class func create(waitTime: Int = 3, showEnterForeground: Bool = false, adNetRequest: ((ZLaunchAdView)->())? = nil) -> ZLaunchAdView { | |
23 | + @objc public class func create(waitTime: Int = 5, showEnterForeground: Bool = false, adNetRequest: ((ZLaunchAdView)->())? = nil) -> ZLaunchAdView { | |
24 | 24 | let launchAdView: ZLaunchAdView |
25 | 25 | if showEnterForeground { |
26 | 26 | launchAdView = ZLaunchAdView.default | ... | ... |
ParentAssistant/ParentAssistant/Classes/libs/ZLaunchAd/ZLaunchAdConfig.swift
... | ... | @@ -82,7 +82,7 @@ public typealias ZLaunchClosure = ()->() |
82 | 82 | /// 数字大小 |
83 | 83 | @objc public var timeFont = UIFont.systemFont(ofSize: 15) |
84 | 84 | /// 数字颜色 |
85 | - @objc public var timeColor = UIColor.red | |
85 | + @objc public var timeColor = UIColor.white | |
86 | 86 | /// 跳过按钮类型 |
87 | 87 | @objc public var skipBtnType: ZLaunchSkipButtonType = .textLeftTimerRight |
88 | 88 | /// 圆形进度颜色 | ... | ... |
ParentAssistant/ParentAssistant/Classes/libs/ZLaunchAd/ZLaunchAdView.swift
... | ... | @@ -91,6 +91,7 @@ extension ZLaunchAdView { |
91 | 91 | guard let imageResource = imageResource, |
92 | 92 | let imageNameOrImageURL = imageResource.imageNameOrImageURL else { return } |
93 | 93 | launchAdImgView.frame = imageResource.imageFrame |
94 | + launchAdImgView.contentMode = UIViewContentMode.scaleAspectFit | |
94 | 95 | addSubview(launchAdImgView) |
95 | 96 | if imageNameOrImageURL.contains("http://") || imageNameOrImageURL.contains("https://") { |
96 | 97 | launchAdImgView.setImage(with: imageNameOrImageURL, options: imageResource.imageOptions) { | ... | ... |
ParentAssistant/ParentAssistant/Classes/util/network.swift
... | ... | @@ -85,14 +85,10 @@ final class HTTPServer{ |
85 | 85 | static let shared = HTTPServer() |
86 | 86 | init() {} |
87 | 87 | |
88 | - static let WEB_HELP="http://60.190.202.57:8101/FeedBack.aspx?userid=" | |
89 | - static let WEB_ABOUT="http://60.190.202.57:8101/About.html" | |
90 | - | |
91 | - | |
92 | 88 | let appsecret="sincere:3a530f39f99411b454e667d69693c127" |
93 | 89 | static var ReleaseHOST:String!="http://campus.myjxt.com"//正式网址 |
94 | - static var ReleaseHOSTWap:String!="http://hxy.myjxt.com" | |
95 | - static var ReleaseHOSTImage:String!="http://60.190.202.57:8196" | |
90 | + static var ReleaseHOSTWap:String!="http://parent.myjxt.com" | |
91 | + static var ReleaseHOSTImage:String!="http://manage.myjxt.com" | |
96 | 92 | static var DebugHOST:String!="http://60.190.202.57:1000"//测试网址 |
97 | 93 | static var DebugHOSTWap:String!="http://60.190.202.57:8101" |
98 | 94 | static var DebugHOSTImage:String!="http://60.190.202.57:8196" | ... | ... |
ParentAssistant/ParentAssistant/NIM/YXMessageManager.swift
... | ... | @@ -144,6 +144,13 @@ class YXMessageManager: NSObject,NIMLoginManagerDelegate,NIMSystemNotificationMa |
144 | 144 | attachItem.ownId = AccountManager.shared.userid |
145 | 145 | attachItem.save() |
146 | 146 | NotificationCenter.default.post(name: Notification.Name(rawValue: MessageNotification.receiveMessage), object: nil, userInfo: nil) |
147 | + }else if info["type"].stringValue=="ordermess"{//订购通知 | |
148 | + let attachItem = NSManagedObject.creatWith(identifier: "Message") as! Message | |
149 | + attachItem.date=Date(timeIntervalSince1970: notification.timestamp) | |
150 | + attachItem.content = info["content"].stringValue | |
151 | + attachItem.ownId = AccountManager.shared.userid | |
152 | + attachItem.save() | |
153 | + NotificationCenter.default.post(name: Notification.Name(rawValue: MessageNotification.receiveMessage), object: nil, userInfo: nil) | |
147 | 154 | } |
148 | 155 | } |
149 | 156 | } | ... | ... |
ParentAssistant/ParentAssistant/ParentAssistant-Bridging-Header.h
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/evaluation/evaluation_icon_camera.imageset/Contents.json
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +{ | |
2 | + "images" : [ | |
3 | + { | |
4 | + "idiom" : "universal", | |
5 | + "scale" : "1x" | |
6 | + }, | |
7 | + { | |
8 | + "idiom" : "universal", | |
9 | + "filename" : "camera.png", | |
10 | + "scale" : "2x" | |
11 | + }, | |
12 | + { | |
13 | + "idiom" : "universal", | |
14 | + "scale" : "3x" | |
15 | + } | |
16 | + ], | |
17 | + "info" : { | |
18 | + "version" : 1, | |
19 | + "author" : "xcode" | |
20 | + } | |
21 | +} | |
0 | 22 | \ No newline at end of file | ... | ... |
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/evaluation/evaluation_icon_camera.imageset/camera.png
0 → 100644
1.08 KB
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/icon_getin.imageset/Contents.json
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +{ | |
2 | + "images" : [ | |
3 | + { | |
4 | + "idiom" : "universal", | |
5 | + "scale" : "1x" | |
6 | + }, | |
7 | + { | |
8 | + "idiom" : "universal", | |
9 | + "filename" : "icon.png", | |
10 | + "scale" : "2x" | |
11 | + }, | |
12 | + { | |
13 | + "idiom" : "universal", | |
14 | + "scale" : "3x" | |
15 | + } | |
16 | + ], | |
17 | + "info" : { | |
18 | + "version" : 1, | |
19 | + "author" : "xcode" | |
20 | + } | |
21 | +} | |
0 | 22 | \ No newline at end of file | ... | ... |
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/icon_getin.imageset/icon.png
0 → 100644
2.94 KB
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_none_icon.imageset/Contents.json
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +{ | |
2 | + "images" : [ | |
3 | + { | |
4 | + "idiom" : "universal", | |
5 | + "scale" : "1x" | |
6 | + }, | |
7 | + { | |
8 | + "idiom" : "universal", | |
9 | + "filename" : "baogao_back.jpg", | |
10 | + "scale" : "2x" | |
11 | + }, | |
12 | + { | |
13 | + "idiom" : "universal", | |
14 | + "scale" : "3x" | |
15 | + } | |
16 | + ], | |
17 | + "info" : { | |
18 | + "version" : 1, | |
19 | + "author" : "xcode" | |
20 | + } | |
21 | +} | |
0 | 22 | \ No newline at end of file | ... | ... |
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_none_icon.imageset/baogao_back.jpg
0 → 100644
8.63 KB
ParentAssistant/ParentAssistant/Supporting Files/Base.lproj/Main.storyboard
... | ... | @@ -456,7 +456,7 @@ |
456 | 456 | <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> |
457 | 457 | </view> |
458 | 458 | <navigationItem key="navigationItem" title="测评" id="1Lk-x4-9OW"> |
459 | - <barButtonItem key="rightBarButtonItem" systemItem="camera" id="e8u-Kr-J32"> | |
459 | + <barButtonItem key="rightBarButtonItem" image="evaluation_icon_camera" id="e8u-Kr-J32"> | |
460 | 460 | <color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
461 | 461 | <connections> |
462 | 462 | <action selector="selectCamareAction:" destination="BYZ-38-t0r" id="ePR-Ms-0ze"/> |
... | ... | @@ -491,7 +491,7 @@ |
491 | 491 | <!--Tab Bar Controller--> |
492 | 492 | <scene sceneID="6yA-8W-l0b"> |
493 | 493 | <objects> |
494 | - <tabBarController automaticallyAdjustsScrollViewInsets="NO" id="PbF-i7-G0s" customClass="TabBarController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
494 | + <tabBarController storyboardIdentifier="TabBarController" automaticallyAdjustsScrollViewInsets="NO" id="PbF-i7-G0s" customClass="TabBarController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
495 | 495 | <toolbarItems/> |
496 | 496 | <navigationItem key="navigationItem" id="Xea-Ll-sGg"/> |
497 | 497 | <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="6Bt-XK-CLv"> |
... | ... | @@ -848,19 +848,38 @@ |
848 | 848 | <constraint firstAttribute="bottom" secondItem="wGp-kr-l5S" secondAttribute="bottom" id="p0u-d2-Uig"/> |
849 | 849 | </constraints> |
850 | 850 | </view> |
851 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A43-XP-A41"> | |
852 | + <rect key="frame" x="0.0" y="64" width="375" height="554"/> | |
853 | + <subviews> | |
854 | + <imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="report_none_icon" translatesAutoresizingMaskIntoConstraints="NO" id="UQe-Gr-lR7"> | |
855 | + <rect key="frame" x="0.0" y="0.0" width="375" height="554"/> | |
856 | + </imageView> | |
857 | + </subviews> | |
858 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
859 | + <constraints> | |
860 | + <constraint firstItem="UQe-Gr-lR7" firstAttribute="leading" secondItem="A43-XP-A41" secondAttribute="leading" id="IUB-AR-Uxa"/> | |
861 | + <constraint firstAttribute="trailing" secondItem="UQe-Gr-lR7" secondAttribute="trailing" id="JhX-yG-EaC"/> | |
862 | + <constraint firstItem="UQe-Gr-lR7" firstAttribute="top" secondItem="A43-XP-A41" secondAttribute="top" id="Uj3-Gn-cME"/> | |
863 | + <constraint firstAttribute="bottom" secondItem="UQe-Gr-lR7" secondAttribute="bottom" id="aTh-Mz-V0s"/> | |
864 | + </constraints> | |
865 | + </view> | |
851 | 866 | </subviews> |
852 | 867 | <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> |
853 | 868 | <constraints> |
854 | 869 | <constraint firstItem="hwJ-Xg-tKm" firstAttribute="leading" secondItem="9O4-jf-dgu" secondAttribute="leading" id="5Q0-Yi-ShV"/> |
855 | 870 | <constraint firstItem="hwJ-Xg-tKm" firstAttribute="top" secondItem="9O4-jf-dgu" secondAttribute="top" id="61Z-vW-5DV"/> |
871 | + <constraint firstItem="A43-XP-A41" firstAttribute="trailing" secondItem="9O4-jf-dgu" secondAttribute="trailing" id="Iba-zi-BPh"/> | |
856 | 872 | <constraint firstItem="EEs-Ae-t7U" firstAttribute="bottom" secondItem="9O4-jf-dgu" secondAttribute="bottom" id="JYY-zh-cHV"/> |
857 | 873 | <constraint firstItem="k9z-2G-Fhx" firstAttribute="trailing" secondItem="9O4-jf-dgu" secondAttribute="trailing" id="JtI-9e-igF"/> |
858 | 874 | <constraint firstItem="EEs-Ae-t7U" firstAttribute="leading" secondItem="9O4-jf-dgu" secondAttribute="leading" id="MzB-kU-gbs"/> |
859 | 875 | <constraint firstItem="EEs-Ae-t7U" firstAttribute="trailing" secondItem="9O4-jf-dgu" secondAttribute="trailing" id="NPL-F1-7Sg"/> |
876 | + <constraint firstItem="A43-XP-A41" firstAttribute="leading" secondItem="9O4-jf-dgu" secondAttribute="leading" id="NsR-AG-Nxb"/> | |
860 | 877 | <constraint firstItem="k9z-2G-Fhx" firstAttribute="leading" secondItem="9O4-jf-dgu" secondAttribute="leading" id="QZG-IF-A8F"/> |
861 | 878 | <constraint firstItem="EEs-Ae-t7U" firstAttribute="top" secondItem="k9z-2G-Fhx" secondAttribute="bottom" constant="5" id="SBe-2c-H4J"/> |
879 | + <constraint firstItem="A43-XP-A41" firstAttribute="bottom" secondItem="9O4-jf-dgu" secondAttribute="bottom" id="ShD-0u-kTc"/> | |
862 | 880 | <constraint firstItem="k9z-2G-Fhx" firstAttribute="top" secondItem="9O4-jf-dgu" secondAttribute="top" id="UIi-qU-PBc"/> |
863 | 881 | <constraint firstAttribute="bottom" secondItem="hwJ-Xg-tKm" secondAttribute="bottom" id="YjS-6f-Gk9"/> |
882 | + <constraint firstItem="A43-XP-A41" firstAttribute="top" secondItem="9O4-jf-dgu" secondAttribute="top" id="hu6-HC-sc0"/> | |
864 | 883 | <constraint firstItem="hwJ-Xg-tKm" firstAttribute="trailing" secondItem="9O4-jf-dgu" secondAttribute="trailing" id="sNr-ZT-Lsy"/> |
865 | 884 | </constraints> |
866 | 885 | <viewLayoutGuide key="safeArea" id="9O4-jf-dgu"/> |
... | ... | @@ -2129,6 +2148,7 @@ |
2129 | 2148 | <image name="Information_bar_icon_select" width="22" height="20"/> |
2130 | 2149 | <image name="evaluation_bar_icon" width="22" height="21"/> |
2131 | 2150 | <image name="evaluation_bar_icon_select" width="22" height="21"/> |
2151 | + <image name="evaluation_icon_camera" width="32" height="32"/> | |
2132 | 2152 | <image name="evaluation_icon_learningManagement" width="45" height="47"/> |
2133 | 2153 | <image name="evaluation_icon_play" width="59" height="59"/> |
2134 | 2154 | <image name="evaluation_icon_training" width="47" height="47"/> |
... | ... | @@ -2142,6 +2162,13 @@ |
2142 | 2162 | <image name="navigationBar_backgrounImage" width="375" height="139"/> |
2143 | 2163 | <image name="report_bar_icon" width="22" height="20"/> |
2144 | 2164 | <image name="report_bar_icon_select" width="22" height="20"/> |
2165 | +<<<<<<< HEAD | |
2145 | 2166 | <image name="report_teacher" width="130" height="155"/> |
2167 | +======= | |
2168 | + <image name="report_none_icon" width="250" height="250"/> | |
2169 | + <image name="test001" width="540" height="278"/> | |
2170 | + <image name="test002" width="216" height="282"/> | |
2171 | + <image name="test003" width="732" height="388"/> | |
2172 | +>>>>>>> 4fb40b7e2b0f90beefc905d0446c771fddf19fc0 | |
2146 | 2173 | </resources> |
2147 | 2174 | </document> | ... | ... |
ParentAssistant/Pods/Pods.xcodeproj/xcuserdata/caoyang.xcuserdatad/xcschemes/xcschememanagement.plist
... | ... | @@ -7,47 +7,47 @@ |
7 | 7 | <key>Alamofire.xcscheme</key> |
8 | 8 | <dict> |
9 | 9 | <key>orderHint</key> |
10 | - <integer>1</integer> | |
10 | + <integer>0</integer> | |
11 | 11 | </dict> |
12 | 12 | <key>DZNEmptyDataSet.xcscheme</key> |
13 | 13 | <dict> |
14 | 14 | <key>orderHint</key> |
15 | - <integer>2</integer> | |
15 | + <integer>1</integer> | |
16 | 16 | </dict> |
17 | 17 | <key>Pods-ParentAssistant.xcscheme</key> |
18 | 18 | <dict> |
19 | 19 | <key>orderHint</key> |
20 | - <integer>3</integer> | |
20 | + <integer>2</integer> | |
21 | 21 | </dict> |
22 | 22 | <key>Reachability.xcscheme</key> |
23 | 23 | <dict> |
24 | 24 | <key>orderHint</key> |
25 | - <integer>4</integer> | |
25 | + <integer>3</integer> | |
26 | 26 | </dict> |
27 | 27 | <key>SDWebImage.xcscheme</key> |
28 | 28 | <dict> |
29 | 29 | <key>orderHint</key> |
30 | - <integer>5</integer> | |
30 | + <integer>4</integer> | |
31 | 31 | </dict> |
32 | 32 | <key>SVProgressHUD.xcscheme</key> |
33 | 33 | <dict> |
34 | 34 | <key>orderHint</key> |
35 | - <integer>6</integer> | |
35 | + <integer>5</integer> | |
36 | 36 | </dict> |
37 | 37 | <key>SwiftHash.xcscheme</key> |
38 | 38 | <dict> |
39 | 39 | <key>orderHint</key> |
40 | - <integer>7</integer> | |
40 | + <integer>6</integer> | |
41 | 41 | </dict> |
42 | 42 | <key>Toast.xcscheme</key> |
43 | 43 | <dict> |
44 | 44 | <key>orderHint</key> |
45 | - <integer>8</integer> | |
45 | + <integer>7</integer> | |
46 | 46 | </dict> |
47 | 47 | <key>XRCarouselView.xcscheme</key> |
48 | 48 | <dict> |
49 | 49 | <key>orderHint</key> |
50 | - <integer>9</integer> | |
50 | + <integer>8</integer> | |
51 | 51 | </dict> |
52 | 52 | </dict> |
53 | 53 | </dict> | ... | ... |