🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
* 加入购物车 ~~~[api] get:/index.php?ctl=Buyer_Cart&met=addCart&typ=json string:k#key int:u#用户id int:goods_id#商品id int:goods_num#商品数量 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{"flag":5487,"msg":"success","cart_id":5487}} <<< error {"cmd_id":-1,"status":250,"msg":"\u6570\u636e\u6709\u8bef","data":{}} ~~~ * 购物车列表 ~~~[api] get:/index.php?ctl=Buyer_Cart&met=cart&typ=json string:k#key int:u#用户id <<< success { "cmd_id":-140, "status":200, "msg":"success", "data":{ "count":1, "cart_list":[ { "shop_id":"8", "shop_name":"hp\u7684\u5e97\u94fa", "shop_user_id":"10013", "shop_user_name":"hp", "district_id":"1876", "shop_self_support":"false", "goods":[ { "cart_id":"5487", "user_id":"10014", "shop_id":"8", "goods_id":"435", "goods_num":"2", "cart_status":"0", "id":"5487", "transport_area_id":"0", "buy_able":1, "cubage":"1.00", "old_price":"200.00", "now_price":"100.00", "down_price":100, "order_goods_count":0, "IsHaveBuy":0, ..... "common_parent_id":"0", "goods_recommended_min_price":"0.00", "goods_recommended_max_price":"0.00", "product_distributor_flag":"0", "common_distributor_description":"", "common_distributor_flag":"0", "common_cps_commission":"0.00", "common_goods_from":"1", "transport_area_id":"0", "id":"302" } } ], "sprice":"200.00", "commission":"2.00", "mansong_info":{ "rule_discount":"5.00", "rule_price":"100.00", "gift_goods_id":"614", "shop_id":"8", "goods_name":"\u6ee1\u5373\u9001\u8d60\u54c1","goods_image":"http:\/\/shop.local.yuanfeng021.com\/image.php\/media\/d3aabd05be45670d48e2685d1e1f5992\/10013\/8\/image\/20170531\/1496199045345268.png", "common_id":"366" }, "increase_info":[], "voucher_base":[], "shop_voucher":[] } ], "sum":200, "number":2 } } <<< error {"cmd_id":-1,"status":250,"msg":"\u9700\u8981\u767b\u5f55","data":30} ~~~ * 购物车商品数量改变 ~~~[api] get:/index.php?ctl=Buyer_Cart&met=editCartNum&typ=json string:k#key int:u#用户id cat_id#购物车id num#商品数量 <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{"price":500}} <<< error ~~~ * 删除购物车商品 ~~~[api] get:/index.php?ctl=Buyer_Cart&met=delCartByCid&typ=json string:k#key int:u#用户id id#购物车id <<< success {"cmd_id":-140,"status":200,"msg":"success","data":[["5488"]]} <<< error ~~~ * 结算 ~~~[api] get:/index.php?ctl=Buyer_Cart&met=newconfirm&typ=json string:k#key int:u#用户id product_id#购物车id array nums#购物车数量 array <<< success <<< error ~~~