|
@@ -5,6 +5,7 @@ import context from '../main';
|
|
|
|
|
|
// axios.defaults.timeout = 3000000;
|
|
// axios.defaults.timeout = 3000000;
|
|
// let loadinginstace;
|
|
// let loadinginstace;
|
|
|
|
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
|
|
|
|
axios.interceptors.request.use(
|
|
axios.interceptors.request.use(
|
|
config => {
|
|
config => {
|
|
@@ -118,7 +119,17 @@ export const testRequest = () => {
|
|
//登录
|
|
//登录
|
|
export const login = (params) => {
|
|
export const login = (params) => {
|
|
console.log(`${Prefix}act=merchant_login&op=login`)
|
|
console.log(`${Prefix}act=merchant_login&op=login`)
|
|
- return requestLoading(`${Prefix}act=merchant_login&op=login&client_type=ajax`, 'post', params)
|
|
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_login&op=login&client_type=ajax`, 'post', params)
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_login&op=login&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
//登出
|
|
//登出
|
|
@@ -133,17 +144,47 @@ export const getIpList = () => {
|
|
|
|
|
|
// 删除ip列表
|
|
// 删除ip列表
|
|
export const delIpList = (params) => {
|
|
export const delIpList = (params) => {
|
|
- return requestLoading(`${Prefix}act=merchant_info&op=ipdel&client_type=ajax`, 'post', params)
|
|
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_info&op=ipdel&client_type=ajax`, 'post', params)
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_info&op=ipdel&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 添加ip
|
|
// 添加ip
|
|
-export const addIp = (ip) => {
|
|
|
|
- return requestLoading(`${Prefix}act=merchant_info&op=addip&client_type=ajax&ip=${ip}`, 'post')
|
|
|
|
|
|
+export const addIp = (params) => {
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_info&op=addip&client_type=ajax&ip=${ip}`, 'post')
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_info&op=addip&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 获取订单统计列表
|
|
// 获取订单统计列表
|
|
-export const getOrderList = (page) => {
|
|
|
|
- return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}`, 'post')
|
|
|
|
|
|
+export const getOrderList = (params) => {
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}`, 'post')
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_order&op=list&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -153,13 +194,34 @@ export const getOrderList = (page) => {
|
|
* @param {*} end_time 结束时间
|
|
* @param {*} end_time 结束时间
|
|
* @param {*} card_type 充值类型
|
|
* @param {*} card_type 充值类型
|
|
*/
|
|
*/
|
|
-export const queryList = (page,start_time, end_time, card_type) => {
|
|
|
|
- return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&card_type=${card_type}`, 'post')
|
|
|
|
|
|
+// export const queryList = (page, start_time, end_time, card_type) => {
|
|
|
|
+export const queryList = (params) => {
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&card_type=${card_type}`, 'post')
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_order&op=list&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 修改管理员密码
|
|
// 修改管理员密码
|
|
export const editPwd = (params) => {
|
|
export const editPwd = (params) => {
|
|
- return requestLoading(`${Prefix}act=merchant_info&op=modifypw&client_type=ajax`, 'post', params)
|
|
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_info&op=modifypw&client_type=ajax`, 'post', params)
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_info&op=modifypw&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 个人中心
|
|
// 个人中心
|
|
@@ -179,13 +241,35 @@ export const getMovingAccount = (page) => {
|
|
* @param {*} lg_type 变更类型
|
|
* @param {*} lg_type 变更类型
|
|
* @param {*} lg_order_sn 业务单号
|
|
* @param {*} lg_order_sn 业务单号
|
|
*/
|
|
*/
|
|
-export const queryMovingAccount = (page, start_time, end_time, lg_type) => {
|
|
|
|
- return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&lg_type=${lg_type}`, 'post')
|
|
|
|
|
|
+// export const queryMovingAccount = (page, start_time, end_time, lg_type) => {
|
|
|
|
+export const queryMovingAccount = (params) => {
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&lg_type=${lg_type}`, 'post')
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_info&op=pdlog&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 设置密钥
|
|
// 设置密钥
|
|
-export const updateKey = (secure_key) => {
|
|
|
|
- return requestLoading(`${Prefix}act=merchant_info&op=setkey&client_type=ajax&secure_key=${secure_key}`, 'post')
|
|
|
|
|
|
+// export const updateKey = (secure_key) => {
|
|
|
|
+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`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
// 上传文件
|
|
// 上传文件
|
|
export const updateVoucher = (name) => {
|
|
export const updateVoucher = (name) => {
|
|
@@ -212,7 +296,17 @@ export const updateVoucher = (name) => {
|
|
|
|
|
|
// 上传凭证
|
|
// 上传凭证
|
|
export const updateVoucherList = (params) => {
|
|
export const updateVoucherList = (params) => {
|
|
- return requestLoading(`${Prefix}act=refill_evidence&op=add&client_type=ajax`, 'post', params)
|
|
|
|
|
|
+ // return requestLoading(`${Prefix}act=refill_evidence&op=add&client_type=ajax`, 'post', params)
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=refill_evidence&op=add&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 获取充值列表
|
|
// 获取充值列表
|
|
@@ -220,8 +314,19 @@ export const getVoucherList = () => {
|
|
return requestLoading(`${Prefix}act=refill_evidence&op=index&client_type=ajax`, 'post')
|
|
return requestLoading(`${Prefix}act=refill_evidence&op=index&client_type=ajax`, 'post')
|
|
}
|
|
}
|
|
// 查询充值列表
|
|
// 查询充值列表
|
|
-export const queryVoucherList = (page, start_time, end_time) => {
|
|
|
|
- return requestLoading(`${Prefix}act=refill_evidence&op=index&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}`, 'get')
|
|
|
|
|
|
+// export const queryVoucherList = (page, start_time, end_time) => {
|
|
|
|
+export const queryVoucherList = (params) => {
|
|
|
|
+ // return requestLoading(`${Prefix}act=refill_evidence&op=index&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}`, 'get')
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=refill_evidence&op=index&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 获取充值金额
|
|
// 获取充值金额
|
|
@@ -230,7 +335,17 @@ export const getRechargeAmount = () => {
|
|
}
|
|
}
|
|
// 油卡充值 cardno-卡号 amount-充值金额
|
|
// 油卡充值 cardno-卡号 amount-充值金额
|
|
export const OilCardRecharge = (params) => {
|
|
export const OilCardRecharge = (params) => {
|
|
- return requestLoading(`${Prefix}act=merchant_refill&op=add&client_type=ajax`, 'post', params)
|
|
|
|
|
|
+ // return requestLoading(`${Prefix}act=merchant_refill&op=add&client_type=ajax`, 'post', params)
|
|
|
|
+ return axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: `${Prefix}act=merchant_refill&op=add&client_type=ajax`,
|
|
|
|
+ withCredentials: true,
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded"
|
|
|
|
+ },
|
|
|
|
+ data: params,
|
|
|
|
+ timeout: 120000,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
// 余额列表
|
|
// 余额列表
|
|
// export const balanceList = (params) => {
|
|
// export const balanceList = (params) => {
|