From 6b286309f323d735bc1f75cb7609c9f6c7ace0b6 Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Tue, 19 Jan 2021 15:00:26 +0800 Subject: [PATCH] 支付方式 -- 微信 --- src/api/orderPay/orderPay.js | 21 ++++++++++++++++++++- src/components/orderPay.vue | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- src/components/parkRecord.vue | 6 +++++- src/utils/utils.js | 3 ++- 4 files changed, 179 insertions(+), 30 deletions(-) diff --git a/src/api/orderPay/orderPay.js b/src/api/orderPay/orderPay.js index d16d93a..92964e0 100644 --- a/src/api/orderPay/orderPay.js +++ b/src/api/orderPay/orderPay.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -export function aliPay(params) { +export function aliPay(params) { // 支付宝 return request({ url: '/api/alipay/aliH5Pay', method: 'post', @@ -8,3 +8,22 @@ export function aliPay(params) { }) } + +export function getOpenId(params) { // 获取OpenId + return request({ + url: '/api//weixinPublicPay/getOpenIdByCode', + method: 'post', + data: params + }) +} + +export function vxPayQuery(params) { // 微信 + return request({ + url: '/api//weixinpay/publicUnifiedOrder', + method: 'post', + data: params + }) +} + + + diff --git a/src/components/orderPay.vue b/src/components/orderPay.vue index 2a5f231..29162b8 100644 --- a/src/components/orderPay.vue +++ b/src/components/orderPay.vue @@ -38,7 +38,8 @@