Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package model
// associate_platform
const (
AssociatePlatformNone int8 = iota
AssociatePlatformAndroidPink
AssociatePlatformIphonePink
AssociatePlatformIpadPink
)
// AssociatePlatform get platfrom.
func AssociatePlatform(platfrom, device, mobiApp string) int8 {
switch {
case platfrom == "ios" && device == "phone" && mobiApp == "iphone":
return AssociatePlatformIphonePink
case platfrom == "ios" && device == "pad" && mobiApp == "iphone":
return AssociatePlatformIpadPink
case platfrom == "android" && mobiApp == "android":
return AssociatePlatformAndroidPink
default:
return AssociatePlatformNone
}
}
// AssociateVipResp associate vip resp
type AssociateVipResp struct {
Title string `json:"title"`
Remark string `json:"remark"`
Link string `json:"link"`
AssociatePlatform int8 `json:"associate_platform"`
}