O2WebViewModels.swift 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. //
  2. // O2WebViewModels.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2019/4/18.
  6. // Copyright © 2019 zoneland. All rights reserved.
  7. //
  8. import HandyJSON
  9. class O2WebViewUploadImage: HandyJSON {
  10. var mwfId: String!
  11. var callback: String!
  12. var fileId: String!
  13. var referencetype: String!
  14. var reference: String!
  15. var scale: Int!
  16. required init() {}
  17. }
  18. class O2WebViewBaseMessage<T : HandyJSON>: HandyJSON {
  19. var callback: String!
  20. var type: String!
  21. var data:T?
  22. required init() {}
  23. }
  24. class O2NotificationMessage<T : HandyJSON>: HandyJSON {
  25. var callback: String!
  26. /**
  27. alert
  28. confirm
  29. prompt
  30. vibrate
  31. toast
  32. actionSheet
  33. showLoading
  34. hideLoading
  35. **/
  36. var type: String!
  37. var data:T?
  38. required init() {}
  39. }
  40. class O2NotificationAlertMessage: HandyJSON {
  41. var message: String!
  42. var title: String!
  43. var buttonName: String!
  44. required init() {}
  45. }
  46. class O2NotificationConfirm: HandyJSON {
  47. var message: String!
  48. var title: String!
  49. var buttonLabels: [String]!
  50. required init() {}
  51. }
  52. class O2NotificationActionSheet: HandyJSON {
  53. var title: String!
  54. var cancelButton: String!
  55. var otherButtons: [String]!
  56. required init() {}
  57. }
  58. class O2NotificationToast: HandyJSON {
  59. var duration: Int!
  60. var message: String!
  61. required init() {}
  62. }
  63. class O2NotificationLoading: HandyJSON {
  64. var text: String!
  65. required init() {}
  66. }
  67. class O2UtilPicker: HandyJSON {
  68. var value: String!
  69. var startDate: String!
  70. var endDate: String!
  71. required init() {}
  72. }
  73. class O2UtilNavigation: HandyJSON {
  74. var title: String!
  75. required init() {}
  76. }
  77. //地图展现位置
  78. struct O2UtilOpenMap: HandyJSON {
  79. var address: String?
  80. var addressDetail: String?
  81. var latitude: Double?
  82. var longitude: Double?
  83. }
  84. struct O2UtilPhoneInfo: HandyJSON {
  85. var screenWidth: String?
  86. var screenHeight: String?
  87. var brand:String?
  88. var model: String?
  89. var version: String?
  90. var netInfo: String?
  91. var operatorType: String?
  92. }
  93. //身份选择传入参数对象
  94. struct O2BizIdentityPickerMessage: HandyJSON {
  95. var topList: [String]?
  96. var multiple: Bool?
  97. var maxNumber: Int?
  98. var pickedIdentities: [String]?
  99. var duty: [String]?
  100. }
  101. //组织选择传入参数对象
  102. struct O2BizUnitPickerMessage: HandyJSON {
  103. var topList: [String]?
  104. var multiple: Bool?
  105. var maxNumber: Int?
  106. var pickedDepartments: [String]?
  107. var orgType: String?
  108. }
  109. //群组选择传入参数对象
  110. struct O2BizGroupPickerMessage: HandyJSON {
  111. var multiple: Bool?
  112. var maxNumber: Int?
  113. var pickedGroups: [String]?
  114. }
  115. //人员选择传入参数对象
  116. struct O2BizPersonPickerMessage: HandyJSON {
  117. var multiple: Bool?
  118. var maxNumber: Int?
  119. var pickedUsers: [String]?
  120. }
  121. //复合选择传入参数对象
  122. struct O2BizComplexPickerMessage: HandyJSON {
  123. var topList: [String]?
  124. var pickMode: [String]?
  125. var multiple: Bool?
  126. var maxNumber: Int?
  127. var pickedDepartments: [String]?
  128. var pickedIdentities: [String]?
  129. var pickedGroups: [String]?
  130. var pickedUsers: [String]?
  131. var duty: [String]?
  132. var orgType: String?
  133. }
  134. struct O2BizComplexPickerResults: HandyJSON {
  135. var results: [String]?
  136. }
  137. struct O2BizContactPickerResult: HandyJSON {
  138. var departments: [O2UnitPickerItem]?
  139. var identities: [O2IdentityPickerItem]?
  140. var groups: [O2GroupPickerItem]?
  141. var users: [O2PersonPickerItem]?
  142. }
  143. struct O2DeviceLocationResult: HandyJSON {
  144. var latitude: Double?
  145. var longitude: Double?
  146. var address: String?
  147. }
  148. struct O2BizPreviewDocMessage: HandyJSON {
  149. var url: String? // 文件下载地址
  150. var fileName: String? // 文件名称
  151. }
  152. struct O2UtilNavigationOpenOtherApp: HandyJSON {
  153. var schema: String? // 打开app schema url
  154. }