index1.html 8.33 KB
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<meta name="apple-mobile-web-app-title" content="SUMMER SALE">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" media="(device-height: 568px)">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="grey">
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
			font-size: 14px;
		}
		html,body{
			width: 100%; 
			height: 100%;
		}
		.page{
			width: 100%; 
			height: 100%;
		}
		.banner{
			width: 100%;
			height: auto;
			overflow: hidden;
		}
		.banner img{
			width: 100%;
			height: auto;
		}
		.centent{
			width: 100%; 
			height: auto;
			overflow: hidden;
			padding-top: 2rem;
			padding-bottom: .6rem;
			text-align: center;
		}
		.centent h3{
			color: #fff;
			font-size: 2.4rem;
			line-height: 4.8rem;
		}
		.centent p{
			color: #fff;
			line-height: 2.4rem;
			font-size: 1.2rem;
			padding:0 10%;
		}
		.dialog{
			width: 82%;
			height: 14rem;
			position: absolute;
			background: #fff;
			border-radius: .6rem;
			left:9%;
			top: 45%;
			margin-top: -7rem;
			z-index: 2;
		}
		.dialog .close{
			width: 1.4rem;
			height: 1.4rem;
			background: #444;
			color: #f1f1f1;
			border-radius: 50%;
			position: absolute;
			top: -.5rem;
			right: -.5rem;
			line-height: 1.4rem;
			text-align: center;
		}
		.footer{
			width: 100%;
			height: auto;
			overflow: hidden;
			padding-bottom: 2rem;
		}
		.footer .btn{
			width: 81.25%;
			height:auto;
			margin: 0 auto .6rem;
		}
		.footer .btn img{
			width: 100%;
			height: auto;
		}
		.footer span{
			font-weight: bold;
			display: inline-block;
			width: 20%;
			height: auto;
			text-align: center;
			color: #fff;
			margin: 0 40%;
		}
		.activity-message{
			overflow: auto;
		}
		.activity-message h3{
			width: 100%;
			height: 3.4rem;
			padding-top: .6rem;
			line-height: 3.4rem;
			font-size: 1.2rem;
			text-align: center;
		}
		.activity-message p{
			width: 85%;
			height: auto;
			overflow: hidden;
			margin:0 auto;
			line-height: 2rem;
		}
		.hidden{
			display: none;
		}
		.keep-out{
			width: 100%; 
			height: 100%;
			overflow: hidden;
			background-color: #000;
			opacity: 0.4;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 1;
		}
	</style>
</head>
<body>
	<div class="page">
		<div class="banner">
			<img id="topBanner" />
		</div>
		<div class="centent">
			<h3>Yoho!Buy有货</h3>
			<p>一款专为潮流人士设计的移动购物软件</p>
			<p>为您带来随时随地</p>
			<p>随手随心的潮流购物体验</p>
		</div>
		<div class="footer">
			<div class="btn">
				<img src="/activity/sendCoupon/images/cokeBtn.png">
			</div>
			<span>活动说明</span>
		</div>
	</div>
	<div class="keep-out hidden"></div>
	<div class="dialog hidden" id="message">
		<span class="close">X</span>
		<div class="activity-message">
			<h3>活动说明</h3>
			<div class="message">
				<P id="activityTime"></P>
				<P>2、仅限新注册用户以及首次购买用户使用</P>
				<P>3、同一手机号限领一次优惠券</P>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="/activity/js/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="/activity/js/global.js"></script>
<script type="text/javascript">
(function(w, d, s, j, f) {
    var a = d.createElement(s);
    var m = d.getElementsByTagName(s)[0];

    w.YohoAcquisitionObject = f;

    w[f] = function() {
        w[f].p = arguments;
    };

    a.async = 1;
    a.src = j;
    m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js', '_yas');
(function() {
    if (window._yas) {
        window._yas(1 * new Date(), '1.0.17', '', '', '', '');
    }
}());
</script>
<script>
$('.btn img').on('click',function(){
	if (window._yas) {
		window._yas.sendCustomInfo({
			'downApp': 'Y'
		}, true);
	}
	setTimeout(function(){
		window.location.href = "http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho";
		//window.location.href = "http://union.yoho.cn/union/downapp.html?union_type=227";
	}, 2000)
})
</script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">
/**
 * 微信分享 
 */
(function($) {
    if (typeof(wx) == "undefined") {
        return;
    }
  //根据活动编号,获取活动信息
  	var activityCode = getQueryStr("code");
  	var shareTitle, shareDesc, shareImg;
    $.post("/activity/sendCoupon/CouponActivityController/getCouponActivityByCode", {
    	activityCode : activityCode
    }, function(data){
    	if (data.code != 200) {
    		alert(data.message);
    		return;
    	}
    	data = data.data;
    	$("title").html(data.activityTitle);
    	$("#topBanner").attr("src", data.activityPic);
    	$("body").css("background", data.activityBgcolor);
    	$("#activityTime").html("1、活动时间:"+ data.beginTime +"到" + data.endTime);
    	shareTitle = data.shareTitle1;
    	shareDesc = data.shareTitle2;
    	shareImg = data.shareImgUrl;
    	
    	var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage';


        var shareLink = "http://service.yoho.cn/activity/sendCoupon/html/index1.html?code=" + activityCode;
        $.getJSON(_weChatInterface + '?pageurl=' +
                encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
            var _appId, _timestamp, _nonceStr, _signature;
            if (json !== undefined && json !== '') {
                _appId = json.appId.toString();
                _timestamp = json.timestamp;
                _nonceStr = json.nonceStr.toString();
                _signature = json.signature.toString();

                wx.config({
                    debug: false,
                    appId: _appId,
                    timestamp: _timestamp,
                    nonceStr: _nonceStr,
                    signature: _signature,
                    jsApiList: [
                        'checkJsApi',
                        'onMenuShareTimeline',
                        'onMenuShareAppMessage',
                        'onMenuShareQQ',
                        'onMenuShareWeibo',
                        'hideMenuItems',
                        'showMenuItems',
                        'hideAllNonBaseMenuItem',
                        'showAllNonBaseMenuItem',
                        'translateVoice',
                        'startRecord',
                        'stopRecord',
                        'onRecordEnd',
                        'playVoice',
                        'pauseVoice',
                        'stopVoice',
                        'uploadVoice',
                        'downloadVoice',
                        'chooseImage',
                        'previewImage',
                        'uploadImage',
                        'downloadImage',
                        'getNetworkType',
                        'openLocation',
                        'getLocation',
                        'hideOptionMenu',
                        'showOptionMenu',
                        'closeWindow',
                        'scanQRCode',
                        'chooseWXPay',
                        'openProductSpecificView',
                        'addCard',
                        'chooseCard',
                        'openCard'
                    ]
                });
            }
        });
        wx.ready(function() {
        
            var shareData = {
                title: shareTitle,
                desc: shareDesc,
                imgUrl: shareImg,
                link: shareLink
            };
            wx.onMenuShareAppMessage(shareData);
            wx.onMenuShareTimeline(shareData);
            wx.onMenuShareQQ(shareData);
            wx.onMenuShareWeibo(shareData);
        });
    }, "json");
}(jQuery));
</script>

<script type="text/javascript">
	$('.close').on('click', function(){
		$('.dialog').addClass('hidden');
		$('.keep-out').addClass('hidden');
		$('#dialog .content').html(' ')
	})
	$('.footer span').on('click',function(){
		$('#message').removeClass('hidden');
		$('.keep-out').removeClass('hidden');
	})
	$('.btn').on('click',function(){
		if (window._yas) {
			window._yas.sendCustomInfo({
    			'downApp': 'Y'
			}, true);
		}
		setTimeout(function(){
			console.log(1);
		}, 2000)
	})
</script>
</html>