fix: fixed bug for add user in admin console page that calls and img_calls parameter not work

This commit is contained in:
RockYang 2023-09-22 18:15:32 +08:00
parent 7b4730271d
commit 48393e0e83
2 changed files with 3 additions and 2 deletions

View File

@ -105,7 +105,8 @@ func (h *UserHandler) Save(c *gin.Context) {
types.ChatGLM: "",
},
}),
Calls: h.App.SysConfig.UserInitCalls,
Calls: data.Calls,
ImgCalls: data.ImgCalls,
}
res = h.db.Create(&u)
_ = utils.CopyObject(u, &userVo)

View File

@ -74,7 +74,7 @@
<el-input v-model.number="user.calls" autocomplete="off" placeholder="0"/>
</el-form-item>
<el-form-item label="绘图次数:" prop="img_calls">
<el-input v-model.number="user['img_calls']" autocomplete="off" placeholder="0"/>
<el-input v-model.number="user.img_calls" autocomplete="off" placeholder="0"/>
</el-form-item>
<el-form-item label="有效期:" prop="expired_time">