|
|
@@ -0,0 +1,34 @@ |
|
|
|
package hdl |
|
|
|
|
|
|
|
import ( |
|
|
|
"applet/app/utils" |
|
|
|
"fmt" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
"net/http" |
|
|
|
) |
|
|
|
|
|
|
|
type ReqWxMessage struct { |
|
|
|
AppId string `json:"AppId"` |
|
|
|
FromUserName string `json:"CreateTime"` |
|
|
|
InfoType string `json:"InfoType"` |
|
|
|
ComponentVerifyTicket string `json:"ComponentVerifyTicket"` // text | image | voice | shortvideo | location |
|
|
|
} |
|
|
|
|
|
|
|
func SetTicket(c *gin.Context) { |
|
|
|
params := c.QueryMap("*") |
|
|
|
utils.FilePutContents("SetTicket_Get", utils.SerializeStr(params)) |
|
|
|
|
|
|
|
var wxMsg ReqWxMessage |
|
|
|
err := c.BindXML(&wxMsg) |
|
|
|
if err != nil { |
|
|
|
fmt.Println("setTicket>>>>>>>>", err.Error()) |
|
|
|
} |
|
|
|
utils.FilePutContents("SetTicket_XML", utils.SerializeStr(wxMsg)) |
|
|
|
c.String(http.StatusOK, "success") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
func WechatMsgRecieve(c *gin.Context) { |
|
|
|
|
|
|
|
return |
|
|
|
} |