修复上传文件夹抛出创建文件夹失败的问题

This commit is contained in:
jmal 2020-03-06 14:26:58 +08:00
parent c4b5a6f7c5
commit 4a08337bbc
3 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<svg-icon v-else-if="item.contentType.indexOf('video') > -1" icon-class="video" />
<svg-icon v-else-if="item.contentType.indexOf('audio') > -1" icon-class="audio" />
<svg-icon v-else-if="item.contentType.indexOf('text') > -1" icon-class="file-txt" />
<el-avatar v-else-if="item.contentType.indexOf('image') > -1" shape="square" :src="imageUrl+item.path+'/'+item.name"></el-avatar>
<el-avatar v-else-if="item.contentType.indexOf('image') > -1" shape="square" :src="imageUrl+item.id"></el-avatar>
<svg-icon v-else-if="item.contentType.indexOf('application/pdf') > -1" icon-class="file-pdf" />
<svg-icon v-else-if="item.contentType.indexOf('word') > -1" icon-class="file-word" />
<svg-icon v-else-if="item.contentType.indexOf('zip') > -1" icon-class="zip" />

View File

@ -55,7 +55,7 @@ service.interceptors.response.use(
})
}else{
Message({
message: '服务器开小差了...',
message: res.message || '服务器开小差了...',
type: 'error',
duration: 3 * 1000
})

View File

@ -621,7 +621,7 @@ export default {
if (!this.$route.query.path){
this.$router.push(`/_m`)
} else {
this.$router.push(`?path=${this.path}`)
this.$router.push(`?path=${encodeURIComponent(this.path)}`)
}
}
setPath(this.path, this.pathList)
@ -1393,18 +1393,20 @@ export default {
this.pathList.push(item2)
setPath(this.path, this.pathList)
this.pagination.pageIndex = 1
console.log(this.path)
this.$router.push(`?path=${this.path}`)
const path = encodeURIComponent(this.path);
this.$router.push(`?path=${path}`)
this.getFileList()
}
} else {
if(row.contentType.includes('text')){
// let routeData = this.$router.resolve({path: '/public/p',query: {mark: row.id}})
// window.open(routeData.href, '_blank');
this.$router.push(`/public/p?mark=${row.id}`)
}else{
// 打开文件
const fileIds = [row.id]
const url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
window.open(url, '_blank')
window.open(url, '_self')
}
}
}