IHFloorMapService.swift 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // IHFloorMapService.swift
  3. // Inhealth
  4. //
  5. // Created by weclouds on 2020/1/14.
  6. // Copyright © 2020 weclouds. All rights reserved.
  7. //
  8. import UIKit
  9. class IHFloorMapService: NSObject {
  10. static let share = IHFloorMapService()
  11. func getfloorImage(_ floorId:String,requestSuccess:@escaping (String)->Void,requestFail:@escaping (()->Void)){
  12. let username = AppShare.username
  13. let client_key = AppShare.client_key
  14. let os = AppShare.os
  15. let version = AppShare.version
  16. let token = AppShare.token
  17. g_area_floor_build_imageHttpRequest(username, client_key: client_key, os: os, version: version, token: token, floorId: floorId, success: { (json) -> (Void) in
  18. let mFloorInfo = Floor_build_image_Result_Info.fromJSON(json)
  19. let result = mFloorInfo?.result
  20. let image = result?.floorImage
  21. requestSuccess(image ?? "")
  22. }) { () -> (Void) in
  23. }
  24. }
  25. deinit {
  26. log.debug("IHFloorMapService销毁")
  27. }
  28. }