<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Share.aspx.cs" Inherits="eFrameWork.WeChat.Share" %>
<!DOCTYPE html>
<html>
<head>
    <title>分享</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <script src="../Scripts/jquery.js?ver=<%=Common.Version %>"></script>
    <script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
</head>
<script>
    $(document).ready(function () {
       var jsApiListArr = ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"];
       wx.config({ debug: false, appId: "<%=shareData.appid %>", timestamp: "<%=shareData.timestamp %>", nonceStr: "<%=shareData.noncestr %>", signature: "<%=shareData.signature%>", jsApiList: jsApiListArr });
       var shareData = {
            title: "<%=shareData.title %>",
            desc: "<%=shareData.desc %>",
            link: "<%=shareData.link %>",
            imgUrl: "<%=shareData.imgurl %>",
            success: function (res) {
                //alert('已分享');
            },
            cancel: function (res) {
            },
            fail: function (res) {
                alert(JSON.stringify(res));
            }
        };
        wx.ready(function () {
            wx.onMenuShareTimeline(shareData); //分享到朋友圈
            wx.onMenuShareAppMessage(shareData);//发送给朋友
        });
   });
</script>
<body>
请使用微信右上角功能菜单进行测试
</body>
</html>