微信公众号的页面地址(示例):
'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=xxxxx&scene=124#wechat_redirect';
可以通过location.href
的方式直接跳转过去。
<div class="p:32 text-center">
<button id="btn1" class="btn btn-main">关注公众号1</button>
</div>
<div class="p:32 text-center">
<a id="btn2" onclick="location.href='qrimg_url';" class="btn btn2">关注公众号2</a>
</div>
<script>
Q('btn1').onclick = function() {
location.href= 'qrimg_url';
}
</script>