安装包演示视频及邀请码
This commit is contained in:
parent
4ed33ab1df
commit
381328e536
@ -1,6 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import './card-proj.css';
|
||||
// import { useDispatch } from 'react-redux'
|
||||
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import {
|
||||
CheckOutlined,
|
||||
ClockCircleOutlined,
|
||||
@ -11,12 +12,14 @@ import {
|
||||
LoadingOutlined,
|
||||
SearchOutlined,
|
||||
WarningOutlined,
|
||||
RedoOutlined,
|
||||
CloseOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Button, Tag, Modal, Carousel } from 'antd';
|
||||
import { GenerateStatus } from "../../interfaces/proj/IProj.ts";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Axios, post, downloadUrl, get, del } from "../../util/AjaxUtils.ts";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, useContext } from "react";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import setImg from '../../static/right/set.png'
|
||||
import orderImg from '../../static/right/order.png'
|
||||
@ -31,6 +34,7 @@ import SoftwareManagementShow from '../../route/proj/edit/ProjConfigModListShow.
|
||||
import DisplayOrder from '../../route/proj/edit/ProjConfigMenuList.tsx'
|
||||
import DisplayOrderShow from '../../route/proj/edit/ProjConfigMenuListShow.tsx'
|
||||
export default function CardProj(props: any) {
|
||||
const globalDispatchContext = useContext(GlobalDispatchContext);
|
||||
const height = window.innerHeight - 250;
|
||||
// 下载等待弹窗
|
||||
const [downModal, setDownModal] = useState(false)
|
||||
@ -64,13 +68,174 @@ export default function CardProj(props: any) {
|
||||
// })
|
||||
// }
|
||||
const data = props.item;
|
||||
// const [data, setData] = useState(props.item);
|
||||
// data.generate.generateStatus == GenerateStatus.SUCCESS ?'查看':'编辑'
|
||||
|
||||
const [tagIdArray, setTagIdArray] = useState(data.tagDataIds)
|
||||
const [RemindIdArray, setRemindIdArray] = useState(data.projRemindIds)
|
||||
const [showBuyPic, setShowBuyPic] = useState(data.projPkg.payStatus == 'UNPAID' ? true : false) //显示购买安装包
|
||||
const [showBuyPicIng, setShowBuyPicIng] = useState(data.projPkg.pkgStatus == 'PKGING' ? true : false) //显示安装包正在打包
|
||||
const [showBuyPicAgain, setShowBuyPicAgain] = useState(data.projPkg.pkgStatus == 'SUCCESS') //显示重新购买安装包
|
||||
const [showBuyPicError, setShowBuyPicError] = useState(data.projPkg.pkgStatus == 'FAIL' ? true : false) //显示安装包打包失败
|
||||
const [showBuyVideo, setShowBuyVideo] = useState(data.projVideo.payStatus == 'UNPAID' ? true : false) //显示购买视频
|
||||
const [showBuyVideoIng, setShowBuyVideoIng] = useState(data.projVideo.videoStatus == 'PKGING' ? true : false) //显示视频正在打包
|
||||
const [showBuyVideoAgain, setShowBuyVideoAgain] = useState(data.projVideo.videoStatus == 'SUCCESS' ? true : false) //显示重新购买视频
|
||||
const [showBuyVideoError, setShowBuyVideoError] = useState(data.projVideo.videoStatus == 'FAIL' ? true : false) //显示视频打包失败
|
||||
// const [showBuyPic, setShowBuyPic] = useState(true) //显示购买安装包
|
||||
// const [showBuyPicIng, setShowBuyPicIng] = useState(false) //显示安装包正在打包
|
||||
// const [showBuyPicAgain, setShowBuyPicAgain] = useState(false) //显示重新购买安装包
|
||||
const [buyModalShow, setBuyModalShow] = useState(false) //显示购买安装包提示弹窗
|
||||
const [buyVideoModalShow, setBuyVideoModalShow] = useState(false) //显示购买视频提示弹窗
|
||||
// const [pkgPrice, setPkgPrice] = useState(0) //安装包价格
|
||||
// const [videoPrice, setVideoPrice] = useState(0) //视频价格
|
||||
// const getPrice = () => {
|
||||
// get<any>({
|
||||
// messageApi: messageApi,
|
||||
// url: '/api/proj/charge/get',
|
||||
// onSuccess({ data }) {
|
||||
// console.log('获取价格', data.additional.pkg/100,data.additional.videoDemo/100);
|
||||
// setPkgPrice(data.additional.pkg/100)
|
||||
// setVideoPrice(data.additional.videoDemo/100)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// 付款安装包
|
||||
const payPkg = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/pkg/save-pkg/proj-id/${projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||
messageApi.success('扣款成功');
|
||||
setShowBuyPic(false);
|
||||
setShowBuyPicIng(true);
|
||||
setBuyModalShow(false);
|
||||
setShowBuyPicAgain(false)
|
||||
});
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 重新打包安装包
|
||||
const againPkg = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/pkg/save-pkg/proj-id/${projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包安装包');
|
||||
setShowBuyPic(false);
|
||||
setShowBuyPicIng(true);
|
||||
setBuyModalShow(false);
|
||||
setShowBuyPicAgain(false)
|
||||
setShowBuyPicError(false)
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 付款视频
|
||||
const payVideo = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/video/save-pkg/proj-id/${projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||
messageApi.success('扣款成功');
|
||||
setShowBuyVideo(false);
|
||||
setShowBuyVideoIng(true);
|
||||
setBuyVideoModalShow(false);
|
||||
setShowBuyVideoAgain(false)
|
||||
});
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 重新打包视频
|
||||
const againVideo = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/video/save-pkg/proj-id/${projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包演示视频');
|
||||
setShowBuyVideo(false);
|
||||
setShowBuyVideoIng(true);
|
||||
setBuyVideoModalShow(false);
|
||||
setShowBuyVideoAgain(false)
|
||||
setShowBuyVideoError(false)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 点击刷新页面数据获取安装包状态
|
||||
const upData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/pkg/get/proj-id/${projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.pkgStatus == 'SUCCESS') {
|
||||
messageApi.success('安装包生成完毕,请下载');
|
||||
setShowBuyPicAgain(true)
|
||||
setShowBuyPicIng(false)
|
||||
} else if (data.pkgStatus == 'FAIL') {
|
||||
messageApi.error('安装包打包失败,点击重新打包');
|
||||
setShowBuyPicError(true)
|
||||
setShowBuyPicIng(false)
|
||||
} else {
|
||||
messageApi.error('安装包正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 点击刷新页面数据获取演示视频状态
|
||||
const upVideoData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/video/get/proj-id/${projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.videoStatus == 'SUCCESS') {
|
||||
messageApi.success('演示视频生成完毕,请下载');
|
||||
setShowBuyVideoAgain(true)
|
||||
setShowBuyVideoIng(false)
|
||||
} else if (data.videoStatus == 'FAIL') {
|
||||
messageApi.error('演示视频打包失败,点击重新打包');
|
||||
setShowBuyPicError(true)
|
||||
setShowBuyVideoIng(false)
|
||||
}else{
|
||||
messageApi.error('演示视频正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const downAll = (projId: string, name: string) => {
|
||||
setHasDown(true)
|
||||
if (!hasDown) {
|
||||
@ -311,7 +476,6 @@ export default function CardProj(props: any) {
|
||||
// getTag()
|
||||
// console.log('查看数据', data);
|
||||
// console.log('查看状态', data.pay.payStatus);
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
@ -329,6 +493,7 @@ export default function CardProj(props: any) {
|
||||
}}>
|
||||
{payCharge}
|
||||
</div>
|
||||
|
||||
<div className='cp-tag'
|
||||
style={{
|
||||
background: '#8a8a8a', color: '#fff',
|
||||
@ -419,13 +584,13 @@ export default function CardProj(props: any) {
|
||||
<span className='orignLine' style={{ display: data.projStatus == 'EXPIRED' || data.pay.payStatus == 'CORRECTION2_REFUND' ? 'none' : 'unset' }}>|</span>
|
||||
<span className="cpt-text-btn" style={{ display: data.projStatus == 'EXPIRED' || data.pay.payStatus == 'CORRECTION2_REFUND' ? 'none' : 'unset' }}>
|
||||
|
||||
<EyeOutlined onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank')
|
||||
}}/>
|
||||
<span className='text-btn'
|
||||
onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank')
|
||||
}}>预览</span>
|
||||
<EyeOutlined onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank')
|
||||
}} />
|
||||
<span className='text-btn'
|
||||
onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank')
|
||||
}}>预览</span>
|
||||
|
||||
</span>
|
||||
|
||||
@ -474,8 +639,8 @@ export default function CardProj(props: any) {
|
||||
<div className='otherMoney'>
|
||||
{/* <div>基础费用:{basicsValue}</div> */}
|
||||
<Tag color="#f50" style={{ display: URGENTvalue ? 'block' : 'none' }}>加急:{URGENTvalue}</Tag>
|
||||
<Tag color="#2db7f5" style={{ display: pkgValue ? 'block' : 'none' }}>安装包:{pkgValue}</Tag>
|
||||
<Tag color="#87d068" style={{ display: videoDemoValue ? 'block' : 'none' }}>演示视频:{videoDemoValue}</Tag>
|
||||
{/* <Tag color="#2db7f5" style={{ display: pkgValue ? 'block' : 'none' }}>安装包:{pkgValue}</Tag>
|
||||
<Tag color="#87d068" style={{ display: videoDemoValue ? 'block' : 'none' }}>演示视频:{videoDemoValue}</Tag> */}
|
||||
</div>
|
||||
</div>
|
||||
<div className='cpbl-btn-box'>
|
||||
@ -598,9 +763,8 @@ export default function CardProj(props: any) {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${data.projId}`)
|
||||
}}><DownloadOutlined /> 申请表</Button>
|
||||
|
||||
{/* <Button size="small" type="text" onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/${data.projId}`)
|
||||
}}><DownloadOutlined /> 操作手册</Button> */}
|
||||
|
||||
|
||||
<div className='downloadBox'>
|
||||
<div className='down-title'>
|
||||
<DownloadOutlined /> 操作手册
|
||||
@ -616,12 +780,12 @@ export default function CardProj(props: any) {
|
||||
}}> pdf</Button>
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
{/* {
|
||||
isShow && <Button className='zpibtn' size="small" type="text" onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/code-zip/${data.projId}`)
|
||||
}}
|
||||
><DownloadOutlined /> 代码压缩包</Button>
|
||||
}
|
||||
} */}
|
||||
{/* <Button size="small" type="text" onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/code-zip/${data.projId}`)
|
||||
}}><DownloadOutlined /> 代码压缩包</Button> */}
|
||||
@ -647,6 +811,16 @@ export default function CardProj(props: any) {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/all/${data.projId}`)
|
||||
downAll(data.projId, data.projName)
|
||||
}}><DownloadOutlined /> 全部</Button>
|
||||
<Button style={{ display: showBuyPicAgain ? 'unset' : 'none' }} size="small" type="text" onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/pkg/${data.projId}`)
|
||||
}}><DownloadOutlined />
|
||||
<span style={{ marginLeft: 5 }}>安装包</span>
|
||||
</Button>
|
||||
<Button style={{ display: showBuyVideoAgain ? 'unset' : 'none' }} size="small" type="text" onClick={() => {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/video/${data.projId}`)
|
||||
}}><DownloadOutlined />
|
||||
<span style={{ marginLeft: 5 }}>演示视频</span>
|
||||
</Button>
|
||||
</div>
|
||||
) : <></>
|
||||
}
|
||||
@ -698,13 +872,118 @@ export default function CardProj(props: any) {
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className='cline'></div> */}
|
||||
<div className='cpb-right'>
|
||||
<div className='cpb-right' style={{
|
||||
paddingLeft: 5,
|
||||
paddingRight: 5,
|
||||
}}>
|
||||
<div className='cpbr-top'>
|
||||
-当前状态-
|
||||
</div>
|
||||
<div className='cpbr-bot'>
|
||||
{renderGenerateStatus()}
|
||||
</div>
|
||||
<div style={{
|
||||
display: data.generate.generateStatus == GenerateStatus.SUCCESS && payCharge !== '免费试用' ? 'unset' : 'none'
|
||||
}}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<div className='buyBox buyBtn'
|
||||
style={{
|
||||
display: showBuyPic ? 'unset' : 'none'
|
||||
}}
|
||||
onClick={() => {
|
||||
setBuyModalShow(true);
|
||||
}}
|
||||
>购买安装包</div>
|
||||
<div className='buyBox buyIng'
|
||||
title='点击刷新状态'
|
||||
style={{
|
||||
display: showBuyPicIng ? 'unset' : 'none',
|
||||
cursor: 'pointer',
|
||||
// 禁止换行
|
||||
textWrap: 'nowrap'
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
upData()
|
||||
}}
|
||||
>
|
||||
<span style={{ marginRight: 5 }}> 安装包制作中</span>
|
||||
<RedoOutlined spin /></div>
|
||||
<div className='buyBox buyAgein'
|
||||
onClick={() => {
|
||||
setBuyModalShow(true);
|
||||
}}
|
||||
style={{
|
||||
display: showBuyPicAgain ? 'unset' : 'none'
|
||||
}}
|
||||
>重新购买安装包</div>
|
||||
<div className='buyBox buyAgein'
|
||||
title='安装包打包失败,点击重新打包'
|
||||
onClick={() => {
|
||||
// setBuyModalShow(true);
|
||||
againPkg()
|
||||
}}
|
||||
style={{
|
||||
display: showBuyPicError ? 'unset' : 'none',
|
||||
cursor: 'pointer',
|
||||
textWrap: 'nowrap'
|
||||
}}
|
||||
>
|
||||
<span style={{ marginRight: 5 }}>安装包打包失败</span><CloseOutlined />
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', marginTop: 5 }}>
|
||||
<div className='buyBox buyBtn'
|
||||
style={{
|
||||
display: showBuyVideo ? 'unset' : 'none'
|
||||
}}
|
||||
onClick={() => {
|
||||
setBuyVideoModalShow(true);
|
||||
}}
|
||||
>购买演示视频</div>
|
||||
<div className='buyBox buyIng'
|
||||
title='点击刷新状态'
|
||||
style={{
|
||||
display: showBuyVideoIng ? 'unset' : 'none',
|
||||
cursor: 'pointer',
|
||||
// 禁止换行
|
||||
textWrap: 'nowrap'
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
// upData()
|
||||
upVideoData()
|
||||
}}
|
||||
>
|
||||
<span style={{ marginRight: 5 }}> 演示视频制作中</span>
|
||||
<RedoOutlined spin /></div>
|
||||
<div className='buyBox buyAgein'
|
||||
onClick={() => {
|
||||
setBuyVideoModalShow(true);
|
||||
}}
|
||||
style={{
|
||||
display: showBuyVideoAgain ? 'unset' : 'none'
|
||||
}}
|
||||
>重新购买演示视频</div>
|
||||
<div className='buyBox buyAgein'
|
||||
title='演示视频打包失败,点击重新打包'
|
||||
onClick={() => {
|
||||
// setBuyModalShow(true);
|
||||
// againPkg()
|
||||
againVideo()
|
||||
}}
|
||||
style={{
|
||||
display: showBuyVideoError ? 'unset' : 'none',
|
||||
cursor: 'pointer',
|
||||
textWrap: 'nowrap'
|
||||
}}
|
||||
>
|
||||
<span style={{ marginRight: 5 }}>演示视频打包失败</span><CloseOutlined />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
@ -1063,6 +1342,64 @@ export default function CardProj(props: any) {
|
||||
正在打包中请稍后<span style={{ marginLeft: 10 }}><LoadingOutlined /></span>
|
||||
</div>
|
||||
</Modal>
|
||||
< Modal open={buyModalShow}
|
||||
centered
|
||||
title="提示"
|
||||
destroyOnClose={true}
|
||||
width={500}
|
||||
onCancel={() => {
|
||||
setBuyModalShow(false);
|
||||
}
|
||||
}
|
||||
// onOk={() => {
|
||||
// setShowBuyPic(false)
|
||||
// setShowBuyPicIng(true)
|
||||
// setBuyModalShow(false);
|
||||
|
||||
// }
|
||||
// }
|
||||
footer={[
|
||||
<Button key="cancel" onClick={() => setBuyModalShow(false)}>取消</Button>,
|
||||
<Button key="ok" type="primary" onClick={() => {
|
||||
|
||||
payPkg()
|
||||
}}>确定</Button>,
|
||||
]}
|
||||
|
||||
>
|
||||
<div className='modalText'> 购买安装包需要花费{props.pkgPrice}元,是否继续购买?</div>
|
||||
<div className='modalTip'>*注:购买后无法退款,修改后需重新购买下载!</div>
|
||||
{/* <div className='modalTip'>注:安装包制作时长为1-3个工作日</div> */}
|
||||
</ Modal>
|
||||
< Modal open={buyVideoModalShow}
|
||||
centered
|
||||
title="提示"
|
||||
destroyOnClose={true}
|
||||
width={500}
|
||||
onCancel={() => {
|
||||
setBuyVideoModalShow(false);
|
||||
}
|
||||
}
|
||||
// onOk={() => {
|
||||
// setShowBuyPic(false)
|
||||
// setShowBuyPicIng(true)
|
||||
// setBuyModalShow(false);
|
||||
|
||||
// }
|
||||
// }
|
||||
footer={[
|
||||
<Button key="cancel" onClick={() => setBuyVideoModalShow(false)}>取消</Button>,
|
||||
<Button key="ok" type="primary" onClick={() => {
|
||||
payVideo()
|
||||
// payPkg()
|
||||
}}>确定</Button>,
|
||||
]}
|
||||
|
||||
>
|
||||
<div className='modalText'> 购买演示视频需要花费{props.videoPrice}元,是否继续购买?</div>
|
||||
<div className='modalTip'>*注:购买后无法退款,修改后需重新购买下载!</div>
|
||||
{/* <div className='modalTip'>注:安装包制作时长为1-3个工作日</div> */}
|
||||
</ Modal>
|
||||
</>
|
||||
)
|
||||
}
|
@ -1,7 +1,14 @@
|
||||
import './card-proj-download.css';
|
||||
import { IProjDownload } from "../../interfaces/card/ICardProj.ts";
|
||||
|
||||
import {
|
||||
CloseOutlined, RedoOutlined,
|
||||
} from '@ant-design/icons';
|
||||
// import { useEffect } from "react";
|
||||
export default function CardProjDownload(props: IProjDownload) {
|
||||
// useEffect(() => {
|
||||
// console.log(props);
|
||||
|
||||
// }, [])
|
||||
return (
|
||||
// <div className="card-proj-download">
|
||||
<div className={props.canBtnClick ? 'card-proj-download' : 'card-proj-nodownload'}>
|
||||
@ -12,15 +19,68 @@ export default function CardProjDownload(props: IProjDownload) {
|
||||
{
|
||||
props.canBtnClick ? (
|
||||
<div>
|
||||
<div style={{ display: props.title == '申请表' || props.title == '代码压缩包' ||props.title == '证书下载' ? 'unset' : 'none' }}>
|
||||
<div style={{ display: props.title == '申请表' || props.title == '证书下载' ? 'unset' : 'none' }}>
|
||||
<a href="/#" className="cpDown-edit" style={{ minWidth: 30 }} onClick={(e) => {
|
||||
e.preventDefault();
|
||||
props.handleDownload();
|
||||
}}>下载</a>
|
||||
|
||||
</div>
|
||||
<div style={{ display: props.title == '安装包' ? 'unset' : 'none' }}>
|
||||
<a href="/#" className="cpDown-edit" style={{ minWidth: 30, display: props.pkgStatus == 'SUCCESS' ? 'unset' : 'none' }} onClick={(e) => {
|
||||
e.preventDefault();
|
||||
props.handleDownload();
|
||||
}}>下载</a>
|
||||
<div title='安装包打包失败,点击重新打包'
|
||||
onClick={()=>{
|
||||
props.againPkg()
|
||||
}}
|
||||
style={{ minWidth: 30, display: props.pkgStatus == 'FAIL' ? 'unset' : 'none',color:'red',fontWeight:700,cursor:'pointer',whiteSpace: 'nowrap', }}>
|
||||
<span style={{marginRight:5}}>打包失败</span><CloseOutlined />
|
||||
</div>
|
||||
<div title='正在打包,点击刷新状态' style={{ minWidth: 30, display: props.pkgStatus == 'PKGING' ? 'unset' : 'none',cursor:'pointer',color:'rgba(64, 149, 229, 1)',
|
||||
//禁止换行
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
onClick={()=>{
|
||||
props.upData()
|
||||
}}
|
||||
>
|
||||
<span style={{marginRight:5}}>正在打包</span><span style={{color:'green'}}>< RedoOutlined spin /></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style={{ display: props.title == '演示视频' ? 'unset' : 'none' }} >
|
||||
<a href="/#" className="cpDown-edit" style={{ minWidth: 30,display:props.videoStatus == 'SUCCESS'?'unset':'none'}} onClick={(e) => {
|
||||
e.preventDefault();
|
||||
props.handleDownload();
|
||||
}}>下载</a>
|
||||
<div title='演示视频打包失败,点击重新打包'
|
||||
onClick={()=>{
|
||||
// props.againPkg()
|
||||
props.againVideo()
|
||||
}}
|
||||
style={{ minWidth: 30, display: props.videoStatus == 'FAIL' ? 'unset' : 'none',color:'red',fontWeight:700,cursor:'pointer' ,whiteSpace: 'nowrap',}}>
|
||||
<span style={{marginRight:5}}>打包失败</span><CloseOutlined />
|
||||
</div>
|
||||
<div title='正在打包,点击刷新状态' style={{ minWidth: 30, display: props.videoStatus == 'PKGING' ? 'unset' : 'none',cursor:'pointer',color:'rgba(64, 149, 229, 1)',
|
||||
//禁止换行
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
onClick={()=>{
|
||||
// props.upData()
|
||||
props.upVideoData()
|
||||
}}
|
||||
>
|
||||
<span style={{marginRight:5}}>正在打包</span><span style={{color:'green'}}>< RedoOutlined spin /></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div style={{ display: props.title == '操作手册' || props.title == '源代码' ? 'unset' : 'none' }}>
|
||||
下载 :
|
||||
<a href="/#" className="cpDown-edit" style={{ minWidth: 30 }} onClick={(e) => {
|
||||
<a href="/#" className="cpDown-edit" style={{ minWidth: 30}} onClick={(e) => {
|
||||
e.preventDefault();
|
||||
props.handleDownload();
|
||||
}}>word</a>
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
|
||||
}
|
||||
|
||||
.option {
|
||||
display: flex;
|
||||
/* background-color: red; */
|
||||
@ -29,7 +30,7 @@
|
||||
}
|
||||
|
||||
.down-pdf {
|
||||
margin-left: 5px;
|
||||
/* margin-left: 5px; */
|
||||
}
|
||||
|
||||
.card-proj {
|
||||
@ -895,6 +896,7 @@
|
||||
margin-right: 24px;
|
||||
color: #707070;
|
||||
margin-bottom: 5px;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
/* .threeBtn:hover {
|
||||
@ -1204,3 +1206,56 @@
|
||||
align-items: center;
|
||||
} */
|
||||
}
|
||||
|
||||
.buyBtn {
|
||||
/* width: 120px; */
|
||||
padding: 0 10px 0 10px;
|
||||
height: 19px;
|
||||
background: #FFEDED;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #D45C56;
|
||||
font-size: 12px;
|
||||
color: #C52A2A;
|
||||
cursor: pointer;
|
||||
}
|
||||
.buyBox{
|
||||
/* display: flex;
|
||||
align-items: center;
|
||||
justify-content: center; */
|
||||
text-align: center;
|
||||
line-height: 19px;
|
||||
|
||||
}
|
||||
.buyIng{
|
||||
/* width: 120px; */
|
||||
padding: 0 10px 0 10px;
|
||||
height: 19px;
|
||||
background: #F4FFED;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #389D3A;
|
||||
font-size: 12px;
|
||||
color: #389D3A;
|
||||
}
|
||||
.buyAgein{
|
||||
/* width: 120px; */
|
||||
padding: 0 10px 0 10px;
|
||||
height: 19px;
|
||||
background: #FFEDED;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #D45C56;
|
||||
font-size: 12px;
|
||||
color: #C52A2A;
|
||||
cursor: pointer;
|
||||
/* 禁止换行 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
.modalText{
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.modalTip{
|
||||
font-size: 14px;
|
||||
color: #ff0000;
|
||||
font-weight: 700;
|
||||
margin-top: 10px;
|
||||
}
|
@ -50,6 +50,19 @@ export default function ListProj() {
|
||||
const [total, setTotal] = useState(0);
|
||||
const [projs, setProjs] = useState<IProj[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [pkgPrice, setPkgPrice] = useState(0) //安装包价格
|
||||
const [videoPrice, setVideoPrice] = useState(0) //视频价格
|
||||
const getPrice = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: '/api/proj/charge/get',
|
||||
onSuccess({ data }) {
|
||||
// console.log('获取价格', data.additional.pkg/100,data.additional.videoDemo/100);
|
||||
setPkgPrice(data.additional.pkg/100)
|
||||
setVideoPrice(data.additional.videoDemo/100)
|
||||
}
|
||||
})
|
||||
}
|
||||
// const [keywords, setKeywords] = useState('');
|
||||
const domHeight = window.innerHeight - 250;
|
||||
// const navigate = useNavigate()
|
||||
@ -157,7 +170,7 @@ export default function ListProj() {
|
||||
// console.log('这啥啊',indexListContext.categoryChangeCount);
|
||||
// console.log('这啥啊2',indexListContext.category)
|
||||
getremindTag()
|
||||
|
||||
getPrice()
|
||||
}, [])
|
||||
// 更新数据
|
||||
// const upreqData = () => {
|
||||
@ -212,6 +225,8 @@ export default function ListProj() {
|
||||
<CardProj item={item}
|
||||
// updata={upreqData}
|
||||
tagArray={tagArray}
|
||||
pkgPrice={pkgPrice}
|
||||
videoPrice={videoPrice}
|
||||
remindTagArray={remindTagArray}
|
||||
/>
|
||||
</div>
|
||||
|
@ -39,7 +39,13 @@ export interface IProjDownload {
|
||||
canBtnClick?: boolean;
|
||||
|
||||
handleDownload(): void;
|
||||
downPdf():void
|
||||
downPdf():void;
|
||||
pkgStatus?:string;
|
||||
videoStatus?:string;
|
||||
upData?:any;
|
||||
againPkg?:any;
|
||||
upVideoData?:any;
|
||||
againVideo?:any;
|
||||
}
|
||||
|
||||
export interface IProjJump {
|
||||
|
@ -3,10 +3,103 @@ import './head.css'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import BalanceHead from '../../components/balance/BalanceHead.tsx';
|
||||
import RechargeHead from '../../components/recharge/RechargeHead.tsx';
|
||||
import { Dropdown, MenuProps, message, Modal, Space, Spin, Input } from "antd";
|
||||
import { Empty, Dropdown, MenuProps, message, Modal, Space, Spin, Input, Table, Form, Button, InputNumber } from "antd";
|
||||
import type { TableProps, FormProps } from 'antd';
|
||||
interface DataType {
|
||||
usericId: string;
|
||||
icPriceMaterial: number;
|
||||
icPriceAll: number;
|
||||
createTime: string;
|
||||
|
||||
}
|
||||
interface icDataType {
|
||||
contactName: string;//联系人姓名
|
||||
contactPhone: string;//联系人电话
|
||||
idCardNumber: string;//证件号
|
||||
idCardType: string;//证件类型
|
||||
lastLoginTime: string;//最后登录时间
|
||||
userId: string;//用户id
|
||||
userInfoId: string;//主键
|
||||
userInfoName: string;//用户名称
|
||||
userInfoNameEn: string;//用户英文名称
|
||||
userInfoType: string;//用户类型
|
||||
userUsername: string;//用户名
|
||||
}
|
||||
type FieldType = {
|
||||
icPriceMaterial: string;
|
||||
icPriceAll: string;
|
||||
};
|
||||
|
||||
// const data: DataType[] = [
|
||||
// {
|
||||
// key: '1',
|
||||
// code: 'xixi112',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '2',
|
||||
// code: 'xixi22',
|
||||
// price: 42,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '3',
|
||||
// code: 'hehe23',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '4',
|
||||
// code: 'hehe1232',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '4',
|
||||
// code: 'hehe123',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '5',
|
||||
// code: 'hehe1235',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '6',
|
||||
// code: 'hehe1236',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '7',
|
||||
// code: 'hehe1237',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '8',
|
||||
// code: 'hehe1238',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// {
|
||||
// key: '9',
|
||||
// code: 'hehe1239',
|
||||
// price: 32,
|
||||
|
||||
// },
|
||||
// ];
|
||||
|
||||
import { DownOutlined, UserOutlined, QuestionCircleOutlined, BellOutlined, KeyOutlined, LogoutOutlined, GiftOutlined, AccountBookOutlined, ContainerOutlined, MenuFoldOutlined, UsergroupAddOutlined, } from "@ant-design/icons";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import { put, get, post, getUseUrl } from "../../util/AjaxUtils.ts";
|
||||
import {
|
||||
put, get,
|
||||
post,
|
||||
getUseUrl
|
||||
} from "../../util/AjaxUtils.ts";
|
||||
import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import UserEdit from "../../components/user/UserEdit.tsx";
|
||||
import PasswordChange from "../../components/password/PasswordChange.tsx";
|
||||
@ -25,6 +118,14 @@ import MyOrder from '../../components/myOrder/MyOrder.tsx'
|
||||
import NoticeModal from '../../components/NoticeModal/NoticeModal.tsx';
|
||||
// import HeadCouponModal from '../../components/CouponModal/HeadCouponModal.tsx'
|
||||
export default function Head() {
|
||||
const [page, setPage] = useState(1) //邀请码使用人数分页
|
||||
const [total, setTotal] = useState(0) //邀请码使用人数总量
|
||||
const [icListLoading, setIcListLoading] = useState(false)
|
||||
|
||||
const [myInvModal, setMyInvModal] = useState(false) //我的邀请码弹窗
|
||||
const [createInvModal, setCreateInvModal] = useState(false) //创建邀请码弹窗
|
||||
const [icModal, setIcModal] = useState(false) //查看邀请码详情弹窗
|
||||
const [selectIc, setSelectIc] = useState('') //选中的邀请码
|
||||
// const redxuState: any = useSelector(state => state)
|
||||
// const couponModal = redxuState.couponModal
|
||||
// 消息通知弹窗
|
||||
@ -52,13 +153,13 @@ export default function Head() {
|
||||
// 解除绑定邀请码弹窗
|
||||
// const [relieveModal, setRelieveModal] = useState(false)
|
||||
// 申请的邀请码
|
||||
const [invNum, setInvNum] = useState('')
|
||||
// const [invNum, setInvNum] = useState('')
|
||||
// 输入的邀请码
|
||||
const [inInvNum, setInInvNum] = useState('')
|
||||
// 已绑定的邀请码
|
||||
const [bindingInvNum, setBindingInvNum] = useState('')
|
||||
// 邀请码申请状态
|
||||
const [icStatus, setIcStatus] = useState('')
|
||||
// const [icStatus, setIcStatus] = useState('')
|
||||
// 邀请码返利比例
|
||||
const [icRebateRatio, seticRebateRatio] = useState('')
|
||||
// 全托管分账
|
||||
@ -66,18 +167,18 @@ export default function Head() {
|
||||
// 写材料分账
|
||||
const [icPriceMaterial, seticPriceMaterial] = useState(0)
|
||||
// 获取邀请码申请状态
|
||||
const getIcStatus = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/ic/apply/get/self',
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data) {
|
||||
setIcStatus(data.applyStatus)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// const getIcStatus = () => {
|
||||
// get<any>({
|
||||
// messageApi,
|
||||
// url: '/api/ic/apply/get/self',
|
||||
// onSuccess({ data }) {
|
||||
// // console.log(data);
|
||||
// if (data) {
|
||||
// setIcStatus(data.applyStatus)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// 获取邀请码信息
|
||||
const getIc = () => {
|
||||
get<any>({
|
||||
@ -88,13 +189,13 @@ export default function Head() {
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
setInvNum(data.ic)
|
||||
// setInvNum(data.ic)
|
||||
setBindingInvNum(data.relationIc)
|
||||
seticRebateRatio(data.icRebateRatio)
|
||||
seticPriceAll(Number(data.icPriceAll) / 100 * Number(data.icRebateRatio) / 100)
|
||||
seticPriceMaterial(Number(data.icPriceMaterial) / 100 * Number(data.icRebateRatio) / 100)
|
||||
if (data.ic == '') {
|
||||
getIcStatus()
|
||||
// getIcStatus()
|
||||
}
|
||||
},
|
||||
onFinally() {
|
||||
@ -139,35 +240,158 @@ export default function Head() {
|
||||
putIc()
|
||||
}
|
||||
}
|
||||
// 点击获取邀请码
|
||||
const getInvNum = () => {
|
||||
post<any>({
|
||||
// 我的邀请码列表
|
||||
const [myIcList, setMyIcList] = useState([])
|
||||
// 获取我得邀请码列表
|
||||
const getMyIcList = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: `/api/ic/apply/apply`,
|
||||
url: '/api/ic/v2/list/self',
|
||||
// body: {
|
||||
// value: inInvNum
|
||||
// },
|
||||
onBefore() {
|
||||
setIcListLoading(true)
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
setMyIcList(data)
|
||||
// setMyIcList([])
|
||||
},
|
||||
onFinally() {
|
||||
setIcListLoading(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
const [minAllPrice, setMinAllPrice] = useState(0) //最低全托管折扣价
|
||||
const [minMaterialPrice, setMinMaterialPrice] = useState(0) //最低写材料折扣价
|
||||
// 查看我得最低定价
|
||||
const getMyIcMinPrice = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/proj/charge/get',
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('已申请')
|
||||
getIcStatus()
|
||||
onSuccess({ data }) {
|
||||
// console.log(data.projTypes);
|
||||
// console.log((data.projTypes.find((item:any) => item.type === 'MATERIAL')).price/100);
|
||||
|
||||
setMinAllPrice((data.projTypes.find((item: any) => item.type === 'ALL')).price / 100)
|
||||
setMinMaterialPrice((data.projTypes.find((item: any) => item.type === 'MATERIAL')).price / 100)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
// setInvNum('RSDNQ5H7')
|
||||
}
|
||||
// 查看我的邀请码是否超出限制
|
||||
const getIcLimit = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/ic/v2/list/self',
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
// console.log(data.length);
|
||||
|
||||
if (data.length >= 10) {
|
||||
messageApi.open({
|
||||
type: 'error',
|
||||
content: '您的邀请码已达上限'
|
||||
})
|
||||
} else {
|
||||
setCreateInvModal(true)
|
||||
getMyIcMinPrice()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 点击获取邀请码
|
||||
// const getInvNum = () => {
|
||||
// post<any>({
|
||||
// messageApi,
|
||||
// url: `/api/ic/apply/apply`,
|
||||
// onBefore() {
|
||||
|
||||
// },
|
||||
// onSuccess() {
|
||||
// messageApi.success('已申请')
|
||||
// getIcStatus()
|
||||
// },
|
||||
// onFinally() {
|
||||
|
||||
// }
|
||||
// })
|
||||
// // setInvNum('RSDNQ5H7')
|
||||
// }
|
||||
|
||||
// 表单事件
|
||||
const onFinish: FormProps<FieldType>['onFinish'] = (values: any) => {
|
||||
// console.log('Success:', values.icPriceAll);
|
||||
// console.log('Success:', values.icPriceMaterial);
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/ic/v2/save`,
|
||||
body: {
|
||||
icPriceAll: values.icPriceAll * 100,
|
||||
icPriceMaterial: values.icPriceMaterial * 100
|
||||
},
|
||||
onBefore() {
|
||||
setIcListLoading(true)
|
||||
},
|
||||
onSuccess() {
|
||||
// console.log(data);
|
||||
messageApi.success('创建成功')
|
||||
// 关闭弹窗
|
||||
setCreateInvModal(false)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIcListLoading(false)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
// const onFinishFailed: FormProps<FieldType>['onFinishFailed'] = (errorInfo) => {
|
||||
// console.log('Failed:', errorInfo);
|
||||
// };
|
||||
// 使用的邀请码的人的信息列表
|
||||
const [icList, setIcList] = useState<icDataType[]>([]);
|
||||
// 获取使用的邀请码的人的信息
|
||||
const getIcUserInfo = (id: string, page: number) => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: `/api/ic/v2/user-list/${id}`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 10
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIcListLoading(true)
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
setIcList(data.rows)
|
||||
setTotal(data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIcListLoading(false)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
// 复制邀请码
|
||||
const copyInvNum = () => {
|
||||
// navigator.clipboard.writeText(invNum)
|
||||
// messageApi.open({
|
||||
// type: 'success',
|
||||
// content: '已复制到剪切板'
|
||||
// })
|
||||
const copyInvNum = (code: any) => {
|
||||
// 创建一个临时的 input 元素
|
||||
const tempInput = document.createElement('input');
|
||||
document.body.appendChild(tempInput);
|
||||
tempInput.value = invNum;
|
||||
tempInput.value = code;
|
||||
|
||||
// 选中 input 中的内容
|
||||
tempInput.select();
|
||||
@ -190,7 +414,123 @@ export default function Head() {
|
||||
// 移除临时的 input 元素
|
||||
document.body.removeChild(tempInput);
|
||||
}
|
||||
const columns: TableProps<DataType>['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
align: 'center',
|
||||
dataIndex: 'usericId',
|
||||
key: 'usericId',
|
||||
render: (_text, _record, index) => <div>
|
||||
{index + 1}
|
||||
</div>,
|
||||
},
|
||||
{
|
||||
title: '邀请码',
|
||||
align: 'center',
|
||||
dataIndex: 'usericId',
|
||||
key: 'usericId',
|
||||
// render: (text) => <a>{text}</a>,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
key: 'usericId',
|
||||
// render: (text) => <a>{text}</a>,
|
||||
},
|
||||
{
|
||||
title: '写材料价格',
|
||||
align: 'center',
|
||||
dataIndex: 'icPriceMaterial',
|
||||
key: 'usericId',
|
||||
render: (text) => <>{text / 100}元</>
|
||||
},
|
||||
{
|
||||
title: '全托管价格',
|
||||
align: 'center',
|
||||
dataIndex: 'icPriceAll',
|
||||
key: 'usericId',
|
||||
render: (text) => <>{text / 100}元</>
|
||||
},
|
||||
// {
|
||||
// title: '返利比例',
|
||||
// align: 'center',
|
||||
// dataIndex: 'icRebateTatio',
|
||||
// key: 'usericId',
|
||||
// render: (text) => <>{text}%</>,
|
||||
// },
|
||||
// {
|
||||
// title: '产生的成交金额',
|
||||
// align: 'center',
|
||||
// dataIndex: 'totalMoney',
|
||||
// key: 'usericId',
|
||||
// },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
key: 'usericId',
|
||||
render: (_, record) => (
|
||||
<Space size="middle">
|
||||
|
||||
<a style={{
|
||||
textDecoration: 'underline',
|
||||
}} onClick={() => {
|
||||
copyInvNum(record.usericId)
|
||||
}}>复制</a>
|
||||
<a style={{
|
||||
textDecoration: 'underline',
|
||||
}} onClick={() => {
|
||||
setIcModal(true)
|
||||
setSelectIc(record.usericId)
|
||||
getIcUserInfo(record.usericId, page)
|
||||
}}>查看使用用户</a>
|
||||
|
||||
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
];
|
||||
const icColumns: TableProps<icDataType>['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
align: 'center',
|
||||
dataIndex: 'index',
|
||||
key: 'userInfoId',
|
||||
render: (_text, _record, index) => <div>
|
||||
{index + 1}
|
||||
</div>,
|
||||
},
|
||||
// {
|
||||
// title: '用户ID',
|
||||
// align: 'center',
|
||||
// dataIndex: 'userId',
|
||||
// key: 'userInfoId',
|
||||
// // render: (text) => <a>{text}</a>,
|
||||
// },
|
||||
{
|
||||
title: '账号',
|
||||
align: 'center',
|
||||
dataIndex: 'userUsername',
|
||||
key: 'userInfoId',
|
||||
// render: (text) => <a>{text}</a>,
|
||||
},
|
||||
{
|
||||
title: '昵称',
|
||||
align: 'center',
|
||||
dataIndex: 'userInfoName',
|
||||
key: 'userInfoId',
|
||||
// render: (text) => <a>{text}</a>,
|
||||
},
|
||||
{
|
||||
title: '最近登录时间',
|
||||
align: 'center',
|
||||
dataIndex: 'lastLoginTime',
|
||||
key: 'userInfoId',
|
||||
// render: (text) => <a>{text}</a>,
|
||||
},
|
||||
|
||||
]
|
||||
const dispath = useDispatch()
|
||||
// 更新所属者表格储存至redux
|
||||
const upBelongArray = () => {
|
||||
@ -624,7 +964,7 @@ export default function Head() {
|
||||
</Modal>
|
||||
<Modal title="邀请码"
|
||||
destroyOnClose
|
||||
|
||||
centered
|
||||
open={invitationModal}
|
||||
width={578}
|
||||
|
||||
@ -632,12 +972,12 @@ export default function Head() {
|
||||
onCancel={() => {
|
||||
// getNewLength()
|
||||
setinvitationModal(false)
|
||||
setInvNum('')
|
||||
// setInvNum('')
|
||||
setInInvNum('')
|
||||
}}>
|
||||
<Spin tip="加载中..." spinning={isLoading}>
|
||||
<div className='invitation-box'>
|
||||
<div className='invBox-top'>
|
||||
{/* <div className='invBox-top'>
|
||||
<div className='invBox-title'>
|
||||
我的邀请码
|
||||
</div>
|
||||
@ -671,7 +1011,34 @@ export default function Head() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className='invBox-top'>
|
||||
<div className='invBox-titleTop'
|
||||
|
||||
>
|
||||
<span
|
||||
onClick={() => {
|
||||
getMyIcList()
|
||||
setMyInvModal(true)
|
||||
}}
|
||||
style={{
|
||||
cursor: 'pointer'
|
||||
}}>查看我的邀请码</span>
|
||||
</div>
|
||||
<div className='invBox-lineTop'></div>
|
||||
<div className='createInv'>
|
||||
<span
|
||||
onClick={() => {
|
||||
// setCreateInvModal(true)
|
||||
getIcLimit()
|
||||
|
||||
}}
|
||||
style={{
|
||||
cursor: 'pointer'
|
||||
}}>创建邀请码</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* <div style={{ display: icRebateRatio ? 'block' : 'none' }}> */}
|
||||
<div className='invBox-bot'>
|
||||
<div className='invBox-tips' >
|
||||
@ -756,6 +1123,7 @@ export default function Head() {
|
||||
</Modal> */}
|
||||
<Modal title="我的订单"
|
||||
footer={null}
|
||||
centered
|
||||
// okText="确认"
|
||||
// cancelText="取消"
|
||||
destroyOnClose
|
||||
@ -774,7 +1142,7 @@ export default function Head() {
|
||||
</Modal>
|
||||
<Modal title="消息通知"
|
||||
footer={null}
|
||||
|
||||
centered
|
||||
destroyOnClose
|
||||
open={noticeModal}
|
||||
|
||||
@ -804,10 +1172,10 @@ export default function Head() {
|
||||
</div>
|
||||
<div className='kfHttp' >
|
||||
<span>若已登录电脑端,</span><span className='kfHttpText' onClick={
|
||||
() => {
|
||||
window.open('https://work.weixin.qq.com/kfid/kfc599f9d40b65ac392')
|
||||
}
|
||||
}>点击联系客服</span>
|
||||
() => {
|
||||
window.open('https://work.weixin.qq.com/kfid/kfc599f9d40b65ac392')
|
||||
}
|
||||
}>点击联系客服</span>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
@ -826,7 +1194,202 @@ export default function Head() {
|
||||
// setCouponModal(false)
|
||||
}}></HeadCouponModal>
|
||||
</Modal> */}
|
||||
<Modal title="我的邀请码"
|
||||
// footer={null}
|
||||
centered
|
||||
destroyOnClose
|
||||
open={myInvModal}
|
||||
footer={null}
|
||||
width={1000}
|
||||
onCancel={() => {
|
||||
setMyInvModal(false)
|
||||
|
||||
}}>
|
||||
<Spin tip="加载中..." spinning={icListLoading}>
|
||||
<div>
|
||||
|
||||
<Table columns={columns} dataSource={myIcList}
|
||||
|
||||
pagination={false}
|
||||
bordered
|
||||
key="usericId"
|
||||
rowKey="usericId"
|
||||
locale={{
|
||||
emptyText: () => {
|
||||
return (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: 300,
|
||||
}}>
|
||||
<Empty description="暂无邀请码" />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Spin>
|
||||
</Modal>
|
||||
<Modal title="创建邀请码"
|
||||
// footer={null}
|
||||
centered
|
||||
destroyOnClose
|
||||
open={createInvModal}
|
||||
footer={null}
|
||||
width={400}
|
||||
onCancel={() => {
|
||||
setCreateInvModal(false)
|
||||
|
||||
}}>
|
||||
<div style={{
|
||||
paddingTop: 20,
|
||||
|
||||
}}>
|
||||
<Spin tip="加载中..." spinning={icListLoading}>
|
||||
<Form
|
||||
name="basic"
|
||||
// labelCol={{ span: 8 }}
|
||||
// wrapperCol={{ span: 16 }}
|
||||
// style={{ maxWidth: 600 }}
|
||||
initialValues={{ remember: true }}
|
||||
onFinish={onFinish}
|
||||
// onFinishFailed={onFinishFailed}
|
||||
autoComplete="off"
|
||||
> <div style={{
|
||||
display: 'flex',
|
||||
// alignItems:'center',
|
||||
justifyContent: "center"
|
||||
}}>
|
||||
<div style={{ fontSize: 16, height: 40, lineHeight: "40px", marginRight: 5, textWrap: "nowrap" }}> <span style={{ color: 'red' }}>*</span> 全托管价格</div>
|
||||
<Form.Item<FieldType>
|
||||
// label={
|
||||
// <div style={{ fontSize: 16 }}>全托管价格</div>
|
||||
// }
|
||||
name="icPriceAll"
|
||||
rules={[
|
||||
{ required: true, message: '请输入写全托管价格' },
|
||||
{
|
||||
validator: (_, value) => {
|
||||
if (value && Number(value) < minAllPrice) {
|
||||
return Promise.reject(new Error(`全托管价格不能小于${minAllPrice}`));
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber
|
||||
size="large"
|
||||
// min={minAllPrice}
|
||||
style={{ width: 250 }}
|
||||
placeholder={`全托管价格不能小于${minAllPrice}元`}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
// alignItems:'center',
|
||||
justifyContent: "center"
|
||||
}}>
|
||||
<div style={{ fontSize: 16, height: 40, lineHeight: "40px", marginRight: 5, textWrap: "nowrap" }}> <span style={{ color: 'red' }}>*</span> 写材料价格</div>
|
||||
<Form.Item<FieldType>
|
||||
|
||||
// label={
|
||||
// <div style={{ fontSize: 16 }}>写材料价格</div>
|
||||
// }
|
||||
name="icPriceMaterial"
|
||||
rules={[
|
||||
{ required: true, message: '请输入写材料价格' },
|
||||
{
|
||||
validator: (_, value) => {
|
||||
if (value && Number(value) < minMaterialPrice) {
|
||||
return Promise.reject(new Error(`写材料价格不能小于${minMaterialPrice}`));
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber
|
||||
// min={minMaterialPrice}
|
||||
size="large"
|
||||
placeholder={`写材料价格不能小于${minMaterialPrice}元`}
|
||||
style={{ width: 250 }} />
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
|
||||
<Form.Item label={null}>
|
||||
<div style={{
|
||||
// background:'pink',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
marginTop: 20,
|
||||
|
||||
}}>
|
||||
<Button type="primary" htmlType="submit" block size={'large'} >
|
||||
创建邀请码
|
||||
</Button>
|
||||
</div>
|
||||
</Form.Item>
|
||||
|
||||
</Form>
|
||||
</Spin>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal title={`邀请码${selectIc}使用用户`}
|
||||
// footer={null}
|
||||
centered
|
||||
destroyOnClose
|
||||
open={icModal}
|
||||
footer={null}
|
||||
width={1000}
|
||||
onCancel={() => {
|
||||
setIcModal(false)
|
||||
|
||||
}}>
|
||||
<Spin tip="加载中..." spinning={icListLoading}>
|
||||
|
||||
|
||||
<Table columns={icColumns} dataSource={icList}
|
||||
|
||||
pagination={
|
||||
{
|
||||
pageSize: 10,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
getIcUserInfo(selectIc, currentPage)
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
}
|
||||
bordered
|
||||
key="userInfoId"
|
||||
rowKey="userInfoId"
|
||||
locale={{
|
||||
emptyText: () => {
|
||||
return (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: 300,
|
||||
}}>
|
||||
<Empty description="暂无使用用户" />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
</Spin>
|
||||
</Modal>
|
||||
<Spin tip="正在提交..." spinning={loading} fullscreen />
|
||||
{contextHolder}
|
||||
{modalHolder}
|
||||
|
@ -48,22 +48,26 @@
|
||||
justify-content: right;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.head .center .right .kf {
|
||||
/* margin-right: 20px; */
|
||||
display: flex;
|
||||
/* background-color: pink; */
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
/* background-color: pink; */
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.head .center .right .kf .kfText {
|
||||
margin-left: 5px;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.head .center .right .kf .kfIcon {
|
||||
}
|
||||
|
||||
.head .center .right .kf .kfIcon {
|
||||
font-size: 16px;
|
||||
color: #FF9F08;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
.head .center .left .logo {
|
||||
width: 38px;
|
||||
@ -138,9 +142,41 @@
|
||||
/* background-color: skyblue; */
|
||||
}
|
||||
|
||||
.invBox-titleTop {
|
||||
width: 50%;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* cursor: ; */
|
||||
}
|
||||
|
||||
.createInv {
|
||||
width: 50%;
|
||||
/* font-weight: bold;
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
justify-content: center; */
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #009C1D;
|
||||
text-decoration-line: underline;
|
||||
text-align: center;
|
||||
line-height: 118px;
|
||||
/* cursor: pointer; */
|
||||
}
|
||||
|
||||
.invBox-lineTop {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
background: #626262;
|
||||
}
|
||||
|
||||
.invBox-title {
|
||||
/* height: 118px; */
|
||||
width: 165px;
|
||||
width: 200px;
|
||||
|
||||
/* background-color: pink; */
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
@ -149,6 +185,16 @@
|
||||
/* line-height: 118px; */
|
||||
}
|
||||
|
||||
/* .invBox-titleTop{
|
||||
width:190px;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #454545;
|
||||
text-align: center;
|
||||
background-color: pink;
|
||||
|
||||
} */
|
||||
|
||||
.invBox-line {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
@ -169,6 +215,7 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
.invBox-btnTwo {
|
||||
width: 362px;
|
||||
height: 118px;
|
||||
@ -295,21 +342,24 @@
|
||||
text-decoration-line: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
.headLine{
|
||||
|
||||
.headLine {
|
||||
height: 20px;
|
||||
width: 1px;
|
||||
background-color: rgb(218, 218, 218);
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.head-notice{
|
||||
|
||||
.head-notice {
|
||||
color: #f78e4c;
|
||||
font-size: 28px;
|
||||
/* background-color: pink; */
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.noticeNum{
|
||||
|
||||
.noticeNum {
|
||||
top: 0;
|
||||
left: 15px;
|
||||
position: absolute;
|
||||
@ -320,10 +370,10 @@
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.kfBox{
|
||||
.kfBox {
|
||||
/* background-color: pink; */
|
||||
/* border: 1px solid rgb(209, 209, 209); */
|
||||
/* border-radius: 5px; */
|
||||
@ -332,22 +382,26 @@
|
||||
align-items: center;
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.kfTitle{
|
||||
|
||||
.kfTitle {
|
||||
font-size: 25px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.kfImg{
|
||||
|
||||
.kfImg {
|
||||
border: 1px solid rgb(226, 226, 226);
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.kfHttp{
|
||||
font-size: 16px;
|
||||
margin-top: 20px;
|
||||
color: rgb(124, 124, 124);
|
||||
|
||||
.kfHttp {
|
||||
font-size: 16px;
|
||||
margin-top: 20px;
|
||||
color: rgb(124, 124, 124);
|
||||
}
|
||||
.kfHttpText{
|
||||
|
||||
.kfHttpText {
|
||||
cursor: pointer;
|
||||
color: #5980B5;
|
||||
}
|
@ -101,7 +101,15 @@ export default function ProjEdit() {
|
||||
const nav = useNavigate();
|
||||
const pathParams = useParams();
|
||||
// 是否显示下载代码压缩包模块
|
||||
const [showZpi, setShowZpi] = useState(false)
|
||||
// const [showZpi, setShowZpi] = useState(false)
|
||||
// 是否显示下载安装包模块
|
||||
const [showPkg, setShowPkg] = useState(false)
|
||||
// 安装包模块生成状态
|
||||
const [pkgStatus, setPkgStatus] = useState('')
|
||||
// 视频模块生成状态
|
||||
const [videoStatus, setVideoStatus] = useState('')
|
||||
// 是否显示下载演示视频
|
||||
const [showVideo, setShowVideo] = useState(false)
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const [editStepArray, setEditStepArray] = useState<IProjEdit[]>([]);
|
||||
const [configArray, setConfigArray] = useState<IProjEdit[]>([]);
|
||||
@ -124,8 +132,85 @@ export default function ProjEdit() {
|
||||
|
||||
});
|
||||
|
||||
// 点击刷新页面数据获取安装包状态
|
||||
const upData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/pkg/get/proj-id/${pathParams.projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.pkgStatus == 'SUCCESS') {
|
||||
messageApi.success('安装包生成完毕,请下载');
|
||||
setPkgStatus('SUCCESS')
|
||||
|
||||
} else if (data.pkgStatus == 'FAIL') {
|
||||
setPkgStatus('FAIL')
|
||||
messageApi.error('安装包打包失败,点击重新打包');
|
||||
|
||||
} else {
|
||||
messageApi.error('安装包正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 点击刷新页面数据获取演示视频状态
|
||||
const upVideoData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/video/get/proj-id/${pathParams.projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.videoStatus == 'SUCCESS') {
|
||||
messageApi.success('演示视频生成完毕,请下载');
|
||||
setVideoStatus('SUCCESS')
|
||||
} else if (data.videoStatus == 'FAIL') {
|
||||
messageApi.error('演示视频打包失败,点击重新打包');
|
||||
setVideoStatus('FAIL')
|
||||
|
||||
} else {
|
||||
messageApi.error('演示视频正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 重新打包安装包
|
||||
const againPkg = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/pkg/save-pkg/proj-id/${pathParams.projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包安装包');
|
||||
setPkgStatus('PKGING')
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
const againVideo = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/video/save-pkg/proj-id/${pathParams.projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包演示视频');
|
||||
setVideoStatus('PKGING')
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// const height = window.innerHeight - 240;
|
||||
|
||||
const renderEditStep = (data: any, isEdited: boolean, isGenerateSuccess: boolean) => {
|
||||
@ -332,14 +417,24 @@ export default function ProjEdit() {
|
||||
}
|
||||
// console.log('状态判断', data.pay.chargeAdditionals);
|
||||
// setShowZpi(true)
|
||||
const isShow = data.pay.chargeAdditionals.includes('PKG')
|
||||
// console.log(isShow);
|
||||
if (isShow) {
|
||||
setShowZpi(true)
|
||||
} else {
|
||||
setShowZpi(false)
|
||||
}
|
||||
// const isShow = data.pay.chargeAdditionals.includes('PKG')
|
||||
// // console.log(isShow);
|
||||
// if (isShow) {
|
||||
// setShowZpi(true)
|
||||
// } else {
|
||||
// setShowZpi(false)
|
||||
// }
|
||||
// console.log(data.projVideo.videoStatus);
|
||||
// console.log(data.projPkg.pkgStatus);
|
||||
|
||||
if (data.projPkg.payStatus == 'PAID') {
|
||||
setShowPkg(true)
|
||||
setPkgStatus(data.projPkg.pkgStatus)
|
||||
}
|
||||
if (data.projVideo.payStatus == 'PAID') {
|
||||
setShowVideo(true)
|
||||
setVideoStatus(data.projVideo.videoStatus)
|
||||
}
|
||||
|
||||
// const isEdited = data.editSteps[0].editStatus == EditStepEnum.EDITED
|
||||
// && data.editSteps[1].editStatus == EditStepEnum.EDITED
|
||||
@ -627,7 +722,7 @@ export default function ProjEdit() {
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
/>
|
||||
{showZpi && (
|
||||
{/* {showZpi && (
|
||||
<CardProjDownload title="代码压缩包"
|
||||
desc="点击下载代码压缩包"
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
@ -638,6 +733,48 @@ export default function ProjEdit() {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code-zip/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
/>
|
||||
)} */}
|
||||
{showPkg && (
|
||||
<CardProjDownload title="安装包"
|
||||
desc="点击下载安装包"
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
handleDownload={() => {
|
||||
///route/proj/download/pkg/{projId}
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/pkg/${pathParams.projId}`)
|
||||
}}
|
||||
downPdf={() => {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
pkgStatus={pkgStatus}
|
||||
|
||||
upData={() => {
|
||||
upData()
|
||||
}}
|
||||
againPkg={() => {
|
||||
againPkg()
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{showVideo && (
|
||||
<CardProjDownload title="演示视频"
|
||||
desc="点击下载演示视频"
|
||||
videoStatus={videoStatus}
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
handleDownload={() => {
|
||||
///route/proj/download/pkg/{projId}
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/video/${pathParams.projId}`)
|
||||
}}
|
||||
downPdf={() => {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
upVideoData={() => {
|
||||
upVideoData()
|
||||
}}
|
||||
againVideo={() => {
|
||||
againVideo()
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{/* <CardProjDownload title="代码压缩包"
|
||||
desc="点击下载代码压缩包"
|
||||
|
@ -54,6 +54,93 @@ import ING from '../../static/status/ING.gif'
|
||||
// }
|
||||
// type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
||||
export default function ProjEditAll() {
|
||||
// 是否显示下载安装包模块
|
||||
const [showPkg, setShowPkg] = useState(false)
|
||||
// 是否显示下载演示视频
|
||||
const [showVideo, setShowVideo] = useState(false)
|
||||
// 安装包模块生成状态
|
||||
const [pkgStatus, setPkgStatus] = useState('')
|
||||
// 视频模块生成状态
|
||||
const [videoStatus, setVideoStatus] = useState('')
|
||||
// 点击刷新页面数据获取安装包状态
|
||||
const upData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/pkg/get/proj-id/${pathParams.projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.pkgStatus == 'SUCCESS') {
|
||||
messageApi.success('安装包生成完毕,请下载');
|
||||
setPkgStatus('SUCCESS')
|
||||
|
||||
} else if (data.pkgStatus == 'FAIL') {
|
||||
setPkgStatus('FAIL')
|
||||
messageApi.error('安装包打包失败,点击重新打包');
|
||||
|
||||
} else {
|
||||
messageApi.error('安装包正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 点击刷新页面数据获取演示视频状态
|
||||
const upVideoData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
url: `api/proj/video/get/proj-id/${pathParams.projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log(data);
|
||||
if (data.videoStatus == 'SUCCESS') {
|
||||
messageApi.success('演示视频生成完毕,请下载');
|
||||
setVideoStatus('SUCCESS')
|
||||
} else if (data.videoStatus == 'FAIL') {
|
||||
messageApi.error('演示视频打包失败,点击重新打包');
|
||||
setVideoStatus('FAIL')
|
||||
|
||||
} else {
|
||||
messageApi.error('演示视频正在生成,请稍后');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 重新打包安装包
|
||||
const againPkg = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/pkg/save-pkg/proj-id/${pathParams.projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包安装包');
|
||||
setPkgStatus('PKGING')
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
const againVideo = () => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/video/save-pkg/proj-id/${pathParams.projId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('重新打包演示视频');
|
||||
setVideoStatus('PKGING')
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 项目状态
|
||||
const [projStatus, setprojStatus] = useState('')
|
||||
// 进度提示弹窗
|
||||
@ -396,6 +483,14 @@ export default function ProjEditAll() {
|
||||
// })
|
||||
// setAiHelperModalOpen(!data.projIntroduction || !data.projDesc)
|
||||
setprojStatus(data.projStatus)
|
||||
if (data.projPkg.payStatus == 'PAID') {
|
||||
setShowPkg(true)
|
||||
setPkgStatus(data.projPkg.pkgStatus)
|
||||
}
|
||||
if (data.projVideo.payStatus == 'PAID') {
|
||||
setShowVideo(true)
|
||||
setVideoStatus(data.projVideo.videoStatus)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -579,7 +674,7 @@ export default function ProjEditAll() {
|
||||
}}
|
||||
/>
|
||||
{/* {showZpi && ( */}
|
||||
<CardProjDownload title="代码压缩包"
|
||||
{/* <CardProjDownload title="代码压缩包"
|
||||
desc="点击下载代码压缩包"
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
handleDownload={() => {
|
||||
@ -588,7 +683,49 @@ export default function ProjEditAll() {
|
||||
downPdf={() => {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code-zip/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
/>
|
||||
/> */}
|
||||
{showPkg && (
|
||||
<CardProjDownload title="安装包"
|
||||
desc="点击下载安装包"
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
handleDownload={() => {
|
||||
///route/proj/download/pkg/{projId}
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/pkg/${pathParams.projId}`)
|
||||
}}
|
||||
downPdf={() => {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
pkgStatus={pkgStatus}
|
||||
|
||||
upData={() => {
|
||||
upData()
|
||||
}}
|
||||
againPkg={() => {
|
||||
againPkg()
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{showVideo && (
|
||||
<CardProjDownload title="演示视频"
|
||||
desc="点击下载演示视频"
|
||||
canBtnClick={generateStatus == GenerateStatus.SUCCESS}
|
||||
handleDownload={() => {
|
||||
///route/proj/download/pkg/{projId}
|
||||
window.open(`${Axios.defaults?.baseURL}/route/proj/download/video/${pathParams.projId}`)
|
||||
}}
|
||||
downPdf={() => {
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
|
||||
}}
|
||||
videoStatus={videoStatus}
|
||||
upVideoData={() => {
|
||||
upVideoData()
|
||||
}}
|
||||
againVideo={() => {
|
||||
againVideo()
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{/* )} */}
|
||||
{/* <CardProjDownload title="代码压缩包"
|
||||
desc="点击下载代码压缩包"
|
||||
|
@ -462,6 +462,7 @@ export default function ProjNew() {
|
||||
</div>
|
||||
</div>
|
||||
<Modal title="提示"
|
||||
centered
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
open={isCreateModalOpen}
|
||||
@ -521,13 +522,14 @@ export default function ProjNew() {
|
||||
|
||||
|
||||
}}>
|
||||
<div>该操作会扣除 {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} 元,确定操作码?</div>
|
||||
<div>该操作会扣除 {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} 元,确定操作吗?</div>
|
||||
</Modal>
|
||||
<Modal title="提示"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
open={isEditModalOpen}
|
||||
onOk={() => {
|
||||
sessionStorage.setItem('projName', projInfo.projName);
|
||||
if (pathParams.projChargeType == ProjChargeType.ALL) {
|
||||
nav(`/proj-eall/${createProjId}`);
|
||||
} else if (pathParams.projChargeType == ProjChargeType.FREE) {
|
||||
|
BIN
src/static/buyimg.png
Normal file
BIN
src/static/buyimg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -14,7 +14,7 @@ export const WebSocketBaseUrl: string = 'ws://192.168.0.15:7025/copyright';
|
||||
// export const WebSocketBaseUrl: string = 'ws://192.168.0.103:7025/copyright';
|
||||
// export const WebSocketBaseUrl: string = '/copyright';
|
||||
export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
|
||||
// export const DevUserId: string = 'eb9a82a6-6ed3-4ba0-90e6-d836cefff915'; // 15042810561
|
||||
// export const DevUserId: string = 'eb9a82a6-6ed3-4ba0-90e6-d836cefff915'; // 15042810561 密码123456
|
||||
// export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
|
||||
// export const DevUserId: string = '';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user