| 12345678910111213141516171819202122232425262728293031323334 |
- <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': '/static/pdf/2.pdf', //银通汽车4s管理系统
- '2': '/static/pdf/3.pdf', //银通汽车租赁管理系统
- '3': '/static/pdf/1.pdf', // 银通云越管理系统
- }
- };
- },
- onLoad(options) {
- console.log(options)
- const fileIndex = options.file || '1';
- const baseUrl = this.fileMap[fileIndex] || this.fileMap['1'];
- this.fileUrl = baseUrl + '?t=' + Date.now();
- console.log(this.fileUrl);
- }
- };
- </script>
- <style lang="scss" scoped>
- .box {
- padding: 0;
- }
- </style>
|