|
发表于 2017-7-13 21:19:30
|
显示全部楼层
感谢回复,做了个普通页面,用ifram加载微信公众平台的文章,加上论坛里的方式,应当可以显示图片了,但是,
我要的这个微信公众平台页面里面还有语音,所以恐怕还得用webview组件
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>测试文档</title>
<script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
<script language="javascript">
$.ajaxPrefilter( function (options) {
if (options.crossDomain && jQuery.support.cors) {
var http = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = http + '//cors-anywhere.herokuapp.com/' + options.url;
}
});
var share_link="http://mp.weixin.qq.com/s/zdftnRYHyDWjtoHruPOW7g";//微信文章地址
$.get(
share_link,
function (response) {
// console.log("> ", response);
var html = response;
html=html.replace(/data-src/g, "src");
var html_src = 'data:text/html;charset=utf-8,' + html;
$("iframe").attr("src" , html_src);
}
);
</script>
</head>
<body >
<div>
<div style="height:10px;background-color:#ff4400"></div>
<div>
<iframe width="100%" height="1000px" style=" border: 0; width: 1px;min-width: 100%;*width: 100%;" > </iframe>
</div><!---->
</body>
</html>
|
|