/g,”);
str = str.replace(//g,”);
str = str.replace(/?[^>]*>/g,”);
str = str.replace(/s+/g,”);
str = str.replace(/ /ig,”);
return str;
}
document.addEventListener(‘WeixinJSBridgeReady’, function onBridgeReady() {
var _share_img = $(‘body img:eq(0)’).attr(“src”);
if(typeof(_share_img) == “undefined”) _share_img = “http://wifi.dineshk.net/source/modules/index/icon.jpg”;
var _share_content = _removeHTMLTag($(‘body’)/()).replace(“昆明火车站微站”,”);
window.shareData = {
“imgUrl”: _share_img,
“timeLineLink”: “/”,
“sendFriendLink”: “/”,
“weiboLink”: “/”,
“tTitle”: “昆明火车站微站”,
“tContent”: _share_content,
“fTitle”: “昆明火车站微站”,
“fContent”: _share_content,
“wContent”: _share_content
};
// 发送给好友
WeixinJSBridge.on(‘menu:share:appmessage’, function (argv) {
WeixinJSBridge.invoke(‘sendAppMessage’, {
“img_url”: window.shareData.imgUrl,
“img_width”: “640”,
“img_height”: “640”,
“link”: window.shareData.sendFriendLink,
“desc”: window.shareData.fContent,
“title”: window.shareData.fTitle
}, function (res) {
_report(‘send_msg’, res.err_msg);
})
});
// 分享到朋友圈
WeixinJSBridge.on(‘menu:share:timeline’, function (argv) {
WeixinJSBridge.invoke(‘shareTimeline’, {
“img_url”: window.shareData.imgUrl,
“img_width”: “640”,
“img_height”: “640”,
“link”: window.shareData.timeLineLink,
“desc”: window.shareData.tContent,
“title”: window.shareData.tTitle
}, function (res) {
_report(‘timeline’, res.err_msg);
});
});
// 分享到微博
WeixinJSBridge.on(‘menu:share:weibo’, function (argv) {
WeixinJSBridge.invoke(‘shareWeibo’, {
“content”: window.shareData.wContent,
“url”: window.shareData.weiboLink
}, function (res) {
_report(‘weibo’, res.err_msg);
});
});
}, false);
//function dump(){
//alert(‘test’);
//
//}
//setTimeout(‘dump()’,5000);