活动及套餐包余额购买
This commit is contained in:
parent
5b0f18bc3c
commit
b11729e67f
@ -248,7 +248,7 @@ export default function CapitalModal() {
|
||||
width: 160,
|
||||
align: 'center',
|
||||
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 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} `)
|
||||
|
||||
|
@ -62,10 +62,10 @@ request.interceptors.response.use(
|
||||
);
|
||||
//-----------------------------------------------------------------------------------------
|
||||
|
||||
// 获取活动信息----------------------------------------------------------------------------
|
||||
// 余额购买套餐包---------------------------------------------------------------------------
|
||||
const activityRequset = axios.create({
|
||||
// baseURL: operatorPluginBaseUrl,
|
||||
baseURL: 'http://192.168.0.115:8099',
|
||||
baseURL: operatorPluginBaseUrl,
|
||||
// baseURL: 'http://192.168.0.115:8099',
|
||||
timeout: 5000,
|
||||
});
|
||||
activityRequset.interceptors.request.use(
|
||||
@ -162,6 +162,8 @@ aiShopRequest.interceptors.response.use(
|
||||
// 绑定手机号功能----------------------------------------------------------------------------
|
||||
const phoneRequest = axios.create({
|
||||
baseURL: operatorBaseUrl,
|
||||
// 测试
|
||||
// baseURL: 'http://192.168.0.115:8091',
|
||||
timeout: 5000,
|
||||
});
|
||||
phoneRequest.interceptors.request.use(
|
||||
@ -234,11 +236,14 @@ newRequest.interceptors.response.use(
|
||||
|
||||
// 下载发票
|
||||
export const downloadInvoice = (id: string) => {
|
||||
// return `${operatorPluginBaseUrl}/operator-plugin/route/file/download/false/${id}`
|
||||
//测试
|
||||
return `http://192.168.0.115:8099/operator-plugin/route/file/download/false/${id}`
|
||||
return `${operatorPluginBaseUrl}/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,
|
||||
Checkbox
|
||||
} 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 type { DatePickerProps, InputNumberProps } from 'antd';
|
||||
import dayjs, { } from 'dayjs';
|
||||
@ -142,7 +142,7 @@ export default function Index() {
|
||||
val: false,
|
||||
})
|
||||
}
|
||||
setActivityImg(downloadInvoice(res.image))
|
||||
setActivityImg(activityImageUrl(res.image))
|
||||
setActivityTitle(res.title)
|
||||
setActivityText(res.help)
|
||||
setActivityCycle(res.cycle)
|
||||
@ -4852,28 +4852,28 @@ export default function Index() {
|
||||
// 优先使用 Clipboard API
|
||||
if (navigator.clipboard && 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(() => {
|
||||
messageApi.success('邀请码已复制到剪贴板');
|
||||
messageApi.success('链接已复制到剪贴板');
|
||||
}).catch(() => {
|
||||
messageApi.error('复制失败');
|
||||
});
|
||||
} else {
|
||||
// 兼容旧浏览器
|
||||
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);
|
||||
input.select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
messageApi.success('邀请码已复制到剪贴板');
|
||||
messageApi.success('链接已复制到剪贴板');
|
||||
} catch {
|
||||
messageApi.error('复制失败');
|
||||
}
|
||||
document.body.removeChild(input);
|
||||
}
|
||||
}}
|
||||
>一键复制邀请码</div>
|
||||
>一键复制邀请链接</div>
|
||||
<div className='activityCycle'
|
||||
style={{
|
||||
display: closeActivityModal ? 'none' : 'unset',
|
||||
|
Loading…
Reference in New Issue
Block a user