@kirkzwy
2015-01-15T14:27:50.000000Z
字数 4553
阅读 1816
创业 Let'sCake

(1)API
/api/indexAds
(2)方法及数据结构
方法
GET:主要用于获取首页的头部横幅广告图片,不用通过用户信息分别获取
返回数据结构
[adsPics:[{adsPicSrc(string):图片地址},...]shoppingEnts:[{entImg(string):入口图片地址,entSlogan(string):入口广告语,entLink(string):入口跳转地址},....]]
(1)API
/api/productsInfo
(2)方法及数据结构
方法:
GET:通过(?filter={productType:...})用于获取产品蛋糕或伴手礼分类页面的数据
返回数据结构:
{products(array):[{productType(string):产品种类(分为'cake'和'handGift'两类)serieId(number):产品系列编号,serieName(string):产品系列名称,seriePic(string):产品系列代表图片,serieDesc(string):产品系列介绍,serieTypes(array):产品系列下的种类[{typeyId(number):产品系列种类编号,typeName(string):产品系列种类名称,typeMainPic(string):产品系列种类主图片,typeMainDesc(string):产品系列种类主介绍语,},...],},....]}
方法:
GET:通过(?filter={productType:...,typeyId:...})用于获取产品蛋糕详细页面的数据
返回数据结构:
{typeyId(number):产品系列种类编号,typeName(string):产品系列种类名称,typeMainPic(string):产品系列种类主图片,typeMainDesc(string):产品系列种类主介绍语,typePics(array):[{picSrc(string):图片地址,},...],// 若查询参数为?filter={productType:'cake',typeyId:...}时,为typePrices(array):[{cakeSize(number):蛋糕尺寸,cakeSizeName(string):蛋糕尺寸套餐名称,cakePrice(number):蛋糕价格},...],// 若查询参数为?filter={productType:'handGift',typeyId:...}时,为typeWeight(number):伴手礼重量,typePrice(number):伴手礼价格,// 以下相同typeFavor(array):[{picSrc(string):蛋糕口味材料介绍图片,favorDesc(string):介绍语},...],typeAdvise(array):[{picSrc(string):蛋糕搭配建议,adviseDesc(string):介绍语},...]}
(1)API
/api/orderinfo
(2)方法数据结构
方法
POST:主要用于接收用户订单信息,通过用户ID信息(?filter={userId:...)系统自动生成订单生成时间,订单编号,订单状态,订单状态编号,订单确认时间,订单发货时间,订单接收时间,订单支付方式编号
发送数据
{userId(string):用户ID,orderDate(string):订单指定送达日期,orderTime(string):订单指定送达时间,orderConsignee(string): 收货人,orderConsigneePhone (string): 联系电话,orderDestination(string): 订单接收地址,orderRemark(string): 订单备注,orderPaymen(string): 订单支付方式,orderCoupon(number): 订单优惠,orderDeliverFee(number): 订单运费,orderTotalPrice(number): 订单总价,goods(array): [{goodsName(string):商品名称 ,goodsType(string): 商品尺寸或重量,goodsCounts(number): 商品数量,goodsPrice(number): 商品价格,goodsTotalPrice(string): 商品总价,goodsPackage(string):商品包装附件信息},...],}
提交成功后,系统返回以下数据
{orderId(number): 订单编号,orderConsignee(string): 收货人,orderConsigneePhone (string): 联系电话,orderDestination(string): 订单接收地址,orderDate(string):订单指定送达日期,orderTime(string):订单指定送达时间,orderPaymen(string): 订单支付方式,orderTotalPrice(number): 订单总价{
方法
get:根据用户账号信息(?filter={userId:...)获取相关订单信息
返回数据结构
[{userId(string):用户ID,orderId(number): 订单编号,orderStatus(string) : 订单状态,orderStatusType(number): 订单状态编号,orderDate(string):订单指定送达日期,orderTime(string):订单指定送达时间,orderConfirmTime(string): 订单确认时间,orderDeliverTime(string): 订单发货时间,orderArrivalTime (string): 订单接收时间,orderConsignee(string): 收货人,orderConsigneePhone (string): 联系电话,orderDestination(string): 订单接收地址,orderRemark(string): 订单备注,orderPaymen(string): 订单支付方式,orderPayType (number): 订单支付方式编号,orderCoupon(number): 订单优惠,orderDeliverFee(number): 订单运费,orderTotalPrice(number): 订单总价,goods(array): [{goodsName(string):商品名称 ,goodsType(string): 商品尺寸或重量,goodsCounts(number): 商品数量,goodsPrice(number): 商品价格,goodsImg(string): 商品图片,goodsTotalPrice(string): 商品总价,goodsPackage(string):商品包装附件信息},...],},...]
(1)API
/api/userInfo
(2)方法数据结构
方法
POST:通过使用QQ和微博Oauth进行注册操作,系统自动生成用户ID
发送数据
{OauthInfo(object):相关Oauth信息}
系统返回数据
{userId(string):用户ID,OauthInfo(object):相关Oauth信息}
方法
GET:通过Oauth注册后,根据用户ID(?filter={userId:...)获得相关用户信息,并通过ID获得相关用户信息(微信绑定后可获得相关微信信息)
{userId(string):用户ID,OauthInfo(string):相关Oauth信息,signName(string):注册名,wechatName(string):微信名,wechatAvatar(string):微信头像地址,}
(1)API
/api/wxbinding
(2)方法数据结构
方法
POST:通过授权及用户ID(?filter={userId:...)与微信账号绑定
发送数据
{bindingInfo(object):相关微信绑定信息}
系统返回数据
{userId(string):用户ID,OauthInfo(string):相关Oauth信息,signName(string):注册名,wechatName(string):微信名,wechatAvatar(string):微信头像地址,}
(1)API
/api/addressInfo
(2)方法及数据结构
方法
POST:通过用户ID(?filter={userId:...)新建收货地点信息,系统自动生成地址信息Id,
发送数据结构
{userId(string): 用户ID,orderConsignee(string): 收货人,orderConsigneePhone (string): 联系电话,orderMCode(string): 订单邮编,orderDist(string):订单省份,orderCity(string):订单城市,orderArea(string):订单地区,orderDestination(string): 订单接收地址}
方法
GET:根据用户ID(?filter={userId:...)获取收货地点信息
返回数据结构
[{userId(string): 用户ID,addressId(string): 地址信息ID,orderConsignee(string): 收货人,orderConsigneePhone(string): 联系电话,orderMCode(string): 订单邮编,orderDist(string): 订单省份,orderCity(string): 订单城市,orderArea(string): 订单地区,orderDestination(string): 订单接收地址},...]
方法
PUT:根据用户ID及地址信息ID(?filter={userId:..., addressId:...)更改收货地点信息
发送数据结构
{userId(string): 用户ID,addressId(string):地址信息ID,orderConsignee(string): 收货人,orderConsigneePhone (string): 联系电话,orderMCode(string): 订单邮编,orderDist(string): 订单省份,orderCity(string):订单城市,orderArea(string):订单地区,orderDestination(string): 订单接收地址}
方法
DELETE:根据用户ID及地址信息ID(?filter={userId:..., addressId:...)删除收货地点信息
发送数据结构
{userId(string): 用户ID,addressId(string):地址信息ID}