fixed bug for payment api authorization

This commit is contained in:
RockYang 2024-05-24 11:31:38 +08:00
parent 717b137a6d
commit 2f9b1b7835
3 changed files with 19 additions and 9 deletions

View File

@ -9,12 +9,12 @@ package core
import ( import (
"bytes" "bytes"
"context"
"fmt"
"geekai/core/types" "geekai/core/types"
"geekai/store/model" "geekai/store/model"
"geekai/utils" "geekai/utils"
"geekai/utils/resp" "geekai/utils/resp"
"context"
"fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
@ -231,11 +231,15 @@ func needLogin(c *gin.Context) bool {
c.Request.URL.Path == "/api/product/list" || c.Request.URL.Path == "/api/product/list" ||
c.Request.URL.Path == "/api/menu/list" || c.Request.URL.Path == "/api/menu/list" ||
c.Request.URL.Path == "/api/markMap/client" || c.Request.URL.Path == "/api/markMap/client" ||
c.Request.URL.Path == "/api/payment/alipay/notify" ||
c.Request.URL.Path == "/api/payment/hupipay/notify" ||
c.Request.URL.Path == "/api/payment/payjs/notify" ||
c.Request.URL.Path == "/api/payment/doPay" ||
c.Request.URL.Path == "/api/payment/payWays" ||
strings.HasPrefix(c.Request.URL.Path, "/api/test") || strings.HasPrefix(c.Request.URL.Path, "/api/test") ||
strings.HasPrefix(c.Request.URL.Path, "/api/function/") || strings.HasPrefix(c.Request.URL.Path, "/api/function/") ||
strings.HasPrefix(c.Request.URL.Path, "/api/sms/") || strings.HasPrefix(c.Request.URL.Path, "/api/sms/") ||
strings.HasPrefix(c.Request.URL.Path, "/api/captcha/") || strings.HasPrefix(c.Request.URL.Path, "/api/captcha/") ||
strings.HasPrefix(c.Request.URL.Path, "/api/payment/") ||
strings.HasPrefix(c.Request.URL.Path, "/static/") { strings.HasPrefix(c.Request.URL.Path, "/static/") {
return false return false
} }

View File

@ -21,8 +21,8 @@
cursor pointer cursor pointer
.el-image { .el-image {
width 40px width 48px
height 40px height 48px
} }
} }
@ -86,7 +86,7 @@
.navigator { .navigator {
display flex display flex
flex-flow column flex-flow column
width 50px width 60px
padding 10px 1px padding 10px 1px
border-right: 1px solid #3c3c3c border-right: 1px solid #3c3c3c
background-color: #1E1F22 background-color: #1E1F22
@ -97,12 +97,14 @@
li { li {
margin-bottom 15px margin-bottom 15px
display flex
flex-flow column
a { a {
color #DADBDC color #DADBDC
border-radius 10px border-radius 10px
width 40px width 48px
height 40px height 48px
display flex display flex
justify-content center justify-content center
align-items center align-items center
@ -125,9 +127,12 @@
.title { .title {
font-size: 12px font-size: 12px
padding-top: 5px padding-top: 6px
color: #e5e7eb; color: #e5e7eb;
text-align: center; text-align: center;
white-space: nowrap; /* */
overflow: hidden; /* */
text-overflow: unset; /* 使 */
} }
.active { .active {

View File

@ -85,6 +85,7 @@
<el-image :src="item.icon" style="width: 30px;height: 30px"/> <el-image :src="item.icon" style="width: 30px;height: 30px"/>
</a> </a>
</el-tooltip> </el-tooltip>
<span :class="item.url === curPath ? 'title active' : 'title'">{{ item.name }}</span>
</li> </li>
<el-popover <el-popover