oa_app仓库初始化
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<fy-header title="附件预览" back />
|
||||
<view class="body">
|
||||
<text class="name">{{ name || '附件' }}</text>
|
||||
<view class="btn-primary" @click="open">打开 / 预览</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FyHeader from '../../components/fy-header.vue'
|
||||
import { store } from '../../utils/store.js'
|
||||
import { openFile } from '../../utils/files.js'
|
||||
|
||||
export default {
|
||||
components: { FyHeader },
|
||||
data() { return { id: '', name: '' } },
|
||||
onLoad(q) {
|
||||
this.id = decodeURIComponent(q.id || '')
|
||||
this.name = decodeURIComponent(q.name || '附件')
|
||||
this.open()
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
if (!this.id) return
|
||||
openFile({ id: this.id, name: this.name }, store.token)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.body { padding: 48rpx 32rpx; }
|
||||
.name { display: block; font-size: 28rpx; margin-bottom: 32rpx; text-align: center; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user