Commit f076a45a authored by chenweijian's avatar chenweijian

分享充值链接

parent 5387b0b7
......@@ -49,6 +49,7 @@ func CanShareChargeLink(c *gin.Context) (*mycontext.MyContext, error) {
type res struct {
ShareUrl string `json:"shareUrl"`
ShareIcon string `json:"shareIcon"`
RechargeUrl string `json:"rechargeUrl"`
}
// 安卓3.8.0版本有bug,这里暂时兼容
......@@ -57,16 +58,17 @@ func CanShareChargeLink(c *gin.Context) (*mycontext.MyContext, error) {
if err != nil {
return myContext, err
}
if deviceType == "android" {
if (major > 3) || (major == 3 && minor >= 8) {
myUser, err := user_c.GetUserTinyById(model, userId)
if err != nil {
return myContext, err
}
if deviceType == "android" {
if (major > 3) || (major == 3 && minor >= 8) {
shareUrl = shareUrl + myUser.ExternalId
}
}
rechargeUrl := config.GetH5Config().AGENT_SHARE_URL + myUser.ExternalId
resp.ResponseOk(c, res{shareUrl, config.GetH5Config().AGENT_SHARE_ICON})
resp.ResponseOk(c, res{shareUrl, config.GetH5Config().AGENT_SHARE_ICON, rechargeUrl})
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