|
@@ -31,7 +31,7 @@ axios.interceptors.response.use(
|
|
|
res => {
|
|
|
// console.log('响应res', res);
|
|
|
// loading.close();
|
|
|
- if (res.data.code == 200) {
|
|
|
+ if (res && res.data.code == 200) {
|
|
|
return res.data;
|
|
|
}
|
|
|
else {
|
|
@@ -39,7 +39,7 @@ axios.interceptors.response.use(
|
|
|
message: res.data.message,
|
|
|
type: 'warning'
|
|
|
});
|
|
|
- if (res.data.code == 10014) {
|
|
|
+ if (res && res.data.code == 10014) {
|
|
|
setTimeout(() => {
|
|
|
context.$router.replace('/login')
|
|
|
}, 2000)
|
|
@@ -262,7 +262,7 @@ export const updateKey = (params) => {
|
|
|
// return requestLoading(`${Prefix}act=merchant_info&op=setkey&client_type=ajax&secure_key=${secure_key}`, 'post')
|
|
|
return axios({
|
|
|
method: 'post',
|
|
|
- url: `${Prefix}act=merchant_info&op=pdlog&client_type=ajax`,
|
|
|
+ url: `${Prefix}act=merchant_info&op=setkey&client_type=ajax`,
|
|
|
withCredentials: true,
|
|
|
headers: {
|
|
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -283,16 +283,6 @@ export const updateVoucher = (name) => {
|
|
|
timeout: 120000,
|
|
|
})
|
|
|
}
|
|
|
-// export const updateVoucherList = (params) => {
|
|
|
-// // return requestLoading(`${Prefix}act=merchant_recharge&op=voucherupload&client_type=ajax`, 'post', {voucher})
|
|
|
-// return axios({
|
|
|
-// method: "post",
|
|
|
-// url: `${Prefix}act=refill_evidence&op=add&client_type=ajax`,
|
|
|
-// withCredentials: true,
|
|
|
-// data: params,
|
|
|
-// timeout: 120000,
|
|
|
-// })
|
|
|
-// }
|
|
|
|
|
|
// 上传凭证
|
|
|
export const updateVoucherList = (params) => {
|