package handle import ( "WechatGateWay/global" "WechatGateWay/goCharts" "WechatGateWay/third_part" "WechatGateWay/utils" "net/http" ) func replyImageDraw(msgContent MsgContent, timestamp, nonce string, w http.ResponseWriter, symbol string) { //third_part.SendPicMid(msgContent.FromUsername, utils.RandMapValue(global.ImageMap)) goCharts.Draw(symbol) filename := "tmp/line-chart.png" go RecordWechatLog(msgContent.FromUsername, msgContent.ToUsername, msgContent.CreateTime, msgContent.MsgType, filename) third_part.SendPicFile(msgContent.FromUsername, filename) } func replyImage(msgContent MsgContent, timestamp, nonce string, w http.ResponseWriter) { //third_part.SendPicMid(msgContent.FromUsername, utils.RandMapValue(global.ImageMap)) filename := global.WechatImagePath + "/" + utils.RandomFile(global.WechatImagePath) go RecordWechatLog(msgContent.FromUsername, msgContent.ToUsername, msgContent.CreateTime, msgContent.MsgType, filename) third_part.SendPicFile(msgContent.FromUsername, filename) }