[TOC]
* * * * *
### WeEngine Android、IOS Cart api
#### 購物車列表
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.get_list
*string:openid=默認值#openid
<<<
success
{
"status": 1,
"result": {
"ischeckall": true, //全部選中狀態 true全選 false不是全選
"list": [
{
"id": "", //購物車ID
"total": "1", //商品數量
"goodsid": "", //商品ID
"stock": "", //庫存
"preselltimeend": "", //預售結束時間
"gpprice": "", //預售價格
"hasoption": "0", //啟用商品規則 0 不啟用 1 啟用
"optionstock": null,//商品庫存 -1 永久可賣
"presellprice": null, //預售價格
"ispresell": "0", //是否預售商品 0否 1是
"maxbuy": "0", //單次最多購買量 0不限
"title": "", //商品名稱
"thumb": "", //商品縮略圖
"marketprice": , //商品現價
"productprice": "", //商品原價
"optiontitle": null, //規格名稱
"optionid": "0", //規格ID
"specs": null, //規格設置
"minbuy": "0", // 用戶單次必須購買數量 0不限
"unit": "件", //商品單位
"merchid": "0", //商戶ID
"checked": "0",
"isdiscount_discounts": "{\"type\":0,\"default\":{\"option0\":\"\"}}", //促銷價格 數字為價格 百分數 為折扣
"isdiscount": "0", //促銷
"isdiscount_time": "", //促銷結束時間戳
"isnodiscount": "0", //不參與會員折扣
"discounts": "{\"type\":\"0\",\"default\":\"\",\"default_pay\":\"\"}", //折扣
"merchsale": "0", //手機端使用的價格 0 當前設置促銷價格 1 商戶設置促銷價格
"selected": "1", //selected 是否選中 0否 1是
"type": "1", //類型 1 實體物品 2 虛擬物品 3 虛擬物品(卡密) 4 批發 10 話費流量充值 20 充值卡
"intervalfloor": "0",
"intervalprice": "",
"ggprice": 119,
"discounttype": 0,
"totalmaxbuy": "" //最多購買量
}
],
"total": 1, //結算總數
"totalprice": 119, //結算總價
"merch_user": [],
"merch": [],
"url": ""
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車修改
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.update
*string:openid=默認值#openid
*string:id=默認值#購物車ID
*string:total=默認值#數量
*string:optionid=默認值#選項ID
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車商品選擇
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.select
*string:openid=默認值#openid
*string:id=默認值#購物車ID
*string:select=默認值#選擇狀態 0未選中 1選中
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車商品添加
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.add
*string:openid=默認值#openid
*string:id=默認值#購物車ID
*string:total=默認值#購物車數量
*string:optionid=默認值#規格ID
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車商品移除
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.remove
*string:openid=默認值#openid
*string:ids=默認值#購物車ID組
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車商品移動到關注
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.tofavorite
*string:openid=默認值#openid
*string:ids=默認值#購物車ID組
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~
#### 購物車商品結算
~~~[api]
POST:https://127.0.0.1/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=apply.member.cart.submit
*string:openid=默認值#openid
<<<
success
{
"status": 1,
"result": {
"message": "操作成功"
}
}
<<<
error
{
"status": 0,
"result": {
"message": "錯誤信息"
}
}
~~~