增加getuint64/32的方法
This commit is contained in:
@@ -288,6 +288,8 @@ fac.ParseJSON(r, &req)
|
||||
|
||||
// 获取查询参数
|
||||
id := fac.GetQueryInt64(r, "id", 0)
|
||||
uid := fac.GetQueryUint64(r, "uid", 0)
|
||||
userId := fac.GetQueryUint32(r, "user_id", 0)
|
||||
keyword := fac.GetQuery(r, "keyword", "")
|
||||
|
||||
// 获取时区(需要配合middleware.Timezone使用)
|
||||
@@ -667,6 +669,14 @@ fac.Success(w, user, "获取成功") // 自定义消息
|
||||
|
||||
获取查询64位整数参数。
|
||||
|
||||
#### GetQueryUint64(r *http.Request, key string, defaultValue uint64) uint64
|
||||
|
||||
获取查询64位无符号整数参数。
|
||||
|
||||
#### GetQueryUint32(r *http.Request, key string, defaultValue uint32) uint32
|
||||
|
||||
获取查询32位无符号整数参数。
|
||||
|
||||
#### GetFormValue(r *http.Request, key, defaultValue string) string
|
||||
|
||||
获取表单值。
|
||||
|
||||
Reference in New Issue
Block a user