platform.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package model
  2. const (
  3. // PanelTypeDefault .
  4. PanelTypeDefault = "normal"
  5. // PlatformWeb .
  6. PlatformWeb = "web"
  7. // PlatformAndroid .
  8. PlatformAndroid = "android"
  9. // PlatformIos .
  10. PlatformIos = "ios"
  11. // DeviceIos .
  12. DeviceIos = "ios"
  13. )
  14. var (
  15. // PlatformMap 平台
  16. PlatformMap = map[string]string{"android": "android", "ios": "ios", "pc": "pc", "public": "public"}
  17. // DeviceMap 对应设备
  18. DeviceMap = map[string]string{"pad": "pad", "phone": "phone"}
  19. // MobiAPPIDIosMap iOS
  20. MobiAPPIDIosMap = map[string]string{"iphone": "iphone", "ipad": "ipad", "iphone_b": "iphone_b"}
  21. // MobiAPPIDAndroidMap Android
  22. MobiAPPIDAndroidMap = map[string]string{"android": "android", "android_tv_yst": "android_tv_yst", "android_tv": "android_tv", "android_i": "android_i", "android_b": "android_b"}
  23. // MobiAPPIDMap all
  24. MobiAPPIDMap = map[string]string{"iphone": "iphone", "ipad": "ipad", "iphone_b": "iphone_b", "android": "android", "android_tv_yst": "android_tv_yst", "android_tv": "android_tv", "android_i": "android_i", "android_b": "android_b"}
  25. )
  26. // ConfPlatform struct .
  27. type ConfPlatform struct {
  28. ID int64 `json:"id"`
  29. PlatformName string `json:"platform_name"`
  30. Platform string `json:"platform"`
  31. Device string `json:"device"`
  32. MobiApp string `json:"mobi_app"`
  33. PanelType string `json:"panel_type"`
  34. }