Authored by Rock Zhang

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

Conflicts:
	library/LibModels/Wap/Category/BrandData.php
	yohobuy/m.yohobuy.com/application/modules/Product/controllers/List.php
Showing 38 changed files with 856 additions and 237 deletions
... ... @@ -728,7 +728,9 @@
## 商品列表页
{
goodList: {
search: '', //是否显示搜索栏并指定初始值
search: {
default: ''
}, //是否显示搜索栏并指定初始值
brandWay: { //品牌入口
url: '',
thumb: '',
... ... @@ -736,6 +738,7 @@
},
brand: {
id: 0,
banner: ''
intro: '...'
},
new: [
... ...
... ... @@ -296,17 +296,17 @@ class AbstractAction extends Controller_Abstract
/**
* 设置网站导航头部信息
*
* @param string $backUrl 返回的链接
* @param string $title 头部标题
* @param string $backUrl 返回的链接
* @param string $homeUrl 返回首页的链接
* @return void
*/
protected function setNavHeader($backUrl, $title, $homeUrl)
protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/')
{
$header = array();
if (!empty($backUrl)) {
$header['navBack'] = $backUrl;
if ($backUrl) {
$header['navBack'] = true;
}
if (!empty($title)) {
$header['navTitle'] = $title;
... ...
... ... @@ -16,12 +16,43 @@ use Api\Sign;
*/
class BrandData
{
const URI_BRAND_TOPPOS = 'operations/api/v5/resource/get';
/**
* 封装获取品牌一览页面的数据
*
* @param string $contentCode 获取广告资源需要的位置码
* @param int $channel 频道标识 1:男,2:女,3:潮童,4:创意生活
* @return array(
* "brandTop": "顶部的轮翻广告及热门品牌数据",
* "brandList": "按字母'A-Z'分组的品牌列表数据"
* )
* @author fei.hong <fei.hong@yoho.cn>
*/
public static function package($contentCode, $channel)
{
$urlList = array();
/* 顶部的轮翻广告及热门品牌数据 */
$param = Yohobuy::param();
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
$urlList['brandTop'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
/* 按字母"A-Z"分组的品牌列表数据 */
$param = Yohobuy::param();
$param['method'] = 'app.brand.brandlist';
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
$urlList['brandList'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::getMulti($urlList);
}
/**
* 获取品牌数据
*
* @param integer $channel 是否,默认1表示是,传值为空是app中用于品牌搜索的数据
*
* @return array 品牌数据
*/
public static function getBrandsData($channel = 1)
... ... @@ -36,6 +67,22 @@ class BrandData
}
/**
* 获取品牌页顶部楼层数据
*
* @param string $contentCode 位置码
* @return array 品牌也顶部楼层数据
*/
public static function getBrandTopData($contentCode)
{
// 构建必传参数
$param = Yohobuy::param();
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
}
/**
* 获取品牌介绍
*
* @param integer $brandId 品牌ID
... ...
... ... @@ -11,27 +11,42 @@ class FloorProcess
{
/**
* 频道参数
*
* @var array
*/
private static $channel = array(
'1' => '1,3',
'2' => '2,3'
);
/**
* 处理首页内容
* @param $data
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
*/
public static function getContent($data, $type = 1)
{
if (empty($data['list'])) {
return array();
}
$result = array();
if (!empty($data['list'])) {
$build = array();
foreach ($data['list'] as $v) {
$fun = $v['template_name'];
if (!is_callable("self::$fun")) {
continue;
}
$build = self::$fun($v['data'], $type);
if (empty($build)) {
continue;
}
$result[] = $build;
$build = array();
foreach ($data['list'] as $v) {
$fun = $v['template_name'];
if (empty($v['data']) || !is_callable("self::$fun")) {
continue;
}
$build = self::$fun($v['data'], $type);
if (empty($build)) {
continue;
}
$result[] = $build;
}
$build = array();
return $result;
}
... ... @@ -46,16 +61,35 @@ class FloorProcess
$result = array();
foreach ($data as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);
$one['url'] = Helpers::getFilterUrl($one['url']);
$one['img'] = Helpers::getImageUrl($one['src'], 640, 310);
unset($one['src']);
}
$result['bannerTop']['list'] = $data;
return $result;
}
/**
* 图标
*/
private static function floor($data)
{
$result = array();
foreach ($data as &$one) {
$one['url'] = Helpers::getFilterUrl($one['url']);
$one['img'] = Helpers::getImageUrl($one['src'], 98, 98);
unset($one['src']);
}
$result['list'] = $data;
$result['iconsEnter']['list'] = $data;
return array('bannerTop' => $result);
return $result;
}
/**
* 图标列表数据处理方法
*
* @param array $data 图标列表数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的图标列表数据
... ... @@ -65,36 +99,66 @@ class FloorProcess
$result = array();
foreach ($data as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
$one['url'] = Helpers::getFilterUrl($one['url']);
$one['img'] = Helpers::getImageUrl($one['src'], 98, 98);
unset($one['src']);
}
$result['list'] = $data;
$result['iconsEnter']['list'] = $data;
return array('iconsEnter' => $result);
return $result;
}
/**
* 单图片数据处理方法
* 单广告图片数据处理方法
*
* @param array $data 单图片数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的单图片数据
*/
private static function single_image($data, $type)
{
if (empty($data)) {
return array();
}
$result = array();
foreach ($data as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 750, 364, 1);
$one['url'] = Helpers::getFilterUrl($one['url']);
$one['img'] = Helpers::getImageUrl($one['src'], 640, 200);
unset($one['src']);
}
$result['banner'] = $data;
return $result;
}
/**
* 女生品类
*/
private static function recommend_content_three($data, $type)
{
$result = array();
$build = array();
if (!empty($data['big_image'][0])) {
$build['img'] = Helpers::getImageUrl($data['big_image'][0]['src'], 640, 198);
$build['url'] = Helpers::getFilterUrl($data['big_image'][0]['url']);
$result['hotCategory']['banner'] = $build;
}
$build = array();
foreach ($data['list'] as $one) {
$build['url'] = Helpers::getFilterUrl($one['url']);
$build['img'] = Helpers::getImageUrl($one['src'], 140, 140);
$build['textCn'] = $one['title'];
$result['hotCategory']['list'][] = $build;
}
return array('banner' => $data);
return $result;
}
/**
* 带标题的12个小图推荐数据处理方法
*
* @param array $data 带标题的12个小图推荐数据
* @param $type 类型 默认1:男首页 2:女首页 3:kids 4:lifestyle
* @return array 处理之后的带标题的12个小图推荐数据
... ... @@ -104,15 +168,20 @@ class FloorProcess
$result = array();
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 140, 140);
$one['textCn'] = $one['title'];
unset($one['src']);
}
$data['is_show_name'] = $data['title']['is_show'];
$data['name'] = $data['title']['title'];
unset($data['title']);
$result = $data;
return array('hotCategory' => $result);
$result['hotCategory'] = $data;
return $result;
}
/**
... ... @@ -125,16 +194,20 @@ class FloorProcess
{
$result = array();
$data['is_show_name'] = (isset($data['is_show_name']) && $data['is_show_name'] == 'Y') ? 1 : 0;
$data['is_show_name'] = (isset($data['is_show_name']) && $data['is_show_name'] === 'Y') ? 1 : 0;
$data['name'] = $data['title']['title'];
unset($data['title']);
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 158, 174);
unset($one['src']);
}
$result = $data;
$data['more'] = '/category/brand/index?channel=' . $type;
$result['hotBrands'] = $data;
return array('hotBrands' => $result);
return $result;
}
/**
... ... @@ -148,16 +221,22 @@ class FloorProcess
$result = array();
foreach ($data['article'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 400, 400);
unset($one['src']);
}
foreach ($data['recommend_collocation'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 140, 140);
unset($one['src']);
}
$result = $data;
$result['trendColloaction'] = $data;
return array('trendColloaction' => $result);
return $result;
}
/**
... ... @@ -171,12 +250,15 @@ class FloorProcess
$result = array();
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 580, 360);
unset($one['src']);
}
$result = $data;
$result['trendTopics'] = $data;
return array('trendTopics' => $result);
return $result;
}
/**
... ... @@ -190,19 +272,33 @@ class FloorProcess
$result = array();
foreach ($data['big_image'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 640, 403);
unset($one['src']);
}
$data['banner']['list'] = $data['big_image'];
unset($data['big_image']);
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
foreach ($data['list'] as $kk => &$one) {
if ($kk == 0) {
$one['img'] = Helpers::getImageUrl($one['src'], 253, 383);
} else {
$one['img'] = Helpers::getImageUrl($one['src'], 191, 191);
}
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['textCn'] = $one['title'];
unset($one['src']);
}
$result = $data;
return array('goodsCategory' => $result);
unset($data['big_image']);
$result['goodsCategory'] = $data;
return $result;
}
/**
... ... @@ -217,19 +313,25 @@ class FloorProcess
$data['banner'] = array();
foreach ($data['big_image'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 640, 400);
unset($one['src']);
}
$data['banner'] = $data['big_image'];
unset($data['big_image']);
foreach ($data['list'] as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 212, 192);
unset($one['src']);
}
$result = $data;
$result['creativeLife'] = $data;
return array('creativeLife' => $result);
return $result;
}
/**
... ... @@ -240,15 +342,21 @@ class FloorProcess
*/
private static function small_pic($data, $type)
{
// 按照以前业务操作,不显示
return array();
$result = array();
foreach ($data as &$one) {
$one['img'] = Helpers::getImageUrl($one['src'], 186, 203, 1);
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 98, 98);
unset($one['src']);
}
$result = $data;
$result['small_pic'] = $data;
return array('small_pic' => $result);
return $result;
}
/**
... ... @@ -264,9 +372,47 @@ class FloorProcess
}
$data['name'] = $data['title'];
$data['img'] = Helpers::getImageUrl($data['src'], 640, 198, 2);
$data['img'] = Helpers::getImageUrl($data['src'], 640, 198);
if (isset($data['url'])) {
$data['url'] = Helpers::getFilterUrl($data['url']);
}
return array('plusStar' => $data);
}
/**
* 自定义品牌
*
* @param unknown $data
* @param mixed $type
* @return multitype:
*/
private static function custom_brands($data, $type)
{
// URL附加参数
$param = '';
if (isset(self::$channel[$type])) {
$param = '/?gender=' . self::$channel[$type];
}
$result = array();
$result['hotBrandsScroll']['name'] = $data['title']['title'];
foreach ($data['list'] as &$one) {
if (isset($one['url'])) {
$one['url'] = Helpers::getFilterUrl($one['url']);
}
$one['img'] = Helpers::getImageUrl($one['src'], 140, 140);
$one['textCn'] = $one['name'];
if (isset($one['url'])) {
$one['url'] .= $param;
}
}
if (!empty($data['is_show_name']) && $data['is_show_name'] == 'Y') {
$result['hotBrandsScroll']['is_show_name'] = true;
}
$result['hotBrandsScroll']['list'] = $data['list'];
return $result;
}
}
... ...
... ... @@ -10,15 +10,26 @@ class Helpers
/**
* 根据尺寸获得图片url
* @param string $fileName 文件名
* @param string $url 路径
* @param integer $width 图片宽度
* @param integer $height 图片高度
* @param integer $mode 模式
* @return string 图片地址
*/
public static function getImageUrl($fileName, $width, $height, $mode = 2)
public static function getImageUrl($url, $width, $height, $mode = 2)
{
return strtr($fileName, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
return strtr($url, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
}
/**
* 获取过滤后的URL链接
*
* @param string $url 路径
* @return string 去除掉如&openby:yohobuy={"action":"go.brand"}这样的APP附加参数
*/
public static function getFilterUrl($url)
{
return strstr($url, '&openby:yohobuy=', true);
}
/**
... ...
This diff could not be displayed because it is too large.
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 Wed Oct 21 13:32:56 2015
Created by FontForge 20120731 at Wed Oct 21 18:23:04 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Oct 21 13:32:56 2015
bbox="0 -224 3943 812.871"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E622"
unicode-range="U+0078-E623"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -140,5 +140,7 @@ t-2.5 -15v-80h-208q-20 0 -34 -14t-14 -34v-80h832v80q0 6 -1.5 11t-3.5 10t-5.5 9t-
<glyph glyph-name="uniE622" unicode="&#xe622;" horiz-adv-x="1173"
d="M586 588q-64 150 -188 203q-114 47 -222 -7q-112 -56 -155 -192q-20 -67 -21 -144q0 -41 9 -78.5t24 -66.5t39 -57.5t47 -48.5t55.5 -43t56.5 -38t58.5 -35.5t53.5 -33.5q63 -42 118 -94.5t86.5 -95t39.5 -69.5q4 19 25.5 50t53.5 66t75 74t88 71q21 15 53.5 35.5t58 36
t57 38t55 43t47 48t39 56.5t25 66.5t8.5 78.5q0 75 -19.5 138t-52.5 105.5t-76.5 70.5t-91 37.5t-98 1t-96 -34.5t-85.5 -72.5t-67 -108.5z" />
<glyph glyph-name="uniE623" unicode="&#xe623;"
d="M835 576l-60 63l-263 -275v0l-263 275l-60 -63l262 -276l-262 -276l60 -63l263 275v0l263 -275l60 63l-262 276z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -7,6 +7,10 @@
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.zeptolazyload');
//品牌页参数
var $brandHeader = $('#brand-header'),
$introBox = $('#intro-box');
var filter = require('../plugin/filter');
var $goodsContainer = $('#goods-container'),
... ... @@ -276,4 +280,22 @@ $(window).scroll(function() {
$(document).height() - 0.25 * $goodsContainer.height()) {
search();
}
});
//品牌介绍
$brandHeader.children('.btn-intro').bind('touchstart', function() {
$introBox.removeClass('hide');
});
$('.close-intro, .brand-intro-box').click(function() {
$introBox.addClass('hide');
});
$('#brand-intro').click(function(e) {
e.stopPropagation();
});
//品牌收藏
$brandHeader.children('.btn-col').bind('touchstart', function() {
$(this).toggleClass('coled');
});
\ No newline at end of file
... ...
.brand-page {
.newbrand-search {
width: 93.75%;
height: 30px;
padding: 7px 3.125%;
background-color: #f8f8f8;
left: 0;
z-index: 10;
.search-box {
position: relative;
height: 30px;
background-color: #FFF;
border-radius: 15px;
padding: 0 16px 0 26px;
.search-input {
width: 100%;
height: 30px;
border: 0;
}
.search-icon {
position: absolute;
font-size: 12px;
top: 16px;
left: 24px;
}
}
}
.hot-brand {
margin: (30rem / $pxConvertRem) 0 0;
... ...
... ... @@ -43,11 +43,7 @@
white-space: nowrap;
}
}
.brand:nth-child(4n) {
border-right: none;
}
.more {
float: left;
width: 317rem / $pxConvertRem;
... ...
... ... @@ -17,9 +17,6 @@
display: -webkit-flex;
width: 98rem / $pxConvertRem;
height: 98rem / $pxConvertRem;
border-radius: 50%;
border: 2rem / $pxConvertRem solid #e0e0e0;
box-sizing: border-box;
overflow: hidden;
align-items:center;
justify-content: center;
... ...
... ... @@ -39,4 +39,18 @@
color: #000;
}
}
.load-more-info {
width: 100%;
height: 570rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -96,10 +96,59 @@
.btn-col {
right: 15px;
.iconfont {
font-size: 12px;
}
}
.brand-intro-box {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,.3);
padding: 44px 0;
z-index: 1;
overflow: auto;
.brand-intro {
position: relative;
box-sizing: border-box;
width: 85%;
margin: 0 7.5%;
background: #fff;
padding: 10px 8%;
}
h2 {
text-align: center;
font-size: 17px;
line-height: 40px;
}
.con {
font-size: 12px;
line-height: 16px;
padding: 20px 0;
border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6;
overflow-x: hidden;
}
.fo {
font-size: 18px;
height: 40px;
line-height: 40px;
text-align: center;
}
.close-intro {
position: absolute;
top: 6px;
right: 6px;
}
}
.list-nav {
... ...
{{> layout/header}}
<div class="brand-page yoho-page">
<div class="newbrand-search" style="position: fixed; top: 44px;">
<div class="search-box clearfix">
<a href="/index/search/index" >
<input type="text" class="search-input" placeholder="查找品牌" name="query" id="query" value="" disabled="">
<i class="search-icon iconfont clearfix"></i>
</a>
</div>
</div>
{{# bannerTop}}
{{> home/banner_top}}
{{/ bannerTop}}
... ...
... ... @@ -24,7 +24,7 @@
{{/ brandWay}}
{{# brand}}
<div class="brand-header" data-id={{id}}>
<div id="brand-header" class="brand-header" data-id={{id}}>
<img class="lazy" data-original={{banner}}>
<a class="btn-intro" href="javascript:void(0);">
品牌介绍
... ... @@ -34,8 +34,18 @@
收藏
</a>
</div>
<div class="brand-intro-box">
<div id="brand-intro" class="brand-intro">{{intro}}</div>
<div id="intro-box" class="brand-intro-box hide">
<div id="brand-intro" class="brand-intro">
<h2>品牌介绍</h2>
<div class="con">
{{{intro}}}
</div>
<p class="fo">
<span></span>
100%品牌授权正品
</p>
<span class="iconfont close-intro">&#xe623;</span>
</div>
</div>
{{/ brand}}
... ...
<div class="floor-header">
<h2>{{name}}</h2>
</div>
... ...
<div class="hot-category">
{{> home/floor_header}}
{{# banner}}
<a class="banner" href="{{url}}">
<img class="lazy" data-original="{{img}}">
</a>
{{/ banner}}
<ul class="category-list clearfix">
{{# list}}
<li>
... ...
... ... @@ -7,7 +7,7 @@
<div id="goods-list" class="goods-list clearfix"></div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
... ...
... ... @@ -12,7 +12,7 @@
<div class="recommend-swiper">
<ul class="recommend-list clearfix">
{{# recommend_collocation}}
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="lazy" src="{{img}}" alt="" /></a></li>
<li class="recommend-item swiper-slide"><a href="{{url}}"><img class="img" src="{{img}}" alt="" /></a></li>
{{/ recommend_collocation}}
</ul>
</div>
... ...
{{> layout/page_footer}}
{{#if rlsEnv}}
<script src="http://static.wap.yohobuy.com/js/sea.js"></script>
<script>seajs.config({base:'http://static.wap.yohobuy.com/'});</script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
{{/if}}
{{#if testEnv}}
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/lib.js"></script>
<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index.js"></script>
{{/if}}
{{#if devEnv}}
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>
seajs.config({
base: 'http://localhost:8000/'
});
</script>
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://localhost:8000/'});</script>
{{/if}}
{{> layout/use}}
</body>
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{title}}YOHO!有货</title>
<meta name="keywords" content="{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(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>
{{#if rlsEnv}}
<link rel="stylesheet" href="http://static.wap.yohobuy.com/css/index.css">
{{/if}}
{{#if testEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
{{/if}}
{{#if devEnv}}
<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
{{/if}}
<meta charset="utf-8">
<title>{{title}}YOHO!有货</title>
<meta name="keywords" content="{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(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>
{{#if rlsEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
{{/if}}
{{#if testEnv}}
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index.css">
{{/if}}
{{#if devEnv}}
<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
{{/if}}
</head>
<body {{#if isPassportPage}}class=passport-body{{/if}}>
{{> layout/page_header}}
\ No newline at end of file
{{> layout/page_header}}
\ No newline at end of file
... ...
{{#pageHeader}}
<header class="yoho-header">
{{#navBack}}
<a href={{.}} class="nav-back"></a>
{{/navBack}}
{{#navHome}}
<a href={{.}} class="nav-home"></a>
{{/navHome}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
{{/navTitle}}
</header>
{{#pageHeader}}
<header class="yoho-header">
{{#if navBack}}
<a href="javascript:history.go(-1);" class="nav-back"></a>
{{/if}}
{{#navHome}}
<a href="{{.}}" class="nav-home"></a>
{{/navHome}}
{{#navTitle}}
<p class="nav-title">{{.}}</p>
{{/navTitle}}
</header>
{{/pageHeader}}
\ No newline at end of file
... ...
<script>
seajs.use('js/common');
</script>
{{!-- 逛(PLUS+STAR) --}}
{{#if psList}}
<script>
seajs.use('js/guang/plus-star/list');
</script>
<script>
seajs.use('js/guang/plus-star/list');
</script>
{{/if}}
{{#if psDetail}}
<script>
seajs.use('js/guang/plus-star/detail');
</script>
<script>
seajs.use('js/guang/plus-star/detail');
</script>
{{/if}}
{{#if guangHome}}
<script>
seajs.use('js/guang/home');
</script>
<script>
seajs.use('js/guang/home');
</script>
{{/if}}
{{#if guangList}}
<script>
seajs.use('js/guang/list');
</script>
<script>
seajs.use('js/guang/list');
</script>
{{/if}}
{{#if guangDetail}}
<script>
seajs.use('js/guang/detail');
</script>
<script>
seajs.use('js/guang/detail');
</script>
{{/if}}
{{!-- 注册 --}}
{{#if regIndex}}
<script>
seajs.use('js/passport/register/register');
</script>
<script>
seajs.use('js/passport/register/register');
</script>
{{/if}}
{{#if regCode}}
<script>
seajs.use('js/passport/register/code');
</script>
<script>
seajs.use('js/passport/register/code');
</script>
{{/if}}
{{#if regPwd}}
<script>
seajs.use('js/passport/register/password');
</script>
<script>
seajs.use('js/passport/register/password');
</script>
{{/if}}
{{!-- 登陆 --}}
{{#if loginIndex}}
<script>
seajs.use('js/passport/login/login');
</script>
<script>
seajs.use('js/passport/login/login');
</script>
{{/if}}
{{#if loginInterational}}
<script>
seajs.use('js/passport/login/interational');
</script>
<script>
seajs.use('js/passport/login/interational');
</script>
{{/if}}
{{!-- 密码找回 --}}
{{#if backEmail}}
<script>
seajs.use('js/passport/back/email');
</script>
<script>
seajs.use('js/passport/back/email');
</script>
{{/if}}
{{#if backEmailSuccess}}
<script>
seajs.use('js/passport/back/email-success');
</script>
<script>
seajs.use('js/passport/back/email-success');
</script>
{{/if}}
{{#if backMobile}}
<script>
seajs.use('js/passport/back/mobile');
</script>
<script>
seajs.use('js/passport/back/mobile');
</script>
{{/if}}
{{#if backCode}}
<script>
seajs.use('js/passport/back/code');
</script>
<script>
seajs.use('js/passport/back/code');
</script>
{{/if}}
{{#if backNewPwd}}
<script>
seajs.use('js/passport/back/new-password');
</script>
<script>
seajs.use('js/passport/back/new-password');
</script>
{{/if}}
{{!-- 首页 --}}
{{#if grilsHomePage}}
<script>
seajs.use('js/home/home');
</script>
<script>
seajs.use('js/home/home');
</script>
{{/if}}
{{#if boysHomePage}}
<script>
seajs.use('js/home/home');
</script>
<script>
seajs.use('js/home/home');
</script>
{{/if}}
{{#if kidsHomePage}}
<script>
seajs.use('js/home/home');
</script>
<script>
seajs.use('js/home/home');
</script>
{{/if}}
{{#if lifestyleHomePage}}
<script>
seajs.use('js/home/home');
</script>
<script>
seajs.use('js/home/home');
</script>
{{/if}}
{{!-- 新品到着 --}}
{{#if newArrival}}
<script>
seajs.use('js/product/newsale/newarrival');
</script>
<script>
seajs.use('js/product/newsale/newarrival');
</script>
{{/if}}
{{!-- 折扣专区 --}}
{{#if discount}}
<script>
seajs.use('js/product/newsale/discount');
</script>
<script>
seajs.use('js/product/newsale/discount');
</script>
{{/if}}
{{!-- 商品列表 --}}
{{#if goodListPage}}
<script>
seajs.use('js/product/list');
</script>
<script>
seajs.use('js/product/list');
</script>
{{/if}}
{{!-- 品类 --}}
{{#if categoryPage}}
<script>
seajs.use('js/category/index');
</script>
<script>
seajs.use('js/category/index');
</script>
{{/if}}
{{!-- 品牌 --}}
{{#if brandPage}}
<script>
seajs.use('js/category/brand');
</script>
<script>
seajs.use('js/category/brand');
</script>
{{/if}}
{{!-- 搜索 --}}
{{#if searchPage}}
<script>
seajs.use('js/index/search');
</script>
<script>
seajs.use('js/index/search');
</script>
{{/if}}
{{!-- 购物车 --}}
{{#if shoppingCartPage}}
<script>
seajs.use('js/shopping-cart/index');
</script>
<script>
seajs.use('js/shopping-cart/index');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -13,6 +13,9 @@ class BoysController extends AbstractAction
*/
public function indexAction()
{
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel::setSwitchToCookie(Index\HomeModel::COOKIE_NAME_BOYS);
// 设置网站标题
$this->setTitle('男生首页');
// 显示侧边栏
... ...
... ... @@ -13,6 +13,9 @@ class GirlsController extends AbstractAction
*/
public function indexAction()
{
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel::setSwitchToCookie(Index\HomeModel::COOKIE_NAME_GIRLS);
// 设置网站标题
$this->setTitle('女生首页');
// 显示侧边栏
... ... @@ -27,7 +30,6 @@ class GirlsController extends AbstractAction
'maybeLike' => true,
'content' => Index\HomeModel::getGirlsFloor()
));
}
}
... ...
... ... @@ -13,6 +13,10 @@ class IndexController extends AbstractAction
*/
public function indexAction()
{
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
Index\HomeModel::goSwitchChannel();
// 渲染模板
$this->_view->display('index', array(
'background' => Index\HomeModel::getBgImage()
));
... ...
... ... @@ -13,6 +13,9 @@ class KidsController extends AbstractAction
*/
public function indexAction()
{
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel::setSwitchToCookie(Index\HomeModel::COOKIE_NAME_KIDS);
// 设置网站标题
$this->setTitle('潮童首页');
// 显示侧边栏
... ... @@ -27,7 +30,6 @@ class KidsController extends AbstractAction
'maybeLike' => true,
'content' => Index\HomeModel::getKidsFloor()
));
}
}
... ...
... ... @@ -13,6 +13,9 @@ class LifestyleController extends AbstractAction
*/
public function indexAction()
{
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel::setSwitchToCookie(Index\HomeModel::COOKIE_NAME_LIFESTYLE);
// 设置网站标题
$this->setTitle('创意生活首页');
// 显示侧边栏
... ... @@ -27,7 +30,6 @@ class LifestyleController extends AbstractAction
'maybeLike' => true,
'content' => Index\HomeModel::getLifestyleFloor()
));
}
}
... ...
<?php
namespace Category;
use LibModels\Wap\Category\BrandData;
use Configs\CacheConfig;
use Plugin\Helpers;
/**
* 品牌相关的模板数据模型
*
* @name BrandModel
* @package Models/Category
* @copyright yoho.inc
* @version 1.0 (2015-10-21 13:52:44)
* @author fei.hong <fei.hong@yoho.cn>
*/
class BrandModel
{
/* 男生频道取品牌广告及热门品牌数据的位置码 */
const CODE_TOPPOS_BOYS = 'ce6ac059493ec26241a8cbe0bfa1b17a';
/* 女生频道取品牌广告及热门品牌数据的位置码 */
const CODE_TOPPOS_GIRLS = 'dac99cdedc1f948e84c145aca561f7d2';
/* 潮童频道取品牌广告及热门品牌数据的位置码 */
const CODE_TOPPOS_KIDS = '713784f93f52bb1a7b93916b2bb15510';
/* 创意生活频道取品牌广告及热门品牌数据的位置码 */
const CODE_TOPPOS_LIFESTYLE = 'f1aa914fd23cbcda71a87de6f5416c75';
/**
* 根据频道获取品牌一览数据
*
* @param int $channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
* @return array
*/
public static function getBrandByChannel($channel)
{
$result = array();
$brand = array();
/* 根据频道调用接口 */
switch (intval($channel)) {
case 1: // 男生
$brand = BrandData::package(self::CODE_TOPPOS_BOYS, 1);
break;
case 2: // 女生
$brand = BrandData::package(self::CODE_TOPPOS_GIRLS, 2);
break;
case 3: // 潮童
$brand = BrandData::package(self::CODE_TOPPOS_KIDS, 3);
break;
case 4: // 创意生活
$brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4);
break;
}
/* 顶部的轮翻广告列表 */
if (!empty($brand['brandTop'][0]['data'])) {
$build = array();
foreach ($brand['brandTop'][0]['data'] as $value) {
$build['url'] = Helpers::getFilterUrl($value['url']);
$build['img'] = Helpers::getImageUrl($value['src'], 640, 300);
$build['title'] = $value['title'];
$result['bannerTop']['list'][] = $build;
}
}
/* 顶部的热门品牌列表 */
if (!empty($brand['brandTop'][1]['data']['list'])) {
$build = array();
foreach ($brand['brandTop'][1]['data']['list'] as $value) {
$build['url'] = Helpers::getFilterUrl($value['url']);
$build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
$build['name'] = $value['name'];
$result['hotBrand']['list'][] = $build;
}
}
/* 按字母'A-Z'分组的品牌列表 */
if (!empty($brand['brandList']['brands'])) {
$list = array();
$build = array();
foreach ($brand['brandList']['brands'] as $char => $value) {
$build['title'] = $char;
$build['list'] = array();
foreach ($value as $row) {
$list['name'] = $row['brand_name'];
$list['isHot'] = ($row['is_hot'] === 'Y') ? true : false;
$list['isNew'] = ($row['is_show_new'] === 'Y') ? true : false;
$list['url'] = 'http://' . $row['brand_domain'] . '.' . OLD_DOMAIN;
$build['list'][] = $list;
}
$result['brandList'][] = $build;
}
}
$brand = array();
return $result;
}
}
... ...
... ... @@ -19,8 +19,8 @@ use Configs\CacheConfig;
*/
class HomeModel
{
/* 频道选择页取背景图片的位置码 */
const CODE_BG = '7ba9118028f9b22090b57341487567eb';
/* 男生楼层资源的位置码 */
... ... @@ -37,6 +37,44 @@ class HomeModel
/* 女生底部广告的位置码 */
const CODE_BANNER_BOTTOM_GIRLS = '8c8bd1b89a22e5895f05882e0825b493';
/* COOKIE标识访问的是男生频道 */
const COOKIE_NAME_BOYS = 'boys';
/* COOKIE标识访问的是女生频道 */
const COOKIE_NAME_GIRLS = 'girls';
/* COOKIE标识访问的是潮童频道 */
const COOKIE_NAME_KIDS = 'kids';
/* COOKIE标识访问的是创意生活频道 */
const COOKIE_NAME_LIFESTYLE = 'lifestyle';
/**
* 选择频道
*
* @return void
*/
public static function goSwitchChannel()
{
// 通过COOKIE检查是否已设置过首页频道时,跳转到对应的频道页
if (!empty($_COOKIE['_Channel'])) {
headers_sent() || header('Location: /' . $_COOKIE['_Channel']);
exit();
}
// 没有Cookie时, 设置默认访问的频道
else {
self::setSwitchToCookie(self::COOKIE_NAME_BOYS);
}
}
/**
* 设置选择的频道保存到浏览器COOKIE
*
* @param string $cookie
* @return void
*/
public static function setSwitchToCookie($cookie)
{
setcookie('_Channel', $cookie, time() + 86400 * 300, '/', '.' . SITE_DOMAIN);
}
/**
* 获取频道选择页的背景图片
*
... ... @@ -44,6 +82,8 @@ class HomeModel
*/
public static function getBgImage()
{
$result = false;
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get(CacheConfig::KEY_ACTION_INDEX_INDEX, 'master');
... ... @@ -56,8 +96,6 @@ class HomeModel
$banner = IndexData::getBannerStart(self::CODE_BG);
if (isset($banner['data'][0]['data']['list'][0]['src'])) {
$result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 1);
} else {
$result = false;
}
if (USE_CACHE) {
... ... @@ -76,9 +114,13 @@ class HomeModel
/**
* 获取男生首页的楼层数据
*
* @return array | false
*/
public static function getBoysFloor()
{
$result = array();
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get(CacheConfig::KEY_ACTION_BOYS_INDEX, 'master');
... ... @@ -103,15 +145,19 @@ class HomeModel
Cache::set(CacheConfig::KEY_ACTION_BOYS_INDEX, $result);
}
}
return $result;
}
/**
* 获取女生首页的楼层数据
*
* @return array | false
*/
public static function getGirlsFloor()
{
$result = array();
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get(CacheConfig::KEY_ACTION_GIRLS_INDEX, 'master');
... ... @@ -136,15 +182,19 @@ class HomeModel
Cache::set(CacheConfig::KEY_ACTION_GIRLS_INDEX, $result);
}
}
return $result;
}
/**
* 获取潮童首页的楼层数据
*
* @return array | false
*/
public static function getKidsFloor()
{
$result = false;
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get(CacheConfig::KEY_ACTION_KIDS_INDEX, 'master');
... ... @@ -169,15 +219,19 @@ class HomeModel
Cache::set(CacheConfig::KEY_ACTION_KIDS_INDEX, $result);
}
}
return $result;
}
/**
* 获取创意生活首页的楼层数据
*
* @return array | false
*/
public static function getLifestyleFloor()
{
$result = false;
if (USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get(CacheConfig::KEY_ACTION_LIFESTYLE_INDEX, 'master');
... ... @@ -202,7 +256,7 @@ class HomeModel
Cache::set(CacheConfig::KEY_ACTION_LIFESTYLE_INDEX, $result);
}
}
return $result;
}
... ...
<?php
use Action\AbstractAction;
use LibModels\Wap\Category\BrandData;
/**
* 品牌
* 品牌相关的控制器
*/
class BrandController extends AbstractAction
{
/**
* 品牌一览
*
* @param int channel 1表示男生频道, 2表示女生频道, 3表示潮童频道, 4表示创意生活频道
*/
public function indexAction()
{
// 获取品牌数据
/*$brandTopData = BrandData::getBrandTopData();
$brandsData = BrandData::getBrandsData();
$this->setTitle('品牌一览');
$this->setNavHeader('品牌一览');
/* 判断参数是否有效 */
$channel = $this->get('channel', 1);
if (!is_numeric($channel) || intval($channel) > 4) {
$channel = 1;
}
/* 获取渲染模板需要的数据 */
/*$data = Category\BrandModel::getBrandByChannel($channel);
if (!is_array($data)) {
$data = array();
}
$data['brandPage'] = true;
$brandTop = array();
if($brandTopData['code'] == 200)
{
... ... @@ -29,6 +45,11 @@ class BrandController extends AbstractAction
$data = array (
'brandPage' => true,
'pageHeader' => array (
'navBack' => 'sss ',
'navHome' => 'sss ',
'navTitle' => 'sss '
),
'bannerTop' => array (
'list' => array (
array (
... ... @@ -234,6 +255,8 @@ class BrandController extends AbstractAction
$this->_view->assign('title', 'YOHO!有货');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('index', $data);
}
}
\ No newline at end of file
... ...
... ... @@ -15,6 +15,7 @@ class ListController extends AbstractAction
$data = array(
'goodListPage' => true,
'goodList' => array(
<<<<<<< HEAD
)
);
... ... @@ -52,6 +53,99 @@ class ListController extends AbstractAction
'goodList' => array(
'brand' => array(
'id' => $brand
=======
'search' => 'Aape',
'brandWay' => array(
'url' => 'http://aape.m.yohobuy.com/',
'name' => 'Aape',
'thumb' => 'http://img13.static.yhbimg.com/brandLogo/2015/08/26/15/02261f64c198cb4b181c5ef9e61f38f4b9.jpg?imageMogr2/thumbnail/150x70/extent/150x70/background/d2hpdGU=/position/center/quality/90'
),
'brand' => array(
'id' => 1,
'banner' => 'http://img10.static.yhbimg.com/brandBanner/2015/08/26/07/015af5d6ee626cb132cd9c436e896fae26.jpg?imageMogr2/crop/640x'
),
'new' => array(
array(
'id' => 1,
'thumb' => 'http://img13.static.yhbimg.com/goodsimg/2015/09/15/03/02e50b1037b45b90aa8f33ee328b18facf.jpg?imageMogr2/thumbnail/290x388/extent/290x388/background/d2hpdGU=/position/center/quality/90',
'url' => '',
'name' => 'Aape X YO’HOOD moon face YOH',
'salePrice' => 599,
'tags' => array(
'is_new' => true,
'is_discount' => true
),
'is_soon_sold_out' => true
),
array(
'id' => 2,
'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/09/15/03/0101b0c3998752d02724a5512c6efcb241.jpg?imageMogr2/thumbnail/290x388/extent/290x388/background/d2hpdGU=/position/center/quality/90',
'url' => '',
'name' => 'Aape X YO’HOOD moon face YOH',
'salePrice' => 99,
'tags' => array(
'is_yohoood' => true
),
'is_soon_sold_out' => true
)
),
'filter' => array(
array(
'classify' => array(
array(
'title' => '性别',
'name' => '全部性别',
'default' => true,
'subs' => array(
array(
'chosed' => true,
'dataId' => 0,
'name' => '全部性别'
),
array(
'dataId' => 1,
'name' => '男'
),
array(
'dataId' => 3,
'name' => '女'
)
)
),
array(
'title' => '尺寸',
'name' => 'XL',
'subs' => array(
array(
'dataId' => 0,
'name' => '全部尺寸'
),
array(
'dataId' => 1,
'name' => 'S'
),
array(
'dataId' => 2,
'name' => 'M'
),
array(
'dataId' => 3,
'name' => 'L'
),
array(
'chosed' => true,
'dataId' => 4,
'name' => 'XL'
),
array(
'dataId' => 5,
'name' => 'XXL'
)
)
)
)
)
>>>>>>> 4b0a4270663f76e6b242af42f29607e22ffa75e7
)
)
);
... ...
... ... @@ -2,6 +2,7 @@
use Yaf\Application;
define('SITE_DOMAIN', 'm.dev.yohobuy.com'); // 网站主域名
define('OLD_DOMAIN', 'm.yohobuy.com'); // 网站旧域名
define('USE_CACHE', false); // 缓存的开关
define('APPLICATION_PATH', dirname(__DIR__));
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH)));
... ...
... ... @@ -2,6 +2,7 @@
use Yaf\Application;
define('SITE_DOMAIN', 'buy.test.yoho.cn'); // 网站主域名
define('OLD_DOMAIN', 'm.yohobuy.com'); // 网站旧域名
define('USE_CACHE', true); // 缓存的开关
define('APPLICATION_PATH', dirname(__DIR__));
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH)));
... ...
... ... @@ -2,6 +2,7 @@
use Yaf\Application;
define('SITE_DOMAIN', 'wap.yohobuy.com'); // 网站主域名
define('OLD_DOMAIN', 'm.yohobuy.com'); // 网站旧域名
define('USE_CACHE', true); // 缓存的开关
define('APPLICATION_PATH', dirname(__DIR__));
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH)));
... ...