Kaynağa Gözat

标题跳转

魏超 5 yıl önce
ebeveyn
işleme
a36af570e9

+ 2
- 1
src/pages/channel/channelList.jsx Dosyayı Görüntüle

@@ -8,6 +8,7 @@ import EditIcon from '@/components/EditIcon';
8 8
 import apis from '../../services/apis';
9 9
 import request from '../../utils/request';
10 10
 import channels from './channelList.less';
11
+import Navigate from '@/components/Navigate';
11 12
 
12 13
 const columns = [
13 14
   // {
@@ -23,13 +24,13 @@ const columns = [
23 24
     dataIndex: 'channelCode',
24 25
     key: 'channelCode',
25 26
     align: 'center',
26
-    render: text => <a>{text}</a>,
27 27
   },
28 28
   {
29 29
     title: '渠道名称',
30 30
     dataIndex: 'channelName',
31 31
     key: 'channelName',
32 32
     align: 'center',
33
+    render: (text, record) => <Navigate to={`/channel/editChannel?id=${record.channelId}`}>{text}</Navigate>
33 34
   },
34 35
   {
35 36
     title: '联系人',

+ 3
- 2
src/pages/news/list/NewsList.jsx Dosyayı Görüntüle

@@ -13,6 +13,7 @@ import Prompt from 'umi/prompt';
13 13
 
14 14
 import AuthButton from '@/components/AuthButton';
15 15
 import EditIcon from '@/components/EditIcon';
16
+import Navigate from '@/components/Navigate';
16 17
 
17 18
 
18 19
 const { Option } = Select;
@@ -188,7 +189,7 @@ function body(props) {
188 189
 
189 190
     return (
190 191
       <Card
191
-        hoverable
192
+        // hoverable
192 193
         style={{ height: '230px', minWidth: '570px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)', position: 'relative' }}
193 194
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
194 195
         bodyStyle={{ padding: '10px 20px' }}
@@ -223,7 +224,7 @@ function body(props) {
223 224
             textOverflow: 'ellipsis',
224 225
             whiteSpace: 'nowrap',
225 226
             width: '75%',
226
-          }}>{data.newsName}</p>
227
+          }}><Navigate to={`/news/list/editNewsList?newsId=${data.newsId}`}>{data.newsName}</Navigate></p>
227 228
           <p style={{ fontSize: ' 0.106rem', color: '#555', marginBottom: '8px', display: 'flex' }}>
228 229
             <span style={{ display: 'inline-block', width: '50%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>资讯类型:{data.newsType.newsTypeName}</span>
229 230
             <span>状态:{data.newsStatus == 0 ? "已发布" : "未发布"}</span>

+ 2
- 1
src/pages/news/type/NewsType.jsx Dosyayı Görüntüle

@@ -8,6 +8,7 @@ import apis from '../../../services/apis';
8 8
 import request from '../../../utils/request'
9 9
 import BuildSelect from '../../../components/SelectButton/BuildSelect';
10 10
 import styles from '../../style/GoodsList.less';
11
+import Navigate from '@/components/Navigate';
11 12
 
12 13
 function NewsType(props) {
13 14
   // 获取初始化数据
@@ -92,7 +93,7 @@ function NewsType(props) {
92 93
       dataIndex: 'newsTypeName',
93 94
       key: 'newsTypeName',
94 95
       align: 'center',
95
-
96
+      render: (text, record) => <Navigate to={`/news/type/editNews?id=${record.newsTypeId}`}>{text}</Navigate>
96 97
     },
97 98
     {
98 99
       title: '操作',