| | |
| | | const http = uni.$u.http; |
| | | const URL = config.baseURL; |
| | | |
| | | /* 获取商铺信息 */ |
| | | export const queryShop = (params, config = {}) => http.get(URL + |
| | | /* 根据cid获取商铺信息 */ |
| | | export const queryShopByCid = (params, config = {}) => http.get(URL + |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/queryShopById', params, config) |
| | | |
| | | /* 根据shopId获取商铺信息 */ |
| | | export const queryShopByShopId = (params, config = {}) => http.get(URL + |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/queryShopByShopId', params, config) |
| | | /* 获取积分价值 */ |
| | | export const getScoreWorth = (params, config = {}) => http.get(URL + |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/getScoreWorth', params, config) |
| | |
| | | /* 获取用户可用优惠券 面值最大的*/ |
| | | export const queryMyUseSweepPayMaxCoupon = (params, config = {}) => http.get(URL + |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/queryMyUseSweepPayMaxCoupon', params, config = {}); |
| | | |
| | | /* 获取用户可用优惠券 */ |
| | | export const queryUseSweepPayCoupon = (params, config = {}) => http.get(URL + |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/queryUseSweepPayCoupon', params, config = {}); |
| | |
| | | '/payfour-merchant/v1/web/aggregatePayAllin/getWxOrderInfo', |
| | | params, config = {}); |
| | | |
| | | /* 获取银行卡配置 */ |
| | | export const bankCardStyle = (params, config = {}) => http.get(URL + |
| | | '/payfour-base/v1/base/pc/global/config/bankCardStyle', |
| | | params, config = {}); |
| | | |
| | |
| | | "devServer" : { |
| | | "proxy" : { |
| | | "/dev-api" : { |
| | | "target" : "http://172.16.2.117:8080", |
| | | "target" : "http://172.16.2.119:8080", |
| | | "changeOrigin" : true, |
| | | "secure" : false, |
| | | "pathRewrite" : { |
| | |
| | | this.opt = opt |
| | | }, |
| | | onShow() { |
| | | let redirect_uri = `${config.webURL}/pay/scanpay?cid=${this.opt.cid||''}&shopId=${this.opt.shopId||''}&smoney=${this.opt.smoney||''}` |
| | | let redirect_uri = `${config.webURL}/pay/scanpay?cid=${this.opt.cid||''}&shopId=${this.opt.shopId||''}&activityQrcodeId=${this.opt.activityQrcodeId||''}&smoney=${this.opt.smoney||''}` |
| | | if(uni.getStorageSync('OPENID'+this.platform)){ |
| | | window.location.href = redirect_uri |
| | | return |
| | |
| | | ACCESSTOKEN |
| | | } from 'common/config.js'; |
| | | import { |
| | | queryShop, |
| | | queryShopByCid, |
| | | queryShopByShopId, |
| | | userLogin, |
| | | queryUseSweepPayCoupon, |
| | | getWechatConfigInfo, |
| | |
| | | showRemark: false, |
| | | UNIONID: null, |
| | | payWay: this.$utils.getPlat(), |
| | | cid: '', |
| | | cid: '', //码牌id C扫B静态码时有 |
| | | activityQrcodeId: '', //动态收款码 C扫B动态码时有 |
| | | shopId: '', //商户id C扫B动态码时有 |
| | | bordShow: false, // 显示键盘 |
| | | shopInfo: { |
| | | cusid: '', |
| | |
| | | this.money = opt.smoney |
| | | }else{ |
| | | this.bordShow = true |
| | | } |
| | | if (opt.activityQrcodeId) { |
| | | this.activityQrcodeId = opt.activityQrcodeId |
| | | // this.getOrderInfo() |
| | | } |
| | | if (opt.shopId) { |
| | | this.shopId = opt.shopId |
| | | this.init() |
| | | } |
| | | if (opt.cid) { |
| | | this.cid = opt.cid |
| | |
| | | this.tips = '当前用户过多,请稍后重试~_~' |
| | | this.loading = false |
| | | }, 2000) |
| | | let api = queryShopByCid |
| | | let params = { |
| | | cid: this.cid |
| | | } |
| | | if(this.cid){ |
| | | api = queryShopByCid |
| | | params = { |
| | | cid: this.cid |
| | | } |
| | | } |
| | | if(this.activityQrcodeId){ |
| | | api = queryShopByShopId |
| | | params = { |
| | | shopId: this.shopId |
| | | } |
| | | } |
| | | //获取商铺信息 |
| | | queryShop({ |
| | | params: { |
| | | cid: this.cid |
| | | } |
| | | api({ |
| | | params |
| | | }).then(res => { |
| | | clearTimeout(timer) |
| | | this.loading = false |
| | |
| | | // 金额 this.money |
| | | uni.showLoading() |
| | | const params = { |
| | | money: Number(this.money * 100), |
| | | shopId: this.shopInfo.id, |
| | | cid: this.cid, |
| | | payWay: this.payWay, |
| | | buyerNote: this.buyerNote, |
| | | score: 0, |
| | | couponDetailId: this.couponInfo.id |
| | | } |
| | | if(this.activityQrcodeId){ |
| | | params.activityQrcodeId = this.activityQrcodeId |
| | | } |
| | | if(this.cid){ |
| | | params.money = Number(this.money * 100) |
| | | params.shopId = this.shopInfo.id |
| | | params.cid = this.cid |
| | | } |
| | | //生成订单 |
| | | saveOrder(params).then(res => { |
| | | uni.hideLoading() |