func (c *AdminUpCommodityInfoController) Get() { id := c.Input().Get("id") // beego.Debug("AdminUpCommodityInfoController id:", id) obj, err := models.GetOneCommodity(id) if err != nil { beego.Error(err) } // beego.Debug("AdminUpCommodityInfoController Commodity:", obj) c.Data["Commodity"] = obj c.TplName = "adminupcommodityinfo.html" }
func (c *AdminUpCommodityImgController) Get() { id := c.Input().Get("id") if len(id) == 0 { c.Redirect("/admin/guanggaos", 302) return } // beego.Debug(id) obj, err := models.GetOneCommodity(id) if err != nil { beego.Error(err) } c.Data["Commodity"] = obj c.TplName = "adminupcommodityimg.html" }