套餐包更新

This commit is contained in:
lyp 2025-08-26 17:17:09 +08:00
parent 89f84003c0
commit 63401b10b0
2 changed files with 22 additions and 13 deletions

View File

@ -1382,19 +1382,28 @@ export default function Payment(props: IPaymentProps) {
setBalancePayModal(false); setBalancePayModal(false);
setIsLoading(true); setIsLoading(true);
await balanceBuyPackage(packageInfoId); const res = await balanceBuyPackage(packageInfoId);
// console.log(res.data);
if (res.data == 'Success') {
getMyPackNum()
setIsLoading(false);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('已购买套餐包');
});
setTimeout(() => {
props.handleConfirm();
}, 1000);
}else{
setIsLoading(false);
messageApi.error(res.data);
}
getMyPackNum()
setIsLoading(false);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('已购买套餐包');
});
setTimeout(() => {
props.handleConfirm();
}, 1000);
} catch (error: any) { } catch (error: any) {
// setLoading(false) // setLoading(false)
if (error.response) { if (error.response) {
const data = error.response.data; const data = error.response.data;
messageApi.open({ messageApi.open({

View File

@ -18,7 +18,7 @@ import {
// 开票功能---------------------------------------------------------------------------- // 开票功能----------------------------------------------------------------------------
const request = axios.create({ const request = axios.create({
baseURL: operatorPluginBaseUrl, baseURL: operatorPluginBaseUrl,
timeout: 5000, timeout: 30000,
}); });
request.interceptors.request.use( request.interceptors.request.use(
(config) => { (config) => {
@ -66,7 +66,7 @@ request.interceptors.response.use(
const activityRequset = axios.create({ const activityRequset = axios.create({
baseURL: operatorPluginBaseUrl, baseURL: operatorPluginBaseUrl,
// baseURL: 'http://192.168.0.115:8099', // baseURL: 'http://192.168.0.115:8099',
timeout: 5000, timeout: 30000,
}); });
activityRequset.interceptors.request.use( activityRequset.interceptors.request.use(
(config) => { (config) => {
@ -164,7 +164,7 @@ const phoneRequest = axios.create({
baseURL: operatorBaseUrl, baseURL: operatorBaseUrl,
// 测试 // 测试
// baseURL: 'http://192.168.0.115:8091', // baseURL: 'http://192.168.0.115:8091',
timeout: 5000, timeout: 30000,
}); });
phoneRequest.interceptors.request.use( phoneRequest.interceptors.request.use(
(config) => { (config) => {
@ -212,7 +212,7 @@ phoneRequest.interceptors.response.use(
// 绑定手机号功能(不要token)---------------------------------------------------------------------------- // 绑定手机号功能(不要token)----------------------------------------------------------------------------
const newRequest = axios.create({ const newRequest = axios.create({
baseURL: operatorBaseUrl, baseURL: operatorBaseUrl,
timeout: 5000, timeout: 30000,
}); });