Commit afb5ebac authored by chenweijian's avatar chenweijian

代理分享链接

parent e4447829
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment