diff --git a/common/api/wx.js b/common/api/wx.js index 20c65b0..ea3c6d7 100644 --- a/common/api/wx.js +++ b/common/api/wx.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-04-28 16:30:54 * @LastEditors: ch - * @LastEditTime: 2022-04-28 17:00:54 + * @LastEditTime: 2022-04-28 18:11:12 * @Description: file content */ @@ -24,8 +24,15 @@ export const ApiGetOpenId = ({code}) => ToAsyncAwait(MsbRequest.get(`${BASE_URL}/wx/mp/getOpenId/${APPID}`, {code})); /** - * 获取支付参数 + * 微信h5支付,获取支付URL * @param {*} data */ -export const ApiPostWxPay = (data) => - ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/h5`, data)); \ No newline at end of file +export const ApiPostWxH5Pay = (data) => + ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/h5`, data)); + +/** + * 微信JSAPI支付,获取支付参数 + * @param {*} data + */ +export const ApiPostWxJsApiPay = (data) => + ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/jsapi`, data)); \ No newline at end of file diff --git a/common/store/index.js b/common/store/index.js index d2e86c1..264ad57 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-03-22 18:28:52 * @LastEditors: ch - * @LastEditTime: 2022-04-28 16:45:47 + * @LastEditTime: 2022-04-28 18:05:32 * @Description: file content */ import Vue from 'vue' @@ -44,6 +44,9 @@ export default new Vuex.Store({ }, SET_SESSION_MSG_COUNT (state, data){ state.sessionMsgCount = data; + }, + SET_OPEN_ID (state, data){ + state.openId = data; } }, actions : { diff --git a/pages/order/submit.vue b/pages/order/submit.vue index bd7b4c6..f7178cd 100644 --- a/pages/order/submit.vue +++ b/pages/order/submit.vue @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-03-20 14:14:53 * @LastEditors: ch - * @LastEditTime: 2022-04-28 17:15:11 + * @LastEditTime: 2022-04-28 18:18:30 * @Description: file content -->