|
@@ -272,6 +272,24 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
br.ErrMsg = "获取失败,Err:" + errList.Error()
|
|
|
return
|
|
|
}
|
|
|
+ var isShow bool
|
|
|
+ isShow = services.GetShowSustainable()
|
|
|
+ detail, err := models.GetConfigByCode("city_img_url")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败"
|
|
|
+ br.ErrMsg = "城市配置信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addressList := strings.Split(detail.ConfigValue, "{|}")
|
|
|
+ mapAddress := make(map[string]string)
|
|
|
+ var cityName string
|
|
|
+ var imgUrl string
|
|
|
+ for _, v := range addressList {
|
|
|
+ vslice := strings.Split(v, "_")
|
|
|
+ cityName = vslice[0]
|
|
|
+ imgUrl = vslice[len(vslice)-1]
|
|
|
+ mapAddress[cityName] = imgUrl
|
|
|
+ }
|
|
|
for k, v := range list {
|
|
|
if strings.Contains(v.ActivityName, "【") {
|
|
|
list[k].IsBrackets = 1
|
|
@@ -279,13 +297,19 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
if v.SignupNum > v.LimitPeopleNum {
|
|
|
list[k].SignupNum = v.LimitPeopleNum
|
|
|
}
|
|
|
- if services.GetShowSustainable() && v.ChartPermissionName == "研选" {
|
|
|
+ if isShow && v.ChartPermissionName == "研选" {
|
|
|
list[k].IsShowSustainable = true
|
|
|
}
|
|
|
if v.ChartPermissionName == "研选" && v.ActivityTypeId == 1 {
|
|
|
list[k].ActivityTypeName = "研选电话会"
|
|
|
}
|
|
|
- list[k].ImgUrl = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202111/20211104/QbTGTNhD9MxYp24cJ7V5WpCN0oNl.png"
|
|
|
+ if v.ActivityType == 0 {
|
|
|
+ if mapAddress[v.City] != "" {
|
|
|
+ list[k].ImgUrl = mapAddress[v.City]
|
|
|
+ } else {
|
|
|
+ list[k].ImgUrl = mapAddress["其它"]
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
resp := new(models.GetCygxActivityListRep)
|
|
@@ -357,7 +381,6 @@ func (this *ActivityCoAntroller) ScheduleList() {
|
|
|
br.ErrMsg = "获取失败,Err:" + errList.Error()
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("22222")
|
|
|
} else if totalCount > currentIndex-1*pageSize && totalCount < currentIndex*pageSize { //部分是进行中的活动
|
|
|
condition = ` AND art.publish_status = 1 AND art.active_state IN(2) `
|
|
|
listHave, errList := models.GetScheduleList(condition, pars, uid, startSize, pageSize)
|
|
@@ -367,7 +390,6 @@ func (this *ActivityCoAntroller) ScheduleList() {
|
|
|
br.ErrMsg = "获取失败,Err:" + errList.Error()
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("33333")
|
|
|
pageSize = pageSize - len(listHave)
|
|
|
condition = ` AND art.publish_status = 1 AND art.active_state IN(1,3) `
|
|
|
listOther, errList := models.GetScheduleList(condition, pars, uid, startSize, pageSize)
|
|
@@ -392,6 +414,24 @@ func (this *ActivityCoAntroller) ScheduleList() {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ var isShow bool
|
|
|
+ isShow = services.GetShowSustainable()
|
|
|
+ detail, err := models.GetConfigByCode("city_img_url")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败"
|
|
|
+ br.ErrMsg = "城市配置信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addressList := strings.Split(detail.ConfigValue, "{|}")
|
|
|
+ mapAddress := make(map[string]string)
|
|
|
+ var cityName string
|
|
|
+ var imgUrl string
|
|
|
+ for _, v := range addressList {
|
|
|
+ vslice := strings.Split(v, "_")
|
|
|
+ cityName = vslice[0]
|
|
|
+ imgUrl = vslice[len(vslice)-1]
|
|
|
+ mapAddress[cityName] = imgUrl
|
|
|
+ }
|
|
|
for k, v := range list {
|
|
|
if strings.Contains(v.ActivityName, "【") {
|
|
|
list[k].IsBrackets = 1
|
|
@@ -400,13 +440,19 @@ func (this *ActivityCoAntroller) ScheduleList() {
|
|
|
list[k].SignupNum = v.LimitPeopleNum
|
|
|
}
|
|
|
//是否展示限免标签
|
|
|
- if services.GetShowSustainable() && v.ChartPermissionName == "研选" {
|
|
|
+ if isShow && v.ChartPermissionName == "研选" {
|
|
|
list[k].IsShowSustainable = true
|
|
|
}
|
|
|
if v.ChartPermissionName == "研选" && v.ActivityTypeId == 1 {
|
|
|
list[k].ActivityTypeName = "研选电话会"
|
|
|
}
|
|
|
- list[k].ImgUrl = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202111/20211104/QbTGTNhD9MxYp24cJ7V5WpCN0oNl.png"
|
|
|
+ if v.ActivityType == 0 {
|
|
|
+ if mapAddress[v.City] != "" {
|
|
|
+ list[k].ImgUrl = mapAddress[v.City]
|
|
|
+ } else {
|
|
|
+ list[k].ImgUrl = mapAddress["其它"]
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//添加我的日程访问记录
|
|
|
item := new(models.CygxPageHistoryRecord)
|
|
@@ -2260,6 +2306,25 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
br.ErrMsg = "获取失败,Err:" + errList.Error()
|
|
|
return
|
|
|
}
|
|
|
+ var isShow bool
|
|
|
+ isShow = services.GetShowSustainable()
|
|
|
+ detail, err := models.GetConfigByCode("city_img_url")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败"
|
|
|
+ br.ErrMsg = "城市配置信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addressList := strings.Split(detail.ConfigValue, "{|}")
|
|
|
+ mapAddress := make(map[string]string)
|
|
|
+ var cityName string
|
|
|
+ var imgUrl string
|
|
|
+ for _, v := range addressList {
|
|
|
+ vslice := strings.Split(v, "_")
|
|
|
+ cityName = vslice[0]
|
|
|
+ imgUrl = vslice[len(vslice)-1]
|
|
|
+ mapAddress[cityName] = imgUrl
|
|
|
+ }
|
|
|
+
|
|
|
for k, v := range list {
|
|
|
if strings.Contains(v.ActivityName, "【") {
|
|
|
list[k].IsBrackets = 1
|
|
@@ -2267,13 +2332,20 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
if v.SignupNum > v.LimitPeopleNum {
|
|
|
list[k].SignupNum = v.LimitPeopleNum
|
|
|
}
|
|
|
- if services.GetShowSustainable() && v.ChartPermissionName == "研选" {
|
|
|
+ if isShow && v.ChartPermissionName == "研选" {
|
|
|
list[k].IsShowSustainable = true
|
|
|
}
|
|
|
if v.ChartPermissionName == "研选" && v.ActivityTypeId == 1 {
|
|
|
list[k].ActivityTypeName = "研选电话会"
|
|
|
}
|
|
|
- list[k].ImgUrl = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202111/20211104/QbTGTNhD9MxYp24cJ7V5WpCN0oNl.png"
|
|
|
+ if v.ActivityType == 0 {
|
|
|
+ if mapAddress[v.City] != "" {
|
|
|
+ list[k].ImgUrl = mapAddress[v.City]
|
|
|
+ } else {
|
|
|
+ list[k].ImgUrl = mapAddress["其它"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //list[k].ImgUrl = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202111/20211104/QbTGTNhD9MxYp24cJ7V5WpCN0oNl.png"
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
resp := new(models.GetCygxActivityListRep)
|