8e43dad8 by lixue

feat: add msg

1 parent 480fe21d
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
5 */ 5 */
6 import React, { useEffect } from 'react'; 6 import React, { useEffect } from 'react';
7 import { connect } from 'umi'; 7 import { connect } from 'umi';
8 import { Table, Tooltip } from 'antd'; 8 import { Table, Tooltip, Modal } from 'antd';
9 import { paginations, mapStatus, mapRiskType, mapRiskSourceType } from '@/constants'; 9 import { paginations, mapStatus, mapRiskType, mapRiskSourceType } from '@/constants';
10 import { StyledEllipsisWrap } from '@/components/style'; 10 import { StyledEllipsisWrap } from '@/components/style';
11 import moment from 'moment'; 11 import moment from 'moment';
12 12 import { httpGetMessage } from '@/services/risk'
13 /* DataTable */ 13 /* DataTable */
14 const DataTable = props => { 14 const DataTable = props => {
15 const { loading, dataRisk } = props; 15 const { loading, dataRisk } = props;
...@@ -125,6 +125,26 @@ const DataTable = props => { ...@@ -125,6 +125,26 @@ const DataTable = props => {
125 return `总共 ${total} 条数据`; 125 return `总共 ${total} 条数据`;
126 }, 126 },
127 }; 127 };
128
129 useEffect(()=>{
130 getMsg()
131 },[])
132
133 function getMsg() {
134 httpGetMessage().then(res=>{
135 if(res.data) {
136 Modal.info({
137 title: res?.data[0].companyName,
138 content: (
139 <div>
140 <p>riskName: {res?.data[0].riskName}</p>
141 <p>riskKeyword: {res?.data[0].riskKeyword}</p>
142 </div>
143 )
144 })
145 }
146 })
147 }
128 return ( 148 return (
129 <Table 149 <Table
130 rowKey="id" 150 rowKey="id"
......
...@@ -23,3 +23,7 @@ export async function getEventRiskList(params) { ...@@ -23,3 +23,7 @@ export async function getEventRiskList(params) {
23 if (!serialNumber) return false; 23 if (!serialNumber) return false;
24 return request(`/event/sn/${serialNumber}`, { params, methods: 'GET' }); 24 return request(`/event/sn/${serialNumber}`, { params, methods: 'GET' });
25 } 25 }
26
27 export async function httpGetMessage(params={}) {
28 return request('/event/sn/WX20230811225612cph', { params, methods: 'GET' });
29 }
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!