Ver código fonte

Merge branch 'master' of http://git.ycjcjy.com/estateagents/pc-channel

顾绍勇 5 anos atrás
pai
commit
7e28dda4ae

+ 1
- 1
config/config.js Ver arquivo

@@ -133,7 +133,7 @@ export default {
133 133
 
134 134
   proxy: {
135 135
     '/api': {
136
-      target: 'http://192.168.2.51:8080/',
136
+      target: 'http://192.168.2.49:8080/',
137 137
       changeOrigin: true,
138 138
       // pathRewrite: { '^/server': '' },
139 139
     },

+ 7
- 1
config/routes.js Ver arquivo

@@ -73,6 +73,12 @@ export default [
73 73
                 name: 'H5样例',
74 74
                 component: './sample/h5/index',
75 75
               },
76
+              {
77
+                path: '/sample/h5/edit',
78
+                name: 'H5样例编辑',
79
+                hideInMenu: true,
80
+                component: './sample/h5/edit',
81
+              },
76 82
               {
77 83
                 path: '/sample/demand/list',
78 84
                 name: 'H5需求单',
@@ -98,7 +104,7 @@ export default [
98 104
               },
99 105
               {
100 106
                 path: '/resource/openScreen/edit',
101
-                name: '开屏通知修改',
107
+                name: '开屏通知编辑',
102 108
                 hideInMenu: true,
103 109
                 component: './resource/openScreen/edit',
104 110
               },

+ 251
- 84
src/pages/resource/openScreen/edit.jsx Ver arquivo

@@ -1,7 +1,9 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Input, Modal, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
2
+import { Input, DatePicker, Pagination, Search, Modal, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import XForm, { FieldTypes } from '../../../components/XForm';
4
+import XForm, { FieldTypes, createForm } from '../../../components/XForm';
5
+// import XForm, { FieldTypes } from '../../../components/XForm';
6
+import styles from './style.less';
5 7
 import router from 'umi/router';
6 8
 import apis from '../../../services/apis';
7 9
 import request from '../../../utils/request';
@@ -11,101 +13,229 @@ import moment from 'moment';
11 13
 
12 14
 const header = props => {
13 15
 
16
+    const noticeId = props.location.query.id
17
+
14 18
     const [data, setData] = useState({})
19
+    const [sample, setsample] = useState({})
15 20
 
16
-    const [datas, setDatas] = useState([])//表格数据
17 21
     const [visible, setVisible] = useState()
18 22
     const [formsdate, setFormsDate] = useState({})
19 23
     //   const [page, changePage] = useState({})
20 24
     useEffect(() => {
21 25
 
22 26
         setVisible(false)
23
-
27
+        setsample({
28
+            sampleNme : ''
29
+        })
30
+        if (noticeId) {
31
+            console.log(noticeId, 'noticeId')
32
+            getNewsData(noticeId)
33
+        }
24 34
     }, [])
35
+
36
+    const getNewsData = (noticeId) => {
37
+        request({
38
+            ...apis.openScreen.get,
39
+            urlData: { id: noticeId }
40
+        }).then((data) => {
41
+            console.log(data, 'data')
42
+            setData(data)
43
+            setsample({
44
+                sampleId: data.targetId,
45
+                sampleName: data.targetName
46
+            })
47
+        }).catch((err) => {
48
+            message.error(err.msg || err.message)
49
+        })
50
+
51
+    }
52
+
25 53
     const ModalData = props => {
26
-        
27
-    const data = []
54
+        // console.log('data', data.targetId)
55
+        // const targetId = data.targetType
28 56
 
29
-    const columns = [
30
-        {
31
-            title: '样例名',
32
-            dataIndex: 'title',
33
-            key: 'title',
34
-            align: 'center',
35 57
 
36
-        },
37
-        {
38
-            title: '权重',
39
-            dataIndex: 'imgUrl',
40
-            key: 'imgUrl',
41
-            align: 'center',
42
-            
43
-        },
44
-        {
45
-            title: '新增人',
46
-            dataIndex: 'pointPrice',
47
-            key: 'pointPrice',
48
-            align: 'center',
49
-        },
50
-        {
51
-            title: '新增时间',
52
-            dataIndex: 'totalNum',
53
-            key: 'totalNum',
54
-            align: 'center',
55
-        },
56
-        {
57
-            title: '修改人',
58
-            dataIndex: 'status',
59
-            key: 'status',
60
-            align: 'center',
61
-            // render: (status) => <><span>{status == 1 ? '是' : '否'}</span></>
62
-        },
63
-        {
64
-            title: '修改时间',
65
-            dataIndex: 'inventory',
66
-            key: 'inventory',
67
-            align: 'center',
68
-        },
69
-    
70
-        {
71
-            title: '操作',
72
-            dataIndex: 'handle',
73
-            key: 'handle',
74
-            align: 'center',
75
-            render: (x, row) => (
76
-                <>
58
+        const [h5data, setH5data] = useState({})
59
+        const [name, setName] = useState()
77 60
 
61
+        useEffect(() => {
78 62
 
79
-                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.goodsId)}>
80
-                        选择<Icon type="form" className={styles.edit} />
81
-                    </span>
82 63
 
83
-                </>
84
-            ),
85
-        },
86
-    ];
64
+            // console.log(targetType, 'targetType')
65
+            getH5data({ pageNum: 1, pageSize: 10 })
66
+
67
+        }, [])
68
+        // const getList = params => {
69
+        //     request({ ...apis.openScreen.list, params: { ...params } }).then(data => {
70
+        //         setData(data)
71
+        //     })
72
+        // }
73
+        const getH5data = params => {
74
+            request({
75
+                ...apis.openScreen.getSample, params: { ...params }
76
+            }).then((data) => {
77
+                setH5data(data)
78
+            }).catch((err) => {
79
+                message.error(err.msg || err.message)
80
+            })
81
+
82
+        }
83
+
84
+
85
+        const toChoice = (value) => {
86
+
87
+            Modal.confirm({
88
+                title: '是否关联此业务',
89
+                okText: '确定',
90
+                cancelText: '取消',
91
+                onOk() {
92
+                    setsample({
93
+                        sampleId: value.sampleId,
94
+                        sampleName: value.sampleName
95
+                    })
96
+                    message.info("操作成功")
97
+                    setVisible(false)
98
+                },
99
+            });
100
+
101
+            console.log(value, 'value')
102
+
103
+
104
+        }
105
+
106
+        const changePageNum = pageNumber => {
107
+
108
+            getH5data({ pageNum: pageNumber, pageSize: 10, })
109
+        }
110
+
111
+
112
+
113
+        const columns = [
114
+            {
115
+                title: '样例名',
116
+                dataIndex: 'sampleName',
117
+                key: 'sampleName',
118
+                align: 'center',
119
+
120
+            },
121
+            {
122
+                title: '权重',
123
+                dataIndex: 'orderNo',
124
+                key: 'orderNo',
125
+                align: 'center',
126
+
127
+            },
128
+            {
129
+                title: '新增人',
130
+                dataIndex: 'pointPrice',
131
+                key: 'pointPrice',
132
+                align: 'center',
133
+            },
134
+            {
135
+                title: '新增时间',
136
+                dataIndex: 'createDate',
137
+                key: 'createDate',
138
+                align: 'center',
139
+            },
140
+            {
141
+                title: '修改人',
142
+                dataIndex: 'status',
143
+                key: 'status',
144
+                align: 'center',
145
+                // render: (status) => <><span>{status == 1 ? '是' : '否'}</span></>
146
+            },
147
+            {
148
+                title: '修改时间',
149
+                dataIndex: 'inventory',
150
+                key: 'inventory',
151
+                align: 'center',
152
+            },
153
+
154
+            {
155
+                title: '操作',
156
+                dataIndex: 'handle',
157
+                key: 'handle',
158
+                align: 'center',
159
+                render: (x, row) => (
160
+                    <>
161
+
162
+
163
+                        <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e => toChoice(row)}>
164
+                            选择<Icon type="form" />
165
+                        </span>
166
+                        {/* className={styles.edit} */}
167
+                    </>
168
+                ),
169
+            },
170
+        ];
171
+
172
+        const getname = value => {
173
+            console.log(value.value, '44')
174
+            setName(value)
175
+            // setH5data({ pageNum: 1, pageSize: 10,sampleName:value })
176
+        }
177
+
178
+
179
+        const handleSubmitName = (e, props) => {
180
+            e.preventDefault();
181
+            getH5data({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
182
+        }
183
+
184
+        function handleReset() {
185
+            props.form.resetFields();
186
+            getH5data({ pageNum: 1, pageSize: 10 });
187
+        }
188
+
189
+        const { getFieldDecorator } = props.form
87 190
         return (
88 191
             <>
89 192
                 <div>
90
-                <Input placeholder="样例名" style={{ width: 200 }} />
91
-                <Button>搜索</Button><Button>重置</Button>
92
-                <Table  rowKey="goodsList" dataSource={data} columns={columns} pagination={false} />
193
+                    <Form layout="inline" onSubmit={e => handleSubmitName(e, props)}>
194
+                        <Form.Item>
195
+                            {getFieldDecorator('sampleName')(
196
+                                <Input
197
+                                    prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
198
+                                    placeholder="样例名"
199
+                                />,
200
+                            )}
201
+                        </Form.Item>
202
+                        <Form.Item>
203
+                            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
204
+                                搜索
205
+                            </Button>
206
+                            {/*  */}
207
+                            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
208
+                                重置
209
+                              </Button>
210
+                        </Form.Item>
211
+                    </Form>
212
+                    <Table rowKey="H5List" dataSource={h5data.records || []} columns={columns} pagination={false} />
213
+                    <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
214
+                        <Pagination showQuickJumper defaultCurrent={1} total={h5data.total} onChange={e => changePageNum(e)} current={h5data.current} />
215
+                    </div>
93 216
                 </div>
94 217
             </>
95 218
         )
96 219
     }
97
-
220
+    const ModalDatas = Form.create({ name: 'ModalData' })(ModalData);
98 221
     const onSelectBusiness = (e) => {
99 222
         console.log('11111')
100 223
 
101 224
     }
102 225
 
226
+    const handleChange = (value) => { }
227
+
228
+    function disabledDate(current) {
229
+        // Can not select days before today and today
230
+        return current && current < moment().endOf('day');
231
+    }
232
+
103 233
     const fields = [
104 234
         {
105 235
             label: '通知标题',
106
-            name: 'channelProxyName',
236
+            name: 'title',
107 237
             type: FieldTypes.Text,
108
-            value: data.channelProxyName,
238
+            value: data.title,
109 239
             rules: [
110 240
                 { required: true, message: '请输入通知标题' },
111 241
                 { max: 20, message: '通知标题名称不超过20个字符' }
@@ -113,9 +243,9 @@ const header = props => {
113 243
         },
114 244
         {
115 245
             label: '通知图',
116
-            name: 'channelImg',
246
+            name: 'noticeImg',
117 247
             type: FieldTypes.ImageUploader,
118
-            value: data.channelImg,
248
+            value: data.noticeImg,
119 249
             rules: [
120 250
                 { required: true, message: '请选择通知图' },
121 251
             ],
@@ -123,23 +253,40 @@ const header = props => {
123 253
         },
124 254
         {
125 255
             label: '关联业务类型',
126
-            name: 'channelContactName',
127
-
128
-            value: data.channelContactName,
256
+            name: 'targetType',
129 257
             type: FieldTypes.Select,
130
-
258
+            dict: [{
259
+                name: "H5",
260
+                value: "H5"
261
+            },
262
+            ],
263
+            value: data.targetType,
131 264
         },
132 265
         {
133 266
             label: '关联业务',
134
-            name: 'channelTel',
135
-            value: data.channelTel,
267
+            name: 'targetName',
268
+            // value: data.targetId,
136 269
             //   type: FieldTypes.Text,
137
-            render: (text, record) => <div style={{ display:'flex' }}><div onClick={handleShowModel}>选择关联业务</div><div>234</div></div>,
270
+        render: <div onClick={e => handleShowModel(data.targetId)}>{sample.sampleName || '选择关联业务'}{console.log(sample,'13')}</div>,
138 271
         },
139 272
         {
140 273
             label: '发布状态',
141
-            name: 'userName',
142
-            type: FieldTypes.Text,
274
+            type: FieldTypes.Select,
275
+            name: 'status',
276
+            dict: [{
277
+                name: "删除",
278
+                value: "-1"
279
+            },
280
+            {
281
+                name: "已下架",
282
+                value: "0"
283
+            },
284
+            {
285
+                name: "已上架",
286
+                value: "1"
287
+            },],
288
+            value: data.status === undefined ? null : data.status + "",
289
+
143 290
             rules: [
144 291
                 { required: true, message: '请选择有效发布状态' },
145 292
             ],
@@ -147,18 +294,19 @@ const header = props => {
147 294
         },
148 295
         {
149 296
             label: '自动下架时间',
150
-            name: 'expireDate',
151
-            type: FieldTypes.DatePicker,
152
-            value: data.expireDate != null ? moment(data.expireDate, 'YYYY-MM-DD') : null,
297
+            name: 'invalidTime',
298
+            render: (text, record) => <DatePicker disabledDate={disabledDate}></DatePicker>,
299
+            // type: FieldTypes.DatePicker,
300
+            value: data.invalidTime != null ? moment(data.invalidTime, 'YYYY-MM-DD') : null,
153 301
 
154 302
             help: '下架时间仅支持未来时间,到达未来时间后系统自动将开屏通知发布状态修改为否'
155 303
 
156 304
         },
157 305
         {
158 306
             label: '权重',
159
-            name: 'appMaxNum',
307
+            name: 'orderNo',
160 308
             type: FieldTypes.Number,
161
-            value: data.appMaxNum,
309
+            value: data.orderNo,
162 310
 
163 311
             help: '用于列表排序,越大越靠前'
164 312
         },
@@ -166,6 +314,25 @@ const header = props => {
166 314
 
167 315
     const handleSubmit = (values) => {
168 316
 
317
+        values.targetId = sample.sampleId
318
+        values.sampleName = sample.sampleName
319
+        if (noticeId) {
320
+            values.noticeId = noticeId
321
+            request({ ...apis.openScreen.put, urlData: { id: noticeId }, data: { ...values } }).then((data) => {
322
+                cancelPage();
323
+            }).catch((err) => {
324
+                message.error(err.msg || err.message)
325
+            })
326
+        } else {
327
+            request({ ...apis.openScreen.post, data: { ...values } }).then((data) => {
328
+                console.log('success')
329
+                cancelPage();
330
+            }).catch((err) => {
331
+                message.error(err.msg || err.message)
332
+            })
333
+        }
334
+
335
+
169 336
     }
170 337
     //model
171 338
     const handleShowModel = val => {
@@ -178,7 +345,7 @@ const header = props => {
178 345
 
179 346
     const cancelPage = () => {
180 347
         router.push({
181
-            pathname: '/resource/pathname',
348
+            pathname: '/resource/openScreen',
182 349
         });
183 350
     }
184 351
 
@@ -194,7 +361,7 @@ const header = props => {
194 361
                     onCancel={handleCancel}
195 362
                     footer={null}
196 363
                 >
197
-                    <ModalData></ModalData>
364
+                    <ModalDatas></ModalDatas>
198 365
                     {/* <Table rowSelection={rowSelection} rowKey="goodsList" dataSource={data} columns={columns} pagination={false} /> */}
199 366
                 </Modal>
200 367
             </div>

+ 71
- 56
src/pages/resource/openScreen/index.jsx Ver arquivo

@@ -9,43 +9,44 @@ import request from '../../../utils/request';
9 9
 import AuthButton from '@/components/AuthButton';
10 10
 
11 11
 function header(props) {
12
-
13
-    const [houseIdList, setHouseIdList] = useState([])
12
+    
13
+    const [taNoticeList, setTaNoticeList] = useState([])
14
+    const [ data, setData ] = useState({})
14 15
 
15 16
     useEffect(() => {
16 17
         getList({ pageNum: 1, pageSize: 10 });
17 18
     }, [])
18 19
     // 查询列表
20
+    // /api/admin/listNoticeByCondition
19 21
     const getList = params => {
20
-        // request({ ...apis.house.taSalesBatch, params: { ...params } }).then(data => {
21
-        //     console.log(data)
22
-        //     setData(data)
23
-        // })
22
+        request({ ...apis.openScreen.list, params: { ...params } }).then(data => {
23
+            setData(data)
24
+        })
24 25
     }
25 26
 
26 27
     const toEditResource = (id) => () => {
27 28
         router.push({
28
-          pathname: '/resource/openScreen/edit',
29
-        //   query: {
30
-        //     id
31
-        //   },
29
+            pathname: '/resource/openScreen/edit',
30
+              query: {
31
+                id
32
+              },
32 33
         });
33
-      }
34
+    }
34 35
 
35 36
     const handleSubmit = (e, props) => {
36 37
         e.preventDefault();
37
-
38
+        getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
38 39
     }
39 40
 
40 41
     function handleReset() {
41 42
         props.form.resetFields();
42
-        // getList({ pageNum: 1, pageSize: 10 });
43
+        getList({ pageNum: 1, pageSize: 10 });
43 44
     }
44 45
 
45 46
     const toDelBatch = rowData => () => {
46
-        console.log(houseIdList, 'houseIdListhouseIdList')
47
-        if (houseIdList.length < 1) {
48
-            openNotificationWithIcon('error', '请先选择需要删除的批次')
47
+        console.log(taNoticeList, 'taNoticeList')
48
+        if (taNoticeList.length < 1) {
49
+            // openNotificationWithIcon('error', '请先选择需要删除的批次')
49 50
             return
50 51
         }
51 52
 
@@ -54,27 +55,22 @@ function header(props) {
54 55
             okText: '确定',
55 56
             cancelText: '取消',
56 57
             onOk() {
57
-                // request({ ...apis.house.deleteTaSalesBatch, data: houseIdList, }).then((data) => {
58
-                //   message.info("操作成功")
59
-                //   getList({ pageNum: 1, pageSize: 10 });
60
-                // }).catch((err) => {
61
-                // })
58
+                request({ ...apis.openScreen.delete, data: taNoticeList, }).then((data) => {
59
+                  message.info("操作成功")
60
+                  getList({ pageNum: 1, pageSize: 10 });
61
+               
62
+                //   setHouseIdList([])
63
+                }).catch((err) => {
64
+                })
62 65
             },
63 66
         });
64 67
     }
65 68
 
66
-    const rowSelection = {
67
-        onChange: (selectedRowKeys, selectedRows) => {
68
-            console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
69
-            setHouseIdList(selectedRows)
70
-        },
71
-    };
72
-
73 69
     const changePageNum = pageNumber => {
74
-        // getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
70
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
75 71
     }
76 72
 
77
-    const data = []
73
+    // const data = []
78 74
 
79 75
     const columns = [
80 76
         {
@@ -86,21 +82,21 @@ function header(props) {
86 82
         },
87 83
         {
88 84
             title: '通知图',
89
-            dataIndex: 'imgUrl',
90
-            key: 'imgUrl',
85
+            dataIndex: 'noticeImg',
86
+            key: 'noticeImg',
91 87
             align: 'center',
92
-            render: (text, record) => <img src={record.imgUrl} className={styles.touxiang} />,
88
+            render: (text, record) => <img src={record.noticeImg} className={styles.touxiang} />,
93 89
         },
94 90
         {
95 91
             title: '关联业务类型',
96
-            dataIndex: 'pointPrice',
97
-            key: 'pointPrice',
92
+            dataIndex: 'targetType',
93
+            key: 'targetType',
98 94
             align: 'center',
99 95
         },
100 96
         {
101 97
             title: '关联业务',
102
-            dataIndex: 'totalNum',
103
-            key: 'totalNum',
98
+            dataIndex: 'targetName',
99
+            key: 'targetName',
104 100
             align: 'center',
105 101
         },
106 102
         {
@@ -108,25 +104,25 @@ function header(props) {
108 104
             dataIndex: 'status',
109 105
             key: 'status',
110 106
             align: 'center',
111
-            // render: (status) => <><span>{status == 1 ? '是' : '否'}</span></>
107
+            render: (status) => <><span>{status === 1 ? '已上架' : status === 0 ? '已下架':'删除'}</span></>
112 108
         },
113 109
         {
114 110
             title: '自动下架时间',
115
-            dataIndex: 'inventory',
116
-            key: 'inventory',
111
+            dataIndex: 'invalidTime',
112
+            key: 'invalidTime',
117 113
             align: 'center',
118 114
         },
119 115
         {
120 116
             title: '权重',
121
-            dataIndex: 'status',
122
-            key: 'status',
117
+            dataIndex: 'orderNo',
118
+            key: 'orderNo',
123 119
             align: 'center',
124 120
 
125 121
         },
126 122
         {
127 123
             title: '新增时间',
128
-            dataIndex: 'inventory',
129
-            key: 'inventory',
124
+            dataIndex: 'createDate',
125
+            key: 'createDate',
130 126
             align: 'center',
131 127
         },
132 128
         {
@@ -138,7 +134,7 @@ function header(props) {
138 134
                 <>
139 135
 
140 136
 
141
-                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.goodsId)}>
137
+                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditResource(row.noticeId)}>
142 138
                         编辑<Icon type="form" className={styles.edit} />
143 139
                     </span>
144 140
 
@@ -147,14 +143,28 @@ function header(props) {
147 143
         },
148 144
     ];
149 145
 
146
+    // const onSelectChange = (selectedRowKeys, selectedRows) => {
147
+    //     console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
148
+    //     setTaNoticeList(selectedRows)
149
+    //     // this.setState({ selectedRowKeys });
150
+    //   };
151
+
150 152
     const { getFieldDecorator } = props.form
153
+
154
+    const rowSelection = {
155
+        onChange: (selectedRowKeys, selectedRows) => {
156
+          console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
157
+          setTaNoticeList(selectedRows)
158
+        },
159
+      };
160
+ 
151 161
     return (
152 162
 
153 163
         <>
154 164
             <div>
155 165
                 <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
156 166
                     <Form.Item>
157
-                        {getFieldDecorator('goodsName')(
167
+                        {getFieldDecorator('title')(
158 168
                             <Input
159 169
                                 prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
160 170
                                 placeholder="通知标题"
@@ -162,9 +172,9 @@ function header(props) {
162 172
                         )}
163 173
                     </Form.Item>
164 174
                     <Form.Item>
165
-                        {getFieldDecorator('status')(
175
+                        {getFieldDecorator('targetType')(
166 176
                             <Select style={{ width: '180px' }} placeholder="关联业务类型">
167
-
177
+                                   <Option value='H5'>H5</Option>
168 178
                             </Select>,
169 179
                         )}
170 180
                     </Form.Item>
@@ -178,11 +188,16 @@ function header(props) {
178 188
                         )}
179 189
                     </Form.Item>
180 190
                     <Form.Item>
181
-                        {getFieldDecorator('qbc')(
182
-                            <Input
183
-                                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
184
-                                placeholder="发布状态"
185
-                            />,
191
+                        {getFieldDecorator('status')(
192
+
193
+                            <Select style={{ width: '180px' }} placeholder="发布状态">
194
+                                 <Option value="">全部</Option>
195
+                                <Option value="-1">删除</Option>
196
+                                <Option value="0">未发布</Option>
197
+                                <Option value="1">已发布</Option>
198
+
199
+                            </Select>,
200
+
186 201
                         )}
187 202
                     </Form.Item>
188 203
                     <Form.Item>
@@ -201,10 +216,10 @@ function header(props) {
201 216
 
202 217
                 <Button type="primary" className={styles.addBtn} onClick={toDelBatch()} style={{ marginLeft: '30px' }} >删除</Button>
203 218
 
204
-                <Table rowSelection={rowSelection} rowKey="goodsList" dataSource={data} columns={columns} pagination={false} />
205
-
219
+                <Table id='noticeTable' rowSelection={rowSelection} rowKey={r => r.noticeId} dataSource={data.records} columns={columns} pagination={false} />
220
+                {/* selectedRowKeys */}
206 221
                 <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207
-                    {/* <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} /> */}
222
+                    <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
208 223
                 </div>
209 224
             </div>
210 225
         </>

+ 24
- 0
src/pages/sample/h5/components/H5Card.jsx Ver arquivo

@@ -0,0 +1,24 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert, Card } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import apis from '../../../../services/apis';
6
+import request from '../../../../utils/request';
7
+import Wangedit from '../../../../components/Wangedit/Wangedit'
8
+import moment from 'moment';
9
+
10
+const { Meta } = Card
11
+
12
+const H5Card = props => {
13
+    return (
14
+    <Card
15
+      hoverable
16
+      style={{ width: 240 }}
17
+      cover={<img alt="example" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" />}
18
+    >
19
+      <Meta title="Europe Street beat" description="www.instagram.com" />
20
+    </Card>
21
+    )
22
+  }
23
+ 
24
+  export default H5Card

+ 208
- 0
src/pages/sample/h5/components/SelectContact.jsx Ver arquivo

@@ -0,0 +1,208 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon,Pagination } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import styles from '../style.less';
6
+
7
+const { Column, ColumnGroup } = Table;
8
+const SelectContact = props => {
9
+
10
+  const [data, setData] = useState([]);
11
+  const [visible, setVisible] = useState(false);
12
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择' })
13
+  const [selectedData, setSelectedData ] = useState([]);
14
+
15
+  useEffect(() => {
16
+    if (props.value && props.value != selectedData) {
17
+      setSelectedData(props.value)
18
+    }
19
+  }, [props.value])
20
+
21
+  // 查询列表
22
+  const getList = (params) => {
23
+    request({ ...apis.contact.list, params: { ...params } }).then((data) => {
24
+        console.log(data)
25
+        setData(data)
26
+    })
27
+  }
28
+  
29
+  useEffect(() => {
30
+    getList({ pageNum: 1, pageSize: 10,})
31
+  }, []);
32
+
33
+  
34
+
35
+  const handleChange = val => {
36
+  }
37
+
38
+  const selectData = val => {
39
+    const list = selectedData.filter(x => x.contactId !== val.contactId).concat(val)
40
+    setSelectedData(list)
41
+    props.onSelected(list)
42
+    setVisible(false)
43
+  }
44
+
45
+  
46
+  // 提交事件
47
+  const handleSubmit = (e, props) => {
48
+    e.preventDefault();
49
+    e.stopPropagation();
50
+    props.form.validateFields((err, values) => {
51
+      if (!err) {
52
+        getList({ pageNum: 1, pageSize: 10, ...values })
53
+      }
54
+    });
55
+  }
56
+
57
+  function handleReset() {
58
+    props.form.resetFields();
59
+    getList({ pageNum: 1, pageSize: 10 })
60
+  }
61
+
62
+  const changePageNum = (pageNumber) => {
63
+    getList({ pageNum: pageNumber, pageSize: 10 })
64
+  }
65
+
66
+  const removeSelected = (val) => {
67
+    const list = selectedData.filter(x => x.contactId !== val.contactId)
68
+    setSelectedData(list)
69
+    props.onSelected(list)
70
+  }
71
+
72
+  const columns = [
73
+    {
74
+      title: '姓名',
75
+      dataIndex: 'contactName',
76
+      key: 'drainageId',
77
+      align: 'center',
78
+      ellipsis: true,
79
+      render: text => <a>{text}</a>,
80
+    },
81
+    {
82
+      title: '性别',
83
+      dataIndex: 'sex',
84
+      key: 'drainageId',
85
+      align: 'center',
86
+      ellipsis: true,
87
+      render: text => <a>{text}</a>,
88
+    },
89
+    {
90
+      title: '头像',
91
+      dataIndex: 'avatar',
92
+      key: 'drainageId',
93
+      align: 'center',
94
+      ellipsis: true,
95
+      render: text => <a>{text}</a>,
96
+    },
97
+    {
98
+      title: '固话',
99
+      dataIndex: 'telephone',
100
+      key: 'drainageId',
101
+      align: 'center',
102
+      ellipsis: true,
103
+      render: text => <a>{text}</a>,
104
+    },
105
+    {
106
+      title: '手机号',
107
+      dataIndex: 'phone',
108
+      key: 'drainageId',
109
+      align: 'center',
110
+      ellipsis: true,
111
+      render: text => <a>{text}</a>,
112
+    },
113
+    {
114
+      title: '内部岗位',
115
+      dataIndex: 'job',
116
+      key: 'drainageId',
117
+      align: 'center',
118
+      ellipsis: true,
119
+      render: text => <a>{text}</a>,
120
+    },
121
+    {
122
+      title: '操作',
123
+      align: 'center',
124
+      width: '20%',
125
+      render: (text, record) => (
126
+        <span>
127
+          <a onClick={() => selectData(record)} style={{ color: 'blue' }}>选择</a>
128
+        </span>
129
+      ),
130
+    },
131
+  ];
132
+
133
+  const { getFieldDecorator } = props.form
134
+
135
+  return (
136
+    <div>
137
+      <Row gutter={24}>
138
+        <Col span={2}><div onClick={() => setVisible(true)}>{group.groupName}</div></Col>
139
+        <Col span={16}><div>
140
+        {selectedData.map(x => {
141
+          return <Tag size="large" key={x.contactId} closable onClose={() => removeSelected(x)}>{x.contactName}</Tag>
142
+        })}
143
+      </div></Col>
144
+      </Row>     
145
+      
146
+      <Modal
147
+        title="请选择"
148
+        width="1200px"
149
+        visible={visible}
150
+        onCancel={() => setVisible(false)}
151
+        footer={[]}
152
+      >
153
+      
154
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
155
+            <Form.Item>
156
+              {getFieldDecorator('contactName')(
157
+                <Input
158
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
159
+                  placeholder="姓名"
160
+                />,
161
+              )}
162
+            </Form.Item>
163
+            <Form.Item>
164
+              {getFieldDecorator('telephone')(
165
+                <Input
166
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
167
+                  placeholder="固话"
168
+                />,
169
+              )}
170
+            </Form.Item>
171
+            <Form.Item>
172
+              {getFieldDecorator('phone')(
173
+                <Input
174
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
175
+                  placeholder="手机号"
176
+                />,
177
+              )}
178
+            </Form.Item>
179
+            <Form.Item>
180
+              {getFieldDecorator('job')(
181
+                <Input
182
+                  prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
183
+                  placeholder="内部岗位"
184
+                />,
185
+              )}
186
+            </Form.Item>
187
+            <Form.Item>
188
+              <Button type="primary" htmlType="submit" className={styles.searchBtn}>
189
+                搜索
190
+              </Button>
191
+              <Button style={{ marginLeft: 8 }} onClick={handleReset}>
192
+                  重置
193
+              </Button>
194
+            </Form.Item>
195
+          </Form>
196
+    
197
+          <Table dataSource={data.records || []} columns={columns} pagination={false} />
198
+          <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
199
+            <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
200
+          </div>
201
+    
202
+      </Modal>
203
+    </div>
204
+  )
205
+}
206
+
207
+const WrappedRegistrationForm = Form.create()(SelectContact);
208
+export default WrappedRegistrationForm;

+ 169
- 0
src/pages/sample/h5/edit.jsx Ver arquivo

@@ -0,0 +1,169 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert, Radio } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import XForm, { FieldTypes } from '../../../components/XForm';
5
+import router from 'umi/router';
6
+import apis from '../../../services/apis';
7
+import request from '../../../utils/request';
8
+import Wangedit from '../../../components/Wangedit/Wangedit'
9
+import ImageUpload from '../../../components/XForm/ImageUpload'
10
+import SelectContact from './components/SelectContact';
11
+import moment from 'moment';
12
+
13
+const formItemLayout = {
14
+  labelCol: {
15
+    xs: { span: 24 },
16
+    sm: { span: 2 },
17
+  },
18
+  wrapperCol: {
19
+    xs: { span: 24 },
20
+    sm: { span: 16 },
21
+  },
22
+};
23
+
24
+const header = props => {
25
+    const sampleId = props.location.query.id
26
+  
27
+    const [ data, setData ] = useState({})
28
+    const [typeState, setTypeState] = useState("rich")
29
+
30
+    if(sampleId){
31
+      useEffect(() => {
32
+        getH5Data(sampleId);
33
+      },[])
34
+  
35
+    // 查询列表
36
+    const getH5Data = (sampleId) => {
37
+      request({
38
+          ...apis.sample.get,
39
+          urlData: { id: sampleId }
40
+      }).then((data) => {
41
+        setData(data)
42
+      }).catch((err) => {
43
+        message.error(err.msg || err.message)
44
+      })
45
+    }
46
+    }
47
+     
48
+    const handleSubmit = (e) => {
49
+      e.preventDefault();
50
+      // e.stopPropagation();
51
+      props.form.validateFieldsAndScroll((err, values) => {
52
+        console.log(values,"valuesvaluesvaluesvaluesvaluesvaluesvalues")
53
+        debugger
54
+        if (!err) {
55
+          console.log(values,"h5Sample/addh5Sample/add")
56
+          if(sampleId){
57
+            request({ ...apis.sample.update, urlData: { id: sampleId }, data: { ...values }}).then((data) => {
58
+              cancelPage();
59
+            }).catch((err) => {
60
+              message.error(err.msg || err.message)
61
+            })
62
+          }else{
63
+            request({ ...apis.sample.addh5, data: { ...values }}).then((data) => {
64
+              cancelPage();
65
+            }).catch((err) => {
66
+              message.error(err.msg || err.message)
67
+            })
68
+          }
69
+        }
70
+      });
71
+      
72
+    }
73
+  
74
+    const cancelPage = () => {
75
+      router.push({
76
+        pathname: '/sample/h5/list',
77
+      });
78
+    }
79
+
80
+    function sampleTypeChange(e) {
81
+      setTypeState(e.target.value)
82
+    }
83
+  
84
+    const { getFieldDecorator } = props.form;
85
+    return (
86
+      <Form {...formItemLayout} onSubmit={handleSubmit}>
87
+            
88
+          <Form.Item label="样例名" >
89
+            {getFieldDecorator('sampleName',{
90
+              rules: [{ required: true, message: '请输入样例名' },
91
+              { max: 20, message: '样例名不超过20个字符' }],
92
+            })(<Input placeholder="H5活动主题或目的,如植树节引流活动"/>)}
93
+          </Form.Item>
94
+          <Form.Item label="样例体验链接" >
95
+            {getFieldDecorator('sampleTryLink',{
96
+              rules: [{ max: 300, message: '样例体验链接不超过300个字符' }],
97
+            })(<Input placeholder="若样例暂未发布到小程序,可直接粘贴网页链接"/>)}
98
+          </Form.Item>
99
+          <Form.Item label="样例体验二维码/小程序码" >
100
+            {getFieldDecorator('sampleTryCode')(
101
+              <ImageUpload />,
102
+            )}
103
+          </Form.Item>
104
+          <Form.Item label="封面图" help="建议尺寸:495*330px,比例:3:2,格式:jpg,大小:不超过300KB,用于样例列表封面">
105
+            {getFieldDecorator('coverImg', {
106
+              rules: [{ required: true, message: '请选择列表图' }],
107
+            })(
108
+              <ImageUpload />,
109
+            )}
110
+          </Form.Item>
111
+          <Form.Item label="方案/报价/技术联系人" >
112
+            {getFieldDecorator('taContactList',{
113
+              trigger: 'onSelected'
114
+            })(<SelectContact />)}
115
+          </Form.Item>
116
+          <Form.Item label="发布状态" >
117
+            {getFieldDecorator('status', {
118
+              initialValue: "1",
119
+            })(
120
+            <Select style={{ width: '180px' }}>
121
+              <Select.Option value="1">是</Select.Option>
122
+              <Select.Option value="0">否</Select.Option>
123
+            </Select>)}
124
+          </Form.Item>
125
+          <Form.Item label="权重" help="数值越大越靠前">
126
+            {getFieldDecorator('orderNo')(<Input />)}
127
+          </Form.Item>
128
+          <Form.Item label="标签" help="标签长度6个字,最多3个标签">
129
+            {getFieldDecorator('tags')(
130
+              <Select mode="tags" placeholder="输入后选中" style={{ width: '1016px' }}>
131
+
132
+              </Select>,
133
+            )}
134
+          </Form.Item>
135
+          <Form.Item label="样例类型">
136
+            {getFieldDecorator('sampleType',{
137
+              initialValue: "rich",
138
+            })(
139
+            <Radio.Group onChange={e => sampleTypeChange(e)}>
140
+              <Radio value="rich">富文本</Radio>
141
+              <Radio value="link">外部链接</Radio>
142
+            </Radio.Group>,
143
+            )}
144
+          </Form.Item>
145
+          {typeState === 'link' && <Form.Item label="外部链接">
146
+            {getFieldDecorator('sampleContentLink',{
147
+              rules: [{ max: 300, message: '外部链接不超过300个字符' }],
148
+            })(<Input placeholder="填写外部链接,如公众号链接或135编辑器生成的页面链接" />)}
149
+          </Form.Item>}
150
+          {typeState === 'rich' && <Form.Item label="样例内容" >
151
+            {getFieldDecorator('sampleContent')(
152
+              <Wangedit />,
153
+            )}
154
+          </Form.Item> }
155
+          <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
156
+            <Button type="primary" htmlType="submit">
157
+                确定
158
+            </Button>
159
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160
+            <Button onClick={() => router.go(-1)}>
161
+                取消
162
+            </Button>
163
+          </Form.Item>
164
+        </Form>
165
+    )
166
+  }
167
+  
168
+  const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
169
+  export default WrappedNormalLoginForm

+ 71
- 78
src/pages/sample/h5/index.jsx Ver arquivo

@@ -1,6 +1,6 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Pagination, Card, Button, Icon, Tooltip, message,   notification, Modal, Table } from 'antd';
3
+import { Form, Pagination, Card, Button, Icon, Tooltip, message,   notification, Modal, Table, Select,Input, DatePicker  } from 'antd';
4 4
 import router from 'umi/router';
5 5
 import moment from 'moment';
6 6
 import className from 'classnames';
@@ -9,8 +9,9 @@ import styles from './style.less';
9 9
 import { fetch, apis } from '../../../utils/request';
10 10
 import request from '../../../utils/request';
11 11
 import AuthButton from '@/components/AuthButton';
12
+import H5Card from './components/H5Card';
12 13
 
13
-
14
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14 15
 
15 16
 function header(props) {
16 17
   // 获取初始化数据
@@ -22,7 +23,7 @@ function header(props) {
22 23
 
23 24
   // 查询列表
24 25
   const getList = (params) => {
25
-    request({ ...apis.channel.list, params: { ...params } }).then((data) => {
26
+    request({ ...apis.sample.h5list, params: { ...params } }).then((data) => {
26 27
         console.log(data)
27 28
         setData(data)
28 29
     })
@@ -45,9 +46,9 @@ function header(props) {
45 46
 
46 47
 
47 48
   // 跳转到编辑资讯
48
-  const toEditNews = (id) => () => {
49
+  const toEditH5 = (id) => () => {
49 50
     router.push({
50
-      pathname: '/channel/edit',
51
+      pathname: '/sample/h5/edit',
51 52
       query: {
52 53
         id
53 54
       },
@@ -83,75 +84,7 @@ function header(props) {
83 84
       }
84 85
     });
85 86
   }
86
-  /**
87
-   *
88
-   *
89
-   * @param {*} props
90
-   * @returns
91
-   */
92
-  const columns = [
93
-    {
94
-      title: '渠道代理',
95
-      dataIndex: 'channelProxyName',
96
-      key: 'channelProxyName',
97
-      align: 'center',
98
-    },
99
-    {
100
-      title: '账号名',
101
-      dataIndex: 'userName',
102
-      key: 'userName',
103
-      align: 'center',
104
-      render: (x, row) => <span>{row.userName === null || row.userName === '' ? row.channelTel : row.userName}</span>,
105
-    },
106
-    {
107
-      title: '小程序总数',
108
-      dataIndex: 'appMaxNum',
109
-      key: 'appMaxNum',
110
-      align: 'center',
111
-
112
-    },
113
-    {
114
-      title: '现有小程序',
115
-      dataIndex: 'appCurrentNum',
116
-      key: 'appCurrentNum',
117
-      align: 'center',
118
-      render: (appCurrentNum) => <span>{appCurrentNum === 0 || appCurrentNum == null ? 0 : appCurrentNum}</span>,
119
-    },
120
-    {
121
-      title: '服务到期时间',
122
-      dataIndex: 'expireDate',
123
-      key: 'expireDate',
124
-      align: 'center',
125
-      render: (x, row) => <><span>{`${moment(row.expireDate).format('YYYY-MM-DD')}`}</span></>,
126
-    },
127
-    {
128
-      title: '状态',
129
-      dataIndex: 'status',
130
-      key: 'status',
131
-      align: 'center',
132
-      render: (status) => <span>{status === 1 ? '启动' : '停用'}</span>,
133
-    },
134
-    {
135
-      title: '操作',
136
-      dataIndex: 'handle',
137
-      key: 'handle',
138
-      align: 'center',
139
-      render: (x, row) => (
140
-        <>
141
-          <AuthButton name="admin.taNewsType.id.delete" noRight={null}>
142
-            <span style={{ color: '#EF273A', marginRight: '20px', cursor: 'pointer' }} onClick={changeNewsStatus(row, row.channelId)}>
143
-              {row.status == 1 ? '停用' : '启用'}<Icon type="shopping-cart" className={styles.shoppingCart} />
144
-            </span>
145
-          </AuthButton>
146
-          <AuthButton name="admin.taNewsType.id.put" noRight={null}>
147
-            <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditNews(row.channelId)}>
148
-              编辑<Icon type="form" className={styles.edit} />
149
-            </span>
150
-          </AuthButton>
151
-        </>
152
-      ),
153
-    },
154
-  ];
87
+   
155 88
   function handleReset() {
156 89
     props.form.resetFields();
157 90
     getList({ pageNum: 1, pageSize: 10 })
@@ -161,10 +94,70 @@ function header(props) {
161 94
   return (
162 95
 
163 96
     <>
164
-      <AuthButton name="admin.taNewsType.post" noRight={null}>
165
-        <Button type="danger" className={styles.addBtn} onClick={toEditNews()}>新增</Button>
166
-      </AuthButton>
167
-      <Table rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
97
+    <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
98
+        <Form.Item>
99
+          {getFieldDecorator('sampleName')(
100
+            <Input
101
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
102
+              placeholder="样例名"
103
+            />,
104
+          )}
105
+        </Form.Item>
106
+        <Form.Item>
107
+          {getFieldDecorator('orgName')(
108
+            <Input
109
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
110
+              placeholder="下单组织"
111
+            />,
112
+          )}
113
+        </Form.Item>
114
+        <Form.Item>
115
+          {getFieldDecorator('orderer')(
116
+            <Input
117
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
118
+              placeholder="下单人"
119
+            />,
120
+          )}
121
+        </Form.Item>
122
+        <Form.Item>
123
+          {getFieldDecorator('phone')(
124
+            <Input
125
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
126
+              placeholder="联系方式"
127
+            />,
128
+          )}
129
+        </Form.Item>
130
+        <Form.Item>
131
+            <span style={{marginRight:'10px'}}>下单时间段:</span>
132
+                {getFieldDecorator('createDate')(
133
+                  <RangePicker placeholder={['开始时间','结束时间']} />
134
+                )}
135
+        </Form.Item>
136
+        <Form.Item>
137
+          {getFieldDecorator('demandStatus')(
138
+            <Select style={{ width: '180px' }} placeholder="需求单状态">
139
+              <Select.Option value="1">已提交</Select.Option>
140
+              <Select.Option value="2">处理中</Select.Option>
141
+              <Select.Option value="3">已交付</Select.Option>
142
+              <Select.Option value="4">作废</Select.Option>
143
+            </Select>,
144
+          )}
145
+        </Form.Item>
146
+        <Form.Item>
147
+          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
148
+            搜索
149
+          </Button>
150
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
151
+              重置
152
+          </Button>
153
+        </Form.Item>
154
+      </Form>
155
+      
156
+      <Button type="danger" className={styles.addBtn} onClick={toEditH5()}>新增</Button>
157
+ 
158
+      {(data.records || []).map(x => (
159
+          <H5Card />
160
+        ))}
168 161
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
169 162
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
170 163
       </div>

+ 54
- 0
src/services/apis.js Ver arquivo

@@ -85,6 +85,23 @@ const apis = {
85 85
       method: 'PUT',
86 86
       action: 'channel',
87 87
     },
88
+    h5list: {
89
+      url: `${prefix}/h5Sample/list`,
90
+      method: 'GET',
91
+      action: 'channel',
92
+    },
93
+    addh5: {
94
+      url: `${prefix}/h5Sample/add`,
95
+      method: 'POST',
96
+      action: 'channel',
97
+    },
98
+  },
99
+  contact: {
100
+    list: {
101
+      url: `${prefix}/taContact`,
102
+      method: 'GET',
103
+      action: 'channel',
104
+    },
88 105
   },
89 106
   image: {
90 107
     uploadForAnt: {
@@ -98,6 +115,43 @@ const apis = {
98 115
       action: 'center',
99 116
     },
100 117
   },
118
+  openScreen: {
119
+    list: {
120
+      url: `${prefix}/listNoticeByCondition`,
121
+      method: 'GET',
122
+      action: 'channel',
123
+    },
124
+    post: {
125
+      url: `${prefix}/taNotice`,
126
+      method: 'post',
127
+      action: 'channel',
128
+    },
129
+    // /api/admin/taNotice/{id}
130
+    put: {
131
+      url: `${prefix}/taNotice/:id`,
132
+      method: 'put',
133
+      action: 'channel',
134
+    },
135
+
136
+   
137
+    get:{
138
+      url: `${prefix}/taNotice/:id`,
139
+      method: 'GET',
140
+      action: 'channel',
141
+    },
142
+    delete:{
143
+      url: `${prefix}/taNotice/batchDelete`,
144
+      method: 'put',
145
+      action: 'channel',
146
+    },
147
+    getSample:{
148
+      url: `${prefix}/ListH5SampleByCondition`,
149
+      method: 'GET',
150
+      action: 'channel',
151
+    }
152
+    // /api/admin/ListH5SampleByCondition
153
+  },
154
+  
101 155
   contact:{
102 156
     listContactByCondition: {
103 157
       url: `${prefix}/listContactByCondition`,