import request from "@/utils/request.js"; /* 首页*/ // 查询轮播数据 export function getAdsList(data) { return request.get("v1/re/ads/list",data); } // 查询首页公告消息 export function getNoticeList(data) { return request.get("v1/notice-list",data); } // 根据一级商品分类查询二级商品分类 export function getCategoryOne(data) { return request.get("/v1/re/category/list",data); } // 根据一级商品分类查询二级商品分类 export function getCategoryTwo(data) { return request.get("v1/re/category/list",data); } // 商品分页查询 export function getGoodsPage(data) { return request.get("v1/goods-page",data); } // 根据用户Id查询首页商品列表 export function getIndexData(data) { return request.get("v1/index-data",data); } // 根据商品列表 export function getGoodsInfo(data) { return request.get("v1/re/goodsInfo/page",data); } /* 商品详情*/ // 商品详情 export function getGoodsDetail(data) { return request.get("v1/re/goodsInfo/detail",data); } // 获取用户收获地址 export function getUserAddressByUserId(data) { return request.get("v1/userAddress-detailByUserId",data); } // export function getUserAddressByIdAndFreight(data) { return request.get("v1/userAddress-detailByIdAndFreight",data); } // export function getAvailableChec(data) { return request.get("v1/re/order/availableChec",data); } // 获取用户地址列表 export function getUserAddressPage(data) { return request.get("v1/userAddress-page",data); } // 保存地址 export function postUserAddressSave(data) { return request.post("v1/userAddress-save",data); } // 更改地址 export function postUserAddressUpdate(data) { return request.post("v1/userAddress-update",data); } // 查询用户地址详情 export function getUserAddressDetailById(data) { return request.get("v1/userAddress-detailById",data); } // 查询用户地址详情 export function postUserAddressRemove(data) { let url = "ids="+data.ids return request.post("v1/userAddress-remove?"+url,data); } // 查询用户订单接口 export function getUserOrderPage(data) { return request.get("v1/finance/order-page",data); } // 根据用户订单NO查询物流信息 export function getOrderLogistic(data) { return request.get("v1/order/logistic",data); } // 根据用户订单NO查询信息 export function getOrderDetailById(data) { return request.get("v1/order/detail",data); } // 取消订单 export function postUserOrderCancel(data) { let url = "id="+data.id return request.post("v1/finance/order-cancel?"+url,data); } // 申请退款 export function postUserOrderRefund(data) { let url = "id="+data.id return request.post("v1/finance/order-refund?"+url,data); } // 立即购买下单前置校验 export function postBeforeCheck(data) { return request.post("v1/re/order/beforeCheck",data); } // 进入商品详情可售检测 export function getAvailableCheck(data) { return request.get("v1/re/order/availableCheck",data); } // 立即购买下单前置校验 export function postOrderSubmit(data) { return request.post("v1/re/order/submit",data); } // jspai下单API export function postJsapiPay(data) { let url = "?openid="+data.openId + "&outTradeNo="+data.outTradeNo return request.post("v1/wxPay/v3/jsapiPay"+url,data); } // 获取手机验证码VS export function postSendValidate(data) { let url = "?phone="+data.phone return request.post("v1/common/send-validate"+url,data,{ noAuth: true }); } // 获取手机验证码VS export function postUserRegister(data) { let url = "?phone="+data.phone+"&password="+data.password +"&captchaCode="+ data.captchaCode+"&captchaId="+data.captchaId +"&inviteCode="+data.inviteCode return request.post("v1/user-register"+url,data,{ noAuth: true }); } // 微信授权登录 export function postLoginAuth(data) { let url = "?code="+data.code+"&getPhoneNumberCode="+data.getPhoneNumberCode return request.post("v1/login/wx-auth"+url,data,{ noAuth: true, noVerify: true }); } // 服务商数据 export function postStatistics(data) { let url = "?userId="+data.userId return request.post("v1/linked/getStatistics"+url,data); } // 获取分享连接 export function postLinkedUrl(data) { // let url = "?code="+data.code+"&getPhoneNumberCode="+data.getPhoneNumberCode return request.post("v1/linked/getLinkedUser",data); } // 红包排行榜 export function leaderboard(data) { return request.get('v1/re/leaderboard', data) } // 红包首页数据-统计 export function todayStatistics(data) { return request.get('v1/re/todayStatistics', data) } // 绑定记录 export function linkedBindLogList(data) { return request.get('v1/linked/linkedBindLogList', data) } // 收益记录 export function earningsList(data) { return request.get('v1/linked/earningsList', data) } // 查询当前登录人领取的红包金额记录 export function logListByUserId(data) { return request.get('/v1/re/logListByUserId', data) } // 分页查询错失红包记录列表 export function exclusivePage(data) { return request.get('/v1/re/exclusivePage', data) } // 判断当前用户是否可以抢红包 export function grabFlag(data) { return request.get('/v1/re/grabFlagList', data) } // 抢红包 export function doGrab(data) { return request.get('/v1/re/grab', data) } // 直属伙伴 export function linkedUserList(data) { return request.get('/v1/linked/linkedUserList', data) } // 直推人数 export function userRecomPage(data) { return request.get('/v1/userRecom-page', data) } // 查询自己的创客人数 export function makerPage(data) { return request.post('/v1/makerPage', data) }