活动及套餐包余额购买
This commit is contained in:
parent
5b0f18bc3c
commit
b11729e67f
@ -248,7 +248,7 @@ export default function CapitalModal() {
|
|||||||
width: 160,
|
width: 160,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render:(text) => (
|
render:(text) => (
|
||||||
<div >{text == 'ai'?'AI喵著':text == 'shop'?'软著交易':text}</div>
|
<div >{text == 'ai'?'AI喵著':text == 'shop'?'软著交易':text == 'Invite'?'系统活动':text}</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,8 @@ export const getInvoiceRecordList = (userId: string, params: any) => request.get
|
|||||||
// 获取开票信息数组
|
// 获取开票信息数组
|
||||||
export const getInvoiceList = (userId: string, params: any) => request.get(`/operator-plugin/api/invoice-config/listpage/${userId}`, { params })
|
export const getInvoiceList = (userId: string, params: any) => request.get(`/operator-plugin/api/invoice-config/listpage/${userId}`, { params })
|
||||||
// 获取活动信息
|
// 获取活动信息
|
||||||
export const activityData = () => activityRequset.get(`/operator-plugin/api/user/invite/get`)
|
// export const activityData = () => activityRequset.get(`/operator-plugin/api/user/invite/get`)
|
||||||
|
export const activityData = () => phoneRequest.get(`/operator/api/user/invite/get`)
|
||||||
// 余额购买套餐包
|
// 余额购买套餐包
|
||||||
export const balanceBuyPackage = (packageInfoId: string) => activityRequset.post(`/operator-plugin/api/packageorder/buy/${packageInfoId} `)
|
export const balanceBuyPackage = (packageInfoId: string) => activityRequset.post(`/operator-plugin/api/packageorder/buy/${packageInfoId} `)
|
||||||
|
|
||||||
|
@ -62,10 +62,10 @@ 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: 5000,
|
||||||
});
|
});
|
||||||
activityRequset.interceptors.request.use(
|
activityRequset.interceptors.request.use(
|
||||||
@ -162,6 +162,8 @@ aiShopRequest.interceptors.response.use(
|
|||||||
// 绑定手机号功能----------------------------------------------------------------------------
|
// 绑定手机号功能----------------------------------------------------------------------------
|
||||||
const phoneRequest = axios.create({
|
const phoneRequest = axios.create({
|
||||||
baseURL: operatorBaseUrl,
|
baseURL: operatorBaseUrl,
|
||||||
|
// 测试
|
||||||
|
// baseURL: 'http://192.168.0.115:8091',
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
});
|
});
|
||||||
phoneRequest.interceptors.request.use(
|
phoneRequest.interceptors.request.use(
|
||||||
@ -234,11 +236,14 @@ newRequest.interceptors.response.use(
|
|||||||
|
|
||||||
// 下载发票
|
// 下载发票
|
||||||
export const downloadInvoice = (id: string) => {
|
export const downloadInvoice = (id: string) => {
|
||||||
// return `${operatorPluginBaseUrl}/operator-plugin/route/file/download/false/${id}`
|
return `${operatorPluginBaseUrl}/operator-plugin/route/file/download/false/${id}`
|
||||||
//测试
|
|
||||||
return `http://192.168.0.115:8099/operator-plugin/route/file/download/false/${id}`
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 活动图片地址
|
||||||
|
export const activityImageUrl = (fileId: string) => {
|
||||||
|
return `${operatorBaseUrl}/operator/route/file/download/true/${fileId}`
|
||||||
|
// return `http://192.168.0.115:8091/operator/route/file/download/true/${fileId}`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 显示图片 下载 预览文件 买卖功能
|
// 显示图片 下载 预览文件 买卖功能
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
InputNumber,
|
InputNumber,
|
||||||
Checkbox
|
Checkbox
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import { downloadInvoice } from '../../request/request.ts'
|
import { activityImageUrl } from '../../request/request.ts'
|
||||||
import locale from 'antd/es/date-picker/locale/zh_CN';
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||||
import type { DatePickerProps, InputNumberProps } from 'antd';
|
import type { DatePickerProps, InputNumberProps } from 'antd';
|
||||||
import dayjs, { } from 'dayjs';
|
import dayjs, { } from 'dayjs';
|
||||||
@ -142,7 +142,7 @@ export default function Index() {
|
|||||||
val: false,
|
val: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
setActivityImg(downloadInvoice(res.image))
|
setActivityImg(activityImageUrl(res.image))
|
||||||
setActivityTitle(res.title)
|
setActivityTitle(res.title)
|
||||||
setActivityText(res.help)
|
setActivityText(res.help)
|
||||||
setActivityCycle(res.cycle)
|
setActivityCycle(res.cycle)
|
||||||
@ -4852,28 +4852,28 @@ export default function Index() {
|
|||||||
// 优先使用 Clipboard API
|
// 优先使用 Clipboard API
|
||||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
'http://127.0.0.1:5500/Register.html?code=' + activityCode
|
'https://www.aimzhu.com/Register.html?code=' + activityCode
|
||||||
).then(() => {
|
).then(() => {
|
||||||
messageApi.success('邀请码已复制到剪贴板');
|
messageApi.success('链接已复制到剪贴板');
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
messageApi.error('复制失败');
|
messageApi.error('复制失败');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 兼容旧浏览器
|
// 兼容旧浏览器
|
||||||
const input = document.createElement('input');
|
const input = document.createElement('input');
|
||||||
input.value = 'http://127.0.0.1:5500/Register.html?code=' + activityCode;
|
input.value = 'https://www.aimzhu.com/Register.html?code=' + activityCode;
|
||||||
document.body.appendChild(input);
|
document.body.appendChild(input);
|
||||||
input.select();
|
input.select();
|
||||||
try {
|
try {
|
||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
messageApi.success('邀请码已复制到剪贴板');
|
messageApi.success('链接已复制到剪贴板');
|
||||||
} catch {
|
} catch {
|
||||||
messageApi.error('复制失败');
|
messageApi.error('复制失败');
|
||||||
}
|
}
|
||||||
document.body.removeChild(input);
|
document.body.removeChild(input);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>一键复制邀请码</div>
|
>一键复制邀请链接</div>
|
||||||
<div className='activityCycle'
|
<div className='activityCycle'
|
||||||
style={{
|
style={{
|
||||||
display: closeActivityModal ? 'none' : 'unset',
|
display: closeActivityModal ? 'none' : 'unset',
|
||||||
|
Loading…
Reference in New Issue
Block a user