1、引用微信的JS
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
2、初始化点击放大监听方法(加载完成后调用此方法)
function previewImg(){
var imgs = [];
var imgObj = $("img"); //这里改成相应的对象
for(var i=0; i<imgObj.length; i++){
imgs.push(imgObj.eq(i).attr('src'));
imgObj.eq(i).click(function(){
var nowImgurl = $(this).attr('src');
WeixinJSBridge.invoke("imagePreview",{
"urls":imgs, "current":nowImgurl
});
});
}}