本文整理汇总了Golang中github.com/deepzz0/goblog/helper.Response.Success方法的典型用法代码示例。如果您正苦于以下问题:Golang Response.Success方法的具体用法?Golang Response.Success怎么用?Golang Response.Success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/deepzz0/goblog/helper.Response
的用法示例。
在下文中一共展示了Response.Success方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: doModifyPasswd
func (this *UserController) doModifyPasswd(resp *helper.Response) {
oldPasswd := this.GetString("old")
newPasswd := this.GetString("new")
if oldPasswd == "" || newPasswd == "" {
resp.Status = RS.RS_failed
resp.Err = helper.Error{Level: helper.WARNING, Msg: "错误|参数错误。"}
return
}
if !helper.VerifyPasswd(models.Blogger.PassWord, models.Blogger.UserName, oldPasswd, models.Blogger.Salt) {
resp.Status = RS.RS_failed
resp.Err = helper.Error{Level: helper.WARNING, Msg: "错误|原密码错误。"}
return
}
models.Blogger.ChangePassword(newPasswd)
resp.Success()
}
示例2: doModifyInfo
func (this *UserController) doModifyInfo(resp *helper.Response) {
if blogname := this.GetString("blogname"); blogname != "" {
models.Blogger.BlogName = blogname
}
if icon := this.GetString("icon"); icon != "" {
models.Blogger.HeadIcon = icon
}
if introduce := this.GetString("introduce"); introduce != "" {
models.Blogger.Introduce = introduce
}
if sex := this.GetString("sex"); sex != "" {
models.Blogger.Sex = sex
}
if email := this.GetString("email"); email != "" {
models.Blogger.Email = email
}
if address := this.GetString("address"); address != "" {
models.Blogger.Address = address
}
if education := this.GetString("education"); education != "" {
models.Blogger.Education = education
}
resp.Success()
}