<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>{{activity.name}}</title>
    <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}vote/css/vote.css">
    {% block addcss %}
    {% endblock %}
</head>
<body>
{% block wx-content %}
    <div style="display:none;">
        <div class="wx-title">{{activity.name}}</div>
        <div class="wx-desc">{{activity.name}}</div>
        <img class="wx-imgUrl" src="{{activity.background_image.image.url}}" />
        <div class="wx-linkurl">{% autoescape off %}{{linkurl}}{% endautoescape %}</div>
    </div>
{% endblock %}


{% block content %}
{% endblock %}


<script type="text/javascript" src="{{STATIC_URL}}vote/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}vote/js/baiduTemplate.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}vote/js/vote.js"></script>
<script type="text/javascript" src="{{STATIC_URL}}vote/js/weixin.1.0.0.js"></script>
<script type="text/javascript">
wx.config({
    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: '{{appId}}', // 必填，公众号的唯一标识
    timestamp: '{{timestamp}}', // 必填，生成签名的时间戳
    nonceStr: '{{nonceStr}}', // 必填，生成签名的随机串
    signature: '{{signature}}', // 必填，签名，见附录1
    jsApiList: ['onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone',
        ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});

wx.ready(function() {
    conf ={
        title: $('.wx-title').text(),
        desc: $('.wx-desc').text(),
        link: $('.wx-linkurl').text(),
        imgUrl: $('.wx-imgUrl').attr('src'),
        success: function() {
            // 用户确认分享后执行的回调函数
        },
        cancel: function() {
            // 用户取消分享后执行的回调函数
        }
    }
    wx.onMenuShareTimeline(conf);
    wx.onMenuShareAppMessage(conf);
    wx.onMenuShareQQ(conf);
    wx.onMenuShareWeibo(conf);
    wx.onMenuShareQZone(conf);
});
</script>

{% block addjs %}
{% endblock %}
</body>
</html>