//删除照片 func (this *PhotoController) Delete() { id, _ := this.GetInt64("id") albumid := this.GetString("albumid") photo := models.Photo{Id: id} if photo.Read() == nil { photo.Delete() } this.Redirect("/admin/photo/list?albumid="+albumid, 302) }