Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonAction ¶
func CommonAction(r *http.Request, w http.ResponseWriter)
CommonAction 通用请求处理逻辑 记录请求日志,用于统计和分析
func RedirectPage ¶
func RedirectPage(w http.ResponseWriter, title, message, toUrl string, httpCode, waitSecond int)
RedirectPage 显示跳转页面 title: 页面标题,message: 提示消息,toUrl: 跳转地址,httpCode: HTTP状态码,waitSecond: 等待秒数
func SendResult ¶
func SendResult(w http.ResponseWriter, status int, message string, data interface{}) (err error)
SendResult 发送JSON格式的响应结果 status: 状态码,message: 消息,data: 数据
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.