baseUrl = https://aceword.yicp.fun
一、小程序端
一、用户
1. 获取验证码
GET /verification-code?phonenum=17685837371
2. 登陆
GET /login?phonenum=17685837371&verifyCode=1234
=> token
3. 获取个人信息
GET /user/profile
=> { company : "轻效科技", name : "黄鹏宇", }
4. 修改个人信息
POST /user/profile
DATA: { company : "", name : "", }
二、商品
1. 查看商品列表
GET /goods-list?current=1&pageSize=10
=> { "total":308,"list":[] }
2. 【todo】 筛选,搜索商品
3. 下载excel表
GET /goods/excel
三、订单
1. 添加商品到购物车
POST /cart-goods
2. 获取购物车
GET /cart-goods-list
=>
{
"id" : 1,
"purchaseQuantity": 100.0,
"goodsID": "1",
"goods": {
"material": "20MnCr5H",
"specification": "28",
"origin": "中天",
"price": "5850",
"quantity": "13.784",
"length": null,
"wxhdk": null,
"changnei": null,
"warehouse": "胡埭外库",
"note": null,
"status": "normal",
"sheet": "20MnCr5 ",
"version": "1681454974245",
"id": "1",
"empty": false
}
}
3. 删除购物车 DELETE /cart-goods/{id}
4. 下单 POST /order
=> 返回orderID
把购物车全部生成订单,但这里需要检查够不够库存,暂时不考虑并发
5. 查看订单列表 GET /order-list
6. 取消订单 POST /order/cancel/{id}
7. 获取上传凭证的key
GET/credentials
8. 上传支付凭证
POST /order/image
{
"imageUrl":"",
"orderID":1
}
这里不光要把图片上传到cos,还需要将url,传到服务端
9. 删除订单
DELETE /order/