初始提交
This commit is contained in:
31
pages/workFlow/filePreview/index.vue
Normal file
31
pages/workFlow/filePreview/index.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="fileUrl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDownloadUrl
|
||||
} from '@/api/common'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileUrl: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: e.name
|
||||
})
|
||||
this.getFileUrl(e.fileId)
|
||||
},
|
||||
methods: {
|
||||
getFileUrl(fileId) {
|
||||
getDownloadUrl('workFlow', fileId).then(res => {
|
||||
this.fileUrl = this.define.baseURL + res.data.url;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user