增加上传接口

This commit is contained in:
hoteas 2021-07-05 02:20:10 +08:00
parent 05c8159601
commit 4ad401bafc
3 changed files with 7 additions and 2 deletions

View File

@ -412,6 +412,9 @@ func (that *Application) crossDomain(context *Context) {
if context.Config.GetString("crossDomain") != "auto" {
header.Set("Access-Control-Allow-Origin", that.Config.GetString("crossDomain"))
// 后端设置2592000单位秒这里是30天
header.Set("Access-Control-Max-Age", "2592000")
return
}

View File

@ -69,6 +69,7 @@ var ColumnNameType = []ColumnShow{
{"index", false, false, false, false, "", false},
{"password", false, true, false, false, "password", false},
{"pwd", false, true, false, false, "password", false},
{"info", false, true, true, false, "", false},
{"version", false, false, false, false, "", false},
{"seq", false, true, true, false, "", false},

View File

@ -1013,8 +1013,9 @@ func (that *HoTimeDB) Insert(table string, data map[string]interface{}) int64 {
id := int64(0)
if err.GetError() == nil && res != nil {
//id, that.LastErr.err = res.LastInsertId()
id1, err := res.LastInsertId()
that.LastErr.SetError(err)
id = id1
}
//如果插入成功,删除缓存