package controllers import ( "hongze/hongze_cygxzs/models" ) type HelloCommonController struct { BaseCommonController } // @Title 路由1 // @Description 路由1 // @Param Url query string true "url地址" // @router /hello [get] func (this *HelloCommonController) TesrR1() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() getUrl := this.GetString("Url") br.Ret = 200 br.Success = true br.Msg = "路由1" br.Data = getUrl } // @Title 路由2 // @Description 路由2 // @Param Url query string true "url地址" // @router /hello2 [get] func (this *HelloCommonController) TesrR2() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() getUrl := this.GetString("Url") br.Ret = 200 br.Success = true br.Msg = "路由2" br.Data = getUrl }