forked from Gitlink/forgeplus-react
接口加上后缀.json
This commit is contained in:
parent
57ab5d1199
commit
ee6961d02e
|
@ -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: '/' });
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=>{
|
||||
|
|
Loading…
Reference in New Issue