优化请求配置
This commit is contained in:
@@ -15,7 +15,8 @@ import {
|
||||
} from '@/commons/utils/encryptUtil.js'
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
// let baseUrl = ''
|
||||
let baseUrl = 'https://cashier-client.sxczgkj.cn/cashier-client'
|
||||
let baseUrl = 'https://cashier.sxczgkj.com'
|
||||
// let baseUrl = '/api'
|
||||
// 多少 ms 以内, 不提示loading
|
||||
const loadingShowTime = 200
|
||||
|
||||
|
||||
45
api/index.js
45
api/index.js
@@ -1,5 +1,5 @@
|
||||
import http from './http.js'
|
||||
const request=http.request
|
||||
const request = http.request
|
||||
|
||||
|
||||
/**
|
||||
@@ -7,11 +7,11 @@ const request=http.request
|
||||
* @returns
|
||||
*/
|
||||
export function createOrder(data) {
|
||||
return request({
|
||||
url: `/pay/createOrder`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: `/order/pay/shopPayApi/js2Pay`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -19,11 +19,12 @@ export function createOrder(data) {
|
||||
* @returns
|
||||
*/
|
||||
export function getOpenId(params) {
|
||||
return request({
|
||||
url: `/pay/openId`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
console.log('获取支付宝userId 或 微信openIdparams', params);
|
||||
return request({
|
||||
url: `/account/user/openId`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,11 +32,11 @@ export function getOpenId(params) {
|
||||
* @returns
|
||||
*/
|
||||
export function orderorderInfo(params) {
|
||||
return request({
|
||||
url: `/pay/noToken/queryOrderInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
return request({
|
||||
url: `/pay/noToken/queryOrderInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,9 +44,9 @@ export function orderorderInfo(params) {
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function cancelOrderPay(data) {
|
||||
return request({
|
||||
url: `/notify/cancel`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: `/notify/cancel`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user