Merge branch 'master-vue3' of gitee.com:yudaocode/yudao-mall-uniapp into vue3_tmp
Signed-off-by: 落日晚风 <1811466536@qq.com>
This commit is contained in:
+33
-2
@@ -8,12 +8,12 @@ const PayWalletApi = {
|
||||
.join('&');
|
||||
return request({
|
||||
url: `/app-api/pay/wallet-transaction/page?${queryString}`,
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
});
|
||||
},
|
||||
// 获得钱包流水统计
|
||||
getWalletTransactionSummary: (params) => {
|
||||
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`
|
||||
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
|
||||
return request({
|
||||
url: `/app-api/pay/wallet-transaction/get-summary?${queryString}`,
|
||||
// url: `/app-api/pay/wallet-transaction/get-summary`,
|
||||
@@ -21,6 +21,37 @@ const PayWalletApi = {
|
||||
// params: params
|
||||
});
|
||||
},
|
||||
// 获得钱包充值套餐列表
|
||||
getWalletRechargePackageList: () => {
|
||||
return request({
|
||||
url: '/app-api/pay/wallet-recharge-package/list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 创建钱包充值记录(发起充值)
|
||||
createWalletRecharge: (data) => {
|
||||
return request({
|
||||
url: '/app-api/pay/wallet-recharge/create',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
},
|
||||
// 获得钱包充值记录分页
|
||||
getWalletRechargePage: (params) => {
|
||||
return request({
|
||||
url: '/app-api/pay/wallet-recharge/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default PayWalletApi;
|
||||
|
||||
+1
-24
@@ -19,28 +19,5 @@ export default {
|
||||
},
|
||||
}),
|
||||
|
||||
rechargeRules: () =>
|
||||
request({
|
||||
url: 'trade/order/rechargeRules',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
rechargeRules2: () =>
|
||||
request({
|
||||
url: '/app-api/pay/wallet-recharge-package/list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
recharge: (data) =>
|
||||
request({
|
||||
url: '/app-api/pay/wallet-recharge/create',
|
||||
method: 'POST',
|
||||
data,
|
||||
}),
|
||||
|
||||
};
|
||||
@@ -94,7 +94,7 @@ http.interceptors.request.use(
|
||||
if (config.url.indexOf('/app-api/') !== -1) {
|
||||
config.header['Accept'] = '*/*'
|
||||
config.header['tenant-id'] = '1';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['Authorization'] = 'Bearer test247';
|
||||
}
|
||||
return config;
|
||||
@@ -113,7 +113,7 @@ http.interceptors.response.use(
|
||||
if (response.header.authorization || response.header.Authorization) {
|
||||
$store('user').setToken(response.header.authorization || response.header.Authorization);
|
||||
}
|
||||
// TODO 芋艿:如果是登录的 API,则自动设置 token
|
||||
// TODO 芋艿:如果是登录的 API,则自动设置 token
|
||||
|
||||
response.config.custom.showLoading && closeLoading();
|
||||
if (response.data.error !== 0 && response.data.code !== 0) {
|
||||
@@ -125,10 +125,10 @@ http.interceptors.response.use(
|
||||
});
|
||||
return Promise.resolve(response.data);
|
||||
}
|
||||
// 成功时的提示
|
||||
// 成功时的提示
|
||||
if (
|
||||
(response.data.error === 0 || response.data.code === 0) &&
|
||||
(response.data.msg !== '' || response.config.custom.successMsg !== '') &&
|
||||
( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
|
||||
response.config.custom.showSuccess
|
||||
) {
|
||||
uni.showToast({
|
||||
@@ -215,8 +215,8 @@ const request = (config) => {
|
||||
}
|
||||
// TODO 芋艿:额外拼接
|
||||
if (config.url.indexOf('/app-api/') >= 0) {
|
||||
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
}
|
||||
return http.middleware(config);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user