本文整理汇总了Golang中github.com/blackmady/NoneCMS/app/models.Article.Istop方法的典型用法代码示例。如果您正苦于以下问题:Golang Article.Istop方法的具体用法?Golang Article.Istop怎么用?Golang Article.Istop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/blackmady/NoneCMS/app/models.Article
的用法示例。
在下文中一共展示了Article.Istop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Edit
//.........这里部分代码省略.........
description = utils.Html2str(content)
article.Description = utils.Substr(description, Introcude_length)
} else {
article.Description = ""
}
}
var relation string = c.Params.Get("relation")
if len(relation) > 0 {
article.Relation = relation
} else {
article.Relation = ""
}
var pagetype string = c.Params.Get("pagetype")
if len(pagetype) > 0 {
Pagetype, err := strconv.ParseInt(pagetype, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
article.Pagetype = Pagetype
} else {
article.Pagetype = 0
}
var maxcharperpage string = c.Params.Get("maxcharperpage")
if len(maxcharperpage) > 0 {
Maxcharperpage, err := strconv.ParseInt(maxcharperpage, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
article.Maxcharperpage = Maxcharperpage
} else {
article.Maxcharperpage = 10000
}
var istop string = c.Params.Get("istop")
if len(istop) > 0 {
Istop, err := strconv.ParseInt(istop, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
article.Istop = Istop
} else {
article.Istop = 0
}
var status string = c.Params.Get("status")
if len(status) > 0 {
Status, err := strconv.ParseInt(status, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
article.Status = Status
} else {
article.Status = 1
}
var iscomment string = c.Params.Get("iscomment")
if len(iscomment) > 0 {
Iscomment, err := strconv.ParseInt(iscomment, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
article.Iscomment = Iscomment
} else {
article.Status = 1
}
if article.Edit(Id) {
if len(dosubmit) > 0 {
c.Flash.Success("编辑内容成功!")
c.Flash.Out["url"] = "/Content/list/" + cid + "/"
return c.Redirect("/Message/")
} else if len(dosubmit_continue) > 0 {
c.Flash.Success("编辑内容成功!")
c.Flash.Out["url"] = "/Content/add/" + cid + "/"
return c.Redirect("/Message/")
} else {
c.Flash.Success("编辑内容成功!")
c.Flash.Out["url"] = "/Content/list/" + cid + "/"
return c.Redirect("/Message/")
}
} else {
c.Flash.Error("编辑内容失败")
c.Flash.Out["url"] = "/Content/edit/" + cid + "/" + id + "/"
return c.Redirect("/Message/")
}
}
}