Commit abf73000 authored by chenweijian's avatar chenweijian

分享充值链接

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