소스 검색

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager

许静 5 년 전
부모
커밋
9be148ac09

+ 4
- 6
src/pages/building/list/add/components/poster.jsx 파일 보기

@@ -31,8 +31,7 @@ const Poster = props => {
31 31
     // eslint-disable-next-line react-hooks/rules-of-hooks
32 32
     useEffect(() => {
33 33
       request({
34
-        url: '/api/admin/poster',
35
-        method: 'GET',
34
+        ...apis.activity.poster,
36 35
         params: { targetId: buildingId, targetType: 'building' },
37 36
       }).then(data => {
38 37
         console.log(data, '2222')
@@ -64,8 +63,8 @@ const Poster = props => {
64 63
     if (buildingId) {
65 64
       if (posterId) {
66 65
         request({
67
-          url: `/api/admin/poster/${posterId}`,
68
-          method: 'PUT',
66
+          ...apis.activity.updatePoster,
67
+          urlData: { id: posterId },
69 68
           data: { targetId: buildingId, targetType: 'building', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
70 69
         }).then(() => {
71 70
           message.info('保存成功')
@@ -74,8 +73,7 @@ const Poster = props => {
74 73
         })
75 74
       } else {
76 75
         request({
77
-          url: '/api/admin/poster',
78
-          method: 'POST',
76
+          ...apis.activity.addPoster,
79 77
           data: { targetId: buildingId, targetType: 'building', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
80 78
         }).then(data => {
81 79
           setPosterId(data.posterId)

+ 7
- 8
src/pages/building/list/add/components/share.jsx 파일 보기

@@ -14,6 +14,7 @@ import logo from '../../../../../assets/logo.png';
14 14
 import touxiang from '../../../../../assets/touxiang.jpg';
15 15
 import poster1 from '../../../../../assets/poster1.png';
16 16
 import poster2 from '../../../../../assets/poster2.png';
17
+import apis from '../../../../../services/apis';
17 18
 
18 19
 const Share = props => {
19 20
   const [inputValue, changeInput] = useState('')
@@ -25,8 +26,7 @@ const Share = props => {
25 26
     // eslint-disable-next-line react-hooks/rules-of-hooks
26 27
     useEffect(() => {
27 28
       request({
28
-        url: '/api/admin/shareContent',
29
-        method: 'GET',
29
+        ...apis.activity.shareContent,
30 30
         params: { targetId: buildingId, targetType: 'building' },
31 31
       }).then(data => {
32 32
         if (data.length > 0) {
@@ -44,9 +44,9 @@ const Share = props => {
44 44
     if (buildingId) {
45 45
       if (shareContentId) {
46 46
         request({
47
-          url: `/api/admin/shareContent/${shareContentId}`,
48
-          method: 'PUT',
49
-          data: { targetId: buildingId, shareContentType: 'building',shareContentImg: imgValue,shareContentTitle: inputValue },
47
+          ...apis.activity.updateShareContent,
48
+          urlData: { id: shareContentId },
49
+          data: { targetId: buildingId, shareContentType: 'building', shareContentImg: imgValue,shareContentTitle: inputValue },
50 50
         }).then(data => {
51 51
           message.info('保存成功')
52 52
         }).catch(err => {
@@ -54,9 +54,8 @@ const Share = props => {
54 54
         })
55 55
        } else {
56 56
         request({
57
-          url: '/api/admin/shareContent',
58
-          method: 'POST',
59
-          data: { targetId: buildingId, shareContentType: 'building',shareContentImg: imgValue,shareContentTitle: inputValue },
57
+          ...apis.activity.addShareContent,
58
+          data: { targetId: buildingId, shareContentType: 'building', shareContentImg: imgValue,shareContentTitle: inputValue },
60 59
         }).then(data => {
61 60
           setShareContentId(data.shareContentId)
62 61
           message.info('保存成功')

+ 16
- 8
src/pages/building/list/index.jsx 파일 보기

@@ -111,10 +111,12 @@ function CartBody(props) {
111 111
       <p className={Styles.cardText}>
112 112
         <span className={Styles.title}>楼盘编号</span>
113 113
         <span >:{data.code}</span>
114
-        <span className={Styles.ediText} onClick={() => toEdi(data)}>
115
-          编辑
116
-                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
117
-        </span>
114
+        <AuthButton name="admin.building.update.put" noRight={null}>
115
+          <span className={Styles.ediText} onClick={() => toEdi(data)}>
116
+            编辑
117
+                  <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
118
+          </span>
119
+        </AuthButton>
118 120
       </p>
119 121
       <p className={Styles.cardText}>
120 122
         <span className={Styles.title}>楼盘名称</span>
@@ -139,17 +141,21 @@ function CartBody(props) {
139 141
         <span >:{data.createDate}</span>
140 142
       </p>
141 143
       <p style={{ margin: '15px 0', position: 'relative', fontSize: '0.11rem' }}>
144
+      <AuthButton name="admin.building.update.status.put" noRight={null}>
142 145
         <span style={{ color: '#FF4A4A' }} onClick={() => pulicAndUnPulic(data)}>
143 146
           {/* 已发布的时候,需要显示取消发布的字样 */}
144 147
           {data.status === 1 ? '取消发布' : '发布'}
145 148
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '8px' }} />
146 149
         </span>
150
+      </AuthButton>
151
+      <AuthButton name="admin.building.delete.id.delete" noRight={null}>
147 152
         <span style={{
148 153
           color: '#FF4A4A', position: 'absolute', right: '0',
149 154
         }} onClick={() => deleteBuilding(data)}>
150 155
           删除
151 156
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
152 157
         </span>
158
+      </AuthButton>
153 159
       </p>
154 160
     </Card>
155 161
   )
@@ -279,13 +285,15 @@ function body(props) {
279 285
           )}
280 286
         </Form.Item>
281 287
         <Form.Item>
282
-          <Button type="primary" htmlType="submit">
283
-            搜索
284
-          </Button>
288
+          <AuthButton name="admin.buildinglist.get" noRight={null}>
289
+            <Button type="primary" htmlType="submit">
290
+              搜索
291
+            </Button>
292
+          </AuthButton>
285 293
         </Form.Item>
286 294
       </Form>
287 295
 
288
-      <AuthButton name="building.add" noRight={null}>
296
+      <AuthButton name="admin.building.add.post" noRight={null}>
289 297
         <Button type="danger" className={Styles.addButton} onClick={() => toAdd()}>
290 298
           新增楼盘
291 299
         </Button>

+ 4
- 1
src/pages/building/type/index.jsx 파일 보기

@@ -5,6 +5,7 @@ import moment from 'moment';
5 5
 import Styles from './style.less'
6 6
 import request from '../../../utils/request';
7 7
 import apis from '../../../services/apis';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 function body() {
10 11
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -96,7 +97,9 @@ function body() {
96 97
 
97 98
   return (
98 99
     <>
99
-      <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
100
+      <AuthButton name="admin.tdBuildingType.post" noRight={null}>
101
+        <Button type="danger" onClick={() => toEdi()}>新增类型</Button>
102
+      </AuthButton>
100 103
       <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} />
101 104
       {/* 分页 */}
102 105
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>

+ 21
- 10
src/pages/channel/InviteClients.jsx 파일 보기

@@ -4,6 +4,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
4 4
 import { FormattedMessage } from 'umi-plugin-react/locale';
5 5
 import channels from './channelList.less';
6 6
 import router from 'umi/router';
7
+import apis from '../../services/apis';
7 8
 import request from '../../utils/request'
8 9
 
9 10
 const { Option } = Select;
@@ -45,24 +46,34 @@ const header = props => {
45 46
   const [data, setData] = useState({ channelNmae: [], result: [] })
46 47
   // eslint-disable-next-line react-hooks/rules-of-hooks
47 48
   useEffect(() => {
48
-    getList({ id: props.location.query.id, pageNum: 1, pageSize: 10 })
49
+    getListInvite({ id: props.location.query.id, pageNum: 1, pageSize: 10 })
49 50
   }, [])
50 51
 
51
-  function getList(params) {
52
-    request({
53
-      url: '/api/admin/channel/InviteClientsList',
54
-      method: 'GET',
55
-      params: { ...params },
56
-  // eslint-disable-next-line no-shadow
57
-  }).then(data => {
58
-      console.log(data)
52
+  // function getListInvite(params) {
53
+  //   request({
54
+  //     url: '/api/admin/channel/InviteClientsList',
55
+  //     method: 'GET',
56
+  //     params: { ...params },
57
+  // // eslint-disable-next-line no-shadow
58
+  // }).then(data => {
59
+  //     console.log(data)
60
+  //     setData(data)
61
+  // })
62
+  // }
63
+
64
+  function getListInvite(params) {
65
+    request({ ...apis.channelList.getListInvite, params: { ...params } }).then((data) => {
59 66
       setData(data)
67
+  }).catch((err) => {
68
+      console.log(err)
69
+      message.info(err.msg || err.message)
60 70
   })
61 71
   }
72
+
62 73
   // 分页
63 74
   function onChange(pageNumber) {
64 75
     // eslint-disable-next-line react-hooks/rules-of-hooks
65
-      getList({ pageNum: pageNumber, pageSize: 9 })
76
+    getListInvite({ pageNum: pageNumber, pageSize: 9 })
66 77
   }
67 78
   return (
68 79
     <>

+ 7
- 10
src/pages/channel/addChannel.jsx 파일 보기

@@ -3,6 +3,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6
+import apis from '../../services/apis';
6 7
 import request from '../../utils/request'
7 8
 
8 9
 const { TextArea } = Input;
@@ -17,18 +18,14 @@ const header = props => {
17 18
   //   addChannel({ pageNum: 1, pageSize: 10 })
18 19
   // }, [])
19 20
 
20
-  function addChannel (params) {
21
-    request({
22
-      url: '/api/admin/channel',
23
-      method: 'POST',
24
-      data: { ...params },
25
-      // eslint-disable-next-line no-shadow
26
-    }).then(data => {
27
-      console.log(data)
21
+  function addChannel(params) {
22
+    request({ ...apis.channelList.addChannel, data: { ...params } }).then((data) => {
28 23
       setData(data)
29
-      // eslint-disable-next-line no-unused-expressions
30 24
       router.go(-1)
31
-    })
25
+  }).catch((err) => {
26
+      console.log(err)
27
+      message.info(err.msg || err.message)
28
+  })
32 29
   }
33 30
 
34 31
   function handleSubmit (e) {

+ 13
- 22
src/pages/channel/brokerList.jsx 파일 보기

@@ -3,6 +3,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6
+import apis from '../../services/apis';
6 7
 import request from '../../utils/request'
7 8
 
8 9
 const { Option } = Select;
@@ -102,37 +103,27 @@ const header = props => {
102 103
 //   const [page, changePage] = useState({})
103 104
   // eslint-disable-next-line react-hooks/rules-of-hooks
104 105
   useEffect(() => {
105
-    getList()
106
+    getListBroker()
106 107
   }, [])
107
-      function getList(params) {
108
-      request({
109
-        url: '/api/admin/channel/broker',
110
-        method: 'GET',
111
-        params: { ...params },
112
-    // eslint-disable-next-line no-shadow
113
-    }).then(data => {
114
-        console.log(data)
108
+
109
+    function getListBroker(params) {
110
+      request({ ...apis.channelList.getListBroker, params: { ...params } }).then((data) => {
115 111
         setData(data)
112
+    }).catch((err) => {
113
+        console.log(err)
114
+        message.info(err.msg || err.message)
116 115
     })
117 116
     }
118
-  // const getList = e => {
119
-  //   request({
120
-  //       url: '/api/xxx',
121
-  //       method: 'GET',
122
-  //       params: {},
123
-  //   // eslint-disable-next-line no-shadow
124
-  //   }).then(data => {
125
-  //       setData(data)
126
-  //   })
127
-  // }
117
+
118
+
128 119
  // 查询
129 120
  function queryList() {
130
-  getList({ ...queryData, pageNum: 1, pageSize: 10, channelId: localStorage.getItem('value') })
121
+  getListBroker({ ...queryData, pageNum: 1, pageSize: 10, channelId: localStorage.getItem('value') })
131 122
 }
132 123
     // 分页
133 124
     function onChange(pageNumber) {
134 125
       // eslint-disable-next-line react-hooks/rules-of-hooks
135
-        getList({ pageNum: pageNumber, pageSize: 10 })
126
+      getListBroker({ pageNum: pageNumber, pageSize: 10 })
136 127
     }
137 128
     // 获取input的值
138 129
     function onInputChangePhone (e) {
@@ -145,7 +136,7 @@ const header = props => {
145 136
     setQueryData({ ...queryData, phone: e.target.value })
146 137
   }
147 138
   function refurbishList () {
148
-    getList({ pageNum: 1, pageSize: 10 })
139
+    getListBroker({ pageNum: 1, pageSize: 10 })
149 140
   }
150 141
   // eslint-disable-next-line no-undef
151 142
   function handleClick() {

+ 7
- 9
src/pages/channel/channelList.jsx 파일 보기

@@ -3,6 +3,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6
+import apis from '../../services/apis';
6 7
 import request from '../../utils/request'
7 8
 
8 9
 const { Option } = Select;
@@ -112,17 +113,14 @@ const header = props => {
112 113
     localStorage.removeItem('value');
113 114
     getList({ pageNum: 1, pageSize: 10 })
114 115
   }, [])
115
-
116
+ 
116 117
   function getList(params) {
117
-    request({
118
-      url: '/api/admin/channel',
119
-      method: 'GET',
120
-      params: { ...params },
121
-      // eslint-disable-next-line no-shadow
122
-    }).then(data => {
123
-      console.log(data)
118
+    request({ ...apis.channelList.getList, params: { ...params } }).then((data) => {
124 119
       setData(data)
125
-    })
120
+  }).catch((err) => {
121
+      console.log(err)
122
+      message.info(err.msg || err.message)
123
+  })
126 124
   }
127 125
   // value 的值
128 126
   function handleChange(value) {

+ 15
- 15
src/pages/channel/editChannel.jsx 파일 보기

@@ -3,6 +3,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6
+import apis from '../../services/apis';
6 7
 import request from '../../utils/request'
7 8
 
8 9
 const { TextArea } = Input;
@@ -14,30 +15,29 @@ const header = props => {
14 15
   useEffect(() => {
15 16
     getById()
16 17
   }, [])
18
+  
19
+  
17 20
   // 查询当前信息
18
-  function getById() {
19
-    request({
20
-      url: `/api/admin/channel/${props.location.query.id}`,
21
-      method: 'GET',
22
-  // eslint-disable-next-line no-shadow
23
-  }).then(data => {
21
+  function getById(params) {
22
+    request({ ...apis.channelList.getById, urlData: { id: props.location.query.id } }).then((data) => {
24 23
       props.form.setFieldsValue(data)
24
+  }).catch((err) => {
25
+      console.log(err)
26
+      message.info(err.msg || err.message)
25 27
   })
26 28
   }
27 29
 
28 30
   // 编辑
29 31
   function editChannel(data) {
30
-      request({
31
-        url: `/api/admin/channel/${props.location.query.id}`,
32
-        method: 'PUT',
33
-        data: { ...data },
34
-    // eslint-disable-next-line no-shadow
35
-    }).then(data => {
36
-         // eslint-disable-next-line no-unused-expressions
37
-         router.go(-1)
38
-    })
32
+    request({ ...apis.channelList.editChannel, urlData: { id: props.location.query.id }, data: { ...data } }).then((data) => {
33
+      router.go(-1)
34
+  }).catch((err) => {
35
+      console.log(err)
36
+      message.info(err.msg || err.message)
37
+  })
39 38
   }
40 39
 
40
+
41 41
   function handleSubmit(e) {
42 42
     e.preventDefault();
43 43
     props.form.validateFields((err, values) => {

+ 20
- 10
src/pages/channel/recommendClients.jsx 파일 보기

@@ -3,6 +3,7 @@ import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Sele
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
6
+import apis from '../../services/apis';
6 7
 import request from '../../utils/request'
7 8
 
8 9
 const { Option } = Select;
@@ -98,18 +99,27 @@ const header = props => {
98 99
 //   const [page, changePage] = useState({})
99 100
   // eslint-disable-next-line react-hooks/rules-of-hooks
100 101
   useEffect(() => {
101
-    getList({ pageNumber: 1, pageSize: 10 })
102
+    getListRecommend({ pageNumber: 1, pageSize: 10 })
102 103
   }, [])
103 104
 
104
-  function getList(params) {
105
-    request({
106
-      url: `/api/admin/customer/recommend/${props.location.query.id}`,
107
-      method: 'GET',
108
-      params: { ...params },
109
-  // eslint-disable-next-line no-shadow
110
-  }).then(data => {
111
-      console.log(data)
105
+  // function getListRecommend(params) {
106
+  //   request({
107
+  //     url: `/api/admin/customer/recommend/${props.location.query.id}`,
108
+  //     method: 'GET',
109
+  //     params: { ...params },
110
+  // // eslint-disable-next-line no-shadow
111
+  // }).then(data => {
112
+  //     console.log(data)
113
+  //     setData(data)
114
+  // })
115
+  // }
116
+
117
+  function getListRecommend(params) {
118
+    request({ ...apis.channelList.getListRecommend, urlData: { id: props.location.query.id }, params: { ...params } }).then((data) => {
112 119
       setData(data)
120
+  }).catch((err) => {
121
+      console.log(err)
122
+      message.info(err.msg || err.message)
113 123
   })
114 124
   }
115 125
 
@@ -117,7 +127,7 @@ const header = props => {
117 127
    // 分页
118 128
  function onChange(pageNum) {
119 129
       // eslint-disable-next-line react-hooks/rules-of-hooks
120
-        getList({ pageNumber: pageNum, pageSize: 9 })
130
+      getListRecommend({ pageNumber: pageNum, pageSize: 9 })
121 131
     }
122 132
 return (
123 133
   <>

+ 25
- 14
src/pages/customer/customerlist/index.jsx 파일 보기

@@ -10,6 +10,7 @@ import Attribution from './components/attribution'
10 10
 import IntegralRecord from './components/integralRecord'
11 11
 import ChangeStatus from './components/changeStatus'
12 12
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
13
+import AuthButton from '@/components/AuthButton';
13 14
 
14 15
 
15 16
 const { Option } = Select;
@@ -191,13 +192,19 @@ function body(props) {
191 192
       // eslint-disable-next-line no-nested-ternary
192 193
       render: (_, record) => (
193 194
         <>
194
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
195
-          &nbsp;&nbsp;
196
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
197
-          <br />
198
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
199
-          &nbsp;&nbsp;
200
-          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
195
+          <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
196
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
197
+            &nbsp;&nbsp;
198
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
199
+          </AuthButton>
200
+            <br />
201
+          <AuthButton name="admin.customer.recommend.get" noRight={null}>
202
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
203
+          </AuthButton>
204
+            &nbsp;&nbsp;
205
+          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
206
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
207
+          </AuthButton>
201 208
         </>
202 209
       ),
203 210
     },
@@ -247,17 +254,21 @@ function body(props) {
247 254
           )}
248 255
         </Form.Item>
249 256
         <Form.Item>
250
-          <Button type="primary" htmlType="submit" >
251
-            查询
252
-          </Button>
257
+          <AuthButton name="admin.customer.recommend.get" noRight={null}>
258
+            <Button type="primary" htmlType="submit" >
259
+              查询
260
+            </Button>
261
+          </AuthButton>
253 262
         </Form.Item>
254 263
       </Form>
255 264
 
256 265
       <div style={{ marginTop: '20px', marginBottom: '20px' }}>
257
-        <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
258
-          <Radio.Button value="private">私客</Radio.Button>
259
-          <Radio.Button value="public">公客</Radio.Button>
260
-        </Radio.Group>
266
+        <AuthButton name="admin.customer.recommend.get" noRight={null}>
267
+          <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
268
+            <Radio.Button value="private">私客</Radio.Button>
269
+            <Radio.Button value="public">公客</Radio.Button>
270
+          </Radio.Group>
271
+        </AuthButton>
261 272
       </div>
262 273
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
263 274
 

+ 12
- 5
src/pages/customer/independentList/index.jsx 파일 보기

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import { router } from 'umi';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -375,9 +376,13 @@ function body(props) {
375 376
           {
376 377
             <>
377 378
               {/* <sapn style={{ color: 'rgba(239,39,58,1)' }}>查看详细</sapn> */}
378
-              <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => Invite(record)}>邀请经纪人</a>
379
+              <AuthButton name="admin.channel.InviteClientsList.get" noRight={null}>
380
+                <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => Invite(record)}>邀请经纪人</a>
381
+              </AuthButton>
379 382
               &nbsp;&nbsp;&nbsp;&nbsp;
380
-              <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => gM(record)}>推荐客户</a>
383
+              <AuthButton name="admin.customer.recommend.id.get" noRight={null}>
384
+                <a style={{ color: 'rgba(239,39,58,1)' }} onClick={() => gM(record)}>推荐客户</a>
385
+              </AuthButton>
381 386
             </>
382 387
           }
383 388
         </>
@@ -405,9 +410,11 @@ function body(props) {
405 410
           )}
406 411
         </Form.Item>
407 412
         <Form.Item>
408
-          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
409
-            搜索
410
-          </Button>
413
+          <AuthButton name="admin.customer.agents.get" noRight={null}>
414
+            <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
415
+              搜索
416
+            </Button>
417
+          </AuthButton>
411 418
         </Form.Item>
412 419
       </Form>
413 420
 

+ 9
- 4
src/pages/customer/recommendCustomer/index.jsx 파일 보기

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import { router } from 'umi';
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -130,7 +131,9 @@ function body(props) {
130 131
       render: (_, record) => (
131 132
         <>
132 133
           {
133
-            record.verifyStatus === 0 ? <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => toAudit(record.customerId)}>审核</sapn> : ''
134
+            <AuthButton name="admin.customer.recommend.verify.id.put" noRight={null}>
135
+              {record.verifyStatus === 0 ? <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => toAudit(record.customerId)}>审核</sapn> : ''}
136
+            </AuthButton>
134 137
           }
135 138
         </>
136 139
       ),
@@ -176,9 +179,11 @@ function body(props) {
176 179
           )}
177 180
         </Form.Item>
178 181
         <Form.Item>
179
-          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
180
-            搜索
181
-          </Button>
182
+          <AuthButton name="admin.customer.recommend.recommender.get" noRight={null}>
183
+            <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
184
+              搜索
185
+            </Button>
186
+          </AuthButton>
182 187
         </Form.Item>
183 188
       </Form>
184 189
 

+ 6
- 3
src/pages/customer/report/index.jsx 파일 보기

@@ -5,6 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
8
+import AuthButton from '@/components/AuthButton';
8 9
 
9 10
 
10 11
 const { Option } = Select;
@@ -153,9 +154,11 @@ function body(props) {
153 154
           )}
154 155
         </Form.Item>
155 156
         <Form.Item>
156
-          <Button type="primary" htmlType="submit">
157
-            搜索
158
-          </Button>
157
+          <AuthButton name="admin.customer.recommend.report.get" noRight={null}>
158
+            <Button type="primary" htmlType="submit">
159
+              搜索
160
+            </Button>
161
+          </AuthButton>
159 162
         </Form.Item>
160 163
       </Form>
161 164
       <Table style={{marginTop:'40px'}} dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 21
- 5
src/pages/integralMall/GoodsList.jsx 파일 보기

@@ -6,6 +6,7 @@ import router from 'umi/router';
6 6
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7 7
 import apis from '../../services/apis';
8 8
 import request from '../../utils/request'
9
+import AuthButton from '@/components/AuthButton';
9 10
 
10 11
 const { Option } = Select;
11 12
 
@@ -123,8 +124,21 @@ function header(props) {
123 124
       dataIndex: 'handle',
124 125
       key: 'handle',
125 126
       align: 'center',
126
-      render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeGoodsStatus(row)}>{row.status == 1 ? '下架' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
127
-                            </span><span style={{ color: '#FF925C' }} onClick={toEditGoods(row.goodsId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
127
+      render: (x, row) => (
128
+        <>
129
+          <AuthButton name="admin.taGoods.change.put" noRight={null}>
130
+            <span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeGoodsStatus(row)}>
131
+              {row.status == 1 ? '下架' : '上架'}
132
+              {<Icon type="shopping-cart" className={styles.shoppingCart} />}
133
+            </span>
134
+          </AuthButton>
135
+          <AuthButton name="admin.taGoods.put" noRight={null}>
136
+            <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.goodsId)}>
137
+              编辑<Icon type="form" className={styles.edit} />
138
+            </span>
139
+          </AuthButton>
140
+        </>
141
+      ),
128 142
     },
129 143
   ];
130 144
 
@@ -171,9 +185,11 @@ function header(props) {
171 185
           )}
172 186
         </Form.Item>
173 187
         <Form.Item>
174
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
175
-            搜索
176
-          </Button>
188
+          <AuthButton name="admin.taGoods.get" noRight={null}>
189
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
190
+              搜索
191
+            </Button>
192
+          </AuthButton>
177 193
         </Form.Item>
178 194
       </Form>
179 195
       <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>

+ 16
- 3
src/pages/integralMall/achieve.jsx 파일 보기

@@ -6,7 +6,8 @@ import router from 'umi/router';
6 6
 import moment from 'moment';
7 7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8 8
 import apis from '../../services/apis';
9
-import request from '../../utils/request'
9
+import request from '../../utils/request';
10
+import AuthButton from '@/components/AuthButton';
10 11
 
11 12
 const { TabPane } = Tabs;
12 13
 
@@ -89,8 +90,20 @@ const columns = [
89 90
       dataIndex: 'handle',
90 91
       key: 'handle',
91 92
       align: 'center',
92
-      render: (x,row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeStatus(row)}>{row.status == 1?'停用':'启用'}<Icon type="stop" className={styles.shoppingCart} /></span>
93
-                      <span style={{ color: '#FF925C' }}>{row.buildingId != null ? '编辑'`${<Icon type="form" className={styles.edit} />}` : ''}</span></>,
93
+      render: (x,row) => (
94
+        <>
95
+          <AuthButton name="admin.tdPointsRules.change.put" noRight={null}>
96
+            <span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeStatus(row)}>
97
+              {row.status == 1?'停用':'启用'}<Icon type="stop" className={styles.shoppingCart} />
98
+            </span>
99
+          </AuthButton>
100
+          <AuthButton name="admin.tdPointsRules.put" noRight={null}>
101
+            <span style={{ color: '#FF925C' }}>
102
+              {row.buildingId != null ? '编辑'`${<Icon type="form" className={styles.edit} />}` : ''}
103
+            </span>
104
+          </AuthButton>
105
+        </>
106
+      ),
94 107
     },
95 108
   ];
96 109
 

+ 31
- 20
src/pages/staff/list/RoleList.jsx 파일 보기

@@ -7,6 +7,7 @@ import router from 'umi/router';
7 7
 import { Card, Avatar } from 'antd';
8 8
 import request from '../../../utils/request'
9 9
 import Styles from './style.less';
10
+import apis from '../../../services/apis';
10 11
 
11 12
 const header = props => {
12 13
 // function confirm(id) {
@@ -40,30 +41,40 @@ const [data, setData] = useState({ data: [] })
40 41
 // 初始化角色
41 42
  useEffect(() => {
42 43
    localStorage.removeItem('value');
43
-    getList({ pageNum: 1, pageSize: 100 })
44
+    getRoleList({ pageNum: 1, pageSize: 100 })
44 45
  }, [])
45 46
 
46
- function getList(params) {
47
-   request({
48
-     url: '/api/admin/taRole',
49
-     method: 'GET',
50
-     params: { ...params },
51
- // eslint-disable-next-line no-shadow
52
- }).then(data => {
53
-     console.log(data)
54
-     setData(data)
55
- })
56
- }
57
-// 是否停用
58
-function stop(id) {
59
-  request({
60
-    url: `/api/admin/taRole/stop/${id}`,
61
-    method: 'PUT',
62
-// eslint-disable-next-line no-shadow
63
-}).then(data => {
64
-  getList({ pageNum: 1, pageSize: 100 })
47
+//  function getRoleList(params) {
48
+//    request({
49
+//      url: '/api/admin/taRole',
50
+//      method: 'GET',
51
+//      params: { ...params },
52
+//  // eslint-disable-next-line no-shadow
53
+//  }).then(data => {
54
+//      console.log(data)
55
+//      setData(data)
56
+//  })
57
+//  }
58
+
59
+ function getRoleList(params) {
60
+  request({ ...apis.role.getRoleList, params: { ...params } }).then((data) => {
61
+    setData(data)
62
+}).catch((err) => {
63
+    console.log(err)
64
+    message.info(err.msg || err.message)
65
+})
66
+}
67
+
68
+
69
+function stop(ids) {
70
+  request({ ...apis.role.stop, urlData: { id: ids } }).then((data) => {
71
+    getRoleList({ pageNum: 1, pageSize: 100 })
72
+}).catch((err) => {
73
+    console.log(err)
74
+    message.info(err.msg || err.message)
65 75
 })
66 76
 }
77
+
67 78
 const dataSource = [
68 79
   {
69 80
     name: '置业顾问',

+ 106
- 102
src/pages/staff/list/addRole.jsx 파일 보기

@@ -6,6 +6,7 @@ import request from '../../../utils/request';
6 6
 import channels from './channelList.less';
7 7
 import { resolve, join } from 'path';
8 8
 import router from 'umi/router';
9
+import apis from '../../../services/apis';
9 10
 
10 11
 const { TextArea } = Input;
11 12
 
@@ -17,7 +18,6 @@ const { TextArea } = Input;
17 18
  * @returns
18 19
  */
19 20
 const Poster = props => {
20
-  console.log('props,props', props.user.currentUser)
21 21
   const userMenus = props.user.currentUser.menus;
22 22
   const userBtns = props.user.currentUser.buttons;
23 23
 
@@ -30,7 +30,7 @@ const Poster = props => {
30 30
   const [dataButtonId, setDataButtonId] = useState([])
31 31
 
32 32
   useEffect(() => {
33
-    // 新增和编辑用一个页面,判断新增是否为0和null
33
+    // 新增和编辑用一个页面
34 34
     if (props.location.query) {
35 35
       const { id } = props.location.query
36 36
       if (id) {
@@ -41,91 +41,113 @@ const Poster = props => {
41 41
     buttonList({ pageNum: 1, pageSize: 100 })
42 42
   }, [])
43 43
   // 当前所有的菜单
44
+  // function menuList(params) {
45
+  //   request({
46
+  //     url: '/api/admin/menuList',
47
+  //     method: 'GET',
48
+  //     params: { ...params },
49
+  //     // eslint-disable-next-line no-shadow
50
+  //   }).then(data => {
51
+  //     setData(data)
52
+  //   })
53
+  // }
44 54
   function menuList(params) {
45
-    request({
46
-      url: '/api/admin/menuList',
47
-      method: 'GET',
48
-      params: { ...params },
49
-      // eslint-disable-next-line no-shadow
50
-    }).then(data => {
55
+    request({ ...apis.role.menuList, params: { ...params } }).then((data) => {
51 56
       setData(data)
52
-    })
57
+  }).catch((err) => {
58
+      console.log(err)
59
+      message.info(err.msg || err.message)
60
+  })
53 61
   }
62
+
54 63
   // 所有按钮
64
+  // function buttonList(params) {
65
+  //   request({
66
+  //     url: '/api/admin/buttonList',
67
+  //     method: 'GET',
68
+  //     params: { ...params },
69
+  //     // eslint-disable-next-line no-shadow
70
+  //   }).then(data => {
71
+  //     console.log(data)
72
+  //     setBuutonDate(data)
73
+  //   })
74
+  // }
75
+
55 76
   function buttonList(params) {
56
-    request({
57
-      url: '/api/admin/buttonList',
58
-      method: 'GET',
59
-      params: { ...params },
60
-      // eslint-disable-next-line no-shadow
61
-    }).then(data => {
62
-      console.log(data)
77
+    request({ ...apis.role.buttonList, params: { ...params } }).then((data) => {
63 78
       setBuutonDate(data)
64
-    })
79
+  }).catch((err) => {
80
+      console.log(err)
81
+  })
65 82
   }
66 83
 
84
+
67 85
   // 根据角色id查询当前的菜单及其按钮
68
-  function buttonAndMenuList(params, id) {
69
-    console.log('id: ', id)
70
-    request({
71
-      url: `/api/admin/taRole/details/${id}`,
72
-      method: 'GET',
73
-      params: { ...params },
74
-      // eslint-disable-next-line no-shadow
75
-    }).then(data => {
76
-      console.log('data.roleName: ', data)
86
+  // function buttonAndMenuList(params, id) {
87
+  //   console.log('id: ', id)
88
+  //   request({
89
+  //     url: `/api/admin/taRole/details/${id}`,
90
+  //     method: 'GET',
91
+  //     params: { ...params },
92
+  //     // eslint-disable-next-line no-shadow
93
+  //   }).then(data => {
94
+  //     console.log('data.roleName: ', data)
95
+  //     props.form.setFieldsValue({ roleName: data.roleName })
96
+  //     console.log(data)
97
+  //     setData(data)
98
+
99
+  //     // 获取所有的权限Id
100
+  //     if (data.sysMenuList) {
101
+  //       setDataMenuId(data.sysMenuList.map(item => item.menuId))
102
+  //       setDataButtonId((data.sysMenuList.map(item => item.sysButtonInMenu && item.sysButtonInMenu.map(btn => btn.btnId).join(',')).filter(f => f !== '').join(',').split(',')).map(a => parseInt(a)))
103
+  //     }
104
+  //   })
105
+  // }
106
+
107
+  function buttonAndMenuList(params, ids) {
108
+    request({ ...apis.role.buttonAndMenuList, urlData: { id: ids }, params: { ...params } }).then(data => {
77 109
       props.form.setFieldsValue({ roleName: data.roleName })
78 110
       console.log(data)
79 111
       setData(data)
80 112
 
81 113
       // 获取所有的权限Id
82
-      setDataMenuId(data.sysMenuList.map(item => item.menuId))
83
-      setDataButtonId((data.sysMenuList.map(item => item.sysButtonInMenu.map(btn => btn.btnId).join(',')).filter(f => f !== '').join(',').split(',')).map(a => parseInt(a)))
84
-    })
85
-  }
86
-  // 添加角色
87
-  function addRole(params) {
88
-    request({
89
-      url: '/api/admin/taRole/',
90
-      method: 'GET',
91
-      params: { ...params },
92
-      // eslint-disable-next-line no-shadow
93
-    }).then(data => {
94
-      console.log(data)
95
-      setData(data)
96
-    })
114
+      if (data.sysMenuList) {
115
+        setDataMenuId(data.sysMenuList.map(item => item.menuId))
116
+        setDataButtonId((data.sysMenuList.map(item => item.sysButtonInMenu && item.sysButtonInMenu.map(btn => btn.btnId).join(',')).filter(f => f !== '').join(',').split(',')).map(a => parseInt(a)))
117
+      }
118
+  }).catch((err) => {
119
+      console.log(err)
120
+      message.info(err.msg || err.message)
121
+  })
97 122
   }
98 123
 
99
-
100 124
   // const [menus, setMenus] = useState([]);
101 125
   // 判断menus是否有值
102 126
   const [menus, setMenus] = useState([]);
103
-  const addMenus = m => {
104
-    const newMenus = [...menus, m]
105
-    setMenus([...menus, m])
106
-  };
127
+
128
+  const addMenus = m => setMenus([...menus, m])
107 129
   const delMenus = m => setMenus(menus.filter(x => x.menuId !== m.menuId));
130
+
108 131
   const handleMenuChange = m => e => {
109 132
     if (e.target.checked) {
110 133
       setDataMenuId(dataMenuId.concat(m.menuId))
111 134
       addMenus(m)
112 135
     } else {
113
-      setDataMenuId([m.menuId])
136
+      setDataMenuId(dataMenuId.filter(item => item !== m.menuId));
114 137
       delMenus(m)
115 138
     }
116
-    console.log('dataMenuId', dataMenuId)
117
-    console.log('menus', menus)
118 139
   }
119 140
 
120 141
   const [but, setBut] = useState([]);
121 142
   // 判断menus是否有值
122
-  const addBut = m => setBut([...but, m]);
143
+  const addBut = m => setBut([...but, m])
123 144
   const delBut = m => setBut(but.filter(x => x.menuId !== m.menuId));
124 145
   const handleButChange = m => e => {
125
-    console.log('e', m)
126 146
     if (e.target.checked) {
147
+      setDataButtonId(dataButtonId.concat(m.btnId))
127 148
       addBut(m)
128 149
     } else {
150
+      setDataButtonId(dataButtonId.filter(item => item !== m.btnId));
129 151
       delBut(m)
130 152
     }
131 153
   }
@@ -138,64 +160,46 @@ const Poster = props => {
138 160
     textAlign: 'left',
139 161
     height: '72px',
140 162
   };
141
-  // 添加菜单
142
-  function addMenuList() {
143
-    request({
144
-      url: '/api/admin/updateAuthMenu',
145
-      method: 'PUT',
146
-      data: { sysMenu: menus },
147
-      // eslint-disable-next-line no-shadow
148
-    }).then(data => {
149
-      console.log(data)
150
-    })
151
-  }
152
-
153
-  // 添加按钮
154
-  function addButt() {
155
-    request({
156
-      url: '/api/admin/updateAuthMenu',
157
-      method: 'PUT',
158
-      data: { sysMenu: but },
159
-      // eslint-disable-next-line no-shadow
160
-    }).then(data => {
161
-      console.log(data)
162
-    })
163
-  }
164 163
 
165
-  // 添加按钮
166
-  function editAndAddRole() {
167
-    request({
168
-      url: '/admin/editAndAddRole/{id}',
169
-      method: 'PUT',
170
-      data: { sysMenu: but },
171
-      // eslint-disable-next-line no-shadow
172
-    }).then(data => {
173
-      console.log(data)
174
-    })
175
-  }
176
-
177
-  function toRoleList(roleId) {
164
+  function toRoleList() {
178 165
     router.push({
179 166
       pathname: '/staff/RoleList',
180 167
     });
181 168
   }
169
+  // function updateAuthMenu(params) {
170
+  //   request({
171
+  //     url: '/api/admin/updateAuthMenu',
172
+  //     method: 'POST',
173
+  //     data: { ...params },
174
+  //     // eslint-disable-next-line no-shadow
175
+  //   }).then(data => {
176
+  //     toRoleList()
177
+  //   })
178
+  // }
179
+
180
+  function updateAuthMenu(data) {
181
+    request({ ...apis.role.updateAuthMenu, data: { ...data } }).then((data) => {
182
+      toRoleList()
183
+  }).catch((err) => {
184
+      console.log(err)
185
+  })
186
+  }
187
+
182 188
 
183 189
   function handleSubmit(e) {
184 190
     e.preventDefault();
185 191
     props.form.validateFields((err, values) => {
186
-      console.log('values', values)
187
-      // 保存菜单
188
-      // addMenuList()
189
-      // setm
190
-      const sumitMenu = [...data.sysMenuList, ...menus]
191
-      request({
192
-        url: '/api/admin/updateAuthMenu',
193
-        method: 'POST',
194
-        data: { sysMenu: sumitMenu, name: values.roleName, id: props.location.query.id },
195
-        // eslint-disable-next-line no-shadow
196
-      }).then(data => {
197
-        toRoleList()
198
-      })
192
+      if (props.location.query.id !== undefined) {
193
+        console.log('menus', menus)
194
+      
195
+        const sumitMenu = userMenus.filter(item => dataMenuId.includes(item.menuId))
196
+        const sumitBtn = userMenus.filter(item => dataButtonId.includes(item.btnId))
197
+        // console.log('sumitMenu', sumitMenu)
198
+        // const sumitBut = data.sysMenuList[0].sysButtonInMenu.concat(but)
199
+        updateAuthMenu({ sysMenu: sumitMenu, name: values.roleName, id: props.location.query.id, sysButton: sumitBtn })
200
+      } else {
201
+        updateAuthMenu({ sysMenu: menus, name: values.roleName, id: props.location.query.id, sysButton: but })
202
+        }
199 203
     });
200 204
   }
201 205
   const { getFieldDecorator } = props.form;
@@ -205,7 +209,7 @@ const Poster = props => {
205 209
         <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
206 210
           <Form.Item label="角色名称">
207 211
             {getFieldDecorator('roleName', {
208
-              rules: [{ required: true, message: '请输入渠道名称' }],
212
+              rules: [{ required: true, message: '请输入角色名称' }],
209 213
             })(<Input className={channels.inpuit} />)}
210 214
 
211 215
           </Form.Item>
@@ -249,7 +253,7 @@ const Poster = props => {
249 253
             <Button type="primary" htmlType="submit">
250 254
               保存
251 255
           </Button>
252
-            <Button className={channels.formButton} htmlType="submit">
256
+            <Button className={channels.formButton} htmlType="submit" onChange = {toRoleList}>
253 257
               取消
254 258
           </Button>
255 259
           </Form.Item>

+ 153
- 6
src/services/apis.js 파일 보기

@@ -15,11 +15,13 @@ export default {
15 15
     current: {
16 16
       method: 'GET',
17 17
       url: `${prefix}/taUser/current`,
18
+      action: 'admin.taUser.current.get',
18 19
     },
19 20
     signin: {
20 21
       method: 'POST',
21 22
       url: `${prefix}/taUser/signin`,
22
-      login: true
23
+      login: true,
24
+      action: 'admin.taUser.signin.post',
23 25
     },
24 26
     signout: {
25 27
       method: 'POST',
@@ -31,129 +33,158 @@ export default {
31 33
     getList: {
32 34
       method: 'GET',
33 35
       url: `${prefix}/buildinglist`,
36
+      action: 'admin.buildinglist.get',
34 37
     },
35 38
     updateStatus: {
36 39
       method: 'PUT',
37 40
       url: `${prefix}/building/update/status`,
41
+      action: 'admin.building.update.status.put',
38 42
     },
39 43
     addBuilding: {
40 44
       method: 'POST',
41 45
       url: `${prefix}/building/add`,
46
+      action: 'admin.building.add.post',
42 47
     },
43 48
     updateBuilding: {
44 49
       method: 'PUT',
45 50
       url: `${prefix}/building/update`,
51
+      action: 'admin.building.update.put',
46 52
     },
47 53
     buildingGetById: {
48 54
       method: 'GET',
49 55
       url: `${prefix}/buildingSelectId/id`,
56
+      action: 'admin.buildingSelectId.id.get',
50 57
     },
51 58
     deleteBuilding: {
52 59
       method: 'DELETE',
53 60
       url: `${prefix}/building/delete/id`,
61
+      action: 'admin.building.delete.id.delete',
54 62
     },
55 63
     buildingApartment: {
56 64
       method: 'GET',
57 65
       url: `${prefix}/buildingApartment/buildingId/id`,
66
+      action: 'admin.buildingApartment.buildingId.id.get',
58 67
     },
59 68
     buildingApartmentGetById: {
60 69
       method: 'GET',
61 70
       url: `${prefix}/buildingApartment/id`,
71
+      action: 'admin.buildingApartment.id.get',
62 72
     },
63 73
     buildingApartmentUpdate: {
64 74
       method: 'PUT',
65 75
       url: `${prefix}/buildingApartment/update`,
76
+      action: 'admin.buildingApartment.update.put',
66 77
     },
67 78
     buildingApartmentAdd: {
68 79
       method: 'POST',
69 80
       url: `${prefix}/buildingApartment/add`,
81
+      action: 'admin.buildingApartment.add.post',
70 82
     },
71 83
     buildingApartmentDelete: {
72 84
       method: 'DELETE',
73 85
       url: `${prefix}/apartment/deleted/id`,
86
+      action: 'admin.apartment.deleted.id.delete',
74 87
     },
75 88
   },
76 89
   buildingType: {
77 90
     getList: {
78 91
       method: 'GET',
79 92
       url: `${prefix}/tdBuildingType`,
93
+      action: 'admin.tdBuildingType.get',
80 94
     },
81 95
     delete: {
82 96
       method: 'DELETE',
83 97
       url: `${prefix}/tdBuildingType/id`,
98
+      action: 'admin.tdBuildingType.id.delete',
84 99
     },
85 100
     update: {
86 101
       method: 'PUT',
87 102
       url: `${prefix}/tdBuildingType/id`,
103
+      action: 'admin.tdBuildingType.id.put',
88 104
     },
89 105
     add: {
90 106
       method: 'POST',
91 107
       url: `${prefix}/tdBuildingType`,
108
+      action: 'admin.tdBuildingType.post',
92 109
     },
93 110
     getById: {
94 111
       method: 'GET',
95 112
       url: `${prefix}/tdBuildingType/id`,
113
+      action: 'admin.tdBuildingType.id.get',
96 114
     },
97 115
   },
98 116
   news: {
99 117
     getList: {
100 118
       method: 'GET',
101 119
       url: `${prefix}/taNews`,
102
-      action: '/api/admin/taNews'
120
+      action: 'admin.taNews.get',
103 121
     },
104 122
   },
105 123
   customer: {
106 124
     drift: {
107 125
       method: 'GET',
108 126
       url: `${prefix}/customer/recommend/drift`,
127
+      action: 'admin.customer.recommend.drift.get',
109 128
     },
110 129
     report: {
111 130
       method: 'GET',
112 131
       url: `${prefix}/customer/recommend/report`,
132
+      action: 'admin.customer.recommend.report.get',
113 133
     },
114 134
     recommender: {
115 135
       method: 'GET',
116 136
       url: `${prefix}/customer/recommend/recommender`,
137
+      action: 'admin.customer.recommend.recommender.get',
117 138
     },
118 139
     auto: {
119 140
       method: 'PUT',
120 141
       url: `${prefix}/customer/recommend/verify/id`,
142
+      action: 'admin.customer.recommend.verify.id.put',
121 143
     },
122 144
     recommendGetById: {
123 145
       method: 'GET',
124 146
       url: `${prefix}/customer/recommend/getById/id`,
147
+      action: 'admin.customer.recommend.getById.id.get',
125 148
     },
126 149
     agents: {
127 150
       method: 'GET',
128 151
       url: `${prefix}/customer/agents`,
152
+      action: 'admin.customer.agents.get',
129 153
     },
130 154
     customerRecommend: {
131 155
       method: 'GET',
132 156
       url: `${prefix}/customer/recommend`,
157
+      action: 'admin.customer.recommend.get',
133 158
     },
134 159
     consultant: {
135 160
       method: 'GET',
136 161
       url: `${prefix}/consultant`,
162
+      action: 'admin.consultant.get',
137 163
     },
138 164
     recommendEdit: {
139 165
       method: 'PUT',
140 166
       url: `${prefix}/customer/recommend/edit/id`,
167
+      action: 'admin.customer.recommend.edit.id.put',
141 168
     },
142 169
     taPointsRecords: {
143 170
       method: 'GET',
144 171
       url: `${prefix}/mine/taPointsRecords/id`,
172
+      action: 'admin.mine.taPointsRecords.id.get',
145 173
     },
146 174
     recommend: {
147 175
       method: 'GET',
148 176
       url: `${prefix}/customer/recommend/id`,
177
+      action: 'admin.customer.recommend.id.get',
149 178
     },
150 179
     InviteClientsList: {
151 180
       method: 'GET',
152 181
       url: `${prefix}/channel/InviteClientsList`,
182
+      action: 'admin.channel.InviteClientsList.get',
153 183
     },
154 184
     CustomerRecommendGet: {
155 185
       method: 'GET',
156 186
       url: `${prefix}/customer/recommend/get/id`,
187
+      action: 'admin.customer.recommend.get.id.get',
157 188
     },
158 189
   },
159 190
   indexEcharts: {
@@ -163,7 +194,8 @@ export default {
163 194
     },
164 195
     userCity: {
165 196
       method:'get',
166
-      url: `${prefix}/selectCityUser`
197
+      url: `${prefix}/selectCityUser`,
198
+      action: 'admin.selectCityUser.get'
167 199
     },
168 200
 
169 201
   },
@@ -171,196 +203,311 @@ export default {
171 203
       list: {
172 204
         method: 'GET',
173 205
         url: `${prefix}/iBuildingDynamicList`,
206
+        action: 'admin.iBuildingDynamicList.get',
174 207
       },
175 208
       weight: {
176 209
         method: 'PUT',
177 210
         url: `${prefix}/buildingDynamic/weight`,
211
+        action: 'admin.buildingDynamic.weight.put',
178 212
       },
179 213
       cancel: {
180 214
         method: 'PUT',
181 215
         url: `${prefix}/buildingDynamic/cancel/:id`,
216
+        action: 'admin.buildingDynamic.cancel.dynamicId.put'
182 217
       },
183 218
       send: {
184 219
         url: `${prefix}/buildingDynamic/send/:id`,
185 220
         method: 'PUT',
221
+        action: 'admin.buildingDynamic.send.dynamicId.put'
186 222
       },
187 223
       finish: {
188 224
         url: `${prefix}/buildingDynamic/finish`,
189 225
         method: 'PUT',
226
+        action: 'admin.buildingDynamic.finish.put'
190 227
       },
191 228
       details: {
192 229
         url: `${prefix}/buildingDynamic/Details`,
193 230
         method: 'GET',
231
+        action: 'admin.buildingDynamic.Details.get',
194 232
       },
195 233
       update: {
196 234
         url: `${prefix}/buildingDynamic/update`,
197 235
         method: 'PUT',
236
+        action: 'admin.buildingDynamic.update.put',
198 237
       },
199 238
       add: {
200 239
         url: `${prefix}/buildingDynamic/add`,
201 240
         method: 'POST',
241
+        action: 'admin.buildingDynamic.add.post',
202 242
       },
203 243
       poster: {
204 244
         url: `${prefix}/poster`,
205 245
         method: 'GET',
246
+        action: 'admin.poster.get',
206 247
       },
207 248
       updatePoster: {
208 249
         url: `${prefix}/poster/:id`,
209 250
         method: 'PUT',
251
+        action: 'admin.poster.id.put',
210 252
       },
211 253
       addPoster: {
212 254
         url: `${prefix}/poster`,
213 255
         method: 'POST',
256
+        action: 'admin.poster.post',
214 257
       },
215 258
       shareContent: {
216 259
         url: `${prefix}/shareContent`,
217 260
         method: 'GET',
261
+        action: 'admin.shareContent.get',
218 262
       },
219 263
       updateShareContent: {
220 264
         url: `${prefix}/shareContent/:id`,
221 265
         method: 'PUT',
266
+        action: 'admin.shareContent.id.put',
222 267
       },
223 268
       addShareContent: {
224 269
         url: `${prefix}/shareContent`,
225 270
         method: 'POST',
271
+        action: 'admin.shareContent.post',
226 272
       },
227 273
       signList: {
228 274
         url: `${prefix}/SignList`,
229 275
         method: 'GET',
276
+        action: 'admin.SignList.get',
230 277
       }
231 278
   },
232 279
   integralMall: {
233 280
     tdPointsRules: {
234 281
       url: `${prefix}/tdPointsRules`,
235 282
       method: 'GET',
283
+      action: 'admin.tdPointsRules.get',
236 284
     },
237 285
     change: {
238 286
       url: `${prefix}/tdPointsRules/change`,
239 287
       method: 'PUT',
288
+      action: 'admin.tdPointsRules.change.put',
240 289
     },
241 290
     taGoods: {
242 291
       url: `${prefix}/taGoods/:id`,
243 292
       method: 'GET',
293
+      action: 'admin.taGoods.id.get',
244 294
     },
245 295
     updateTaGoods: {
246 296
       url: `${prefix}/taGoods`,
247 297
       method: 'PUT',
298
+      action: 'admin.taGoods.put',
248 299
     },
249 300
     addTaGoods: {
250 301
       url: `${prefix}/taGoods/add`,
251 302
       method: 'POST',
303
+      action: 'admin.taGoods.add.post',
252 304
     },
253 305
     taPointsExchange: {
254 306
       url: `${prefix}/taPointsExchange`,
255
-        method: 'GET',
307
+      method: 'GET',
308
+      action: 'admin.taPointsExchange.get',
256 309
     },
257 310
     getTaGoods: {
258 311
       url: `${prefix}/taGoods`,
259 312
       method: 'GET',
313
+      action: 'admin.taGoods.get',
260 314
     },
261 315
     changeTaGoods: {
262 316
       url: `${prefix}/taGoods/change`,
263 317
       method: 'PUT',
318
+      action: 'admin.taGoods.change.put',
264 319
     },
265 320
     changeTaPointsExchange: {
266 321
       url: `${prefix}/taPointsExchange/change`,
267 322
       method: 'PUT',
323
+      action: 'admin.taPointsExchange.change.put',
268 324
     }
269 325
   },
270 326
   carsuseFigure: {
271 327
     extendContent: {
272 328
       url: `${prefix}/extendContent`,
273 329
       method: 'GET',
330
+      action: 'admin.extendContent.get',
274 331
     },
275 332
     finish: {
276 333
       url: `${prefix}/buildingDynamic/finish`,
277 334
       method: 'PUT',
335
+      action: 'admin.buildingDynamic.finish.put',
278 336
     },
279 337
     updataExtendContent: {
280 338
       url: `${prefix}/extendContent/:id`,
281 339
       method: 'PUT',
340
+      action: 'admin.extendContent.id.put',
282 341
     },
283 342
     getExtendContent: {
284 343
       url: `${prefix}/extendContent/:id`,
285 344
       method: 'GET',
345
+      action: 'admin.extendContent.id.get',
286 346
     },
287 347
     addExtendContent: {
288 348
       url: `${prefix}/extendContent`,
289 349
       method: 'POST',
350
+      action: 'admin.extendContent.post',
290 351
     }
291 352
   },
292 353
   system: {
293 354
     taPolicy: {
294 355
       url: `${prefix}/taPolicy/:id`,
295 356
       method: 'GET',
357
+      action: 'admin.taPolicy.id.get',
296 358
     },
297 359
     updateTaPolicy: {
298 360
       url: `${prefix}/taPolicy/:id`,
299 361
       method: 'PUT',
362
+      action: 'admin.taPolicy.id.put',
300 363
     },
301 364
     addTaPolicy: {
302 365
       url: `${prefix}/taPolicy`,
303 366
       method: 'POST',
367
+      action: 'admin.taPolicy.post',
304 368
     },
305 369
     getTaPolicy: {
306 370
       url: `${prefix}/taPolicy`,
307 371
       method: 'GET',
372
+      action: 'admin.taPolicy.get',
308 373
     },
309 374
     deleteTaPolicy: {
310 375
       url: `${prefix}/taPolicy/:id`,
311 376
       method: 'DELETE',
377
+      action: 'admin.taPolicy.id.delete',
312 378
     },
313 379
     tdBizEventIntention: {
314 380
       url: `${prefix}/tdBizEventIntention`,
315 381
       method: 'GET',
382
+      action: 'admin.tdBizEventIntention.get',
316 383
     },
317 384
     taBuildingIntentionAddOrUpdate: {
318 385
       url: `${prefix}/taBuildingIntentionAddOrUpdate/:id`,
319 386
       method: 'POST',
387
+      action: 'admin.taBuildingIntentionAddOrUpdate.buildingId.post',
320 388
     },
321 389
     taCustomerMessage: {
322 390
       url: `${prefix}/taCustomerMessage`,
323 391
       method: 'GET',
392
+      action: 'admin.taCustomerMessage.get',
324 393
     },
325 394
     tdReports: {
326 395
       url: `${prefix}/tdReports`,
327 396
       method: 'GET',
397
+      action: 'admin.tdReports.get',
328 398
     },
329 399
     taBuildingReports: {
330 400
       url: `${prefix}/taBuildingReports`,
331 401
       method: 'GET',
402
+      action: 'admin.taBuildingReports.get',
332 403
     },
333 404
     addTaBuildingReports: {
334 405
       url: `${prefix}/taBuildingReport/add`,
335 406
       method: 'POST',
407
+      action: 'admin.taBuildingReport.add.post',
336 408
     }
337 409
   },
338 410
   staff: {
339 411
     taUser: {
340 412
       url: `${prefix}/taUser`,
341 413
       method: 'GET',
414
+      action: 'admin.taUser.get',
342 415
     },
343 416
     taTags: {
344 417
       url: `${prefix}/taTags`,
345 418
       method: 'GET',
419
+      action: 'admin.taTags.get',
346 420
     },
347 421
     getTaUser: {
348 422
       url: `${prefix}/taUser/:id`,
349 423
       method: 'GET',
424
+      action: 'admin.taUser.id.get',
350 425
     },
351 426
     updateTaUser: {
352 427
       url: `${prefix}/taUser/:id`,
353 428
       method: 'PUT',
429
+      action: 'admin.taUser.id.put',
354 430
     },
355 431
     addTaUser: {
356 432
       url: `${prefix}/taUser`,
357 433
       method: 'POST',
434
+      action: 'admin.taUser.post',
358 435
     },
359 436
     change: {
360 437
       url: `${prefix}/turn/taUser/:id/:type`,
361 438
       method: 'PUT',
362
-    }
363
-  }
439
+      action: 'admin.turn.taUser.put',  
440
+    },
441
+  },
442
+  channelList: {
443
+    getList: {
444
+      url: `${prefix}/channel`,
445
+      method: 'GET',
446
+      action: 'admin.channel.get',
447
+    },
448
+    addChannel: {
449
+      url: `${prefix}/channel`,
450
+      method: 'POST',
451
+      action: 'admin.channel.post',
452
+    },
453
+    getById: {
454
+      url: `${prefix}/channel/:id`,
455
+      method: 'GET',
456
+      action: 'admin.channel.id.get',
457
+    },
458
+    editChannel: {
459
+      url: `${prefix}/channel/:id`,
460
+      method: 'PUT',
461
+      action: 'admin.channel.id.put',
462
+    },
463
+    getListBroker: {
464
+      url: `${prefix}/channel/broker`,
465
+      method: 'GET',
466
+      action: 'admin.channel.broker.get',
467
+    },
468
+    getListRecommend: {
469
+      url: `${prefix}/customer/recommend/:id`,
470
+      method: 'GET',
471
+      action: 'admin.customer.recommend.id.get',
472
+    },
473
+    getListInvite: {
474
+      url: `${prefix}/channel/InviteClientsList`,
475
+      method: 'GET',
476
+      action: 'admin.InviteClientsList.get',
477
+    },
478
+ },
479
+ role: {
480
+  getRoleList: {
481
+    url: `${prefix}/taRole`,
482
+    method: 'GET',
483
+    action: 'admin.taRole.get',
484
+  },
485
+  stop: {
486
+    url: `${prefix}/taRole/stop/:id`,
487
+    method: 'PUT',
488
+    action: 'admin.taRole.stop.id.PUT',
489
+  },
490
+  menuList: {
491
+    url: `${prefix}/menuList`,
492
+    method: 'GET',
493
+    action: 'admin.menuList.get',
494
+  },
495
+  buttonList: {
496
+    url: `${prefix}/buttonList`,
497
+    method: 'GET',
498
+    action: 'admin.buttonList.get',
499
+  },
500
+  buttonAndMenuList: {
501
+    url: `${prefix}/taRole/details/:id`,
502
+    method: 'GET',
503
+    action: 'admin.taRole.details.id.get'
504
+  },
505
+  updateAuthMenu: {
506
+    url: `${prefix}/updateAuthMenu`,
507
+    method: 'POST',
508
+    action: 'admin.updateAuthMenu.post',
509
+  },
510
+ },
364 511
   // indexEcharts:{
365 512
   //   list:{
366 513
   //     method:'get',