feat(支付接口): 更新微信支付接口并新增支付查询接口
更新微信支付接口的URL,并将请求方法从GET改为POST。新增微信支付查询接口,以便支持支付状态查询功能。
Showing
1 changed file
with
12 additions
and
4 deletions
| ... | @@ -2,14 +2,15 @@ | ... | @@ -2,14 +2,15 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-06-09 13:32:44 | 3 | * @Date: 2022-06-09 13:32:44 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2022-06-09 13:42:06 | 5 | + * @LastEditTime: 2025-05-22 15:47:33 |
| 6 | - * @FilePath: /tswj/src/api/wx/config.js | 6 | + * @FilePath: /mlaj/src/api/wx/pay.js |
| 7 | * @Description: | 7 | * @Description: |
| 8 | */ | 8 | */ |
| 9 | import { fn, fetch } from '@/api/fn'; | 9 | import { fn, fetch } from '@/api/fn'; |
| 10 | 10 | ||
| 11 | const Api = { | 11 | const Api = { |
| 12 | - WX_PAY: 'c/bill_paymentForBill.do', | 12 | + WX_PAY: '/srv/?a=pay', |
| 13 | + WX_PAY_CHECK: '/srv/?a=pay_check', | ||
| 13 | } | 14 | } |
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| ... | @@ -17,4 +18,11 @@ const Api = { | ... | @@ -17,4 +18,11 @@ const Api = { |
| 17 | * @param {*} | 18 | * @param {*} |
| 18 | * @returns {*} | 19 | * @returns {*} |
| 19 | */ | 20 | */ |
| 20 | -export const wxPayAPI = (params) => fn(fetch.get(Api.WX_PAY, params)); | 21 | +export const wxPayAPI = (params) => fn(fetch.post(Api.WX_PAY, params)); |
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * @description 微信支付查询接口 | ||
| 25 | + * @param {*} params | ||
| 26 | + * @returns | ||
| 27 | + */ | ||
| 28 | +export const wxPayCheckAPI = (params) => fn(fetch.post(Api.WX_PAY_CHECK, params)); | ... | ... |
-
Please register or login to post a comment