• ecstore-app接口


    接口调用方式:

     接口完整地址为:http://域名/index.php/wapapp/请求地址

     比如获取商品信息就是

     http://域名/index.php/wapapp/product.html

     提交方法:post

    post键名固定为json

    键值为下面所描述的“请求参数”

    用php示例就是

    $_POST['json']='{"goods_id":104}';

     

    返回参数:json格式

    包括2部分,data和status

    data:业务数据

    status:请求状态。里面的succeed:1表示成功,status:0表示失败,error_desc为错误信息

     

     一、商品相关:

    1.1 获取商品信息:

    请求地址:product.html

    请求参数:

    {"product_id":512}

     返回参数

    {"data":{"id":"99","product_id":"552","cat_id":"24","goods_sn":"01957","goods_name":"u5febu8dd1u5c0fu706bu8f66","collected":0,"market_price":"uffe511.00","shop_price":"uffe510.00","cost":"6.00","barcode":null,"integral":0,"click_count":null,"brand_id":null,"goods_number":50,"goods_weight":"500.000u514b","promote_price":"10.00","formated_promote_price":"uffe510.00","promote_start_date":"","promote_end_date":"","is_shipping":"0","img":{"thumb":"http://mall.hhdd.com/public/images/a8/b5/e0/4d84396c205ecc1315e828497caba0a299ab1500.jpg?1470116931#h","url":"http://mall.hhdd.com/public/images/1e/4e/20/267dba95cef1ee9eb9bca31eab1da124d98ca77a.jpg?1470116931#h","small":"http://mall.hhdd.com/public/images/20/99/f8/cfc6f9bbc28ad6429a7c7dfede530ea3cf2c7a21.jpg?1470116931#h"},"rank_prices":[{"id":1,"rank_name":"u6ce8u518cu7528u6237","price":"uffe510.00"}],"pictures":[{"small":"http://mall.hhdd.com/public/images/20/99/f8/cfc6f9bbc28ad6429a7c7dfede530ea3cf2c7a21.jpg?1470116931#h","url":"http://mall.hhdd.com/public/images/20/99/f8/cfc6f9bbc28ad6429a7c7dfede530ea3cf2c7a21.jpg?1470116931#h","thumb":"http://mall.hhdd.com/public/images/20/99/f8/cfc6f9bbc28ad6429a7c7dfede530ea3cf2c7a21.jpg?1470116931#h"},{"small":"http://mall.hhdd.com/public/images/81/e1/75/6df7d0003b3ab1c65635576026def9f5b1a144ff.jpg?1470119963#h","url":"http://mall.hhdd.com/public/images/81/e1/75/6df7d0003b3ab1c65635576026def9f5b1a144ff.jpg?1470119963#h","thumb":"http://mall.hhdd.com/public/images/81/e1/75/6df7d0003b3ab1c65635576026def9f5b1a144ff.jpg?1470119963#h"}],"properties":[],"product2spec":[{"bn":"01957","price":10,"mktprice":11,"mprice":{"1":"10.000","2":"8.000","3":"7.000","4":"2.000"},"discountprice":1,"store":50,"weight":"500.000","spec_private_value_id":[]}]},"status":{"succeed":1}}
    View Code

     

    1.2商品收藏

    请求地址:member-ajaxFav.html

    请求参数:

     返回参数:

     

    二、会员相关

    2.1会员注册

    请求地址:passport-create.html

    请求参数:

    {"name":"xiaoming","password":"1234567","field":[],"email":"zj12u31ad2@123.com"}
    

    返回参数

    {"data":{"session":{"sid":"50-xiaoming-cf1601d4909b4f0aac66822484c1058a-1470209798","uid":"50"},"user":{"id":"50","name":"xiaoming","rank_name":"\u767d\u91d1\u4f1a\u5458","rank_level":"3","collection_num":0,"email":null,"order_num":{"await_pay":"0","await_ship":"0","shipped":"0","finished":"0"}}},"status":{"succeed":1}}

    2.2会员登陆

    请求地址:

    passport-verify.html

    请求参数:

    {"name":"sksk","password":"adminm"}

    返回参数

    {"data":{"session":{"sid":"11-sksk-cf1601d4909b4f0aac66822484c1058a-1470209798","uid":"11"},"user":{"id":"11","name":"sksk","rank_name":"\u767d\u91d1\u4f1a\u5458","rank_level":"3","collection_num":1,"email":null,"order_num":{"await_pay":"0","await_ship":"0","shipped":"0","finished":"0"}}},"status":{"succeed":1}}

    app需要保存session数据,后面需要验证会员身份的操作,比如加入购物车,收藏商品等,都需要随业务数据一起,提交这个session.

    三、订单相关

    3.1会员订单列表

    请求地址:

    member-orders.html

    3.1.1 待付款订单

    提交参数

    {"session":{"sid":"11-sksk-cf1601d4909b4f0aac66822484c1058a-1470209798","uid":11},"type":"await_pay","pagination":{"count":10,"page":1}}

    返回 

    {"data":[{"order_id":"160616180278600","order_sn":"160616180278600","order_time":"2016\/06\/16 18:02:26","total_fee":"\uffe50.00","goods_list":[{"order_id":"160616180278600","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"0.00","order_id":"160616180278600","subject":"160616180278600","desc":"160616180278600","order_sn":"160616180278600"}},{"order_id":"160616175955647","order_sn":"160616175955647","order_time":"2016\/06\/16 17:59:39","total_fee":"\uffe50.00","goods_list":[{"order_id":"160616175955647","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe510.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"0.00","order_id":"160616175955647","subject":"160616175955647","desc":"160616175955647","order_sn":"160616175955647"}},{"order_id":"160616175364239","order_sn":"160616175364239","order_time":"2016\/06\/16 17:53:59","total_fee":"\uffe5285.60","goods_list":[{"order_id":"160616175364239","goods_number":"2","subtotal":"\uffe57.00","formated_shop_price":"\uffe53.50","img":{"small":"http:\/\/192.168.1.111:8613\/public\/images\/8a\/17\/ab\/30e21b0e813b5bc8315a8346ebe9a4fa6387147c.jpg?1452669873#h","thumb":"http:\/\/192.168.1.111:8613\/public\/images\/fb\/dc\/73\/0346e35ff8b2dcce3212199c01a617ad9f8c4c5a.jpg?1452669873#h","url":"http:\/\/192.168.1.111:8613\/public\/images\/22\/5b\/c1\/0f26c04f1f03ff90b8f977f8b4ac6e1f9627df46.jpg?1452669873#h"}},{"order_id":"160616175364239","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"285.60","order_id":"160616175364239","subject":"160616175364239","desc":"160616175364239","order_sn":"160616175364239"}},{"order_id":"160616174274210","order_sn":"160616174274210","order_time":"2016\/06\/16 17:42:55","total_fee":"\uffe5143.50","goods_list":[{"order_id":"160616174274210","goods_number":"1","subtotal":"\uffe53.50","formated_shop_price":"\uffe53.50","img":{"small":"http:\/\/192.168.1.111:8613\/public\/images\/8a\/17\/ab\/30e21b0e813b5bc8315a8346ebe9a4fa6387147c.jpg?1452669873#h","thumb":"http:\/\/192.168.1.111:8613\/public\/images\/fb\/dc\/73\/0346e35ff8b2dcce3212199c01a617ad9f8c4c5a.jpg?1452669873#h","url":"http:\/\/192.168.1.111:8613\/public\/images\/22\/5b\/c1\/0f26c04f1f03ff90b8f977f8b4ac6e1f9627df46.jpg?1452669873#h"}},{"order_id":"160616174274210","goods_number":"2","subtotal":"\uffe5140.00","formated_shop_price":"\uffe570.00","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"143.50","order_id":"160616174274210","subject":"160616174274210","desc":"160616174274210","order_sn":"160616174274210"}},{"order_id":"160616174033102","order_sn":"160616174033102","order_time":"2016\/06\/16 17:40:44","total_fee":"\uffe5488.60","goods_list":[{"order_id":"160616174033102","goods_number":"3","subtotal":"\uffe5210.00","formated_shop_price":"\uffe570.00","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h"}},{"order_id":"160616174033102","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"488.60","order_id":"160616174033102","subject":"160616174033102","desc":"160616174033102","order_sn":"160616174033102"}},{"order_id":"160616173570106","order_sn":"160616173570106","order_time":"2016\/06\/16 17:35:27","total_fee":"\uffe5905.80","goods_list":[{"order_id":"160616173570106","goods_number":"1","subtotal":"\uffe570.00","formated_shop_price":"\uffe570.00","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6e3e1e0ed4b3ad74130fd8acd7bcce985e95b2f346.gif?1443151292#h"}},{"order_id":"160616173570106","goods_number":"3","subtotal":"\uffe5835.80","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"905.80","order_id":"160616173570106","subject":"160616173570106","desc":"160616173570106","order_sn":"160616173570106"}},{"order_id":"160616172214547","order_sn":"160616172214547","order_time":"2016\/06\/16 17:22:07","total_fee":"\uffe5278.60","goods_list":[{"order_id":"160616172214547","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"278.60","order_id":"160616172214547","subject":"160616172214547","desc":"160616172214547","order_sn":"160616172214547"}},{"order_id":"160616171647676","order_sn":"160616171647676","order_time":"2016\/06\/16 17:16:05","total_fee":"\uffe5835.80","goods_list":[{"order_id":"160616171647676","goods_number":"3","subtotal":"\uffe5835.80","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"835.80","order_id":"160616171647676","subject":"160616171647676","desc":"160616171647676","order_sn":"160616171647676"}},{"order_id":"160616170618494","order_sn":"160616170618494","order_time":"2016\/06\/16 17:06:27","total_fee":"\uffe5278.60","goods_list":[{"order_id":"160616170618494","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"1","ship_status":"0","pay_code":null,"order_amount":"278.60","order_id":"160616170618494","subject":"160616170618494","desc":"160616170618494","order_sn":"160616170618494"}},{"order_id":"160616170541286","order_sn":"160616170541286","order_time":"2016\/06\/16 17:05:49","total_fee":"\uffe5278.60","goods_list":[{"order_id":"160616170541286","goods_number":"1","subtotal":"\uffe5278.60","formated_shop_price":"\uffe5278.60","img":{"small":"http:\/\/pic.shopex.cn\/pictures\/eimages\/214b2d135b7ac3ce3e1e850ba6f16a379f68ce96b9.png?1286781767#w","thumb":"http:\/\/pic.shopex.cn\/pictures\/eimages\/6556e252f5e69d855e21b1955a4b1632f1b85cff45.png?1286781767#w","url":"http:\/\/pic.shopex.cn\/pictures\/eimages\/bbe520187c7a2b9a84df1e513ca690a99c23c827b3.png?1286781767#w"}}],"formated_integral_money":"0","formated_bonus":"\uffe50.00","formated_shipping_fee":"\uffe50.00","order_info":{"promotion_type":"normal","order_status":"active","pay_status":"0","ship_status":"0","pay_code":null,"order_amount":"278.60","order_id":"160616170541286","subject":"160616170541286","desc":"160616170541286","order_sn":"160616170541286"}}],"status":{"succeed":1},"paginated":{"total":11,"count":10,"more":1}}
    View Code
  • 相关阅读:
    繁简转换OpenCC,autogb 和 autob5,iconv,python的jianfan包
    Linux常用的系统监控shell脚本
    linux系统CPU,内存,磁盘,网络流量监控脚本
    linux系统巡检脚本shell实例
    主流脚本语言的比较和选择
    老男孩python第六期
    如何从 0 开始学 ruby on rails (漫步版)
    C#数学运算表达式解释器
    算法导论 第9章 中位数和顺序统计学(线性时间选择算法)
    ruby语言仅仅是昙花一现
  • 原文地址:https://www.cnblogs.com/showker/p/5725137.html
Copyright © 2020-2023  润新知