1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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',
- })
- }
- export function addPoint(data) {
- return request({
- url: '/mobile/points/addPoint',
- data: data,
- method: 'post',
- })
- }
|