diff --git a/src/AppConfig.js b/src/AppConfig.js index 386583dbf..5103c6bc9 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -27,7 +27,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } function clearAllCookie() { cookie.remove('_educoder_session', { path: '/' }); diff --git a/src/exchange/ExchangeItem.js b/src/exchange/ExchangeItem.js index bf7522575..8b68e52f9 100644 --- a/src/exchange/ExchangeItem.js +++ b/src/exchange/ExchangeItem.js @@ -83,7 +83,7 @@ class ExchangeItem extends Component { // 取消推荐+推荐 bestEvent = (is_fine,id) =>{ const { refresh } = this.props; - const url =`/memos/${id}/is_fine`; + const url =`/memos/${id}/is_fine.json`; axios.post(url,{ is_fine:is_fine ? 0 : 1 diff --git a/src/exchange/Manage/SubSendItem.js b/src/exchange/Manage/SubSendItem.js index 658ec120a..9e9d2d195 100644 --- a/src/exchange/Manage/SubSendItem.js +++ b/src/exchange/Manage/SubSendItem.js @@ -59,7 +59,7 @@ class SubSendItem extends Component { // 取消推荐/推荐-已发布的帖子 isFineEvent=(id,flag)=>{ const { page } = this.state; - const url = `/memos/${id}/is_fine`; + const url = `/memos/${id}/is_fine.json`; axios.post(url,{ is_fine:flag ? 0 : 1 }).then(result=>{ @@ -74,7 +74,7 @@ class SubSendItem extends Component { // 取消置顶/置顶-已发布的帖子 stickyEvent=(id,flag)=>{ const { page } = this.state; - const url = `/memos/${id}/set_top_or_down`; + const url = `/memos/${id}/set_top_or_down.json`; axios.get(url,{params:{ sticky:flag ? 0 : 1 }}).then(result=>{