logo和配置修改
This commit is contained in:
+3
-14
@@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
"videoweb/app/service/authser"
|
||||
"videoweb/app/service/feedbackser"
|
||||
"videoweb/pub/common/log"
|
||||
"videoweb/pub/common/useragent"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -28,15 +28,7 @@ type contactUsBody struct {
|
||||
|
||||
// AddFeedback 代理上游 POST /api/app/feedback/add。
|
||||
func AddFeedback(c *gin.Context) {
|
||||
if useragent.TokenFromRequest(c.Request) == "" {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 401,
|
||||
"msg": "unauthorized",
|
||||
"tip": "请先登录后再提交反馈",
|
||||
"data": nil,
|
||||
})
|
||||
return
|
||||
}
|
||||
authser.EnsureGuestOnEnter(c)
|
||||
|
||||
var body feedbackBody
|
||||
if err := c.ShouldBindJSON(&body); err != nil {
|
||||
@@ -158,10 +150,7 @@ func AddFeedback(c *gin.Context) {
|
||||
|
||||
// AddContactUs 代理上游 POST /api/app/contactus/add。
|
||||
func AddContactUs(c *gin.Context) {
|
||||
if useragent.TokenFromRequest(c.Request) == "" {
|
||||
c.JSON(http.StatusOK, gin.H{"code": 401, "msg": "unauthorized", "tip": "请先登录后再提交", "data": nil})
|
||||
return
|
||||
}
|
||||
authser.EnsureGuestOnEnter(c)
|
||||
var body contactUsBody
|
||||
if err := c.ShouldBindJSON(&body); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"code": 1001, "msg": "参数错误", "tip": "参数错误", "data": nil})
|
||||
|
||||
Reference in New Issue
Block a user