|
@@ -41,7 +41,6 @@ func (w *ExhibitionStruct) GetExhibitionActiveHref(email, phone, source string,
|
|
|
//进行手机号绑定-1、新用户绑定手机号后强制合并;2、老用户绑定手机号让用户自己选择账号合并
|
|
|
token = AccountMerge(phone, email, mgoUserId, session)
|
|
|
}
|
|
|
- fmt.Println(phone, "------")
|
|
|
//留资福利 及 留资后跳转地址
|
|
|
if res := w.ExhibitionActive("", source, session, "second_ad_code,guide_page,welfare_type,welfare_content"); res != nil {
|
|
|
//供 文库 获取福利 使用 NSQ 通信
|
|
@@ -59,9 +58,9 @@ func (w *ExhibitionStruct) GetExhibitionActiveHref(email, phone, source string,
|
|
|
}
|
|
|
}()
|
|
|
href = util.ObjToString(res["toDirect"])
|
|
|
- }
|
|
|
- if token != "" {
|
|
|
- href = fmt.Sprintf("%s?%stoDirect=%s", MergeUrl, fmt.Sprintf("token=%s&", token), href)
|
|
|
+ if token != "" {
|
|
|
+ href = fmt.Sprintf("%s?%stoDirect=%s", MergeUrl, fmt.Sprintf("token=%s&", token), href)
|
|
|
+ }
|
|
|
}
|
|
|
session.Del("relationPhoneId")
|
|
|
return
|
|
@@ -75,16 +74,20 @@ func (w *ExhibitionStruct) ExhibitionActive(host, source string, session *httpse
|
|
|
ExhibitionMap[source] = true
|
|
|
activeInfo := (*activeInfos)[0]
|
|
|
switch {
|
|
|
- case strings.Contains("first_ad_code", params):
|
|
|
+ case strings.Contains(params, "first_ad_code"):
|
|
|
res["bindOrNot"] = false
|
|
|
if phone, _ := session.Get("phone").(string); phone == "" {
|
|
|
res["bindOrNot"] = true
|
|
|
}
|
|
|
res["adList"] = w.GetJyAdList(host, util.ObjToString(activeInfo["first_ad_code"]))
|
|
|
- case strings.Contains("second_ad_code", params):
|
|
|
+ case strings.Contains(params, "second_ad_code"):
|
|
|
//福利--因 go-zero 版本不同,无法直接调 文库中台,改为前端直接调文库服务
|
|
|
//go ExhibitionWelfare(session, util.Int64All(activeInfo["welfare_type"]), util.ObjToString(activeInfo["welfare_content"]))
|
|
|
- res["toDirect"] = fmt.Sprintf("%s?ad=%s", util.ObjToString("guide_page"), util.ObjToString("second_ad_code"))
|
|
|
+ catenate := "?"
|
|
|
+ if strings.Contains(util.ObjToString(activeInfo["guide_page"]), "?") {
|
|
|
+ catenate = "&"
|
|
|
+ }
|
|
|
+ res["toDirect"] = fmt.Sprintf("%s%sad=%s", util.ObjToString(activeInfo["guide_page"]), catenate, util.ObjToString(activeInfo["second_ad_code"]))
|
|
|
}
|
|
|
}
|
|
|
return res
|