Authored by happyhour7@163.com

增加测试、开发环境适配partials

<!doctype html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="{{keywords}}" />
<meta name="description" content="{{description}}" />
<title>{{title}}</title>
<meta name="author" content="yohogirls.com" />
<meta name="google-site-verification" content="6IS8pD7H0L0FBqjE6XZIx-x02Pa2fmG0P2ZEb3xNiVY" />
<meta property="wb:webmaster" content="5ffc4cd75e724a17" />
<link rel="dns-prefetch" href="//img01.yohoboys.com" />
<link rel="dns-prefetch" href="//img02.yohoboys.com" />
<link rel="dns-prefetch" href="//video.yohoboys.com" />
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
</head>
<body>
{{# emailAddress}}
<div class="emailBox">
<div class="webLogo">
<a href="/index.html"> <img src="<?php echo SITE_IMG; ?>/logo_girl.png" alt="">
</a>
</div>
<h1>取消订阅</h1>
<p>请输入您的电子邮件地址,以取消订阅YOHO!Girls</p>
<div class="cancelEmail">
<p><input id="email" type="text"></p>
<a href="javascript:window.location.href = '<?php echo url("passport::subscribe/sendcancel");?>?email='+document.getElementById('email').value" class="cancelBtn">取消订阅</a>
</div>
<p class="black">NewPower Co. All Right Reserved</p>
</div>
<script type="text/javascript" src="<?php echo SITE_JS . '/lib/seajs.js'; ?>"></script>
<script type="text/javascript">
seajs.use("jquery",function($)
{
$('.cancelBtn').click(function(){
var email_val = $('#email').val();
if(email_val.length === 0){
alert("<?php echo t('请输入邮箱地址!', $this->view->_language);?>");
return false;
}
var search_str = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/;
if(!search_str.test(email_val)){
alert("<?php echo t('请输入正确的邮箱地址!', $this->view->_language);?>");
return false;
}
});
});
</script>
{{/ emailAddress}}
{{^ emailAddress}}
<div class="emailBox">
<div class="webLogo">
<a href="<?php echo url('default::default', array('lang' => $this->view->_language, 'show' => 'web'), 'home'); ?>"><img src="<?php echo SITE_IMG; ?>/logo_girl.png" alt=""></a>
</div>
<h1><?php echo t('取消订阅成功', $this->view->_language);?></h1>
<div class="cancelForm">
<p><?php echo t('你已取消订阅YOHO!Girls', $this->view->_language);?></p>
<p><?php echo t('你将收到最后一封邮件,确认我们已为你取消订阅', $this->view->_language);?></p>
<h3><?php echo t('如果你有时间,请告诉我们您为什么取消订阅:', $this->view->_language);?></h3>
<div class="radioBox" val="<?php echo $this->view->email?>">
<p><label><input name="radio" type="radio" value="1"><?php echo t('我不再希望收到这些电子邮件', $this->view->_language);?></label></p>
<p><label><input name="radio" type="radio" value="2"><?php echo t('我从未在这个邮件列表注册', $this->view->_language);?></label></p>
<p><label><input name="radio" type="radio" value="3"><?php echo t('这些邮件是不合宜的', $this->view->_language);?></label></p>
<p><label><input name="radio" type="radio" value="4"><?php echo t('这些邮件是垃圾邮件,应该予以报告', $this->view->_language);?></label></p>
<p><label><input name="radio" type="radio" value="5"><?php echo t('其他原因(在下面填写原因)', $this->view->_language);?></label></p>
<p><textarea name="" readonly="true"></textarea></p>
<p class="pt10"><a class="submitEmail" href="javascript:void(0);"><?php echo t('提交', $this->view->_language);?></a></p>
</div>
</div>
<p class="backYohoBoys"><a class="times" href="#">&lt;&lt; Back YOHO!Girls </a></p>
<p class="black">NewPower Co. All Right Reserved</p>
</div>
<script type="text/javascript" src="<?php echo SITE_JS . '/lib/seajs.js'; ?>"></script>
<script type="text/javascript">
seajs.use("jquery",function($)
{
$("input[name='radio']").click(function()
{
var index = $("input[name='radio']").index(this);
if(index==4)
{
$("textarea").removeAttr("readonly");
}
else
{
$("textarea").attr("readonly",true);
$("textarea").val('');
}
});
$(".submitEmail").click(function()
{
var type = $("input[name='radio']:checked").val();
var reson = $("textarea").val();
var email = $(".radioBox").attr("val");
$.ajax
({
url: common.U('passport::subscribe/callback'),
data: {"refuse_type":type, "reson":reson, "email":email},
dataType: "JSON",
type: "POST",
success: function(response)
{
if (response.code == 200)
{
alert("取消订阅成功!");
history.go(-1);
}
else
{
alert("取消订阅失败!");
}
}
});
});
});
</script>
{{/ emailAddress}}
</body>
</html>
... ...
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Yoho!Girls | No Fashion, No Life!</title>
<meta name="keywords" content="yoho,yoho有货,yohogirl,yoho女生志,女装潮牌,it girl,lifestyle,女生街拍,免费试用申请,美容技巧,潮流视频,潮流GIF图片" />
<meta name="description" content="Yoho!Girls是一个时装地球村,坚守「No Fashion, No Life」的理念,突破二维与平面的结界,在这个平台上发布时装,美容,生活等方面的资讯。" />
<meta name="author" content="yohogirls.com" />
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
<meta name="keywords" content="{{keywords}}" />
<meta name="description" content="{{description}}" />
<title>{{title}}</title>
<meta name="author" content="yohogirls.com" />
<meta name="google-site-verification" content="6IS8pD7H0L0FBqjE6XZIx-x02Pa2fmG0P2ZEb3xNiVY" />
<meta property="wb:webmaster" content="5ffc4cd75e724a17" />
<link rel="dns-prefetch" href="//img01.yohoboys.com" />
<link rel="dns-prefetch" href="//img02.yohoboys.com" />
<link rel="dns-prefetch" href="//video.yohoboys.com" />
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
</head>
<body>
<div class="emailBox">
<h1>就要完成了...</h1>
<p class="mb5">我们需要对您的电子邮件地址进行确认!</p>
<div class="emailBox">
<h1>就要完成了...</h1>
<p class="mb5">我们需要对您的电子邮件地址进行确认!</p>
<p class="mb20">完成订阅过程,请点击我们刚刚发给您的电子邮件中的链接。</p>
<p class="black">NewPower Co. All Right Reserved</p>
<div class="btnGroup clearfix">
<a class="EmailBack" href="javascript:window.close();">&lt;&lt; Back</a>
<a class="CheckEmail" href="{{emailServer}}">Check my email</a>
<div class="btnGroup clearfix">
<a class="EmailBack" href="javascript:window.close();">&lt;&lt; Back</a>
<a class="CheckEmail" href="{{emailServer}}">Check my email</a>
</div>
</div>
</div>
<div class="emailBox">
<div class="webLogo">
<a href="/index.html">
<img src="<?php echo SITE_IMG; ?>/logo_girl.png" alt="">
</a>
</div>
<h1>您已订阅!</h1>
<p class="times yourEmail">mail: <span>{{emailAddress}}</span></p>
<p class="mb20">
一旦您希望停止接收我们的电子邮件,您可以
<a href="/passport/subscribe/cancel" class="underline">
取消订阅
</a>
</p>
<p class="backYohoBoys"><a class="times" href="javascript:history.go(-1)">&lt;&lt; Back YOHO!Girls </a></p>
<p class="black">NewPower Co. All Right Reserved</p>
</div>
</body>
</html>
\ No newline at end of file
</html>
... ...
{{# WEnvironment}}
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
{{/ WEnvironment}}
{{^ WEnvironment}}
<link rel="stylesheet" type="text/css" href="http://cmsres.test.yoho.cn/res/new/girls/css/girls.css" />
{{/ WEnvironment}}
\ No newline at end of file
... ...
{{# WEnvironment}}
<script type="text/javascript" src="http://localhost:8000/js/util/seajs.js?nowrap"></script>
{{/ WEnvironment}}
{{^ WEnvironment}}
<script type="text/javascript" src="http://cmsres.test.yoho.cn/res/new/girls/js/util/seajs_test.js"></script>
<script type="text/javascript" src="http://cmsres.test.yoho.cn/res/new/girls/index.js"></script>
<script type="text/javascript">
seajs.use("index");
</script>
{{/ WEnvironment}}
\ No newline at end of file
... ...
... ... @@ -15,6 +15,7 @@
<link rel="dns-prefetch" href="//img01.yohoboys.com" />
<link rel="dns-prefetch" href="//img02.yohoboys.com" />
<link rel="dns-prefetch" href="//video.yohoboys.com" />
<link rel="stylesheet" type="text/css" href="http://localhost:8000/dist/yohogirls-frontend-web/0.0.1/girls.css" />
</head>
<body>
... ...