Authored by 周少峰

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/web-list

... ... @@ -8,8 +8,8 @@
<li class="head-title">验证身份</li>
<li class="po-re">
<label class="pn-label">手机号码</label>
<span class="country-code">+86</span>
<span class="phone-num">18115624066</span>
<span class="country-code">+{{area}}</span>
<span class="phone-num">{{phoneNum}}</span>
</li>
<li class="po-re">
<input id="captcha" class="input va captcha" type="text" name="captcha">
... ... @@ -21,8 +21,8 @@
</span>
</li>
<li>
<input name="area" id="area" type="hidden" value="86">
<input name="mobile" id="mobile" type="hidden" value="18115624066">
<input name="area" id="area" type="hidden" value="{{area}}">
<input name="mobile" id="mobile" type="hidden" value="{{phoneNum}}">
<input name="captchaPic" id="captchaPic" type="hidden" value="g7ce">
<input name="refer" id="refer" type="hidden" value="">
<input id="next-step" class="btn next-step disable" type="submit" value="下一步" disabled="">
... ...
... ... @@ -34,31 +34,7 @@
{{> product/left-content}}
</div>
<div class="list-right pull-right">
{{# shopEntry}}
<div class="shop-entry clearfix">
<a class="pull-left" href="{{home}}">
<img class="logo" src="{{logo}}">
</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
{{#unless @last}}
/
{{/unless}}
{{/each}}
</p>
</div>
<a class="entry-btn pull-right" href="{{home}}">
进入品牌店铺
<span class="iconfont">&#xe601;</span>
</a>
</div>
{{/ shopEntry}}
{{> product/shop-entry}}
{{> product/standard-content}}
... ... @@ -68,4 +44,4 @@
</div>
{{/ list}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
... ... @@ -3,9 +3,11 @@
{{# search}}
{{> layout/path-nav}}
{{> product/shop-entry}}
{{> product/standard-content}}
{{> product/latest-walk}}
{{/ search}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
{{# shopEntry}}
<div class="shop-entry clearfix">
<a class="pull-left" href="{{home}}">
<img class="logo" src="{{logo}}">
</a>
<div class="name pull-left">
<a class="shop-name" href="{{home}}">{{shopName}}</a>
<p class="sorts">
{{#each sort}}
<a href="{{href}}">{{name}}</a>
{{#unless @last}}
/
{{/unless}}
{{/each}}
</p>
</div>
<a class="entry-btn pull-right" href="{{home}}">
进入品牌店铺
<span class="iconfont">&#xe601;</span>
</a>
</div>
{{/ shopEntry}}
... ...
... ... @@ -73,7 +73,7 @@ class Bootstrap extends Bootstrap_Abstract
$action = 'Index';
// 二级域名
if (2 === $level) {
if (3 === $level) {
$subDomain = strval($hostParts[0]);
switch (strtolower($subDomain)) {
case 'www': // 主站
... ...
... ... @@ -70,18 +70,14 @@ class BrandsModel {
//获取静态内容(20141219-100447)
if($node){
$nodeContent = BrandData::getByNodeContent($node);
if(isset($nodeContent['code']) && $nodeContent['code'] === 200){
$result = $nodeContent['data'];
//接口返回html格式,非前端需要格式。
}
$nodeContent = HelperSearch::formatNodeContent($node);
$data['list']['leftContent'][]['picLink']['list'] = $nodeContent;
}
return $data;
}
/**
* 获取品牌首页banner条
* @string $domain 品牌域名
... ... @@ -99,52 +95,29 @@ class BrandsModel {
$bannerImg = Helpers::getImageUrl($bannerImg['data']['banner'], '', 150);
}
// 根据品牌Id获取品牌(简介)、收藏
if (isset($uid)) {
$intro = BrandData::getBrandIntro($brandId, $uid);
}
$intro = BrandData::getBrandIntro($brandId, $uid);
$is_favorite = false;
$logo = false;
$shopName = false;
do {
if (!isset($intro['data'])) {
break;
}
if(isset($intro['data'])){
// 获取是否收藏
if ($intro['data']['is_favorite'] == 'Y') {
$is_favorite = true;
} elseif ($intro['data']['is_favorite'] == 'N') {
$is_favorite = false;
}
// 获取品牌logo
$logo = Helpers::getImageUrl($intro['data']['brand_ico'], 80, 50);
// 获取品牌名
self::$shopName = $intro['data']['brand_name'];
} while (false);
self::$shopName = $intro['data']['brand_name'];
}
// 返回banner数据
return array(
'brandBanner' => array(
'bannerHeight' => '150',
'coled' => $is_favorite,
'banner' => $bannerImg
),
'shopEntry' => array(
'home' => self::$home,
'logo' => $logo,
'shopName' => self::$shopName,
'sort' => array(
array(
'href' => '',
'name' => 'T恤'
),
array(
'href' => '',
'name' => '卫衣'
)
)
)
);
'brandBanner' => array(
'bannerHeight' => '150',
'coled' => $is_favorite,
'banner' => $bannerImg
)
);
}
//获取品牌系列数据
... ... @@ -158,6 +131,8 @@ class BrandsModel {
$result['list'][$key]['src'] = $value['brand_sort_ico'];
}
}
$result['picTitle'] = '经典系列';
return $result;
}
... ...
... ... @@ -58,10 +58,9 @@ class SaleModel
$data['newSale']['saleTitle']['count'] = $data['newSale']['totalCount'];
//获取广告位
//获取广告位数据
$nodeContent = HelperSearch::formatNodeContent($special['left_ad_code']);
$data['newSale']['leftContent'][]['picLink'][] = $nodeContent;
$data['newSale']['leftContent'][]['picLink']['list'] = $nodeContent;
return $data;
}
... ...
... ... @@ -55,6 +55,7 @@ class BackController extends WebAction
$mobile = $phoneNum;
$data = BackData::sendCodeToMobile($mobile);
$this->setSession('phoneNum', $phoneNum);
$this->setSession('area', $area);
if($data['code'] == 200) {
$this->redirect('verification');
}
... ... @@ -159,12 +160,20 @@ class BackController extends WebAction
* 手机验证
*/
public function verificationAction() {
$phoneNum = $this->getSession('phoneNum');
$area = $this->getSession('area');
// if(empty($phoneNum)) {
// $this->redirect('index');
// }
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
$data = array(
'simpleHeader' => PassportModel::getSimpleHeader(false),
'vertificationPage' => true,
'verification' => array(
'coverHref' => '/passport',
'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
'coverHref' => $banner['url'],
'coverImg' => $banner['img'],
'phoneNum' => $phoneNum,
'area' => $area,
'countrys' => array()
)
);
... ...
<?php
use Action\WebAction;
use Product\BrandsModel;
use LibModels\Web\Product\BrandData;
class IndexController extends WebAction
{
... ... @@ -55,6 +54,7 @@ class IndexController extends WebAction
}
//传品牌ID参数
$condition['brand'] = $brandId;
//获取性别数据
$gender = $this->get('gender') ? ($this->get('gender') == '2,3' ? 2 : 1) : (!isset($_COOKIE['_Gender']) ? '3' : ($_COOKIE['_Gender']=='2,3' ? 2 : 1));
$condition['gender'] = $gender;
... ...
... ... @@ -13,16 +13,13 @@ class SaleController extends WebAction
public function indexAction()
{
//获取专区ID
$specialsaleId = $this->Param('specialsaleId');
$specialsaleId = 1; //测试数据
$specialsaleId = $this->param('specialsaleId');
$specialInfo = SaleData::getSpecial($specialsaleId);
$special = $specialInfo['data'];
// if (empty($specialsale_id)) {
// $specialsale_id = str_replace('specialsale', '', explode('.', $_SERVER['HTTP_HOST'])[0]);
// }
//获取促销ID
$promotion = $this->Param('promotion');
$promotion = $this->param('promotion');
//专区ID和促销ID都为空时,跳转到主页
if (empty($specialsaleId) && empty($promotion)) {
$this->go(SITE_MAIN);
... ... @@ -49,7 +46,7 @@ class SaleController extends WebAction
'viewNum' => FILTER_VALIDATE_INT,
'rowNum' => FILTER_VALIDATE_INT,
'page' => FILTER_VALIDATE_INT,), false);
//字符转码
if (!empty($condition)) {
foreach ($condition as &$value) {
... ... @@ -63,7 +60,9 @@ class SaleController extends WebAction
//传促销id
if(!empty($special['ispromotion'])){
//$condition['promotion'] = $special['ispromotion'];
$condition['promotion'] = $special['ispromotion'];
}else{
$condition['promotion'] = $promotion;
}
//获取性别数据
... ... @@ -73,7 +72,7 @@ class SaleController extends WebAction
//每页显示商品数
if (!isset($condition['viewNum']) || empty($condition['viewNum'])) {
$condition['viewNum'] = 59;
}
}
$view_num_arr = array(60, 100, 200);
if (!in_array($condition['viewNum'], $view_num_arr)) {
$condition['viewNum'] = 59;
... ... @@ -108,7 +107,6 @@ class SaleController extends WebAction
$params = array_filter($params);
$data = Product\SaleModel::getSaleSearchData($params, $options, $specialInfo);
$cate = array('boys', 'girls', 'kids', 'lifestyle');
$this->setWebNavHeader($cate[$gender - 1]);
//渲染模板
... ...