wxml
<view>
<web-view src="{{Url}}"></web-view>
</view>
onLoad: function (options) {
var str = “”;
var that = this;
this.setData({ Url: “https://baidu.com” });
}
IDE调试显示正常 可是IDE调试却显示找不到页面了,体验版也一样
wx.downloadFile({
url: “https://miniprgm.cnsis.org.cn/wechatwebservices/file_sis/orginamanual.pdf”,
success: function (res) {
console.log(res)
var Path = res.tempFilePath //返回的文件临时地址,用于后面打开本地预览所用
wx.openDocument({
filePath: Path,
success: function (res) {
console.log(‘打开成功’);
}
})
},
fail: function (res) {
console.log(res);
}
});
WXML
<view wx:if="{{k!=3}}">
<web-view src="{{Url}}"></web-view>
</view>
<view wx:else>
<view class=“blue”></view>
</view>
当前K的值为3