|
@@ -26,12 +26,13 @@ func FormatUserId(useridArr []string) (userids string) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//站内信推送
|
|
|
-func StationMailPush(userId, positionId, title, content, pcHref, mobileHref string) bool {
|
|
|
+//站内信推送 msgType 11待办 2服务通知
|
|
|
+func StationMailPush(userId, positionId, title, content, pcHref, mobileHref string, msgType string) bool {
|
|
|
pcLandingPage := "/front/sess/" + Se.EncodeString(positionId+",positionId,"+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(pcHref)
|
|
|
- wxAppLandingPage := "/front/sess/" + Se.EncodeString(positionId+",positionId,"+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(mobileHref)
|
|
|
- href := fmt.Sprintf("%s?_action=%s&userIds=%s&msgType=11&title=%s&content=%s&link=%s&sendMode=2&sendTime=%s&androidUrl=%s&iosUrl=%s&weChatUrl=%s&_token=12311&reqSource=1&callPlatform=crm&menuname=message&positionIds=%s",
|
|
|
- cm.Push.StationMailHref, cm.Push.StationMailAction, userId, title, content, pcLandingPage, date.NowFormat(date.Date_Short_Layout), wxAppLandingPage, wxAppLandingPage, wxAppLandingPage, positionId)
|
|
|
+ wxLandingPage := "/front/sess/" + Se.EncodeString(positionId+",positionId,"+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(mobileHref)
|
|
|
+ appLandingPage := "/jyapp/free/sess/" + Se.EncodeString(positionId+",positionId,"+strconv.Itoa(int(time.Now().Unix()))+",") + "__" + Se.EncodeString(mobileHref)
|
|
|
+ href := fmt.Sprintf("%s?_action=%s&userIds=%s&msgType=%s&title=%s&content=%s&link=%s&sendMode=2&sendTime=%s&androidUrl=%s&iosUrl=%s&weChatUrl=%s&_token=12311&reqSource=1&callPlatform=crm&menuname=message&positionIds=%s",
|
|
|
+ cm.Push.StationMailHref, cm.Push.StationMailAction, userId, msgType, title, content, pcLandingPage, date.NowFormat(date.Date_Short_Layout), appLandingPage, appLandingPage, wxLandingPage, positionId)
|
|
|
log.Println(href)
|
|
|
resp := Get(href, nil)
|
|
|
log.Println("resp:", resp)
|