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 | 20 | ignoreCount = "0" |
21 | 21 | continueAfterRunningActions = "No" |
22 | 22 | filePath = "ParentAssistant/Classes/util/NIM/YXMessageManager.swift" |
23 | - timestampString = "546255709.753268" | |
23 | + timestampString = "546257540.733687" | |
24 | 24 | startingColumnNumber = "9223372036854775807" |
25 | 25 | endingColumnNumber = "9223372036854775807" |
26 | 26 | startingLineNumber = "124" | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
... | ... | @@ -119,8 +119,6 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
119 | 119 | title = "未绑定" |
120 | 120 | }else{ |
121 | 121 | title = array[0].studentName |
122 | - self.childDataModel = array[0] | |
123 | - | |
124 | 122 | } |
125 | 123 | }else{ |
126 | 124 | title = "未登录" |
... | ... | @@ -215,12 +213,19 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
215 | 213 | private func setChildViewContent(){ |
216 | 214 | |
217 | 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 | 224 | for i in 0..<titleArr.count { |
220 | 225 | if i == 0 { |
221 | 226 | let vc = ProgramViewController() |
222 | 227 | self.addChildViewController(vc) |
223 | - vc.studentModel = self.childDataModel | |
228 | + vc.studentModel = childDataModel | |
224 | 229 | contentScrollView.addSubview(vc.view) |
225 | 230 | } |
226 | 231 | if i == 1 { | ... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift
... | ... | @@ -11,7 +11,6 @@ import UIKit |
11 | 11 | class ProgramCardViewController: UIViewController,UITextFieldDelegate { |
12 | 12 | |
13 | 13 | var cardInputTextField = UITextField() |
14 | - | |
15 | 14 | //孩子数据 |
16 | 15 | var studentData = StudentClassInfoModel() |
17 | 16 | |
... | ... | @@ -34,7 +33,8 @@ class ProgramCardViewController: UIViewController,UITextFieldDelegate { |
34 | 33 | |
35 | 34 | @objc func applyAction(){ |
36 | 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 | 38 | HTTPServer.shared.postStudentMendCard(parameters: params as [String : AnyObject]) { (backData, error) in |
39 | 39 | print(backData!) |
40 | 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 | 122 | case 0: |
123 | 123 | let vc = ProgramCheckViewController() |
124 | 124 | vc.title = "考勤" |
125 | - vc.studentModel = self.studentModel | |
125 | + vc.studentModel = studentModel | |
126 | 126 | self.navigationController?.pushViewController(vc, animated: true) |
127 | 127 | case 1: |
128 | 128 | let vc = ProgramCardViewController() |
129 | 129 | vc.title = "补卡" |
130 | - vc.studentData = self.studentModel | |
130 | + vc.studentData = studentModel | |
131 | 131 | self.navigationController?.pushViewController(vc, animated: true) |
132 | 132 | case 2: |
133 | 133 | let vc = ProgramVacateViewController() | ... | ... |