1.微信小程序在微信开发者工具中,手机预览,页面空白问题
把unpackage / mp-weixin / app.json 这个文件夹最这部分删除掉
"usingComponents": {
"rwj-tabbar": "/components/rwj-tabbar",
"hx-navbar": "/components/hx-navbar/hx-navbar"
}
2.微信小程序pdf预览
ios使用webview,直接预览后下载
安卓不能直接预览,需先下载,后打开实现预览
<template>
<view class="page">
<web-view :src="src" v-if="iOS"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
pdf_url: 'https://xxx.xxx.xxx', //url前缀
src: '', // PDF地址
iOS: true,
}
},
onLoad: function (option) {
console.log('00000', option)
// 上一个页面传过来的url参数,与前缀拼接
this.src = this.pdf_url + option.src