>獲取登錄用戶的購物車數據
~~~[api]
get:/index.php/order/Apiorder/member_order_cart
<<<
success
{
"err": 0,
"count": 1,
"data": [
{
"id": 1,
"goods": {
"id": 10,
"title": "產品標題",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
},
"price": 10,
"goods_num": 10,
"property":"顏色:紅色,尺碼:XL",
"air": 1,
"other": ""
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 描述 |
| --- | --- |
| count| 當前記錄數 |
| data| 購物車列表 |
| |----id | 購物車id |
| |----price| 價格 |
| |----goods_num| 產品數量 |
| |----property| 規格屬性 |
| |----goods_type| 產品類型 0:實物 1:虛擬 |
| |----goods| 產品信息 |
| |----|----id| 產品id|
| |----|----title| 產品標題 |
| |----|----thumb| 產品縮略圖 |
>獲取點擊購買商品后,獲取商品信息,并確認
~~~[api]
get:/index.php/order/Apiorder/member_order_product
string:order_sign=product# 訂單類型,默認為產品
*int:id=1#購買產品id
string:isGive=0 #是否為贈送模式,0:普通購買,1:贈送模式,如果為贈送模式,在購買成功后,將生成贈送碼(待開發參數)
<<<
success
{
"err": 0,
"data": {
"id": 10,
"title": "產品標題",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"price": 10,
"isGive": 0,
"deductionpoint": [
{
"point_type_": "point",
"point_name_": "積分",
"point_unit_": "分",
"point_": 200,
"point_type": "money",
"point_name": "人民幣",
"point_unit": "元",
"point": 20
}
]
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 描述 |
| --- | --- |
| data| 購買產品信息 |
| |----id | 產品id |
| |----title| 產品標題 |
| |----thumb| 產品縮略圖 |
| |----price| 產品價格 |
| |----isGive| 是否贈送 |
| |----deductionpoint| 積分抵扣 (參數待開發) |
| |----|----point_type_| 抵扣的積分類型|
| |----|----point_name_| 抵扣的積分名稱 |
| |----|----point_unit_| 抵扣的積分單位 |
| |----|----point_| 抵扣的積分數 |
| |----|----point_type| 抵扣成積分類型 |
| |----|----point_name| 抵扣成積分名稱 |
| |----|----point_unit| 抵扣成積分單位 |
| |----|----point| 抵扣成積分數 |
>產品下單接口
~~~[api]
get:/index.php/order/Apiorder/member_order_submit
string:order_sign=product# product:產品
string:deduction= #折扣,抵扣積分的幣種標識(待開發參數)
string:id=1,2,3#購買內容的id,多個id用逗號隔開
string:isGive=0 #是否為贈送模式,0:普通購買,1:贈送模式,如果為贈送模式,在購買成功后,將生成贈送碼(待開發參數)
<<<
success
{
"err": 0,
"data":
{
"order_sn": "訂單號",
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 描述 |
| --- | --- |
| data| 訂單信息 |
| |----order_sn| 下單后生成的訂單號 |
>會員訂單付款
~~~[api]
get:/index.php/order/Apiorder/member_order_pay
*string:order_sn= # 訂單號
string:pay_type="WX" #支付方式 WX:微信支付,Balance:余額支付
<<<
success
{
"err": 0,
"data": {
"pay_type": "WX",
"param": "",
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 |描述 |
| --- | --- |
| data| 選擇支付類型提交后返回的數據 |
| |----pay_type| 支付類型,WX:在微信瀏覽器中支付,一般為公眾號中支付(wxPayJs支付方式),WX_H5:H5支付,一般在手機上,但非公眾號內支付,WX_Native:掃碼支付,一般在PC端支付,Alipay:支付寶支付,Balance:余額支付 |
| |----param | 支付參數,WX支付方式,該參數返回微信wxPayJs支付調起微信所需的參數,WX_H5支付方式,該參數返回調起微信支付的連接,前端只需要訪問一次該連接即可,WX_Native支付方式,該參數返回支付二維碼連接,前端只需顯示出改連接的圖片即可,其它支付方式無此參數 |
>獲取登錄用戶的訂單列表
~~~[api]
get:/index.php/order/Apiorder/member_order_list
int:pagesize=10#每頁顯示個數
int:page=1#顯示頁碼數
string:order_sn=# 訂單號
string:order_sign=product# product:產品
string:between_price= #訂單實付款價格區間如100-200
string:between_pay_time= #支付時間戳區間如12345678910-12345678910
string:between_finish_time= #完成時間戳區間如12345678910-12345678910
string:between_ship_time= #發貨時間戳區間如12345678910-12345678910
int:pay_status= 0#支付狀態 0:未付款 1:已付款
int:ship_status= 0#配送狀態 0:未配送 1:配送中 2:已完成
int:order_status= 0#訂單狀態 0:未確認 1:已確認 2:退款中 3:交易關閉 4:退貨訂單
int:pay_type= 0#支付方式 0:微信 1:支付寶 2:余額
int:type= 0#訂單類型 0:普通 1:砍價 2:團購 3:秒殺
string:sort= id #排序字段
string:sort_type= asc#排序類型
<<<
success
{
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"data": [
{
"id": 1,
"order_sn": "訂單號",
"order_amount": 100,
"goods_amount": 10,
"discount": 10,
"order_status": 0,
"pay_status": 1,
"pay_time": "2020-03-17 17:12:11",
"finish_time": "2020-03-17 17:12:11",
"ship_time": "2020-03-17 17:12:11",
"pay_type": 1,
"is_expense": 2,
"consignee": "",
"goods": [
{
"id": 10,
"title": "產品標題",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"price": 10,
"order_num": 10,
"property":"顏色:紅色,尺碼:XL"
}
],
"addtime": "2020-03-17 17:12:11",
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 詳情 |
| --- | --- |
| page | 當前頁碼 |
| pageTotal | 總共頁碼數 |
| pageSize | 每頁顯示記錄條數 |
| count| 當前記錄數 |
| data| 訂單列表|
| |----id| 訂單id |
| |----order_sn| 訂單號 |
| |----order_amount| 訂單金額 |
| |----goods_amount| 商品總價 |
| |----discount| 折扣 |
| |----order_status| 訂單狀態 0未確認 1已確認 2退款中 3交易關閉 4退貨訂單 |
| |----pay_status| 支付狀態 0未付款 1已付款 |
| |----pay_time| 支付時間|
| |----finish_time| 完成時間|
| |----ship_time| 發貨時間|
| |----pay_type| 支付類型 0:微信 1:支付寶 2:余額 |
| |----is_expense| 是否報銷|
| |----consignee| 收貨地址 |
| goods| 訂單產品信息|
| |----id | 產品id |
| |----title| 產品標題 |
| |----thumb| 縮略圖 |
| |----price| 產品價格 |
| |----order_num| 數量 |
| |----property| 屬性 |
| addtime| 下單時間|
>獲取登錄用戶的訂單詳情
~~~[api]
get:/index.php/order/Apiorder/member_order_getInfo
*string:order_sn= #訂單號
<<<
success
{
"err": 0,
"count": 1,
"data":
{
"id": 1,
"order_sn": "訂單號",
"order_amount": 100,
"goods_amount": 10,
"discount": 10,
"order_status": 0,
"pay_status": 1,
"pay_time": "2020-03-17 17:12:11",
"finish_time": "2020-03-17 17:12:11",
"ship_time": "2020-03-17 17:12:11",
"pay_type": 1,
"is_expense": 2,
"consignee": "",
"remark":"備注",
"goods": [
{
"id": 10,
"title": "產品標題",
"thumb": "http://open.cowcms.com/Public/css_js_font_img/plugg/img/logo.png",
"price": 10,
"order_num": 10,
"property":"顏色:紅色,尺碼:XL"
}
],
"addtime": "2020-03-17 17:12:11"
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 詳情 |
| --- | --- |
| data| 訂單列表|
| |----id| 訂單id |
| |----order_sn| 訂單號 |
| |----order_amount| 訂單金額 |
| |----goods_amount| 商品總價 |
| |----discount| 折扣 |
| |----order_status| 訂單狀態 0未確認 1已確認 2退款中 3交易關閉 4退貨訂單 |
| |----pay_status| 支付狀態 0未付款 1已付款 |
| |----pay_time| 支付時間|
| |----finish_time| 完成時間|
| |----ship_time| 發貨時間|
| |----pay_type| 支付類型 0:微信 1:支付寶 2:余額 |
| |----is_expense| 是否報銷|
| |----consignee| 收貨地址 |
| |----remark| 備注 |
| goods| 訂單產品信息|
| |----id | 產品id |
| |----title| 產品標題 |
| |----thumb| 縮略圖 |
| |----price| 產品價格 |
| |----order_num| 數量 |
| |----property| 屬性 |
| addtime| 下單時間|
>取消訂單
~~~[api]
get:/index.php/order/Apiorder/member_submit_order_cancel
*string:order_sn= #訂單號
<<<
success
{
"err": 0,
"data":
{
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
>發貨地址列表
~~~[api]
get:/index.php/order/Apiorder/member_address_list
<<<
success
{
"err": 0,
"page": 1,
"pageTotal": 10,
"pageSize": 10,
"count": 1,
"default": 1,
"data": [
{
"id": 10,
"nickname": "昵稱",
"mobile": "123456789",
"detailed_addr": "詳細地址",
"addr": {
"province": "省",
"city": "市",
"county": "縣"
}
}
]
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 詳情 |
| --- | --- |
| page | 當前頁碼 |
| pageTotal | 總共頁碼數 |
| pageSize | 每頁顯示記錄條數 |
| count| 當前記錄數 |
| default| 默認發貨地址id |
| data| 發貨地址數據|
| |----id| 發貨地id |
| |----nickname| 收貨人 |
| |----mobile| 聯系電話 |
| |----detailed_addr| 詳細地址 |
| |----addr| 地址信息 |
| |----|----province| 省 |
| |----|----city| 市 |
| |----|----county| 縣 |
>添加發貨地址
~~~[api]
get:/index.php/order/Apiorder/member_address_add
*string:nickname= #用戶姓名
*string:mobile= #手機號
*string:detailed_addr= #詳細地址
*string:addr= {province:'省',city:'市',county:'縣'}#區域選擇
<<<
success
{
"err": 0,
"data":
{
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
>編輯發貨地址
~~~[api]
get:/index.php/order/Apiorder/member_address_edit
*int:id= #發貨地址id
string:nickname= #用戶姓名
string:mobile= #手機號
string:detailed_addr= #詳細地址
string:addr= {province:'省',city:'市',county:'縣'}#區域選擇
string:default= 1#設置默認
<<<
success
{
"err": 0,
"data":
{
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
>獲取發貨地址詳情
~~~[api]
get:/index.php/order/Apiorder/member_address_getIinfo
*int:id= #發貨地址id
<<<
success
{
"err": 0,
"data":
{
"id": 10,
"nickname": "昵稱",
"mobile": "123456789",
"detailed_addr": "詳細地址",
"addr": {
"province": "省",
"city": "市",
"county": "縣"
}
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
| 字段 | 詳情 |
| --- | --- |
| data| 發貨地址數據|
| |----id| 發貨地id |
| |----nickname| 收貨人 |
| |----mobile| 聯系電話 |
| |----detailed_addr| 詳細地址 |
| |----addr| 地址信息 |
| |----|----province| 省 |
| |----|----city| 市 |
| |----|----county| 縣 |
>刪除發貨地址
~~~[api]
get:/index.php/order/Apiorder/member_address_del
*int:id= #發貨地址id
*int:key= #鍵值
<<<
success
{
"err": 0,
"data":
{
}
}
<<<
error
{
"err": 1,
"code": 1000,
"content": "錯誤信息"
}
~~~
- 序言
- 基礎
- 源碼包
- 核心包
- 完整包
- 系統模塊
- 安裝模塊
- 后臺模塊
- 插件模塊
- 插件開發
- 開發基礎
- 權限開發
- 菜單開發
- 開發調試
- 碎片開發
- 碎片鉤子預設表
- 插件說明
- 字段插件
- 插件介紹
- 字段使用
- 單行文本
- 多行文本
- 選項-下拉
- 選項-復選
- 選項-單選
- 選項-滑塊
- 顏色選擇器
- 星級評分
- 日期時間
- 文件上傳
- 編輯器
- API接口
- 微信插件
- 微信配置
- 公眾號配置
- 支付配置
- 微信支付使用
- API類庫
- 紅包發放
- 付款到零錢
- 碎片
- 公眾號碎片
- 紅包碎片
- 付款到零錢碎片
- API微信接口
- 支付寶插件
- 支付寶配置
- 支付寶支付使用
- api接口
- api接口后端開發
- api接口前端使用
- API參數接口
- 會員插件
- 登錄使用
- 會員碎片
- API會員接口
- API注冊接口
- 積分插件
- 積分設置
- 積分碎片
- API積分接口
- API提現接口
- API兌換接口
- API充值接口
- 訂單
- 訂單碎片
- API訂單接口
- 商城
- 商城鉤子
- API商城接口
- API商城會員接口
- 簽到
- 簽到設置
- 簽到碎片
- API簽到接口
- 上傳
- 上傳設置
- 上傳JS接口
- 推廣插件
- 海報設置
- API海報接口
- 文章插件
- 文章設置
- 文章鉤子
- API文章接口
- API文章會員接口
- 管理員
- 管理員碎片
- 站內信
- API站內信接口
- 雜項
- 菜單
- 菜單設置
- API菜單接口
- 錯誤碼
- 支付碎片
- 支付
- 充值
- 購買會員組
- 購買產品