You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
788 B
31 lines
788 B
2 years ago
|
/*
|
||
|
* @Author: ch
|
||
|
* @Date: 2022-04-28 16:30:54
|
||
|
* @LastEditors: ch
|
||
|
* @LastEditTime: 2022-04-28 17:00:54
|
||
|
* @Description: file content
|
||
|
*/
|
||
|
|
||
|
import {ToAsyncAwait, MsbRequest, MsbRequestTk} from '@/common/utils';
|
||
|
|
||
|
const BASE_URL = '/mall/trade';
|
||
|
const APPID = 'wx0643970a8e86d028'
|
||
|
/**
|
||
|
* 获取授权页面地址
|
||
|
* @param {*} data
|
||
|
*/
|
||
|
export const ApiGetAuthUrl = (params) =>
|
||
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/wx/mp/getAuthorizationUrl/${APPID}`, params));
|
||
|
/**
|
||
|
* 获取openId
|
||
|
* @param {*} data
|
||
|
*/
|
||
|
export const ApiGetOpenId = ({code}) =>
|
||
|
ToAsyncAwait(MsbRequest.get(`${BASE_URL}/wx/mp/getOpenId/${APPID}`, {code}));
|
||
|
|
||
|
/**
|
||
|
* 获取支付参数
|
||
|
* @param {*} data
|
||
|
*/
|
||
|
export const ApiPostWxPay = (data) =>
|
||
|
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/h5`, data));
|