1.存一条news
访问路径:
http://localhost:8080/wogan/?action=saveNews&titile=savetest
成功时返回结果:
{"data":21,"status":1,"info":"ok"}
失败时返回结果:
{"data":null,"status”:50000,"info":"save news error"}
2.获得一条新闻
访问路径:
成功时返回结果:
{
"data": {
"id": 12,
"title": "",
"imgBriefUrl": "/images/news/68792873ed6c49759b0bde0333650294.jpg",
"imgContentUrl": "/images/news/dbd6cb8445174becac04039dbedf061c.jpg",
"description": null,
"content": "",
"createTime": 1449467971000,
"updateTime": null
},
"status": 1,
"info": "ok"
}
失败时返回结果:
{"data":null,"status":50001,"info":"get one news error"}
3.删除一条news
访问路径:
http://localhost:8080/wogan/?action=deleteNews&id=18
成功时返回结果:
{"data":null,"status":1,"info":"ok"}
失败时返回结果:
{"data":null,"status":50002,"info":"delete news error"}
4.保存一条news
访问路径:
http://localhost:8080/wogan/?action=uploadNews post请求
成功时返回结果:
{"data":null,"status":1,"info":"ok"}
失败时返回结果:
{"data":null,"status":50005,"info":"update news error"}
5.修改一条news 修改哪些属性则传哪些属性 id必传
访问路径:
http://localhost:8080/wogan/?action=updateNews&id=2&title=tt
成功时返回结果:
{"data":null,"status":1,"info":"ok"}
失败时返回结果:
{"data":null,"status":50004,"info":"update news error"}
6.获得news 分页
访问路径:
http://localhost:8080/wogan/?action=getNewsPagination&start=0&limit=10
成功时返回结果:
{
"data": {
"totalCount": 13,
"list": [
{
"id": 1,
"title": "title",
"imgBriefUrl": "http://wnxg.jhd.link/images/1.png",
"imgContentUrl": "url2",
"description": "desc",
"content": "content",
"createTime": 1449113147000,
"updateTime": 1449113147000
},
{
"id": 2,
"title": "tt",
"imgBriefUrl": "aaa",
"imgContentUrl": "url2",
"description": "desc",
"content": "content",
"createTime": 1449113596000,
"updateTime": 1449474149000
},
{
"id": 3,
"title": "title3",
"imgBriefUrl": "bbb",
"imgContentUrl": "url2",
"description": null,
"content": "content",
"createTime": 1449131777000,
"updateTime": 1449457905000
},
{
"id": 10,
"title": "1",
"imgBriefUrl": "/images/news/c37e9ebaf1b44a8aa9defcb65176f155.jpg",
"imgContentUrl": "/images/news/9f661deb41434e4185f391952addc5de.jpg",
"description": null,
"content": "3",
"createTime": null,
"updateTime": null
},
{
"id": 11,
"title": "newTitle",
"imgBriefUrl": null,
"imgContentUrl": null,
"description": null,
"content": null,
"createTime": null,
"updateTime": null
},
{
"id": 12,
"title": "",
"imgBriefUrl": "/images/news/68792873ed6c49759b0bde0333650294.jpg",
"imgContentUrl": "/images/news/dbd6cb8445174becac04039dbedf061c.jpg",
"description": null,
"content": "",
"createTime": 1449467971000,
"updateTime": null
},
{
"id": 13,
"title": "",
"imgBriefUrl": "/images/news/f71295dbc81c4f6daac4e9e6f85d4f9e.jpg",
"imgContentUrl": "/images/news/1014dc0fd18c407f8fc619c29e29f30e.jpg",
"description": null,
"content": "",
"createTime": 1449468913000,
"updateTime": null
},
{
"id": 14,
"title": "",
"imgBriefUrl": "/images/news/f57ed44a7e0542d89d80ca45863435a1.jpg",
"imgContentUrl": "/images/news/bdc603264db44e4894aeac6ebf294643.jpg",
"description": null,
"content": "",
"createTime": 1449469756000,
"updateTime": null
},
{
"id": 15,
"title": "",
"imgBriefUrl": "/images/news/4690485d8df943688496c469fffecb23.jpg",
"imgContentUrl": "/images/news/4fd827a60ceb4b0aa01bc32066842193.jpg",
"description": null,
"content": "",
"createTime": 1449470243000,
"updateTime": null
},
{
"id": 16,
"title": "",
"imgBriefUrl": "/images/news/48b79d5fcfad4b6d94bfa18229db1e92.jpg",
"imgContentUrl": "/images/news/fe5d3915da464456a222374bc95bd793.jpg",
"description": null,
"content": "",
"createTime": 1449471854000,
"updateTime": null
}
]
},
"status": 1,
"info": "ok"
}
失败时返回结果:
{"data":null,"status":50004,"info":"update news error"}
7.获取今日错过的订单(10公里内,最多10个)
访问路径
http://apitest.bjwogan.com/?action=lostOrders&memberId=23004&lat=39.889&lon=116.341
参数
memberId 会员id
lat,lon 经纬度
返回结果中相关对应字段:
头像 : member.img
性别 :member.sex(1男2女)
姓名 :member.nickName
次数 : memberStat.totalPublish
金额 :money
时间 :publishTime
内容 :publishContent
地址 :address
状态 :status (1进行中2取消3被接单)
返回结果
{
"data": [
{
"member": {
"id": 4,
"nickName": "令狐飞雪",
"tel": "13120097615",
"sex": 0,
"img": "/2015-10-13/rycmoaedjx.jpg",
"level": 1,
"isLock": 0,
"lng": 116.162537,
"lat": 39.768,
"regLng": 116.327548,
"regLat": 39.791335,
"provinceId": 1,
"cityId": 1,
"districtId": 14,
"address": "北京市大兴区欣宁街靠近博雅Baobao乐园",
"regTime": 1441216936,
"isLogin": 1,
"vipStartTime": 0,
"vipEndTime": 0,
"lastBuyVipTime": 1444133816468,
"isDo": 1,
"leftUnread": 0,
"rightUnread": 1,
"updated": 2
},
"memberStat": {
"memberId": 4,
"totalPublish": 109,
"totalSubscribe": 39,
"totalCommentedTimes": 16,
"totalCommentedStar": 59,
"totalComplaintTimes": 0
},
"id": 23296,
"orderNumber": "144576000795763244",
"publisherMemberId": 4,
"subscriberMemberId": 875,
"provinceId": null,
"cityId": 1,
"districtId": 110106,
"publishContent": "尽快了",
"money": 1,
"deadline": 1445760720000,
"address": "北京市丰台区花乡镇大兴入口(G45大广高速入口南向)",
"sex": 0,
"img": "",
"publishTime": 1451359328000,
"payTime": null,
"updateTime": 1445761278136,
"hasPay": 1,
"hasOver": 0,
"hasCommentToSubscriber": 0,
"hasCommentToPublisher": 0,
"status": 2,
"lng": 116.345859,
"lat": 39.842209,
"hasConfPay": 0,
"confPayTime": 1451359328000,
"afterPayAllowCancel": 0,
"afterPayAllowCancelTime": null,
"askTaskTimes": 0,
"askMoneyTimes": 0,
"publisherAskCancel": 0,
"subscriberAllowCancel": 0,
"distanceRange": 10,
"subscriberCancel": 0,
"subscriberCancelTime": null,
"subscriberAskCancel": 0,
"publisherAllowCancel": 0,
"hasPayToAgent": 0,
"vipId": null,
"urgeRemainingTime": 0
}
],
"status": 1,
"info": "ok"
}
8.发红包
访问路径:
参数(必填)
publisherMemberId 发布者id(必填)
lat,lng 经纬度(必填)
money 红包金额(必填)
totalCount 红包个数(必填)
content 红包内容 (必填)
address 地址(必填)
返回结果中相关对应字段:
redId 红包id
publisherMemberId 发布者id
lat,lng 经纬度
money 红包金额
totalCount 红包个数
content 红包内容
address 地址
receivers 抢红包id字符串,以“,”区分
grabCount 共抢了几个
updateTime 更新时间
publishTime 发布时间
成功时返回结果:
{
"data": {
"id": 8,
"publisherMemberId": 1,
"money": 1,
"publishTime": 1453255646792,
"updateTime": null,
"totalCount": 0,
"grabCount": 0,
"lat": 34.43,
"lng": 32.12,
"receivers": null,
"content": null,
"address": null
},
"status": 1,
"info": "ok"
}
9.发红包支付宝参数获得接口
访问路径:
参数
redEnvelopeId 红包id(红包支付时必填)
orderId 单子id(单子支付时必填)
成功时返回结果:
{
"data": {
"aliPayParam": "_input_charset="utf-8"&body="orderDesc"&it_b_pay="30m"¬ify_url="http://58.30.16.58/?action=alipayNotify"&out_trade_no="red_8"&partner="2088911038937654"&payment_type="1"&seller_id="bjyinengxing@163.com"&service="mobile.securitypay.pay"&sign="dd08bd3f11a7610a47f152c3aece5483"&sign_type="MD5"&subject="orderTitle"&total_fee="1.0""
},
"status": 1,
"info": "ok"
}
10.发红包余额支付
访问路径:
参数
redId 红包id(红包支付时必填)
orderId 单子id(单子支付时必填)
成功时返回结果:
{"data":1,"status":1,"info":"ok"}
11.附近订单接口(包含附近红包)(已弃用)
访问路径:
http://localhost:8080/wogan/?action=getorderlist&memberid=833&lng=12.1&lat=12.1
参数
memberid 抢单人id(必填)
lat,lon 经纬度(必填)
返回结果中相关对应字段:
isRed (yes 是红包 , no 不是红包)
redId 红包id
content 红包内容
money 红包金额
serviceaddress 红包地址
publishtime 红包发布时间
成功时返回结果:
{
"status": 1,
"info": "获取成功",
"data": [
{
isRed : "yes",
"id": "",
"redId" ="10",
"ordernumber": "",
"frommemberid": "85",
"content": "嘿嘿",
"money": 0.92,
"timelength": "",
"serviceaddress": "北京市朝阳区建外街道华彬国际俱乐部会议中心",
"sex": "",
"range": "",
"img": "",
"publishtime": "今天 04时11分",
"status": "",
"vipID": "",
"countdown": "",
"member": {
"id": "85",
"nikename": "未命名",
"tel": "15010402100",
"sex": "0",
"img": "uploadfiles/58.png",
"level": "1",
"lock": "0",
"lng": "116.452580",
"lat": "39.906625",
"reg_lng": "116.325947",
"reg_lat": "39.79131",
"provinceid": "1",
"cityid": "1",
"districtid": "14",
"address": "北京市大兴区宏福西路靠近世嘉·博苑",
"regtime": "1441363189",
"totalincome": "2.76",
"txmoney": "0",
"zhifubao": "homa",
"weixin": "0",
"label": ",收银员,代驾,修手机,陪练,收垃圾,卖饮料,卖快餐,送水,买鞋子,卖衣服,盖房子,装修工,刷漆工,修电脑,快递员,跑腿的,有力气,搬运工",
"vipstarttime": "2015-09-13",
"vipendtime": "2015-10-12",
"lastbuyviptime": "",
"devicetype": "1",
"devicenumber": "020fc688f06",
"token": null,
"isMute": "0",
"tsstatic": "1",
"isDo": "0",
"leftTopUnRead": "0",
"rightUnRead": "1",
"qdstartime": null,
"qdendtime": null,
"distance_range": null,
"vercode": "37",
"certype": "0",
"updated": "2"
}
}
]
}
11.附近红包接口
访问路径:
http://apitest.bjwogan.com/?action=nearRedList&lng=116.331&lat=39.7633&memberid=1
参数
memberid 抢单人id(必填)
lat,lon 经纬度(必填)
返回结果中相关对应字段:
红包数组
成功时返回结果:
{
"data": [
{
"content": "赚钱拉啦",
"picture": "/uploadfiles/58.png",
"redId": "51",
"name": "未命名"
}
],
"status": 1,
"info": "ok"
}
12.抢红包接口
访问路径:
http://apitest.bjwogan.com/?action=grabRed&redId=56&memberId=1
参数
memberId 抢红包人id(必填)
redId 红包id(必填)
返回结果中相关对应字段:
红包数组 (status :0 正常,1 过期 , 2 抢光 , 3 该用户已经抢过 )
成功时返回结果:
{
"data": [
{
"status":"0",
"content": "赚钱拉啦",
"picture": "/uploadfiles/58.png",
"redId": "51",
"name": "未命名",
"currMoney":"0.01"
}
],
"status": 1,
"info": "ok"
}
12.抢红包列表接口
访问路径:
参数
memberId 抢红包人id(必填)
成功时返回结果:
{
"data": {
"totalMoney": 1.0,
"count": 1,
"name": "微爱吴江行",
"picture": "/2015-09-10/bpqiipwuah.jpg",
"list": [{
"name": "seven",
"picture": "/2015-10-17/rlslawpamo.jpg",
"content": "????",
"money": 1.0,
"createTime": 1453427331000,
"sex" : 1 (1男2女)
}]
},
"status": 1,
"info": "ok"
}
13.发红包列表接口
访问路径:
http://localhost:8080/wogan/?action=redSendList&memberId=2655
参数
memberId 发红包人id(必填)
成功时返回结果:
{
"data": {
"totalMoney": 2.01,(共发出的钱数)
"count": 2,(共发出的个数)
"name": "seven",
"picture": "/2015-10-17/rlslawpamo.jpg",
"list": [{
"moneyGrab": 0.01,(被抢的钱数)
"createTime": 1453444494000,
"grabCount": 0,(已抢个数)
"redId": 53,
"status": "0",(0 正常,1 过期 , 2 抢光)
"totalCount": 1,(共多少个)
"money": 0.01(该红包的金额)
},
{
"moneyGrab": 2.0,
"createTime": 1453615438000,
"grabCount": 0,
"redId": 55,
"status": "0",
"totalCount": 0,
"money": 2.0
}]
},
"status": 1,
"info": "ok"
}
14.单个红包领取详情接口
访问路径:
参数
redId 红包id(必填)
成功时返回结果:
{
"data": {
"totalMoney": 3, (该红包总金额)
"count": 5,(该红包总个数)
"grabCount": 2,(该红包抢过的个数)
"name": "seven",(发红包人名字)
"content": "?",(红包内容)
"picture": "/2015-10-17/rlslawpamo.jpg",(发红包人头像)
"status": "0",(0 正常,1 过期 , 2 抢光)
"moneyGrab": 2.8,(已抢金额)
"timeStr": "",(抢光历时时间)
"list": [
{
"name": "???",(领红包人名字)
"picture": "/uploadfiles/58.png",(领红包人头像)
"content": "?",(请忽略)
"money": 2.11,(抢到的金额)
"createTime": 1453778118000,(抢红包时间)
"sex": 1(抢红包人性别)
},
{
"name": "seven",
"picture": "/2015-10-17/rlslawpamo.jpg",
"content": "?",
"money": 0.69,
"createTime": 1453778125000,
"sex": 1
}
]
},
"status": 1,
"info": "ok"
}
15.微信支付统一下单接口
访问路径:
参数(两个参数只传一个)
redEnvelopeId 红包id
orderId订单id
成功时返回结果:
{
"data": {
"appid": "wxa95578382cc9a58a",
"partnerid": "1321767901",
"prepayid": "wx201603161144385770dd857b0183261787",
"package_alia": "Sign=WXPay",
"noncestr": "8a08700d7ac143fe89c9ec589c48e6f7",
"timestamp": "1458099895",
"sign": "1a2a2f4b3f2ef4bc10d05f3d09527e47"
},
"status": 1,
"info": "ok"
}
16.微信支付结果通知接口
访问路径:
参数(通过post请求)
成功时返回结果:
<xml>
<return_code><![CDATA[SUCCESS]]></return_code>
<return_msg><![CDATA[OK]]></return_msg>
</xml>
17.
访问路径:
参数(通过post请求) 最多三张,每张不超过2M ,格式限制(jpg,png,jpeg)
成功时返回结果:
{
"data": "http://photo.bjwogan.com/img/orderImg/201603/f13d2e6fb01b47749d429d865fbed95d.jpg",
"status": 1,
"info": "ok"
}
18.申请议价
访问路径:
http://apitest.bjwogan.com/?action=orderPre&orderId=1&memberId=2&money=3
参数:
orderId 订单id
memberId 会员id
money 金额
成功时返回结果(返回议价单记录id):
{"data":2,"status":1,"info":"ok"}
19.议价单列表
访问路径:
http://apitest.bjwogan.com/?action=orderPreView&orderId=1
参数:
orderId 订单id
成功时返回结果:
结果说明:
nickname 昵称
portrait 头像
idName 身份
money 金额
{
"data": [
{
"id": 0,
"nickname": "微爱吴江行",
"portrait": "http://photo.bjwogan.com/image//2016-06-30/isdxbfdgbu.jpg",
"idName": "普通用户",
"money": 1
}
],
"status": 1,
"info": "ok"
}
20.议价单预处理接口
访问路径:
http://apitest.bjwogan.com/?action=prePayBargainOrder&orderPreId=1
参数:
orderPreId 议价单id
成功时返回结果(返回议价单记录id):
{"data":"","status":1,"info":"ok"}
21.商家商品列表页视图接口
访问路径:
http://apitest.bjwogan.com/?action=getGoldCataloguePage&memberId=24097
参数:
memberId 会员id
成功时返回结果:
结果说明:
memberId 会员id nickname 昵称 portrait 头像 storeName 店铺名字 mainImgs 主图 storeDesc 店铺描述 list. cateId 类型id list. goodsId 商品id list. inventory 商品库存 list. price 商品价格 list. discount 商品折扣 list. category 商品分类名字 list. name 商品名字 list. description 商品描述 list. img 商品图片
{
"data": {
"memberId": 24097,
"nickname": "Vivian",
"portrait": "http://phototest.bjwogan.com/image//2016-07-29/dtcesvxocs.jpg",
"storeName": "包子铺",
"mainImgs": "http://photo.bjwogan.com/img//orderImg/201607/dca5191ed3714b0192a3050d84af09e6.jpeg,http://photo.bjwogan.com/img//orderImg/201607/1ab5f2e003dc470186526a00617dcbe9.jpeg",
"storeDesc": "狗不理包子是天津市中国传统风味小吃,始创于公元1858年(清朝咸丰年间),为“天津三绝”之首,是中华老字号之一。",
"list": [
{
"cateId": 1,
"goodsId": 1,
"inventory": 10,
"price": 1,
"discount": 1,
"category": "甜的",
"name": "冰激凌",
"description": "这是冰激凌",
"img": "http://gold.jinhd.cn/uploads/1471421529.jpg"
},
{
"cateId": 1,
"goodsId": 2,
"inventory": 10,
"price": 2,
"discount": 1,
"category": "甜的",
"name": "香芋派",
"description": "这是香芋派",
"img": "http://gold.jinhd.cn/uploads/1471421529.jpg"
},
{
"cateId": 2,
"goodsId": 3,
"inventory": 10,
"price": 3,
"discount": 1,
"category": "咸的",
"name": "清炒西兰花",
"description": "这是清炒西兰花",
"img": "http://gold.jinhd.cn/uploads/1471421513.jpg"
},
{
"cateId": 2,
"goodsId": 4,
"inventory": 10,
"price": 4,
"discount": 1,
"category": "咸的",
"name": "油焖大虾",
"description": "这是油焖大虾",
"img": "http://gold.jinhd.cn/uploads/1471416054.jpg"
}
]
},
"status": 1,
"info": "ok"
}
22.订单详情页接口
访问路径:
http://apitest.bjwogan.com/?action=goldOrderDetail&goldOrderId=1
参数:
goldOrderId 订单id
成功时返回结果:
{
"data": {
"goodsList": [
{
"price": "1.0",
"count": "2",
"name": "冰激凌"
},
{
"price": "2.0",
"count": "3",
"name": "香芋派"
}
],
"storeInfo": {
"memberId": 50,
"nickname": "简单",
"portrait": "http://phototest.bjwogan.com/image//2016-08-10/zsnwlcufsu.jpg",
"storeName": "生活服务",
"mainImgs": "http://photo.bjwogan.com/img//orderImg/201607/5fa70a6e9a594789a41d7836aa037971.jpeg",
"storeDesc": "解决人们生活中的各种琐碎之事,让你的诉求在这里得到最快、最专业解决。",
"list": null
},
"shippingDetail": {
"orderId": 1,
"contactName": "大胃王",
"address": "兴创大厦902",
"contactPhone": "1889998888",
"shippingType": "1",
"diliveryman": "Xman",
"diliveryPhone": "1888888888",
"notes": "要辣的",
"status": 1,
"fee": 10,
"updateTime": 1471920376000
}
},
"status": 1,
"info": "ok"
}
23.商家订单列表接口
访问路径:
参数:
memberId 下单人id
http://apitest.bjwogan.com/?action=goldOrderListView&memberId=13
成功时返回结果:
结果说明
status 0 下单,1 已支付,2已完成
{
"data": [
{
"id": 1,
"totalMoney": 8,
"storeName": "生活服务",
"nickName": "简单",
"mainImgs": "http://photo.bjwogan.com/img//orderImg/201607/5fa70a6e9a594789a41d7836aa037971.jpeg",
"status": 1,
"createTime": 1471920175000
}
],
"status": 1,
"info": "ok"
}
网友评论