logo资料库

接口文档模板.docx

第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
资料共4页,全文预览结束
商城系统接口文档 参数举例 Shamotest 123456 参数含义 用户名 密码 1. 前台登录接口 请求地址 请求方式 参数类型 Headers 参数 响应示例 2. 提交订单 请求地址 请求方式 参数类型 Headers 参数 /mtx/index.php?s=/index/user/login.html POST 表单 X-Requested-With: XMLHttpRequest 参数名称 参数类型 是否必填 accounts pwd { String String Y Y "msg": "登录成功", "code": 0, "data": { "body_html": "" } } /mtx/index.php?s=/index/buy/add.html POST 表单 X-Requested-With: XMLHttpRequest 参数名称 goods_id stock buy_type 参数类型 必填 参数举例 int int String 1 15 goods Y Y Y 参数含义 商品 id 购买数量 购买类型下单是 固定的 goods 地址 id 付款 id 产品规格,可以 传[] 留言 address_id payment_id spec user_note { 响应示例 int int String String Y Y N N 2 1 [{"type":" 尺 码 ","value":"M"}] 这是留言 "msg": "提交成功", "code": 0, "data": { "order": { "id": "22", "order_no": "20200415151928114424", "user_id": "1", "user_note": "", "express_id": "0", "express_number": "",
"payment_id": "2", "status": "1", "pay_status": "0", "extension_data": "", "buy_number_count": "1", "increase_price": "0.00", "preferential_price": "0.00", "price": "356.00", "total_price": "356.00", "pay_price": "0.00", "refund_price": "0.00", "returned_quantity": "0", "client_type": "pc", "order_model": "0", "pay_time": "0", "confirm_time": "1586935168", "delivery_time": "0", "cancel_time": "0", "collect_time": "0", "close_time": "0", "comments_time": "0", "is_comments": "0", "user_is_comments": "0", "is_delete_time": "0", "user_is_delete_time": "0", "add_time": "1586935168", "upd_time": "0" }, "jump_url": "http://localhost/mtx/index.php?s=/index/order/pay/id/22.html" } } 3. 后台登录 请求地址 请求方式 参数类型 Headers 参数 响应示例 /mtx/admin.php?s=/admin/login.html POST 表单 X-Requested-With: XMLHttpRequest 参数名称 username login_pwd { Y Y 参数类型 必填 参数举例 String String shamo 123456 "msg": "登录成功", "code": 0, 参数含义 用户名 密码
"data": "" } 4. 发货 请求地址 请求方式 参数类型 /mtx/admin.php?s=/order/delivery.html POST 表单 参数 参数名称 express_number id express_id user_id 参数类型 必填 参数举例 K73487736 String int 12323 1 int int 10023 Y Y Y Y 参数含义 快递单号 订单 id 快递 id 管理员用户 id 响应示例 { "msg": "发货成功", "code": 0, "data": "" } /mtx/index.php?s=/index/order/collect.html POST 表单 X-Requested-With: XMLHttpRequest 参数名称 参数类型 必填 参数举例 int String String Y N N 25 "msg": "收货成功", "code": 0, "data": "" 5. 前台收货 请求地址 请求方式 参数类型 Headers 参数 响应示例 6. 评论 请求地址 请求方式 参数类型 Headers 参数 id value field { } rating[] content[] goods_id[] id 响应示例 { /mtx/index.php?s=/index/order/commentssave.html POST 表单 X-Requested-With: XMLHttpRequest 参数名称 参数类型 必填 参数举例 int String 5 评论内容 Y Y int int N Y 1 1 参数含义 订单 id 参数含义 好评等级 1-5 评 论 内 容 6-230 字 商品 id 订单 id
"msg": "评论成功", "code": 0, "data": "" }
分享到:
收藏