If you get a “referenceError wx is not defined” error like I did, there is a good chance that jweixin-1.0.0.js conflicts with one of your other js.

Solutions:

<script type="text/javascript">
    define = null;
    require = null;
</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript">
</script>
Copy the code

Before referencing jweixin-1.0.0.js, reset define and require.