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