优惠券swift版马甲包

YMConst.swift 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // YMConst.swift
  3. // MvpGoods
  4. //
  5. // Created by 小花 on 2019/3/18.
  6. // Copyright © 2019年 MVP. All rights reserved.
  7. //
  8. import Foundation
  9. import UIKit
  10. import SnapKit
  11. import MJExtension
  12. import ObjectMapper
  13. import MJRefresh
  14. /// 服务器地址
  15. let BASE_URL = "https://game.zhuadd.com"
  16. //渠道号
  17. let CHANNEL_ID = "5250"
  18. //appid
  19. let APP_ID = "1460375648"
  20. //阿里pid
  21. let ALBC_PID = "25904249"
  22. //友盟
  23. let YMKEY = "5cb99e3161f5647dd4000852"
  24. /// 屏幕的宽
  25. let SCREENW = UIScreen.main.bounds.size.width
  26. /// 屏幕的高
  27. let SCREENH = UIScreen.main.bounds.size.height
  28. let navBarHeight: CGFloat = {
  29. let statusBarHeight = UIApplication.shared.statusBarFrame.height
  30. if statusBarHeight == 20.0 {
  31. return 64
  32. }else {
  33. return 88
  34. }
  35. }()
  36. let bottomSafeHeight: CGFloat = {
  37. let statusBarHeight = UIApplication.shared.statusBarFrame.height
  38. if statusBarHeight == 20.0 {
  39. return 0
  40. }else {
  41. return 34
  42. }
  43. }()
  44. let KStatesBarHeight: CGFloat = {
  45. let statusBarHeight = UIApplication.shared.statusBarFrame.height
  46. if statusBarHeight == 20.0 {
  47. return 20
  48. }else {
  49. return 40
  50. }
  51. }()
  52. let tabBarHeight: CGFloat = {
  53. let statusBarHeight = UIApplication.shared.statusBarFrame.height
  54. if statusBarHeight == 20.0 {
  55. return 49.0
  56. }else {
  57. return 49.0+34.0
  58. }
  59. }()
  60. //网络请求成功状态码
  61. let RETURN_OK = 0
  62. func fitSize(x:CGFloat) -> CGFloat {
  63. return (SCREENW/375.0) * x
  64. }