作者 yangfu
... ... @@ -2,11 +2,10 @@
### 测试环境
服务端域名 http://sumifcc-discuss-test.sumifcc.com/
日志地址 https://sumifcc-discuss-test.sumifcc.com/v1/log/access
管理后台“易数家“前端入口:https://digital-front-platform-dev.fjmaimaimai.com/
跳转后的实际管理后台地址:
服务端域名 http://sumifcc-discuss-test.sumifcc.com/
日志地址 https://sumifcc-discuss-test.sumifcc.com/v1/log/access
管理后台“易数家“前端入口:https://digital-front-platform-dev.fjmaimaimai.com/
跳转后的实际管理后台地址:
### 可设置环境变量
- DataSource
... ...
... ... @@ -3,13 +3,14 @@ package main
import (
"context"
"flag"
"net/http"
"strings"
"github.com/zeromicro/go-zero/rest/httpx"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr"
"net/http"
"strings"
"github.com/golang-jwt/jwt/v4/request"
"github.com/zeromicro/go-zero/core/conf"
... ... @@ -65,7 +66,8 @@ func systemSetup(c config.Config) {
// 默认的token头 Authorization 修改为 x-mmm-accesstoken
request.AuthorizationHeaderExtractor = &request.PostExtractionFilter{
request.HeaderExtractor{"x-mmm-accesstoken"}, func(tok string) (string, error) {
Extractor: request.HeaderExtractor{"x-mmm-accesstoken"},
Filter: func(tok string) (string, error) {
// Should be a bearer token
if len(tok) > 6 && strings.ToUpper(tok[0:7]) == "BEARER " {
return tok[7:], nil
... ...
... ... @@ -130,7 +130,7 @@ type (
type (
MiniSetUserLikeRequset {
ArticleId int64 `json:"articleId"` //文章id
CommentId int64 `json:"commentId"` //评论id
CommentId int64 `json:"commentId,optional"` //评论id
UserId int64 `json:",optional"` //操作人
Flag int `json:"flag"` //点赞标志 1、点赞 2 、取消点赞
}
... ...
... ... @@ -870,7 +870,7 @@ type WhichUserLikeArticle struct {
type MiniSetUserLikeRequset struct {
ArticleId int64 `json:"articleId"` //文章id
CommentId int64 `json:"commentId"` //评论id
CommentId int64 `json:"commentId,optional"` //评论id
UserId int64 `json:",optional"` //操作人
Flag int `json:"flag"` //点赞标志 1、点赞 2 、取消点赞
}
... ...