controllers/user.go
@@ -148,3 +148,22 @@ u.ServeJSON() } // @router /delPlateNo [delete] func (u *UserController) DelPlateNo() { userId := u.GetString("userId") plateNo := u.GetString("plateNo") resp := code.Code{} var uc models.UserCar if i,e := uc.Delete(userId, plateNo);e ==nil && i >0 { resp.Success = true resp.Status = http.StatusOK resp.Data = "删除成功" } else { resp.Success = false resp.Status = http.StatusInternalServerError resp.Data = "删除失败" } u.Data["json"] = resp u.ServeJSON() }