12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import APIConfig from './api.js';
- import efunRequest from '../utils/efunRequest';
- import request from '../utils/request';
- import commonUitl from '../utils/commonutil';
- export default class PayUtil {
- static async getMember() {
- return request(APIConfig.getMemberUrl() + '?appCode=' + commonUitl.getAppCode(), { method: 'GET' });
- }
- static async getVoucher() {
- return request(APIConfig.getVoucherUrl(), { method: 'GET' });
- }
- static async payByAli(params) {
- return request(
- APIConfig.getPayUrl() +
- '/aliPay/pay?productCode=' +
- params.productCode +
- '&type=' +
- params.type +
- '&preferentialIds=' +
- params.preferentialIds +
- '&useVoucher=' +
- params.useVoucher,
- { method: 'GET' }
- );
- }
- static async payByWechat(params) {
- return request(
- APIConfig.getPayUrl() +
- '/wxPay/prePay?productCode=' +
- params.productCode +
- '&type=' +
- params.type +
- '&preferentialIds=' +
- params.preferentialIds +
- '&useVoucher=' +
- params.useVoucher,
- { method: 'GET' }
- );
- }
- }
|