Commit e39c2d33d168827bf34e0a8fe9e8a308a08e1815
1 parent
d80eec0f
Exists in
parentassistant
降低耦合度,整理代码
Showing
20 changed files
with
1459 additions
and
1452 deletions
Show diff stats
ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj
... | ... | @@ -452,7 +452,6 @@ |
452 | 452 | 599364E0204E62E700C8B371 /* Information */, |
453 | 453 | 599364E6204E62E700C8B371 /* Grow */, |
454 | 454 | 599364E2204E62E700C8B371 /* my */, |
455 | - 599364FD204E941900C8B371 /* userCenter */, | |
456 | 455 | ); |
457 | 456 | path = controllers; |
458 | 457 | sourceTree = "<group>"; |
... | ... | @@ -481,6 +480,7 @@ |
481 | 480 | isa = PBXGroup; |
482 | 481 | children = ( |
483 | 482 | BF621CAB205660E90040D2C1 /* My.storyboard */, |
483 | + 599364FD204E941900C8B371 /* userCenter */, | |
484 | 484 | BFCED886205280B700055373 /* Controller */, |
485 | 485 | BFCED889205280C900055373 /* Model */, |
486 | 486 | 599364E4204E62E700C8B371 /* View */, |
... | ... |
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
... | ... | @@ -99,6 +99,7 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
99 | 99 | } |
100 | 100 | //设置scrollview滑动范围 |
101 | 101 | contentScrollView.contentSize = CGSize.init(width: width*CGFloat(titleArr.count), height: 0) |
102 | + contentScrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: true) | |
102 | 103 | } |
103 | 104 | |
104 | 105 | override func viewWillAppear(_ animated: Bool) { |
... | ... | @@ -119,6 +120,10 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
119 | 120 | title = "未绑定" |
120 | 121 | }else{ |
121 | 122 | title = array[0].studentName |
123 | + let index = UserDefaults.standard.value(forKey: "SELECT_CHILDREN") as? Int | |
124 | + if index == nil { | |
125 | + UserDefaults.standard.set(0, forKey: "SELECT_CHILDREN") | |
126 | + } | |
122 | 127 | } |
123 | 128 | }else{ |
124 | 129 | title = "未登录" |
... | ... | @@ -178,12 +183,9 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
178 | 183 | let view = AlertShowView.init(frame: CGRect.init(x: 10, y: Int((navigationBarHeight!+statusBarHeight)+5), width: Int(screenHeight*0.2), height: 50*arr.count)) |
179 | 184 | view.setUpDataResource(arr:arr) |
180 | 185 | view.showView() |
181 | - view.AlertBlock = { object in | |
182 | - if object is StudentClassInfoModel { | |
183 | - let model = object as! StudentClassInfoModel | |
184 | - self.titleLeftLab.text = model.studentName | |
185 | - self.childDataModel = model | |
186 | - } | |
186 | + view.AlertBlock = { index in | |
187 | + //MARK:缓存孩子索引 | |
188 | + UserDefaults.standard.set(index, forKey: "SELECT_CHILDREN") | |
187 | 189 | } |
188 | 190 | }else{ |
189 | 191 | let alertView = UIAlertController.init(title: "提示", message: "您尚未绑定孩子信息,是否前往绑定?", preferredStyle: UIAlertControllerStyle.alert) |
... | ... | @@ -212,20 +214,11 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
212 | 214 | //MARK: - 设置控制器子视图 |
213 | 215 | private func setChildViewContent(){ |
214 | 216 | |
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 | - } | |
223 | 217 | //添加子控制器 |
224 | 218 | for i in 0..<titleArr.count { |
225 | 219 | if i == 0 { |
226 | 220 | let vc = ProgramViewController() |
227 | 221 | self.addChildViewController(vc) |
228 | - vc.studentModel = childDataModel | |
229 | 222 | contentScrollView.addSubview(vc.view) |
230 | 223 | } |
231 | 224 | if i == 1 { |
... | ... | @@ -234,16 +227,6 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { |
234 | 227 | contentScrollView.addSubview(vc.view) |
235 | 228 | } |
236 | 229 | } |
237 | - | |
238 | -// //设置第一个控制器数据 | |
239 | -// let childVC = self.childViewControllers.first | |
240 | -// self.contentScrollView.addSubview((childVC?.view)!) | |
241 | -// childVC?.view.snp.makeConstraints({ (maker) in | |
242 | -// maker.width.height.equalTo(self.contentScrollView) | |
243 | -// maker.center.equalTo(self.contentScrollView) | |
244 | -// }) | |
245 | - | |
246 | - | |
247 | 230 | } |
248 | 231 | //MARK: - 设置标题 |
249 | 232 | func setUpTitle(){ |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift
... | ... | @@ -12,7 +12,15 @@ class ProgramCardViewController: UIViewController,UITextFieldDelegate { |
12 | 12 | |
13 | 13 | var cardInputTextField = UITextField() |
14 | 14 | //孩子数据 |
15 | - var studentData = StudentClassInfoModel() | |
15 | + lazy var studentData = {()-> StudentClassInfoModel in | |
16 | + var model = StudentClassInfoModel() | |
17 | + let index = UserDefaults.standard.value(forKey: "SELECT_CHILDREN") as! Int | |
18 | + let array = AccountManager.shared.getChildClassInfo() | |
19 | + if array.count > 0 && index<array.count{ | |
20 | + model = array[index] | |
21 | + } | |
22 | + return model | |
23 | + }() | |
16 | 24 | |
17 | 25 | lazy var cardView = { ()-> UIView in |
18 | 26 | |
... | ... | @@ -33,12 +41,21 @@ class ProgramCardViewController: UIViewController,UITextFieldDelegate { |
33 | 41 | |
34 | 42 | @objc func applyAction(){ |
35 | 43 | DebugLog( "补卡提交") |
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 | |
44 | + SVProgressHUD.show() | |
45 | + let studentID = Int(self.studentData.studentId) | |
46 | + let params = ["studentid":studentID!,"onecard":self.cardInputTextField.text!] as [String : AnyObject] | |
47 | + HTTPServer.shared.getStudentMendCard(parameters: params as [String : AnyObject]) { (backData, error) in | |
39 | 48 | print(backData!) |
49 | + SVProgressHUD.dismiss() | |
40 | 50 | if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { |
41 | - | |
51 | + let isSuccess = JSON.fromString(backData)!["data"].boolValue | |
52 | + if isSuccess{ | |
53 | + self.view.makeToast("补卡成功!", duration: 2, position: self.view.center) | |
54 | + }else{ | |
55 | + self.view.makeToast("补卡失败!", duration: 2, position: self.view.center) | |
56 | + } | |
57 | + }else{ | |
58 | + appDelegate.window?.makeToast("\(backData!)") | |
42 | 59 | } |
43 | 60 | } |
44 | 61 | } |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift
... | ... | @@ -29,8 +29,17 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi |
29 | 29 | }() |
30 | 30 | //考勤数据 |
31 | 31 | var viewData = Array<StudentCardModel>() |
32 | - //孩子数据模型 | |
33 | - var studentModel = StudentClassInfoModel() | |
32 | + | |
33 | + //孩子数据 | |
34 | + lazy var studentModel = {()-> StudentClassInfoModel in | |
35 | + var model = StudentClassInfoModel() | |
36 | + let index = UserDefaults.standard.value(forKey: "SELECT_CHILDREN") as! Int | |
37 | + let array = AccountManager.shared.getChildClassInfo() | |
38 | + if array.count > 0 && index<array.count{ | |
39 | + model = array[index] | |
40 | + } | |
41 | + return model | |
42 | + }() | |
34 | 43 | //时间选择器 |
35 | 44 | var addAlertView = PickSelectView() |
36 | 45 | //选择的时间 |
... | ... | @@ -51,7 +60,9 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi |
51 | 60 | /// 获取数据 |
52 | 61 | private func downLoadDataFromNet(time:String){ |
53 | 62 | SVProgressHUD.show() |
54 | - let params = ["studentid":studentModel.studentId,"schoolid":studentModel.schollId,"starttime":time] as [String : Any] | |
63 | + let studentID = Int(self.studentModel.studentId)! | |
64 | + let schoolID = Int(self.studentModel.schoolId)! | |
65 | + let params = ["studentid":studentID,"schoolid":schoolID,"starttime":time] as [String : AnyObject] | |
55 | 66 | HTTPServer.shared.getStudentCheckList(parameters: params as [String : AnyObject]) { (backData, error) in |
56 | 67 | SVProgressHUD.dismiss() |
57 | 68 | if error == nil && JSON.fromString(backData)!["status"].intValue == 1 { |
... | ... | @@ -89,7 +100,7 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi |
89 | 100 | let cell = tableView.dequeueReusableCell(withIdentifier: "GrowCheckUpTableViewCell", for: indexPath) as! GrowCheckUpTableViewCell |
90 | 101 | cell.checkCount.text = "\(self.viewData.count)" |
91 | 102 | cell.timeSelectBtn.setTitle(timeSelectString, for: UIControlState.normal) |
92 | - cell.checkName.text = studentModel.studentName | |
103 | + cell.checkName.text = self.studentModel.studentName | |
93 | 104 | cell.backBlock = { |
94 | 105 | self.selectTimeAction() |
95 | 106 | } |
... | ... | @@ -97,7 +108,7 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi |
97 | 108 | }else{ |
98 | 109 | let cell = tableView.dequeueReusableCell(withIdentifier: "GrowCheckDownTableViewCell", for: indexPath) as! GrowCheckDownTableViewCell |
99 | 110 | let model = self.viewData[indexPath.row-1] |
100 | - cell.studentParents.text = "尊敬的\(studentModel.studentName)家长" | |
111 | + cell.studentParents.text = "尊敬的\(self.studentModel.studentName)家长" | |
101 | 112 | cell.setCellData(model: model) |
102 | 113 | return cell |
103 | 114 | } |
... | ... | @@ -112,7 +123,7 @@ class ProgramCheckViewController: UIViewController,UITableViewDelegate,UITableVi |
112 | 123 | self.downLoadDataFromNet(time: str) |
113 | 124 | } |
114 | 125 | } |
115 | - | |
126 | + | |
116 | 127 | override func didReceiveMemoryWarning() { |
117 | 128 | super.didReceiveMemoryWarning() |
118 | 129 | // Dispose of any resources that can be recreated. |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift
... | ... | @@ -50,8 +50,6 @@ class ProgramViewController: UIViewController,UITableViewDelegate,UITableViewDat |
50 | 50 | |
51 | 51 | //Data |
52 | 52 | var tableData = Array<String>() |
53 | - //孩子数据 | |
54 | - var studentModel = StudentClassInfoModel() | |
55 | 53 | |
56 | 54 | var titleImage = Array<String>() |
57 | 55 | |
... | ... | @@ -122,12 +120,10 @@ class ProgramViewController: UIViewController,UITableViewDelegate,UITableViewDat |
122 | 120 | case 0: |
123 | 121 | let vc = ProgramCheckViewController() |
124 | 122 | vc.title = "考勤" |
125 | - vc.studentModel = studentModel | |
126 | 123 | self.navigationController?.pushViewController(vc, animated: true) |
127 | 124 | case 1: |
128 | 125 | let vc = ProgramCardViewController() |
129 | 126 | vc.title = "补卡" |
130 | - vc.studentData = studentModel | |
131 | 127 | self.navigationController?.pushViewController(vc, animated: true) |
132 | 128 | case 2: |
133 | 129 | let vc = ProgramVacateViewController() |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/Controller/MessageViewController.swift
ParentAssistant/ParentAssistant/Classes/controllers/my/userCenter/BaseCityChooseSchoolViewController.swift
0 → 100644
... | ... | @@ -0,0 +1,255 @@ |
1 | +// | |
2 | +// BaseCityChooseSchoolViewController.swift | |
3 | +// ParentAssistant | |
4 | +// | |
5 | +// Created by 左丞 on 2018/3/9. | |
6 | +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +import UIKit | |
10 | +class BaseCityChooseSchoolViewController: UIViewController,UISearchBarDelegate { | |
11 | + | |
12 | + @IBOutlet weak var tableView: UITableView! | |
13 | + let firstLetterArr:[String] = ["#","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] | |
14 | + var keys:[String] = [] | |
15 | + var schoolDic:[String:[School]] = [:] | |
16 | + var schoolArray:[School] = [] | |
17 | + @IBOutlet weak var citySelectbtn: UILabel! | |
18 | + | |
19 | + override func viewDidLoad() { | |
20 | + super.viewDidLoad() | |
21 | + | |
22 | + citySelectbtn.text = localAddress | |
23 | + getData() | |
24 | + // Do any additional setup after loading the view. | |
25 | + } | |
26 | + | |
27 | + //根据关键字获取学校 | |
28 | + func getData(_ keyword:String=""){ | |
29 | + var dic:[String:AnyObject] = ["areaName":localAddress as AnyObject,"keyword":keyword as AnyObject] | |
30 | + if keyword == ""{ | |
31 | + dic.removeValue(forKey: "keyword") | |
32 | + } | |
33 | + HTTPServer.shared.getAreaSchool(parameters: dic) { (str, error) in | |
34 | + let json=JSON.fromString(str) | |
35 | + if let ret=json{ | |
36 | + let er=ret["error"].string | |
37 | + if let errorStr=er{ | |
38 | + appDelegate.window!.makeToast(errorStr) | |
39 | + }else{ | |
40 | + self.schoolArray.removeAll() | |
41 | + for item in ret.contentData().arrayValue { | |
42 | + self.schoolArray.append(School(j: item)) | |
43 | + } | |
44 | + self.sortData(self.schoolArray) | |
45 | + } | |
46 | + }else{ | |
47 | + | |
48 | + } | |
49 | + } | |
50 | + } | |
51 | + | |
52 | + //对给定的学校分组 | |
53 | + func sortData(_ array:[School]){ | |
54 | + schoolDic = [:] | |
55 | + for letter in firstLetterArr { | |
56 | + var arr:[School] = [] | |
57 | + for school in array{ | |
58 | + if String(format: "%c",pinyinFirstLetter((school.name as NSString).character(at: 0))).uppercased() == letter{ | |
59 | + arr.append(school) | |
60 | + } | |
61 | + } | |
62 | + if arr.count > 0{ | |
63 | + schoolDic.updateValue(arr, forKey: letter) | |
64 | + } | |
65 | + } | |
66 | + keys = Array(schoolDic.keys) | |
67 | + keys.sort { (key1, key2) -> Bool in | |
68 | + return key1 < key2 | |
69 | + } | |
70 | + tableView.reloadData() | |
71 | + } | |
72 | + | |
73 | + override func didReceiveMemoryWarning() { | |
74 | + super.didReceiveMemoryWarning() | |
75 | + // Dispose of any resources that can be recreated. | |
76 | + } | |
77 | + | |
78 | + //h获取已经选中的学校 | |
79 | + func getSelectSchool() -> School? { | |
80 | + for (_,item) in schoolDic{ | |
81 | + for school in item{ | |
82 | + if school.isSelect{ | |
83 | + return school | |
84 | + } | |
85 | + } | |
86 | + } | |
87 | + return nil | |
88 | + } | |
89 | + | |
90 | + //下一步 | |
91 | + @IBAction func nextStep(_ sender: UIButton) { | |
92 | + let school = getSelectSchool() | |
93 | + if school == nil{ | |
94 | + appDelegate.window!.makeToast("请先选择学校") | |
95 | + return | |
96 | + } | |
97 | + if !AccountManager.shared.isOnline(){ | |
98 | + appDelegate.window!.makeToast("请先登录") | |
99 | + return | |
100 | + } | |
101 | + | |
102 | + if school!.isNew == 1{ | |
103 | + let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
104 | + vc.from = .select | |
105 | + vc.school = school! | |
106 | + self.navigationController?.pushViewController(vc, animated: true) | |
107 | + }else{ | |
108 | + if AccountManager.shared.isNew() == 1{ | |
109 | + let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
110 | + vc.from = .unReserved | |
111 | + vc.school = school! | |
112 | + self.navigationController?.pushViewController(vc, animated: true) | |
113 | + return | |
114 | + } | |
115 | + let vc = Story.instantiateViewControllerWithIdentifier("InvitationCodeVerificationViewControllerVC", storyName: "UserCenter") as! InvitationCodeVerificationViewController | |
116 | + vc.school = school! | |
117 | + self.navigationController?.pushViewController(vc, animated: true) | |
118 | + | |
119 | + } | |
120 | + } | |
121 | + | |
122 | + func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { | |
123 | + searchBar.showsCancelButton = true | |
124 | + } | |
125 | + | |
126 | + func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { | |
127 | + searchData(searchBar) | |
128 | + } | |
129 | + | |
130 | + func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { | |
131 | + searchData(searchBar) | |
132 | + } | |
133 | + | |
134 | + //搜索学校 | |
135 | + func searchData(_ searchBar: UISearchBar){ | |
136 | + getData(searchBar.text!) | |
137 | + searchBar.resignFirstResponder() | |
138 | + searchBar.showsCancelButton = false | |
139 | + | |
140 | + } | |
141 | + | |
142 | + //左上角城市选择按钮点击事件 | |
143 | + @IBAction func citySelectBtnClick(_ sender: UITapGestureRecognizer) { | |
144 | + sender.view?.isUserInteractionEnabled = false | |
145 | + LZCityPickerController.showPicker(in: self | |
146 | + , select: { (address, province, city, area, isSelect) in | |
147 | + if isSelect{ | |
148 | + sender.view?.isUserInteractionEnabled = true | |
149 | + self.selectCity(city: area!) | |
150 | + } | |
151 | + }) { | |
152 | + sender.view?.isUserInteractionEnabled = true | |
153 | + | |
154 | + } | |
155 | + } | |
156 | + | |
157 | + func selectCity(city: String) { | |
158 | + localAddress = city | |
159 | + | |
160 | + citySelectbtn.text = city | |
161 | + self.getData() | |
162 | + } | |
163 | + | |
164 | + override func viewWillAppear(_ animated: Bool) { | |
165 | + super.viewWillAppear(animated) | |
166 | + citySelectbtn.text = localAddress | |
167 | + } | |
168 | + /* | |
169 | + // MARK: - Navigation | |
170 | + | |
171 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | |
172 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
173 | + // Get the new view controller using segue.destinationViewController. | |
174 | + // Pass the selected object to the new view controller. | |
175 | + } | |
176 | + */ | |
177 | + | |
178 | + //根据indexPath找到相对应的model | |
179 | + func getSchoolByIndexpath(indexPath:IndexPath)->School{ | |
180 | + return schoolDic[keys[indexPath.section]]![indexPath.row] | |
181 | + | |
182 | + } | |
183 | + | |
184 | + //所有数据全部取消选中 | |
185 | + func changeSchoolSelectState(){ | |
186 | + for (_,value) in schoolDic { | |
187 | + for item in value{ | |
188 | + item.isSelect = false | |
189 | + } | |
190 | + } | |
191 | + } | |
192 | +} | |
193 | + | |
194 | +extension BaseCityChooseSchoolViewController:UITableViewDelegate,UITableViewDataSource{ | |
195 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
196 | + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! SelectSchoolList | |
197 | + let item = getSchoolByIndexpath(indexPath: indexPath) | |
198 | + cell.schoolName.text = item.name | |
199 | + if item.isSelect{ | |
200 | + cell.isSelect.isHidden = false | |
201 | + }else{ | |
202 | + cell.isSelect.isHidden = true | |
203 | + } | |
204 | + return cell | |
205 | + } | |
206 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
207 | + | |
208 | + return schoolDic[keys[section]]!.count | |
209 | + } | |
210 | + | |
211 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
212 | + let item = getSchoolByIndexpath(indexPath: indexPath) | |
213 | + changeSchoolSelectState() | |
214 | + item.isSelect = !item.isSelect | |
215 | + tableView.reloadData() | |
216 | + } | |
217 | + | |
218 | + func sectionIndexTitles(for tableView: UITableView) -> [String]? { | |
219 | + return keys | |
220 | + } | |
221 | + | |
222 | + func numberOfSections(in tableView: UITableView) -> Int { | |
223 | + return keys.count | |
224 | + } | |
225 | + | |
226 | + func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { | |
227 | + return keys[section] | |
228 | + } | |
229 | +} | |
230 | + | |
231 | +class SelectSchoolList: UITableViewCell { | |
232 | + | |
233 | + @IBOutlet weak var isSelect: UIImageView! | |
234 | + @IBOutlet weak var schoolName: UILabel! | |
235 | +} | |
236 | + | |
237 | +class School:NSObject{ | |
238 | + var schoolArea:String=""//学校所在地区 , | |
239 | + var schoolId:Int = 0//学校id , | |
240 | + var name:String=""//学校名称 , | |
241 | + var state:Int=0//状态,1正常,0关闭 | |
242 | + var isNew:Int=0////1非合作学校,0合作学校 | |
243 | + var isSelect:Bool = false | |
244 | + init(j:JSON){ | |
245 | + schoolArea = j["school_area"].stringValue | |
246 | + schoolId = j["school_id"].intValue | |
247 | + name = j["school_name"].stringValue | |
248 | + state = j["state"].intValue | |
249 | + } | |
250 | + init(names:String,id:Int) { | |
251 | + name = names | |
252 | + schoolId=id | |
253 | + } | |
254 | +} | |
255 | + | |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/userCenter/BindingViewController.swift
0 → 100644
... | ... | @@ -0,0 +1,344 @@ |
1 | +// | |
2 | +// BindingViewController.swift | |
3 | +// ParentAssistant | |
4 | +// | |
5 | +// Created by 左丞 on 2018/3/6. | |
6 | +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +import UIKit | |
10 | +enum FromVC:Int{ | |
11 | + //信息确认 | |
12 | + case selfVC = 1//从当前类的对象push过来的(非合作学校) | |
13 | + case reserved = 2//合作学校预留 | |
14 | + case unReserved = 3//合作学校非预留 | |
15 | + //选择 | |
16 | + case select = 4 //选择 | |
17 | +} | |
18 | + | |
19 | +enum SelectType:Int{ | |
20 | + case gender=1//性别 | |
21 | + case grade=2//年级 | |
22 | + case classes=3//班级 | |
23 | +} | |
24 | + | |
25 | +class BindingViewController: UIViewController { | |
26 | + | |
27 | + var from:FromVC = .selfVC | |
28 | + @IBOutlet weak var confirmBtn: UIButton!//确定按钮 | |
29 | + @IBOutlet weak var phoneNumberLabel: UILabel!//电话号码显示的label | |
30 | + @IBOutlet weak var firstLineLabel: UILabel!//第一行(绑定手机号码为)所在的label | |
31 | + @IBOutlet weak var nameTextFiled: UITextField! | |
32 | + | |
33 | + @IBOutlet weak var selectTableView: UITableView! | |
34 | + @IBOutlet weak var selectImageHeight: NSLayoutConstraint!//三个image高度是相等的 | |
35 | + @IBOutlet weak var classLabel: UILabel! | |
36 | + @IBOutlet weak var gradeLabel: UILabel! | |
37 | + @IBOutlet weak var genderLabel: UILabel! | |
38 | + var boyName:String="" | |
39 | + var gender:String = "" | |
40 | + var school:School! | |
41 | + var selecttype:SelectType = .gender | |
42 | + var genderArr:[String] = ["男","女"] | |
43 | + var gradeArr:[GradeAndClasses] = [] | |
44 | + var classesArr:[GradeAndClasses]=[] | |
45 | + var selectGrade:GradeAndClasses! | |
46 | + var selectClass:GradeAndClasses! | |
47 | + var account = AccountManager.shared | |
48 | + override func viewDidLoad() { | |
49 | + super.viewDidLoad() | |
50 | + stepUI() | |
51 | + if selectGrade == nil && selectClass == nil{ | |
52 | + getGradeOrClassData(type: 1) | |
53 | + } | |
54 | + setLabelValue() | |
55 | + if from == .reserved || from == .unReserved{ | |
56 | + getData() | |
57 | + } | |
58 | + // Do any additional setup after loading the view. | |
59 | + } | |
60 | + | |
61 | + func getData(){ | |
62 | + HTTPServer.shared.getParentInfo(["mobile":account.phone() as AnyObject,"school_id":school.schoolId as AnyObject]) { (str, error) in | |
63 | + let json=JSON.fromString(str) | |
64 | + if let ret=json{ | |
65 | + let er=ret["error"].string | |
66 | + if let errorStr=er{ | |
67 | + appDelegate.window!.makeToast(errorStr) | |
68 | + }else{ | |
69 | + self.account.rawUserInfo = json | |
70 | + self.setValueForLabel() | |
71 | + } | |
72 | + }else{ | |
73 | + | |
74 | + } | |
75 | + } | |
76 | + } | |
77 | + | |
78 | + func setValueForLabel(){ | |
79 | + if account.studentClass().count == 0{ | |
80 | + appDelegate.window!.makeToast("该账号下已经没有需要绑定的孩子") | |
81 | + return | |
82 | + } | |
83 | + let student = account.studentClass()[0] | |
84 | + nameTextFiled.text = student["studentName"].stringValue | |
85 | + classLabel.text = student["className"].stringValue | |
86 | + gradeLabel.text = student["gradename"].stringValue | |
87 | + genderLabel.text = student["sex"].intValue == 1 ? "男" : "女" | |
88 | + } | |
89 | + | |
90 | + func stepUI(){ | |
91 | + setViewLayer(view: classLabel) | |
92 | + setViewLayer(view: gradeLabel) | |
93 | + setViewLayer(view: genderLabel) | |
94 | + setViewRadius(view: confirmBtn) | |
95 | + if from == .selfVC{ | |
96 | + phoneNumberLabel.isHidden = false | |
97 | + phoneNumberLabel.text = account.phone() | |
98 | + firstLineLabel.isHidden = false | |
99 | + } | |
100 | + if from != .select{ | |
101 | + selectImageHeight.constant = 0 | |
102 | + nameTextFiled.isUserInteractionEnabled = false | |
103 | + } | |
104 | + } | |
105 | + | |
106 | + @IBAction func cancleSelectTableView(_ sender: UIControl) { | |
107 | + selectTableView.isHidden = true | |
108 | + } | |
109 | + func getGradeOrClassData(type:Int,gradeid:Int=0){//1,年级,2班级 | |
110 | + HTTPServer.shared.getClassOrGrade(["state":type as AnyObject,"schoolid":school.schoolId as AnyObject,"gradeid":gradeid as AnyObject]) { (str, error) in | |
111 | + let json=JSON.fromString(str) | |
112 | + if let ret=json{ | |
113 | + let er=ret["error"].string | |
114 | + if let errorStr=er{ | |
115 | + appDelegate.window!.makeToast(errorStr) | |
116 | + }else{ | |
117 | + for item in ret.contentData().arrayValue{ | |
118 | + if type == 1{ | |
119 | + self.gradeArr.append(GradeAndClasses(j: item)) | |
120 | + }else{ | |
121 | + self.classesArr.append(GradeAndClasses(j: item)) | |
122 | + } | |
123 | + } | |
124 | + } | |
125 | + }else{ | |
126 | + | |
127 | + } | |
128 | + } | |
129 | + } | |
130 | + | |
131 | + func setLabelValue(){ | |
132 | + nameTextFiled.text = boyName | |
133 | + classLabel.text = selectClass != nil ? selectClass.className : "" | |
134 | + gradeLabel.text = selectGrade != nil ? selectGrade.gradeName : "" | |
135 | + genderLabel.text = gender | |
136 | + } | |
137 | + | |
138 | + override func didReceiveMemoryWarning() { | |
139 | + super.didReceiveMemoryWarning() | |
140 | + // Dispose of any resources that can be recreated. | |
141 | + } | |
142 | + | |
143 | + //绑定孩子信息 | |
144 | + func bindlingChildren(){ | |
145 | + var dic:[String:AnyObject] = [:] | |
146 | + switch from { | |
147 | + case .selfVC: | |
148 | + dic = ["parentId": account.parentId() as AnyObject, | |
149 | + "cooperateFlag": "false" as AnyObject, | |
150 | + "schoolId": school.schoolId as AnyObject, | |
151 | + "classId": selectClass.classId as AnyObject, | |
152 | + "studentName": boyName as AnyObject, | |
153 | + "sex": (gender == "男" ? 1 : 2) as AnyObject] | |
154 | + case .reserved: | |
155 | + dic = ["cooperateFlag": "true" as AnyObject, | |
156 | + "mobileFlag": "true" as AnyObject, | |
157 | + "studentId": account.studentClass()[0]["studentId"].stringValue as AnyObject] | |
158 | + default: | |
159 | + dic = ["cooperateFlag": "true" as AnyObject, | |
160 | + "classId": account.studentClass()[0]["classId"].intValue as AnyObject, | |
161 | + "mobileFlag": "false" as AnyObject, | |
162 | + "studentId": account.studentClass()[0]["studentId"].stringValue as AnyObject] | |
163 | + } | |
164 | + dic.updateValue(account.parentId() as AnyObject, forKey: "parentId") | |
165 | + HTTPServer.shared.bindlingChildren(parameters: dic) { (str, error) in | |
166 | + if JSON.fromString(str)!["status"] == 1 && error == nil{ | |
167 | + appDelegate.window!.makeToast("绑定成功") | |
168 | + let vc = BindlingSuccessViewController() | |
169 | + self.navigationController?.pushViewController(vc, animated: true) | |
170 | + }else{ | |
171 | + appDelegate.window!.makeToast("绑定失败") | |
172 | + | |
173 | + } | |
174 | + } | |
175 | + } | |
176 | + | |
177 | + //确定按钮 | |
178 | + @IBAction func confirmBtnClcik(_ sender: UIButton) { | |
179 | + if (from == .reserved || from == .unReserved) && account.studentClass().count == 0{ | |
180 | + appDelegate.window!.makeToast("该账号下已经没有需要绑定的孩子") | |
181 | + return | |
182 | + } | |
183 | + if from == .select && (selectClass == nil || boyName == "" || gender == ""){//班级选择完成则年级肯定已经完成 | |
184 | + appDelegate.window!.makeToast("请先填写姓名并选择班级,年级,性别") | |
185 | + return | |
186 | + } | |
187 | + //确认信息的确认按钮 | |
188 | + if from != .select{ | |
189 | + bindlingChildren() | |
190 | + return | |
191 | + } | |
192 | + let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
193 | + vc.boyName = boyName | |
194 | + vc.gender = gender | |
195 | + vc.from = .selfVC | |
196 | + vc.selectClass = selectClass | |
197 | + vc.selectGrade = selectGrade | |
198 | + self.navigationController?.pushViewController(vc, animated: true) | |
199 | + } | |
200 | + | |
201 | + override func viewWillAppear(_ animated: Bool) { | |
202 | + super.viewWillAppear(animated) | |
203 | + switch from { | |
204 | + case .select: | |
205 | + self.navigationItem.title = "填写孩子信息" | |
206 | + default: | |
207 | + self.navigationItem.title = "信息核对" | |
208 | + } | |
209 | + } | |
210 | + | |
211 | + @IBAction func selectTapAction(_ sender: UITapGestureRecognizer) { | |
212 | + boyName = nameTextFiled.text ?? "" | |
213 | + if from != .select { | |
214 | + return | |
215 | + } | |
216 | + getSelectTableViewRect(sender) | |
217 | + selectTableView.isHidden = false | |
218 | + switch sender.view!.tag { | |
219 | + case 1000: | |
220 | + selecttype = .gender | |
221 | + selectTableView.frame.size.height = 88 | |
222 | + case 1001: | |
223 | + selecttype = .grade | |
224 | + if gradeArr.count > 3{ | |
225 | + selectTableView.frame.size.height = 132 | |
226 | + }else{ | |
227 | + selectTableView.frame.size.height = 44*CGFloat(gradeArr.count) | |
228 | + } | |
229 | + | |
230 | + case 1002: | |
231 | + if selectGrade == nil{ | |
232 | + selectTableView.isHidden = true | |
233 | + appDelegate.window!.makeToast("请先选择年级") | |
234 | + return | |
235 | + } | |
236 | + selecttype = .classes | |
237 | + if classesArr.count > 3{ | |
238 | + selectTableView.frame.size.height = 132 | |
239 | + }else{ | |
240 | + selectTableView.frame.size.height = 44*CGFloat(classesArr.count) | |
241 | + } | |
242 | + | |
243 | + default: | |
244 | + break | |
245 | + } | |
246 | + selectTableView.reloadData() | |
247 | + } | |
248 | + | |
249 | + func getSelectTableViewRect(_ sender: UITapGestureRecognizer){ | |
250 | + let locaViewFrame = sender.view!.frame | |
251 | + selectTableView.frame.origin = CGPoint(x: locaViewFrame.origin.x+sender.view!.superview!.frame.origin.x, y: locaViewFrame.maxY+sender.view!.superview!.frame.origin.y) | |
252 | + | |
253 | + } | |
254 | + | |
255 | + /* | |
256 | + // MARK: - Navigation | |
257 | + | |
258 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | |
259 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
260 | + // Get the new view controller using segue.destinationViewController. | |
261 | + // Pass the selected object to the new view controller. | |
262 | + } | |
263 | + */ | |
264 | + | |
265 | +} | |
266 | + | |
267 | +extension BindingViewController:UITableViewDelegate,UITableViewDataSource{ | |
268 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
269 | + switch selecttype { | |
270 | + case .gender: | |
271 | + return genderArr.count | |
272 | + case .grade: | |
273 | + return gradeArr.count | |
274 | + default: | |
275 | + return classesArr.count | |
276 | + } | |
277 | + } | |
278 | + | |
279 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
280 | + switch selecttype { | |
281 | + case .gender: | |
282 | + tableView.isHidden = true | |
283 | + gender = genderArr[indexPath.row] | |
284 | + case .grade: | |
285 | + tableView.isHidden = true | |
286 | + let items = gradeArr[indexPath.row] | |
287 | + for item in gradeArr{ | |
288 | + item.isSelect = false | |
289 | + } | |
290 | + items.isSelect = true | |
291 | + selectGrade = items | |
292 | + getGradeOrClassData(type: 2, gradeid: items.gradeid) | |
293 | + default: | |
294 | + let items = classesArr[indexPath.row] | |
295 | + | |
296 | + tableView.isHidden = true | |
297 | + for item in classesArr{ | |
298 | + item.isSelect = false | |
299 | + } | |
300 | + items.isSelect = true | |
301 | + selectClass = items | |
302 | + } | |
303 | + setLabelValue() | |
304 | + } | |
305 | + | |
306 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
307 | + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) | |
308 | + switch selecttype { | |
309 | + case .gender: | |
310 | + cell.textLabel?.text = genderArr[indexPath.row] | |
311 | + case .grade: | |
312 | + cell.textLabel?.text = gradeArr[indexPath.row].gradeName | |
313 | + default: | |
314 | + cell.textLabel?.text = classesArr[indexPath.row].className | |
315 | + } | |
316 | + return cell | |
317 | + } | |
318 | + | |
319 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | |
320 | + return 44 | |
321 | + } | |
322 | +} | |
323 | + | |
324 | +extension BindingViewController:UITextFieldDelegate{ | |
325 | + func textFieldShouldReturn(_ textField: UITextField) -> Bool { | |
326 | + boyName = textField.text! | |
327 | + textField.resignFirstResponder() | |
328 | + return true | |
329 | + } | |
330 | +} | |
331 | + | |
332 | +class GradeAndClasses: NSObject { | |
333 | + var gradeid:Int=0 | |
334 | + var gradeName:String = "" | |
335 | + var classId:Int=0 | |
336 | + var className:String = "" | |
337 | + var isSelect:Bool = false | |
338 | + init(j:JSON){ | |
339 | + gradeid = j["gradeId"].intValue | |
340 | + gradeName = j["gradeName"].stringValue | |
341 | + classId = j["classId"].intValue | |
342 | + className = j["className"].stringValue | |
343 | + } | |
344 | +} | |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/userCenter/BindlingSuccessViewController.swift
0 → 100644
... | ... | @@ -0,0 +1,133 @@ |
1 | +// | |
2 | +// BindlingSuccessViewController.swift | |
3 | +// ParentAssistant | |
4 | +// | |
5 | +// Created by 左丞 on 2018/3/16. | |
6 | +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +import UIKit | |
10 | + | |
11 | +class BindlingSuccessViewController: UIViewController ,UIWebViewDelegate,UIScrollViewDelegate{ | |
12 | + var webView:UIWebView! | |
13 | + var header:UIView! | |
14 | + var webBrowserView:UIView! | |
15 | + var urlStr:String="http://60.190.202.57:8101/RecommendOrder.aspx?userid=" | |
16 | + var bindlingType:Int = 1 | |
17 | + override func viewDidLoad() { | |
18 | + super.viewDidLoad() | |
19 | + self.view.backgroundColor = UIColor.white | |
20 | + // Do any additional setup after loading the view. | |
21 | + webView = UIWebView() | |
22 | + webView.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: getScreenHeight()) | |
23 | + webView.delegate = self; | |
24 | + webView.backgroundColor = UIColor.clear | |
25 | + self.view.addSubview(webView) | |
26 | + | |
27 | + let request = URLRequest(url: URL(string: urlStr)!) | |
28 | + webView.loadRequest(request) | |
29 | + | |
30 | + if bindlingType == 0{ | |
31 | + header = UIView() | |
32 | + header.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: 80) | |
33 | + header.backgroundColor = UIColor.clear | |
34 | + let backView = UIView() | |
35 | + let image = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 40)) | |
36 | + image.image = #imageLiteral(resourceName: "my_icon_bindlingSuccess") | |
37 | + backView.addSubview(image) | |
38 | + let label = UILabel(frame: CGRect(x: 50, y: 10, width: header.frame.width - 20, height: 20)) | |
39 | + label.text = "绑定成功" | |
40 | + label.numberOfLines = 0 | |
41 | + label.textColor = UIColor.darkGray | |
42 | + label.font = UIFont.systemFont(ofSize: 15) | |
43 | + label.sizeToFit() | |
44 | + backView.addSubview(label) | |
45 | + backView.frame.size = CGSize(width: label.frame.maxX, height: 40) | |
46 | + backView.center.y = header.center.y | |
47 | + backView.center.x = header.center.x-10 | |
48 | + header.addSubview(label) | |
49 | + }else{ | |
50 | + header = UIView() | |
51 | + header.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: 150) | |
52 | + header.backgroundColor = UIColor.clear | |
53 | + let label = UILabel(frame: CGRect(x: 10, y: 10, width: header.frame.width - 20, height: 100)) | |
54 | + label.text = "生成孩子\"汇作业\"账号为:\(urlStr),\n初始密码为:\(urlStr)(与账号相同),\n孩子可以下载\"汇作业\"app进行使用,\n" | |
55 | + label.numberOfLines = 0 | |
56 | + label.textColor = UIColor.darkGray | |
57 | + label.font = UIFont.systemFont(ofSize: 15) | |
58 | + label.sizeToFit() | |
59 | + header.addSubview(label) | |
60 | + | |
61 | + let backView = UIView() | |
62 | + let label2 = UILabel(frame: CGRect(x: 0, y: 5, width: header.frame.width - 20, height: 20)) | |
63 | + label2.text = "下载地址:" | |
64 | + label2.textColor = UIColor.darkGray | |
65 | + label2.font = UIFont.systemFont(ofSize: 15) | |
66 | + label2.sizeToFit() | |
67 | + backView.addSubview(label2) | |
68 | + let btn = UIButton(frame: CGRect(x: label2.frame.maxX, y: 0, width: 70, height: 30)) | |
69 | + | |
70 | + let str = NSMutableAttributedString(string: "汇作业") | |
71 | + let strRange = NSRange(location: 0, length: str.length) | |
72 | + str.addAttributes([NSAttributedStringKey.underlineStyle: NSNumber(integerLiteral: NSUnderlineStyle.styleSingle.rawValue), | |
73 | + NSAttributedStringKey.foregroundColor: Theme.topBarColor(), | |
74 | + NSAttributedStringKey.font: UIFont.systemFont(ofSize: 15)], | |
75 | + range: strRange) | |
76 | + btn.setAttributedTitle(str, for: .normal) | |
77 | + btn.addTarget(self, action: #selector(BindlingSuccessViewController.pushToAppStore), for: .touchUpInside) | |
78 | + backView.addSubview(btn) | |
79 | + backView.frame.size = CGSize(width: btn.frame.width+label2.frame.width+10, height: 30) | |
80 | + backView.center = CGPoint(x: header.center.x-10, y: label.frame.maxY+10) | |
81 | + header.frame.size.height = backView.frame.maxY + 10 | |
82 | + header.addSubview(backView) | |
83 | + } | |
84 | + | |
85 | + webBrowserView = webView.scrollView.subviews[0] | |
86 | + var rect = self.webBrowserView.frame | |
87 | + rect.origin.y = header.frame.maxY+10 | |
88 | + webBrowserView.frame = rect | |
89 | + | |
90 | + //添加 | |
91 | + webView.scrollView.addSubview(header) | |
92 | + | |
93 | + webView.scrollView.addObserver(self, forKeyPath: "contentSize", options: NSKeyValueObservingOptions.new, context: nil) | |
94 | + | |
95 | + // Do any additional setup after loading the view. | |
96 | + } | |
97 | + | |
98 | + @objc func pushToAppStore(){ | |
99 | + | |
100 | + } | |
101 | + | |
102 | + override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { | |
103 | + webView.scrollView.removeObserver(self, forKeyPath: "contentSize") | |
104 | + _ = self.view.viewWithTag(100) | |
105 | + let contentSize = webView.scrollView.contentSize | |
106 | + let vi = UIView() | |
107 | + vi.backgroundColor = UIColor.purple | |
108 | + vi.tag = 100 | |
109 | + vi.frame = CGRect(x: 0, y: contentSize.height, width: getScreenWidth()-20, height: 150) | |
110 | + webView.scrollView.addSubview(vi) | |
111 | + webView.scrollView.contentSize = CGSize(width: contentSize.width, height: contentSize.height+150) | |
112 | + | |
113 | + webView.scrollView.addObserver(self, forKeyPath: "contentSize", options: NSKeyValueObservingOptions.new, context: nil) | |
114 | + | |
115 | + } | |
116 | + | |
117 | + override func didReceiveMemoryWarning() { | |
118 | + super.didReceiveMemoryWarning() | |
119 | + // Dispose of any resources that can be recreated. | |
120 | + } | |
121 | + | |
122 | + | |
123 | + /* | |
124 | + // MARK: - Navigation | |
125 | + | |
126 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | |
127 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
128 | + // Get the new view controller using segue.destinationViewController. | |
129 | + // Pass the selected object to the new view controller. | |
130 | + } | |
131 | + */ | |
132 | + | |
133 | +} | |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/userCenter/InvitationCodeVerificationViewController.swift
0 → 100644
... | ... | @@ -0,0 +1,58 @@ |
1 | +// | |
2 | +// InvitationCodeVerificationViewController.swift | |
3 | +// ParentAssistant | |
4 | +// | |
5 | +// Created by 左丞 on 2018/3/13. | |
6 | +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | +// | |
8 | + | |
9 | +import UIKit | |
10 | + | |
11 | +class InvitationCodeVerificationViewController: UIViewController ,UITextFieldDelegate{ | |
12 | + | |
13 | + @IBOutlet weak var instructions: UILabel! | |
14 | + @IBOutlet weak var nextBtn: UIButton! | |
15 | + @IBOutlet weak var inputInvitationCode: UITextField! | |
16 | + var school:School! | |
17 | + override func viewDidLoad() { | |
18 | + super.viewDidLoad() | |
19 | + instructions.text = "注:填写需要绑定的孩子的邀请码(非合作学校无邀请码.请更换手机号码的方式验证)\n\n如不知道邀请码请拨打电话: 400-826-2468进行查询" | |
20 | + nextBtn.layer.cornerRadius = 10 | |
21 | + nextBtn.layer.masksToBounds = true | |
22 | + | |
23 | + // Do any additional setup after loading the view. | |
24 | + } | |
25 | + | |
26 | + override func didReceiveMemoryWarning() { | |
27 | + super.didReceiveMemoryWarning() | |
28 | + // Dispose of any resources that can be recreated. | |
29 | + } | |
30 | + | |
31 | + @IBAction func nextBtnClick(_ sender: UIButton) { | |
32 | + if inputInvitationCode.text != ""{ | |
33 | + let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
34 | + vc.from = .reserved | |
35 | + vc.school = school! | |
36 | + self.navigationController?.pushViewController(vc, animated: true) | |
37 | + }else{ | |
38 | + appDelegate.window!.makeToast("请填写邀请码") | |
39 | + return | |
40 | + } | |
41 | + } | |
42 | + | |
43 | + func textFieldShouldReturn(_ textField: UITextField) -> Bool { | |
44 | + textField.resignFirstResponder() | |
45 | + return true | |
46 | + } | |
47 | + | |
48 | + /* | |
49 | + // MARK: - Navigation | |
50 | + | |
51 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | |
52 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
53 | + // Get the new view controller using segue.destinationViewController. | |
54 | + // Pass the selected object to the new view controller. | |
55 | + } | |
56 | + */ | |
57 | + | |
58 | +} | |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/my/userCenter/UserCenter.storyboard
0 → 100644
... | ... | @@ -0,0 +1,606 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
3 | + <device id="retina4_7" orientation="portrait"> | |
4 | + <adaptation id="fullscreen"/> | |
5 | + </device> | |
6 | + <dependencies> | |
7 | + <deployment identifier="iOS"/> | |
8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
9 | + <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | |
10 | + <capability name="Safe area layout guides" minToolsVersion="9.0"/> | |
11 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
12 | + </dependencies> | |
13 | + <scenes> | |
14 | + <!--Binding View Controller--> | |
15 | + <scene sceneID="MIJ-WH-73A"> | |
16 | + <objects> | |
17 | + <viewController storyboardIdentifier="BindingViewControllerVC" id="SC7-Z5-TUk" customClass="BindingViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
18 | + <view key="view" contentMode="scaleToFill" id="wHn-CF-kHg"> | |
19 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
20 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
21 | + <subviews> | |
22 | + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P0w-Y3-Nux"> | |
23 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
24 | + <subviews> | |
25 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XNG-cS-DCX" customClass="UIControl"> | |
26 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
27 | + <subviews> | |
28 | + <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="REL-rO-sBE"> | |
29 | + <rect key="frame" x="126.5" y="20" width="121.5" height="21"/> | |
30 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
31 | + <nil key="textColor"/> | |
32 | + <nil key="highlightedColor"/> | |
33 | + </label> | |
34 | + <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="1j1-yS-AS0"> | |
35 | + <rect key="frame" x="187.5" y="61" width="0.0" height="0.0"/> | |
36 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
37 | + <color key="textColor" red="0.95294117649999999" green="0.044139709020000001" blue="0.0" alpha="0.90402160229999995" colorSpace="calibratedRGB"/> | |
38 | + <nil key="highlightedColor"/> | |
39 | + </label> | |
40 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lry-ZD-jrQ"> | |
41 | + <rect key="frame" x="67.5" y="81" width="240" height="40"/> | |
42 | + <subviews> | |
43 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="孩子姓名:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SzI-3b-VyZ"> | |
44 | + <rect key="frame" x="8" y="9.5" width="75" height="21"/> | |
45 | + <constraints> | |
46 | + <constraint firstAttribute="width" constant="75" id="1Kz-c2-cWk"/> | |
47 | + </constraints> | |
48 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
49 | + <nil key="textColor"/> | |
50 | + <nil key="highlightedColor"/> | |
51 | + </label> | |
52 | + <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BcE-Vi-QYk"> | |
53 | + <rect key="frame" x="91" y="5" width="141" height="30"/> | |
54 | + <nil key="textColor"/> | |
55 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
56 | + <textInputTraits key="textInputTraits"/> | |
57 | + <connections> | |
58 | + <outlet property="delegate" destination="SC7-Z5-TUk" id="OOq-YY-QL7"/> | |
59 | + </connections> | |
60 | + </textField> | |
61 | + </subviews> | |
62 | + <constraints> | |
63 | + <constraint firstItem="BcE-Vi-QYk" firstAttribute="centerY" secondItem="Lry-ZD-jrQ" secondAttribute="centerY" id="UQx-st-B52"/> | |
64 | + <constraint firstItem="BcE-Vi-QYk" firstAttribute="leading" secondItem="SzI-3b-VyZ" secondAttribute="trailing" constant="8" id="giU-FF-BVf"/> | |
65 | + <constraint firstAttribute="width" constant="240" id="nln-YE-aUo"/> | |
66 | + <constraint firstItem="SzI-3b-VyZ" firstAttribute="centerY" secondItem="Lry-ZD-jrQ" secondAttribute="centerY" id="t0S-VJ-l1C"/> | |
67 | + <constraint firstAttribute="trailing" secondItem="BcE-Vi-QYk" secondAttribute="trailing" constant="8" id="yQh-ty-91f"/> | |
68 | + <constraint firstItem="SzI-3b-VyZ" firstAttribute="leading" secondItem="Lry-ZD-jrQ" secondAttribute="leading" constant="8" id="z2C-7R-Ub1"/> | |
69 | + </constraints> | |
70 | + </view> | |
71 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kxt-bL-oiI"> | |
72 | + <rect key="frame" x="67.5" y="129" width="240" height="40"/> | |
73 | + <subviews> | |
74 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="性 别:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gRs-dx-ci7"> | |
75 | + <rect key="frame" x="8" y="10" width="75" height="21"/> | |
76 | + <constraints> | |
77 | + <constraint firstAttribute="width" constant="75" id="eVY-WV-LHm"/> | |
78 | + </constraints> | |
79 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
80 | + <nil key="textColor"/> | |
81 | + <nil key="highlightedColor"/> | |
82 | + </label> | |
83 | + <view tag="1000" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PFs-Tj-G2K"> | |
84 | + <rect key="frame" x="91" y="5" width="141" height="30"/> | |
85 | + <subviews> | |
86 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8EC-X6-bwJ"> | |
87 | + <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
88 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
89 | + <nil key="textColor"/> | |
90 | + <nil key="highlightedColor"/> | |
91 | + </label> | |
92 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="t7C-GZ-zMI"> | |
93 | + <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
94 | + <constraints> | |
95 | + <constraint firstAttribute="width" secondItem="t7C-GZ-zMI" secondAttribute="height" multiplier="16:9" id="OER-9Z-gv9"/> | |
96 | + <constraint firstAttribute="width" constant="20" id="UdM-aj-TjH"/> | |
97 | + </constraints> | |
98 | + </imageView> | |
99 | + </subviews> | |
100 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
101 | + <gestureRecognizers/> | |
102 | + <constraints> | |
103 | + <constraint firstItem="8EC-X6-bwJ" firstAttribute="leading" secondItem="PFs-Tj-G2K" secondAttribute="leading" id="5GC-Eb-4l2"/> | |
104 | + <constraint firstItem="t7C-GZ-zMI" firstAttribute="leading" secondItem="8EC-X6-bwJ" secondAttribute="trailing" id="EZX-dZ-q37"/> | |
105 | + <constraint firstAttribute="trailing" secondItem="t7C-GZ-zMI" secondAttribute="trailing" id="GFx-iV-h2I"/> | |
106 | + <constraint firstItem="t7C-GZ-zMI" firstAttribute="centerY" secondItem="PFs-Tj-G2K" secondAttribute="centerY" id="Jft-CZ-Ozm"/> | |
107 | + <constraint firstAttribute="height" constant="30" id="Xqc-eU-7Pr"/> | |
108 | + <constraint firstItem="8EC-X6-bwJ" firstAttribute="top" secondItem="PFs-Tj-G2K" secondAttribute="top" id="qyh-NB-CVP"/> | |
109 | + <constraint firstAttribute="bottom" secondItem="8EC-X6-bwJ" secondAttribute="bottom" id="wv5-4S-ql7"/> | |
110 | + </constraints> | |
111 | + <connections> | |
112 | + <outletCollection property="gestureRecognizers" destination="LEy-66-xfv" appends="YES" id="cXM-sF-jrH"/> | |
113 | + </connections> | |
114 | + </view> | |
115 | + </subviews> | |
116 | + <constraints> | |
117 | + <constraint firstItem="gRs-dx-ci7" firstAttribute="leading" secondItem="kxt-bL-oiI" secondAttribute="leading" constant="8" id="1U3-kg-RuV"/> | |
118 | + <constraint firstAttribute="trailing" secondItem="PFs-Tj-G2K" secondAttribute="trailing" constant="8" id="NSH-fs-D3q"/> | |
119 | + <constraint firstItem="PFs-Tj-G2K" firstAttribute="centerY" secondItem="kxt-bL-oiI" secondAttribute="centerY" id="Sgo-zl-RVe"/> | |
120 | + <constraint firstItem="PFs-Tj-G2K" firstAttribute="leading" secondItem="gRs-dx-ci7" secondAttribute="trailing" constant="8" id="jlC-sf-cUB"/> | |
121 | + <constraint firstItem="gRs-dx-ci7" firstAttribute="centerY" secondItem="kxt-bL-oiI" secondAttribute="centerY" id="y97-EE-VAy"/> | |
122 | + </constraints> | |
123 | + </view> | |
124 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O93-Li-jET"> | |
125 | + <rect key="frame" x="67.5" y="177" width="240" height="40"/> | |
126 | + <subviews> | |
127 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="年 级:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yBZ-0b-pQ9"> | |
128 | + <rect key="frame" x="8" y="10" width="75" height="21"/> | |
129 | + <constraints> | |
130 | + <constraint firstAttribute="width" constant="75" id="dqs-ha-x8B"/> | |
131 | + </constraints> | |
132 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
133 | + <nil key="textColor"/> | |
134 | + <nil key="highlightedColor"/> | |
135 | + </label> | |
136 | + <view tag="1001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GuO-ah-aM3"> | |
137 | + <rect key="frame" x="91" y="5" width="141" height="30"/> | |
138 | + <subviews> | |
139 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k8w-na-ShO"> | |
140 | + <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
141 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
142 | + <nil key="textColor"/> | |
143 | + <nil key="highlightedColor"/> | |
144 | + </label> | |
145 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="u8y-wv-95T"> | |
146 | + <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
147 | + <constraints> | |
148 | + <constraint firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="height" multiplier="16:9" id="PpX-an-Mcx"/> | |
149 | + </constraints> | |
150 | + </imageView> | |
151 | + </subviews> | |
152 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
153 | + <gestureRecognizers/> | |
154 | + <constraints> | |
155 | + <constraint firstItem="k8w-na-ShO" firstAttribute="leading" secondItem="GuO-ah-aM3" secondAttribute="leading" id="1YM-Gx-c1v"/> | |
156 | + <constraint firstItem="u8y-wv-95T" firstAttribute="leading" secondItem="k8w-na-ShO" secondAttribute="trailing" id="DZ0-WJ-MkY"/> | |
157 | + <constraint firstAttribute="bottom" secondItem="k8w-na-ShO" secondAttribute="bottom" id="J2d-vN-CP1"/> | |
158 | + <constraint firstItem="k8w-na-ShO" firstAttribute="top" secondItem="GuO-ah-aM3" secondAttribute="top" id="PWZ-ai-sko"/> | |
159 | + <constraint firstItem="u8y-wv-95T" firstAttribute="centerY" secondItem="GuO-ah-aM3" secondAttribute="centerY" id="f4o-vC-bln"/> | |
160 | + <constraint firstAttribute="trailing" secondItem="u8y-wv-95T" secondAttribute="trailing" id="mU3-LE-4dM"/> | |
161 | + <constraint firstAttribute="height" constant="30" id="rIk-SK-yBP"/> | |
162 | + </constraints> | |
163 | + <connections> | |
164 | + <outletCollection property="gestureRecognizers" destination="Kts-0O-pak" appends="YES" id="hUj-y5-jMs"/> | |
165 | + </connections> | |
166 | + </view> | |
167 | + </subviews> | |
168 | + <constraints> | |
169 | + <constraint firstAttribute="trailing" secondItem="GuO-ah-aM3" secondAttribute="trailing" constant="8" id="3ye-AU-Wjq"/> | |
170 | + <constraint firstItem="GuO-ah-aM3" firstAttribute="centerY" secondItem="O93-Li-jET" secondAttribute="centerY" id="S7j-Y1-iv2"/> | |
171 | + <constraint firstItem="yBZ-0b-pQ9" firstAttribute="leading" secondItem="O93-Li-jET" secondAttribute="leading" constant="8" id="b6Z-BO-HDk"/> | |
172 | + <constraint firstItem="yBZ-0b-pQ9" firstAttribute="centerY" secondItem="O93-Li-jET" secondAttribute="centerY" id="qdX-Ir-kHe"/> | |
173 | + <constraint firstItem="GuO-ah-aM3" firstAttribute="leading" secondItem="yBZ-0b-pQ9" secondAttribute="trailing" constant="8" id="vGm-oD-Gs9"/> | |
174 | + </constraints> | |
175 | + </view> | |
176 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hR4-GJ-ZLd"> | |
177 | + <rect key="frame" x="67.5" y="225" width="240" height="40"/> | |
178 | + <subviews> | |
179 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="班 级:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qFh-7U-p8J"> | |
180 | + <rect key="frame" x="8" y="10" width="75" height="21"/> | |
181 | + <constraints> | |
182 | + <constraint firstAttribute="width" constant="75" id="4gg-6q-S4K"/> | |
183 | + </constraints> | |
184 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
185 | + <nil key="textColor"/> | |
186 | + <nil key="highlightedColor"/> | |
187 | + </label> | |
188 | + <view tag="1002" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FMa-hb-gaq"> | |
189 | + <rect key="frame" x="91" y="5" width="141" height="30"/> | |
190 | + <subviews> | |
191 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ff-lb-IAz"> | |
192 | + <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
193 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
194 | + <nil key="textColor"/> | |
195 | + <nil key="highlightedColor"/> | |
196 | + </label> | |
197 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="sBB-lz-j4M"> | |
198 | + <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
199 | + <constraints> | |
200 | + <constraint firstAttribute="width" secondItem="sBB-lz-j4M" secondAttribute="height" multiplier="16:9" id="RK6-la-GUy"/> | |
201 | + </constraints> | |
202 | + </imageView> | |
203 | + </subviews> | |
204 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
205 | + <gestureRecognizers/> | |
206 | + <constraints> | |
207 | + <constraint firstItem="sBB-lz-j4M" firstAttribute="centerY" secondItem="FMa-hb-gaq" secondAttribute="centerY" id="Nlx-aL-9Cp"/> | |
208 | + <constraint firstAttribute="bottom" secondItem="3Ff-lb-IAz" secondAttribute="bottom" id="PPf-rg-VMj"/> | |
209 | + <constraint firstAttribute="trailing" secondItem="sBB-lz-j4M" secondAttribute="trailing" id="c92-Bb-fPa"/> | |
210 | + <constraint firstAttribute="height" constant="30" id="cD7-29-sC3"/> | |
211 | + <constraint firstItem="3Ff-lb-IAz" firstAttribute="leading" secondItem="FMa-hb-gaq" secondAttribute="leading" id="f9p-Mv-1bg"/> | |
212 | + <constraint firstItem="3Ff-lb-IAz" firstAttribute="top" secondItem="FMa-hb-gaq" secondAttribute="top" id="hgk-HZ-k3t"/> | |
213 | + <constraint firstItem="sBB-lz-j4M" firstAttribute="leading" secondItem="3Ff-lb-IAz" secondAttribute="trailing" id="tWR-Xb-CpO"/> | |
214 | + </constraints> | |
215 | + <connections> | |
216 | + <outletCollection property="gestureRecognizers" destination="3FV-1x-Qsg" appends="YES" id="KTd-T3-ptA"/> | |
217 | + </connections> | |
218 | + </view> | |
219 | + </subviews> | |
220 | + <constraints> | |
221 | + <constraint firstAttribute="height" constant="40" id="6Mp-oZ-kFS"/> | |
222 | + <constraint firstItem="qFh-7U-p8J" firstAttribute="centerY" secondItem="hR4-GJ-ZLd" secondAttribute="centerY" id="6qw-zS-lTj"/> | |
223 | + <constraint firstItem="qFh-7U-p8J" firstAttribute="leading" secondItem="hR4-GJ-ZLd" secondAttribute="leading" constant="8" id="A16-Da-Nml"/> | |
224 | + <constraint firstItem="FMa-hb-gaq" firstAttribute="centerY" secondItem="hR4-GJ-ZLd" secondAttribute="centerY" id="ILl-xZ-ROc"/> | |
225 | + <constraint firstAttribute="trailing" secondItem="FMa-hb-gaq" secondAttribute="trailing" constant="8" id="TC0-Yy-FbX"/> | |
226 | + <constraint firstItem="FMa-hb-gaq" firstAttribute="leading" secondItem="qFh-7U-p8J" secondAttribute="trailing" constant="8" id="ePc-S7-FyD"/> | |
227 | + </constraints> | |
228 | + </view> | |
229 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FqV-SD-Mvm"> | |
230 | + <rect key="frame" x="112.5" y="285" width="150" height="33"/> | |
231 | + <color key="backgroundColor" red="0.27503338459999999" green="0.50970917940000005" blue="0.90092128520000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
232 | + <constraints> | |
233 | + <constraint firstAttribute="width" constant="150" id="UyA-XG-HPW"/> | |
234 | + </constraints> | |
235 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
236 | + <state key="normal" title="确定"> | |
237 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
238 | + </state> | |
239 | + <connections> | |
240 | + <action selector="confirmBtnClcik:" destination="SC7-Z5-TUk" eventType="touchUpInside" id="dYC-uT-Vwc"/> | |
241 | + </connections> | |
242 | + </button> | |
243 | + <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fmZ-BK-cei"> | |
244 | + <rect key="frame" x="156" y="335" width="135" height="152"/> | |
245 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
246 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
247 | + <prototypes> | |
248 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="ScH-T2-JbL"> | |
249 | + <rect key="frame" x="0.0" y="28" width="135" height="44"/> | |
250 | + <autoresizingMask key="autoresizingMask"/> | |
251 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ScH-T2-JbL" id="Vdf-3J-cd1"> | |
252 | + <rect key="frame" x="0.0" y="0.0" width="135" height="43.5"/> | |
253 | + <autoresizingMask key="autoresizingMask"/> | |
254 | + </tableViewCellContentView> | |
255 | + </tableViewCell> | |
256 | + </prototypes> | |
257 | + <connections> | |
258 | + <outlet property="dataSource" destination="SC7-Z5-TUk" id="Jiq-kB-gCm"/> | |
259 | + <outlet property="delegate" destination="SC7-Z5-TUk" id="0AV-HO-e1k"/> | |
260 | + </connections> | |
261 | + </tableView> | |
262 | + </subviews> | |
263 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
264 | + <constraints> | |
265 | + <constraint firstItem="REL-rO-sBE" firstAttribute="top" secondItem="XNG-cS-DCX" secondAttribute="top" constant="20" id="5ZV-2a-Qo0"/> | |
266 | + <constraint firstItem="1j1-yS-AS0" firstAttribute="top" secondItem="REL-rO-sBE" secondAttribute="bottom" constant="20" id="5gv-QF-b7B"/> | |
267 | + <constraint firstItem="O93-Li-jET" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="BJw-Fi-zqe"/> | |
268 | + <constraint firstItem="Lry-ZD-jrQ" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="GdP-6p-9L5"/> | |
269 | + <constraint firstItem="kxt-bL-oiI" firstAttribute="top" secondItem="Lry-ZD-jrQ" secondAttribute="bottom" constant="8" id="HxB-x6-iZq"/> | |
270 | + <constraint firstItem="1j1-yS-AS0" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="Jd3-q2-0X8"/> | |
271 | + <constraint firstItem="FqV-SD-Mvm" firstAttribute="top" secondItem="hR4-GJ-ZLd" secondAttribute="bottom" constant="20" id="M0T-AR-guZ"/> | |
272 | + <constraint firstItem="O93-Li-jET" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="M5S-H4-w8q"/> | |
273 | + <constraint firstItem="FqV-SD-Mvm" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="OFC-XX-Wzn"/> | |
274 | + <constraint firstItem="hR4-GJ-ZLd" firstAttribute="top" secondItem="O93-Li-jET" secondAttribute="bottom" constant="8" id="Ou1-72-F83"/> | |
275 | + <constraint firstItem="O93-Li-jET" firstAttribute="top" secondItem="kxt-bL-oiI" secondAttribute="bottom" constant="8" id="Sy6-4q-XeH"/> | |
276 | + <constraint firstItem="hR4-GJ-ZLd" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="T4F-hh-BOa"/> | |
277 | + <constraint firstItem="kxt-bL-oiI" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="WJy-dT-EXy"/> | |
278 | + <constraint firstAttribute="height" constant="667" id="aXb-ZO-UyB"/> | |
279 | + <constraint firstItem="t7C-GZ-zMI" firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="width" id="be8-xa-5G9"/> | |
280 | + <constraint firstItem="sBB-lz-j4M" firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="width" id="eDv-01-DiQ"/> | |
281 | + <constraint firstItem="Lry-ZD-jrQ" firstAttribute="top" secondItem="1j1-yS-AS0" secondAttribute="bottom" constant="20" id="geU-1c-IfY"/> | |
282 | + <constraint firstItem="kxt-bL-oiI" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="jdh-cw-zpa"/> | |
283 | + <constraint firstItem="kxt-bL-oiI" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="mGE-8p-MQY"/> | |
284 | + <constraint firstItem="hR4-GJ-ZLd" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="rxP-pl-3Um"/> | |
285 | + <constraint firstItem="O93-Li-jET" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="uyt-7c-LZX"/> | |
286 | + <constraint firstItem="hR4-GJ-ZLd" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="wJT-yt-hLC"/> | |
287 | + <constraint firstItem="REL-rO-sBE" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="xV9-gg-n1L"/> | |
288 | + </constraints> | |
289 | + <connections> | |
290 | + <action selector="cancleSelectTableView:" destination="SC7-Z5-TUk" eventType="valueChanged" id="U7F-UF-iuZ"/> | |
291 | + </connections> | |
292 | + </view> | |
293 | + </subviews> | |
294 | + <constraints> | |
295 | + <constraint firstAttribute="bottom" secondItem="XNG-cS-DCX" secondAttribute="bottom" id="GpA-U6-Grn"/> | |
296 | + <constraint firstItem="XNG-cS-DCX" firstAttribute="top" secondItem="P0w-Y3-Nux" secondAttribute="top" id="LBb-SE-77O"/> | |
297 | + <constraint firstItem="XNG-cS-DCX" firstAttribute="leading" secondItem="P0w-Y3-Nux" secondAttribute="leading" id="Mkw-GK-7L3"/> | |
298 | + <constraint firstAttribute="trailing" secondItem="XNG-cS-DCX" secondAttribute="trailing" id="Tve-bM-QyB"/> | |
299 | + <constraint firstItem="XNG-cS-DCX" firstAttribute="centerX" secondItem="P0w-Y3-Nux" secondAttribute="centerX" id="tYI-cc-gNF"/> | |
300 | + </constraints> | |
301 | + </scrollView> | |
302 | + </subviews> | |
303 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
304 | + <constraints> | |
305 | + <constraint firstItem="P0w-Y3-Nux" firstAttribute="top" secondItem="wHn-CF-kHg" secondAttribute="top" id="2qF-RX-Ngk"/> | |
306 | + <constraint firstItem="P0w-Y3-Nux" firstAttribute="leading" secondItem="prJ-Io-sHC" secondAttribute="leading" id="90x-M3-dT7"/> | |
307 | + <constraint firstItem="P0w-Y3-Nux" firstAttribute="bottom" secondItem="prJ-Io-sHC" secondAttribute="bottom" id="WnC-bM-yOh"/> | |
308 | + <constraint firstItem="P0w-Y3-Nux" firstAttribute="trailing" secondItem="prJ-Io-sHC" secondAttribute="trailing" id="sQx-XF-5At"/> | |
309 | + </constraints> | |
310 | + <viewLayoutGuide key="safeArea" id="prJ-Io-sHC"/> | |
311 | + </view> | |
312 | + <connections> | |
313 | + <outlet property="classLabel" destination="3Ff-lb-IAz" id="3vZ-RG-Kl0"/> | |
314 | + <outlet property="confirmBtn" destination="FqV-SD-Mvm" id="2ks-S7-aw2"/> | |
315 | + <outlet property="firstLineLabel" destination="REL-rO-sBE" id="sHm-br-6ch"/> | |
316 | + <outlet property="genderLabel" destination="8EC-X6-bwJ" id="mGD-Vp-XO4"/> | |
317 | + <outlet property="gradeLabel" destination="k8w-na-ShO" id="0SC-ja-Ycq"/> | |
318 | + <outlet property="nameTextFiled" destination="BcE-Vi-QYk" id="P6F-fb-c0Z"/> | |
319 | + <outlet property="phoneNumberLabel" destination="1j1-yS-AS0" id="ro7-AV-8eQ"/> | |
320 | + <outlet property="selectImageHeight" destination="UdM-aj-TjH" id="FDT-0C-lMv"/> | |
321 | + <outlet property="selectTableView" destination="fmZ-BK-cei" id="WKi-76-ydS"/> | |
322 | + </connections> | |
323 | + </viewController> | |
324 | + <placeholder placeholderIdentifier="IBFirstResponder" id="gtY-da-H8P" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
325 | + <tapGestureRecognizer id="LEy-66-xfv"> | |
326 | + <connections> | |
327 | + <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="Nbe-mO-VOd"/> | |
328 | + </connections> | |
329 | + </tapGestureRecognizer> | |
330 | + <tapGestureRecognizer id="Kts-0O-pak"> | |
331 | + <connections> | |
332 | + <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="8Rk-RM-Grb"/> | |
333 | + </connections> | |
334 | + </tapGestureRecognizer> | |
335 | + <tapGestureRecognizer id="3FV-1x-Qsg"> | |
336 | + <connections> | |
337 | + <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="ETG-1g-7Jk"/> | |
338 | + </connections> | |
339 | + </tapGestureRecognizer> | |
340 | + </objects> | |
341 | + <point key="canvasLocation" x="77.599999999999994" y="118.29085457271366"/> | |
342 | + </scene> | |
343 | + <!--选择孩子学校--> | |
344 | + <scene sceneID="jXC-xr-pan"> | |
345 | + <objects> | |
346 | + <viewController storyboardIdentifier="BaseCityChooseSchoolViewControllerVC" id="A0M-q7-IGT" customClass="BaseCityChooseSchoolViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
347 | + <view key="view" contentMode="scaleToFill" id="Onv-g3-veb"> | |
348 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
349 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
350 | + <subviews> | |
351 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fO6-Ah-i0n"> | |
352 | + <rect key="frame" x="0.0" y="64" width="375" height="40"/> | |
353 | + <subviews> | |
354 | + <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="l2p-Iw-hkv"> | |
355 | + <rect key="frame" x="40" y="0.0" width="335" height="40"/> | |
356 | + <textInputTraits key="textInputTraits"/> | |
357 | + <scopeButtonTitles> | |
358 | + <string>Title</string> | |
359 | + <string>Title</string> | |
360 | + </scopeButtonTitles> | |
361 | + <connections> | |
362 | + <outlet property="delegate" destination="A0M-q7-IGT" id="e7y-Ov-FN3"/> | |
363 | + </connections> | |
364 | + </searchBar> | |
365 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DOI-gH-jce"> | |
366 | + <rect key="frame" x="0.0" y="0.0" width="40" height="40"/> | |
367 | + <subviews> | |
368 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5U5-yq-C0i"> | |
369 | + <rect key="frame" x="8" y="20.5" width="0.0" height="0.0"/> | |
370 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
371 | + <nil key="textColor"/> | |
372 | + <nil key="highlightedColor"/> | |
373 | + </label> | |
374 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="orB-P1-43H"> | |
375 | + <rect key="frame" x="16" y="15.5" width="16" height="9"/> | |
376 | + <constraints> | |
377 | + <constraint firstAttribute="width" constant="16" id="16l-ae-SRY"/> | |
378 | + <constraint firstAttribute="width" secondItem="orB-P1-43H" secondAttribute="height" multiplier="16:9" id="LTF-6F-1BK"/> | |
379 | + </constraints> | |
380 | + </imageView> | |
381 | + </subviews> | |
382 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
383 | + <gestureRecognizers/> | |
384 | + <constraints> | |
385 | + <constraint firstItem="orB-P1-43H" firstAttribute="centerY" secondItem="DOI-gH-jce" secondAttribute="centerY" id="9zk-rO-Bal"/> | |
386 | + <constraint firstAttribute="trailing" secondItem="orB-P1-43H" secondAttribute="trailing" constant="8" id="BzP-Md-pmS"/> | |
387 | + <constraint firstItem="5U5-yq-C0i" firstAttribute="centerY" secondItem="DOI-gH-jce" secondAttribute="centerY" id="XUR-oK-Eac"/> | |
388 | + <constraint firstItem="5U5-yq-C0i" firstAttribute="leading" secondItem="DOI-gH-jce" secondAttribute="leading" constant="8" id="jlC-4X-vmT"/> | |
389 | + <constraint firstItem="orB-P1-43H" firstAttribute="leading" secondItem="5U5-yq-C0i" secondAttribute="trailing" constant="8" id="pIv-Pk-p8P"/> | |
390 | + </constraints> | |
391 | + <connections> | |
392 | + <outletCollection property="gestureRecognizers" destination="bwD-zo-BfW" appends="YES" id="lGg-fA-w9g"/> | |
393 | + </connections> | |
394 | + </view> | |
395 | + </subviews> | |
396 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
397 | + <constraints> | |
398 | + <constraint firstItem="DOI-gH-jce" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="top" id="0Hd-29-n1m"/> | |
399 | + <constraint firstAttribute="bottom" secondItem="DOI-gH-jce" secondAttribute="bottom" id="0io-Qu-M8N"/> | |
400 | + <constraint firstAttribute="bottom" secondItem="l2p-Iw-hkv" secondAttribute="bottom" id="27M-dQ-JQa"/> | |
401 | + <constraint firstItem="DOI-gH-jce" firstAttribute="leading" secondItem="fO6-Ah-i0n" secondAttribute="leading" id="E9W-AB-f3d"/> | |
402 | + <constraint firstItem="l2p-Iw-hkv" firstAttribute="leading" secondItem="DOI-gH-jce" secondAttribute="trailing" id="PBH-yX-Ii2"/> | |
403 | + <constraint firstAttribute="height" constant="40" id="cB5-m3-OT4"/> | |
404 | + <constraint firstAttribute="trailing" secondItem="l2p-Iw-hkv" secondAttribute="trailing" id="mxk-0g-vX5"/> | |
405 | + <constraint firstItem="l2p-Iw-hkv" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="top" id="q7F-zS-lRk"/> | |
406 | + </constraints> | |
407 | + </view> | |
408 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K6J-Tc-LTg"> | |
409 | + <rect key="frame" x="0.0" y="617" width="375" height="50"/> | |
410 | + <subviews> | |
411 | + <button opaque="NO" alpha="0.60000002384185791" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0O9-fu-b9g"> | |
412 | + <rect key="frame" x="8" y="12" width="359" height="30"/> | |
413 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
414 | + <state key="normal" title="下一步"> | |
415 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
416 | + </state> | |
417 | + <userDefinedRuntimeAttributes> | |
418 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
419 | + <integer key="value" value="10"/> | |
420 | + </userDefinedRuntimeAttribute> | |
421 | + <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | |
422 | + </userDefinedRuntimeAttributes> | |
423 | + <connections> | |
424 | + <action selector="nextStep:" destination="A0M-q7-IGT" eventType="touchUpInside" id="XgW-aA-1mG"/> | |
425 | + </connections> | |
426 | + </button> | |
427 | + </subviews> | |
428 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
429 | + <constraints> | |
430 | + <constraint firstAttribute="height" constant="50" id="BQ4-Si-bXm"/> | |
431 | + <constraint firstItem="0O9-fu-b9g" firstAttribute="leading" secondItem="K6J-Tc-LTg" secondAttribute="leading" constant="8" id="ifw-4f-Jpr"/> | |
432 | + <constraint firstAttribute="trailing" secondItem="0O9-fu-b9g" secondAttribute="trailing" constant="8" id="isL-T7-Qmd"/> | |
433 | + <constraint firstAttribute="bottom" secondItem="0O9-fu-b9g" secondAttribute="bottom" constant="8" id="nFg-EW-rQa"/> | |
434 | + </constraints> | |
435 | + </view> | |
436 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="PtW-3t-0kg"> | |
437 | + <rect key="frame" x="0.0" y="104" width="375" height="513"/> | |
438 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
439 | + <view key="tableFooterView" contentMode="scaleToFill" id="EaE-p5-h1S"> | |
440 | + <rect key="frame" x="0.0" y="72" width="375" height="1"/> | |
441 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
442 | + </view> | |
443 | + <prototypes> | |
444 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="cell" id="aLu-j4-6rM" customClass="SelectSchoolList" customModule="ParentAssistant" customModuleProvider="target"> | |
445 | + <rect key="frame" x="0.0" y="28" width="375" height="44"/> | |
446 | + <autoresizingMask key="autoresizingMask"/> | |
447 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="aLu-j4-6rM" id="HwG-k5-D6B"> | |
448 | + <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> | |
449 | + <autoresizingMask key="autoresizingMask"/> | |
450 | + <subviews> | |
451 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mu7-8F-D7t"> | |
452 | + <rect key="frame" x="20" y="12" width="42" height="21"/> | |
453 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
454 | + <nil key="textColor"/> | |
455 | + <nil key="highlightedColor"/> | |
456 | + </label> | |
457 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="my_icon_confirmBtn" translatesAutoresizingMaskIntoConstraints="NO" id="uQB-I2-g76"> | |
458 | + <rect key="frame" x="335" y="11" width="20" height="20"/> | |
459 | + <constraints> | |
460 | + <constraint firstAttribute="height" constant="20" id="O5D-Kd-tnC"/> | |
461 | + <constraint firstAttribute="width" secondItem="uQB-I2-g76" secondAttribute="height" multiplier="1:1" id="cbI-Yt-6bN"/> | |
462 | + </constraints> | |
463 | + </imageView> | |
464 | + </subviews> | |
465 | + <constraints> | |
466 | + <constraint firstItem="mu7-8F-D7t" firstAttribute="leading" secondItem="HwG-k5-D6B" secondAttribute="leading" constant="20" id="Kok-DS-Yde"/> | |
467 | + <constraint firstItem="uQB-I2-g76" firstAttribute="centerY" secondItem="HwG-k5-D6B" secondAttribute="centerY" id="cIw-K0-Exy"/> | |
468 | + <constraint firstAttribute="trailing" secondItem="uQB-I2-g76" secondAttribute="trailing" constant="20" id="dVF-Dh-Rtt"/> | |
469 | + <constraint firstItem="mu7-8F-D7t" firstAttribute="centerY" secondItem="HwG-k5-D6B" secondAttribute="centerY" id="fsT-mg-e1a"/> | |
470 | + </constraints> | |
471 | + </tableViewCellContentView> | |
472 | + <connections> | |
473 | + <outlet property="isSelect" destination="uQB-I2-g76" id="6wY-JR-T26"/> | |
474 | + <outlet property="schoolName" destination="mu7-8F-D7t" id="wkp-Qv-j2n"/> | |
475 | + </connections> | |
476 | + </tableViewCell> | |
477 | + </prototypes> | |
478 | + <connections> | |
479 | + <outlet property="dataSource" destination="A0M-q7-IGT" id="evO-ib-Hst"/> | |
480 | + <outlet property="delegate" destination="A0M-q7-IGT" id="Rbx-Y9-br6"/> | |
481 | + </connections> | |
482 | + </tableView> | |
483 | + </subviews> | |
484 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
485 | + <constraints> | |
486 | + <constraint firstItem="fO6-Ah-i0n" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="1DX-T5-eqS"/> | |
487 | + <constraint firstItem="fO6-Ah-i0n" firstAttribute="top" secondItem="UOZ-dT-HdH" secondAttribute="top" id="5SW-dU-bex"/> | |
488 | + <constraint firstItem="K6J-Tc-LTg" firstAttribute="top" secondItem="PtW-3t-0kg" secondAttribute="bottom" id="DZi-5f-yJP"/> | |
489 | + <constraint firstItem="fO6-Ah-i0n" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="OTH-hT-IuC"/> | |
490 | + <constraint firstItem="PtW-3t-0kg" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="SRU-Mk-axC"/> | |
491 | + <constraint firstItem="PtW-3t-0kg" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="bottom" id="abD-i3-Y6w"/> | |
492 | + <constraint firstItem="K6J-Tc-LTg" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="jJc-Sd-TbD"/> | |
493 | + <constraint firstItem="K6J-Tc-LTg" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="jWn-SM-Y1N"/> | |
494 | + <constraint firstItem="K6J-Tc-LTg" firstAttribute="bottom" secondItem="UOZ-dT-HdH" secondAttribute="bottom" id="kZg-15-tgT"/> | |
495 | + <constraint firstItem="PtW-3t-0kg" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="vLD-zI-Vju"/> | |
496 | + </constraints> | |
497 | + <viewLayoutGuide key="safeArea" id="UOZ-dT-HdH"/> | |
498 | + </view> | |
499 | + <navigationItem key="navigationItem" title="选择孩子学校" id="Zis-r1-2ac"/> | |
500 | + <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> | |
501 | + <connections> | |
502 | + <outlet property="citySelectbtn" destination="5U5-yq-C0i" id="wfB-6U-FyP"/> | |
503 | + <outlet property="tableView" destination="PtW-3t-0kg" id="VaJ-gB-cEX"/> | |
504 | + </connections> | |
505 | + </viewController> | |
506 | + <placeholder placeholderIdentifier="IBFirstResponder" id="cjH-Fa-jy0" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
507 | + <tapGestureRecognizer id="bwD-zo-BfW"> | |
508 | + <connections> | |
509 | + <action selector="citySelectBtnClick:" destination="A0M-q7-IGT" id="UOI-JJ-Wj0"/> | |
510 | + </connections> | |
511 | + </tapGestureRecognizer> | |
512 | + </objects> | |
513 | + <point key="canvasLocation" x="844" y="117.39130434782609"/> | |
514 | + </scene> | |
515 | + <!--Invitation Code Verification View Controller--> | |
516 | + <scene sceneID="O88-W5-BCB"> | |
517 | + <objects> | |
518 | + <viewController storyboardIdentifier="InvitationCodeVerificationViewControllerVC" id="R3o-G2-oUv" customClass="InvitationCodeVerificationViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
519 | + <view key="view" contentMode="scaleToFill" id="AKW-ZX-X2g"> | |
520 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
521 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
522 | + <subviews> | |
523 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="exA-el-IFq"> | |
524 | + <rect key="frame" x="0.0" y="108.5" width="375" height="250"/> | |
525 | + <subviews> | |
526 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1fW-dv-WoM"> | |
527 | + <rect key="frame" x="112.5" y="77" width="150" height="30"/> | |
528 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
529 | + <constraints> | |
530 | + <constraint firstAttribute="height" constant="30" id="5hq-lI-iLz"/> | |
531 | + <constraint firstAttribute="width" constant="150" id="BGF-TZ-RcW"/> | |
532 | + </constraints> | |
533 | + <state key="normal" title="下一步"> | |
534 | + <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
535 | + </state> | |
536 | + <connections> | |
537 | + <action selector="nextBtnClick:" destination="R3o-G2-oUv" eventType="touchUpInside" id="F9Y-Wo-UFn"/> | |
538 | + </connections> | |
539 | + </button> | |
540 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注:填写需要绑定的孩子的邀请码(非合作学校无邀请码.请更换手机号码的方式验证) 如不知道邀请码请拨打电话: 400-123456进行查询" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cMY-Ua-Fom"> | |
541 | + <rect key="frame" x="8" y="137" width="359" height="51"/> | |
542 | + <fontDescription key="fontDescription" name=".PingFangSC-Regular" family=".PingFang SC" pointSize="17"/> | |
543 | + <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
544 | + <nil key="highlightedColor"/> | |
545 | + </label> | |
546 | + <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="填写邀请码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="vQA-t4-Eci"> | |
547 | + <rect key="frame" x="8" y="8" width="360" height="30"/> | |
548 | + <constraints> | |
549 | + <constraint firstAttribute="height" constant="30" id="uUH-o5-0a7"/> | |
550 | + </constraints> | |
551 | + <nil key="textColor"/> | |
552 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
553 | + <textInputTraits key="textInputTraits"/> | |
554 | + <connections> | |
555 | + <outlet property="delegate" destination="R3o-G2-oUv" id="RKR-2s-gS5"/> | |
556 | + </connections> | |
557 | + </textField> | |
558 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aPt-HX-Yq3"> | |
559 | + <rect key="frame" x="8" y="46" width="359" height="1"/> | |
560 | + <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
561 | + <constraints> | |
562 | + <constraint firstAttribute="height" constant="1" id="gz9-PX-2oM"/> | |
563 | + </constraints> | |
564 | + </view> | |
565 | + </subviews> | |
566 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
567 | + <constraints> | |
568 | + <constraint firstItem="vQA-t4-Eci" firstAttribute="top" secondItem="exA-el-IFq" secondAttribute="top" constant="8" id="5Uu-Sy-vu0"/> | |
569 | + <constraint firstItem="aPt-HX-Yq3" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="7Ln-yD-VaY"/> | |
570 | + <constraint firstItem="vQA-t4-Eci" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="7M5-Vx-2Cz"/> | |
571 | + <constraint firstItem="aPt-HX-Yq3" firstAttribute="top" secondItem="vQA-t4-Eci" secondAttribute="bottom" constant="8" id="976-F3-2gJ"/> | |
572 | + <constraint firstItem="1fW-dv-WoM" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="EMs-fL-FZD"/> | |
573 | + <constraint firstItem="cMY-Ua-Fom" firstAttribute="top" secondItem="1fW-dv-WoM" secondAttribute="bottom" constant="30" id="Riq-Xq-a0K"/> | |
574 | + <constraint firstItem="vQA-t4-Eci" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="db8-a4-dQ5"/> | |
575 | + <constraint firstItem="cMY-Ua-Fom" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="pdC-1A-R0A"/> | |
576 | + <constraint firstItem="1fW-dv-WoM" firstAttribute="top" secondItem="aPt-HX-Yq3" secondAttribute="bottom" constant="30" id="qW5-M9-wDD"/> | |
577 | + <constraint firstAttribute="trailing" secondItem="aPt-HX-Yq3" secondAttribute="trailing" constant="8" id="uG6-EB-i2d"/> | |
578 | + <constraint firstItem="cMY-Ua-Fom" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="uJO-jO-ou4"/> | |
579 | + <constraint firstAttribute="height" constant="250" id="xqy-Zc-vv1"/> | |
580 | + </constraints> | |
581 | + </view> | |
582 | + </subviews> | |
583 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
584 | + <constraints> | |
585 | + <constraint firstItem="exA-el-IFq" firstAttribute="leading" secondItem="fXU-yt-T3m" secondAttribute="leading" id="1HS-GB-jkp"/> | |
586 | + <constraint firstItem="exA-el-IFq" firstAttribute="centerX" secondItem="AKW-ZX-X2g" secondAttribute="centerX" id="Auy-9z-eRw"/> | |
587 | + <constraint firstItem="exA-el-IFq" firstAttribute="centerY" secondItem="AKW-ZX-X2g" secondAttribute="centerY" constant="-100" id="XKh-ba-xKc"/> | |
588 | + </constraints> | |
589 | + <viewLayoutGuide key="safeArea" id="fXU-yt-T3m"/> | |
590 | + </view> | |
591 | + <connections> | |
592 | + <outlet property="inputInvitationCode" destination="vQA-t4-Eci" id="OSo-jl-2Ps"/> | |
593 | + <outlet property="instructions" destination="cMY-Ua-Fom" id="Ofn-M3-LGa"/> | |
594 | + <outlet property="nextBtn" destination="1fW-dv-WoM" id="Fne-zE-jM0"/> | |
595 | + </connections> | |
596 | + </viewController> | |
597 | + <placeholder placeholderIdentifier="IBFirstResponder" id="a4n-d8-QFK" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
598 | + </objects> | |
599 | + <point key="canvasLocation" x="1572" y="117.39130434782609"/> | |
600 | + </scene> | |
601 | + </scenes> | |
602 | + <resources> | |
603 | + <image name="evaluation_icon_pushDown" width="16" height="9"/> | |
604 | + <image name="my_icon_confirmBtn" width="21" height="19"/> | |
605 | + </resources> | |
606 | +</document> | |
... | ... |
ParentAssistant/ParentAssistant/Classes/controllers/userCenter/BaseCityChooseSchoolViewController.swift
... | ... | @@ -1,255 +0,0 @@ |
1 | -// | |
2 | -// BaseCityChooseSchoolViewController.swift | |
3 | -// ParentAssistant | |
4 | -// | |
5 | -// Created by 左丞 on 2018/3/9. | |
6 | -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | -// | |
8 | - | |
9 | -import UIKit | |
10 | -class BaseCityChooseSchoolViewController: UIViewController,UISearchBarDelegate { | |
11 | - | |
12 | - @IBOutlet weak var tableView: UITableView! | |
13 | - let firstLetterArr:[String] = ["#","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] | |
14 | - var keys:[String] = [] | |
15 | - var schoolDic:[String:[School]] = [:] | |
16 | - var schoolArray:[School] = [] | |
17 | - @IBOutlet weak var citySelectbtn: UILabel! | |
18 | - | |
19 | - override func viewDidLoad() { | |
20 | - super.viewDidLoad() | |
21 | - | |
22 | - citySelectbtn.text = localAddress | |
23 | - getData() | |
24 | - // Do any additional setup after loading the view. | |
25 | - } | |
26 | - | |
27 | - //根据关键字获取学校 | |
28 | - func getData(_ keyword:String=""){ | |
29 | - var dic:[String:AnyObject] = ["areaName":localAddress as AnyObject,"keyword":keyword as AnyObject] | |
30 | - if keyword == ""{ | |
31 | - dic.removeValue(forKey: "keyword") | |
32 | - } | |
33 | - HTTPServer.shared.getAreaSchool(parameters: dic) { (str, error) in | |
34 | - let json=JSON.fromString(str) | |
35 | - if let ret=json{ | |
36 | - let er=ret["error"].string | |
37 | - if let errorStr=er{ | |
38 | - appDelegate.window!.makeToast(errorStr) | |
39 | - }else{ | |
40 | - self.schoolArray.removeAll() | |
41 | - for item in ret.contentData().arrayValue { | |
42 | - self.schoolArray.append(School(j: item)) | |
43 | - } | |
44 | - self.sortData(self.schoolArray) | |
45 | - } | |
46 | - }else{ | |
47 | - | |
48 | - } | |
49 | - } | |
50 | - } | |
51 | - | |
52 | - //对给定的学校分组 | |
53 | - func sortData(_ array:[School]){ | |
54 | - schoolDic = [:] | |
55 | - for letter in firstLetterArr { | |
56 | - var arr:[School] = [] | |
57 | - for school in array{ | |
58 | - if String(format: "%c",pinyinFirstLetter((school.name as NSString).character(at: 0))).uppercased() == letter{ | |
59 | - arr.append(school) | |
60 | - } | |
61 | - } | |
62 | - if arr.count > 0{ | |
63 | - schoolDic.updateValue(arr, forKey: letter) | |
64 | - } | |
65 | - } | |
66 | - keys = Array(schoolDic.keys) | |
67 | - keys.sort { (key1, key2) -> Bool in | |
68 | - return key1 < key2 | |
69 | - } | |
70 | - tableView.reloadData() | |
71 | - } | |
72 | - | |
73 | - override func didReceiveMemoryWarning() { | |
74 | - super.didReceiveMemoryWarning() | |
75 | - // Dispose of any resources that can be recreated. | |
76 | - } | |
77 | - | |
78 | - //h获取已经选中的学校 | |
79 | - func getSelectSchool() -> School? { | |
80 | - for (_,item) in schoolDic{ | |
81 | - for school in item{ | |
82 | - if school.isSelect{ | |
83 | - return school | |
84 | - } | |
85 | - } | |
86 | - } | |
87 | - return nil | |
88 | - } | |
89 | - | |
90 | - //下一步 | |
91 | - @IBAction func nextStep(_ sender: UIButton) { | |
92 | - let school = getSelectSchool() | |
93 | - if school == nil{ | |
94 | - appDelegate.window!.makeToast("请先选择学校") | |
95 | - return | |
96 | - } | |
97 | - if !AccountManager.shared.isOnline(){ | |
98 | - appDelegate.window!.makeToast("请先登录") | |
99 | - return | |
100 | - } | |
101 | - | |
102 | - if school!.isNew == 1{ | |
103 | - let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
104 | - vc.from = .select | |
105 | - vc.school = school! | |
106 | - self.navigationController?.pushViewController(vc, animated: true) | |
107 | - }else{ | |
108 | - if AccountManager.shared.isNew() == 1{ | |
109 | - let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
110 | - vc.from = .unReserved | |
111 | - vc.school = school! | |
112 | - self.navigationController?.pushViewController(vc, animated: true) | |
113 | - return | |
114 | - } | |
115 | - let vc = Story.instantiateViewControllerWithIdentifier("InvitationCodeVerificationViewControllerVC", storyName: "UserCenter") as! InvitationCodeVerificationViewController | |
116 | - vc.school = school! | |
117 | - self.navigationController?.pushViewController(vc, animated: true) | |
118 | - | |
119 | - } | |
120 | - } | |
121 | - | |
122 | - func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { | |
123 | - searchBar.showsCancelButton = true | |
124 | - } | |
125 | - | |
126 | - func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { | |
127 | - searchData(searchBar) | |
128 | - } | |
129 | - | |
130 | - func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { | |
131 | - searchData(searchBar) | |
132 | - } | |
133 | - | |
134 | - //搜索学校 | |
135 | - func searchData(_ searchBar: UISearchBar){ | |
136 | - getData(searchBar.text!) | |
137 | - searchBar.resignFirstResponder() | |
138 | - searchBar.showsCancelButton = false | |
139 | - | |
140 | - } | |
141 | - | |
142 | - //左上角城市选择按钮点击事件 | |
143 | - @IBAction func citySelectBtnClick(_ sender: UITapGestureRecognizer) { | |
144 | - sender.view?.isUserInteractionEnabled = false | |
145 | - LZCityPickerController.showPicker(in: self | |
146 | - , select: { (address, province, city, area, isSelect) in | |
147 | - if isSelect{ | |
148 | - sender.view?.isUserInteractionEnabled = true | |
149 | - self.selectCity(city: area!) | |
150 | - } | |
151 | - }) { | |
152 | - sender.view?.isUserInteractionEnabled = true | |
153 | - | |
154 | - } | |
155 | - } | |
156 | - | |
157 | - func selectCity(city: String) { | |
158 | - localAddress = city | |
159 | - | |
160 | - citySelectbtn.text = city | |
161 | - self.getData() | |
162 | - } | |
163 | - | |
164 | - override func viewWillAppear(_ animated: Bool) { | |
165 | - super.viewWillAppear(animated) | |
166 | - citySelectbtn.text = localAddress | |
167 | - } | |
168 | - /* | |
169 | - // MARK: - Navigation | |
170 | - | |
171 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | |
172 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
173 | - // Get the new view controller using segue.destinationViewController. | |
174 | - // Pass the selected object to the new view controller. | |
175 | - } | |
176 | - */ | |
177 | - | |
178 | - //根据indexPath找到相对应的model | |
179 | - func getSchoolByIndexpath(indexPath:IndexPath)->School{ | |
180 | - return schoolDic[keys[indexPath.section]]![indexPath.row] | |
181 | - | |
182 | - } | |
183 | - | |
184 | - //所有数据全部取消选中 | |
185 | - func changeSchoolSelectState(){ | |
186 | - for (_,value) in schoolDic { | |
187 | - for item in value{ | |
188 | - item.isSelect = false | |
189 | - } | |
190 | - } | |
191 | - } | |
192 | -} | |
193 | - | |
194 | -extension BaseCityChooseSchoolViewController:UITableViewDelegate,UITableViewDataSource{ | |
195 | - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
196 | - let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! SelectSchoolList | |
197 | - let item = getSchoolByIndexpath(indexPath: indexPath) | |
198 | - cell.schoolName.text = item.name | |
199 | - if item.isSelect{ | |
200 | - cell.isSelect.isHidden = false | |
201 | - }else{ | |
202 | - cell.isSelect.isHidden = true | |
203 | - } | |
204 | - return cell | |
205 | - } | |
206 | - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
207 | - | |
208 | - return schoolDic[keys[section]]!.count | |
209 | - } | |
210 | - | |
211 | - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
212 | - let item = getSchoolByIndexpath(indexPath: indexPath) | |
213 | - changeSchoolSelectState() | |
214 | - item.isSelect = !item.isSelect | |
215 | - tableView.reloadData() | |
216 | - } | |
217 | - | |
218 | - func sectionIndexTitles(for tableView: UITableView) -> [String]? { | |
219 | - return keys | |
220 | - } | |
221 | - | |
222 | - func numberOfSections(in tableView: UITableView) -> Int { | |
223 | - return keys.count | |
224 | - } | |
225 | - | |
226 | - func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { | |
227 | - return keys[section] | |
228 | - } | |
229 | -} | |
230 | - | |
231 | -class SelectSchoolList: UITableViewCell { | |
232 | - | |
233 | - @IBOutlet weak var isSelect: UIImageView! | |
234 | - @IBOutlet weak var schoolName: UILabel! | |
235 | -} | |
236 | - | |
237 | -class School:NSObject{ | |
238 | - var schoolArea:String=""//学校所在地区 , | |
239 | - var schoolId:Int = 0//学校id , | |
240 | - var name:String=""//学校名称 , | |
241 | - var state:Int=0//状态,1正常,0关闭 | |
242 | - var isNew:Int=0////1非合作学校,0合作学校 | |
243 | - var isSelect:Bool = false | |
244 | - init(j:JSON){ | |
245 | - schoolArea = j["school_area"].stringValue | |
246 | - schoolId = j["school_id"].intValue | |
247 | - name = j["school_name"].stringValue | |
248 | - state = j["state"].intValue | |
249 | - } | |
250 | - init(names:String,id:Int) { | |
251 | - name = names | |
252 | - schoolId=id | |
253 | - } | |
254 | -} | |
255 | - |
ParentAssistant/ParentAssistant/Classes/controllers/userCenter/BindingViewController.swift
... | ... | @@ -1,344 +0,0 @@ |
1 | -// | |
2 | -// BindingViewController.swift | |
3 | -// ParentAssistant | |
4 | -// | |
5 | -// Created by 左丞 on 2018/3/6. | |
6 | -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | -// | |
8 | - | |
9 | -import UIKit | |
10 | -enum FromVC:Int{ | |
11 | - //信息确认 | |
12 | - case selfVC = 1//从当前类的对象push过来的(非合作学校) | |
13 | - case reserved = 2//合作学校预留 | |
14 | - case unReserved = 3//合作学校非预留 | |
15 | - //选择 | |
16 | - case select = 4 //选择 | |
17 | -} | |
18 | - | |
19 | -enum SelectType:Int{ | |
20 | - case gender=1//性别 | |
21 | - case grade=2//年级 | |
22 | - case classes=3//班级 | |
23 | -} | |
24 | - | |
25 | -class BindingViewController: UIViewController { | |
26 | - | |
27 | - var from:FromVC = .selfVC | |
28 | - @IBOutlet weak var confirmBtn: UIButton!//确定按钮 | |
29 | - @IBOutlet weak var phoneNumberLabel: UILabel!//电话号码显示的label | |
30 | - @IBOutlet weak var firstLineLabel: UILabel!//第一行(绑定手机号码为)所在的label | |
31 | - @IBOutlet weak var nameTextFiled: UITextField! | |
32 | - | |
33 | - @IBOutlet weak var selectTableView: UITableView! | |
34 | - @IBOutlet weak var selectImageHeight: NSLayoutConstraint!//三个image高度是相等的 | |
35 | - @IBOutlet weak var classLabel: UILabel! | |
36 | - @IBOutlet weak var gradeLabel: UILabel! | |
37 | - @IBOutlet weak var genderLabel: UILabel! | |
38 | - var boyName:String="" | |
39 | - var gender:String = "" | |
40 | - var school:School! | |
41 | - var selecttype:SelectType = .gender | |
42 | - var genderArr:[String] = ["男","女"] | |
43 | - var gradeArr:[GradeAndClasses] = [] | |
44 | - var classesArr:[GradeAndClasses]=[] | |
45 | - var selectGrade:GradeAndClasses! | |
46 | - var selectClass:GradeAndClasses! | |
47 | - var account = AccountManager.shared | |
48 | - override func viewDidLoad() { | |
49 | - super.viewDidLoad() | |
50 | - stepUI() | |
51 | - if selectGrade == nil && selectClass == nil{ | |
52 | - getGradeOrClassData(type: 1) | |
53 | - } | |
54 | - setLabelValue() | |
55 | - if from == .reserved || from == .unReserved{ | |
56 | - getData() | |
57 | - } | |
58 | - // Do any additional setup after loading the view. | |
59 | - } | |
60 | - | |
61 | - func getData(){ | |
62 | - HTTPServer.shared.getParentInfo(["mobile":account.phone() as AnyObject,"school_id":school.schoolId as AnyObject]) { (str, error) in | |
63 | - let json=JSON.fromString(str) | |
64 | - if let ret=json{ | |
65 | - let er=ret["error"].string | |
66 | - if let errorStr=er{ | |
67 | - appDelegate.window!.makeToast(errorStr) | |
68 | - }else{ | |
69 | - self.account.rawUserInfo = json | |
70 | - self.setValueForLabel() | |
71 | - } | |
72 | - }else{ | |
73 | - | |
74 | - } | |
75 | - } | |
76 | - } | |
77 | - | |
78 | - func setValueForLabel(){ | |
79 | - if account.studentClass().count == 0{ | |
80 | - appDelegate.window!.makeToast("该账号下已经没有需要绑定的孩子") | |
81 | - return | |
82 | - } | |
83 | - let student = account.studentClass()[0] | |
84 | - nameTextFiled.text = student["studentName"].stringValue | |
85 | - classLabel.text = student["className"].stringValue | |
86 | - gradeLabel.text = student["gradename"].stringValue | |
87 | - genderLabel.text = student["sex"].intValue == 1 ? "男" : "女" | |
88 | - } | |
89 | - | |
90 | - func stepUI(){ | |
91 | - setViewLayer(view: classLabel) | |
92 | - setViewLayer(view: gradeLabel) | |
93 | - setViewLayer(view: genderLabel) | |
94 | - setViewRadius(view: confirmBtn) | |
95 | - if from == .selfVC{ | |
96 | - phoneNumberLabel.isHidden = false | |
97 | - phoneNumberLabel.text = account.phone() | |
98 | - firstLineLabel.isHidden = false | |
99 | - } | |
100 | - if from != .select{ | |
101 | - selectImageHeight.constant = 0 | |
102 | - nameTextFiled.isUserInteractionEnabled = false | |
103 | - } | |
104 | - } | |
105 | - | |
106 | - @IBAction func cancleSelectTableView(_ sender: UIControl) { | |
107 | - selectTableView.isHidden = true | |
108 | - } | |
109 | - func getGradeOrClassData(type:Int,gradeid:Int=0){//1,年级,2班级 | |
110 | - HTTPServer.shared.getClassOrGrade(["state":type as AnyObject,"schoolid":school.schoolId as AnyObject,"gradeid":gradeid as AnyObject]) { (str, error) in | |
111 | - let json=JSON.fromString(str) | |
112 | - if let ret=json{ | |
113 | - let er=ret["error"].string | |
114 | - if let errorStr=er{ | |
115 | - appDelegate.window!.makeToast(errorStr) | |
116 | - }else{ | |
117 | - for item in ret.contentData().arrayValue{ | |
118 | - if type == 1{ | |
119 | - self.gradeArr.append(GradeAndClasses(j: item)) | |
120 | - }else{ | |
121 | - self.classesArr.append(GradeAndClasses(j: item)) | |
122 | - } | |
123 | - } | |
124 | - } | |
125 | - }else{ | |
126 | - | |
127 | - } | |
128 | - } | |
129 | - } | |
130 | - | |
131 | - func setLabelValue(){ | |
132 | - nameTextFiled.text = boyName | |
133 | - classLabel.text = selectClass != nil ? selectClass.className : "" | |
134 | - gradeLabel.text = selectGrade != nil ? selectGrade.gradeName : "" | |
135 | - genderLabel.text = gender | |
136 | - } | |
137 | - | |
138 | - override func didReceiveMemoryWarning() { | |
139 | - super.didReceiveMemoryWarning() | |
140 | - // Dispose of any resources that can be recreated. | |
141 | - } | |
142 | - | |
143 | - //绑定孩子信息 | |
144 | - func bindlingChildren(){ | |
145 | - var dic:[String:AnyObject] = [:] | |
146 | - switch from { | |
147 | - case .selfVC: | |
148 | - dic = ["parentId": account.parentId() as AnyObject, | |
149 | - "cooperateFlag": "false" as AnyObject, | |
150 | - "schoolId": school.schoolId as AnyObject, | |
151 | - "classId": selectClass.classId as AnyObject, | |
152 | - "studentName": boyName as AnyObject, | |
153 | - "sex": (gender == "男" ? 1 : 2) as AnyObject] | |
154 | - case .reserved: | |
155 | - dic = ["cooperateFlag": "true" as AnyObject, | |
156 | - "mobileFlag": "true" as AnyObject, | |
157 | - "studentId": account.studentClass()[0]["studentId"].stringValue as AnyObject] | |
158 | - default: | |
159 | - dic = ["cooperateFlag": "true" as AnyObject, | |
160 | - "classId": account.studentClass()[0]["classId"].intValue as AnyObject, | |
161 | - "mobileFlag": "false" as AnyObject, | |
162 | - "studentId": account.studentClass()[0]["studentId"].stringValue as AnyObject] | |
163 | - } | |
164 | - dic.updateValue(account.parentId() as AnyObject, forKey: "parentId") | |
165 | - HTTPServer.shared.bindlingChildren(parameters: dic) { (str, error) in | |
166 | - if JSON.fromString(str)!["status"] == 1 && error == nil{ | |
167 | - appDelegate.window!.makeToast("绑定成功") | |
168 | - let vc = BindlingSuccessViewController() | |
169 | - self.navigationController?.pushViewController(vc, animated: true) | |
170 | - }else{ | |
171 | - appDelegate.window!.makeToast("绑定失败") | |
172 | - | |
173 | - } | |
174 | - } | |
175 | - } | |
176 | - | |
177 | - //确定按钮 | |
178 | - @IBAction func confirmBtnClcik(_ sender: UIButton) { | |
179 | - if (from == .reserved || from == .unReserved) && account.studentClass().count == 0{ | |
180 | - appDelegate.window!.makeToast("该账号下已经没有需要绑定的孩子") | |
181 | - return | |
182 | - } | |
183 | - if from == .select && (selectClass == nil || boyName == "" || gender == ""){//班级选择完成则年级肯定已经完成 | |
184 | - appDelegate.window!.makeToast("请先填写姓名并选择班级,年级,性别") | |
185 | - return | |
186 | - } | |
187 | - //确认信息的确认按钮 | |
188 | - if from != .select{ | |
189 | - bindlingChildren() | |
190 | - return | |
191 | - } | |
192 | - let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
193 | - vc.boyName = boyName | |
194 | - vc.gender = gender | |
195 | - vc.from = .selfVC | |
196 | - vc.selectClass = selectClass | |
197 | - vc.selectGrade = selectGrade | |
198 | - self.navigationController?.pushViewController(vc, animated: true) | |
199 | - } | |
200 | - | |
201 | - override func viewWillAppear(_ animated: Bool) { | |
202 | - super.viewWillAppear(animated) | |
203 | - switch from { | |
204 | - case .select: | |
205 | - self.navigationItem.title = "填写孩子信息" | |
206 | - default: | |
207 | - self.navigationItem.title = "信息核对" | |
208 | - } | |
209 | - } | |
210 | - | |
211 | - @IBAction func selectTapAction(_ sender: UITapGestureRecognizer) { | |
212 | - boyName = nameTextFiled.text ?? "" | |
213 | - if from != .select { | |
214 | - return | |
215 | - } | |
216 | - getSelectTableViewRect(sender) | |
217 | - selectTableView.isHidden = false | |
218 | - switch sender.view!.tag { | |
219 | - case 1000: | |
220 | - selecttype = .gender | |
221 | - selectTableView.frame.size.height = 88 | |
222 | - case 1001: | |
223 | - selecttype = .grade | |
224 | - if gradeArr.count > 3{ | |
225 | - selectTableView.frame.size.height = 132 | |
226 | - }else{ | |
227 | - selectTableView.frame.size.height = 44*CGFloat(gradeArr.count) | |
228 | - } | |
229 | - | |
230 | - case 1002: | |
231 | - if selectGrade == nil{ | |
232 | - selectTableView.isHidden = true | |
233 | - appDelegate.window!.makeToast("请先选择年级") | |
234 | - return | |
235 | - } | |
236 | - selecttype = .classes | |
237 | - if classesArr.count > 3{ | |
238 | - selectTableView.frame.size.height = 132 | |
239 | - }else{ | |
240 | - selectTableView.frame.size.height = 44*CGFloat(classesArr.count) | |
241 | - } | |
242 | - | |
243 | - default: | |
244 | - break | |
245 | - } | |
246 | - selectTableView.reloadData() | |
247 | - } | |
248 | - | |
249 | - func getSelectTableViewRect(_ sender: UITapGestureRecognizer){ | |
250 | - let locaViewFrame = sender.view!.frame | |
251 | - selectTableView.frame.origin = CGPoint(x: locaViewFrame.origin.x+sender.view!.superview!.frame.origin.x, y: locaViewFrame.maxY+sender.view!.superview!.frame.origin.y) | |
252 | - | |
253 | - } | |
254 | - | |
255 | - /* | |
256 | - // MARK: - Navigation | |
257 | - | |
258 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | |
259 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
260 | - // Get the new view controller using segue.destinationViewController. | |
261 | - // Pass the selected object to the new view controller. | |
262 | - } | |
263 | - */ | |
264 | - | |
265 | -} | |
266 | - | |
267 | -extension BindingViewController:UITableViewDelegate,UITableViewDataSource{ | |
268 | - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
269 | - switch selecttype { | |
270 | - case .gender: | |
271 | - return genderArr.count | |
272 | - case .grade: | |
273 | - return gradeArr.count | |
274 | - default: | |
275 | - return classesArr.count | |
276 | - } | |
277 | - } | |
278 | - | |
279 | - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
280 | - switch selecttype { | |
281 | - case .gender: | |
282 | - tableView.isHidden = true | |
283 | - gender = genderArr[indexPath.row] | |
284 | - case .grade: | |
285 | - tableView.isHidden = true | |
286 | - let items = gradeArr[indexPath.row] | |
287 | - for item in gradeArr{ | |
288 | - item.isSelect = false | |
289 | - } | |
290 | - items.isSelect = true | |
291 | - selectGrade = items | |
292 | - getGradeOrClassData(type: 2, gradeid: items.gradeid) | |
293 | - default: | |
294 | - let items = classesArr[indexPath.row] | |
295 | - | |
296 | - tableView.isHidden = true | |
297 | - for item in classesArr{ | |
298 | - item.isSelect = false | |
299 | - } | |
300 | - items.isSelect = true | |
301 | - selectClass = items | |
302 | - } | |
303 | - setLabelValue() | |
304 | - } | |
305 | - | |
306 | - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
307 | - let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) | |
308 | - switch selecttype { | |
309 | - case .gender: | |
310 | - cell.textLabel?.text = genderArr[indexPath.row] | |
311 | - case .grade: | |
312 | - cell.textLabel?.text = gradeArr[indexPath.row].gradeName | |
313 | - default: | |
314 | - cell.textLabel?.text = classesArr[indexPath.row].className | |
315 | - } | |
316 | - return cell | |
317 | - } | |
318 | - | |
319 | - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | |
320 | - return 44 | |
321 | - } | |
322 | -} | |
323 | - | |
324 | -extension BindingViewController:UITextFieldDelegate{ | |
325 | - func textFieldShouldReturn(_ textField: UITextField) -> Bool { | |
326 | - boyName = textField.text! | |
327 | - textField.resignFirstResponder() | |
328 | - return true | |
329 | - } | |
330 | -} | |
331 | - | |
332 | -class GradeAndClasses: NSObject { | |
333 | - var gradeid:Int=0 | |
334 | - var gradeName:String = "" | |
335 | - var classId:Int=0 | |
336 | - var className:String = "" | |
337 | - var isSelect:Bool = false | |
338 | - init(j:JSON){ | |
339 | - gradeid = j["gradeId"].intValue | |
340 | - gradeName = j["gradeName"].stringValue | |
341 | - classId = j["classId"].intValue | |
342 | - className = j["className"].stringValue | |
343 | - } | |
344 | -} |
ParentAssistant/ParentAssistant/Classes/controllers/userCenter/BindlingSuccessViewController.swift
... | ... | @@ -1,133 +0,0 @@ |
1 | -// | |
2 | -// BindlingSuccessViewController.swift | |
3 | -// ParentAssistant | |
4 | -// | |
5 | -// Created by 左丞 on 2018/3/16. | |
6 | -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | -// | |
8 | - | |
9 | -import UIKit | |
10 | - | |
11 | -class BindlingSuccessViewController: UIViewController ,UIWebViewDelegate,UIScrollViewDelegate{ | |
12 | - var webView:UIWebView! | |
13 | - var header:UIView! | |
14 | - var webBrowserView:UIView! | |
15 | - var urlStr:String="http://60.190.202.57:8101/RecommendOrder.aspx?userid=" | |
16 | - var bindlingType:Int = 1 | |
17 | - override func viewDidLoad() { | |
18 | - super.viewDidLoad() | |
19 | - self.view.backgroundColor = UIColor.white | |
20 | - // Do any additional setup after loading the view. | |
21 | - webView = UIWebView() | |
22 | - webView.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: getScreenHeight()) | |
23 | - webView.delegate = self; | |
24 | - webView.backgroundColor = UIColor.clear | |
25 | - self.view.addSubview(webView) | |
26 | - | |
27 | - let request = URLRequest(url: URL(string: urlStr)!) | |
28 | - webView.loadRequest(request) | |
29 | - | |
30 | - if bindlingType == 0{ | |
31 | - header = UIView() | |
32 | - header.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: 80) | |
33 | - header.backgroundColor = UIColor.clear | |
34 | - let backView = UIView() | |
35 | - let image = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 40)) | |
36 | - image.image = #imageLiteral(resourceName: "my_icon_bindlingSuccess") | |
37 | - backView.addSubview(image) | |
38 | - let label = UILabel(frame: CGRect(x: 50, y: 10, width: header.frame.width - 20, height: 20)) | |
39 | - label.text = "绑定成功" | |
40 | - label.numberOfLines = 0 | |
41 | - label.textColor = UIColor.darkGray | |
42 | - label.font = UIFont.systemFont(ofSize: 15) | |
43 | - label.sizeToFit() | |
44 | - backView.addSubview(label) | |
45 | - backView.frame.size = CGSize(width: label.frame.maxX, height: 40) | |
46 | - backView.center.y = header.center.y | |
47 | - backView.center.x = header.center.x-10 | |
48 | - header.addSubview(label) | |
49 | - }else{ | |
50 | - header = UIView() | |
51 | - header.frame = CGRect(x: 10, y: 0, width: getScreenWidth()-20, height: 150) | |
52 | - header.backgroundColor = UIColor.clear | |
53 | - let label = UILabel(frame: CGRect(x: 10, y: 10, width: header.frame.width - 20, height: 100)) | |
54 | - label.text = "生成孩子\"汇作业\"账号为:\(urlStr),\n初始密码为:\(urlStr)(与账号相同),\n孩子可以下载\"汇作业\"app进行使用,\n" | |
55 | - label.numberOfLines = 0 | |
56 | - label.textColor = UIColor.darkGray | |
57 | - label.font = UIFont.systemFont(ofSize: 15) | |
58 | - label.sizeToFit() | |
59 | - header.addSubview(label) | |
60 | - | |
61 | - let backView = UIView() | |
62 | - let label2 = UILabel(frame: CGRect(x: 0, y: 5, width: header.frame.width - 20, height: 20)) | |
63 | - label2.text = "下载地址:" | |
64 | - label2.textColor = UIColor.darkGray | |
65 | - label2.font = UIFont.systemFont(ofSize: 15) | |
66 | - label2.sizeToFit() | |
67 | - backView.addSubview(label2) | |
68 | - let btn = UIButton(frame: CGRect(x: label2.frame.maxX, y: 0, width: 70, height: 30)) | |
69 | - | |
70 | - let str = NSMutableAttributedString(string: "汇作业") | |
71 | - let strRange = NSRange(location: 0, length: str.length) | |
72 | - str.addAttributes([NSAttributedStringKey.underlineStyle: NSNumber(integerLiteral: NSUnderlineStyle.styleSingle.rawValue), | |
73 | - NSAttributedStringKey.foregroundColor: Theme.topBarColor(), | |
74 | - NSAttributedStringKey.font: UIFont.systemFont(ofSize: 15)], | |
75 | - range: strRange) | |
76 | - btn.setAttributedTitle(str, for: .normal) | |
77 | - btn.addTarget(self, action: #selector(BindlingSuccessViewController.pushToAppStore), for: .touchUpInside) | |
78 | - backView.addSubview(btn) | |
79 | - backView.frame.size = CGSize(width: btn.frame.width+label2.frame.width+10, height: 30) | |
80 | - backView.center = CGPoint(x: header.center.x-10, y: label.frame.maxY+10) | |
81 | - header.frame.size.height = backView.frame.maxY + 10 | |
82 | - header.addSubview(backView) | |
83 | - } | |
84 | - | |
85 | - webBrowserView = webView.scrollView.subviews[0] | |
86 | - var rect = self.webBrowserView.frame | |
87 | - rect.origin.y = header.frame.maxY+10 | |
88 | - webBrowserView.frame = rect | |
89 | - | |
90 | - //添加 | |
91 | - webView.scrollView.addSubview(header) | |
92 | - | |
93 | - webView.scrollView.addObserver(self, forKeyPath: "contentSize", options: NSKeyValueObservingOptions.new, context: nil) | |
94 | - | |
95 | - // Do any additional setup after loading the view. | |
96 | - } | |
97 | - | |
98 | - @objc func pushToAppStore(){ | |
99 | - | |
100 | - } | |
101 | - | |
102 | - override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { | |
103 | - webView.scrollView.removeObserver(self, forKeyPath: "contentSize") | |
104 | - _ = self.view.viewWithTag(100) | |
105 | - let contentSize = webView.scrollView.contentSize | |
106 | - let vi = UIView() | |
107 | - vi.backgroundColor = UIColor.purple | |
108 | - vi.tag = 100 | |
109 | - vi.frame = CGRect(x: 0, y: contentSize.height, width: getScreenWidth()-20, height: 150) | |
110 | - webView.scrollView.addSubview(vi) | |
111 | - webView.scrollView.contentSize = CGSize(width: contentSize.width, height: contentSize.height+150) | |
112 | - | |
113 | - webView.scrollView.addObserver(self, forKeyPath: "contentSize", options: NSKeyValueObservingOptions.new, context: nil) | |
114 | - | |
115 | - } | |
116 | - | |
117 | - override func didReceiveMemoryWarning() { | |
118 | - super.didReceiveMemoryWarning() | |
119 | - // Dispose of any resources that can be recreated. | |
120 | - } | |
121 | - | |
122 | - | |
123 | - /* | |
124 | - // MARK: - Navigation | |
125 | - | |
126 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | |
127 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
128 | - // Get the new view controller using segue.destinationViewController. | |
129 | - // Pass the selected object to the new view controller. | |
130 | - } | |
131 | - */ | |
132 | - | |
133 | -} |
ParentAssistant/ParentAssistant/Classes/controllers/userCenter/InvitationCodeVerificationViewController.swift
... | ... | @@ -1,58 +0,0 @@ |
1 | -// | |
2 | -// InvitationCodeVerificationViewController.swift | |
3 | -// ParentAssistant | |
4 | -// | |
5 | -// Created by 左丞 on 2018/3/13. | |
6 | -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. | |
7 | -// | |
8 | - | |
9 | -import UIKit | |
10 | - | |
11 | -class InvitationCodeVerificationViewController: UIViewController ,UITextFieldDelegate{ | |
12 | - | |
13 | - @IBOutlet weak var instructions: UILabel! | |
14 | - @IBOutlet weak var nextBtn: UIButton! | |
15 | - @IBOutlet weak var inputInvitationCode: UITextField! | |
16 | - var school:School! | |
17 | - override func viewDidLoad() { | |
18 | - super.viewDidLoad() | |
19 | - instructions.text = "注:填写需要绑定的孩子的邀请码(非合作学校无邀请码.请更换手机号码的方式验证)\n\n如不知道邀请码请拨打电话: 400-826-2468进行查询" | |
20 | - nextBtn.layer.cornerRadius = 10 | |
21 | - nextBtn.layer.masksToBounds = true | |
22 | - | |
23 | - // Do any additional setup after loading the view. | |
24 | - } | |
25 | - | |
26 | - override func didReceiveMemoryWarning() { | |
27 | - super.didReceiveMemoryWarning() | |
28 | - // Dispose of any resources that can be recreated. | |
29 | - } | |
30 | - | |
31 | - @IBAction func nextBtnClick(_ sender: UIButton) { | |
32 | - if inputInvitationCode.text != ""{ | |
33 | - let vc = Story.instantiateViewControllerWithIdentifier("BindingViewControllerVC", storyName: "UserCenter") as! BindingViewController | |
34 | - vc.from = .reserved | |
35 | - vc.school = school! | |
36 | - self.navigationController?.pushViewController(vc, animated: true) | |
37 | - }else{ | |
38 | - appDelegate.window!.makeToast("请填写邀请码") | |
39 | - return | |
40 | - } | |
41 | - } | |
42 | - | |
43 | - func textFieldShouldReturn(_ textField: UITextField) -> Bool { | |
44 | - textField.resignFirstResponder() | |
45 | - return true | |
46 | - } | |
47 | - | |
48 | - /* | |
49 | - // MARK: - Navigation | |
50 | - | |
51 | - // In a storyboard-based application, you will often want to do a little preparation before navigation | |
52 | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
53 | - // Get the new view controller using segue.destinationViewController. | |
54 | - // Pass the selected object to the new view controller. | |
55 | - } | |
56 | - */ | |
57 | - | |
58 | -} |
ParentAssistant/ParentAssistant/Classes/controllers/userCenter/UserCenter.storyboard
... | ... | @@ -1,606 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | |
3 | - <device id="retina4_7" orientation="portrait"> | |
4 | - <adaptation id="fullscreen"/> | |
5 | - </device> | |
6 | - <dependencies> | |
7 | - <deployment identifier="iOS"/> | |
8 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
9 | - <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | |
10 | - <capability name="Safe area layout guides" minToolsVersion="9.0"/> | |
11 | - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
12 | - </dependencies> | |
13 | - <scenes> | |
14 | - <!--Binding View Controller--> | |
15 | - <scene sceneID="MIJ-WH-73A"> | |
16 | - <objects> | |
17 | - <viewController storyboardIdentifier="BindingViewControllerVC" id="SC7-Z5-TUk" customClass="BindingViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
18 | - <view key="view" contentMode="scaleToFill" id="wHn-CF-kHg"> | |
19 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
20 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
21 | - <subviews> | |
22 | - <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P0w-Y3-Nux"> | |
23 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
24 | - <subviews> | |
25 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XNG-cS-DCX" customClass="UIControl"> | |
26 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
27 | - <subviews> | |
28 | - <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="REL-rO-sBE"> | |
29 | - <rect key="frame" x="126.5" y="20" width="121.5" height="21"/> | |
30 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
31 | - <nil key="textColor"/> | |
32 | - <nil key="highlightedColor"/> | |
33 | - </label> | |
34 | - <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="1j1-yS-AS0"> | |
35 | - <rect key="frame" x="187.5" y="61" width="0.0" height="0.0"/> | |
36 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
37 | - <color key="textColor" red="0.95294117649999999" green="0.044139709020000001" blue="0.0" alpha="0.90402160229999995" colorSpace="calibratedRGB"/> | |
38 | - <nil key="highlightedColor"/> | |
39 | - </label> | |
40 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lry-ZD-jrQ"> | |
41 | - <rect key="frame" x="67.5" y="81" width="240" height="40"/> | |
42 | - <subviews> | |
43 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="孩子姓名:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SzI-3b-VyZ"> | |
44 | - <rect key="frame" x="8" y="9.5" width="75" height="21"/> | |
45 | - <constraints> | |
46 | - <constraint firstAttribute="width" constant="75" id="1Kz-c2-cWk"/> | |
47 | - </constraints> | |
48 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
49 | - <nil key="textColor"/> | |
50 | - <nil key="highlightedColor"/> | |
51 | - </label> | |
52 | - <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BcE-Vi-QYk"> | |
53 | - <rect key="frame" x="91" y="5" width="141" height="30"/> | |
54 | - <nil key="textColor"/> | |
55 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
56 | - <textInputTraits key="textInputTraits"/> | |
57 | - <connections> | |
58 | - <outlet property="delegate" destination="SC7-Z5-TUk" id="OOq-YY-QL7"/> | |
59 | - </connections> | |
60 | - </textField> | |
61 | - </subviews> | |
62 | - <constraints> | |
63 | - <constraint firstItem="BcE-Vi-QYk" firstAttribute="centerY" secondItem="Lry-ZD-jrQ" secondAttribute="centerY" id="UQx-st-B52"/> | |
64 | - <constraint firstItem="BcE-Vi-QYk" firstAttribute="leading" secondItem="SzI-3b-VyZ" secondAttribute="trailing" constant="8" id="giU-FF-BVf"/> | |
65 | - <constraint firstAttribute="width" constant="240" id="nln-YE-aUo"/> | |
66 | - <constraint firstItem="SzI-3b-VyZ" firstAttribute="centerY" secondItem="Lry-ZD-jrQ" secondAttribute="centerY" id="t0S-VJ-l1C"/> | |
67 | - <constraint firstAttribute="trailing" secondItem="BcE-Vi-QYk" secondAttribute="trailing" constant="8" id="yQh-ty-91f"/> | |
68 | - <constraint firstItem="SzI-3b-VyZ" firstAttribute="leading" secondItem="Lry-ZD-jrQ" secondAttribute="leading" constant="8" id="z2C-7R-Ub1"/> | |
69 | - </constraints> | |
70 | - </view> | |
71 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kxt-bL-oiI"> | |
72 | - <rect key="frame" x="67.5" y="129" width="240" height="40"/> | |
73 | - <subviews> | |
74 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="性 别:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gRs-dx-ci7"> | |
75 | - <rect key="frame" x="8" y="10" width="75" height="21"/> | |
76 | - <constraints> | |
77 | - <constraint firstAttribute="width" constant="75" id="eVY-WV-LHm"/> | |
78 | - </constraints> | |
79 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
80 | - <nil key="textColor"/> | |
81 | - <nil key="highlightedColor"/> | |
82 | - </label> | |
83 | - <view tag="1000" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PFs-Tj-G2K"> | |
84 | - <rect key="frame" x="91" y="5" width="141" height="30"/> | |
85 | - <subviews> | |
86 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8EC-X6-bwJ"> | |
87 | - <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
88 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
89 | - <nil key="textColor"/> | |
90 | - <nil key="highlightedColor"/> | |
91 | - </label> | |
92 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="t7C-GZ-zMI"> | |
93 | - <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
94 | - <constraints> | |
95 | - <constraint firstAttribute="width" secondItem="t7C-GZ-zMI" secondAttribute="height" multiplier="16:9" id="OER-9Z-gv9"/> | |
96 | - <constraint firstAttribute="width" constant="20" id="UdM-aj-TjH"/> | |
97 | - </constraints> | |
98 | - </imageView> | |
99 | - </subviews> | |
100 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
101 | - <gestureRecognizers/> | |
102 | - <constraints> | |
103 | - <constraint firstItem="8EC-X6-bwJ" firstAttribute="leading" secondItem="PFs-Tj-G2K" secondAttribute="leading" id="5GC-Eb-4l2"/> | |
104 | - <constraint firstItem="t7C-GZ-zMI" firstAttribute="leading" secondItem="8EC-X6-bwJ" secondAttribute="trailing" id="EZX-dZ-q37"/> | |
105 | - <constraint firstAttribute="trailing" secondItem="t7C-GZ-zMI" secondAttribute="trailing" id="GFx-iV-h2I"/> | |
106 | - <constraint firstItem="t7C-GZ-zMI" firstAttribute="centerY" secondItem="PFs-Tj-G2K" secondAttribute="centerY" id="Jft-CZ-Ozm"/> | |
107 | - <constraint firstAttribute="height" constant="30" id="Xqc-eU-7Pr"/> | |
108 | - <constraint firstItem="8EC-X6-bwJ" firstAttribute="top" secondItem="PFs-Tj-G2K" secondAttribute="top" id="qyh-NB-CVP"/> | |
109 | - <constraint firstAttribute="bottom" secondItem="8EC-X6-bwJ" secondAttribute="bottom" id="wv5-4S-ql7"/> | |
110 | - </constraints> | |
111 | - <connections> | |
112 | - <outletCollection property="gestureRecognizers" destination="LEy-66-xfv" appends="YES" id="cXM-sF-jrH"/> | |
113 | - </connections> | |
114 | - </view> | |
115 | - </subviews> | |
116 | - <constraints> | |
117 | - <constraint firstItem="gRs-dx-ci7" firstAttribute="leading" secondItem="kxt-bL-oiI" secondAttribute="leading" constant="8" id="1U3-kg-RuV"/> | |
118 | - <constraint firstAttribute="trailing" secondItem="PFs-Tj-G2K" secondAttribute="trailing" constant="8" id="NSH-fs-D3q"/> | |
119 | - <constraint firstItem="PFs-Tj-G2K" firstAttribute="centerY" secondItem="kxt-bL-oiI" secondAttribute="centerY" id="Sgo-zl-RVe"/> | |
120 | - <constraint firstItem="PFs-Tj-G2K" firstAttribute="leading" secondItem="gRs-dx-ci7" secondAttribute="trailing" constant="8" id="jlC-sf-cUB"/> | |
121 | - <constraint firstItem="gRs-dx-ci7" firstAttribute="centerY" secondItem="kxt-bL-oiI" secondAttribute="centerY" id="y97-EE-VAy"/> | |
122 | - </constraints> | |
123 | - </view> | |
124 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O93-Li-jET"> | |
125 | - <rect key="frame" x="67.5" y="177" width="240" height="40"/> | |
126 | - <subviews> | |
127 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="年 级:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yBZ-0b-pQ9"> | |
128 | - <rect key="frame" x="8" y="10" width="75" height="21"/> | |
129 | - <constraints> | |
130 | - <constraint firstAttribute="width" constant="75" id="dqs-ha-x8B"/> | |
131 | - </constraints> | |
132 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
133 | - <nil key="textColor"/> | |
134 | - <nil key="highlightedColor"/> | |
135 | - </label> | |
136 | - <view tag="1001" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GuO-ah-aM3"> | |
137 | - <rect key="frame" x="91" y="5" width="141" height="30"/> | |
138 | - <subviews> | |
139 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k8w-na-ShO"> | |
140 | - <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
141 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
142 | - <nil key="textColor"/> | |
143 | - <nil key="highlightedColor"/> | |
144 | - </label> | |
145 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="u8y-wv-95T"> | |
146 | - <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
147 | - <constraints> | |
148 | - <constraint firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="height" multiplier="16:9" id="PpX-an-Mcx"/> | |
149 | - </constraints> | |
150 | - </imageView> | |
151 | - </subviews> | |
152 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
153 | - <gestureRecognizers/> | |
154 | - <constraints> | |
155 | - <constraint firstItem="k8w-na-ShO" firstAttribute="leading" secondItem="GuO-ah-aM3" secondAttribute="leading" id="1YM-Gx-c1v"/> | |
156 | - <constraint firstItem="u8y-wv-95T" firstAttribute="leading" secondItem="k8w-na-ShO" secondAttribute="trailing" id="DZ0-WJ-MkY"/> | |
157 | - <constraint firstAttribute="bottom" secondItem="k8w-na-ShO" secondAttribute="bottom" id="J2d-vN-CP1"/> | |
158 | - <constraint firstItem="k8w-na-ShO" firstAttribute="top" secondItem="GuO-ah-aM3" secondAttribute="top" id="PWZ-ai-sko"/> | |
159 | - <constraint firstItem="u8y-wv-95T" firstAttribute="centerY" secondItem="GuO-ah-aM3" secondAttribute="centerY" id="f4o-vC-bln"/> | |
160 | - <constraint firstAttribute="trailing" secondItem="u8y-wv-95T" secondAttribute="trailing" id="mU3-LE-4dM"/> | |
161 | - <constraint firstAttribute="height" constant="30" id="rIk-SK-yBP"/> | |
162 | - </constraints> | |
163 | - <connections> | |
164 | - <outletCollection property="gestureRecognizers" destination="Kts-0O-pak" appends="YES" id="hUj-y5-jMs"/> | |
165 | - </connections> | |
166 | - </view> | |
167 | - </subviews> | |
168 | - <constraints> | |
169 | - <constraint firstAttribute="trailing" secondItem="GuO-ah-aM3" secondAttribute="trailing" constant="8" id="3ye-AU-Wjq"/> | |
170 | - <constraint firstItem="GuO-ah-aM3" firstAttribute="centerY" secondItem="O93-Li-jET" secondAttribute="centerY" id="S7j-Y1-iv2"/> | |
171 | - <constraint firstItem="yBZ-0b-pQ9" firstAttribute="leading" secondItem="O93-Li-jET" secondAttribute="leading" constant="8" id="b6Z-BO-HDk"/> | |
172 | - <constraint firstItem="yBZ-0b-pQ9" firstAttribute="centerY" secondItem="O93-Li-jET" secondAttribute="centerY" id="qdX-Ir-kHe"/> | |
173 | - <constraint firstItem="GuO-ah-aM3" firstAttribute="leading" secondItem="yBZ-0b-pQ9" secondAttribute="trailing" constant="8" id="vGm-oD-Gs9"/> | |
174 | - </constraints> | |
175 | - </view> | |
176 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hR4-GJ-ZLd"> | |
177 | - <rect key="frame" x="67.5" y="225" width="240" height="40"/> | |
178 | - <subviews> | |
179 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="班 级:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qFh-7U-p8J"> | |
180 | - <rect key="frame" x="8" y="10" width="75" height="21"/> | |
181 | - <constraints> | |
182 | - <constraint firstAttribute="width" constant="75" id="4gg-6q-S4K"/> | |
183 | - </constraints> | |
184 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
185 | - <nil key="textColor"/> | |
186 | - <nil key="highlightedColor"/> | |
187 | - </label> | |
188 | - <view tag="1002" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FMa-hb-gaq"> | |
189 | - <rect key="frame" x="91" y="5" width="141" height="30"/> | |
190 | - <subviews> | |
191 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ff-lb-IAz"> | |
192 | - <rect key="frame" x="0.0" y="0.0" width="121" height="30"/> | |
193 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
194 | - <nil key="textColor"/> | |
195 | - <nil key="highlightedColor"/> | |
196 | - </label> | |
197 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="sBB-lz-j4M"> | |
198 | - <rect key="frame" x="121" y="9.5" width="20" height="11"/> | |
199 | - <constraints> | |
200 | - <constraint firstAttribute="width" secondItem="sBB-lz-j4M" secondAttribute="height" multiplier="16:9" id="RK6-la-GUy"/> | |
201 | - </constraints> | |
202 | - </imageView> | |
203 | - </subviews> | |
204 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
205 | - <gestureRecognizers/> | |
206 | - <constraints> | |
207 | - <constraint firstItem="sBB-lz-j4M" firstAttribute="centerY" secondItem="FMa-hb-gaq" secondAttribute="centerY" id="Nlx-aL-9Cp"/> | |
208 | - <constraint firstAttribute="bottom" secondItem="3Ff-lb-IAz" secondAttribute="bottom" id="PPf-rg-VMj"/> | |
209 | - <constraint firstAttribute="trailing" secondItem="sBB-lz-j4M" secondAttribute="trailing" id="c92-Bb-fPa"/> | |
210 | - <constraint firstAttribute="height" constant="30" id="cD7-29-sC3"/> | |
211 | - <constraint firstItem="3Ff-lb-IAz" firstAttribute="leading" secondItem="FMa-hb-gaq" secondAttribute="leading" id="f9p-Mv-1bg"/> | |
212 | - <constraint firstItem="3Ff-lb-IAz" firstAttribute="top" secondItem="FMa-hb-gaq" secondAttribute="top" id="hgk-HZ-k3t"/> | |
213 | - <constraint firstItem="sBB-lz-j4M" firstAttribute="leading" secondItem="3Ff-lb-IAz" secondAttribute="trailing" id="tWR-Xb-CpO"/> | |
214 | - </constraints> | |
215 | - <connections> | |
216 | - <outletCollection property="gestureRecognizers" destination="3FV-1x-Qsg" appends="YES" id="KTd-T3-ptA"/> | |
217 | - </connections> | |
218 | - </view> | |
219 | - </subviews> | |
220 | - <constraints> | |
221 | - <constraint firstAttribute="height" constant="40" id="6Mp-oZ-kFS"/> | |
222 | - <constraint firstItem="qFh-7U-p8J" firstAttribute="centerY" secondItem="hR4-GJ-ZLd" secondAttribute="centerY" id="6qw-zS-lTj"/> | |
223 | - <constraint firstItem="qFh-7U-p8J" firstAttribute="leading" secondItem="hR4-GJ-ZLd" secondAttribute="leading" constant="8" id="A16-Da-Nml"/> | |
224 | - <constraint firstItem="FMa-hb-gaq" firstAttribute="centerY" secondItem="hR4-GJ-ZLd" secondAttribute="centerY" id="ILl-xZ-ROc"/> | |
225 | - <constraint firstAttribute="trailing" secondItem="FMa-hb-gaq" secondAttribute="trailing" constant="8" id="TC0-Yy-FbX"/> | |
226 | - <constraint firstItem="FMa-hb-gaq" firstAttribute="leading" secondItem="qFh-7U-p8J" secondAttribute="trailing" constant="8" id="ePc-S7-FyD"/> | |
227 | - </constraints> | |
228 | - </view> | |
229 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FqV-SD-Mvm"> | |
230 | - <rect key="frame" x="112.5" y="285" width="150" height="33"/> | |
231 | - <color key="backgroundColor" red="0.27503338459999999" green="0.50970917940000005" blue="0.90092128520000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
232 | - <constraints> | |
233 | - <constraint firstAttribute="width" constant="150" id="UyA-XG-HPW"/> | |
234 | - </constraints> | |
235 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
236 | - <state key="normal" title="确定"> | |
237 | - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
238 | - </state> | |
239 | - <connections> | |
240 | - <action selector="confirmBtnClcik:" destination="SC7-Z5-TUk" eventType="touchUpInside" id="dYC-uT-Vwc"/> | |
241 | - </connections> | |
242 | - </button> | |
243 | - <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fmZ-BK-cei"> | |
244 | - <rect key="frame" x="156" y="335" width="135" height="152"/> | |
245 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
246 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
247 | - <prototypes> | |
248 | - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="ScH-T2-JbL"> | |
249 | - <rect key="frame" x="0.0" y="28" width="135" height="44"/> | |
250 | - <autoresizingMask key="autoresizingMask"/> | |
251 | - <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ScH-T2-JbL" id="Vdf-3J-cd1"> | |
252 | - <rect key="frame" x="0.0" y="0.0" width="135" height="43.5"/> | |
253 | - <autoresizingMask key="autoresizingMask"/> | |
254 | - </tableViewCellContentView> | |
255 | - </tableViewCell> | |
256 | - </prototypes> | |
257 | - <connections> | |
258 | - <outlet property="dataSource" destination="SC7-Z5-TUk" id="Jiq-kB-gCm"/> | |
259 | - <outlet property="delegate" destination="SC7-Z5-TUk" id="0AV-HO-e1k"/> | |
260 | - </connections> | |
261 | - </tableView> | |
262 | - </subviews> | |
263 | - <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
264 | - <constraints> | |
265 | - <constraint firstItem="REL-rO-sBE" firstAttribute="top" secondItem="XNG-cS-DCX" secondAttribute="top" constant="20" id="5ZV-2a-Qo0"/> | |
266 | - <constraint firstItem="1j1-yS-AS0" firstAttribute="top" secondItem="REL-rO-sBE" secondAttribute="bottom" constant="20" id="5gv-QF-b7B"/> | |
267 | - <constraint firstItem="O93-Li-jET" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="BJw-Fi-zqe"/> | |
268 | - <constraint firstItem="Lry-ZD-jrQ" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="GdP-6p-9L5"/> | |
269 | - <constraint firstItem="kxt-bL-oiI" firstAttribute="top" secondItem="Lry-ZD-jrQ" secondAttribute="bottom" constant="8" id="HxB-x6-iZq"/> | |
270 | - <constraint firstItem="1j1-yS-AS0" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="Jd3-q2-0X8"/> | |
271 | - <constraint firstItem="FqV-SD-Mvm" firstAttribute="top" secondItem="hR4-GJ-ZLd" secondAttribute="bottom" constant="20" id="M0T-AR-guZ"/> | |
272 | - <constraint firstItem="O93-Li-jET" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="M5S-H4-w8q"/> | |
273 | - <constraint firstItem="FqV-SD-Mvm" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="OFC-XX-Wzn"/> | |
274 | - <constraint firstItem="hR4-GJ-ZLd" firstAttribute="top" secondItem="O93-Li-jET" secondAttribute="bottom" constant="8" id="Ou1-72-F83"/> | |
275 | - <constraint firstItem="O93-Li-jET" firstAttribute="top" secondItem="kxt-bL-oiI" secondAttribute="bottom" constant="8" id="Sy6-4q-XeH"/> | |
276 | - <constraint firstItem="hR4-GJ-ZLd" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="T4F-hh-BOa"/> | |
277 | - <constraint firstItem="kxt-bL-oiI" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="WJy-dT-EXy"/> | |
278 | - <constraint firstAttribute="height" constant="667" id="aXb-ZO-UyB"/> | |
279 | - <constraint firstItem="t7C-GZ-zMI" firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="width" id="be8-xa-5G9"/> | |
280 | - <constraint firstItem="sBB-lz-j4M" firstAttribute="width" secondItem="u8y-wv-95T" secondAttribute="width" id="eDv-01-DiQ"/> | |
281 | - <constraint firstItem="Lry-ZD-jrQ" firstAttribute="top" secondItem="1j1-yS-AS0" secondAttribute="bottom" constant="20" id="geU-1c-IfY"/> | |
282 | - <constraint firstItem="kxt-bL-oiI" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="jdh-cw-zpa"/> | |
283 | - <constraint firstItem="kxt-bL-oiI" firstAttribute="width" secondItem="Lry-ZD-jrQ" secondAttribute="width" id="mGE-8p-MQY"/> | |
284 | - <constraint firstItem="hR4-GJ-ZLd" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="rxP-pl-3Um"/> | |
285 | - <constraint firstItem="O93-Li-jET" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="uyt-7c-LZX"/> | |
286 | - <constraint firstItem="hR4-GJ-ZLd" firstAttribute="height" secondItem="Lry-ZD-jrQ" secondAttribute="height" id="wJT-yt-hLC"/> | |
287 | - <constraint firstItem="REL-rO-sBE" firstAttribute="centerX" secondItem="XNG-cS-DCX" secondAttribute="centerX" id="xV9-gg-n1L"/> | |
288 | - </constraints> | |
289 | - <connections> | |
290 | - <action selector="cancleSelectTableView:" destination="SC7-Z5-TUk" eventType="valueChanged" id="U7F-UF-iuZ"/> | |
291 | - </connections> | |
292 | - </view> | |
293 | - </subviews> | |
294 | - <constraints> | |
295 | - <constraint firstAttribute="bottom" secondItem="XNG-cS-DCX" secondAttribute="bottom" id="GpA-U6-Grn"/> | |
296 | - <constraint firstItem="XNG-cS-DCX" firstAttribute="top" secondItem="P0w-Y3-Nux" secondAttribute="top" id="LBb-SE-77O"/> | |
297 | - <constraint firstItem="XNG-cS-DCX" firstAttribute="leading" secondItem="P0w-Y3-Nux" secondAttribute="leading" id="Mkw-GK-7L3"/> | |
298 | - <constraint firstAttribute="trailing" secondItem="XNG-cS-DCX" secondAttribute="trailing" id="Tve-bM-QyB"/> | |
299 | - <constraint firstItem="XNG-cS-DCX" firstAttribute="centerX" secondItem="P0w-Y3-Nux" secondAttribute="centerX" id="tYI-cc-gNF"/> | |
300 | - </constraints> | |
301 | - </scrollView> | |
302 | - </subviews> | |
303 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
304 | - <constraints> | |
305 | - <constraint firstItem="P0w-Y3-Nux" firstAttribute="top" secondItem="wHn-CF-kHg" secondAttribute="top" id="2qF-RX-Ngk"/> | |
306 | - <constraint firstItem="P0w-Y3-Nux" firstAttribute="leading" secondItem="prJ-Io-sHC" secondAttribute="leading" id="90x-M3-dT7"/> | |
307 | - <constraint firstItem="P0w-Y3-Nux" firstAttribute="bottom" secondItem="prJ-Io-sHC" secondAttribute="bottom" id="WnC-bM-yOh"/> | |
308 | - <constraint firstItem="P0w-Y3-Nux" firstAttribute="trailing" secondItem="prJ-Io-sHC" secondAttribute="trailing" id="sQx-XF-5At"/> | |
309 | - </constraints> | |
310 | - <viewLayoutGuide key="safeArea" id="prJ-Io-sHC"/> | |
311 | - </view> | |
312 | - <connections> | |
313 | - <outlet property="classLabel" destination="3Ff-lb-IAz" id="3vZ-RG-Kl0"/> | |
314 | - <outlet property="confirmBtn" destination="FqV-SD-Mvm" id="2ks-S7-aw2"/> | |
315 | - <outlet property="firstLineLabel" destination="REL-rO-sBE" id="sHm-br-6ch"/> | |
316 | - <outlet property="genderLabel" destination="8EC-X6-bwJ" id="mGD-Vp-XO4"/> | |
317 | - <outlet property="gradeLabel" destination="k8w-na-ShO" id="0SC-ja-Ycq"/> | |
318 | - <outlet property="nameTextFiled" destination="BcE-Vi-QYk" id="P6F-fb-c0Z"/> | |
319 | - <outlet property="phoneNumberLabel" destination="1j1-yS-AS0" id="ro7-AV-8eQ"/> | |
320 | - <outlet property="selectImageHeight" destination="UdM-aj-TjH" id="FDT-0C-lMv"/> | |
321 | - <outlet property="selectTableView" destination="fmZ-BK-cei" id="WKi-76-ydS"/> | |
322 | - </connections> | |
323 | - </viewController> | |
324 | - <placeholder placeholderIdentifier="IBFirstResponder" id="gtY-da-H8P" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
325 | - <tapGestureRecognizer id="LEy-66-xfv"> | |
326 | - <connections> | |
327 | - <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="Nbe-mO-VOd"/> | |
328 | - </connections> | |
329 | - </tapGestureRecognizer> | |
330 | - <tapGestureRecognizer id="Kts-0O-pak"> | |
331 | - <connections> | |
332 | - <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="8Rk-RM-Grb"/> | |
333 | - </connections> | |
334 | - </tapGestureRecognizer> | |
335 | - <tapGestureRecognizer id="3FV-1x-Qsg"> | |
336 | - <connections> | |
337 | - <action selector="selectTapAction:" destination="SC7-Z5-TUk" id="ETG-1g-7Jk"/> | |
338 | - </connections> | |
339 | - </tapGestureRecognizer> | |
340 | - </objects> | |
341 | - <point key="canvasLocation" x="77.599999999999994" y="118.29085457271366"/> | |
342 | - </scene> | |
343 | - <!--选择孩子学校--> | |
344 | - <scene sceneID="jXC-xr-pan"> | |
345 | - <objects> | |
346 | - <viewController storyboardIdentifier="BaseCityChooseSchoolViewControllerVC" id="A0M-q7-IGT" customClass="BaseCityChooseSchoolViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
347 | - <view key="view" contentMode="scaleToFill" id="Onv-g3-veb"> | |
348 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
349 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
350 | - <subviews> | |
351 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fO6-Ah-i0n"> | |
352 | - <rect key="frame" x="0.0" y="64" width="375" height="40"/> | |
353 | - <subviews> | |
354 | - <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="l2p-Iw-hkv"> | |
355 | - <rect key="frame" x="40" y="0.0" width="335" height="40"/> | |
356 | - <textInputTraits key="textInputTraits"/> | |
357 | - <scopeButtonTitles> | |
358 | - <string>Title</string> | |
359 | - <string>Title</string> | |
360 | - </scopeButtonTitles> | |
361 | - <connections> | |
362 | - <outlet property="delegate" destination="A0M-q7-IGT" id="e7y-Ov-FN3"/> | |
363 | - </connections> | |
364 | - </searchBar> | |
365 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DOI-gH-jce"> | |
366 | - <rect key="frame" x="0.0" y="0.0" width="40" height="40"/> | |
367 | - <subviews> | |
368 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5U5-yq-C0i"> | |
369 | - <rect key="frame" x="8" y="20.5" width="0.0" height="0.0"/> | |
370 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
371 | - <nil key="textColor"/> | |
372 | - <nil key="highlightedColor"/> | |
373 | - </label> | |
374 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="evaluation_icon_pushDown" translatesAutoresizingMaskIntoConstraints="NO" id="orB-P1-43H"> | |
375 | - <rect key="frame" x="16" y="15.5" width="16" height="9"/> | |
376 | - <constraints> | |
377 | - <constraint firstAttribute="width" constant="16" id="16l-ae-SRY"/> | |
378 | - <constraint firstAttribute="width" secondItem="orB-P1-43H" secondAttribute="height" multiplier="16:9" id="LTF-6F-1BK"/> | |
379 | - </constraints> | |
380 | - </imageView> | |
381 | - </subviews> | |
382 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
383 | - <gestureRecognizers/> | |
384 | - <constraints> | |
385 | - <constraint firstItem="orB-P1-43H" firstAttribute="centerY" secondItem="DOI-gH-jce" secondAttribute="centerY" id="9zk-rO-Bal"/> | |
386 | - <constraint firstAttribute="trailing" secondItem="orB-P1-43H" secondAttribute="trailing" constant="8" id="BzP-Md-pmS"/> | |
387 | - <constraint firstItem="5U5-yq-C0i" firstAttribute="centerY" secondItem="DOI-gH-jce" secondAttribute="centerY" id="XUR-oK-Eac"/> | |
388 | - <constraint firstItem="5U5-yq-C0i" firstAttribute="leading" secondItem="DOI-gH-jce" secondAttribute="leading" constant="8" id="jlC-4X-vmT"/> | |
389 | - <constraint firstItem="orB-P1-43H" firstAttribute="leading" secondItem="5U5-yq-C0i" secondAttribute="trailing" constant="8" id="pIv-Pk-p8P"/> | |
390 | - </constraints> | |
391 | - <connections> | |
392 | - <outletCollection property="gestureRecognizers" destination="bwD-zo-BfW" appends="YES" id="lGg-fA-w9g"/> | |
393 | - </connections> | |
394 | - </view> | |
395 | - </subviews> | |
396 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
397 | - <constraints> | |
398 | - <constraint firstItem="DOI-gH-jce" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="top" id="0Hd-29-n1m"/> | |
399 | - <constraint firstAttribute="bottom" secondItem="DOI-gH-jce" secondAttribute="bottom" id="0io-Qu-M8N"/> | |
400 | - <constraint firstAttribute="bottom" secondItem="l2p-Iw-hkv" secondAttribute="bottom" id="27M-dQ-JQa"/> | |
401 | - <constraint firstItem="DOI-gH-jce" firstAttribute="leading" secondItem="fO6-Ah-i0n" secondAttribute="leading" id="E9W-AB-f3d"/> | |
402 | - <constraint firstItem="l2p-Iw-hkv" firstAttribute="leading" secondItem="DOI-gH-jce" secondAttribute="trailing" id="PBH-yX-Ii2"/> | |
403 | - <constraint firstAttribute="height" constant="40" id="cB5-m3-OT4"/> | |
404 | - <constraint firstAttribute="trailing" secondItem="l2p-Iw-hkv" secondAttribute="trailing" id="mxk-0g-vX5"/> | |
405 | - <constraint firstItem="l2p-Iw-hkv" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="top" id="q7F-zS-lRk"/> | |
406 | - </constraints> | |
407 | - </view> | |
408 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K6J-Tc-LTg"> | |
409 | - <rect key="frame" x="0.0" y="617" width="375" height="50"/> | |
410 | - <subviews> | |
411 | - <button opaque="NO" alpha="0.60000002384185791" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0O9-fu-b9g"> | |
412 | - <rect key="frame" x="8" y="12" width="359" height="30"/> | |
413 | - <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
414 | - <state key="normal" title="下一步"> | |
415 | - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
416 | - </state> | |
417 | - <userDefinedRuntimeAttributes> | |
418 | - <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
419 | - <integer key="value" value="10"/> | |
420 | - </userDefinedRuntimeAttribute> | |
421 | - <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | |
422 | - </userDefinedRuntimeAttributes> | |
423 | - <connections> | |
424 | - <action selector="nextStep:" destination="A0M-q7-IGT" eventType="touchUpInside" id="XgW-aA-1mG"/> | |
425 | - </connections> | |
426 | - </button> | |
427 | - </subviews> | |
428 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
429 | - <constraints> | |
430 | - <constraint firstAttribute="height" constant="50" id="BQ4-Si-bXm"/> | |
431 | - <constraint firstItem="0O9-fu-b9g" firstAttribute="leading" secondItem="K6J-Tc-LTg" secondAttribute="leading" constant="8" id="ifw-4f-Jpr"/> | |
432 | - <constraint firstAttribute="trailing" secondItem="0O9-fu-b9g" secondAttribute="trailing" constant="8" id="isL-T7-Qmd"/> | |
433 | - <constraint firstAttribute="bottom" secondItem="0O9-fu-b9g" secondAttribute="bottom" constant="8" id="nFg-EW-rQa"/> | |
434 | - </constraints> | |
435 | - </view> | |
436 | - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="PtW-3t-0kg"> | |
437 | - <rect key="frame" x="0.0" y="104" width="375" height="513"/> | |
438 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
439 | - <view key="tableFooterView" contentMode="scaleToFill" id="EaE-p5-h1S"> | |
440 | - <rect key="frame" x="0.0" y="72" width="375" height="1"/> | |
441 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | |
442 | - </view> | |
443 | - <prototypes> | |
444 | - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="cell" id="aLu-j4-6rM" customClass="SelectSchoolList" customModule="ParentAssistant" customModuleProvider="target"> | |
445 | - <rect key="frame" x="0.0" y="28" width="375" height="44"/> | |
446 | - <autoresizingMask key="autoresizingMask"/> | |
447 | - <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="aLu-j4-6rM" id="HwG-k5-D6B"> | |
448 | - <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> | |
449 | - <autoresizingMask key="autoresizingMask"/> | |
450 | - <subviews> | |
451 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mu7-8F-D7t"> | |
452 | - <rect key="frame" x="20" y="12" width="42" height="21"/> | |
453 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
454 | - <nil key="textColor"/> | |
455 | - <nil key="highlightedColor"/> | |
456 | - </label> | |
457 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="my_icon_confirmBtn" translatesAutoresizingMaskIntoConstraints="NO" id="uQB-I2-g76"> | |
458 | - <rect key="frame" x="335" y="11" width="20" height="20"/> | |
459 | - <constraints> | |
460 | - <constraint firstAttribute="height" constant="20" id="O5D-Kd-tnC"/> | |
461 | - <constraint firstAttribute="width" secondItem="uQB-I2-g76" secondAttribute="height" multiplier="1:1" id="cbI-Yt-6bN"/> | |
462 | - </constraints> | |
463 | - </imageView> | |
464 | - </subviews> | |
465 | - <constraints> | |
466 | - <constraint firstItem="mu7-8F-D7t" firstAttribute="leading" secondItem="HwG-k5-D6B" secondAttribute="leading" constant="20" id="Kok-DS-Yde"/> | |
467 | - <constraint firstItem="uQB-I2-g76" firstAttribute="centerY" secondItem="HwG-k5-D6B" secondAttribute="centerY" id="cIw-K0-Exy"/> | |
468 | - <constraint firstAttribute="trailing" secondItem="uQB-I2-g76" secondAttribute="trailing" constant="20" id="dVF-Dh-Rtt"/> | |
469 | - <constraint firstItem="mu7-8F-D7t" firstAttribute="centerY" secondItem="HwG-k5-D6B" secondAttribute="centerY" id="fsT-mg-e1a"/> | |
470 | - </constraints> | |
471 | - </tableViewCellContentView> | |
472 | - <connections> | |
473 | - <outlet property="isSelect" destination="uQB-I2-g76" id="6wY-JR-T26"/> | |
474 | - <outlet property="schoolName" destination="mu7-8F-D7t" id="wkp-Qv-j2n"/> | |
475 | - </connections> | |
476 | - </tableViewCell> | |
477 | - </prototypes> | |
478 | - <connections> | |
479 | - <outlet property="dataSource" destination="A0M-q7-IGT" id="evO-ib-Hst"/> | |
480 | - <outlet property="delegate" destination="A0M-q7-IGT" id="Rbx-Y9-br6"/> | |
481 | - </connections> | |
482 | - </tableView> | |
483 | - </subviews> | |
484 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
485 | - <constraints> | |
486 | - <constraint firstItem="fO6-Ah-i0n" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="1DX-T5-eqS"/> | |
487 | - <constraint firstItem="fO6-Ah-i0n" firstAttribute="top" secondItem="UOZ-dT-HdH" secondAttribute="top" id="5SW-dU-bex"/> | |
488 | - <constraint firstItem="K6J-Tc-LTg" firstAttribute="top" secondItem="PtW-3t-0kg" secondAttribute="bottom" id="DZi-5f-yJP"/> | |
489 | - <constraint firstItem="fO6-Ah-i0n" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="OTH-hT-IuC"/> | |
490 | - <constraint firstItem="PtW-3t-0kg" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="SRU-Mk-axC"/> | |
491 | - <constraint firstItem="PtW-3t-0kg" firstAttribute="top" secondItem="fO6-Ah-i0n" secondAttribute="bottom" id="abD-i3-Y6w"/> | |
492 | - <constraint firstItem="K6J-Tc-LTg" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="jJc-Sd-TbD"/> | |
493 | - <constraint firstItem="K6J-Tc-LTg" firstAttribute="trailing" secondItem="UOZ-dT-HdH" secondAttribute="trailing" id="jWn-SM-Y1N"/> | |
494 | - <constraint firstItem="K6J-Tc-LTg" firstAttribute="bottom" secondItem="UOZ-dT-HdH" secondAttribute="bottom" id="kZg-15-tgT"/> | |
495 | - <constraint firstItem="PtW-3t-0kg" firstAttribute="leading" secondItem="UOZ-dT-HdH" secondAttribute="leading" id="vLD-zI-Vju"/> | |
496 | - </constraints> | |
497 | - <viewLayoutGuide key="safeArea" id="UOZ-dT-HdH"/> | |
498 | - </view> | |
499 | - <navigationItem key="navigationItem" title="选择孩子学校" id="Zis-r1-2ac"/> | |
500 | - <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> | |
501 | - <connections> | |
502 | - <outlet property="citySelectbtn" destination="5U5-yq-C0i" id="wfB-6U-FyP"/> | |
503 | - <outlet property="tableView" destination="PtW-3t-0kg" id="VaJ-gB-cEX"/> | |
504 | - </connections> | |
505 | - </viewController> | |
506 | - <placeholder placeholderIdentifier="IBFirstResponder" id="cjH-Fa-jy0" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
507 | - <tapGestureRecognizer id="bwD-zo-BfW"> | |
508 | - <connections> | |
509 | - <action selector="citySelectBtnClick:" destination="A0M-q7-IGT" id="UOI-JJ-Wj0"/> | |
510 | - </connections> | |
511 | - </tapGestureRecognizer> | |
512 | - </objects> | |
513 | - <point key="canvasLocation" x="844" y="117.39130434782609"/> | |
514 | - </scene> | |
515 | - <!--Invitation Code Verification View Controller--> | |
516 | - <scene sceneID="O88-W5-BCB"> | |
517 | - <objects> | |
518 | - <viewController storyboardIdentifier="InvitationCodeVerificationViewControllerVC" id="R3o-G2-oUv" customClass="InvitationCodeVerificationViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> | |
519 | - <view key="view" contentMode="scaleToFill" id="AKW-ZX-X2g"> | |
520 | - <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
521 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
522 | - <subviews> | |
523 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="exA-el-IFq"> | |
524 | - <rect key="frame" x="0.0" y="108.5" width="375" height="250"/> | |
525 | - <subviews> | |
526 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1fW-dv-WoM"> | |
527 | - <rect key="frame" x="112.5" y="77" width="150" height="30"/> | |
528 | - <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
529 | - <constraints> | |
530 | - <constraint firstAttribute="height" constant="30" id="5hq-lI-iLz"/> | |
531 | - <constraint firstAttribute="width" constant="150" id="BGF-TZ-RcW"/> | |
532 | - </constraints> | |
533 | - <state key="normal" title="下一步"> | |
534 | - <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
535 | - </state> | |
536 | - <connections> | |
537 | - <action selector="nextBtnClick:" destination="R3o-G2-oUv" eventType="touchUpInside" id="F9Y-Wo-UFn"/> | |
538 | - </connections> | |
539 | - </button> | |
540 | - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注:填写需要绑定的孩子的邀请码(非合作学校无邀请码.请更换手机号码的方式验证) 如不知道邀请码请拨打电话: 400-123456进行查询" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cMY-Ua-Fom"> | |
541 | - <rect key="frame" x="8" y="137" width="359" height="51"/> | |
542 | - <fontDescription key="fontDescription" name=".PingFangSC-Regular" family=".PingFang SC" pointSize="17"/> | |
543 | - <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
544 | - <nil key="highlightedColor"/> | |
545 | - </label> | |
546 | - <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="填写邀请码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="vQA-t4-Eci"> | |
547 | - <rect key="frame" x="8" y="8" width="360" height="30"/> | |
548 | - <constraints> | |
549 | - <constraint firstAttribute="height" constant="30" id="uUH-o5-0a7"/> | |
550 | - </constraints> | |
551 | - <nil key="textColor"/> | |
552 | - <fontDescription key="fontDescription" type="system" pointSize="14"/> | |
553 | - <textInputTraits key="textInputTraits"/> | |
554 | - <connections> | |
555 | - <outlet property="delegate" destination="R3o-G2-oUv" id="RKR-2s-gS5"/> | |
556 | - </connections> | |
557 | - </textField> | |
558 | - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aPt-HX-Yq3"> | |
559 | - <rect key="frame" x="8" y="46" width="359" height="1"/> | |
560 | - <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
561 | - <constraints> | |
562 | - <constraint firstAttribute="height" constant="1" id="gz9-PX-2oM"/> | |
563 | - </constraints> | |
564 | - </view> | |
565 | - </subviews> | |
566 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
567 | - <constraints> | |
568 | - <constraint firstItem="vQA-t4-Eci" firstAttribute="top" secondItem="exA-el-IFq" secondAttribute="top" constant="8" id="5Uu-Sy-vu0"/> | |
569 | - <constraint firstItem="aPt-HX-Yq3" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="7Ln-yD-VaY"/> | |
570 | - <constraint firstItem="vQA-t4-Eci" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="7M5-Vx-2Cz"/> | |
571 | - <constraint firstItem="aPt-HX-Yq3" firstAttribute="top" secondItem="vQA-t4-Eci" secondAttribute="bottom" constant="8" id="976-F3-2gJ"/> | |
572 | - <constraint firstItem="1fW-dv-WoM" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="EMs-fL-FZD"/> | |
573 | - <constraint firstItem="cMY-Ua-Fom" firstAttribute="top" secondItem="1fW-dv-WoM" secondAttribute="bottom" constant="30" id="Riq-Xq-a0K"/> | |
574 | - <constraint firstItem="vQA-t4-Eci" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="db8-a4-dQ5"/> | |
575 | - <constraint firstItem="cMY-Ua-Fom" firstAttribute="leading" secondItem="exA-el-IFq" secondAttribute="leading" constant="8" id="pdC-1A-R0A"/> | |
576 | - <constraint firstItem="1fW-dv-WoM" firstAttribute="top" secondItem="aPt-HX-Yq3" secondAttribute="bottom" constant="30" id="qW5-M9-wDD"/> | |
577 | - <constraint firstAttribute="trailing" secondItem="aPt-HX-Yq3" secondAttribute="trailing" constant="8" id="uG6-EB-i2d"/> | |
578 | - <constraint firstItem="cMY-Ua-Fom" firstAttribute="centerX" secondItem="exA-el-IFq" secondAttribute="centerX" id="uJO-jO-ou4"/> | |
579 | - <constraint firstAttribute="height" constant="250" id="xqy-Zc-vv1"/> | |
580 | - </constraints> | |
581 | - </view> | |
582 | - </subviews> | |
583 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |
584 | - <constraints> | |
585 | - <constraint firstItem="exA-el-IFq" firstAttribute="leading" secondItem="fXU-yt-T3m" secondAttribute="leading" id="1HS-GB-jkp"/> | |
586 | - <constraint firstItem="exA-el-IFq" firstAttribute="centerX" secondItem="AKW-ZX-X2g" secondAttribute="centerX" id="Auy-9z-eRw"/> | |
587 | - <constraint firstItem="exA-el-IFq" firstAttribute="centerY" secondItem="AKW-ZX-X2g" secondAttribute="centerY" constant="-100" id="XKh-ba-xKc"/> | |
588 | - </constraints> | |
589 | - <viewLayoutGuide key="safeArea" id="fXU-yt-T3m"/> | |
590 | - </view> | |
591 | - <connections> | |
592 | - <outlet property="inputInvitationCode" destination="vQA-t4-Eci" id="OSo-jl-2Ps"/> | |
593 | - <outlet property="instructions" destination="cMY-Ua-Fom" id="Ofn-M3-LGa"/> | |
594 | - <outlet property="nextBtn" destination="1fW-dv-WoM" id="Fne-zE-jM0"/> | |
595 | - </connections> | |
596 | - </viewController> | |
597 | - <placeholder placeholderIdentifier="IBFirstResponder" id="a4n-d8-QFK" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
598 | - </objects> | |
599 | - <point key="canvasLocation" x="1572" y="117.39130434782609"/> | |
600 | - </scene> | |
601 | - </scenes> | |
602 | - <resources> | |
603 | - <image name="evaluation_icon_pushDown" width="16" height="9"/> | |
604 | - <image name="my_icon_confirmBtn" width="21" height="19"/> | |
605 | - </resources> | |
606 | -</document> |
ParentAssistant/ParentAssistant/Classes/util/AccountManager.swift
... | ... | @@ -222,13 +222,13 @@ class AccountManager: NSObject { |
222 | 222 | |
223 | 223 | import HandyJSON |
224 | 224 | class UserInfoModel: HandyJSON { |
225 | - var parentId = Int() | |
225 | + var parentId = String() | |
226 | 226 | var name = String() |
227 | 227 | var bindSchoolFlag = Bool() |
228 | 228 | var mobile = String() |
229 | 229 | var image = String() |
230 | 230 | var userid = String() |
231 | - var sex = Int() | |
231 | + var sex = String() | |
232 | 232 | required init(){} |
233 | 233 | } |
234 | 234 | class StudentClassInfoModel: HandyJSON { |
... | ... | @@ -236,21 +236,21 @@ class StudentClassInfoModel: HandyJSON { |
236 | 236 | var photo = String() |
237 | 237 | var cityName = String() |
238 | 238 | var cardNumber = String() |
239 | - var classId = Int() | |
240 | - var grade = Int() | |
239 | + var classId = String() | |
240 | + var grade = String() | |
241 | 241 | var studentName = String() |
242 | 242 | var studentCode = String() |
243 | - var parentId = Int() | |
243 | + var parentId = String() | |
244 | 244 | var className = String() |
245 | 245 | var areaName = String() |
246 | 246 | var gradename = String() |
247 | - var count = Int() | |
248 | - var schollId = Int() | |
247 | + var count = String() | |
248 | + var schoolId = String() | |
249 | 249 | var schoolName = String() |
250 | 250 | var studentUserId = String() |
251 | - var studentId = Int() | |
252 | - var parentMobile = Int() | |
253 | - var sex = Int() | |
251 | + var studentId = String() | |
252 | + var parentMobile = String() | |
253 | + var sex = String() | |
254 | 254 | |
255 | 255 | required init(){} |
256 | 256 | } |
... | ... |
ParentAssistant/ParentAssistant/Classes/util/HTTPServer.swift
... | ... | @@ -239,8 +239,8 @@ final class HTTPServer{ |
239 | 239 | //MARK: - 成长 |
240 | 240 | //MARK: 应用 |
241 | 241 | ///补卡 |
242 | - func postStudentMendCard(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | |
243 | - KHttp.POST(url: URL_POST_MEND_CARD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | |
242 | + func getStudentMendCard(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ | |
243 | + KHttp.GET(url: URL_POST_MEND_CARD, parameters: parameters,headers:["Authorization":token!], completionHandler: completionHandler) | |
244 | 244 | } |
245 | 245 | ///考勤 |
246 | 246 | func getStudentCheckList(parameters: [String : AnyObject]?,completionHandler:@escaping (String?, NSError?) -> ()){ |
... | ... |
ParentAssistant/ParentAssistant/Classes/util/view/AlertShowView.swift
... | ... | @@ -10,7 +10,7 @@ import UIKit |
10 | 10 | |
11 | 11 | class AlertShowView: UIView,UITableViewDelegate,UITableViewDataSource { |
12 | 12 | |
13 | - typealias AlertBackBlock = (AnyObject)->() | |
13 | + typealias AlertBackBlock = (Int)->() | |
14 | 14 | |
15 | 15 | |
16 | 16 | lazy var tableView = { ()-> UITableView in |
... | ... | @@ -107,8 +107,7 @@ class AlertShowView: UIView,UITableViewDelegate,UITableViewDataSource { |
107 | 107 | return cell! |
108 | 108 | } |
109 | 109 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
110 | - let selectData = self.dataArr[indexPath.row] | |
111 | - self.AlertBlock!(selectData) | |
110 | + self.AlertBlock!(indexPath.row) | |
112 | 111 | closeView() |
113 | 112 | } |
114 | 113 | required init?(coder aDecoder: NSCoder) { |
... | ... |