Authored by 周少峰

Merge branch 'release/4.5' of http://git.yoho.cn/fe/yohobuywap into release/4.5

... ... @@ -36,26 +36,27 @@ function downCount(options) {
_minute = _second * 60,
_hour = _minute * 60,
_day = _hour * 24,
days,
hours,
minutes,
seconds;
// calculate dates
days = Math.floor(difference / _day),
hours = Math.floor((difference % _day) / _hour),
minutes = Math.floor((difference % _hour) / _minute),
seconds = Math.floor((difference % _minute) / _second);
// fix dates so that it will show two digets
days = (String(days).length >= 2) ? days : '0' + days;
hours = (String(hours).length >= 2) ? hours : '0' + hours;
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes;
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds;
// set to DOM
$countdownContainer.removeClass('hide');
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
if (hours === 0) {
$countDownHours.text('剩余' + minutes + ':' + seconds);
} else {
$countDownHours.text('剩余' + hours + ':' + minutes + ':' + seconds);
}
difference -= 1000;
... ...
... ... @@ -131,7 +131,7 @@ class IndexController extends AbstractAction
$channel = $this->get('yh_channel');
// 标识是不是APP客户端
$isApp = is_numeric($channel);
$isApp = $this->isApp();
// APP访问时通过频道参数判断性别
if ($isApp) {
switch (intval($channel)) {
... ...
... ... @@ -31,12 +31,12 @@ class InfoController extends AbstractAction
$data['guang']['id'] = $id;
// 标识是不是APP访问的
$isApp = null !== $this->get('app_version', null);
$isApp = $this->isApp();
// 标识是否是微信访问
$isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
// WAP上设置头部导航
if (!$isApp && !$isWeixin) {
if (!$isApp || !$isWeixin) {
$this->setNavHeader('逛', true, SITE_MAIN);
}
... ...
... ... @@ -84,7 +84,7 @@ class PlusstarController extends AbstractAction
$channel = $this->get('yh_channel');
// 标识是不是APP客户端
$isApp = is_numeric($channel);
$isApp = $this->isApp();
// 标识是否是微信访问
$isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
// APP访问时通过频道参数判断性别
... ...