|
@@ -91,40 +91,30 @@ const toEditGoods = (helpActivityId) => () => {
|
91
|
91
|
align: 'center',
|
92
|
92
|
render: (x, row) => (
|
93
|
93
|
<>
|
94
|
|
- {row.activityStatus === 0 &&
|
|
94
|
+ {(row.activityStatus === 0 || row.activityStatus === 2) &&
|
95
|
95
|
<AuthButton name="admin.helpRecord.get">
|
96
|
96
|
<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}} className={styles.shoppingCart} /></span>
|
97
|
97
|
</AuthButton>}
|
|
98
|
+ {
|
|
99
|
+ <AuthButton name="admin.top.update.post" noRight={null}>
|
|
100
|
+ <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
|
|
101
|
+ </AuthButton>
|
|
102
|
+ }
|
98
|
103
|
{row.activityStatus === 0 &&
|
|
104
|
+ <AuthButton name="admin.top.update.post" noRight={null}>
|
|
105
|
+ <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span> </AuthButton>
|
|
106
|
+ }
|
|
107
|
+ {
|
99
|
108
|
<AuthButton name="admin.top.update.post" noRight={null}>
|
100
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
101
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
|
109
|
+ <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消标签' : '添加标签' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
102
|
110
|
<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
103
|
111
|
</AuthButton> }
|
104
|
112
|
|
105
|
|
- {row.activityStatus === 1 &&
|
|
113
|
+ {(row.activityStatus === 1 || row.activityStatus === 0) &&
|
106
|
114
|
<AuthButton name="admin.helpActivity.update.put" noRight={null}>
|
107
|
115
|
<span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
108
|
116
|
</AuthButton>
|
109
|
117
|
}
|
110
|
|
- {row.activityStatus === 1 &&
|
111
|
|
- <AuthButton name="admin.top.update.post" noRight={null}>
|
112
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
113
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
114
|
|
- </AuthButton>
|
115
|
|
- }
|
116
|
|
-
|
117
|
|
- {row.activityStatus === 2 &&
|
118
|
|
- <AuthButton name="admin.helpRecord.get" noRight={null}>
|
119
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}} className={styles.shoppingCart} /></span>
|
120
|
|
- </AuthButton>
|
121
|
|
- }
|
122
|
|
- {row.activityStatus === 2 &&
|
123
|
|
- <AuthButton name="admin.top.update.post" noRight={null}>
|
124
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
125
|
|
- <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
|
126
|
|
- </AuthButton>
|
127
|
|
- }
|
128
|
118
|
</>
|
129
|
119
|
),
|
130
|
120
|
},
|
|
@@ -168,13 +158,13 @@ const toEditGoods = (helpActivityId) => () => {
|
168
|
158
|
})
|
169
|
159
|
}
|
170
|
160
|
|
171
|
|
- // const sendOrPublicDynamic = (row) => {
|
172
|
|
- // if (row.status === 1) {
|
173
|
|
- // cancelDynamic(row)
|
174
|
|
- // } else {
|
175
|
|
- // sendDynamic(row)
|
176
|
|
- // }
|
177
|
|
- // }
|
|
161
|
+ const sendOrPublicDynamic = (row) => {
|
|
162
|
+ if (row.status === 1) {
|
|
163
|
+ cancelDynamic(row)
|
|
164
|
+ } else {
|
|
165
|
+ sendDynamic(row)
|
|
166
|
+ }
|
|
167
|
+ }
|
178
|
168
|
|
179
|
169
|
// 取消活动
|
180
|
170
|
const cancelDynamic = (row) => {
|