dingxin před 5 roky
rodič
revize
122866a831

+ 2
- 2
config/config.js Zobrazit soubor

@@ -230,12 +230,12 @@ export default {
230 230
                 },
231 231
                 {
232 232
                   path: '/channel/recommendClients',
233
-                  name: '推荐客户',
233
+                  name: '',
234 234
                   component: './channel/recommendClients',
235 235
                 },
236 236
                 {
237 237
                   path: '/channel/InviteClients',
238
-                  name: '邀请经纪人',
238
+                  name: '',
239 239
                   component: './channel/InviteClients',
240 240
                 },
241 241
               ],

+ 21
- 21
src/pages/channel/InviteClients.jsx Zobrazit soubor

@@ -11,21 +11,21 @@ function handleChange(value) {
11 11
   console.log(`selected ${value}`);
12 12
 }
13 13
 
14
-const dataSource = [
15
-  {
16
-    key: '1',
17
-    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
18
-    name: '123',
19
-    age: 32,
20
-    address: '西湖区湖底公园1号',
21
-  },
22
-  {
23
-    key: '2',
24
-    img: '',
25
-    age: 42,
26
-    address: '西湖区湖底公园1号',
27
-  },
28
-];
14
+// const dataSource = [
15
+//   {
16
+//     key: '1',
17
+//     img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
18
+//     name: '123',
19
+//     age: 32,
20
+//     address: '西湖区湖底公园1号',
21
+//   },
22
+//   {
23
+//     key: '2',
24
+//     img: '',
25
+//     age: 42,
26
+//     address: '西湖区湖底公园1号',
27
+//   },
28
+// ];
29 29
 
30 30
 const columns = [
31 31
   {
@@ -34,7 +34,7 @@ const columns = [
34 34
     key: 'img',
35 35
     align: 'center',
36 36
 
37
-    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
37
+    render: (text, record) => <img src={record.avatarurl} className={channels.touxiang} />,
38 38
   },
39 39
   {
40 40
     title: '用户姓名',
@@ -45,14 +45,14 @@ const columns = [
45 45
   },
46 46
   {
47 47
     title: '电话',
48
-    dataIndex: 'integral',
49
-    key: 'integral',
48
+    dataIndex: 'tel',
49
+    key: 'tel',
50 50
     align: 'center',
51 51
   },
52 52
   {
53 53
     title: '性别',
54
-    dataIndex: 'total',
55
-    key: 'total',
54
+    dataIndex: 'sex',
55
+    key: 'sex',
56 56
     align: 'center',
57 57
   },
58 58
 ];
@@ -61,7 +61,7 @@ const header = props => {
61 61
   const [data, setData] = useState({ channelNmae: [], result: [] })
62 62
   // eslint-disable-next-line react-hooks/rules-of-hooks
63 63
   useEffect(() => {
64
-    getList({ pageNum: 1, pageSize: 10 })
64
+    getList({ id: props.location.query.id, pageNum: 1, pageSize: 10 })
65 65
   }, [])
66 66
 
67 67
   function getList(params) {

+ 23
- 10
src/pages/channel/brokerList.jsx Zobrazit soubor

@@ -51,7 +51,7 @@ const columns = [
51 51
     align: 'center',
52 52
 
53 53
     // eslint-disable-next-line jsx-a11y/alt-text
54
-    render: (text, record) => <img src={record.avatarurl }/>,
54
+    render: (text, list) => <img src={list.avatarurl }/>,
55 55
   },
56 56
   {
57 57
     title: '用户姓名',
@@ -76,28 +76,41 @@ const columns = [
76 76
     dataIndex: 'recommendCount',
77 77
     key: 'recommendCount',
78 78
     align: 'center',
79
+    render: (text, list) => <a style={ { color: '#66B3FF' } } onClick= {() => torecommend(list.personId)} >{ list.recommendCount }</a>,
79 80
   },
80 81
   {
81 82
     title: '邀请经纪人',
82
-    dataIndex: 'rest',
83
-    key: 'rest',
83
+    dataIndex: 'inviteCount',
84
+    key: 'inviteCount',
84 85
     align: 'center',
86
+    render: (text, list) => <a style={ { color: '#66B3FF' } } onClick= {() => toinvite(list.personId)} >{ list.inviteCount }</a>,
85 87
   },
86 88
 ];
87 89
 
88
-// 跳转到编辑商品
89
-function toEditGoods() {
90
+// 跳转到推荐客户
91
+function torecommend(personId) {
90 92
   router.push({
91
-    pathname: '/channel/addChannel',
93
+    pathname: '/channel/recommendClients',
92 94
     query: {
93
-      a: 'b',
95
+      id: personId,
94 96
     },
95 97
   });
96 98
 }
97 99
 
100
+// 跳转到邀请经纪人
101
+function toinvite(personId) {
102
+  router.push({
103
+    pathname: '/channel/InviteClients',
104
+    query: {
105
+      id: personId,
106
+    },
107
+  });
108
+}
109
+
110
+
98 111
 const header = props => {
99 112
   // eslint-disable-next-line react-hooks/rules-of-hooks
100
-  const [data, setData] = useState({})
113
+  const [data, setData] = useState({ list: [] })
101 114
 
102 115
   // eslint-disable-next-line react-hooks/rules-of-hooks
103 116
   const [queryData, setQueryData] = useState({})
@@ -164,11 +177,11 @@ return (
164 177
         <Input onChange = { onInputChangeName } style ={{ width: 150 }} />
165 178
       </div>
166 179
       <div>
167
-      <Button type="primary"  onClick={() => queryList() }>查询</Button>
180
+      <Button type="primary" onClick={() => queryList() }>查询</Button>
168 181
       <Button onClick={() => refurbishList() }>重置</Button>
169 182
     </div>
170 183
     </div>
171
-    <Table dataSource={data.records} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
184
+    <Table dataSource={data.list} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
172 185
   </>
173 186
 )
174 187
 }