123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import request from '@/apis/utils/request'
- import requestWhite from '@/apis/utils/requestWhite.js';
- // import requestAli from '../utils/requestParking.js';
-
- import Qs from 'qs';
- //微信支付
- export function wxpay(data) {
- if(data){
- data.type="E"
- }
- if(data&&!data.recordId){
- data.recordId=''
- }
- return request({
- url: '/wxPay/wxJsapiPay',
- data: data,
- method: 'post',
- })
- }
- export function alpay(data) {
- if(data&&!data.recordId){
- data.recordId=''
- }
- 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 getDataByCodeALI(code) {
- // return requestAli({
- // url: '/aliPay/findUserInfo/' + code,
- // params: {},
- // method: 'get',
- // })
- // }
- //获得配置
- export function getConfig() {
- return requestWhite({
- url: '/wechat/getConfig',
- data: {
- url: window.location.href.split('#')[0]
- },
- method: 'get',
- })
- }
- export function checkSubscribe(data) {
- return requestWhite({
- url: '/wechat/checkSubscribe',
- data: data,
- method: 'post',
- })
- }
|