Commit d80eec0f51c1c0fd0884e90418a20bb9bb803ee3
1 parent
7329d3a0
Exists in
parentassistant
bug修复
Showing
6 changed files
with
14 additions
and
8 deletions
 
Show diff stats
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | ignoreCount = "0" | 20 | ignoreCount = "0" | 
| 21 | continueAfterRunningActions = "No" | 21 | continueAfterRunningActions = "No" | 
| 22 | filePath = "ParentAssistant/Classes/util/NIM/YXMessageManager.swift" | 22 | filePath = "ParentAssistant/Classes/util/NIM/YXMessageManager.swift" | 
| 23 | - timestampString = "546255709.753268" | 23 | + timestampString = "546257540.733687" | 
| 24 | startingColumnNumber = "9223372036854775807" | 24 | startingColumnNumber = "9223372036854775807" | 
| 25 | endingColumnNumber = "9223372036854775807" | 25 | endingColumnNumber = "9223372036854775807" | 
| 26 | startingLineNumber = "124" | 26 | startingLineNumber = "124" | 
ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
| @@ -119,8 +119,6 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { | @@ -119,8 +119,6 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { | ||
| 119 | title = "未绑定" | 119 | title = "未绑定" | 
| 120 | }else{ | 120 | }else{ | 
| 121 | title = array[0].studentName | 121 | title = array[0].studentName | 
| 122 | - self.childDataModel = array[0] | ||
| 123 | - | ||
| 124 | } | 122 | } | 
| 125 | }else{ | 123 | }else{ | 
| 126 | title = "未登录" | 124 | title = "未登录" | 
| @@ -215,12 +213,19 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { | @@ -215,12 +213,19 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { | ||
| 215 | private func setChildViewContent(){ | 213 | private func setChildViewContent(){ | 
| 216 | 214 | ||
| 217 | print("scrollView width === \(contentScrollView.bounds.size.width)") | 215 | print("scrollView width === \(contentScrollView.bounds.size.width)") | 
| 216 | + if AccountManager.shared.isOnline() { | ||
| 217 | + let array = AccountManager.shared.getChildClassInfo() | ||
| 218 | + if !array.isEmpty{ | ||
| 219 | + let model = array[0] | ||
| 220 | + childDataModel = model | ||
| 221 | + } | ||
| 222 | + } | ||
| 218 | //添加子控制器 | 223 | //添加子控制器 | 
| 219 | for i in 0..<titleArr.count { | 224 | for i in 0..<titleArr.count { | 
| 220 | if i == 0 { | 225 | if i == 0 { | 
| 221 | let vc = ProgramViewController() | 226 | let vc = ProgramViewController() | 
| 222 | self.addChildViewController(vc) | 227 | self.addChildViewController(vc) | 
| 223 | - vc.studentModel = self.childDataModel | 228 | + vc.studentModel = childDataModel | 
| 224 | contentScrollView.addSubview(vc.view) | 229 | contentScrollView.addSubview(vc.view) | 
| 225 | } | 230 | } | 
| 226 | if i == 1 { | 231 | if i == 1 { | 
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift
| @@ -11,7 +11,6 @@ import UIKit | @@ -11,7 +11,6 @@ import UIKit | ||
| 11 | class ProgramCardViewController: UIViewController,UITextFieldDelegate { | 11 | class ProgramCardViewController: UIViewController,UITextFieldDelegate { | 
| 12 | 12 | ||
| 13 | var cardInputTextField = UITextField() | 13 | var cardInputTextField = UITextField() | 
| 14 | - | ||
| 15 | //孩子数据 | 14 | //孩子数据 | 
| 16 | var studentData = StudentClassInfoModel() | 15 | var studentData = StudentClassInfoModel() | 
| 17 | 16 | ||
| @@ -34,7 +33,8 @@ class ProgramCardViewController: UIViewController,UITextFieldDelegate { | @@ -34,7 +33,8 @@ class ProgramCardViewController: UIViewController,UITextFieldDelegate { | ||
| 34 | 33 | ||
| 35 | @objc func applyAction(){ | 34 | @objc func applyAction(){ | 
| 36 | DebugLog( "补卡提交") | 35 | DebugLog( "补卡提交") | 
| 37 | - let params = ["studentid":1,"onecard":"sss"] as [String : Any] | 36 | + let studentID = self.studentData.studentId | 
| 37 | + let params = ["studentid":studentID,"onecard":self.cardInputTextField.text!] as [String : AnyObject] | ||
| 38 | HTTPServer.shared.postStudentMendCard(parameters: params as [String : AnyObject]) { (backData, error) in | 38 | HTTPServer.shared.postStudentMendCard(parameters: params as [String : AnyObject]) { (backData, error) in | 
| 39 | print(backData!) | 39 | print(backData!) | 
| 40 | if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { | 40 | if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { | 
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift
| @@ -122,12 +122,12 @@ class ProgramViewController: UIViewController,UITableViewDelegate,UITableViewDat | @@ -122,12 +122,12 @@ class ProgramViewController: UIViewController,UITableViewDelegate,UITableViewDat | ||
| 122 | case 0: | 122 | case 0: | 
| 123 | let vc = ProgramCheckViewController() | 123 | let vc = ProgramCheckViewController() | 
| 124 | vc.title = "考勤" | 124 | vc.title = "考勤" | 
| 125 | - vc.studentModel = self.studentModel | 125 | + vc.studentModel = studentModel | 
| 126 | self.navigationController?.pushViewController(vc, animated: true) | 126 | self.navigationController?.pushViewController(vc, animated: true) | 
| 127 | case 1: | 127 | case 1: | 
| 128 | let vc = ProgramCardViewController() | 128 | let vc = ProgramCardViewController() | 
| 129 | vc.title = "补卡" | 129 | vc.title = "补卡" | 
| 130 | - vc.studentData = self.studentModel | 130 | + vc.studentData = studentModel | 
| 131 | self.navigationController?.pushViewController(vc, animated: true) | 131 | self.navigationController?.pushViewController(vc, animated: true) | 
| 132 | case 2: | 132 | case 2: | 
| 133 | let vc = ProgramVacateViewController() | 133 | let vc = ProgramVacateViewController() | 
ParentAssistant/ParentAssistant/Classes/util/AccountManager.swift