api = {
register: '/wechat/mc/registerUser', //登录
queryAllShops: '/we_unnecessary_shop/findShops', //查询所有店铺
queryAllFoods: '/we_unnecessary_shop/queryAllFoods', //查询所有商品
queryFood: '/we_unnecessary_shop/queryFoodById', //根据Id查询商品详情
queryAllAddress: '/we_necessary_shop/findAddressList', //查询所有地址
saveAddress: '/we_necessary_shop/saveAddress', //新建地址
deleteAddress: '/we_necessary_shop/deleteAddress', //删除地址
modifyAddress: '/we_necessary_shop/modifyAddress', //修改地址
pushOrder: '/we_necessary_shop/pushOrder', //提交订单
saveOrder: '/we_necessary_shop/saveOrder', //保存订单
queryAllOrders: '/we_necessary_shop/queryAllOrders', //获取全部订单
param:{
offset: 0,
limit: 10,
orderType: '',('待付款','待发货','已发货','已完成','待付款')
flag: 'we'
}
return :{
rows:xxxx
total:100
}
findByMemberId: '/we_necessary_shop/findByMemberId', //获取用户信息
queryAllFoodsHome: '/we_unnecessary_shop/queryAllFoodsHome', //查询所有商品
queryCouponByOpenId: '/we_necessary_shop/queryCoupons', //查询所有券
updateOrder: '/we_necessary_shop/updateOrder', //更新订单
getStoreQrCode: '/we_necessary_shop/getStoreQrCode', //获取储值核销二维码
};
================================================================================
1、注册用户
url:/wechat/mc/registerAppletUser
param:{
phoneNum:222
birthType:"阳历"/“阴历”,
birthDay:‘2019-03-09’,
shopId:1,
sex:'女',
nikeName:'ssewrwqe',
city:'西安',
province:‘陕西’,
headImgUrl:‘http://sdfasdfs.jpg’
}
return :{
flag:suceess,
data:1
}
2、获取openId
url:
/applet_unnecessary_shop/{code}
3、支付流程:
(1)点击提交订单:先保存订单,保存成功之后调用微信支付。
url: /we_necessary_shop / saveOrder
参数:
orderStr: {
"total": 1,
"orderItems": [
{
"foodId": 33,
"foodPic": "http://www.sxbingo.com:8080/sshui//47296a00-3236-4788-b3e3-9a289cc5d635.jpg",
"foodName": "【善水特惠】 仅售38元,价值48元单人浴资,节假日通用,免费WiFi,免费停车位,男女通用!",
"foodNum": 1,
"price": 38
}
],
"remark": "",
"orderType": "待付款",
"address": {
"id": "",
"userName": "",
"phone": "",
"address": ""
},
"totalPrice": "38.00",
"storeValue": 0
}
return:
(2)微信支付
url:/we_necessary_shop/pushOrder
参数;
4、储值核销
(1)获取储值核销二维码
见下面
(2)核销储值
/applet_necessary_shop/updateStore
param:{
cardNum:11111,
customOpenId:1111,
fromUserOpenId:222 //扫码人的openid
storeUsed:12 // 实际填入的值
}
5、我的积分 -> 兑换
we_unnecessary_shop/updateCardPoint
参数:
{
cardNum:1530982421237
pointNum:1113.8
couponNum:2
}
6、我的券:
applet_necessary_shop/queryCoupons
param:
{
openId:xXXXX
}
return
7、核销:
url: /applet_unnecessary_shop/getAppletQrCode
(1)浴资券兑换获取二维码
param:{
eventName:"scan_applet_coupon",
customOpenId:xxxx //客户的openid,
couponId:22222
}
(2)点击我的储值获取二维码
/applet_unnecessary_shop/getAppletQrCode
参数:
{
eventName:"scan_applet_store",
customOpenId:xxxx //客户的openid,
}
return:
{
二维码
}
(3)我的订单获取二维码
/applet_unnecessary_shop/getAppletQrCode
参数:
{
eventName:"scan_applet_order",
customOpenId:xxxx //客户的openid,
oId:111
}
return:
{
二维码
}
8、同步购物车商品
/applet_unnecessary_shop/synUserCartFoods
参数