|
@@ -34,7 +34,7 @@ const header = (props) => {
|
34
|
34
|
|
35
|
35
|
|
36
|
36
|
// 跳转到编辑商品
|
37
|
|
-const toEditGoods = (dynamicId) => {
|
|
37
|
+const toEditGoods = (dynamicId) => () => {
|
38
|
38
|
router.push({
|
39
|
39
|
pathname: '/activity/editActivity',
|
40
|
40
|
query: {
|
|
@@ -103,8 +103,8 @@ const toEditGoods = (dynamicId) => {
|
103
|
103
|
render: (x,row) => <><span style={{ color: '#1990FF'}} onClick={getSignList.bind(this, row.dynamicId)}>{row.isEnlist == '1' || row.isEnlist == '2' ? "报名记录" : ""}<Icon type="snippets" className={styles.shoppingCart} /></span>
|
104
|
104
|
<span style={{ color: '#1990FF' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
|
105
|
105
|
<span style={{ color: '#1990FF' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
|
106
|
|
- <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic.bind(this,row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
|
107
|
|
- <span style={{ color: '#FF925C' }} onClick={toEditGoods.bind(this, row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
|
|
106
|
+ <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
|
|
107
|
+ <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
|
108
|
108
|
</>
|
109
|
109
|
},
|
110
|
110
|
];
|
|
@@ -140,7 +140,8 @@ const toEditGoods = (dynamicId) => {
|
140
|
140
|
});
|
141
|
141
|
}
|
142
|
142
|
|
143
|
|
- const topDynamic = (row) => {
|
|
143
|
+// 置顶
|
|
144
|
+ const topDynamic = (row) => () => {
|
144
|
145
|
const weight = Math.abs(row.weight - 1)
|
145
|
146
|
request({
|
146
|
147
|
url: '/api/admin/buildingDynamic/weight',
|
|
@@ -249,7 +250,7 @@ const handleSubmit = (e, props) => {
|
249
|
250
|
</Button>
|
250
|
251
|
</Form.Item>
|
251
|
252
|
</Form>
|
252
|
|
- <Button type="primary" className={styles.addBtn} onClick={toEditGoods}>新增</Button>
|
|
253
|
+ <Button type="primary" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
|
253
|
254
|
<Table dataSource={data.list} columns={columns} pagination={false}/>
|
254
|
255
|
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
255
|
256
|
<Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
|