import { POST } from './Request.js'; let app = getApp(); let base = app.globalData.url; let grabase = app.globalData.graurl; // 门店详情 export const getQrCodeDetail = params => { return POST('POST', `${grabase}/payQrCode/getQrCodeDetail`, params).then(res => res.data); } //银行卡识别 export const recognizeBankCard = params => { return POST('GET', `${grabase}/ocr/recognizeBankCard`, params).then(res => res.data); } //创建 JSAPI 订单 export const createJSAPIOrder = params => { return POST('POST', `${grabase}/tradeOrder/createJSAPIOrder`, params).then(res => res.data); } // 支付 JSAPI 订单 export const jsapiPay = params => { return POST('POST', `${grabase}/pay/jsapiPay`, params).then(res => res.data); } //计算价格 export const calculation = params => { return POST('GET', `${grabase}/tradeOrder/calculation`, params).then(res => res.data); } //H5 code 转化openid export const getH5AccessToken = params => { return POST('GET', `${base}/wechat/getH5AccessToken`, params).then(res => res.data); } //支付宝获取openid export const getAlipayUserId = params => { return POST('GET', `${grabase}/login/getAlipayUserId`, params).then(res => res.data); } //获取登录验证码 export const getLoginSMSCode = params => { return POST('POST', `${base}/sms/getLoginSMSCode`, params).then(res => res.data); } //手机号登录 export const phone = params => { return POST('POST', `${base}/login/phone`, params).then(res => res.data); } //获取用户积分余额 export const getUserAccount = params => { return POST('POST', `${base}/getUserAccount`, params).then(res => res.data); } //退出登录 export const loginout = params => { return POST('POST', `${base}/login/out`, params).then(res => res.data); } //获取用户信息 export const getUserDetail = params => { return POST('POST', `${base}/getUserDetail`, params).then(res => res.data); } //查询优惠券 export const queryUserDiscountList = params => { return POST('GET', `${base}/discount/queryUserDiscountList`, params).then(res => res.data); } // 获取拉卡拉银联用户id export const getLkLUnionUserId = params => { return POST('POST', `${grabase}/tradeOrder/getLkLUnionUserId`, params).then(res => res.data); }