|
@@ -646,11 +646,22 @@ func (i *Info) AppIsNewUerSales() {
|
|
r := func() Result {
|
|
r := func() Result {
|
|
userid := qu.ObjToString(i.GetSession("userId"))
|
|
userid := qu.ObjToString(i.GetSession("userId"))
|
|
log.Println("用户id:", userid)
|
|
log.Println("用户id:", userid)
|
|
- data := Compatible.Select(userid, `{"l_registedate":1,"app_first_login":1}`)
|
|
|
|
|
|
+ data := Compatible.Select(userid, `{"l_registedate":1,"app_first_login":1,"experience_binding":1}`)
|
|
if data == nil || len(*data) == 0 {
|
|
if data == nil || len(*data) == 0 {
|
|
return Result{Error_code: -1, Error_msg: "无用户数据", Data: nil}
|
|
return Result{Error_code: -1, Error_msg: "无用户数据", Data: nil}
|
|
}
|
|
}
|
|
if qu.Int64All((*data)["l_registedate"]) >= Sysconfig.AppNewUserTime && qu.IntAll((*data)["app_first_login"]) == 0 {
|
|
if qu.Int64All((*data)["l_registedate"]) >= Sysconfig.AppNewUserTime && qu.IntAll((*data)["app_first_login"]) == 0 {
|
|
|
|
+ expBinding := qu.IntAll((*data)["experience_binding"])
|
|
|
|
+ if expBinding == 1 { //体验绑定手机号 用户标识
|
|
|
|
+ rd := time.Unix(qu.Int64All((*data)["l_registedate"]), 10)
|
|
|
|
+ nextDay := time.Date(rd.Year(), rd.Month(), rd.Day(), 0, 0, 0, 0, time.Local).AddDate(0, 0, 1)
|
|
|
|
+ if time.Now().Sub(nextDay) > 0 { //用户注册当天 不进设置兴趣爱好页面
|
|
|
|
+ expBinding = 0
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if expBinding > 0 {
|
|
|
|
+ return Result{}
|
|
|
|
+ }
|
|
return Result{Data: map[string]interface{}{
|
|
return Result{Data: map[string]interface{}{
|
|
"list": Sysconfig.AppNewSales,
|
|
"list": Sysconfig.AppNewSales,
|
|
"intro": Sysconfig.AppNewIntro,
|
|
"intro": Sysconfig.AppNewIntro,
|
|
@@ -774,23 +785,25 @@ func (i *Info) AppNewUerSales() {
|
|
}
|
|
}
|
|
a_key, keyB := (*oJy)["a_key"].([]interface{})
|
|
a_key, keyB := (*oJy)["a_key"].([]interface{})
|
|
if (!keyB || a_key == nil || len(a_key) == 0) && len(key) > 0 {
|
|
if (!keyB || a_key == nil || len(a_key) == 0) && len(key) > 0 {
|
|
- //不存在关键词 填充
|
|
|
|
- var arryMap []map[string]interface{}
|
|
|
|
- for _, v := range key {
|
|
|
|
- arryMap = append(arryMap, map[string]interface{}{"from": 1, "appendkey": nil, "key": processKeyword(v), "notkey": nil, "updatetime": time.Now().Unix()})
|
|
|
|
- }
|
|
|
|
- (*oJy)["a_key"] = arryMap
|
|
|
|
- (*oJy)["i_apppush"] = 1
|
|
|
|
- if (*oJy)["i_ratemode"] == nil {
|
|
|
|
- (*oJy)["i_ratemode"] = 1
|
|
|
|
- }
|
|
|
|
- if (*oJy)["i_matchway"] == nil {
|
|
|
|
- (*oJy)["i_matchway"] = 1
|
|
|
|
- }
|
|
|
|
- if (*oJy)["s_item"] == nil {
|
|
|
|
- (*oJy)["s_item"] = "未分类"
|
|
|
|
|
|
+ if len(key) == 0 || qu.Int64All(sessVal["experience_binding"]) == 0 {
|
|
|
|
+ //不存在关键词 填充
|
|
|
|
+ var arryMap []map[string]interface{}
|
|
|
|
+ for _, v := range key {
|
|
|
|
+ arryMap = append(arryMap, map[string]interface{}{"from": 1, "appendkey": nil, "key": processKeyword(v), "notkey": nil, "updatetime": time.Now().Unix()})
|
|
|
|
+ }
|
|
|
|
+ (*oJy)["a_key"] = arryMap
|
|
|
|
+ (*oJy)["i_apppush"] = 1
|
|
|
|
+ if (*oJy)["i_ratemode"] == nil {
|
|
|
|
+ (*oJy)["i_ratemode"] = 1
|
|
|
|
+ }
|
|
|
|
+ if (*oJy)["i_matchway"] == nil {
|
|
|
|
+ (*oJy)["i_matchway"] = 1
|
|
|
|
+ }
|
|
|
|
+ if (*oJy)["s_item"] == nil {
|
|
|
|
+ (*oJy)["s_item"] = "未分类"
|
|
|
|
+ }
|
|
|
|
+ m["o_jy"] = (*oJy)
|
|
}
|
|
}
|
|
- m["o_jy"] = (*oJy)
|
|
|
|
}
|
|
}
|
|
if infoMapArea != "" {
|
|
if infoMapArea != "" {
|
|
areaList := processArea(areas, 1)
|
|
areaList := processArea(areas, 1)
|