接口调用方式:

接口完整地址为: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":"\u5feb\u8dd1\u5c0f\u706b\u8f66","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.000\u514b","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":"\u6ce8\u518c\u7528\u6237","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}}

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}}

ecstore-app接口的更多相关文章

  1. APP接口自动化测试JAVA+TestNG(一)之框架环境搭建

    前言 好久不曾写点啥,去年换到新公司组测试团队与培养建设花费大量时间与精力,终于架构成型与稳定有时间可以打打酱油了.很久没有总结点啥,提笔想写的内容太多,先放APP接口自动化的内容吧,这个估计大家比较 ...

  2. 关于APP接口设计(转)

    最近一段时间一直在做APP接口,总结一下APP接口开发过程中的注意事项: 1.效率:接口访问速度 APP有别于WEB服务,对服务器端要求是比较严格的,在移动端有限的带宽条件下,要求接口响应速度要快,所 ...

  3. 《PHP开发APP接口》笔记

    PHP开发APP接口 [TOC] 课程地址 imooc PHP开发APP接口 学习要点 APP接口简介 封装通信接口方法 核心技术 APP接口实例 服务器端 -> 数据库|缓存 -> 调用 ...

  4. Fiddler抓包测试App接口

    Fiddler抓包测试App接口 使用Fiddler对手机App应用进行抓包,可以对App接口进行测试,也可以了解App传输中流量使用及请求响应情况,从而测试数据传输过程中流量使用的是否合理. 抓包过 ...

  5. APP 接口开发及读取静态缓存

    <?php /** * Description: App 接口 * Create date:2015-10-19 13:36 * Author: zhaoyingnan **/ class Re ...

  6. 关于APP接口设计

    最近一段时间一直在做APP接口,总结一下APP接口开发过程中的注意事项: 1.效率:接口访问速度 APP有别于WEB服务,对服务器端要求是比较严格的,在移动端有限的带宽条件下,要求接口响应速度要快,所 ...

  7. 【转】基于laravel制作APP接口(API)

    这篇文章主要介绍了基于laravel制作APP接口(API)的相关资料,需要的朋友可以参考下 前期准备 前言,为什么做以及要做个啥本人姓小名白,不折不扣编程届小白一名,但是自从大一那会儿接触到编程这件 ...

  8. App接口设计

    关于APP接口设计 http://blog.csdn.net/gebitan505/article/details/37924711/

  9. APP接口版本兼容的问题

    现在基本每个公司都做APP,所以大家都面临 APP接口版本兼容的问题. iOS和android 要不断开发新版本,很多服务端开发都是在以前接口的逻辑上进行修改.新的APP和接口开发后,接口如何兼容老的 ...

  10. 关于PHP写APP接口的安全问题探讨(一)

    在探讨这个问题之前,先要确认一点的是,作为一名互联网Coder,无论你是前端或者后端你都要对http请求要有一定的了解,知道http特性,要清楚的了解http里面的Request与Response是什 ...

随机推荐

  1. 没有为扩展名.htm注册的生成提供程序,没有为扩展名.html注册的生成提供程序

    在web.config中添加下面这段 代码如下 <buildProviders> <add extension=".html" type="System ...

  2. eclipse或myeclipse快捷键

    MyEclipse 快捷键1(CTRL) ------------------------------------- Ctrl+1 快速修复 Ctrl+D: 删除当前行 Ctrl+Q  定位到最后编辑 ...

  3. java 调用 sql server存储过程

    Transact-SQL中的存储过程,非常类似于Java语言中的方法,它可以重复调用.当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句.这样就可以提高存储过程的性能. Ø ...

  4. 将DataTable导出到Excel

    /// <summary> /// 导出Excel /// </summary> /// <param name="dtData"></p ...

  5. BackTrack5-r3虚拟机安装

    ISOL INUX 3.63 Debian-2008-07-15 Copyright (C) 1994-2008 H. Peter Anvinboot:(按回车) 选择:BackTrack Text ...

  6. cookie httponly属性

    Marks the cookie as accessible only through the HTTP protocol. This means that the cookie won't be a ...

  7. 提升Nginx+PHP-FPM性能技巧

    /etc/php-fpm.d 2.1进程数   php-fpm初始/空闲/最大worker进程数      pm.max_children = 300      pm.start_servers = ...

  8. 使用html模板

    创建html---点击next--选择写好的模板

  9. C#中as用法

    在程序中,进行类型转换时常见的事,C#支持基本的强制类型转换方法,例如 Object obj1 = new NewType();NewType newValue = (NewType)obj1;这样强 ...

  10. Date Range Picker时间插件非常不错,主要体现在选择一个时间区间

    地址:http://www.daterangepicker.com/ demo地址:http://tamble.github.io/jquery-ui-daterangepicker/#event a ...