12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import request from '@/utils/request'
- import requestWhite from '../utils/requestWhite.js';
-
- import Qs from 'qs';
- //微信支付
- export function wxpay(data) {
- return request({
- url: '/wxPay/wxJsapiPay',
- data: data,
- method: 'post',
- })
- }
- export function alpay(data) {
- return request({
- url: '/aliPay/tradePrecreatePay',
- data: data,
- method: 'post',
- })
- }
- //根据code换取openid
- export function getDataByCode(code) {
- return request({
- url: '/wechat/findUserInfo/' + code,
- params: {},
- method: 'get',
- })
- }
- //获得配置
- export function getConfig() {
- return requestWhite({
- url: '/wechat/getConfig',
- data: {
- url: window.location.href.split('#')[0]
- },
- method: 'get',
- })
- }
|