You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
635 B
35 lines
635 B
package user
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"live/app/common"
|
|
"live/app/lib"
|
|
"live/app/lib/back"
|
|
"live/app/lib/tools"
|
|
"live/app/logic/user"
|
|
)
|
|
|
|
type Trend struct {
|
|
}
|
|
|
|
type argsTrendList struct {
|
|
UserId uint `json:"userId" form:"userId"`
|
|
lib.Page
|
|
}
|
|
|
|
// @Title 动态列表
|
|
func (t *Trend) List(c *gin.Context) {
|
|
args := argsTrendList{}
|
|
if err := tools.ParseParams(&args, c); err != nil {
|
|
back.Fail(c, err.Error())
|
|
return
|
|
}
|
|
if args.UserId <= 0 {
|
|
back.Fail(c, "参数错误")
|
|
return
|
|
}
|
|
userId := common.GetUserId(c)
|
|
back.Suc(c, "操作成功", (&user.Trend{}).GetList(userId, args.UserId, args.Page))
|
|
return
|
|
}
|