<!--#include file="Config.asp" -->
<% 
eims = "Wed"
iType=Int(request("iType"))
Tel=eRead("Wed",TypeID,"Tel")

if not iType>0 then 
response.write "Err:参数错误"
response.End()
end if
%>
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>
.share{
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    z-index:1000;
    background:rgba(0,0,0,0.5);
}
.share.on{
    display:block;
}
.share table{
    float:right;
    margin-right:10px;
    width:235px;
    text-align:center;
}
.share table img{
}
.share tr:nth-of-type(2){
    text-align:center;
    border:2px dashed #fff;
    border-radius:8px;
    -webkit-border-radius:8px;
    display:block;
    color:#fff;
    line-height:30px;
}
.share td{
    width:116px;
    text-align:center;
}
.share tr:nth-of-type(2) img{
    width:66px!important;
    height:66px!important;
    margin:5px;
}
</style>

<title><% =siteName %></title>
</head><body>
<div style="width:100%; height:100%;" onClick="history.back()">
<%
if iType=1 then
%>
<article id="shareCover" class="share" onclick="$('#shareCover').toggleClass('on');">
	<table>
		<tr>
			<td colspan="2" style="text-align:right;">
				<img src="share/share_1.png" style="width:120px!important;" />
				<img src="share/share_2.png" style="width:30px!important;" />
			</td>
		</tr>
		<tr>
			<td style="width:50%;">
				<img src="share/share_4.png" />
				<div>发送给朋友</div>
			</td>
			<td>
				<img src="share/share_3.png" />
				<div>分享到朋友圈</div>
			</td>
		</tr>
	</table>
</article>

	<script>
	function iShare(){
	var iObj = document.getElementById("shareCover");
	if (iObj.style.display=='none'){
	iObj.style.display='';
	}else{
	iObj.style.display='none';
	}
	}	
	
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
			window.shareData = {
				"imgUrl": "<%=nHost%>/<%=siteLogo%>",
				"timeLineLink": "<%=nHost%>",
				"sendFriendLink": "<%=nHost%>",
				"weiboLink": "<%=nHost%>",
				"tTitle": "<%=siteName%>",
				"tContent": "<%=siteTitle%>",
				"fTitle": "<%=siteName%>",
				"fContent": "<%=siteTitle%>",
				"wContent": "<%=siteTitle%>"
			};

			// 发送给好友
			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)
	</script>
<%
end if

if iType=2 then
%>
<article id="shareCover" class="share" onclick="$('#shareCover').toggleClass('on')">
	<table>
		<tr>
			<td colspan="2" style="text-align:right;">
				<img src="share/share_1.png" style="width:120px!important;" />
				<img src="share/share_2.png" style="width:30px!important;" />			</td>
		</tr>
		<tr>
			<td style="width:50%;">
				<img src="share/share_4.png" />
				<div>发送给朋友</div>			</td>
			<td>
				<img src="share/share_3.png" />
				<div>分享到朋友圈</div>			</td>
		</tr>
	</table>
</article>

	<script>
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
			window.shareData = {
				"imgUrl": "<%=nHost%>/<%=Photo%>",
				"timeLineLink": "<%=nHost%>/Page.asp?TypeID=<%=TypeID%>",
				"sendFriendLink": "<%=nHost%>/Page.asp?TypeID=<%=TypeID%>",
				"weiboLink": "<%=nHost%>/Page.asp?TypeID=<%=TypeID%>",
				"tTitle": "<%=Title%>",
				"tContent": "<%=eRead("Wed",TypeID,"Date1")%><%=eRead("Wed",TypeID,"eAdd")%>",
				"fTitle": "<%=Title%>",
				"fContent": "<%=eRead("Wed",TypeID,"Date1")%><%=eRead("Wed",TypeID,"eAdd")%>",
				"wContent": "<%=eRead("Wed",TypeID,"Date1")%><%=eRead("Wed",TypeID,"eAdd")%>"
			};

			// 发送给好友
			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)
	</script>
<%
end if
%>
</div>
</body></html>
<% Call CloseConn() %>