liuxiaolong
2020-06-29 5e6ce65b2ab0f08dc95cd7e5ecbc91597aa2b4b0
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()
}