Skip to content

Commit

Permalink
图片搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
fixpng committed May 17, 2023
1 parent 3790944 commit 728484d
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/images_api/image_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (ImagesApi) ImageListView(c *gin.Context) {

list, count, err := common.ComList(models.BannerModel{}, common.Option{
PageInfo: cr,
Debug: false,
Likes: []string{"name"},
})

res.OkWithList(list, count, c)
Expand Down
1 change: 1 addition & 0 deletions api/user_api/user_update_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type UserRole struct {
func (UserApi) UserUpdateRoleView(c *gin.Context) {
var cr UserRole
if err := c.ShouldBindJSON(&cr); err != nil {
global.Log.Error(err)
res.FailWithError(err, &cr, c)
return
}
Expand Down
8 changes: 4 additions & 4 deletions models/ctype/role_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type Role int

const (
PermissionAdmin Role = 1 // 管理员
PermissionUser Role = 2 // 普通登陆人
PermissionUser Role = 2 // 用户
PermissionVisitor Role = 3 // 游客
PermissionDisableUser Role = 4 // 被禁用的用户
PermissionDisableUser Role = 4 // 黑名单
)

func (role Role) MarshalJSON() ([]byte, error) {
Expand All @@ -20,11 +20,11 @@ func (role Role) String() string {
case PermissionAdmin:
return "管理员"
case PermissionUser:
return "普通登陆人"
return "用户"
case PermissionVisitor:
return "游客"
case PermissionDisableUser:
return "被禁用的用户"
return "黑名单"
default:
return "其他"
}
Expand Down
Binary file modified uploads/file/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified uploads/file/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified uploads/file/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/file/986ae9f4ded1957de67d6c4f7027fe8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/file/timg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/file/叮当的脸.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/file/音阶.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 728484d

Please sign in to comment.