| 12345678910111213141516171819202122232425262728293031323334 |
- <route lang="json5" type="page">
- {
- layout: 'default',
- style: {
- navigationBarTitleText: '上传文件',
- },
- }
- </route>
- <template>
- <view class="">
- <web-view :src="url" @message="handleMessage"></web-view>
- </view>
- </template>
- <script lang="ts" setup>
- const url = ref("")
- function handleMessage(data) {
- uni.removeStorageSync('fileList');
- // 判断是否有文件上传
- uni.setStorageSync('fileList', JSON.parse(data.detail.data))
- uni.navigateTo({
- url: `/pages/print/index?accept=all`,
- })
- }
- onLoad((option) => {
- if (option && option.url) url.value = decodeURIComponent(option.url) + "?t=" + new Date().getTime()
- })
- </script>
- <style lang="scss" scoped>
- </style>
|