You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/Utils/Api.js

676 lines
24 KiB

import {
POST
} from "./Request.js";
import {
POSTBREST
} from "./bRequest.js";
let app = getApp();
let base = app.globalData.url;
2 years ago
let orderbase = app.globalData.orderurl;
let userbase = app.globalData.userurl;
let v1base = app.globalData.v1url;
2 years ago
let brestBase = app.globalData.brestUrl;
//公众号获取跳小程序参数
export const verifyWx = params => {
return POST('GET', `${v1base}/wxMsg/verifyWx`, params).then(res => res.data);
2 years ago
}
//公众号获取跳转小程序地址
export const getScheme = params => {
return POST('GET', `${v1base}/wxMsg/getScheme`, params).then(res => res.data);
2 years ago
}
//微信登录获取手机号
export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
};
//获取用户授权信息
export const getUserInfo = params => {
return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data);
}
// 设置用户积分支付密码
export const setUserPayPwd = params => {
return POST('POST', `${base}/highUser/setUserPayPwd`, params).then(res => res.data);
}
// 修改用户积分支付密码
export const updateUserPayPwd = params => {
return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data);
}
//经纬度转换
export const findByLatAndLng = params => {
return POST('GET', `${base}/common/findByLatAndLng`, params).then(res => res.data);
}
//获取用户信息
// export const findUser = params => {
// return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data);
// }
//微信登录
export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
};
//通过openid获取用户的信息
export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
};
//获取卡券,优选列表
export const getCouponList = params => {
return POST('GET', `${base}/coupon/getCouponList`, params).then(res => res.data);
};
4 years ago
//获取门店信息
export const getStoreListByCoupon = params => {
return POST('GET', `${base}/highMerchantStore/getStoreListByCoupon`, params).then(res => res.data);
}
4 years ago
//根据门店ID 获取门店详情
export const getMerchantStoreById = params => {
return POST('GET', `${base}/highMerchantStore/getMerchantStoreById`, params).then(res => res.data);
}
//根据门店ID 获取卡券
export const getCouponListByStoreId = params => {
return POST('GET', `${base}/coupon/getCouponListByStoreId`, params).then(res => res.data);
}
//获取优选商品分类
export const getListGoodsType = params => {
return POST('GET', `${base}/highGoodsType/getListGoodsType`, params).then(res => res.data);
}
//获取优选商品品牌列表
export const getBrandByList = params => {
return POST('GET', `${base}/highBrand/getBrandByList`, params).then(res => res.data);
}
// 优选商品列表
export const getBrandCouponList = params => {
return POST('GET', `${base}/coupon/getCouponList`, params).then(res => res.data);
}
//优选商品详情
export const getPreByOrderIdId = params => {
return POST('GET', `${base}/orderPre/getPreByOrderIdId`, params).then(res => res.data);
}
//优选商品预约完成
export const orderComplete = params => {
return POST('POST', `${base}/orderPre/orderComplete`, params).then(res => res.data);
}
//卡券详情
export const getCouponById = params => {
return POST('GET', `${base}/coupon/getCouponById`, params).then(res => res.data);
}
//生成订单
export const addOrder = params => {
return POST('POST', `${base}/highOrder/addOrder`, params).then(res => res.data);
}
//获取订单支付信息
export const orderToPay = params => {
return POST('POST', `${base}/order/orderToPay`, params).then(res => res.data);
}
//积分支付
export const orderToGoldPay = params => {
return POST('POST', `${base}/order/orderToGoldPay`, params).then(res => res.data);
}
//查询用户积分使用情况
export const getUserGoldRecList = params => {
return POST('GET', `${base}/highGoldRec/getUserGoldRecList`, params).then(res => res.data);
2 years ago
}
//查询积分7天过期
export const selectByExpiringSoon = params => {
return POST('GET', `${base}/highGoldRec/selectByExpiringSoon`, params).then(res => res.data);
2 years ago
}
//获取用户卡券
export const getUserCouponList = params => {
return POST('GET', `${base}/coupon/getUserCouponList`, params).then(res => res.data);
}
//获取用户卡券详情
export const getUserCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserCouponDetail`, params).then(res => res.data);
}
//获取用户最新卡券详情
export const getUserNewCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data);
}
//取消订单
export const cancelOrder = params => {
return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data);
}
//订单查询详情
export const getOrderById = params => {
return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data);
2 years ago
}
//获取商户列表
4 years ago
export const getMerchantList = params => {
return POST('GET', `${base}/highMerchantStore/getMerchantList`, params).then(res => res.data);
}
//首页获取门店
export const getStoreListByMerchant = params => {
return POST('GET', `${base}/highMerchantStore/getStoreListByMerchant`, params).then(res => res.data);
}
//获取优惠券详情
export const getDiscountByQrCode = params => {
return POST('GET', `${base}/discount/getDiscountByQrCode`, params).then(res => res.data);
}
//查询话费优惠券
export const getUserOrderPreList = params => {
return POST('GET', `${base}/userDiscount/getUserExclusiveDiscount`, params).then(res => res.data);
}
4 years ago
//领取优惠券
export const receiveDiscount = params => {
return POST('POST', `${base}/userDiscount/receiveDiscount`, params).then(res => res.data);
2 years ago
}
//领取优惠券
export const receive = params => {
return POST('POST', `${base}/userDiscount/receive`, params).then(res => res.data);
2 years ago
}
//根据code查询优惠券
export const getDiscountByCode = params => {
return POST('GET', `${base}/discount/getDiscountByCode`, params).then(res => res.data);
2 years ago
}
//站内信列表
export const queryMsgByList = params => {
return POST('GET', `${base}/bsMsg/queryMsgByList`, params).then(res => res.data);
}
4 years ago
// 根据优惠券查卡券
export const getCouponByDiscount = params => {
return POST('GET', `${base}/discount/getCouponByDiscount`, params).then(res => res.data);
}
// 重新领取卡券
export const againReceiveCoupon = params => {
return POST('GET', `${base}/coupon/againReceiveCoupon`, params).then(res => res.data);
}
//使用优惠券
export const useDiscount = params => {
return POST('GET', `${base}/discount/useDiscount`, params).then(res => res.data);
}
4 years ago
//我的优惠券查详情
export const getDiscountByUserDiscountId = params => {
return POST('GET', `${base}/userDiscount/getDiscountByUserDiscountId`, params).then(res => res.data);
}
//确认订单查优惠券
export const getUserNormalDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserNormalDiscountList`, params).then(res => res.data);
}
//搜索门店
export const getStoreList = params => {
return POST('GET', `${base}/highMerchantStore/getStoreList`, params).then(res => res.data);
}
//查询团油列表
export const getGasStoreList = params => {
return POST('GET', `${base}/highGas/getGasStoreList`, params).then(res => res.data);
}
//查询团油详情
export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
}
//团油一键加油查询详情
export const recentGasStation = params => {
return POST('GET', `${base}/highGas/recentGasStation`, params).then(res => res.data);
}
//团油距离限制
export const getDictionaryByCodeTypeOl = params => {
return POST('GET', `${base}/common/getDictionaryByCodeTypeOl`, params).then(res => res.data);
}
//团油计算价格
export const oilPriceCompute = params => {
return POST('GET', `${base}/highGas/oilPriceCompute`, params).then(res => res.data);
}
//团油计算新价格
export const oilPriceDiscountCompute = params => {
return POST('GET', `${base}/highGas/oilPriceDiscountCompute`, params).then(res => res.data);
2 years ago
}
//在线加油优惠券
export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data);
}
//查询卡数据字典
export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data);
}
//获取已开通的省份
export const getDredgeProvince = params => {
return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data);
}
3 years ago
//获取cms
export const getCmsContent = params => {
return POST('GET', `${base}/cmsContent/getCmsContent`, params).then(res => res.data);
}
//设置用户参数
export const setCacheParam = params => {
return POST('POST', `${base}/highUser/setCacheParam`, params).then(res => res.data);
}
//查询充值话费详情
export const getPhoneOrderById = params => {
return POST('GET', `${base}/outRechargeOrder/getOrderById`, params).then(res => res.data);
}
// 取消话费订单
export const cancelRechargeOrder = params => {
return POST('GET', `${base}/outRechargeOrder/cancelOrder`, params).then(res => res.data);
}
//优惠券包列表
export const getDiscountPackageList = params => {
return POST('GET', `${base}/discountPackage/getDiscountPackageList`, params).then(res => res.data);
}
//优惠券包详情
export const getDiscountPackageDetail = params => {
return POST('GET', `${base}/discountPackage/getDiscountPackageDetail`, params).then(res => res.data);
}
/**
* 工会卡
*/
//根据卡号查询
export const getHuiLianTongCardByCardNo = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByCardNo`, params).then(res => res.data);
}
//查询油卡详情
export const getDetailByCardNo = params => {
return POST('GET', `${base}/oilCard/getDetailByCardNo`, params).then(res => res.data);
}
// 获取用户卡号列表
export const getUserCardList = params => {
return POST('GET', `${base}/highUserCard/getUserCardList`, params).then(res => res.data);
}
// 根据手机号获取汇联通工会卡列表
export const getHuiLianTongCardByPhone = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByPhone`, params).then(res => res.data);
}
//查询油卡消费
export const getOilCardRecordList = params => {
return POST('GET', `${base}/oilCard/getOilCardRecordList`, params).then(res => res.data);
}
// 删除用户卡号
export const delUserCard = params => {
return POST('POST', `${base}/highUserCard/delUserCard`, params).then(res => res.data);
}
// 查询汇联通工会卡详情
export const getHuiLianTongCardBalance = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardBalance?`, params).then(res => res.data);
}
// 查询汇联通工会卡消费记录
export const getHuiLianTongCardConsume = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardConsume`, params).then(res => res.data);
}
// 汇联通工会卡支付
export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
}
//绑定卡包
export const bindHuiLianTongCard = params => {
return POST('POST', `${base}/highUserCard/bindCard`, params).then(res => res.data);
}
//手机短信登录
export const loginByTel = params => {
return POST('GET', `${base}/wechat/loginByTel`, params).then(res => res.data);
}
/**
* 工会卡
*/
/**
* 抽奖活动
*/
export const getActivityByCoupon = params => {
return POST('GET', `${base}/activity/getActivityByCoupon`, params).then(res => res.data);
}
/**
* 用户抽奖
*/
export const userLottery = params => {
return POST('POST', `${base}/activity/userLottery`, params).then(res => res.data);
}
/**
* 获取用户抽奖次数
*/
export const getUserLotteryNum = params => {
return POST('GET', `${base}/activity/getUserLotteryNum`, params).then(res => res.data);
}
/**
* 查询中奖列表只会提供最新的50条数据
*/
export const getWinLotteryList = params => {
return POST('GET', `${base}/activity/getWinLotteryList`, params).then(res => res.data);
}
//跳转是否赠券
export const getMembershipLevel = params => {
return POST('GET', `${base}/highUser/GetMembershipLevel`, params).then(res => res.data);
2 years ago
}
//查询配置方式
export const getThirdPartyByDetail = params => {
return POST('GET', `${base}/highThirdParty/getThirdPartyByDetail`, params).then(res => res.data);
2 years ago
}
/**
* 肯德基地址
*/
export const getTPigKFCToken = params => {
return POST('GET', `${base}/tPig/getTPigKFCToken`, params).then(res => res.data);
}
//查询城市列表
export const getAllCity = params => {
return POST('GET', `${base}/highThirdParty/getAllCity`, params).then(res => res.data);
2 years ago
}
//首页城市选择
export const findCompanyByCityName = params => {
return POST('GET', `${base}/common/findCompanyByCityName`, params).then(res => res.data);
2 years ago
}
//查询肯德基门店列表
export const getKfcStoresList = params => {
return POST('GET', `${base}/highThirdParty/getKfcStoresList`, params).then(res => res.data);
2 years ago
}
//肯德基商品详情
export const listByStoreCode = params => {
return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
2 years ago
}
//肯德基订单详情
export const getThirdOrderByOrderNo = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data);
2 years ago
}
//电影票
export const getTPigCinemaToken = params => {
return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data);
}
//星巴克
//门店列表
export const getStarbucksStore = params => {
return POST('GET', `${base}/highThirdParty/getStarbucksStore`, params).then(res => res.data);
}
export const getStarbucksProducts = params => {
return POST('GET', `${base}/highThirdParty/getStarbucksProducts`, params).then(res => res.data);
}
2 years ago
//微信支付千猪
export const qianzhuorderToPayByWx = params => {
return POST('POST', `${base}/thirdOrder/orderToPayByWx`, params).then(res => res.data);
2 years ago
}
//会员充值产品
export const getMemberProducts = params => {
return POST('GET', `${base}/highThirdParty/getMemberProducts`, params).then(res => res.data);
2 years ago
}
//分销统计数据
export const userDistributionStatistics = params => {
return POST('GET', `${base}/highUser/userDistributionStatistics`, params).then(res => res.data);
2 years ago
}
//邀请列表
export const distributionInviteList = params => {
return POST('GET', `${base}/highUser/distributionInviteList`, params).then(res => res.data);
2 years ago
}
//分销用户积分列表
export const distributionOrderList = params => {
return POST('GET', `${base}/highUser/distributionOrderList`, params).then(res => res.data);
2 years ago
}
//分销用户积分列表
export const promoteOrderList = params => {
return POST('GET', `${base}/highUser/promoteOrderList`, params).then(res => res.data);
2 years ago
}
//生成海报
export const promotionalPosters = params => {
return POST('GET', `${base}/highUser/promotionalPosters`, params).then(res => res.data);
2 years ago
}
3 years ago
export const qzOrderToPay = params => {
return POST('POST', `${base}/order/qzOrderToPay`, params).then(res => res.data);
}
3 years ago
//电话费
export const getGatewayToken = params => {
return POST('GET', `${base}/tPig/getGatewayToken`, params).then(res => res.data);
}
2 years ago
//中石油生成二维码
export const getVerifyQRCode = params => {
return POST('GET', `${base}/coupon/getVerifyQRCode`, params).then(res => res.data);
2 years ago
}
/**
* H5 获取用户信息
2 years ago
*/
//判断是否有手机号
export const getH5AccessByOpenId = params => {
return POST('GET', `${base}/wechat/getH5AccessByOpenId`, params).then(res => res.data);
}
2 years ago
//h5静默登陆
export const loginBySilence = params => {
return POST('GET', `${base}/wechat/loginBySilence`, params).then(res => res.data);
2 years ago
}
export const getH5UserInfo = params => {
return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data);
}
//获取验证码
export const sendSmsCodeByHw = params => {
return POST('GET', `${base}/SendSms/sendSmsCodeByHw`, params).then(res => res.data);
}
//绑定手机号
export const bindUserPhone = params => {
return POST('GET', `${base}/highUser/bindUserPhone`, params).then(res => res.data);
}
//注册
export const H5login = params => {
return POST('GET', `${base}/user/login`, params).then(res => res.data);
}
export const getH5AccessToken = params => {
return POSTBREST('GET', `${base}/wechat/getH5AccessToken`, params).then(res => res.data);
}
//**门店//
export const userLogin = params => {
return POST('POST', `${brestBase}/login/userLogin`, params).then(res => res.data);
}
//门店扫码销核
export const useCouponCode = params => {
return POSTBREST('POST', `${brestBase}/couponCode/useCouponCode`, params).then(res => res.data);
}
//**代理商//
export const getAgentCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentCount`, params).then(res => res.data);
}
//推送贵州中石化
export const pushGzSinopec = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/pushGzSinopec`, params).then(res => res.data);
}
// 查询销售码
export const getCodeListByAgentCoupon = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeListByAgentCoupon`, params).then(res => res.data);
}
// 生成二维码
export const generateCode = params => {
4 years ago
return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
2 years ago
}
// 兑换码填写备注
export const highremark = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data);
}
//查询兑换码
export const getAgentConvertCodeCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentConvertCodeCount`, params).then(res => res.data);
}
// 查看二维码
export const getCodeById = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data);
}
// 查看流水
export const getAgentSalesCodeList = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentSalesCodeList`, params).then(res => res.data);
}
//查询流水总价格
export const getAgentSalesPriceCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentSalesPriceCount`, params).then(res => res.data);
}
//修改密码
export const sendUserPass = params => {
return POSTBREST('POST', `${brestBase}/secUser/sendUserPass`, params).then(res => res.data);
}
//增加子代理商
export const insertChildAgent = params => {
return POSTBREST('POST', `${brestBase}/highAgent/insertChildAgent`, params).then(res => res.data);
}
//变更代理商状态
export const changeAgentStatus = params => {
return POSTBREST('GET', `${brestBase}/highAgent/changeAgentStatus`, params).then(res => res.data);
}
//查询子级代理商列表
export const getChildAgentList = params => {
return POSTBREST('GET', `${brestBase}/highAgent/getChildAgentList`, params).then(res => res.data);
}
//分发给子代理商
export const assignCouponChildAgent = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/assignCouponChildAgent`, params).then(res => res.data);
}
//根据代理商 查询卡券
export const getCouponByAgent = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCouponByAgent`, params).then(res => res.data);
}
//根据卡券与代理商关系 查询分发记录
export const getRecordByCouponAgentId = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getRecordByCouponAgentId`, params).then(res => res.data);
}
// 话费
//积分支付
export const orderToGoldPayunion = params => {
return POST('POST', `${base}/outRechargeOrder/orderToGoldPay`, params).then(res => res.data);
}
//提交订单
export const addOrderPay = params => {
return POST('POST', `${base}/outRechargeOrder/addOrder`, params).then(res => res.data);
}
//油卡支付
export const oilCardPay = params => {
return POST('POST', `${base}/order/oilCardPay`, params).then(res => res.data);
}
//话费充值查询
export const getListOutRechargePrice = params => {
return POST('GET', `${base}/outRechargePrice/getRechargePriceByList`, params).then(res => res.data);
}
//查询话费详情
export const findById = params => {
return POST('GET', `${base}/outRechargePrice/findById`, params).then(res => res.data);
}
//提交订单
export const orderToPayByWx = params => {
return POST('POST', `${base}/czOrder/orderToPayByWx`, params).then(res => res.data);
}
//工会卡支付
export const hltUnionCardPayghk = params => {
return POST('POST', `${base}/czOrder/hltUnionCardPay`, params).then(res => res.data);
2 years ago
}
export const czhltUnionCardPay = params => {
return POST('POST', `${base}/thirdOrder/hltUnionCardPay`, params).then(res => res.data);
2 years ago
}
//话费列表
export const getUserOrderListhuafei = params => {
return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data);
2 years ago
}
//肯德基返利
export const getRebateIntegral = params => {
return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
2 years ago
}
// -----------订单新接口------------
//新建订单
export const create = params => {
return POST('POST', `${orderbase}/create`, params).then(res => res.data);
}
//获取订单列表
export const getUserOrderList = params => {
return POST('GET', `${orderbase}/getUserOrderList`, params).then(res => res.data);
}
//订单详情
export const getDetailByOrderNo = params => {
return POST('GET', `${orderbase}/getDetailByOrderNo`, params).then(res => res.data);
}
//取消订单
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}
//微信支付
export const wechatPay = params => {
return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data);
}
//工会卡、油卡
export const cardPay = params => {
return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
}
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${orderbase}/orderCheck`, params).then(res => res.data);
}
//在线加油详情
export const getOrderByOrderNo = params => {
return POST('GET', `${orderbase}/oil/getOrderByOrderNo`, params).then(res => res.data);
}
//----------------我的页面接口
// 获取登录验证码
export const getLoginSMSCode = params => {
return POST('POST', `${userbase}/sms/getLoginSMSCode`, params).then(res => res.data);
}
// 手机号登录
export const phone = params => {
return POST('POST', `${userbase}/login/phone`, params).then(res => res.data);
}
// 微信小程序code解析
export const HandleCode = params => {
return POST('POST', `${userbase}/login/wxMiniHandleCode`, params).then(res => res.data);
}
// 微信小程序授权手机号登录
export const loginByPhone = params => {
return POST('POST', `${userbase}/login/wxMini`, params).then(res => res.data);
}
// 退出登录
export const loginOut = params => {
return POST('POST', `${userbase}/login/out`, params).then(res => res.data);
}
// 获取用户信息
export const findUser = params => {
return POST('POST', `${userbase}/getUserDetail`, params).then(res => res.data);
}
// 获取用户余额
export const getUserAccount = params => {
return POST('POST', `${userbase}/getUserAccount`, params).then(res => res.data);
}
//查询优惠券
export const getUserDiscountList = params => {
return POST('GET', `${userbase}/discount/getUserDiscountList`, params).then(res => res.data);
}