修复参数问题

This commit is contained in:
zhiyang7 2021-08-30 11:24:46 +08:00
parent f9b71fa733
commit 808cc276e8
1 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import (
"net/http"
"os"
"reflect"
"strings"
"time"
"github.com/go-redis/redis/v8"
@ -250,7 +251,11 @@ func main() {
req.ParseForm()
msgContent := req.Form.Get("msg")
if len(msgContent) == 0 {
msgContent = req.Form.Get("title") + "\n" + req.Form.Get("desc")
title := req.Form.Get("title")
text := req.Form.Get("text")
desp := req.Form.Get("desp")
msgContent = strings.Join([]string{title, text, desp}, "\n")
log.Println("msgContent=", msgContent)
}
msgType := req.Form.Get("msg_type")
if len(msgType) == 0 {