目录

手机接口

开发进度

一期

二期

数据格式约定

返回数据为json格式,code为200表示数据正常,datas为返回的数据

{code: 200, datas: {}}

返回值

获取数据

//有内容直接返回数组,无内容返回空数组[]
//hasmore为是否有下一页
{"code":200,"hasmore":true,"datas":{"goods_list":[]}}

操作成功

//操作成返回"1"
{"code":200,"datas":{"1"}}

错误

//出现错误返回error,error内为错误信息
{"code":200,"datas":{"error":"参数错误"}}
//登录失败,login:0
{"code":200,"login":"0","datas":{"error":"\u8bf7\u767b\u9646"}}

商城API

说明:v1版本API对应商城2014v1版本。

首页

首页数据接口(get)

  index.php?act=index

请求参数

返回数据

返回数据说明

专题

专题接口(get)

  index.php?act=index&op=special

请求参数

返回数据

返回数据说明

商品分类

一级分类接口(get)

  index.php?act=goods_class

指定分类接口(get)

有下级分类返回分类列表,无分类返回'0'

  index.php?act=goods_class&gc_id=2

商品列表

商品列表接口(get)

  index.php?act=goods&op=goods_list

请求参数

返回数据

商品详细信息

商品详细信息接口(get)

  index.php?act=goods&op=goods_detail

请求参数

返回数据

商品介绍信息

调用接口(get)

  index.php?act=goods&op=goods_body

请求参数

返回数据

登录

登录接口(post)

  index.php?act=login

请求参数

返回数据

注册

注册接口(post)

  index.php?act=login&op=register

请求参数

返回数据

注销

注销接口(post)

  index.php?act=logout

请求参数

返回数据

我的商城

调用接口(post)

  index.php?act=member_index

请求参数

返回数据

收藏列表

调用接口(post)

  index.php?act=member_favorites&op=favorites_list

请求参数

返回数据

收藏添加

调用接口(post)

  index.php?act=member_favorites&op=favorites_add

请求参数

返回数据

收藏删除

调用接口(post)

  index.php?act=member_favorites&op=favorites_del

请求参数

返回数据

地址列表

调用接口(post)

  index.php?act=member_address&op=address_list

请求参数

返回数据

地址详细信息

调用接口(post)

  index.php?act=member_address&op=address_info

请求参数

返回数据

地址删除

调用接口(post)

  index.php?act=member_address&op=address_del

请求参数

返回数据

地址添加

调用接口(post)

  index.php?act=member_address&op=address_add

请求参数

返回数据

地址编辑

调用接口(post)

  index.php?act=member_address&op=address_edit

请求参数

返回数据

地区列表

调用接口(post)

  index.php?act=member_address&op=area_list

请求参数

返回数据

订单列表

调用接口(post)

  index.php?act=member_order&op=order_list

请求参数

返回数据

订单状态

订单取消(未付款)

调用接口(post)

  index.php?act=member_order&op=order_cancel

请求参数

返回数据

订单确认收货

调用接口(post)

  index.php?act=member_order&op=order_receive

请求参数

返回数据

订单物流信息

调用接口(post)

  index.php?act=member_order&op=search_deliver

请求参数

返回数据

购物车列表

调用接口(post)

  index.php?act=member_cart&op=cart_list

请求参数

返回数据

购物车添加

调用接口(post)

  index.php?act=member_cart&op=cart_add

请求参数

返回数据

购物车删除

调用接口(post)

  index.php?act=member_cart&op=cart_del

请求参数

返回数据

购物车修改数量

调用接口(post)

  index.php?act=member_cart&op=cart_edit_quantity

请求参数

返回数据

发票列表

调用接口(post)

  index.php?act=member_invoice&op=invoice_list

请求参数

返回数据

发票添加

调用接口(post)

  index.php?act=member_invoice&op=invoice_add

请求参数

返回数据

发票删除

调用接口(post)

  index.php?act=member_invoice&op=invoice_del

请求参数

返回数据

发票内容列表

调用接口(post)

  index.php?act=member_invoice&op=invoice_content_list

请求参数

返回数据

购买第一步

调用接口(post)

  index.php?act=member_buy&op=buy_step1

请求参数

cart_id说明
立即购买: 第一个数字为商品编号,第二个数字为购买数量,用竖线分割。例:232|1  
购物车购买:第一个数字为购物车编号,第二个数字为购买数量,用竖线分割。多组用半角逗号分割,例:232|1,110|2 232商品购买1个,110商品购买2个

返回数据

更换收货地址

调用接口(post)

  index.php?act=member_buy&op=change_address

请求参数

返回数据

验证支付密码

调用接口(post)

  index.php?act=member_buy&op=check_password

请求参数

返回数据

购买第二步

调用接口(post)

  index.php?act=member_buy&op=buy_step2

请求参数

cart_id说明
立即购买: 第一个数字为商品编号,第二个数字为购买数量,用竖线分割。例:232|1  
购物车购买:第一个数字为购物车编号,第二个数字为购买数量,用竖线分割。多组用半角逗号分割,例:232|1,110|2 232商品购买1个,110商品购买2个

返回数据

可用支付方式列表

调用接口(post)

index.php?act=member_payment&op=payment_list

请求参数

返回数据

支付

调用接口(get)

  index.php?act=member_payment&op=pay

请求参数

Android版本检查

调用接口(get)

index.php?act=index&op=apk_version

请求参数

返回数据

买家代金券列表

调用接口(post)

index.php?act=member_voucher&op=voucher_list

请求参数

返回数据

意见反馈

调用接口(post)

index.php?act=member_feedback&op=feedback_add

请求参数

返回数据

虚拟购买

虚拟购买第一步

调用接口(post)

index.php?act=member_vr_buy&op=buy_step1

请求参数

返回数据

虚拟购买第二步

设置接收手机号

调用接口(post)

index.php?act=member_vr_buy&op=buy_step2

请求参数

返回数据

虚拟购买第三步

生成订单

调用接口(post)

index.php?act=member_vr_buy&op=buy_step3

请求参数

返回数据

虚拟订单列表

调用接口(post)

index.php?act=member_vr_order&op=order_list

请求参数

返回数据

虚拟订单可用码列表

调用接口(post)

index.php?act=member_vr_order&op=indate_code_list

请求参数

返回数据

虚拟订单取消

调用接口(post)

index.php?act=member_vr_order&op=order_cancel

请求参数

返回数据

虚拟订单支付

调用接口(get)

  index.php?act=member_payment&op=vr_pay

请求参数

IM API

node 会员的在线状态

调用接口

emit('get_state', u_list);

请求参数

返回数据

emit('get_state', list);

node 更新会员状态

调用接口

emit('update_user', user);

请求参数

返回数据

emit('get_msg', msg_list);

node 发消息

调用接口

emit('send_msg', t_msg);

请求参数

返回数据

emit('get_msg', msg_list);

node 删除消息

调用接口

socket.emit('del_msg', {'max_id':max_id,'f_id':u_id});

请求参数

返回数据

emit('del_msg', msg);

会员聊天--最近联系人列表

调用接口(post)

index.php?act=member_chat&op=get_user_list

请求参数

返回数据

会员聊天--会员信息

调用接口(post)

index.php?act=member_chat&op=get_info

请求参数

返回数据

会员聊天--发消息

调用接口(post)

index.php?act=member_chat&op=send_msg

请求参数

返回数据

会员聊天--商品信息

调用接口(post)

index.php?act=member_chat&op=get_goods_info

请求参数

返回数据

会员聊天--聊天记录查询

调用接口(post)

index.php?act=member_chat&op=get_chat_log

请求参数

返回数据

我的好友--查询会员

调用接口(post)

index.php?act=member_snsfriend&op=member_list

请求参数

返回数据

我的好友--好友列表

调用接口(post)

index.php?act=member_snsfriend&op=friend_list

请求参数

返回数据

我的好友--添加好友

调用接口(post)

index.php?act=member_snsfriend&op=friend_add

请求参数

返回数据

我的好友--删除好友

调用接口(post)

index.php?act=member_snsfriend&op=friend_del

请求参数

返回数据