Browse Source

静态页面

1002884655 3 years ago
parent
commit
21a22b5571
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/utils/hooks/useFavor.js

+ 1
- 1
src/utils/hooks/useFavor.js View File

5
 import track from '@/utils/tracking/track'
5
 import track from '@/utils/tracking/track'
6
 
6
 
7
 const addFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'POST' })
7
 const addFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'POST' })
8
-const cancelFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'POST' })
8
+const cancelFavor = (type, id) => fetch({ url: resolvePath(`${type}/save/${id}`),  method: 'DELETE' })
9
 
9
 
10
 export default function(saved, options = {}) {
10
 export default function(saved, options = {}) {
11
   const { id, eventType } = options
11
   const { id, eventType } = options