|
@@ -52,10 +52,10 @@ func (s *Activity) Mini(args string) {
|
|
}
|
|
}
|
|
// 获取用户id
|
|
// 获取用户id
|
|
userId, positionID := jyutil.GetActivateUser(id)
|
|
userId, positionID := jyutil.GetActivateUser(id)
|
|
- if len(config.Active.ActivateInfo.To[stepIndex].Path.Sub) > 0 { // 有配置跳转地址的 走这块
|
|
|
|
- // 判断用户关注未关注
|
|
|
|
- s.T["appid"] = config.Active.ActivateInfo.AppID
|
|
|
|
- s.T["env_version"] = config.Active.ActivateInfo.EnvVersion
|
|
|
|
|
|
+ // 判断用户关注未关注
|
|
|
|
+ s.T["appid"] = config.Active.ActivateInfo.AppID
|
|
|
|
+ s.T["env_version"] = config.Active.ActivateInfo.EnvVersion
|
|
|
|
+ if config.Active.ActivateInfo.To[stepIndex].Path.Default == "" {
|
|
if jyutil.IsSubscribe(userId) {
|
|
if jyutil.IsSubscribe(userId) {
|
|
s.T["path"] = config.Active.ActivateInfo.To[stepIndex].Path.Sub
|
|
s.T["path"] = config.Active.ActivateInfo.To[stepIndex].Path.Sub
|
|
s.T["query"] = fmt.Sprintf(config.Active.ActivateInfo.To[stepIndex].Query.Sub, encryId)
|
|
s.T["query"] = fmt.Sprintf(config.Active.ActivateInfo.To[stepIndex].Query.Sub, encryId)
|
|
@@ -63,15 +63,16 @@ func (s *Activity) Mini(args string) {
|
|
s.T["path"] = config.Active.ActivateInfo.To[stepIndex].Path.Unsub
|
|
s.T["path"] = config.Active.ActivateInfo.To[stepIndex].Path.Unsub
|
|
s.T["query"] = fmt.Sprintf(config.Active.ActivateInfo.To[stepIndex].Query.Unsub, encryId)
|
|
s.T["query"] = fmt.Sprintf(config.Active.ActivateInfo.To[stepIndex].Query.Unsub, encryId)
|
|
}
|
|
}
|
|
- s.Render(config.Active.ActivateInfo.To[stepIndex].Url, &s.T)
|
|
|
|
- return
|
|
|
|
} else {
|
|
} else {
|
|
if isFirst {
|
|
if isFirst {
|
|
// 没有点过则送7天会员
|
|
// 没有点过则送7天会员
|
|
jyutil.GiveVip(userId, positionID, s.Request.UserAgent())
|
|
jyutil.GiveVip(userId, positionID, s.Request.UserAgent())
|
|
}
|
|
}
|
|
- s.Redirect(config.Active.ActivateInfo.To[stepIndex].Url) // 活动的重定向到
|
|
|
|
|
|
+ s.T["path"] = config.Active.ActivateInfo.To[stepIndex].Path.Default
|
|
|
|
+ s.T["query"] = config.Active.ActivateInfo.To[stepIndex].Query.Default
|
|
}
|
|
}
|
|
|
|
+ s.Render(config.Active.ActivateInfo.Url, &s.T)
|
|
|
|
+ return
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|