fix: fix /file_info api
This commit is contained in:
parent
a410f750d7
commit
34e9ef7856
@ -288,17 +288,19 @@ export default {
|
||||
})
|
||||
},
|
||||
// 根据id获取文件信息
|
||||
getFileInfoById: function(id) {
|
||||
getFileInfoById: function(params) {
|
||||
return request({
|
||||
url: `/file_info/${id}`,
|
||||
method: 'get'
|
||||
url: '/file_info',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 根据id获取文件信息
|
||||
getPublicFileInfoById: function(fileId, shareId) {
|
||||
getPublicFileInfoById: function(params) {
|
||||
return request({
|
||||
url: `/public/file_info/${fileId}/${shareId}`,
|
||||
method: 'get'
|
||||
url: '/public/file_info',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -76,12 +76,12 @@ export default {
|
||||
return
|
||||
}
|
||||
if(this.$store.state.user.token && this.$store.state.user.userId === this.file.userId){
|
||||
api.getFileInfoById(this.file.id).then(res => {
|
||||
api.getFileInfoById({id: this.file.id}).then(res => {
|
||||
this.file = res.data
|
||||
this.loadFile()
|
||||
})
|
||||
} else {
|
||||
api.getPublicFileInfoById(this.file.id, this.shareId).then(res => {
|
||||
api.getPublicFileInfoById({fileId: this.file.id, shareId: this.shareId}).then(res => {
|
||||
this.file = res.data
|
||||
this.loadFile()
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user