浏览代码

错误页面提示

wangshan 9 年之前
父节点
当前提交
130d2e2227
共有 3 个文件被更改,包括 52 次插入6 次删除
  1. 1 1
      common/src/github.com/go-xweb/xweb/app.go
  2. 1 1
      core/src/timetask.json
  3. 50 4
      core/src/web/templates/_error.html

+ 1 - 1
common/src/github.com/go-xweb/xweb/app.go

@@ -605,7 +605,7 @@ func (a *App) run(req *http.Request, w http.ResponseWriter, route Route, args []
 }
 
 func (a *App) error(w http.ResponseWriter, status int, content string) error {
-	w.WriteHeader(200)
+	w.WriteHeader(status)
 	if errorTmpl == "" {
 		errTmplFile := a.AppConfig.TemplateDir + "/_error.html"
 		if file, err := os.Stat(errTmplFile); err == nil && !file.IsDir() {

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-25 18:48:11"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-25 18:48:11"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-04-19 15:53:47"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-04-19 15:53:47"}},"marketisstart":true,"marketrate":300}

文件差异内容过多而无法显示
+ 50 - 4
core/src/web/templates/_error.html


部分文件因为文件数量过多而无法显示