Authored by biao

Merge branch 'zhaobiao/yohobuy-fix/issue' into develop

Showing 100 changed files with 1522 additions and 504 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

... ... @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>页面不存在 | Yoho!Buy有货</title>
<title>页面不存在</title>
<meta name="keywords" content="Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
... ... @@ -27,7 +27,7 @@
<body >
<header class="yoho-header boys">
<a href="javascript:history.go(-1);" class="nav-back"></a>
<a href="http://m.dev.yohobuy.com?go=1" class="nav-home"></a>
<a href="http://m.yohobuy.com?go=1" class="nav-home"></a>
<p class="nav-title">抱歉,页面不存在!</p>
</header>
<div class="err-page yoho-page">
... ...
... ... @@ -14,7 +14,7 @@
}
.help {
padding: 30px 30px;
font-size: 18px;
font-size: 26px;
line-height: 1.5;
color: #444;
}
... ... @@ -35,8 +35,7 @@
</ul>
<p>其他说明:</p>
<ul>
<li>1. YOHO!BUY有货对用户在本站进行晒单评价的文字、图片享有使用权利;</li>
<li>2. 用户所晒单评价的文字、图片提交发布后,默认同步YOHO!SHOW平台;</li>
<li>YOHO!BUY有货对用户在本站进行晒单评价的文字、图片享有使用权利</li>
</ul>
</div>
</body>
... ...
<?php return function ($in, $debugopt = 1) {
$cx = array(
'flags' => array(
'jstrue' => false,
'jsobj' => false,
'spvar' => true,
'prop' => false,
'method' => false,
'mustlok' => true,
'echo' => false,
'debug' => $debugopt,
),
'constants' => array(),
'helpers' => array(),
'blockhelpers' => array(),
'hbhelpers' => array(),
'partials' => array(),
'scopes' => array(),
'sp_vars' => array('root' => $in),
'lcrun' => 'Plugin\LCRun3',
);
return '<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>'.Plugin\LCRun3::debug('[staticTitle]', 'encq', $cx, Plugin\LCRun3::debug('[staticTitle]', 'v', $cx, $in, array('staticTitle'))).'</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<style>
*{margin: 0;padding: 0;}
#coupon-container {width: 100%;}
#coupon-container img {width: 100%; height: auto; display: block;overflow: hidden;}
.img-box {width: 100%;position: relative;}
.img-box .href {width: 50%; height: 100%;position: absolute;top: 0;}
.img-box .href-left {left: 0}
.img-box .href-right {right: 0}
.img-box .href-center {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;}
.show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;}
.yoho-tip {
position: fixed;
display: none;
text-align: center;
width: 70%;
padding: 34px 0;
top: 50%;
left: 50%;
margin-left: -35%;
margin-top: -45px;
background-color: #000;
opacity: 0.9;
color: #fff;
font-size: 18px;
border: none;
border-radius: 10px;
}
</style>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
</head>
<body>
<div class="coupon-container" id="coupon-container" param="'.Plugin\LCRun3::debug('[activityId]', 'encq', $cx, Plugin\LCRun3::debug('[activityId]', 'v', $cx, $in, array('activityId'))).'" isLogged="'.Plugin\LCRun3::debug('[isLogged]', 'encq', $cx, Plugin\LCRun3::debug('[isLogged]', 'v', $cx, $in, array('isLogged'))).'">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/01.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/02.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/03.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/04.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/05.jpg">
<a class="href href-right" href="'.Plugin\LCRun3::debug('[url_yohope]', 'encq', $cx, Plugin\LCRun3::debug('[url_yohope]', 'v', $cx, $in, array('url_yohope'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/06.jpg">
<a class="href href-center" href="'.Plugin\LCRun3::debug('[url_mycoupon]', 'encq', $cx, Plugin\LCRun3::debug('[url_mycoupon]', 'v', $cx, $in, array('url_mycoupon'))).'"></a>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-2.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/07.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/08.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_more]', 'encq', $cx, Plugin\LCRun3::debug('[url_more]', 'v', $cx, $in, array('url_more'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/09.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16567"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/10.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/11.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_4]', 'encq', $cx, Plugin\LCRun3::debug('[url_4]', 'v', $cx, $in, array('url_4'))).'"></a>
<a class="href href-right" href="'.Plugin\LCRun3::debug('[url_343]', 'encq', $cx, Plugin\LCRun3::debug('[url_343]', 'v', $cx, $in, array('url_343'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/12.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16547"></span>
<span class="href href-right get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16549"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/13.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_230]', 'encq', $cx, Plugin\LCRun3::debug('[url_230]', 'v', $cx, $in, array('url_230'))).'"></a>
<a class="href href-right" href="'.Plugin\LCRun3::debug('[url_536]', 'encq', $cx, Plugin\LCRun3::debug('[url_536]', 'v', $cx, $in, array('url_536'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/14.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16551"></span>
<span class="href href-right get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16553"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/15.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_847]', 'encq', $cx, Plugin\LCRun3::debug('[url_847]', 'v', $cx, $in, array('url_847'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/16.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16555"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/17.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/18.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_868]', 'encq', $cx, Plugin\LCRun3::debug('[url_868]', 'v', $cx, $in, array('url_868'))).'"></a>
<a class="href href-right" href="'.Plugin\LCRun3::debug('[url_1026]', 'encq', $cx, Plugin\LCRun3::debug('[url_1026]', 'v', $cx, $in, array('url_1026'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/19.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16557"></span>
<span class="href href-right get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16559"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/20.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_570]', 'encq', $cx, Plugin\LCRun3::debug('[url_570]', 'v', $cx, $in, array('url_570'))).'"></a>
<a class="href href-right" href="'.Plugin\LCRun3::debug('[url_778]', 'encq', $cx, Plugin\LCRun3::debug('[url_778]', 'v', $cx, $in, array('url_778'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/21.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16561"></span>
<span class="href href-right get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16563"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/22.jpg">
<a class="href href-left" href="'.Plugin\LCRun3::debug('[url_517]', 'encq', $cx, Plugin\LCRun3::debug('[url_517]', 'v', $cx, $in, array('url_517'))).'"></a>
</div>
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/23.jpg">
<span class="href href-left get-coupon" href="'.Plugin\LCRun3::debug('[jumpUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jumpUrl]', 'v', $cx, $in, array('jumpUrl'))).'" param="16565"></span>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-1.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-2.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/24-1.jpg">
<div class="img-box">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/24-2.jpg">
<a class="show-more" href="'.Plugin\LCRun3::debug('[url_help]', 'encq', $cx, Plugin\LCRun3::debug('[url_help]', 'v', $cx, $in, array('url_help'))).'"></a>
</div>
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/24-3.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/line-2.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/25.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/26.jpg">
<img src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/img/newuser/27.jpg">
</div>
<script type="text/javascript" src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/js/jquery.min.js"></script>
<script type="text/javascript" src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/cuxiao/js/newuser/coupon.js"></script>
</body>
</html>';
}
?>
\ No newline at end of file
... ...
... ... @@ -376,8 +376,8 @@ class AbstractAction extends Controller_Abstract
* 设置网站SEO的描述内容
*
* @param string $description 描述内容
* @param string $sign 连接的字符串
* @param bool $showMore 是否显示更多内容
* @param string $sign 连接的字符串
* @return void
*/
protected function setDescription($description, $showMore = true, $sign = ' ')
... ...
... ... @@ -23,15 +23,17 @@ class Yohobuy
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL = 'http://apih5.yoho.cn/';
const API_URL2 = 'http://apih5.yoho.cn/';
const SERVICE_URL = 'http://serviceh5.yoho.cn/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// /* 测试环境 */
const API_URL = 'http://testapi.yoho.cn:28078/';
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://test2.open.yohobuy.com/';
/**
* 私钥列表
... ...
... ... @@ -38,7 +38,7 @@ class HelpData
$param['code'] = $code;
$param['return_type'] = 'html';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param, true);
return Yohobuy::post(Yohobuy::API_OLD, $param, true);
}
... ...
... ... @@ -135,5 +135,20 @@ class OrderData
//调用接口获得数据
return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param);
}
/*
* 微信支付签名
*/
public static function weixinPaySign($orderCode)
{
//构建必传参数
$param['private_key'] = 'adbf5a778175ee757c34d0eba4e932bc';
$param['order_code'] = $orderCode;
$param['payment_code'] = 19;
$param['app_key'] = 'adbf5a778175ee75';
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get('http://pay.yohobuy.com/payment/data.html', $param);
}
}
... ...
... ... @@ -19,16 +19,18 @@ class BindData
/**
* 绑定前检查
*
* @param string $mobile 绑定输入手机号
* @param string $openId 第三方唯一识别码
* @param string $sourceType 登录方式 qq,sina,alipay,wechat
* @param string $mobile 绑定输入手机号
* @return array 登录返回结果
* @param int $area 所在地区
* @return array 登录返回结果
*/
public static function bindCheck($mobile, $openId, $sourceType)
public static function bindCheck($mobile, $openId, $sourceType, $area)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.check';
$param['area'] = $area;
$param['mobile'] = $mobile;
$param['open_id'] = $openId;
$param['source_type'] = $sourceType;
... ... @@ -45,7 +47,6 @@ class BindData
public static function sendBindMsg($area, $mobile)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.smsbind';
$param['mobile'] = $mobile;
$param['area'] = $area;
... ... @@ -61,7 +62,6 @@ class BindData
public static function checkBindCode($area, $mobile, $code)
{
$param = Yohobuy::param();
$param['method'] = 'app.register.validRegCode';
$param['mobile'] = $mobile;
$param['code'] = $code;
... ... @@ -73,34 +73,36 @@ class BindData
/**
* 第三方绑定手机号
* @param string $nickname 姓名
*
* @param string $openId 第三方唯一识别码
* @param string $nickname 姓名
* @param string $sourceType 登录方式
* @param string $mobile 手机号
* @param string $area 国别码
* @param string $password 密码
*/
public static function bindMobile($openId, $nickname, $sourceType, $mobile, $area, $password = '')
public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '')
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.bind';
$param['mobile'] = $mobile;
$param['open_id'] = $openId;
$param['nickname'] = $nickname;
$param['source_type'] = $sourceType;
$param['area'] = $area;
if (!empty($nickname))
{
$param['nickname'] = $nickname;
}
if (!empty($password))
{
$param['password'] = $password;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 换绑手机检验
* @param string $mobile 手机号
... ... @@ -109,23 +111,20 @@ class BindData
public static function changeCheck($mobile, $area)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.changeCheck';
$param['mobile'] = $mobile;
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 换绑手机
* @param string $uid 用户Id
* @param string $code 验证码
* @param string $mobile 手机号
* @param string $area 国别码
* @param string $code 验证码
*/
public static function changeMobile($uid, $mobile, $area, $code)
{
... ... @@ -136,11 +135,9 @@ class BindData
$param['uid'] = $uid;
$param['code'] = $code;
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}
... ...
... ... @@ -24,15 +24,20 @@ class LoginData
* @param string $area 地区编号
* @param string $profile 邮箱或手机号
* @param string $password 密码
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
* @return array
*/
public static function signin($area, $profile, $password)
public static function signin($area, $profile, $password, $shoppingKey = null)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.signin';
$param['area'] = $area;
$param['profile'] = $profile;
$param['password'] = $password;
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
... ... @@ -59,9 +64,10 @@ class LoginData
* @param string $nickname 姓名
* @param string $openId 第三方唯一识别码
* @param string $sourceType 登录方式
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
* @return array 登录返回结果
*/
public static function signinByOpenID($nickname, $openId, $sourceType)
public static function signinByOpenID($nickname, $openId, $sourceType, $shoppingKey = null)
{
// 构建必传参数
$param = Yohobuy::param();
... ... @@ -70,6 +76,10 @@ class LoginData
$param['openId'] = $openId;
$param['source_type'] = $sourceType;
$param['nickname'] = $nickname;
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
... ...
... ... @@ -129,7 +129,8 @@ class Helpers
*/
public static function getShoppingKeyByCookie()
{
$cookie = isset($_COOKIE['_Spk']) ? $_COOKIE['_Spk'] : '';
$cookie = isset($_COOKIE['_SPK']) ? $_COOKIE['_SPK'] : '';
return $cookie;
}
... ... @@ -190,7 +191,7 @@ class Helpers
*/
public static function transPrice($price)
{
return (!empty($price) && !is_float($price)) ? $price . '.00' : number_format($price, 2, '.', '');
return number_format($price, 2, '.', '');
}
/**
... ... @@ -441,6 +442,7 @@ class Helpers
* 验证国际手机号是否合法
*
* @param string $areaMobile
* @param int $area
* @return boolean
*/
public static function verifyAreaMobile($areaMobile, $area)
... ... @@ -574,15 +576,19 @@ class Helpers
$oneGoods['id'] = $value['product_sku'];
$oneGoods['skn'] = $value['product_skn'];
$oneGoods['name'] = $value['product_name'];
$oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : '';
$oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 120, 160) : '';
$oneGoods['color'] = $value['color_name'];
$oneGoods['size'] = $value['size_name'];
$oneGoods['checked'] = $value['selected'] === 'Y';
$oneGoods['price'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['last_vip_price']);
$oneGoods['isVipPrice'] = $value['sales_price'] !== $value['last_vip_price'];
$oneGoods['count'] = $value['buy_number'];
if ($isValid) { // 库存不足
if ($isValid) {
// 库存不足
$oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']);
} else { // 失效商品
$oneGoods['inValid'] = true;
}
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
... ... @@ -590,9 +596,13 @@ class Helpers
$oneGoods['inValid'] = true;
} elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
$oneGoods['isGift'] = true;
$oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['last_price']);
} elseif ($value['goods_type'] == 'price_gift') {
$oneGoods['showCheckbox'] = true;
$oneGoods['isAdvanceBuy'] = true;
$oneGoods['salesPrice'] = self::transPrice($value['sales_price']);
$oneGoods['price'] = self::transPrice($value['last_price']);
} else {
$oneGoods['showCheckbox'] = true;
}
... ... @@ -629,6 +639,7 @@ class Helpers
$gift['promotionTitle'] = $value['promotion_title'];
foreach ($value['goods_list'] as $single) {
$oneGoods = array();
$oneGoods['id'] = $single['product_skn'];
$oneGoods['name'] = $single['product_name'];
$oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : '';
... ... @@ -735,7 +746,7 @@ class Helpers
public static function syncUserSession($uid, $refer = '', $callback = 'call')
{
return 'http://mapi.yohobuy.com/Passport/session/index?callback=' . $callback
. '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer;
. '&sign=' .md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer;
}
/**
... ...
... ... @@ -4828,19 +4828,28 @@ function hiddenTips($ele) {
}
}
function isFlexSupport() {
var flex = document.createElement('p').style.flex,
webkitFlex = document.createElement('p').style.webkitFlex,
flexWrap = document.createElement('p').style.flexWrap;
if ((flex === '' || webkitFlex === '') && flexWrap === '') {
return true;
} else {
return false;
}
//function isFlexSupport() {
// var flex = document.createElement('p').style.flex,
// webkitFlex = document.createElement('p').style.webkitFlex,
// flexWrap = document.createElement('p').style.flexWrap;
//
// if ((flex === '' || webkitFlex === '') && flexWrap === '') {
// return true;
// } else {
// return false;
// }
//}
function wrapElements(selector, count) {
$(selector).each(function(idx, el) {
if (idx % count === 0) {
$($(selector).slice(idx, idx + count)).wrapAll($('<div class="js-wraper"></div>'));
}
});
}
function search() {
if (searching || end) {
return;
... ... @@ -4875,9 +4884,10 @@ function search() {
hiddenTips($('#size-swiper-container'));
hiddenTips($('#reference-swiper-container'));
if (!isFlexSupport()) {
$('.detail .column').removeClass('column').addClass('oldbox');
}
//if (!isFlexSupport()) {
// $('.detail .column').removeClass('column').addClass('oldbox');
//}
wrapElements('.detail .column', 2);
searching = false;
end = true;
loading.hideLoadingMask();
... ... @@ -5778,9 +5788,6 @@ function loadData($parent, url, page) {
page: page
},
success: function(data) {
//setTimeout(function() { //模拟延时
if (url === 'favBrand') {
$brandLoadMore.addClass('hide');
} else {
... ... @@ -5793,7 +5800,6 @@ function loadData($parent, url, page) {
} else if (data === 'end') {
$parent.closest('.fav-type').find('.fav-load-background')
.removeClass('fav-load-background').html('没有更多了');
} else if (data.length > 10) {
$parent.append(data);
$parent.closest('.fav-type').find('.fav-content-loading').remove();
... ... @@ -5804,14 +5810,8 @@ function loadData($parent, url, page) {
} else {
lockId = false;//请求成功后解锁商品收藏page++
}
window.rePosFooter();
} else {
return;
}
//},1000);
window.rePosFooter();
}
});
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
Created by FontForge 20120731 at Mon Dec 21 17:16:11 2015
By Ads
</metadata>
<defs>
... ... @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -224 3943 833"
bbox="-0.75 -224 3943 893"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E63F"
unicode-range="U+0078-E641"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -257,5 +257,16 @@ d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 1
q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
<glyph glyph-name="uniE640" unicode="&#xe640;"
d="M957 510q-5 8 -14 13.5t-24 5.5h-598l-29 62l-4 7q-1 3 -4 7t-8 8q-4 3 -7 6l-2 1l-8 4h-2q-5 2 -9 2l-4 1h-5h-118q-23 0 -40 -16.5t-17 -40.5q0 -6 1.5 -12.5t4.5 -12.5t7 -10.5t8.5 -8.5t10.5 -7t12.5 -4.5t12.5 -1.5h81l33 -71q3 -10 8 -21t8 -17l3 -5l81 -181
q0 -2 2 -5l15 -32q9 -30 39 -38v-3h392l18 1v2q14 4 24.5 14t14.5 24l98 217q40 77 19 112zM909 413l-93 -207l-3 1l-4 -15q-5 -19 -25 -19l-19 1v-1h-340h-18q-8 0 -15 5t-9 14l-4 15l-3 -1l-93 208q-1 1 -3.5 5.5t-7 14.5t-7.5 20l-42 92h-102q-10 0 -17 7t-7 17
q0 7 3 12.5t9 9t12 3.5h119l3 -1h2q1 0 2 -1l4 -2q2 -1 4 -3q1 -1 2 -1.5t1 -1.5l4 -6l38 -83h619q8 0 10 -3q3 -6 1 -19t-7.5 -29.5t-13.5 -31.5zM470 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23z
M470 -23q-21 0 -36 15t-15 36t15 36t36 15q14 0 25.5 -7t18.5 -19t7 -25q0 -22 -15 -36.5t-36 -14.5zM747 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23zM747 -23q-14 0 -26 6.5t-18.5 18.5t-6.5 25.5
t6.5 25.5t18.5 19t26 7q21 0 36 -15t15 -36t-15 -36t-36 -15z" />
<glyph glyph-name="uniE641" unicode="&#xe641;" horiz-adv-x="1045"
d="M522 893q-103 0 -197 -40t-162 -108t-108.5 -162t-40.5 -197.5t40.5 -197.5t108.5 -162t162 -108t197.5 -40t197.5 40t162 108t108 162t40 197.5t-40 197.5t-108 162t-162 108t-198 40zM522 -49q-88 0 -168.5 34.5t-138.5 93t-92.5 138.5t-34.5 168.5t34.5 169
t92.5 138.5t138.5 92.5t169 34.5t168.5 -34.5t138.5 -92.5t93 -138.5t34.5 -169t-34.5 -168.5t-93 -138.5t-138.5 -93t-169 -34.5zM775 268l-105 61q-11 4 -21 6.5t-18 2.5t-15 -0.5t-13 -4t-10 -5.5t-9 -6l-6 -7q-2 -2 -6 -7l-3 -4l-6 -10q-34 -4 -59 21l-51 50
q-24 25 -20 60l9 4q3 5 16 16t17 18t4 25t-11 43h-1l-60 105q-8 13 -20.5 20t-26 7t-27.5 -7l-62 -36q-3 -1 -6 -4l-6 -6l-6 -6q-3 -3 -5.5 -6t-4.5 -5t-3 -4l-1 -1q-14 -87 24.5 -183.5t121.5 -174.5q72 -68 157 -101.5t165 -29.5q4 1 10.5 2.5t20.5 10t21 20.5l36 62
q11 20 5.5 41.5t-25.5 32.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015
Created by FontForge 20120731 at Mon Dec 21 17:16:11 2015
By Ads
</metadata>
<defs>
... ... @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Thu Dec 17 13:53:30 2015
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -224 3943 833"
bbox="-0.75 -224 3943 893"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E640"
unicode-range="U+0078-E641"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -263,5 +263,10 @@ q0 -2 2 -5l15 -32q9 -30 39 -38v-3h392l18 1v2q14 4 24.5 14t14.5 24l98 217q40 77 1
q0 7 3 12.5t9 9t12 3.5h119l3 -1h2q1 0 2 -1l4 -2q2 -1 4 -3q1 -1 2 -1.5t1 -1.5l4 -6l38 -83h619q8 0 10 -3q3 -6 1 -19t-7.5 -29.5t-13.5 -31.5zM470 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23z
M470 -23q-21 0 -36 15t-15 36t15 36t36 15q14 0 25.5 -7t18.5 -19t7 -25q0 -22 -15 -36.5t-36 -14.5zM747 107q-33 0 -56.5 -23t-23.5 -56q0 -22 10.5 -40.5t29 -29t40.5 -10.5q33 0 56.5 23.5t23.5 56.5t-23.5 56t-56.5 23zM747 -23q-14 0 -26 6.5t-18.5 18.5t-6.5 25.5
t6.5 25.5t18.5 19t26 7q21 0 36 -15t15 -36t-15 -36t-36 -15z" />
<glyph glyph-name="uniE641" unicode="&#xe641;" horiz-adv-x="1045"
d="M522 893q-103 0 -197 -40t-162 -108t-108.5 -162t-40.5 -197.5t40.5 -197.5t108.5 -162t162 -108t197.5 -40t197.5 40t162 108t108 162t40 197.5t-40 197.5t-108 162t-162 108t-198 40zM522 -49q-88 0 -168.5 34.5t-138.5 93t-92.5 138.5t-34.5 168.5t34.5 169
t92.5 138.5t138.5 92.5t169 34.5t168.5 -34.5t138.5 -92.5t93 -138.5t34.5 -169t-34.5 -168.5t-93 -138.5t-138.5 -93t-169 -34.5zM775 268l-105 61q-11 4 -21 6.5t-18 2.5t-15 -0.5t-13 -4t-10 -5.5t-9 -6l-6 -7q-2 -2 -6 -7l-3 -4l-6 -10q-34 -4 -59 21l-51 50
q-24 25 -20 60l9 4q3 5 16 16t17 18t4 25t-11 43h-1l-60 105q-8 13 -20.5 20t-26 7t-27.5 -7l-62 -36q-3 -1 -6 -4l-6 -6l-6 -6q-3 -3 -5.5 -6t-4.5 -5t-3 -4l-1 -1q-14 -87 24.5 -183.5t121.5 -174.5q72 -68 157 -101.5t165 -29.5q4 1 10.5 2.5t20.5 10t21 20.5l36 62
q11 20 5.5 41.5t-25.5 32.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
* {
margin: 0;
padding: 0;
}
.coupon-christmas img {
display: block;
max-width: 100%;
}
.coupon-top {
position: relative;
}
.coupon-top .go-check {
position: absolute;
top: 5.325rem;
width: 100%;
height: 10.5rem;
}
.coupon-top .share-btn {
position: absolute;
width: 14.125rem;
height: 2.525rem;
bottom: 2.575rem;
left: 50%;
margin: 0 0 0 -7.0625rem;
}
.coupon-top .wyf {
position: absolute;
width: 5.95rem;
right: 0;
top: 0.1rem;
}
.coupon-bottom {
height: 11rem;
background: url(../../img/christmas/02/bottom-bg.png) no-repeat bottom center;
background-size: 100% auto;
}
.coupon-banner {
position: relative;
height: 7.675rem;
}
.banner-btn {
position: absolute;
width: 100%;
height: 1.775rem;
bottom: 0;
font-size: 0;
text-align: center;
}
.banner-btn a{
display: inline-block;
height: 100%;
}
.banner-btn .boy {
width: 3.525rem;
}
.banner-btn .girl {
width: 3.35rem;
}
.banner-btn .life {
width: 4.025rem;
}
.banner-btn .kid {
width: 3.25rem;
}
.bottom-btn {
position: relative;
width: 13.725rem;
height: 1.725rem;
margin: 0.875rem auto 0;
font-size: 0;
}
.bottom-btn a{
position: absolute;
top: 0;
width: 8.2rem;
height: 100%;
}
.bottom-btn a.follow-yoho {
width: 5.275rem;
left: 0;
}
.bottom-btn a.download-yoho {
right: 0;
}
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(../../img/christmas/02/share-2.png) center top no-repeat;
-webkit-background-size: 100%;
-moz-background-size: 100%;
background-size: 100%;
display: none;
}
.has-done {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.4) url(../../img/christmas/02/11.png);
background-repeat: no-repeat;
background-size: 80% auto;
background-position: center center;
overflow: hidden;
display: none;
}
.dialog-box {
display: none;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.4);
z-index: 999;
}
.dialog-inner {
position: absolute;
width: 13.375rem;
height: 9.625rem;
top: 50%;
left: 50%;
margin: -4.8125rem 0 0 -6.6875rem;
}
.dialog-inner img {
max-width: 100%;
}
.dialog-inner span {
position: absolute;
width: 8.225rem;
height: 1.85rem;
bottom: 1.475rem;
left: 50%;
margin: 0 0 0 -4.1125rem;
cursor: pointer;
}
\ No newline at end of file
... ...
... ... @@ -5,28 +5,108 @@
*/
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
ellipsis = require('mlellipsis'),
Hammer = require('yoho.hammer');
var chosePanel = require('./chose-panel'),
dialog = require('../me/dialog'),
tip = require('../plugin/tip');
var $cartContent = $('.cart-content');
var $cartContent = $('.cart-content'),
cartType = $('#cartType').val(),
$cartNav = $('.cart-nav'),
hasShowCartPresellTip = false;
var navHammer,
cartType = $('#cartType').val();
var hasChecked = $('.cart-goods .icon-cb-checked').length > 0 ? true : false; //是否有选中商品
advanceBuyHammer,
freebieHammer,
switchChose = false;
require('../product/recommend-for-you');
require('./good');
lazyLoad($('img.lazy'));
ellipsis.init();
function cartContentShow() {
return $cartContent.not('.hide');
}
function mlellipsisHiddenNames() {
cartContentShow().find('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
switchChose = true;
}
function hasChecked() {
return cartContentShow().find('.cart-goods .icon-cb-checked').length > 0 ? true : false;
}
function shouldSelectGift() {
var $freebie = cartContentShow().find('.freebie');
if ($freebie.length <= 0) {
return false;
}
return true;
}
function shouldLowStocks() {
var $lowStocks,
result = false;
if ('ordinary' === cartType) {
$lowStocks = $('.common .low-stocks');
} else if ('advance' === cartType) {
$lowStocks = $('.presell .low-stocks');
}
if ($lowStocks.length <= 0) {
return result;
}
$lowStocks.each(function(idx, item) {
if ($(item).parent().parent().parent().siblings('.checkbox').hasClass('icon-cb-checked')) {
result = true;
return false;
}
});
return result;
}
function showChooseGifDialog() {
dialog.showDialog({
dialogText: '您还未选择赠品,是否去选择赠品',
hasFooter: {
leftBtnText: '我不要赠品',
rightBtnText: '去选择'
}
}, function() {
window.location.href = cartContentShow().find('.freebie > a').attr('href');
}, function() {
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
});
}
if (typeof window.cookie === 'function' && 'y' === window.cookie('_hasShowCartPresellTip')) {
$('#presell-tip').removeClass('show').addClass('hide');
hasShowCartPresellTip = true;
} else {
$('#presell-tip').removeClass('hide').addClass('show');
}
if ('advance' === cartType) {
$cartContent.toggleClass('hide');
$('#common-cart-nav').removeClass('active');
$('#presell-cart-nav').addClass('active');
mlellipsisHiddenNames();
$(window).trigger('scroll');
}
if ($('.cart-nav').length > 0) {
if ($cartNav.length > 0) {
navHammer = new Hammer(document.getElementsByClassName('cart-nav')[0]);
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('li');
... ... @@ -37,8 +117,10 @@ if ($('.cart-nav').length > 0) {
if (cartType === 'ordinary') {
cartType = 'advance';
$('#cartType').val('advance');
} else {
cartType = 'ordinary';
$('#cartType').val('ordinary');
}
$this.siblings('.active').removeClass('active');
... ... @@ -47,25 +129,48 @@ if ($('.cart-nav').length > 0) {
//切换普通商品和预售商品购物车显示
$cartContent.toggleClass('hide');
if (switchChose === false) {
mlellipsisHiddenNames();
}
//trigger lazyload
$(window).trigger('scroll');
});
setTimeout(function() {
$('#presell-tip').addClass('hide');
}, 3000);
if (!hasShowCartPresellTip) {
setTimeout(function() {
$('#presell-tip').removeClass('show').addClass('hide');
window.setCookie('_hasShowCartPresellTip', 'y');
}, 3000);
}
}
$('.advance-buy').on('touchend', function() {
window.location.href = '/cart/index/advanceBuy?cartType=' + cartType;
});
if ($('.advance-buy').length > 0) {
advanceBuyHammer = new Hammer(document.getElementsByClassName('advance-buy')[0]);
advanceBuyHammer.on('tap', function(e) {
window.location.href = '/cart/index/advanceBuy?cartType=' + cartType;
});
}
$('.freebie').on('touchend', function() {
window.location.href = '/cart/index/gift?cartType=' + cartType;
});
if ($('.freebie').length > 0) {
freebieHammer = new Hammer(document.getElementsByClassName('freebie')[0]);
freebieHammer.on('tap', function(e) {
window.location.href = '/cart/index/gift?cartType=' + cartType;
});
}
$('.btn-balance').on('touchend', function() {
if (hasChecked) {
if (shouldLowStocks()) {
tip.show('所选商品中含有库存不足的商品');
return false;
}
if (shouldSelectGift()) {
showChooseGifDialog();
return false;
}
if (hasChecked()) {
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
} else {
tip.show('请先勾选商品');
... ... @@ -73,25 +178,14 @@ $('.btn-balance').on('touchend', function() {
});
$('.chose').on('touchend', function() {
//var id = $(this).closest('.gift-advance-good').data('id');
chosePanel.show();
});
if ($('.cart-zero').length > 0) {
require('../product/recommend-for-you');
}
function notAllowScroll() {
var docH = $(document).height(),
winH = $(window).height();
if (docH - winH <= 10) {
$('body').css('overflow', 'hidden');
}
}
notAllowScroll();
$cartNav.on('touchstart', 'li', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$cartNav.find('li').removeClass('bytouch');
});
//提前触发lazyload
$(window).scrollTop(1).scrollTop(0);
... ...
... ... @@ -18,6 +18,7 @@ var $chosePanel = $('#chose-panel'),
$chosed,
$imgsThumb,
$leftNum,
$leftNumHtml,
leftNum,
confirming,
curColorIndex,
... ... @@ -31,6 +32,7 @@ var $chosePanel = $('#chose-panel'),
queryString,
$yohoPage = $('.yoho-page');
//初始化购物车面板显示
function init() {
hasChooseColor = false;
... ... @@ -41,6 +43,7 @@ function init() {
$allChoseItems = $('.chose-items');
$sizeRowList = $('.size-list ul');
$leftNum = $('#left-num');
$leftNumHtml =
$sizeRowList.eq(0).toggleClass('hide');
}
... ... @@ -58,7 +61,19 @@ function checkColorSizeNum() {
return true;
}
function show(html, cb) {
var scrollPosition = [
document.documentElement.scrollLeft || document.body.scrollLeft,
document.documentElement.scrollTop || document.body.scrollTop
],
$html = $('html'); // it would make more sense to apply this to body, but IE7 won't have that
$html.data('scroll-position', scrollPosition);
$html.data('previous-overflow', $html.css('overflow'));
$html.css('overflow', 'hidden');
window.scrollTo(scrollPosition[0], scrollPosition[1]);
if (html) {
$chosePanel.html(html);
if ($('#promotionId').val() !== '') {
... ... @@ -68,15 +83,19 @@ function show(html, cb) {
init();
}
$('.chose-panel').show();
$('body').css('overflow', 'hidden');
$num = $('#good-num');
cbFn = cb;
}
//隐藏当前Panel
function hide() {
var $html = $('html'),
scrollPosition = $html.data('scroll-position');
// un-lock scroll position
$html.css('overflow', $html.data('previous-overflow'));
window.scrollTo(scrollPosition[0], scrollPosition[1]);
$('.chose-panel').hide();
$('body').css('overflow', 'auto');
}
//修改加入购物车的文字和背景
... ... @@ -117,7 +136,7 @@ function resetColorZeroStock($siblingBlock) {
// 选择了颜色切换商品图片
function changeGoodImgWhenClickColor() {
if (hasChooseColor && curColorIndex) {
if (hasChooseColor && curColorIndex >= 0) {
$imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide');
}
}
... ... @@ -204,12 +223,13 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
// 当前颜色块 切换勾选样式
$this.toggleClass('chosed');
curColorIndex = index;
// 设置按钮的样式和文字
updateConformButtonClassAndText();
$('#good-num').val(1);
// 修改颜色时修改商品图片
changeGoodImgWhenClickColor();
// 设置按钮的样式和文字
updateConformButtonClassAndText();
}).on('touchstart', '.size-list .block', function() {
var $this = $(this),
index,
... ... @@ -229,11 +249,12 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$allChoseItems.find('.num .left-num').html('');
$('#left-num').val(0);
hasChooseSize = false;
curSizeIndex = null;
$curSizeBlock = null;
// 当前尺码不是选中状态,选中时
} else {
hasChooseSize = true;
curGoodNum = $this.data('num');
// 之前选中的尺码去掉勾选样式
... ... @@ -250,17 +271,21 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
$('#left-num').val(0);
}
if (curGoodNum === 0 && hasChooseColor) {
$this.addClass('zero-stock');
}
curSizeIndex = index;
$curSizeBlock = $this;
}
$this.toggleClass('chosed');
curSizeIndex = index;
$curSizeBlock = $this;
// 设置按钮的样式和文字
updateConformButtonClassAndText();
$('#good-num').val(1);
// 重置颜色块的样式
resetColorZeroStock($siblingBlock);
// 设置按钮的样式和文字
updateConformButtonClassAndText();
});
$yohoPage.on('touchstart', '.btn-minus', function() {
... ... @@ -273,6 +298,11 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
if (num === 1 || 0 === leftNum - 0) {
tip.show('您选择的数量不能为零~');
return;
}
if (num < 0) {
tip.show('您选择的数量不能为负数~');
return;
}
... ... @@ -286,14 +316,13 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return;
}
if (num - 0 === leftNum || 0 === leftNum) {
return;
}
//TODO:库存数验证
if (num > leftNum) {
$num.val(leftNum);
if (num > leftNum - 1) {
tip.show('您选择的数量超过了最大库存量~');
return;
}
$num.val(num + 1);
... ... @@ -304,30 +333,28 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
promotionId,
isEdit = 0,
numInCart = $('.num-tag').html() - 0,
num = $num.val();
num = parseInt($num.val(), 10);
//颜色尺码没有选择
if (!checkColorSizeNum()) {
return;
}
if (isNaN(num)) {
tip.show('您选择的数量不是一个数字~');
return;
}
//TODO status change
if ($('#chose-btn-sure').html() === '已售罄') {
return;
}
leftNum = $('#left-num').val();
leftNum = $('#left-num').val() - 0;
if (num > leftNum) {
tip.show('您选择的数量超过了最大库存量~');
return;
}
if (num < 0) {
tip.show('您选择的数量小于一件~');
return;
}
$chosed = $('.block-list>ul>li.chosed');
if (2 === $chosed.length && 0 === $chosed.closest('.zero-stock').length) {
... ... @@ -350,9 +377,15 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
cartType: queryString.cartType
}
}).done(function(res) {
var cartNum;
loading.hideLoadingMask();
if (res.code === 200) {
$('.num-tag').html(numInCart + buyNumber).removeClass('hide');
cartNum = res.data.goods_count;
if (cartNum > 99) {
cartNum = '99+';
}
$('.num-tag').html(cartNum).removeClass('hide');
confirming = false;
if (cbFn) {
... ...
... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
Hammer = require('yoho.hammer'),
tip = require('../plugin/tip'),
loading = require('../plugin/loading'),
chosePanel = require('./chose-panel');
... ... @@ -35,10 +36,22 @@ function getProductInfo(skn, promotionId) {
});
}
$page.on('touchend', '.chose', function() {
var $this = $(this),
id = $this.closest('.gift-advance-good').data('id'),
promotionId = $this.closest('.advance-block').data('promotion-id');
$page.find('.chose').each(function(i, elem) {
var choseHammer = new Hammer(elem);
getProductInfo(id, promotionId);
choseHammer.on('tap', function(e) {
var $this = $(e.target),
id = $this.closest('.gift-advance-good').data('id'),
promotionId = $this.closest('.advance-block').data('promotion-id');
getProductInfo(id, promotionId);
});
});
// $page.on('touchend', '.chose', function() {
// var $this = $(this),
// id = $this.closest('.gift-advance-good').data('id'),
// promotionId = $this.closest('.advance-block').data('promotion-id');
//
// getProductInfo(id, promotionId);
// });
... ...
... ... @@ -14,18 +14,26 @@ var dialog = require('../me/dialog'),
orderInfo = require('./order-info').orderInfo;
var $selectAllBtn = $('.balance .checkbox'),
cartType = $('#cartType').val(),
requesting = false;
ellipsis.init();
lazyLoad({
try_again_css: 'good-failure'
try_again_css: 'order-failure'
});
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
setTimeout(function() {
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
}, 0);
function GoodInfo(properties) {
this.goods_type = properties.goods_type;
this.buy_number = properties.buy_number;
this.product_sku = properties.product_sku;
this.selected = properties.selected;
}
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
$('.cart-goods').on('touchstart', '.checkbox', function() {
... ... @@ -34,30 +42,19 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
id = $good.data('id');
var goodsList = [],
goodInfo = {},
isSelected = true;
if ($this.hasClass('icon-cb-checked')) {
isSelected = true;
} else {
isSelected = false;
}
goodInfo = {};
function GoodInfo(properties) {
this.goods_type = properties.goods_type;
this.buy_number = properties.buy_number;
this.product_sku = properties.product_sku;
this.selected = properties.selected;
if (!$this.hasClass('icon-cb-checked') && $this.siblings('.info').find('.low-stocks').length > 0) {
tip.show('库存不足,无法购买');
return false;
}
goodInfo.goods_type = cartType;
goodInfo.selected = isSelected ? 'N' : 'Y';
goodInfo.goods_type = $('#cartType').val();
goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y';
goodInfo.product_sku = id;
goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', '');
goodsList.push(new GoodInfo(goodInfo));
$.ajax({
type: 'post',
url: 'select',
... ... @@ -71,7 +68,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
} else {
$this.removeClass('icon-checkbox').addClass('icon-cb-checked');
}
window.history.go(0);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else if (data.code === 400) {
tip.show('网络异常');
}
... ... @@ -90,8 +87,8 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
rightBtnText: '确定'
}
}, function() {
var id = $this.closest('.shopping-cart-good').data('id');
var count = $this.data('count');
var id = $this.closest('.shopping-cart-good').data('id'),
count = $this.data('count');
$.ajax({
method: 'post',
... ... @@ -109,7 +106,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
});
orderInfo('couponCode', null);
orderInfo('couponName', null);
history.go(0);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else {
tip.show(data.message);
}
... ... @@ -117,7 +114,6 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
tip.show('网络异常');
});
});
});
function requestUpdateAllGoodsCheckStatus(theGoods, successHandeler) {
... ... @@ -138,7 +134,7 @@ function requestUpdateAllGoodsCheckStatus(theGoods, successHandeler) {
tip.show(res.message);
}
},
error: function(err) {
error: function() {
tip.show('网络异常');
},
complete: function() {
... ... @@ -170,21 +166,14 @@ function didUpdateAllGoodsCheckStatus() {
$(checkedBox).removeClass('icon-cb-checked').addClass('icon-checkbox');
});
}
window.history.go(0);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
}
function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
var goodInfo = {};
var $goods = $('.cart-content:not(.hide) .shopping-cart-good');
var $good = null;
var goodsList = [];
function GoodInfo(properties) {
this.goods_type = properties.goods_type;
this.buy_number = properties.buy_number;
this.product_sku = properties.product_sku;
this.selected = properties.selected;
}
var goodInfo = {},
$goods = $('.cart-content:not(.hide) .shopping-cart-good'),
$good = null,
goodsList = [];
goodInfo.goods_type = type;
goodInfo.selected = isSelected ? 'N' : 'Y';
... ... @@ -201,26 +190,24 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
requestUpdateAllGoodsCheckStatus(goodsList, handlerAfterTouch);
}
//是否要全选
function willBeSelected($this) {
var isSelected = true;
if ($this.hasClass('icon-cb-checked')) {
isSelected = true;
} else {
isSelected = false;
}
return isSelected;
}
//全选按钮点击事件
$selectAllBtn.on('touchend', function() {
var $this = $(this);
var cartType = $('#cartType').val(),
isSelect = $(this).hasClass('icon-cb-checked');
if ('ordinary' === cartType) {
if (!isSelect && $('.common .low-stocks').length > 0) {
tip.show('所选商品中含有库存不足的商品');
return false;
}
} else if ('advance' === cartType) {
if (!isSelect && $('.presell .low-stocks').length > 0) {
tip.show('所选商品中含有库存不足的商品');
return false;
}
}
bottomCheckBoxHandeler(willBeSelected($this), cartType, didUpdateAllGoodsCheckStatus);
bottomCheckBoxHandeler(isSelect, cartType, didUpdateAllGoodsCheckStatus);
});
$('.down').on('touchend', function() {
... ...
... ... @@ -23,7 +23,8 @@ var dispatchModeHammer,
payType,
priceTmpl = Handlebars.compile($('#tmpl-price').html()),
queryString = $.queryString(),
orderInfo = order.orderInfo;
orderInfo = order.orderInfo,
isSubmiting;
lazyLoad();
... ... @@ -93,21 +94,18 @@ function orderCompute() {
}).then(function(res) {
var priceHtml;
if (!res) {
tip.show('网络出错');
if ($.type(res) !== 'object') {
window.location.reload();
} else {
/*if (res.order_amount) {
res.order_amount = (+res.order_amount).toFixed(2);
}
if (res.discount_amount) {
res.discount_amount = (+res.discount_amount).toFixed(2);
}*/
if (res.last_order_amount) {
res.last_order_amount = (+res.last_order_amount).toFixed(2);
}
$coinCheck.find('em').html('- ¥ ' + res.use_yoho_coin);
$coinUsed.html('已抵¥' + res.use_yoho_coin);
if (res.use_yoho_coin) {
$coinCheck.find('em').html('- ¥ ' + res.use_yoho_coin);
$coinUsed.html('已抵¥' + res.use_yoho_coin);
$coinCheck.find('em').show();
$coinUsed.show();
}
priceHtml = priceTmpl({
cartPayData: res.promotion_formula_list,
price: res.last_order_amount
... ... @@ -116,7 +114,6 @@ function orderCompute() {
$price.html(priceHtml);
}
}).fail(function() {
tip.show('网络出错');
window.location.reload();
});
}
... ... @@ -125,6 +122,13 @@ function submitOrder() {
var invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
msg = $('#msg').find('input').val() || orderInfo('msg');
if (orderInfo('deliveryId') === 2 && !$addressWrap.data('support')) {
tip.show('当前地址不支持顺丰快递');
return;
}
if (isSubmiting) {
return false;
}
if (orderInfo('invoice')) {
if (!invoiceText) {
tip.show('请输入发票抬头');
... ... @@ -142,6 +146,7 @@ function submitOrder() {
}
}
loading.showLoadingMask();
isSubmiting = true;
$.ajax({
method: 'POST',
url: '/cart/index/orderSub',
... ... @@ -163,7 +168,6 @@ function submitOrder() {
var url;
if (!res) {
loading.hideLoadingMask();
tip.show('网络出错');
return;
}
... ... @@ -177,13 +181,14 @@ function submitOrder() {
}
window.setCookie('order-info', '');
window.location.href = url;
} else {
loading.hideLoadingMask();
tip.show(res.message || '网络出错');
} else if (res.message) {
tip.show(res.message);
}
}).fail(function() {
loading.hideLoadingMask();
tip.show('网络出错');
}).always(function() {
isSubmiting = false;
loading.hideLoadingMask();
});
}
... ... @@ -215,9 +220,7 @@ $('.coin').on('touchend', function() {
if ($this.find('.checkbox').hasClass('icon-cb-checked')) {
orderInfo('yohoCoin', $this.data('yoho-coin'));
$this.find('.coin-check em').show();
$this.find('.can-use').hide();
$this.find('.used').show();
} else {
orderInfo('yohoCoin', 0);
$this.find('.coin-check em').hide();
... ... @@ -251,3 +254,7 @@ $('.pay-mode').on('click', 'li', function() {
payType = $this.data('pay-type');
submitOrder();
});
$('form').on('submit', function() {
return false;
});
... ...
... ... @@ -15,8 +15,8 @@ $('.address-item').on('touchend', function() {
}).on('touchend', '.edit', function() {
window.location.href = $(this).data('href');
return false;
}).on('touchend', '.del', function() {
deleteId = $(this).data('address-id');
}).on('touchstart', '.del', function() {
deleteId = $(this).data('id');
});
$confim.on('touchend', '.confim', function() {
... ...
... ... @@ -70,6 +70,16 @@ $('#coupon-list').on('touchend', '.employ-main', function() {
orderInfo('couponCode', $this.data('coupon-code'));
orderInfo('couponName', $this.data('coupon-name'));
}).on('touchstart', '.employ-main', function() {
var $this = $(this);
$this.siblings().removeClass('focus');
$this.addClass('focus');
}).on('touchend touchcancel', '.employ-main', function() {
var $this = $(this);
$this.siblings().removeClass('focus');
$this.removeClass('focus');
});
$('body').on('touchend', '.not-use', function() {
... ... @@ -181,8 +191,8 @@ function getCouponDate() {
getCouponDate();
$(window).scroll(function() {
if ($(window).scrollTop() + $(window).height() > $('body').height() * 0.9) {
getCouponDate();
}
});
// $(window).scroll(function() {
// if ($(window).scrollTop() + $(window).height() > $('body').height() * 0.9) {
// getCouponDate();
// }
// });
... ...
... ... @@ -3,7 +3,8 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
var $ = require('jquery');
var $ = require('jquery'),
Hammer = require('yoho.hammer');
var $footer = $('#yoho-footer'),
$yohoPage = $('.yoho-page'),
... ... @@ -131,6 +132,8 @@ function reMarginFooter(fixedElement) {
var user = getUser();
var backToTopHammer;
rePosFooter(); //计算底部位置
if (user === 0) {
... ... @@ -151,10 +154,15 @@ function reMarginFooter(fixedElement) {
);
}
$op.find('.back-to-top').on('touchend', function() {
$(window).scrollTop(0);
return false;
});
if ($op.find('.back-to-top').length > 0) {
backToTopHammer = new Hammer($op.find('.back-to-top')[0]);
backToTopHammer.on('tap', function(e) {
$(window).scrollTop(0);
e.srcEvent.preventDefault();
return false;
});
}
$footer.removeClass('hide');
}());
... ...
... ... @@ -15,7 +15,7 @@ function downLoadApp() {
var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
var clickedAt = new Date();
setTimeout(function () {
setTimeout(function() {
if ((new Date()) - clickedAt < 2000) {
window.location = appUrl;
}
... ...
... ... @@ -33,7 +33,7 @@ dialogTpl = '<div id="dialog-wrapper" class="dialog-wrapper">' +
dialogTemplate = Handlebars.compile(dialogTpl);
exports.showDialog = function(data, callback) {
exports.showDialog = function(data, callback, callbackForLeft) {
var dialogStr = dialogTemplate(data),
$dialogBox,
... ... @@ -76,6 +76,9 @@ exports.showDialog = function(data, callback) {
dialogWrapperHammer.on('tap', function(event) {
if ($(event.target).hasClass('dialog-left-btn')) {
if (typeof callbackForLeft === 'function') {
callbackForLeft();
}
$dialogWrapper.fadeOut();
} else if ($(event.target).hasClass('dialog-right-btn')) {
callback();
... ...
... ... @@ -3,7 +3,6 @@
* @author: chenglong<chenglong.wang@yoho.cn>
* @date: 2015/11/12
*/
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
Swiper = require('yoho.iswiper');
... ... @@ -92,6 +91,10 @@ function loadData($parent, url, page) {
} else if (data === 'end') {
$parent.closest('.fav-type').find('.fav-load-background')
.removeClass('fav-load-background').html('没有更多了');
// hf: fixes bug to 修改没有数据还调接口,加载错误页面问题
brandLockId = true;
lockId = true;
} else if (data.length > 10) {
$parent.append(data);
$parent.closest('.fav-type').find('.fav-content-loading').remove();
... ...
... ... @@ -41,14 +41,11 @@ optHammer.on('tap', function(e) {
}
}).then(function(res) {
$('#dialog-wrapper').hide();
if (!res) {
tip.show('网络错误');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
tip.show('删除成功');
} else {
tip.show(res.message || '网络错误');
if (res.message) {
tip.show(res.message);
}
window.location.href = '/home/orders';
}).fail(function() {
... ... @@ -73,14 +70,11 @@ optHammer.on('tap', function(e) {
}
}).then(function(res) {
$('#dialog-wrapper').hide();
if (!res) {
tip.show('网络错误');
if ($.type(res) !== 'object') {
return;
}
if (res.code === 200) {
tip.show('取消成功');
} else {
tip.show(res.message || '网络错误');
if (res.message) {
tip.show(res.message);
}
window.location.href = '/home/orders';
}).fail(function() {
... ...
... ... @@ -20,14 +20,15 @@ var api = require('../api'),
var trim = $.trim;
var showErrTip = tip.show;
var requesting = false;
var requested = false;
function nextStep(url, mobileNo, areaCode) {
if (requesting) {
if (requested) {
return false;
}
requesting = true;
requested = true;
$btnNext.addClass('disable').html('绑定中...');
$.ajax({
type: 'POST',
... ... @@ -37,15 +38,14 @@ function nextStep(url, mobileNo, areaCode) {
areaCode: areaCode.replace('+', '')
},
success: function(res) {
console.log(res.data);
location.href = url;
requesting = false;
// console.log(res.data);
location.href = url;
},
error: function() {
tip.show('出错了,请重试!');
requesting = false;
$btnNext.removeClass('disable').html('下一步');
requested = false;
}
});
}
... ... @@ -89,7 +89,8 @@ $btnNext.on('touchstart', function() {
nickname: nickname
},
success: function(res) {
console.log(res);
// console.log(res);
//res : {
// code: 'xxx',
... ...
... ... @@ -24,4 +24,3 @@ require('./back/new-password');
require('./bind/bind');
require('./bind/code');
require('./bind/password');
... ...
... ... @@ -16,6 +16,8 @@ var tip = require('../../plugin/tip');
var trim = $.trim;
var showErrTip = tip.show;
var requested = false;
api.selectCssHack($('#country-select'));
api.bindClearEvt();
... ... @@ -40,7 +42,15 @@ $btnNext.on('touchstart', function() {
return;
}
if (requested) {
return false;
}
if (api.phoneRegx[areaCode].test(pn)) {
requested = true;
$.ajax({
url: '/passport/reg/verifymobile',
type: 'POST',
... ... @@ -53,10 +63,15 @@ $btnNext.on('touchstart', function() {
location.href = data.data;
} else {
showErrTip(data.message);
requested = false;
}
},
error: function(err) {
showErrTip('出错了,请重试');
requested = false;
}
});
} else {
showErrTip('手机号格式不正确,请重新输入');
}
});
\ No newline at end of file
});
... ...
... ... @@ -34,8 +34,14 @@ function showFooter() {
showFooter();
require('./like');
lazyLoad($('img.lazy'));
if ($('#goodsDiscount h1').length < 1) {
$('.dropdown').remove();
}
//顶部swiper
goodsSwiper = new Swiper('.banner-swiper', {
lazyLoading: true,
... ... @@ -97,4 +103,4 @@ if ($('.good-detail-page').length > 0) {
$('#yoho-footer').css('border-top', '1px solid #e0e0e0');
}
require('./like');
... ...
... ... @@ -19,6 +19,9 @@ $.ajax({
if (count > 99) {
count = '99+';
}
if (count === 0) {
$('.cart-count').remove();
}
$cart.find('.cart-count').html(count).removeClass('hide');
}
}
... ...
... ... @@ -31,6 +31,7 @@
}
.basic-info {
// height: 100rem / $pxConvertRem;
overflow: hidden;
position: relative;
margin-bottom: pxToRem(30px);
... ... @@ -39,17 +40,19 @@
.thumb {
float: left;
width: 80rem / $pxConvertRem;
width: 100rem / $pxConvertRem;
margin-right: 20rem / $pxConvertRem;
}
.text-info {
position: absolute;
height: auto;
left: pxToRem(95px);
top:50%;
transform: translateY(-50%);
.name {
font-size: 28rem / $pxConvertRem;
height: 74rem / $pxConvertRem;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price{
... ... @@ -57,6 +60,7 @@
}
.sale-price {
color: #e10;
margin-right: pxToRem(15px);
&.no-price {
color: #000;
... ... @@ -153,17 +157,21 @@
height: 80rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
padding: 0;
border: none;
border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6;
border: 1px solid #e6e6e6;
text-align: center;
margin-left: -1px;
}
.btn-plus{
margin-left: -1px;
}
.btn-wrap {
position: relative;
height: 120rem / $pxConvertRem;
border-top: 1px solid #e6e6e6;
padding: 20rem / $pxConvertRem;
text-align: center;
background: #fff;
box-sizing: border-box;
.btn-sure {
... ...
... ... @@ -5,15 +5,6 @@
margin-left: 34rem / $pxConvertRem;
height: 160rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
&:last-child {
border-bottom: none;
}
}
.advance-block .gift-advance-good:last-child {
border-bottom: none;
}
.advance-block:last-child .gift-advance-good:last-child {
... ... @@ -105,6 +96,8 @@
right: 20rem / $pxConvertRem;
top: 71rem / $pxConvertRem;
font-size: 26rem / $pxConvertRem;
line-height: 58rem / $pxConvertRem;
text-align: center;
}
.title {
... ...
... ... @@ -3,25 +3,35 @@
position: relative;
padding-left: 16rem / $pxConvertRem;
.prevent-img-click {
position: absolute;
width: 20rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
background-color: transparent;
z-index: 99;
}
.checkbox {
position: absolute;
top: 50%;
margin-top: -14rem / $pxConvertRem;
margin-left: 20rem / $pxConvertRem;
margin-left: 8rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
color: #f0f0f0;
&.icon-cb-checked {
color: #000;
}
&.disabled {
color: #f0f0f0;
}
}
.few-tag{
width: 132rem / $pxConvertRem;
.few-tag {
width: 150rem / $pxConvertRem;
position: absolute;
left: 100rem / $pxConvertRem;
text-align: center;
top: 75%;
top: 72%;
color: #fff;
}
... ... @@ -54,10 +64,13 @@
padding-right: 20rem / $pxConvertRem;
}
.fixed-height {
height: 2.7rem;
}
.thumb {
float: left;
width: 180rem / $pxConvertRem;
height: 200rem / $pxConvertRem;
width: 150rem / $pxConvertRem;
background-size: 100%;
background-repeat: no-repeat;
}
... ... @@ -65,54 +78,55 @@
.deps {
position: relative;
width: 380rem / $pxConvertRem;
height: 5.3rem;
margin-left: 4.7rem;
margin-left: 180rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
padding-top: 0.5rem;
padding: 0.5rem 0;
}
.name {
font-size: 18px;
color: #5a5a5a;
width: 80%;
display: inline-block;
width: 80%;
color: #5a5a5a;
font-size: 0.6rem;
line-height: 0.7rem;
}
.color-size-row {
margin: 0.2rem 0;
> span {
margin-right: 15rem / $pxConvertRem;
}
.color-size-row > span {
margin-right: 15rem / $pxConvertRem;
}
.color, .size {
font-size: 16px;
font-size: 0.6rem;
color: #b6b6b6;
}
.appear-date {
float: left;
color: $cartRed;
display: block;
margin-top: 4rem / $pxConvertRem;
font-size: 0.5rem;
}
.price {
font-size: 16px;
font-size: 0.6rem;
color: $cartRed;
display: inline;
.sale-price{
color: #b0b0b0;
text-decoration: line-through;
}
}
.count {
font-size: 32rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
color: #999;
//margin-left: 22rem / $pxConvertRem;
display: inline-block;
width: 19%;
position: absolute;
text-align: center;
}
.sold-out, .low-stocks {
.low-stocks {
display: inline-block;
width: 100rem / $pxConvertRem;
height: 30rem / $pxConvertRem;
... ... @@ -122,20 +136,31 @@
color: #fff;
text-align: center;
float: right;
margin-top: 20rem / $pxConvertRem;
margin-right: 16rem / $pxConvertRem;
border-radius: 20rem / $pxConvertRem;
padding: 4rem / $pxConvertRem;
}
.sold-out {
background: #999;
border-radius: 20rem / $pxConvertRem;
}
.low-stocks {
background: #7f7f7f;
}
.vip {
display: inline-block;
color: #fff;
background: #d1021c;
border: 1px solid #9d0000;
@include border-radius(0.5rem);
padding: 4rem / $pxConvertRem 0.5rem;
margin-left: 0.2rem;
}
.la-tag {
margin-top: 0.3rem;
min-height: 1rem;
}
.icon-del,
.icon-edit {
position: absolute;
... ... @@ -144,7 +169,7 @@
}
.icon-del {
right: 14rem / $pxConvertRem;
right: 20rem / $pxConvertRem;
}
.icon-edit {
... ...
... ... @@ -5,12 +5,27 @@
.icon-cb-checked:before { content: "\e61d"; }
.shopping-cart-page {
padding-bottom: 120rem / $pxConvertRem;
margin-bottom: 120rem / $pxConvertRem;
overflow-x: hidden;
background: #f0f0f0;
.yoho-tip {
z-index: 4;
}
.cart-content > * {
background: #fff;
&:first-child {
border-top: none;
margin-top: 0;
}
}
.cart-nav {
color: #c6c6c6;
border-bottom: 1px solid #e0e0e0;
background: #fff;
li {
float: left;
... ... @@ -111,24 +126,32 @@
.cart-goods {
border-bottom: 1px solid #e0e0e0;
margin-bottom: 0.75rem;
.shopping-cart-good:last-child .info {
border-bottom: none;
}
}
.invalid-goods {
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin: 0.75rem 0;
}
.freebie-and-advance-buy {
padding: 20rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
margin-bottom: 30rem / $pxConvertRem;
> li {
box-sizing: border-box;
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
height: 80rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
margin-bottom: 10rem / $pxConvertRem;
background: #f8f8f8;
padding: 0 20rem / $pxConvertRem;
background: #f1f1f1;
&:last-child {
margin-bottom: 0;
... ... @@ -152,6 +175,7 @@
}
.activity-title{
border-top: 1px solid #e0e0e0;
font-size: 32rem / $pxConvertRem;
padding: 20rem / $pxConvertRem 20rem / $pxConvertRem 0;
}
... ...
... ... @@ -119,19 +119,32 @@
}
.coupon-use {
@include box-sizing(border-box);
position: relative;
float: right;
padding-right: 30rem / $pxConvertRem;
color: #999;
text-align: right;
width: 360rem / $pxConvertRem;
width: 320rem / $pxConvertRem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.iconfont {
position: absolute;
top:0;
right: 0;
color: #999;
}
}
.checkbox {
display: inline-block;
width: 80rem / $pxConvertRem;
text-align: center;
margin-right: -20rem / $pxConvertRem;
}
.coin-check {
float: right;
color: #999;
... ... @@ -179,7 +192,7 @@
height: pxToRem(60px);
color: #444;
background: #efefef;
font-size: pxToRem(16px);
font-size: pxToRem(24px);
line-height: 1;
outline: 0;
border: 0;
... ... @@ -228,9 +241,9 @@
}
}
.price-cal {
font-family: monospace;
}
// .price-cal {
// font-family: monospace;
// }
.cost {
border-top: 1px solid #f7f7f7;
... ...
... ... @@ -6,6 +6,7 @@
margin-bottom: pxToRem(30px);
padding-left: pxToRem(30px);
padding-right: pxToRem(30px);
font-size: pxToRem(24px);
input {
padding: 0 pxToRem(12px);
... ... @@ -49,7 +50,7 @@
.not-use {
display: block;
width: pxToRem(560px);
margin: pxToRem(30px) auto;
margin: pxToRem(30px) auto 0;
text-align: center;
font-size: pxToRem(32px);
line-height: 2.5;
... ... @@ -61,7 +62,7 @@
position: relative;
margin-top: pxToRem(30px);
margin-bottom: pxToRem(30px);
font-size: pxToRem(14px);
font-size: pxToRem(28px);
line-height: 2;
color: #b0b0b0;
text-align: center;
... ... @@ -78,6 +79,7 @@
}
.not-avaliable {
-webkit-filter: grayscale(100%);
// -webkit-filter: grayscale(100%);
@include filter(grayscale(100%));
}
}
... ...
... ... @@ -101,7 +101,7 @@ a {
color: #fff;
font-size: 18px;
border: none;
z-index:2;
z-index:4;
@include border-radius(10px);
}
... ...
... ... @@ -40,6 +40,9 @@
background-size: 100% 100%;
color: #fff;
position: relative;
&.focus {
background-image: image-url('me/employ/employ-red.jpg');
}
span{
width: 34.482759%;
height: 100%;
... ...
... ... @@ -32,4 +32,10 @@
}
}
}
}
.deal_main{
margin: .5rem 3%;
font-size:1.2em;
widows: 94%;
overflow: hidden;
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,12 @@
border-bottom: 1px solid $borderC;
padding: 0 pxToRem(28px);
.user-name {
display: inline-block;
float: left;
max-width: 9rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color: $mainFontC;
... ...
... ... @@ -9,6 +9,10 @@ $basicBtnC:#eb0313;
overflow: hidden;
background-color: #f0f0f0;
.yoho-tip {
z-index: 4;
}
.page-block {
background-color: #fff;
box-sizing: border-box;
... ...
.recommend-for-you {
padding: pxToRem(30px) 0 pxToRem(10px);
padding: pxToRem(30px) 0 pxToRem(30px);
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
background: #fff;
... ... @@ -16,7 +16,7 @@
padding: pxToRem(30px) 0 pxToRem(20px);
width: 100%;
height: pxToRem(252px);
overflow: hidden;
// overflow: hidden;
.swiper-slide {
padding: 0 pxToRem(10px);
... ... @@ -45,11 +45,13 @@
line-height: 1;
.sale-price {
display: block;
color: #d9134f;
margin-right: pxToRem(8px);
}
.old-price {
display: block;
color: #b0b0b0;
text-decoration: line-through;
}
... ...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>{{staticTitle}}</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">
<link rel="stylesheet" href="{{imgUrl}}/cuxiao/css/christmas/index3.css">
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<script>
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
</head>
<body class="keBody">
<div class="coupon-christmas" show="{{showPopupFlag}}">
<div class="coupon-top">
<img src="{{imgUrl}}/cuxiao/img/christmas/02/top-bg.png" alt="">
<img class="wyf" src="{{imgUrl}}/cuxiao/img/christmas/02/wyf.gif" alt="">
<a class="go-check" href="{{myCouponUrl}}"></a>
<a class="share-btn" href="javascript:;"></a>
</div>
<div class="coupon-bottom">
<div class="coupon-banner">
<div class="banner-btn">
<a class="boy" href="{{bannerUrl_1}}"></a>
<a class="girl" href="{{bannerUrl_2}}"></a>
<a class="life" href="{{bannerUrl_3}}"></a>
<a class="kid" href="{{bannerUrl_4}}"></a>
</div>
</div>
<div class="bottom-btn">
<a class="follow-yoho" href="http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&amp;mid=201849402&amp;idx=1&amp;sn=c0089812f9769d82e0075f69d771f6e1#rd"></a>
<a class="download-yoho" href="http://www.yohoshow.com/about/index/yohobuyqr"></a>
</div>
</div>
<div class="coupon-ft">
<img src="{{imgUrl}}/cuxiao/img/christmas/02/14.png">
</div>
</div>
<div class="modal"></div>
<div class="dialog-box geted">
<div class="dialog-inner">
<img src="{{imgUrl}}/cuxiao/img/christmas/geted.png" alt=""/>
<span class="dialog-close"></span>
</div>
</div>
<div class="dialog-box fail">
<div class="dialog-inner">
<img src="{{imgUrl}}/cuxiao/img/christmas/fail.png" alt=""/>
<span class="refresh-btn"></span>
</div>
</div>
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
<script type="text/javascript" src="{{imgUrl}}/cuxiao/js/jquery.min.js"></script>
<script>
//提示分享
$('.share-btn').click(function () {
$('.modal').fadeIn();
});
//关闭提示分享
$('.modal').click(function () {
$(this).fadeOut();
});
//提示已领过券
if ($('.coupon-christmas').attr('show') === '1') {
$('.dialog-box.geted').show();
}
//提示领券失败
else if ($('.coupon-christmas').attr('show') === '2') {
$('.dialog-box.fail').show();
}
//关闭提示
$('.dialog-close').click(function(){
$(this).parents('.dialog-box').fadeOut();
});
//刷新页面
$('.refresh-btn').click(function() {
location.reload();
});
</script>
{{#if weixinShare}}
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" charset="utf-8" src="{{jsUrl}}/cuxiao/js/share.weixin.js"></script>
{{/if}}
{{> layout/analysis}}
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -44,7 +44,7 @@
</div>
<div class="bottom-btn">
<a class="follow-yoho" href="http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&amp;mid=201849402&amp;idx=1&amp;sn=c0089812f9769d82e0075f69d771f6e1#rd"></a>
<a class="download-yoho" href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&amp;g_f=995445"></a>
<a class="download-yoho" href="http://www.yohoshow.com/about/index/yohobuyqr"></a>
</div>
</div>
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{staticTitle}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<style>
*{margin: 0;padding: 0;}
#coupon-container {width: 100%;}
#coupon-container img {width: 100%; height: auto; display: block;overflow: hidden;}
.img-box {width: 100%;position: relative;}
.img-box .href {width: 50%; height: 100%;position: absolute;top: 0;}
.img-box .href-left {left: 0}
.img-box .href-right {right: 0}
.img-box .href-center {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;}
.show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;}
.yoho-tip {
position: fixed;
display: none;
text-align: center;
width: 70%;
padding: 34px 0;
top: 50%;
left: 50%;
margin-left: -35%;
margin-top: -45px;
background-color: #000;
opacity: 0.9;
color: #fff;
font-size: 18px;
border: none;
border-radius: 10px;
}
</style>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
<img src="{{jsUrl}}/cuxiao/img/newuser2/01.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/02.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/03.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/04.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/05.jpg">
<a class="href href-right" href="{{url_yohope}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/06.jpg">
<a class="href href-center" href="{{url_mycoupon}}"></a>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-2.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/07.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/08.jpg">
<a class="href href-left" href="{{url_more}}"></a>
<a class="href href-right" href="{{url_more}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/09.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12042"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12043"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/10.jpg">
<a class="href href-left" href="{{url_4}}"></a>
<a class="href href-right" href="{{url_343}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/11.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12044"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12045"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/12.jpg">
<a class="href href-left" href="{{url_230}}"></a>
<a class="href href-right" href="{{url_536}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/13.jpg">
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="12046"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="12047"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/14.jpg">
<a class="href href-left" href="{{url_847}}"></a>
<a class="href href-right" href="{{url_900}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/15.jpg">
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="12048"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="12049"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/16.jpg">
<a class="href href-left" href="{{url_868}}"></a>
<a class="href href-right" href="{{url_1026}}"></a>
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/17.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12050"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12051"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser/line-2.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser/24-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/24-2.jpg">
<a class="show-more" href="{{url_help}}"></a>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/24-3.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-2.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/25.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/26.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser2/27.jpg">
</div>
<script type="text/javascript" src="{{jsUrl}}/cuxiao/js/jquery.min.js"></script>
<script type="text/javascript" src="{{jsUrl}}/cuxiao/js/newuser/coupon2.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -59,8 +59,8 @@
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/09.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12042"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12043"></span>
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="16753"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="16755"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
... ... @@ -70,8 +70,8 @@
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/11.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12044"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12045"></span>
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="16757"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="16759"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
... ... @@ -81,8 +81,8 @@
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/13.jpg">
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="12046"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="12047"></span>
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="16761"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="16763"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
... ... @@ -92,8 +92,8 @@
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/15.jpg">
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="12048"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="12049"></span>
<span class="href href-left get-coupon" onclick="" href="{{jumpUrl}}" param="16765"></span>
<span class="href href-right get-coupon" onclick="" href="{{jumpUrl}}" param="16767"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<div class="img-box">
... ... @@ -103,10 +103,12 @@
</div>
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/17.jpg">
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="12050"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="12051"></span>
<span class="href href-left get-coupon" href="{{jumpUrl}}" param="16769"></span>
<span class="href href-right get-coupon" href="{{jumpUrl}}" param="16771"></span>
</div>
<img src="{{jsUrl}}/cuxiao/img/newuser2/line-1.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser/line-2.jpg">
<img src="{{jsUrl}}/cuxiao/img/newuser/24-1.jpg">
<div class="img-box">
<img src="{{jsUrl}}/cuxiao/img/newuser2/24-2.jpg">
<a class="show-more" href="{{url_help}}"></a>
... ...
... ... @@ -12,7 +12,7 @@
{{else}}
{{# freebie}}
<div class="advance-block gift-block" data-promotion-id="{{promotionId}}">
<p class="title">{{title}}</p>
<p class="title">{{promotionTitle}}</p>
{{#goods}}
{{> cart/gift-advance-good}}
{{/goods}}
... ...
... ... @@ -11,7 +11,7 @@
{{/if}}
{{#if isEmptyCart}}
<div class="cart-zero">
<i class="iconfont">&#xe62c</i>
<i class="iconfont">&#xe640;</i>
<p>您的购物车暂无商品</p>
<a href="/product/new">随便逛逛</a>
</div>
... ... @@ -19,16 +19,16 @@
{{^}}
{{#if cartNav}}
<ul class="cart-nav clearfix">
<li class="active">
<span>
<li class="active" id="common-cart-nav">
<span >
普通商品({{commonGoodsCount}})
</span>
</li>
<li>
<span>
<li id="presell-cart-nav">
<span >
预售商品({{presellGoodsCount}})
</span>
<div id="presell-tip" class="presell-tip">
<div id="presell-tip" class="presell-tip hide">
<div class="triangle"></div>
<p class="pt-content">预售商品点这里结算哦~</p>
</div>
... ...
... ... @@ -69,17 +69,17 @@
<span class="title">YOHO币</span>
{{#if yohoCoin}}
<span class="desc used {{#unless useYohoCoin}}hide{{/if}}">已抵¥{{yohoCoin}}</span>
<span class="desc used {{#unless useYohoCoin}}hide{{/if}}">已抵¥{{useYohoCoin}}</span>
<span class="desc can-use {{#if useYohoCoin}}hide{{/if}}">可抵¥{{yohoCoin}}</span>
{{#if useYohoCoin}}
<span class="coin-check">
<em>- ¥ {{yohoCoin}}</em>
<em>- ¥ {{useYohoCoin}}</em>
<i class="iconfont checkbox icon-cb-checked"></i>
</span>
{{else}}
<span class="coin-check">
<em style="display: none;">- ¥ {{yohoCoin}}</em>
<em style="display: none;">- ¥ {{useYohoCoin}}</em>
<i class="iconfont checkbox icon-checkbox"></i>
</span>
{{/if}}
... ... @@ -110,7 +110,7 @@
</ul>
<form id="msg" action="" method="post">
<textarea name="msg" rows="2" maxlength="40" placeholder="留言">{{msg}}</textarea>
<input type="text" name="msg" value="{{msg}}" maxlength="40" placeholder="留言">
</form>
</section>
... ...
{{!-- APP 内置晒单介绍 --}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>晒单评价规则</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
ul {
list-style: none;
margin-bottom: 30px;
}
.help {
padding: 30px 30px;
font-size: 24px;
line-height: 1.5;
color: #444;
}
</style>
</head>
<body>
<div class="help">
<p>晒单评价规则:</p>
<ul>
<li>1. 只能对您购买过的商品进行晒单评价;</li>
<li>2. 晒单通过审核后即可获得奖励,且一件商品只能获得一次晒单奖励;</li>
<li>3. 未通过审核的晒单评价内容将会被删除,若多次出现晒单评价未审核通过的情况,YOHO!BUY有货有权禁止该用户对商品继续晒单评价;</li>
</ul>
<p>如何通过审核:</p>
<ul>
<li>1. 晒单图片应与商品相关、且不得出现含违反法律、法规的内容的;</li>
<li>2. 评价应有一定参考价值的信息,不可以直接拷贝别人的评价文字哦~</li>
</ul>
<p>其他说明:</p>
<ul>
<li>YOHO!BUY有货对用户在本站进行晒单评价的文字、图片享有使用权利</li>
</ul>
</div>
</body>
<head>
<meta charset="utf-8">
<title>晒单评价规则</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
ul {
list-style: none;
margin-bottom: 30px;
}
.help {
padding: 30px 30px;
font-size: 26px;
line-height: 1.5;
color: #444;
}
</style>
</head>
<body>
<div class="help">
<p>晒单评价规则:</p>
<ul>
<li>1. 只能对您购买过的商品进行晒单评价;</li>
<li>2. 晒单通过审核后即可获得奖励,且一件商品只能获得一次晒单奖励;</li>
<li>3. 未通过审核的晒单评价内容将会被删除,若多次出现晒单评价未审核通过的情况,YOHO!BUY有货有权禁止该用户对商品继续晒单评价;</li>
</ul>
<p>如何通过审核:</p>
<ul>
<li>1. 晒单图片应与商品相关、且不得出现含违反法律、法规的内容的;</li>
<li>2. 评价应有一定参考价值的信息,不可以直接拷贝别人的评价文字哦~</li>
</ul>
<p>其他说明:</p>
<ul>
<li>YOHO!BUY有货对用户在本站进行晒单评价的文字、图片享有使用权利</li>
</ul>
</div>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -118,8 +118,7 @@
{{#cartInfo}}
<div class="cart-bar">
<span class="num-tag hide"></span>
<a href="{{cartUrl}}" class="num-incart iconfont">&#xe62c;</a>
<a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>
{{#if addToCartUrl}}
<!-- <a id="addtoCart" href="{{addToCartUrl}}" class="addto-cart">加入购物车</a> -->
... ...
<div class="cart-goods">
{{# goods}}
{{> cart/good}}
{{/ goods}}
{{# notValidGoods}}
{{> cart/good}}
{{/ notValidGoods}}
{{#if goods}}
<div class="cart-goods">
{{# goods}}
{{> cart/good}}
{{/ goods}}
</div>
{{/if}}
</div>
{{#if notValidGoods}}
<div class="invalid-goods">
{{# notValidGoods}}
{{> cart/good}}
{{/ notValidGoods}}
</div>
{{/if}}
{{#if freebieOrAdvanceBuy}}
<ul class="freebie-and-advance-buy">
{{# freebie}}
{{#if freebie}}
<li class="freebie">
<a href="/cart/index/gift?cartType={{cartType}}">
<span class="iconfont">&#xe620;</span>
赠品
<span class="count">{{count}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
<span class="count">{{giftCount}}</span>
</a>
</li>
{{/ freebie}}
{{/if}}
{{#if advanceBuy}}
<li class="advance-buy">
<a href="/cart/index/advanceBuy?cartType={{cartType}}">
<span class="iconfont">&#xe61b;</span>
加价购
<span class="count">{{advanceBuyCount}}</span>
<span class="iconfont icon-right-arrow">&#xe614;</span>
<span class="count">{{advanceBuyCount}}</span>
</a>
</li>
{{/if}}
... ... @@ -42,6 +47,7 @@
{{/if}}
{{/ promotionInfo}}
{{#if promotionInfo}}
<div class="activity">
<ul>
{{# promotionInfo}}
... ... @@ -49,15 +55,10 @@
{{/ promotionInfo}}
</ul>
</div>
{{/if}}
<div class="price-compute">
<p>
<span>总价(¥{{price}})<i>-</i></span>
<span>活动价(¥{{activityPrice}})</span>
</p>
<p>
<span><i>=</i>商品总计金额 (¥{{sumPrice}})</span>
</p>
<p>{{formulaPrice}}</p>
</div>
<div class="balance">
... ...
... ... @@ -52,7 +52,7 @@
<a class="btn btn-minus" href="javascript:void(0);">
<span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe625;</span>
</a>
<input id="good-num" class="good-num {{#if promotionId}}disabled{{/if}}" type="text" value="1" {{#if promotionId}}disabled="true"{{/if}}>
<input id="good-num" class="good-num disabled" type="text" value="1" disabled="true">
<a class="btn btn-plus" href="javascript:void(0);">
<span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe624;</span>
</a>
... ...
... ... @@ -10,11 +10,8 @@
{{#if price}}
<span class="price market-price">&yen;{{marketPrice}}</span>
{{/if}}
<span class="count">
×{{count}}
</span>
</p>
<button class="chose">选择</button>
<span class="chose">选择</span>
</div>
... ...
... ... @@ -4,10 +4,11 @@
{{/if}}
{{#if showCheckbox}}
<span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}} iconfont"></span>
<span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox {{#if lowStocks}}disabled{{/if}}{{/if}} iconfont"></span>
{{/if}}
<div class="info">
<div class="prevent-img-click"></div>
<a href="{{link}}">
<img class="thumb lazy" data-original="{{thumb}}">
</a>
... ... @@ -19,51 +20,58 @@
{{/if}}
<div class="deps show">
<a href="{{link}}" class="name row">{{name}}</a>
<span class="count">
×{{count}}
</span>
<p class="row color-size-row">
{{#if color}}
<span class="color">
颜色:{{color}}
</span>
{{/if}}
<div class="fixed-height">
<a href="{{link}}" class="name row">{{name}}</a>
<span class="count">
×{{count}}
</span>
<p class="row color-size-row">
{{#if color}}
<span class="color">
颜色:{{color}}
</span>
{{/if}}
{{#if size}}
<span class="size">
尺码:{{size}}
</span>
{{/if}}
{{#if size}}
<span class="size">
尺码:{{size}}
</span>
{{/if}}
</p>
</p>
</div>
<p class="row">
<span class="price">
¥{{price}}
</span>
{{#if soldOut}}
<span class="sold-out">
已售罄
<p class="price">
<span class="market-price">¥{{price}}</span>
{{#if isAdvanceBuy}}
<span class="sale-price">¥{{salesPrice}}</span>
{{/if}}
{{#if isGift}}
<span class="sale-price">¥{{salesPrice}}</span>
{{/if}}
</p>
{{#if isVipPrice}}
<span class="vip">
VIP
</span>
{{/if}}
{{#unless isGift}}
<span class="iconfont icon-del" data-count="{{count}}">&#xe621;</span>
{{/unless}}
</p>
{{#if lowStocks}}
<p class="row">
<p class="la-tag row clearfix">
{{#if lowStocks}}
<span class="low-stocks">
库存不足
</span>
</p>
{{/if}}
{{#if appearDate}}
<p class="row">
{{/if}}
{{#if appearDate}}
<span class="appear-date">
上市期:{{appearDate}}
</span>
</p>
{{/if}}
{{/if}}
</p>
</div>
</div>
</div>
... ...
... ... @@ -28,5 +28,5 @@
s.parentNode.insertBefore(hm, s);
})();
</script>
<script src="http://static.yohobuy.com/js/analytics/analysis.js"></script>
<script src="http://static.yohobuy.com/m/v1/js/om_code.js"></script>
<script src="http://static.yohobuy.com/js/analytics/analysis.js" async="async"></script>
<script src="http://static.yohobuy.com/m/v1/js/om_code.js" async="async"></script>
... ...
... ... @@ -7,7 +7,7 @@
<a href="{{.}}" class="iconfont nav-home">&#xe611;</a>
{{/navHome}}
{{#navPhone}}
<a href="{{.}}" class="iconfont nav-home">&#xe63e;</a>
<a href="{{.}}" class="iconfont nav-home">&#xe641;</a>
{{/navPhone}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
... ... @@ -15,9 +15,7 @@
{{# navBtn}}
<!-- <span class="nav-btn">{{.}}</span> -->
<!-- <i class="iconfont nav-home">&#xe638;</i> -->
{{/ navBtn}}
</header>
<div class="homebuttom none">
<!-- <div class="homebuttom none">
<ul>
<li>
<i class="iconfont">&#xe62a;</i>
... ... @@ -36,5 +34,8 @@
<span>我的</span>
</li>
</ul>
</div>
</div> -->
{{/ navBtn}}
</header>
{{/pageHeader}}
... ...
... ... @@ -5,11 +5,11 @@
<a class="swiper-slide" href="{{url}}">
<img class="swiper-lazy img-box" data-src="{{thumb}}">
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}">&yen;{{salePrice}}</span>
{{#price}}<span class="old-price">&yen;{{.}}</span>{{/price}}
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}<span class="old-price">¥{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</a>
{{/recommendList}}
</div>
</div>
\ No newline at end of file
</div>
... ...
<?php
use Action\AbstractAction;
/**
* 跳转
*/
class GoController extends AbstractAction
{
/**
* 跳转PC或WAP
*/
public function indexAction()
{
$pc = $this->get('pc', 'http://www.yohobuy.com');
$wap = $this->get('wap', 'http://m.yohobuy.com');
$pc = rawurldecode($pc);
$wap = rawurldecode($wap);
// 苹果设备
if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
$this->go($wap);
}
// 苹果IPAD
elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
$this->go($pc);
}
// 安卓设备
elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) {
$this->go($wap);
}
// 其它
else {
$this->go($pc);
}
}
}
\ No newline at end of file
... ...
... ... @@ -36,7 +36,7 @@ class ChristmasController extends HuodongAction
switch (intval($result['code'])) {
case 200: // 领取成功, 发送站内信消息
$showPopupFlag = '0';
$this->sendMessage($uid);
$this->sendMessage($uid, '【优惠券】您有6张潮集圣诞优惠券', '尊敬的客户:恭喜您成功获得6张潮集圣诞优惠券 !您可以在个人中心的交易管理中查看‘我的优惠券’。');
break;
case 201: // 已领取过, 提示重复领券
$showPopupFlag = '1';
... ... @@ -49,13 +49,11 @@ class ChristmasController extends HuodongAction
$this->_view->display('index', array(
'staticTitle' => '潮集圣诞',
'weixinShare' => $this->_isApp ? false : true, // 是否需要微信分享
'shareLink' => 'http://feature.yohobuy.com/0/0/675/index.html',
'shareTitle' => 'YOHO!BUY有货【潮集圣诞】第一弹来袭!500元优惠券引爆圣诞!',
'shareDesc' => '万件潮品限时58折封顶,再享折上满减,还有惊喜圣诞礼物等你来挑哦!',
'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/09/029fd41969b67002126ff7a71fe5396b6e.png',
'showPopupFlag' => $showPopupFlag,
'myCouponUrl' => $myCouponUrl,
'bannerUrl_1' => 'http://feature.yoho.cn/1211/1211APPHOMEBOY/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1211/1211APPHOMEBOY/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"454"},"param":{"share_id":"454"}}}',
... ... @@ -64,6 +62,56 @@ class ChristmasController extends HuodongAction
}
/**
* 备注:2015年12月11号上线
*/
public function christmas2Action()
{
//获取登录者ID,未登录返回false
$uid = $this->getLoggedUid();
if (!$uid || !is_numeric($uid)) {
//未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/christmas/christmas2')), 'default'));
}
// 该变量用来控制和显示页面的弹出提示
$showPopupFlag = '0';
//获取跳转到个人中心-我的优惠券链接,并调用接口,完成领券操作
$myCouponUrl = Helpers::url('/home/coupons', null, 'default') . '?openby:yohobuy={"action":"go.coupon"}';
$activityId = $this->getActivityId2();
$result = ActivityData::getCouponAll($uid, $activityId);
if (isset($result['code'])) {
switch (intval($result['code'])) {
case 200: // 领取成功, 发送站内信消息
$showPopupFlag = '0';
$this->sendMessage($uid, '【优惠券】您获得1000元套券', '尊敬的客户:恭喜您成功获得1000元套券!您可以在个人中心的交易管理中查看‘我的优惠券’。');
break;
case 201: // 已领取过, 提示重复领券
$showPopupFlag = '1';
break;
default: // 领取失败, 提示领券失败
$showPopupFlag = '2';
break;
}
}
$this->_view->display('index-2', array(
'staticTitle' => '潮集圣诞',
'weixinShare' => $this->_isApp ? false : true, // 是否需要微信分享
'shareLink' => 'http://feature.yohobuy.com/0/0/701/index.html',
'shareTitle' => 'YOHO!BUY有货【潮集圣诞】第二弹来袭!1000元优惠券引爆圣诞!',
'shareDesc' => '万件潮品限时5折封顶,冬季优品最高直减800元,还有惊喜圣诞礼物等你来挑哦!',
'shareImg' => 'http://img11.static.yhbimg.com/couponImg/2015/12/17/09/014bba1e01a0aef86fa4c81f1c926a0d62.png',
'showPopupFlag' => $showPopupFlag,
'myCouponUrl' => $myCouponUrl,
'bannerUrl_1' => 'http://feature.yoho.cn/1221/1221APPHOMEBOY/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMEBOY/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"530"},"param":{"share_id":"530"}}}',
'bannerUrl_2' => 'http://feature.yoho.cn/1221/1221APPHOMEGIRL/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMEGIRL/index.html","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"532"},"param":{"share_id":"532"}}}',
'bannerUrl_3' => 'http://feature.yoho.cn/1221/1221APPHOMELIFE/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMELIFE/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"536"},"param":{"share_id":"536"}}}',
'bannerUrl_4' => 'http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"534"},"param":{"share_id":"534"}}}',
));
}
/**
* 检测登录状态
*
* @return int
... ... @@ -81,18 +129,17 @@ class ChristmasController extends HuodongAction
return $uid;
}
/**
* 发送站内信
*
* @param int $uid 用户ID
*/
private function sendMessage($uid)
private function sendMessage($uid, $title, $content)
{
try {
ActivityData::message($uid, '【优惠券】您有6张潮集圣诞优惠券', '尊敬的客户:恭喜您成功获得6张潮集圣诞优惠券 !您可以在个人中心的交易管理中查看‘我的优惠券’。');
}
catch (Exception $e) {
ActivityData::message($uid, $title, $content);
} catch (Exception $e) {
// do nothing
}
}
... ... @@ -116,4 +163,23 @@ class ChristmasController extends HuodongAction
}
}
/**
* 根据环境来获取活动ID
*
* @return int
*/
private function getActivityId2()
{
// 设置环境变量
switch (APPLICATION_ENV) {
case 'production': // 生产
return 390;
case 'preview': // 预览
case 'testing': // 测试
case 'develop': // 开发
default:
return 390;
}
}
}
... ...
... ... @@ -52,7 +52,7 @@ class CouponController extends HuodongAction
$urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand');
$urlKids = Helpers::url('/cuxiao/coupon/kidsbrand');
$urlLifestyle = Helpers::url('/cuxiao/coupon/lifestylebrand');
$urlShare = '\/operations\/api\/v5\/webshare\/getShare';
$urlShare = Yohobuy::SERVICE_URL . '/operations/api/v5/webshare/getShare';
$urlEncode = strtr($urlBoys, array('/' => '\\/'));
$this->_view->display('boysbrand', array(
... ... @@ -67,10 +67,10 @@ class CouponController extends HuodongAction
'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg',
'shareDesc' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!',
'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"364","share":"' . $urlShare . '","shareparam":{"share_id":"406"},"islogin":"Y","type":0,"url":"' . $urlBoys . '","param":{}}}',
'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"366","share":"' . $urlShare . '","shareparam":{"share_id":"408"},"islogin":"Y","type":0,"url":"' . $urlGirls . '","param":{}}}',
'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"368","share":"' . $urlShare . '","shareparam":{"share_id":"410"},"islogin":"Y","type":0,"url":"' . $urlKids . '","param":{}}}',
'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"370","share":"' . $urlShare . '","shareparam":{"share_id":"412"},"islogin":"Y","type":0,"url":"' . $urlLifestyle . '","param":{}}}',
'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"364","share":"' . $urlShare . '","shareparam":{"share_id":"406"},"islogin":"N","type":0,"url":"' . $urlBoys . '","param":{}}}',
'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"366","share":"' . $urlShare . '","shareparam":{"share_id":"408"},"islogin":"N","type":0,"url":"' . $urlGirls . '","param":{}}}',
'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"368","share":"' . $urlShare . '","shareparam":{"share_id":"410"},"islogin":"N","type":0,"url":"' . $urlKids . '","param":{}}}',
'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"370","share":"' . $urlShare . '","shareparam":{"share_id":"412"},"islogin":"N","type":0,"url":"' . $urlLifestyle . '","param":{}}}',
'url_350' => 'http://list.m.yohobuy.com/?gender=1,3&brand=350&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"350","title":"MACROPUS"}}',
'url_160' => 'http://list.m.yohobuy.com/?gender=1,3&brand=60&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"60","title":"izzue"}}',
... ... @@ -502,10 +502,8 @@ class CouponController extends HuodongAction
));
}
/**
* 新客领券2
*
*
/**
* 新客领券(第二波)12月21号上线
*/
public function newuser2Action()
{
... ... @@ -518,17 +516,26 @@ class CouponController extends HuodongAction
} else {
$isLogged = $this->getUid();
}
$urlNewuser = Helpers::url('/cuxiao/coupon/newuser');
$urlNewuser = Helpers::url('/cuxiao/coupon/newuser2');
$urlYohope = Helpers::url('/cuxiao/coupon/yohope');
$urlHelp = Helpers::url('/cuxiao/coupon/help');
$urlMycoupon = Helpers::url('/home/coupons', null, 'default');
$urlEncode = strtr($urlNewuser, array('/' => '\\/'));
$gender = $this->get('gender', '1,3');
$channel = $this -> get('yh_channel','1');
$url = Helpers::url('/boys') . '?openbuy:yohobuy={"action":"go.home","params":{"gender":"' . $gender . '","channel":"' . $channel . '"}}';
$channel = $this -> get('yh_channel', '1');
switch (strval($channel)) {
case '1':
$gender = '1,3';
break;
case '2':
$gender = '2,3';
break;
default:
$gender = '1,2,3';
}
$url = Helpers::url('/boys', array(), 'default') . '?openby:yohobuy={"action":"go.home","params":{"gender":"' . $gender . '","channel":"' . $channel . '"}}';
$this->_view->display('newuser2', array(
'activityId' => 87, // 活动ID 444
'activityId' => 444, // 87活动ID
'staticTitle' => '新人潮这看,超值惊喜等你领', // 标题
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlNewuser . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}',
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.0.1"
application.version = "1.0.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.0.1"
application.version = "1.0.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.0.1"
application.version = "1.0.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "1.0.1"
application.version = "1.0.2"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -640,16 +640,13 @@ class HomeController extends AbstractAction
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
*
*/
public function ordersAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$backUrl = Helpers::url('/home');
$this->setTitle('我的订单');
$this->setNavHeader('我的订单', $backUrl);
$this->setNavHeader('我的订单', Helpers::url('/home') );
$order = array();
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
... ... @@ -778,14 +775,13 @@ class HomeController extends AbstractAction
/*
* 我的订单-付款跳转页
*/
public function payAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('支付中心');
$this->setNavHeader('支付中心');
$this->setNavHeader('支付中心', Helpers::url('/home/orders'), '');
$orderCode = $this->get('order_code');
if (empty($orderCode)) {
... ... @@ -816,6 +812,36 @@ class HomeController extends AbstractAction
'hasWxShare' => strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false
));
}
/**
* 微信支付 API
*/
public function weixinapiAction()
{
do {
if (!$this->isAjax()) {
break;
}
$uid = $this->getUid(true);
if (!$uid) {
break;
}
$orderCode = $this->get('order_code');
if (empty($orderCode)) {
break;
}
$result = OrderData::weixinPaySign($orderCode);
if (empty($result['data'])) {
break;
}
$this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => $result['data'])) );
}
while (false);
}
// /*
// * 我的订单-确认收货
... ... @@ -870,6 +896,7 @@ class HomeController extends AbstractAction
$this->_view->display('help', array(
'iHelp' => Home\HelpModel::serviceInfo(),
'pageFooter' => true
));
}
... ... @@ -887,8 +914,9 @@ class HomeController extends AbstractAction
$this->setTitle($caption);
$this->setNavHeader($caption);
$this->_view->display('helpDetail', array(
$this->_view->display('help-detail', array(
'iHelp' => Home\HelpModel::serviceDetail($code),
'pageFooter' => true
));
}
... ...
... ... @@ -46,7 +46,7 @@ class CartModel
*
* @param integer $uid 用户ID
* @param string $shoppingKey 未登录用户唯一识别码
* @param string $cartType 购物车类型
* @param string $cartType 购物车类型,默认是是所有购物车,ordinary为普通购物车,advance为预售购物车
* @param bool $onlyGift 只获取赠品的商品数据
* @param bool $onlyAdvanceBuy 只获取加价购的商品数据
* @return array|mixed 处理之后的购物车数据
... ... @@ -73,33 +73,35 @@ class CartModel
$cart = $cartData['data'];
if ($cartType !== 'all') { // 加价购或者赠品数据
if ($onlyGift || $onlyAdvanceBuy) { // 加价购或者赠品数据
$result = self::procCartData($cart['ordinary_cart_data'], $onlyGift, $onlyAdvanceBuy);
break;
}
$ordinaryCount = strval($cart['ordinary_cart_data']['shopping_cart_data']['goods_count']);
$advanceCount = strval($cart['advance_cart_data']['shopping_cart_data']['goods_count']);
$ordinarySoldOut = empty($cart['ordinary_cart_data']['sold_out_goods_list']);
$advanceSoldOut = empty($cart['advance_cart_data']['sold_out_goods_list']);
// 普通购物车和预售购物车都为空
if ($ordinaryCount === '0' && $advanceCount === '0') {
if ($ordinaryCount === '0' && $advanceCount === '0' && $ordinarySoldOut && $advanceSoldOut) {
$result['isEmptyCart'] = true;
break;
}
// 普通购物车空,则显示预售购物车
if ($ordinaryCount === '0') {
if ($ordinaryCount === '0' && $ordinaryCount) {
$result['cartNav'] = false;
$result['cartType'] = 'advance';
}
// 预售购物车空,则显示普通购物车
elseif ($advanceCount === '0') {
elseif ($advanceCount === '0' && $advanceSoldOut) {
$result['cartNav'] = false;
$result['cartType'] = 'ordinary';
}
// 以上两个购物车中都有数据, 默认显示普通购物车
else {
$result['cartNav'] = true;
$result['cartType'] = 'ordinary';
$result['cartType'] = $cartType !== 'all' ? $cartType : 'ordinary';
}
/* 普通购物车 */
... ... @@ -313,10 +315,10 @@ class CartModel
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param null|string $cookieData cookie中记录的一些订单有关数据
* @param array $orderInfo cookie中记录的一些订单有关数据
* @return array 接口返回的数据
*/
public static function cartPay($uid, $cartType, $cookieData)
public static function cartPay($uid, $cartType, $orderInfo)
{
$result = array();
... ... @@ -324,13 +326,11 @@ class CartModel
if ($pay && isset($pay['code']) && $pay['code'] === 200) {
$payReturn = $pay['data'];
$orderInfo = array();
$address = array();
$orderCompute = array();
// cookie保存的数据
if (!empty($cookieData)) {
$orderInfo = json_decode($cookieData, true);
if (!empty($orderInfo)) {
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin']);
}
... ... @@ -346,7 +346,8 @@ class CartModel
$result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile'];
$result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area'];
$result['address'] = isset($address['address']) ? $address['address'] : $payReturn['delivery_address']['address'];
$result['isSupport'] = ($payReturn['delivery_address']['is_support'] === 'Y');
$isSupport = isset($address['is_support']) ? $address['is_support'] : $payReturn['delivery_address']['is_support'];
$result['isSupport'] = $isSupport === 'Y';
}
// 配送方式
... ... @@ -407,12 +408,13 @@ class CartModel
$oneGoods['name'] = $single['product_name'];
$oneGoods['color'] = $single['color_name'];
$oneGoods['size'] = $single['size_name'];
$oneGoods['price'] = Helpers::transPrice($single['sales_price']);
$oneGoods['price'] = Helpers::transPrice($single['last_price']);
$oneGoods['count'] = $single['buy_number'];
//gift=>是否赠品,advanceBuy=>是否加价购;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['gift'] = true;
$oneGoods['price'] = Helpers::transPrice($single['sale_price']);
} elseif ($single['goods_type'] == 'price_gift') {
$oneGoods['advanceBuy'] = true;
$oneGoods['price'] = Helpers::transPrice($single['sale_price']);
... ... @@ -442,7 +444,7 @@ class CartModel
// 有货币
$result['yohoCoin'] = $payReturn['yoho_coin'];
$result['useYohoCoin'] = isset($orderCompute['use_yoho_coin']) ? $orderCompute['use_yoho_coin'] : $payReturn['yoho_coin'];
$result['useYohoCoin'] = isset($orderCompute['use_yoho_coin']) ? $orderCompute['use_yoho_coin'] : $payReturn['use_yoho_coin'];
// 订单数据
if (isset($payReturn['shopping_cart_data']) && !empty($payReturn['shopping_cart_data'])) {
... ... @@ -554,8 +556,8 @@ class CartModel
$notAvailableRes = self::searchCoupon($uid, $val['couponCode']);
// 处理可用的优惠券
if ($val['isValidity'] === 'N' || (isset($notAvailableRes['code']) && $notAvailableRes['code'] !== 200)) {
// $val['notAvailable'] = true;
continue;
$val['notAvailable'] = true;
// continue;
}
$result[] = $val;
}
... ... @@ -682,7 +684,7 @@ class CartModel
// 缩略图
foreach ($val['images_list'] as $image) {
$thumbImageList[] = array(
'img' => Helpers::getImageUrl($image['image_url'], 80, 106)
'img' => Helpers::getImageUrl($image['image_url'], 60, 60)
);
}
... ... @@ -734,7 +736,7 @@ class CartModel
do {
// 数据为空时返回空的标志
if (empty($data['goods_list'])) {
if (empty($data['goods_list']) && empty($data['sold_out_goods_list'])) {
break;
}
... ... @@ -786,8 +788,9 @@ class CartModel
}
// 结算数据
$result['price'] = Helpers::transPrice($data['shopping_cart_data']['order_amount']);
$result['activityPrice'] = Helpers::transPrice($data['shopping_cart_data']['discount_amount']);
$result['formulaPrice'] = $data['shopping_cart_data']['promotion_formula'];
/*$result['price'] = Helpers::transPrice($data['shopping_cart_data']['order_amount']);
$result['activityPrice'] = Helpers::transPrice($data['shopping_cart_data']['discount_amount']);*/
$result['count'] = $data['shopping_cart_data']['selected_goods_count'];
$result['isAllSelected'] = ($data['shopping_cart_data']['goods_count'] === $data['shopping_cart_data']['selected_goods_count']) && ($data['shopping_cart_data']['selected_goods_count'] >0);
$result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['last_order_amount']);
... ...
... ... @@ -71,7 +71,7 @@ class HomeModel
/**
* 设置选择的频道保存到浏览器COOKIE
* (已废弃,改成JS设置)
* (已废弃,改成JS设置)
*
* @param string $cookie
* @return void
... ...
... ... @@ -110,6 +110,11 @@ class DetailModel
}
}
// 没有商品ID, 则取一次
if (empty($productId)) {
$productId = isset($baseInfo['id']) ? $baseInfo['id'] : 0;
}
$result['feedbacks'] = array();
// 商品咨询
... ...
... ... @@ -40,10 +40,11 @@ class IndexController extends AbstractAction
$shoppingKey = Helpers::getShoppingKeyByCookie();
$uid = $this->getUid(true);
$cartType = $this->get('cartType', 'all');
$data = array(
'shoppingCartPage' => true,
'shoppingCart' => CartModel::getCartData($uid, $shoppingKey)
'shoppingCart' => CartModel::getCartData($uid, $shoppingKey, $cartType)
);
// 渲染模板
... ... @@ -275,7 +276,13 @@ class IndexController extends AbstractAction
$this->setNavHeader('确认订单', Helpers::url('/cart/index/index'), false); // 不显示右上角home按钮
// 购物车商品为空跳转到购物车页面
$cartType = $this->get('cartType', 'ordinary');
$cartType = $this->get('cartType', '');
$cookieData = $this->getCookie('order-info', null);
$orderInfo = array();
if (empty($cartType) && !empty($cookieData)) {
$orderInfo = json_decode($cookieData, true);
$cartType = $orderInfo['cartType'];
}
$cartKey = 'commonCart';
if ($cartType === 'advance') {
$cartKey = 'preSellCart';
... ... @@ -288,13 +295,10 @@ class IndexController extends AbstractAction
$this->go(Helpers::url('/cart/index/index'));
}
$cookieData = $this->getCookie('order-info', null);
$uid = $this->getUid(true);
$data = array(
'orderEnsurePage' => true,
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => CartModel::cartPay($uid, $cartType, $cookieData)
'orderEnsure' => CartModel::cartPay($uid, $cartType, $orderInfo)
);
$this->_view->display('order-ensure', $data);
... ... @@ -456,8 +460,8 @@ class IndexController extends AbstractAction
$result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey);
// 设置加入购物车凭证到客户端浏览器
if (!$shoppingKey && isset($result['data']['shopping_key'])) {
$this->setCookie('_Spk', $result['data']['shopping_key']);
if (empty($shoppingKey) && isset($result['data']['shopping_key'])) {
$this->setCookie('_SPK', $result['data']['shopping_key'], time() + 86400 * 360);
}
}
... ...
... ... @@ -3,7 +3,6 @@
use Action\AbstractAction;
use LibModels\Wap\Guang\DetailData;
use LibModels\Wap\Product\ListData;
use LibModels\Wap\Guang\OptData;
use Plugin\Helpers;
/**
... ...