Authored by hf

Merge branch 'beta/wap' of http://git.dev.yoho.cn/web/yohobuy into beta/wap

... ... @@ -5317,8 +5317,6 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
var $cart = $('.cart-bar');
var limitSaleHammer = (limitSaleHammer = document.getElementById('limit-sale')) && new Hammer(limitSaleHammer);
var appUrl = $('input[name="limitCodeUrl"]').val();
var dialog = require("js/me/dialog");
... ... @@ -5381,20 +5379,31 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
});
}
limitSaleHammer && limitSaleHammer.on('tap', function(e) {
var loginUrl = $('#loginUrl').val();
$('#limit-sale').on('touchend', function(e) {
var loginUrl = $('#loginUrl').val(),
ifr;
e.stopPropagation();
e.srcEvent.stopPropagation();
if(loginUrl) {
window.location = loginUrl;
} else {
dialog.showDialog({
dialogText: '打开有货APP限定发售频道\n获取限购码',
dialogText: '进入有货APP,获取限购码',
hasFooter: {
rightBtnText: '打开Yoho!Buy有货APP'
}
}, function() {
window.location.href = appUrl;
ifr = document.createElement('iframe');
ifr.src = appUrl;
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.location.href = appUrl;
window.setTimeout(function(){
document.body.removeChild(ifr);
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
},3000);
}, undefined, true);
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
... ...
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.

21.5 KB | W: | H:

21.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

32.8 KB | W: | H:

32.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43.9 KB | W: | H:

43.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

64 KB | W: | H:

64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

53.4 KB | W: | H:

53.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

32 KB | W: | H:

32 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43 KB | W: | H:

43 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

48.6 KB | W: | H:

48.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18 KB | W: | H:

18 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -18,8 +18,6 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
var $cart = $('.cart-bar');
var limitSaleHammer = (limitSaleHammer = document.getElementById('limit-sale')) && new Hammer(limitSaleHammer);
var appUrl = $('input[name="limitCodeUrl"]').val();
var dialog = require('../../me/dialog');
... ... @@ -82,20 +80,31 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
});
}
limitSaleHammer && limitSaleHammer.on('tap', function(e) {
var loginUrl = $('#loginUrl').val();
$('#limit-sale').on('touchend', function(e) {
var loginUrl = $('#loginUrl').val(),
ifr;
e.stopPropagation();
e.srcEvent.stopPropagation();
if(loginUrl) {
window.location = loginUrl;
} else {
dialog.showDialog({
dialogText: '打开有货APP限定发售频道\n获取限购码',
dialogText: '进入有货APP,获取限购码',
hasFooter: {
rightBtnText: '打开Yoho!Buy有货APP'
}
}, function() {
window.location.href = appUrl;
ifr = document.createElement('iframe');
ifr.src = appUrl;
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.location.href = appUrl;
window.setTimeout(function(){
document.body.removeChild(ifr);
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
},3000);
}, undefined, true);
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
... ...
... ... @@ -20,7 +20,7 @@
{{/navTitle}}
</header>
{{#navBtn}}
<div class="homebuttom hide {{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
<div class="homebuttom hide {{#if ../boys}} boys{{/if}}{{#if ../girls}} girls{{/if}}{{#if ../kids}} kids{{/if}}{{#if ../lifeStyle}} life-style{{/if}}">
<ul>
<li>
<a href="{{ indexUrl }}">
... ...
... ... @@ -15,8 +15,8 @@ use Plugin\Helpers;
class GirldayController extends HuodongAction
{
// const STATIC_FILE = 'http://localhost:2222/1.0.3';
const STATIC_FILE = 'http://cdn.yoho.cn/huodong/2016xinshili-2/1.0.3';
// const STATIC_FILE = 'http://localhost:2222/1.0.4';
const STATIC_FILE = 'http://cdn.yoho.cn/huodong/2016xinshili-2/1.0.4';
/**
* 检测登录状态
... ... @@ -62,6 +62,7 @@ class GirldayController extends HuodongAction
$this->_view->display('index', array(
'staticTitle' => 'YOHO!BUY有货【春潮新势力】',
'staticDesc' => '唤醒潮流,用新陪伴!白色情人节限时2件7折!',
'staticFile' => self::STATIC_FILE,
'staticJS' => array(
'home.js'
... ... @@ -71,13 +72,13 @@ class GirldayController extends HuodongAction
'getCouponUrl' => Helpers::url('/cuxiao/girlday/sendCoupon', array('uid' => $this->getLoggedUid())),
'banner' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2016/03/10/10/02b9827b20adc91409b5301f2232dc9144.jpg',
'url' => 'http://feature.yoho.cn/0310/0310APPHOME/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"YOHO!BUY有货【春潮新势力】", "url":"http://feature.yoho.cn/0310/0310APPHOME/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"382"},"param":{"share_id":"382"}}}'
'url' => 'http://feature.yoho.cn/0310/0310APPHOME/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"YOHO!BUY有货【春潮新势力】","url":"http://feature.yoho.cn/0310/0310APPHOME/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"382"},"param":{"share_id":"382"}}}'
),
'selectUrl' => 'http://m.yohobuy.com/home/coupons?openby:yohobuy={"action":"go.coupon"}',
'weixinUrl' => 'http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&mid=201849402&idx=1&sn=c0089812f9769d82e0075f69d771f6e1#rd', // 微信关注地址
'appUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr', // APP 下载地址
'shareTitle' => 'YOHO!BUY有货【春潮新势力】火力全开!320元优惠券限时派送中!',
'shareDesc' => '换我做主,用新陪伴!白色情人节限时2件7折!',
'shareDesc' => '唤醒潮流,用新陪伴!白色情人节限时2件7折!',
'shareImg' => 'http://img02.yohoboys.com/staticimg/2016/03/10/10/0298ef8fbbb543144af487fbcd6718041b.png',
'shareLink' => 'http://feature.yoho.cn/0310/0310APPHOME/index.html'
));
... ... @@ -122,4 +123,35 @@ class GirldayController extends HuodongAction
}
}
/**
* 领券活动-第三波页面控制器
*/
public function girlthreeAction(){
$this->checkLogin();
//获取跳转到个人中心-我的优惠券链接,并调用接口,完成领券操作
$myCouponUrl = Helpers::url('/home/coupons', null, 'default') . '?openby:yohobuy={"action":"go.coupon"}';
$this->_view->display('girlthree', array(
'staticTitle' => 'YOHO!BUY有货【春潮新势力】',
'staticFile' => self::STATIC_FILE,
'staticJS' => array(
'home.js'
),
'couponUrl' => $myCouponUrl, // 个人中心优惠券地址
'isApp' => $this->_isApp,
'getCouponUrl' => Helpers::url('/cuxiao/girlday/sendCoupon', array('uid' => $this->getLoggedUid())),
'banner' => array(
'img' => 'http://img02.yohoboys.com/staticimg/2016/03/10/10/02b9827b20adc91409b5301f2232dc9144.jpg',
'url' => 'http://feature.yoho.cn/0310/0310APPHOME/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"YOHO!BUY有货【春潮新势力】", "url":"http://feature.yoho.cn/0310/0310APPHOME/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"382"},"param":{"share_id":"382"}}}'
),
'selectUrl' => 'http://m.yohobuy.com/home/coupons?openby:yohobuy={"action":"go.coupon"}',
'weixinUrl' => 'http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&mid=201849402&idx=1&sn=c0089812f9769d82e0075f69d771f6e1#rd', // 微信关注地址
'appUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr', // APP 下载地址
'shareTitle' => 'YOHO!BUY有货【春潮新势力】火力全开!320元优惠券限时派送中!',
'shareDesc' => '换我做主,用新陪伴!白色情人节限时2件7折!',
'shareImg' => 'http://img02.yohoboys.com/staticimg/2016/03/10/10/0298ef8fbbb543144af487fbcd6718041b.png',
'shareLink' => 'http://feature.yoho.cn/0310/0310APPHOME/index.html'
));
}
}
... ...
... ... @@ -323,7 +323,7 @@ class DetailModel
self::procShowStatus($result, $showStatus, $isBeginSale);
$result['cartInfo']['limitProductCode'] = $baseInfo['limitProductCode'];
$result['cartInfo']['limitCodeUrl'] = self::getLimitCodeUrl($baseInfo['erpProductId']);
$result['cartInfo']['limitCodeUrl'] = self::getLimitCodeUrl($baseInfo['limitProductCode']);
$result['cartInfo']['limitProductPay'] = Helpers::url('/cart/index/orderEnsure');
} else {
$result['cartInfo']['addToCartUrl'] = Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html');
... ... @@ -878,16 +878,16 @@ class DetailModel
/**
* 根据设备类型获得限购商品跳转app的url
*
* @param string $skn 商品skn
* @param string $productCode 限购商品码
* @return string 限购商品跳转url
*/
private static function getLimitCodeUrl($skn)
private static function getLimitCodeUrl($productCode)
{
$url = 'yohoapp://yoho.app/openwith?product_skn=' . $skn;
$url = 'yohoapp://yoho.app/openwith?limit_product_code=' . $productCode;
// 苹果设备或者苹果IPAD
if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
$url = 'yohobuy://' . Helpers::url('/product', array('skn' => $skn));
$url = 'yohobuy://' . Helpers::url('/limitpurchase', array('lp' => $productCode));
}
return $url;
... ...
... ... @@ -283,8 +283,8 @@ class IndexController extends AbstractAction
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('确认订单');
$this->setNavHeader('确认订单', Helpers::url('/cart/index/index'), false); // 不显示右上角home按钮
// 返回地址
$returnUrl = Helpers::url('/cart/index/index');
$cartType = $this->get('cartType', '');
$cookieData = $this->getCookie('order-info', null);
... ... @@ -299,6 +299,9 @@ class IndexController extends AbstractAction
$sku = $this->get('sku', '');
$skn = $this->get('skn', '');
$buyNumber = $this->get('buy_number', 1);
if ($limitProductCode) {
$returnUrl = $this->server('HTTP_REFERER', $returnUrl);
}
// 购物车商品为空跳转到购物车页面
$uid = $this->getUid(true);
... ... @@ -320,6 +323,9 @@ class IndexController extends AbstractAction
'orderEnsure' => $order
);
$this->setTitle('确认订单');
$this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮
$this->_view->display('order-ensure', $data);
}
... ...