Skip to content

FoodShop 接口文档

zoroer edited this page Mar 12, 2024 · 3 revisions

一、Note:所有业务接口按照模块拆分维护:

管理后台模块:

  • admin

用户端模块:

  • h5/user
  • h5/sale
  • h5/order
  • h5/pay

二、所有接口列表:

通用common接口

获取用户和菜单信息:/auth/getCommonInfo

admin的接口以 "admin/" 开头

登录页
登录:/admin/noauth/login
登出:/admin/noauth/logout
菜单管理
菜单列表:/admin/auth/getMenuList
菜单详情:/admin/auth/detail
添加菜单:/admin/auth/addMenu
修改菜单:/admin/auth/updateMenu
删除菜单:/admin/auth/deleteMenu
角色管理
角色列表:/admin/noauth/getRoleList
商铺管理
定位当前:/admin/noauth/getCityInfo
查找周围位置:/admin/noauth/place/search
商铺的分类:/noauth/shop/category
商铺列表:/auth/shop/list
商铺删除:/auth/shop/delete
商铺添加:/auth/shop/add
商铺更新:/auth/shop/update
商铺详情:/auth/shop/detail
商品种类管理
商品种类列表:/auth/foodCategory/list (参数:pageNum、pageSize、name-种类名称关键字、shop_id-关联商铺id-必填)
商品种类删除:/auth/foodCategory/delete (参数:id-种类id)
商品管理
商品列表:/auth/food/list (参数:pageNum、pageSize、name-商品名称关键字、shop_id-关联商铺id、food_category_id-关联商品种类id)
商品详情:/auth/food/detail (参数:id-商品id)
商品添加:/auth/food/add (参数:表单数据,包括 food_category_name-新建的商品种类名称、food_category_desc-新建的商品种类描述)
商品更新:/auth/food/update (参数:表单数据、id-商品id、food_category_id_old-修改前商品关联的商品种类id)
商品删除:/auth/food/delete (参数:id-商品id)

用户端的接口分为3类:

  • sale/
  • user/
  • order/

h5用户相关的接口以 "user/" 开头

用户地址相关
地址列表:/user/auth/address/list
地址详情:/user/auth/address/detail (参数:address_id(number))
新增地址:/user/auth/address/add    (参数:
address-定位地址名称(string),
title-定位建筑名称(string),
pos-定位经纬度(例如:"39.9219, 116.44355")(string),
room-门牌号(string),
receive-收货人(string),
gender-性别(number),
phone-电话(string),
tag-地址标识(string),
)
更新地址:/user/auth/address/update  (参数:
address_id-地址唯一id(number),
address-定位地址名称(string),
title-定位建筑名称(string),
pos-定位经纬度(例如:"39.9219, 116.44355")(string),
room-门牌号(string),
receive-收货人(string),
gender-性别(number),
phone-电话(string),
tag-地址标识(string),
)
删除地址:/user/auth/address/delete  (参数:address_id(number))
根据传入定位返回离定位最近的一个地址:/user/auth/address/getNearAddress  (参数:now_pos-现在定位的经纬度(例如:"39.9219, 116.44355")(string))

h5订单相关的接口以 "order/" 开头

创建订单:/auth/order/create
查看订单详情:/auth/order/detail
查看订单列表:/auth/order/list
取消订单:/auth/order/cancel

h5评论相关的接口以 "commit/" 开头

提交评论:/auth/comment/submit
查看评论(店铺维度):/noauth/comment/getByShopId