作者 韩昌

gaibug

... ... @@ -4,6 +4,7 @@ import routes from './router'
import { useAppSelector, useAppDispatch, shallowEqualApp } from './store'
import { changeMessage } from './store/modules/counter'
import EventBus from '@/utils/events'
import AppLoading from './components/appLoading'
function App() {
const { counter } = useAppSelector((state) => state, shallowEqualApp)
... ... @@ -24,7 +25,7 @@ function App() {
return (
<>
<Suspense fallback="loading...">
<Suspense fallback={<AppLoading />}>
<div className="App">{useRoutes(routes)}</div>
</Suspense>
... ...
... ... @@ -3,6 +3,5 @@
// const BASE_URL = 'http://127.0.0.1:4523/m1/3332971-0-default/jeecg-boot' // mock
const BASE_URL = 'https://pet.apple02.brofirst.cn/jeecg-boot'
export const TIME_OUT = 10000;
export { BASE_URL }
... ...
... ... @@ -158,7 +158,7 @@ const SendPrescription: FC<IProps> = memo(
<span>添加处方药</span>
</div>
<div className="title">处方单证明:</div>
<Upload action={BASE_URL + '/sys/common/appUpload'} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}>
<Upload action={BASE_URL + '/sys/common/upload'} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}>
{fileList.length >= 3 ? null : uploadButton}
</Upload>
<Modal open={previewOpen} title={previewTitle} footer={null} onCancel={handleCancel}>
... ...
... ... @@ -51,8 +51,9 @@ const ViewSymptom: FC<IProps> = memo((props) => {
<div className="row">
就诊宠物:
<span>
{orderDetail?.petClass}/{orderDetail?.age || '年龄未知'}/{GHandler.optObjectValue('petSex', orderDetail?.petSex as any)}/
{GHandler.optObjectValue('isSterilization', orderDetail?.isSterilization as any)}/{orderDetail?.weight ? orderDetail?.weight + 'kg' : '体重未知'}
{orderDetail?.petName || '姓名未知'}/{orderDetail?.petClass}/{orderDetail?.age || '年龄未知'}/
{GHandler.optObjectValue('petSex', orderDetail?.petSex as any)}/{GHandler.optObjectValue('isSterilization', orderDetail?.isSterilization as any)}/
{orderDetail?.weight ? orderDetail?.weight + 'kg' : '体重未知'}
</span>
</div>
<div className="row">
... ...
... ... @@ -23,6 +23,7 @@ export const SendPrescriptionWrapper = styled.div`
box-sizing: border-box;
padding: 13px 0;
background: #F3FFFF;
cursor: pointer;
.blueIcon{
font-size: 18px;
color: #09b9d3;
... ...
... ... @@ -26,6 +26,7 @@ message.config({
const ShowOrderComHandler: FC<IProps> = (props) => {
const { orderList } = props
const dispatch = useAppDispatch()
const [open, setOpenHandler] = useState(false)
const [confirmLoading, setConfirmLoading] = useState(false)
const [modalTitle, setModalTitle] = useState<string>(' ')
... ... @@ -91,6 +92,8 @@ const ShowOrderComHandler: FC<IProps> = (props) => {
typeof instance?.setFileList === 'function' && instance.setFileList([])
dispatch(fetchOrderDataAction({ pageNo: 1 }))
// console.log(SendPrescriptionRef.current, 'SendPrescription 子组件实例')
return
... ... @@ -143,7 +146,7 @@ const ShowOrderComHandler: FC<IProps> = (props) => {
<Button type="primary" shape="round" onClick={() => showModalHandler(1, _.id)}>
查看症状
</Button>
{[30, '30'].includes(_.orderState as string | number) && (
{[30, '30'].includes(_.orderState as string | number) && [null, undefined, ''].includes(_?.orderId) && (
<Button type="primary" shape="round" onClick={() => showModalHandler(2, _.id)}>
发送处方单
</Button>
... ...
... ... @@ -21,7 +21,7 @@ const Login: FC<IProps> = memo(() => {
const [messageApi, contextHolder] = message.useMessage()
const [form, setForm] = useState<PhoneCodeLoginParamsType>({ phoneNum: '', code: '10086' })
const [form, setForm] = useState<PhoneCodeLoginParamsType>({ phoneNum: '', code: '' })
const [countdown, startCountdown] = useTimeHandler()
... ... @@ -48,7 +48,7 @@ const Login: FC<IProps> = memo(() => {
const { result }: { result: PhoneCodeLoginType } = await getMessageLogin(form)
if(Object.keys(result).length){
if (Object.keys(result).length) {
localStorage.setItem('token', result.token)
localStorage.setItem('userId', result.userId)
... ...