|
@@ -108,6 +108,14 @@ func MenuClickHandler(w ResponseWriter, r *Request) {
|
|
//获取点击按钮
|
|
//获取点击按钮
|
|
clickButtonKey := r.EventKey
|
|
clickButtonKey := r.EventKey
|
|
if replyText, ok := menuClickReplyTextMap[clickButtonKey]; ok {
|
|
if replyText, ok := menuClickReplyTextMap[clickButtonKey]; ok {
|
|
|
|
+
|
|
|
|
+ if clickButtonKey == "BusinessCoop" {
|
|
|
|
+ user, err := Mux.GetUserInfo(r.FromUserName)
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Println("get userInfo false...")
|
|
|
|
+ }
|
|
|
|
+ replyText = fmt.Sprintf(replyText, fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(r.FromUserName+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",chanpartner")))
|
|
|
|
+ }
|
|
w.PostText(replyText)
|
|
w.PostText(replyText)
|
|
CBKey := fmt.Sprintf("%s_%d", clickButtonKey, time.Now().Day())
|
|
CBKey := fmt.Sprintf("%s_%d", clickButtonKey, time.Now().Day())
|
|
mediaId := redis.GetStr("other", CBKey)
|
|
mediaId := redis.GetStr("other", CBKey)
|
|
@@ -253,6 +261,7 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
|
|
rsssetUrl := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",rssset"))
|
|
rsssetUrl := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",rssset"))
|
|
searchWord := strings.TrimSpace(r.Content)
|
|
searchWord := strings.TrimSpace(r.Content)
|
|
searchWordUrl := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",searchKeyword")) + "__" + url.QueryEscape(searchWord)
|
|
searchWordUrl := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",searchKeyword")) + "__" + url.QueryEscape(searchWord)
|
|
|
|
+ chanPartnerUrl := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",chanpartner"))
|
|
if len(searchWord) > 0 && len([]rune(searchWord)) > 8 {
|
|
if len(searchWord) > 0 && len([]rune(searchWord)) > 8 {
|
|
searchWord = string([]rune(searchWord)[:8]) + "..."
|
|
searchWord = string([]rune(searchWord)[:8]) + "..."
|
|
}
|
|
}
|
|
@@ -261,7 +270,7 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
|
|
var activeUrl = fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",viphomepage"))
|
|
var activeUrl = fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",viphomepage"))
|
|
w.ReplyText(fmt.Sprintf(config.ActiveConfig.AutoRpl, activeUrl, rsssetUrl, searchUrl, searchWordUrl, searchWord))
|
|
w.ReplyText(fmt.Sprintf(config.ActiveConfig.AutoRpl, activeUrl, rsssetUrl, searchUrl, searchWordUrl, searchWord))
|
|
} else {
|
|
} else {
|
|
- w.ReplyText(fmt.Sprintf(config.Sysconfig["weixinAutoRpl"].(string), rsssetUrl, searchUrl, searchWordUrl, searchWord))
|
|
|
|
|
|
+ w.ReplyText(fmt.Sprintf(config.Sysconfig["weixinAutoRpl"].(string), rsssetUrl, searchUrl, searchWordUrl, searchWord, chanPartnerUrl))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -453,7 +462,7 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
|
|
endTime := time.Unix(startTimeInt64, 0)
|
|
endTime := time.Unix(startTimeInt64, 0)
|
|
newUser["endTime"] = endTime.AddDate(1, 0, 0).Unix()
|
|
newUser["endTime"] = endTime.AddDate(1, 0, 0).Unix()
|
|
newUser["disWords"] = strings.Split(source, "_")[1] + "_" + strings.Split(source, "_")[2]
|
|
newUser["disWords"] = strings.Split(source, "_")[1] + "_" + strings.Split(source, "_")[2]
|
|
- newUser["shareType"] =strings.Split(source, "_")[3]
|
|
|
|
|
|
+ newUser["shareType"] = strings.Split(source, "_")[3]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if isJyopUser {
|
|
if isJyopUser {
|
|
@@ -1135,11 +1144,11 @@ func ScanHandler(w ResponseWriter, r *Request) {
|
|
modular := util.ObjToMap(config.DistribConfig.Modular[encry])
|
|
modular := util.ObjToMap(config.DistribConfig.Modular[encry])
|
|
if encry == "X" {
|
|
if encry == "X" {
|
|
suffix := strings.Split(r.EventKey, "_")[2]
|
|
suffix := strings.Split(r.EventKey, "_")[2]
|
|
- ek = ek + "_" + suffix+strings.Split(r.EventKey, "_")[3]
|
|
|
|
|
|
+ ek = ek + "_" + suffix + strings.Split(r.EventKey, "_")[3]
|
|
}
|
|
}
|
|
if encry == "G" {
|
|
if encry == "G" {
|
|
suffix := strings.Split(r.EventKey, "_")[2]
|
|
suffix := strings.Split(r.EventKey, "_")[2]
|
|
- ek = ek + "_GX"+suffix+strings.Split(r.EventKey, "_")[3]
|
|
|
|
|
|
+ ek = ek + "_GX" + suffix + strings.Split(r.EventKey, "_")[3]
|
|
}
|
|
}
|
|
fmt.Println(ek)
|
|
fmt.Println(ek)
|
|
if modular != nil {
|
|
if modular != nil {
|