|
@@ -159,6 +159,9 @@ const header = props => {
|
159
|
159
|
<AuthButton name="admin.buildingDynamic.tag" noRight={null}>
|
160
|
160
|
<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
|
161
|
161
|
</AuthButton>
|
|
162
|
+ <AuthButton name="admin.buildingDynamic.tag" noRight={null}>
|
|
163
|
+ <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={homeDynamic(row)}>{row.home === 1 ? '取消推首页' : '推首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
|
|
164
|
+ </AuthButton>
|
162
|
165
|
<AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
|
163
|
166
|
{(row.activityStatus === 0 || row.activityStatus === 1) && <span style={{ color: '#FF925C',marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>}
|
164
|
167
|
</AuthButton>
|
|
@@ -207,6 +210,19 @@ const header = props => {
|
207
|
210
|
})
|
208
|
211
|
}
|
209
|
212
|
|
|
213
|
+ // 推首页
|
|
214
|
+ const homeDynamic = row => () => {
|
|
215
|
+ const home = Math.abs(row.home - 1)
|
|
216
|
+ request({ ...apis.activity.home, params: { dynamicId: row.dynamicId, home } }).then(data => {
|
|
217
|
+ console.log(data)
|
|
218
|
+ message.info('操作成功!')
|
|
219
|
+ getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() })
|
|
220
|
+ }).catch(err => {
|
|
221
|
+ console.log(err)
|
|
222
|
+ message.info(err.msg || err.message)
|
|
223
|
+ })
|
|
224
|
+ }
|
|
225
|
+
|
210
|
226
|
const sendOrPublicDynamic = row => {
|
211
|
227
|
if (row.status === 1) {
|
212
|
228
|
cancelDynamic(row)
|