diff --git a/route/charge_r/charge.go b/route/charge_r/charge.go index 7b6b100d79dff9999a4935b7424ca6e2000e2f2a..861c3f25ddc19c0cdb648cbb78eb263898c11c0f 100644 --- a/route/charge_r/charge.go +++ b/route/charge_r/charge.go @@ -41,6 +41,22 @@ func CanShareChargeLink(c *gin.Context) (*mycontext.MyContext, error) { ShareIcon string `json:"shareIcon"` } + // 安卓3.8.0版本有bug,这里暂时兼容 + myUser, err := user_c.GetUserTinyById(model, userId) + if err != nil { + return myContext, err + } + shareUrl := config.GetH5Config().AGENT_SHARE_URL + deviceType, major, minor, _, err := req.GetAppVersion(c) + if err != nil { + return myContext, err + } + if deviceType == "android" { + if (major > 3) || (major == 3 && minor >= 8) { + shareUrl = shareUrl + myUser.ExternalId + } + } + resp.ResponseOk(c, res{config.GetH5Config().AGENT_SHARE_URL, config.GetH5Config().AGENT_SHARE_ICON}) return myContext, nil }