| 1234567891011121314151617181920212223242526272829303132 |
- <template>
- <view class="box">
- <ss-preview :fileUrl="fileUrl" :fileType="fileType"></ss-preview>
- </view>
- </template>
- <script>
- export default {
- components:{},
- data() {
- return {
- fileUrl: '',
- fileType: '2',
- fileMap: {
- '1': 'https://2022.cqytjr.com/file/1.pdf',
- '2': 'https://2022.cqytjr.com/file/2.pdf',
- '3': 'https://2022.cqytjr.com/file/3.pdf'
- }
- };
- },
- onLoad(options) {
- console.log(options)
- const fileIndex = options.file || '1';
- this.fileUrl = this.fileMap[fileIndex] || this.fileMap['1'];
- }
- };
- </script>
- <style lang="scss" scoped>
- .box {
- padding: 0;
- }
- </style>
|