fix GeneralUserToken

This commit is contained in:
2025-06-18 17:58:40 +08:00
parent f2921c91a1
commit 184d61a5c7
3 changed files with 8 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
package middleware
import (
"fmt"
"net/http"
"qnc-server/app/main/model"
"qnc-server/common/ctxdata"
@@ -25,7 +24,6 @@ func (m *UserAuthInterceptorMiddleware) Handle(next http.HandlerFunc) http.Handl
httpx.Error(w, errors.Wrapf(xerr.NewErrCode(ErrCodeUnauthorized), "token解析失败: %v", err))
return
}
fmt.Println(claims)
if claims.UserType == model.UserTypeTemp {
httpx.Error(w, errors.Wrapf(xerr.NewErrCode(xerr.USER_NEED_BIND_MOBILE), "token解析失败: %v", err))
return