Authored by Rock Zhang

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

Conflicts:
	template/m.yohobuy.com/partials/common/good_info.phtml
	yohobuy/m.yohobuy.com/application/controllers/Girls.php
... ... @@ -231,11 +231,11 @@
}
## 逛
### 标签(公用)
### 资讯(公用)
{
id: 1,
classification: '',
showTags: true/false, //是否显示标签
img: '',
url: '',
title: '',
... ... @@ -243,7 +243,8 @@
publishTime: '',
pageView: '',
like: {
isLiked: true
isLiked: true,
count: 1
},
share: false,
isFashionMan: true, //标签分类:isTip、isCollocation、isFashionMan、isFashionGood、isTopic
... ... @@ -252,13 +253,12 @@
avatar: '',
name: ''
}
}
### 逛首页
{
title: '',
banner: [
swiper: [
{
url: '',
img: ''
... ... @@ -269,12 +269,15 @@
{
typeId: 1,
type: '最新',
url: ''
focus: true
},
...
],
msgs: [
{...}, //标签
infos: [
[
{...}, //资讯
...
],
...
]
}
... ... @@ -282,8 +285,15 @@
### 逛列表页
{
content: [
{...}, //标签
infos:
[
{
show: true,
info: [
{...}, //标签
...
]
},
...
]
}
... ... @@ -292,12 +302,11 @@
{
author: {
id: 1,
avatar: '',
name: '',
info: ''
},
content: [
infos: [
{...}, //标签
...
]
... ... @@ -308,85 +317,84 @@
{
id: '',
author: {
id: 1,
avatar: '',
name: '',
intro: '',
url: ''
},
article: {
detail: {
title: '',
publishTime: '',
pageView: 3445,
content: [
{
text: {
deps: ''
}
text: ''
},
{
bigImage: {
src: ''
}
bigImage: ''
},
{
smallImage: {
imgs: [
{
src: ''
},
{
src: ''
}
]
}
smallImage: [
{
src: ''
},
{
src: ''
}
]
},
{
recommendation: {
list: [
{...}, //商品信息
...
]
//onlyOne
relatedReco: {
onlyOne: true, //若只有一个商品,传此字段为true
thumb: '',
name: '',
salePrice: 123,
price: 213,
url: ''
}
//多个
relatedReco: [
{...}, //商品信息
...
]
},
{
collocation: {
list: [
{
thumb: '',
type: 'pants',
products: [
{...}, //商品信息
...
]
},
...
]
}
collocation: [
{
thumb: '',
type: 'pants',
goods: [
{...}, //商品信息
...
]
},
...
]
}
]
},
relatedBrands: {
list: [
{
thumb: '',
name: '',
url: ''
},
...
]
},
tags: {
list: [
{
name: '',
url: ''
},
...
]
},
relatedArticles: [
relatedBrand: [
{
thumb: '',
name: '',
url: ''
},
...
],
relatedTag: [
{
name: '',
url: ''
},
...
],
relatedInfo: [
{
thumb: '',
squareThumb: true, //是否为方图
title: '',
url: '',
publishTime: ''
... ...
/**
* 逛详情页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/13
*/
var $ = require('yoho.zepto'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.lazyload'),
IScroll = require('iscroll/iscroll-probe');
var $authorIntro = $('.author .intro');
var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;
var hasCollocationBlock = $('.collocation-block').length > 0 ? true : false;
//collocation block variable
var thumbWidth = 0,
$fixedThumbContainer = $(''),
$coBlock, $thumbContainer, $thumbs, $prods,
scrollToEl;
var scrollToEl = document.querySelector('#wrapper .collocation-block');
var winW = $(window).width();
var myScroll;
/**
* 计算搭配的箭头的位置
* @param $curPos 当前focus的搭配项
*/
function posCollocationArrow($curCo) {
var left = $curCo.offset().left,
bgPos = -winW + left + (thumbWidth / 2) + 'px';
$thumbContainer.css({
backgroundPosition: bgPos + ' bottom'
});
if (isIphone) {
$fixedThumbContainer.css({
backgroundPosition: bgPos + ' bottom'
});
}
}
//搭配thumb的touch事件句柄
function thumbTouchEvt(e) {
var $curCo = $(e.currentTarget),
index = $curCo.index(),
$brother, $brotherCo,
$curProds;
if ($curCo.hasClass('focus')) {
return;
}
$thumbs.filter('.focus').removeClass('focus');
if (isIphone) {
if ($curCo.closest('.fixed-thumb-container').length > 0) {
$brother = $thumbContainer;
} else {
$brother = $fixedThumbContainer;
}
$brotherCo = $brother.find('.thumb').eq(index);
$fixedThumbContainer.find('.thumb.focus').removeClass('focus');
$brotherCo.addClass('focus');
}
$curCo.addClass('focus');
//定位arrow
posCollocationArrow($curCo);
$prods.not('.hide').addClass('hide');
$curProds = $prods.eq(index);
$curProds.removeClass('hide');
//
lazyLoad($curProds.find('.lazy'));
if (isIphone) {
if (myScroll) {
myScroll.scrollToElement(scrollToEl, 400);
}
} else {
$('body').animate({
scrollTop: $coBlock.offset().top
}, 400);
}
}
if (isIphone) {
$('#wrapper').addClass('ios');
}
ellipsis.init();
lazyLoad($('.lazy'));
//title mlellipsis
$('.info-list .title, .one-good .reco-name').each(function() {
this.mlellipsis(2);
});
//offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名
if (parseInt($authorIntro.offset().left, 10) === parseInt($authorIntro.css('margin-left'), 10)) {
$authorIntro.css('padding-top', 0);
}
//有搭配模块,iphone使用iscroll初始化滚动并有固定的搭配栏,其他的没有
if (hasCollocationBlock) {
$coBlock = $('.collocation-block');
$thumbContainer = $coBlock.children('.thumb-container');
$thumbs = $thumbContainer.find('li');
$prods = $coBlock.find('.prod');
thumbWidth = $thumbs.width();
if (isIphone) {
$fixedThumbContainer = $('#wrapper')
.after($thumbContainer.clone().addClass('fixed-thumb-container fixed-bottom'))
.next('.thumb-container');
//load img of fixed thumb container
lazyLoad($fixedThumbContainer.find('.lazy'), {
event: 'sporty'
});
}
//Init Arrow Position
posCollocationArrow($thumbs.filter('.focus'));
$thumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt);
if (isIphone) {
$fixedThumbContainer.delegate('.thumb', 'touchend', thumbTouchEvt);
}
}
// 初始化iscroll
window.onload = function() {
var $scroller = $('#scroller');
var winH, tcH, cbH, cbTop, fixedThumbDom;
if (!isIphone) {
return;
}
myScroll = new IScroll('#wrapper', {
probeType: 3,
mouseWheel: true,
click: true
});
document.addEventListener('touchmove', function (e) {
e.preventDefault();
}, false);
if (!hasCollocationBlock) {
myScroll.on('scroll', function() {
$scroller.trigger('scroll');
});
return;
}
winH = $(window).height();
fixedThumbDom = $fixedThumbContainer[0];
tcH = $thumbContainer.height();
cbH = $coBlock.height();
cbTop = $coBlock.offset().top;
myScroll.on('scroll', function() {
var sTop = -this.y;
var classList = fixedThumbDom.className;
if (sTop <= cbTop - winH + tcH) {
if (classList.indexOf('fixed-bottom') === -1) {
$fixedThumbContainer
.addClass('fixed-bottom')
.removeClass('hide');
}
} else if (sTop <= cbTop) {
if (classList.indexOf('hide') === -1) {
$fixedThumbContainer
.addClass('hide')
.removeClass('fixed-bottom fixed-top');
}
} else if (sTop <= cbTop + cbH - tcH) {
if (classList.indexOf('fixed-top') === -1) {
$fixedThumbContainer
.addClass('fixed-top')
.removeClass('hide absolute')
.css('top', '');
}
} else if (sTop <= cbTop + cbH) {
if (classList.indexOf('absolute') === -1) {
$fixedThumbContainer
.addClass('absolute')
.removeClass('fixed-top hide');
}
fixedThumbDom.style.top = cbTop + cbH - tcH - sTop + 'px';
} else if (sTop > cbTop + cbH) {
if (classList.indexOf('hide') === -1) {
$fixedThumbContainer
.addClass('hide')
.removeClass('absolute');
}
}
$scroller.trigger('scroll');
});
};
\ No newline at end of file
... ...
/**
* 逛首页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
Swiper = require('yoho.iswiper');
var info = require('./info'),
setLazyLoadAndMellipsis = info.setLazyLoadAndMellipsis,
loadMore = info.loadMore;
var winH = $(window).height(),
loadMoreH = $('#load-more').height();
var $infoList = $('#info-list'),
$infos = $infoList.children('.info-list'),
$nav = $('#guang-nav'),
$curNav = $nav.children('.focus'),
curIndex = $curNav.index();
var state = {};
var mySwiper;
mySwiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
info.initInfosEvt($infoList);
//初始化各Nav下资讯加载的状态
(function() {
$nav.children('.guang-nav-item').each(function() {
var type = $(this).data('type');
state[type] = {
page: 1,
end: false,
type: type
};
});
}());
$nav.delegate('.guang-nav-item', 'touchstart', function() {
var $this = $(this),
$content,
index;
if ($this.hasClass('focus')) {
return;
}
index = $this.index();
$this.addClass('focus');
$curNav.removeClass('focus');
$infos.not('.hide').addClass('hide');
$content = $infos.eq(index);
$content.removeClass('hide');
//lazyload & mellipsis
setLazyLoadAndMellipsis($content.children('.guang-info'));
$curNav = $this;
curIndex = index;
});
$(document).scroll(function() {
if (state[curIndex].end) {
return;
}
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
loadMore($infos, state[curIndex]);
}
});
\ No newline at end of file
... ...
... ... @@ -5,4 +5,7 @@
*/
require('./plus-star/list');
require('./plus-star/detail');
\ No newline at end of file
require('./plus-star/detail');
require('./home');
require('./list');
\ No newline at end of file
... ...
... ... @@ -10,9 +10,26 @@ var $ = require('yoho.zepto'),
var tip = require('../plugin/tip');
var loading = false;
ellipsis.init();
/**
* 设置指定资讯项的Lazyload和文字截取
* @params $infos 资讯项
*/
function setLazyLoadAndMellipsis($infos) {
lazyLoad($infos.find('img.lazy'));
$infos.each(function() {
var $this = $(this);
$this.find('.info-title')[0].mlellipsis(2);
$this.find('.info-text')[0].mlellipsis(2);
});
}
/**
* 初始化资讯列表事件绑定
* @params $container 逛资讯列表容器
*/
... ... @@ -39,22 +56,47 @@ function initInfosEvt($container) {
tip.show('网络断开连接了~');
});
});
setLazyLoadAndMellipsis($container.find('.guang-info'));
}
/**
* 设置指定资讯项的Lazyload和文字截取
* @params $infos 资讯项
* 资讯LoadMore
*/
function setLazyLoadAndMellipsis($infos) {
lazyLoad($infos.find('img.lazy'));
function loadMore($container, opt) {
var infosNum = $container.find('.guang-info').length;
$infos.each(function() {
var $this = $(this);
if (loading) {
return;
}
$this.find('.info-title')[0].mlellipsis(2);
$this.find('.info-text')[0].mlellipsis(2);
loading = true;
$.ajax({
type: 'GET',
url: '/infos/get',
data: opt
}).then(function(data) {
var res,
$newInfos;
if (data.code === 200) {
res = data.data;
if (res.end) {
opt.end = true;
}
$container.append(res.infos);
$newInfos = $container.find('.guang-info:gt(' + (infosNum - 1) + ')');
setLazyLoadAndMellipsis($newInfos);
opt.page++;
}
loading = false;
});
}
exports.initInfosEvt = initInfosEvt;
exports.setLazyLoadAndMellipsis = setLazyLoadAndMellipsis;
\ No newline at end of file
exports.setLazyLoadAndMellipsis = setLazyLoadAndMellipsis;
exports.loadMore = loadMore;
\ No newline at end of file
... ...
/**
* 列表页,编辑页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/10
*/
var $ = require('yoho.zepto');
var info = require('./info'),
loadMore = info.loadMore;
var winH = $(window).height(),
loadMoreH = $('#load-more').height();
var setting = {
page: 1,
end: false
};
var $infos = $('#info-list');
info.initInfosEvt($infos);
$(document).scroll(function() {
if (setting.end) {
return;
}
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
loadMore($infos, setting);
}
});
\ No newline at end of file
... ...
... ... @@ -31,7 +31,6 @@ setTimeout(function() {
});
info.initInfosEvt($infosContainer);
info.setLazyLoadAndMellipsis($infosContainer.find('.guang-info'));
//文字介绍收起与展开
$('#more-intro').bind('touchstart', function() {
... ...
... ... @@ -33,13 +33,13 @@ function switchLoginBtnStatus() {
//显示找回密码面板
function showRetrivePanel() {
$mask.show();
$ways.slideDown();
$ways.show();
}
//隐藏找回密码面板
function hideRetrivePanel() {
$mask.hide();
$ways.slideUp();
$ways.hide();
}
//密码显示与隐藏
... ...
/*! Sea.js 2.2.0 | seajs.org/LICENSE.md */
!function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){return A++}function e(a){return a.match(D)[0]}function f(a){for(a=a.replace(E,"/");a.match(F);)a=a.replace(F,"/");return a=a.replace(G,"$1/")}function g(a){var b=a.length-1,c=a.charAt(b);return"#"===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||".css"===a.substring(b-3)||"/"===c?a:a+".js"}function h(a){var b=v.alias;return b&&x(b[a])?b[a]:a}function i(a){var b=v.paths,c;return b&&(c=a.match(H))&&x(b[c[1]])&&(a=b[c[1]]+c[2]),a}function j(a){var b=v.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(I,function(a,c){return x(b[c])?b[c]:a})),a}function k(a){var b=v.map,c=a;if(b)for(var d=0,e=b.length;e>d;d++){var f=b[d];if(c=z(f)?f(a)||a:a.replace(f[0],f[1]),c!==a)break}return c}function l(a,b){var c,d=a.charAt(0);if(J.test(a))c=a;else if("."===d)c=f((b?e(b):v.cwd)+a);else if("/"===d){var g=v.cwd.match(K);c=g?g[0]+a.substring(1):a}else c=v.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),c}function m(a,b){if(!a)return"";a=h(a),a=i(a),a=j(a),a=g(a);var c=l(a,b);return c=k(c)}function n(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}function o(a,b,c){var d=S.test(a),e=L.createElement(d?"link":"script");if(c){var f=z(c)?c(a):c;f&&(e.charset=f)}p(e,b,d,a),d?(e.rel="stylesheet",e.href=a):(e.async=!0,e.src=a),T=e,R?Q.insertBefore(e,R):Q.appendChild(e),T=null}function p(a,c,d,e){function f(){a.onload=a.onerror=a.onreadystatechange=null,d||v.debug||Q.removeChild(a),a=null,c()}var g="onload"in a;return!d||!V&&g?(g?(a.onload=f,a.onerror=function(){C("error",{uri:e,node:a}),f()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&f()},b):(setTimeout(function(){q(a,c)},1),b)}function q(a,b){var c=a.sheet,d;if(V)c&&(d=!0);else if(c)try{c.cssRules&&(d=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(d=!0)}setTimeout(function(){d?b():q(a,b)},20)}function r(){if(T)return T;if(U&&"interactive"===U.readyState)return U;for(var a=Q.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return U=c}}function s(a){var b=[];return a.replace(X,"").replace(W,function(a,c,d){d&&b.push(d)}),b}function t(a,b){this.uri=a,this.dependencies=b||[],this.exports=null,this.status=0,this._waitings={},this._remain=0}if(!a.seajs){var u=a.seajs={version:"2.2.0"},v=u.data={},w=c("Object"),x=c("String"),y=Array.isArray||c("Array"),z=c("Function"),A=0,B=v.events={};u.on=function(a,b){var c=B[a]||(B[a]=[]);return c.push(b),u},u.off=function(a,b){if(!a&&!b)return B=v.events={},u;var c=B[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);else delete B[a];return u};var C=u.emit=function(a,b){var c=B[a],d;if(c)for(c=c.slice();d=c.shift();)d(b);return u},D=/[^?#]*\//,E=/\/\.\//g,F=/\/[^/]+\/\.\.\//,G=/([^:/])\/\//g,H=/^([^/:]+)(\/.+)$/,I=/{([^{]+)}/g,J=/^\/\/.|:\//,K=/^.*?\/\/.*?\//,L=document,M=e(L.URL),N=L.scripts,O=L.getElementById("seajsnode")||N[N.length-1],P=e(n(O)||M);u.resolve=m;var Q=L.head||L.getElementsByTagName("head")[0]||L.documentElement,R=Q.getElementsByTagName("base")[0],S=/\.css(?:\?|$)/i,T,U,V=+navigator.userAgent.replace(/.*AppleWebKit\/(\d+)\..*/,"$1")<536;u.request=o;var W=/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g,X=/\\\\/g,Y=u.cache={},Z,$={},_={},ab={},bb=t.STATUS={FETCHING:1,SAVED:2,LOADING:3,LOADED:4,EXECUTING:5,EXECUTED:6};t.prototype.resolve=function(){for(var a=this,b=a.dependencies,c=[],d=0,e=b.length;e>d;d++)c[d]=t.resolve(b[d],a.uri);return c},t.prototype.load=function(){var a=this;if(!(a.status>=bb.LOADING)){a.status=bb.LOADING;var c=a.resolve();C("load",c);for(var d=a._remain=c.length,e,f=0;d>f;f++)e=t.get(c[f]),e.status<bb.LOADED?e._waitings[a.uri]=(e._waitings[a.uri]||0)+1:a._remain--;if(0===a._remain)return a.onload(),b;var g={};for(f=0;d>f;f++)e=Y[c[f]],e.status<bb.FETCHING?e.fetch(g):e.status===bb.SAVED&&e.load();for(var h in g)g.hasOwnProperty(h)&&g[h]()}},t.prototype.onload=function(){var a=this;a.status=bb.LOADED,a.callback&&a.callback();var b=a._waitings,c,d;for(c in b)b.hasOwnProperty(c)&&(d=Y[c],d._remain-=b[c],0===d._remain&&d.onload());delete a._waitings,delete a._remain},t.prototype.fetch=function(a){function c(){u.request(g.requestUri,g.onRequest,g.charset)}function d(){delete $[h],_[h]=!0,Z&&(t.save(f,Z),Z=null);var a,b=ab[h];for(delete ab[h];a=b.shift();)a.load()}var e=this,f=e.uri;e.status=bb.FETCHING;var g={uri:f};C("fetch",g);var h=g.requestUri||f;return!h||_[h]?(e.load(),b):$[h]?(ab[h].push(e),b):($[h]=!0,ab[h]=[e],C("request",g={uri:f,requestUri:h,onRequest:d,charset:v.charset}),g.requested||(a?a[g.requestUri]=c:c()),b)},t.prototype.exec=function(){function a(b){return t.get(a.resolve(b)).exec()}var c=this;if(c.status>=bb.EXECUTING)return c.exports;c.status=bb.EXECUTING;var e=c.uri;a.resolve=function(a){return t.resolve(a,e)},a.async=function(b,c){return t.use(b,c,e+"_async_"+d()),a};var f=c.factory,g=z(f)?f(a,c.exports={},c):f;return g===b&&(g=c.exports),delete c.factory,c.exports=g,c.status=bb.EXECUTED,C("exec",c),g},t.resolve=function(a,b){var c={id:a,refUri:b};return C("resolve",c),c.uri||u.resolve(c.id,b)},t.define=function(a,c,d){var e=arguments.length;1===e?(d=a,a=b):2===e&&(d=c,y(a)?(c=a,a=b):c=b),!y(c)&&z(d)&&(c=s(""+d));var f={id:a,uri:t.resolve(a),deps:c,factory:d};if(!f.uri&&L.attachEvent){var g=r();g&&(f.uri=g.src)}C("define",f),f.uri?t.save(f.uri,f):Z=f},t.save=function(a,b){var c=t.get(a);c.status<bb.SAVED&&(c.id=b.id||a,c.dependencies=b.deps||[],c.factory=b.factory,c.status=bb.SAVED)},t.get=function(a,b){return Y[a]||(Y[a]=new t(a,b))},t.use=function(b,c,d){var e=t.get(d,y(b)?b:[b]);e.callback=function(){for(var b=[],d=e.resolve(),f=0,g=d.length;g>f;f++)b[f]=Y[d[f]].exec();c&&c.apply(a,b),delete e.callback},e.load()},t.preload=function(a){var b=v.preload,c=b.length;c?t.use(b,function(){b.splice(0,c),t.preload(a)},v.cwd+"_preload_"+d()):a()},u.use=function(a,b){return t.preload(function(){t.use(a,b,v.cwd+"_use_"+d())}),u},t.define.cmd={},a.define=t.define,u.Module=t,v.fetchedList=_,v.cid=d,u.require=function(a){var b=t.get(t.resolve(a));return b.status<bb.EXECUTING&&(b.onload(),b.exec()),b.exports};var cb=/^(.+?\/)(\?\?)?(seajs\/)+/;v.base=(P.match(cb)||["",P])[1],v.dir=P,v.cwd=M,v.charset="utf-8",v.preload=function(){var a=[],b=location.search.replace(/(seajs-\w+)(&|$)/g,"$1=1$2");return b+=" "+L.cookie,b.replace(/(seajs-\w+)=1/g,function(b,c){a.push(c)}),a}(),u.config=function(a){for(var b in a){var c=a[b],d=v[b];if(d&&w(d))for(var e in c)d[e]=c[e];else y(d)?c=d.concat(c):"base"===b&&("/"!==c.slice(-1)&&(c+="/"),c=l(c)),v[b]=c}return C("config",a),u}}}(this);
... ...
... ... @@ -20,7 +20,8 @@
"yoho.jquery": "1.8.3",
"yoho.lazyload": "1.1.0",
"mlellipsis": "0.0.6",
"yoho.iswiper": "3.0.1"
"yoho.iswiper": "3.0.1",
"iscroll": "5.1.2"
},
"devDependencies": {
"expect.js": "0.3.1"
... ...
@import "guang/clothes/*.png";
$clothes: sprite-map("guang/clothes/*.png");
@mixin retina-sprite($map, $sprite, $scale) {
$width: image-width(sprite-file($map, $sprite));
$height: image-height(sprite-file($map, $sprite));
$offsetY: ceil(nth(sprite-position($map, $sprite), 2) / $scale);
background: sprite-url($map) 0 $offsetY no-repeat;
$zoomX: ceil(image_width(sprite-path($map)) / $scale);
$zoomY: auto;
@include background-size($zoomX $zoomY);
display: block;
}
@mixin relatedTitle {
margin: 0 29rem / $pxConvertRem;
background: #fff;
border: 1px solid #e0e0e0;
border-bottom: none;
line-height: 72rem / $pxConvertRem;
font-size: 30rem / $pxConvertRem;
color: #b0b0b0;
text-align: center;
}
.guang-detail-page {
#wrapper.ios {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
}
.author {
border-bottom: 1px solid #e0e0e0;
background: #fff;
> a {
display: block;
height: 100%;
}
.avatar {
float: left;
margin-top: 20rem / $pxConvertRem;
margin-left: 30rem / $pxConvertRem;
width: 50rem / $pxConvertRem;
height: 50rem / $pxConvertRem;
@include border-radius(50%);
}
.name {
float: left;
font-size: 28rem / $pxConvertRem;
color: #000;
padding: 30rem / $pxConvertRem 0;
margin-left: 30rem / $pxConvertRem;
}
.intro {
float: left;
font-size: 28rem / $pxConvertRem;
color: #b0b0b0;
padding: 30rem / $pxConvertRem 0;
margin-left: 30rem / $pxConvertRem;
}
}
.post-title {
padding: 16rem / $pxConvertRem 0 26rem / $pxConvertRem 30rem / $pxConvertRem;
background: #fff;
.title {
line-height: 60rem / $pxConvertRem;
font-size: 40rem / $pxConvertRem;
color: #000;
font-weight: bold;
}
}
.text-block {
padding: 20rem / $pxConvertRem 30rem / $pxConvertRem;
line-height: 46rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
background: #fff;
color: #444;
}
.big-img-block {
padding-bottom: 5rem / $pxConvertRem;
background: #fff;
img {
width: 100%;
height: 640rem / $pxConvertRem;
}
}
.small-img-block {
padding-bottom: 8rem / $pxConvertRem;
background: #fff;
img {
float: right;
width: 315rem / $pxConvertRem;
height: 420rem / $pxConvertRem;
&:first-child {
float: left;
}
}
}
.collocation-block {
background: #fff;
.good-list {
padding-left:15rem / $pxConvertRem;
}
}
.thumb-container {
padding-top: 30rem / $pxConvertRem;
padding-left: 30rem / $pxConvertRem;
background: transparent image-url('guang/thumb-container-bg.png') no-repeat;
background-size: 200% 100%;
&.fixed-top {
position: fixed;
left: 0;
right: 0;
top: 0;
}
&.fixed-bottom {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: rgba(255,255,255,0.9);
}
&.absolute {
position: absolute;
left: 0;
right: 0;
}
&.static {
position: static;
}
&.hide {
display: none;
}
}
.clothe-type {
position: absolute;
right: 6rem / $pxConvertRem;
bottom: 34rem / $pxConvertRem;
width: 20px;
height: 20px;
@include border-radius(50%);
&.bag {
@include retina-sprite ($clothes, bag, 80/20);
background-color: #fff;
background-size: 100%;
}
&.cloth {
@include retina-sprite ($clothes, cloth, 80/20);
background-color: #fff;
background-size: 100%;
}
&.dress {
@include retina-sprite ($clothes, dress, 80/20);
background-color: #fff;
background-size: 100%;
}
&.headset {
@include retina-sprite ($clothes, headset, 80/20);
background-color: #fff;
background-size: 100%;
}
&.lamp {
@include retina-sprite ($clothes, lamp, 80/20);
background-color: #fff;
background-size: 100%;
}
&.pants {
@include retina-sprite ($clothes, pants, 80/20);
background-color: #fff;
background-size: 100%;
}
&.shoe {
@include retina-sprite ($clothes, shoe, 80/20);
background-color: #fff;
background-size: 100%;
}
&.swim-suit {
@include retina-sprite ($clothes, swim-suit, 80/20);
background-color: #fff;
background-size: 100%;
}
&.under {
@include retina-sprite ($clothes, under, 80/20);
background-color: #fff;
background-size: 100%;
}
&.watch {
@include retina-sprite ($clothes, watch, 80/20);
background-color: #fff;
background-size: 100%;
}
}
.thumb {
display: inline-block;
position: relative;
margin-right: 22rem / $pxConvertRem;
padding-bottom: 30rem / $pxConvertRem;
&:last-child {
margin-right: 0;
}
&.focus .thumb-img {
border-color: #000;
}
}
.thumb-img {
height: 134rem / $pxConvertRem;
width: 96rem / $pxConvertRem;
border: 1px solid transparent;
}
.related-reco-block {
background: #fff;
padding-left: 15rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
h2 {
margin-left: -15rem / $pxConvertRem;
line-height: 104rem / $pxConvertRem;
font-size: 30rem / $pxConvertRem;
color: #b0b0b0;
text-align: center;
}
.one-good {
padding-left: 15rem / $pxConvertRem;
padding-right: 30rem / $pxConvertRem;
margin-bottom: 20rem / $pxConvertRem;
.thumb {
float: left;
height: 134rem / $pxConvertRem;
width: 96rem / $pxConvertRem;
}
.content-container {
padding-left: 120rem / $pxConvertRem;
height: 134rem / $pxConvertRem;
line-height: 1;
font-size: 24rem / $pxConvertRem;
> p {
height: 50%;
line-height: 94rem / $pxConvertRem;
}
span {
display: inline-block;
line-height: 24rem / $pxConvertRem;
}
.price {
line-height: 47rem / $pxConvertRem;
}
}
.sale-price {
color: #d62927;
line-height: 1.5;
}
.sale-price.no-price {
color: #000;
}
.market-price {
margin-left: 5rem / $pxConvertRem;
color: #b0b0b0;
text-decoration: line-through;
line-height: 1.5;
}
.check-detail {
display: inline-block;
color: #000;
border: 1px solid;
border-radius: 2px;
float: right;
padding: 0 5px;
line-height: 1.5;
}
}
}
.related-brand {
margin-top: 30rem / $pxConvertRem;
h2 {
@include relatedTitle;
}
.brand-list {
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
padding: 30rem / $pxConvertRem 0 30rem / $pxConvertRem;
background: #fff;
}
.brand {
float: left;
width: 158rem / $pxConvertRem;
height: 128rem / $pxConvertRem;
border-right: 1px solid #e0e0e0;
margin-bottom: 10rem / $pxConvertRem;
a {
display: block;
}
&:nth-child(4n) {
border-right: none;
}
}
.brand-logo {
display: table-cell;
width: 158rem / $pxConvertRem;
height: 94rem / $pxConvertRem;
vertical-align: middle;
img {
display: block;
max-width: 158rem / $pxConvertRem;
max-height: 94rem / $pxConvertRem;
vertical-align: middle;
margin: 0 auto;
}
}
.brand-name {
margin: 10rem / $pxConvertRem 0 0 0;
line-height: 24rem / $pxConvertRem;
font-size: 18rem / $pxConvertRem;
color: #babac2;
text-align: center;
text-decoration: none;
border-bottom: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.related-tag {
position: relative;
padding-bottom: 30rem / $pxConvertRem;
border-bottom: 1px solid #e0e0e0;
background: #fff;
.tag-bg {
position: absolute;
height: 40rem / $pxConvertRem;
width: 40rem / $pxConvertRem;
background: image-url('guang/tag.png') no-repeat;
background-size: 100% 100%;
top: 35rem / $pxConvertRem;
left: 20rem / $pxConvertRem;
}
.tag-list {
margin-left: 50rem / $pxConvertRem;
}
li {
float: left;
margin-top: 31rem / $pxConvertRem;
margin-left: 31rem / $pxConvertRem;
}
a {
height: 50rem / $pxConvertRem;
line-height: 50rem / $pxConvertRem;
font-size: 30rem / $pxConvertRem;
color: #000;
text-decoration: underline;
white-space: nowrap;
}
}
.related-info {
margin-top: 30rem / $pxConvertRem;
h2 {
@include relatedTitle;
}
.info-list {
background: #fff;
padding-bottom: 30rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
}
li {
padding-top: 30rem / $pxConvertRem;
margin-bottom: 10rem / $pxConvertRem;
a {
display: block;
}
img {
float: left;
margin-left: 30rem / $pxConvertRem;
width: 182rem / $pxConvertRem;
height: 114rem / $pxConvertRem;
&.square {
height: 182rem / $pxConvertRem;
}
}
}
.title, .publish-time {
float: left;
width: 360rem / $pxConvertRem;
margin-left: 30rem / $pxConvertRem;
line-height: 40rem / $pxConvertRem;
color: #444;
font-size: 28rem / $pxConvertRem;
}
.publish-time {
font-size: 18rem / $pxConvertRem;
margin-top: 0;
color: #b0b0b0;
.iconfont {
font-size: 18rem / $pxConvertRem;
}
}
}
}
\ No newline at end of file
... ...
@import "tvls", "info", "plus-star";
\ No newline at end of file
@import "tvls", "info", "plus-star", "info-list", "detail";
\ No newline at end of file
... ...
.guang-list-page {
.editor-header {
margin-bottom: 30rem / $pxConvertRem;
padding-top: 36rem / $pxConvertRem;
padding-bottom: 40rem / $pxConvertRem;
background: #fff;
border-bottom: 1px solid #e0e0e0;
}
.avatar {
float: left;
margin-left: 30rem / $pxConvertRem;
img {
width: 100rem / $pxConvertRem;
height: 100rem / $pxConvertRem;
@include border-radius(50%);
}
}
.text {
float: left;
margin-left: 32rem / $pxConvertRem;
width: 475rem / $pxConvertRem;
.name {
font-size: 32rem / $pxConvertRem;
line-height: 40rem / $pxConvertRem;
}
.info {
margin-top: 6rem / $pxConvertRem;
color: #bdbdbf;
font-size: 24rem / $pxConvertRem;
line-height: 32rem / $pxConvertRem;
}
}
.swiper-container {
width: 100%;
height: 310rem / $pxConvertRem;
img {
height: 100%;
width: 100%;
}
.swiper-pagination {
bottom: 0;
left: 0;
width: 100%;
}
.swiper-pagination-bullet-active {
background: #fff;
}
}
.guang-nav {
background-color: #fff;
overflow: hidden;
height: 80rem / $pxConvertRem;
}
.guang-nav-item {
float: left;
color: #ccc;
font-size: 28rem / $pxConvertRem;
padding: 0 22rem / $pxConvertRem;
line-height: 80rem / $pxConvertRem;
&.focus {
color: #000;
}
}
.info-list.hide {
display: none;
}
.load-more-info {
width: 100%;
height: 70rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
}
\ No newline at end of file
... ...
.guang-info {
margin: 30rem / $pxConvertRem 0 0 0;
margin-bottom: 30rem / $pxConvertRem;
padding: 0 0 24rem / $pxConvertRem 0;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
background: #fff;
&:last-child {
margin-bottom: 0;
}
.info-img {
position: relative;
width: 100%;
... ... @@ -29,7 +33,7 @@
text-decoration: none;
}
.tag-tag {
.info-tag {
position: absolute;
top: 0;
left: 105rem / $pxConvertRem;
... ...
{{>layout/header}}
<div class="guang-detail-page guang-page yoho-page">
{{# guang}}
<div id="wrapper">
<div id="scroller">
{{# author}}
<div class="author" data-id={{id}}>
<a class="clearfix" href={{url}}>
<img class="avatar" src={{avatar}}>
<span class="name">{{name}}</span>
<span class="intro">{{intro}}</span>
</a>
</div>
{{/ author}}
{{# detail}}
<div class="detail">
<div class="post-title">
<p class="title">{{title}}</p>
{{> guang/tvls}}
</div>
<div class="post-content">
{{# content}}
{{#if text}}
<div class="post-block text-block">
{{text}}
</div>
{{/if}}
{{#if bigImage}}
<div class="post-block big-img-block">
<img class="lazy" data-original={{bigImage}}>
</div>
{{/if}}
{{#if smallImage}}
<div class="post-block small-img-block clearfix">
{{# smallImage}}
<img class="lazy" data-original={{src}}>
{{/ smallImage}}
</div>
{{/if}}
{{#if collocation}}
<div class="post-block collocation-block">
<ul class="thumb-container">
{{#each collocation}}
<li class="thumb {{#if @first}}focus{{/if}}">
<img class="thumb-img lazy" data-original={{thumb}}>
<span class="clothe-type {{type}}"></span>
</li>
{{/each}}
</ul>
<div class="good-list clearfix">
{{#each collocation}}
<div class="prod {{#unless @first}}hide{{/unless}}">
{{# goods}}
{{> good}}
{{/ goods}}
</div>
{{/each}}
</div>
</div>
{{/if}}
{{#if relatedReco}}
<div class="post-block related-reco-block clearfix">
<h2>相关推荐</h2>
{{#if relatedReco.onlyOne}}
{{#with relatedReco}}
<div class="one-good">
<img class="thumb lazy" data-original={{thumb}}>
<div class="content-container">
<p>
<span class="reco-name">{{name}}</span>
</p>
<p class="price">
<span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
{{#price}}
<span class="market-price">¥{{.}}</span>
{{/price}}
<a class="check-detail" href={{url}}>
查看详情
</a>
</p>
</div>
</div>
{{/with}}
{{^}}
<div class="good-list clearfix">
{{# relatedReco}}
{{> good}}
{{/ relatedReco}}
</div>
{{/if}}
</div>
{{/if}}
{{/ content}}
</div>
</div>
{{/ detail}}
{{#if relatedBrand}}
<div class="related-brand">
<h2>相关品牌</h2>
<ul class="brand-list clearfix">
{{# relatedBrand}}
<li class="brand">
<a href={{url}}>
<div class="brand-logo">
<img class="lazy" data-original={{thumb}}>
</div>
<p class="brand-name">{{name}}</p>
</a>
</li>
{{/ relatedBrand}}
</ul>
</div>
{{/if}}
{{#if relatedTag}}
<div class="related-tag">
<div class="tag-bg"></div>
<ul class="tag-list clearfix">
{{# relatedTag}}
<li>
<a href={{url}}>{{name}}</a>
</li>
{{/ relatedTag}}
</ul>
</div>
{{/if}}
{{#if relatedInfo}}
<div class="related-info">
<h2>相关文章</h2>
<ul class="info-list">
{{# relatedInfo}}
<li>
<a class="clearfix" href={{url}}>
<img class="lazy {{#if squareThumb}}square{{/if}}" data-original={{thumb}}>
<span class="title">{{title}}</span>
<span class="publish-time">
<i class="iconfont">&#xe603;</i>
{{publishTime}}
</span>
</a>
</li>
{{/ relatedInfo}}
</ul>
</div>
{{/if}}
</div>
</div>
{{/ guang}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="guang-list-page guang-page yoho-page">
{{# guang}}
<div class="swiper-container">
<div class="swiper-wrapper">
{{# swiper}}
<div class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{img}}">
</a>
<div class="swiper-lazy-preloader"></div>
</div>
{{/ swiper}}
</div>
<div class="swiper-pagination"></div>
</div>
{{# author}}
<div id="author-infos" class="editor-header clearfix" data-id={{id}}>
<div class="avatar">
<img src="{{avatar}}">
</div>
<div class="text">
<p class="name">{{name}}</p>
<p class="info">{{info}}</p>
</div>
</div>
{{/ author}}
<ul id="guang-nav" class="guang-nav clearfix">
{{# navs}}
<li class="guang-nav-item {{#focus}}focus{{/focus}}" data-type={{typeId}}>
{{type}}
</li>
{{/ navs}}
</ul>
<div id="info-list">
{{# infos}}
<div class="info-list {{^show}}hide{{/show}}">
{{# info}}
{{> guang/info}}
{{/ info}}
</div>
{{/ infos}}
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
</div>
{{/ guang}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="guang-list-page guang-page yoho-page">
{{# guang}}
{{# author}}
<div id="author-infos" class="editor-header clearfix" data-id={{id}}>
<div class="avatar">
<img src="{{avatar}}">
</div>
<div class="text">
<p class="name">{{name}}</p>
<p class="info">{{info}}</p>
</div>
</div>
{{/ author}}
<div id="info-list" class="info-list">
{{# infos}}
{{> guang/info}}
{{/ infos}}
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
</div>
{{/ guang}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
<div class="hot-brands girls">
{{> common/floor_header_more}}
<div class="brands-swiper">
<ul class="brands-list swiper-wrapper clearfix">
{{# list}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{img}}" alt="">
<span class="brands-title">{{textCn}}</span>
</a>
</li>
{{/ list}}
</ul>
</div>
</div>
\ No newline at end of file
<div class="hot-category">
<div class="category-banner">
<a href="{{url}}">
<img class="lazy" data-original="{{img}}" alt="">
</a>
</div>
<ul class="category-list clearfix">
{{# list}}
<li>
<a href="{{url}}">
<div class="img-box">
<img class="lazy" data-original="{{img}}" alt="">
</div>
<p class="category-title">{{textCn}}</p>
</a>
</li>
{{/ list}}
</ul>
</div>
\ No newline at end of file
<?php
use Action\AbstractAction;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class DetailController extends AbstractAction
{
public function indexAction()
{
$data = array(
'id' => 1,
'author' => array(
'avatar' => 'http://7xidk0.com1.z0.glb.clouddn.com/avater.png',
'name' => '山本耀司',
'intro' => '日本设计界一代宗师,分享一些个人区委分享内容不求有用但求有趣区委分享内容不求有用但求有趣区委分享内容不求有用但求有趣区委分享内容不求有用但求有趣',
'url' => ''
),
'detail' => array(
'title' => 'Skin Art Series INN 2015新品',
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'content' => array(
array(
'text' => '复古风劲吹,在各路复古跑鞋嚣张跋扈的当下,历史悠久的Onitsuka也动作频频'
),
array(
'bigImage' => 'http://img10.static.yhbimg.com/yhb-img01/2015/06/11/15/017b3fa0478e26a3ded2ac75d341fe3ab6.jpg?imageView/2/w/640/h/640'
),
array(
'relatedReco' => array(
'onlyOne' => true,
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'GAWS DIGI 丛林数码印花拼接卫衣看看两行文字以上能不能切字啦,样式应该不会乱的吧',
'isLike' => false,
'price' => 1268,
'salePrice' => 589,
'url' => ''
)
),
array(
'collocation' => array(
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/clothe.png',
'type' => 'pants',
'goods' => array(
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
'price' => 1268,
'salePrice' => 589,
'tags' => array(
array(
'isNew' => true
)
),
'isFew' => true,
'url' => ''
)
),
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/clothe.png',
'type' => 'cloth',
'goods' => array(
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/03/02/07/01ebfb219e22770ffb0c2c3a2cbb2b4bef.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'GAWS DIGI 丛林数码印花拼接卫衣',
'price' => 1268,
'salePrice' => 589,
'tags' => array(
array(
'isNew' => true
)
),
'isFew' => true,
'url' => ''
)
)
)
)
)
),
'relatedBrand' => array(
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/logo.png',
'name' => 'HALFGIRL测试名字长的情况',
'url' => ''
),
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/logo.png',
'name' => '黄伟文Wyman',
'url' => ''
),
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/logo.png',
'name' => 'HIPANDA',
'url' => ''
)
),
'relatedTag' => array(
array(
'name' => '棒球服',
'url' => ''
)
),
'relatedInfo' => array(
array(
'thumb' => 'http://7xidk0.com1.z0.glb.clouddn.com/pant.png',
'title' => '复古风劲吹,在各路复古跑鞋嚣张跋扈的当下,历史悠久的Onitsuka',
'url' => '',
'publishTime' => '2月13日 12:34'
)
)
);
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', array('modulePath' => 'guang/detail', 'guang' => $data));
}
}
\ No newline at end of file
... ...
<?php
use Action\AbstractAction;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
/**
* 逛首页、列表页、编辑页
*/
class ListController extends AbstractAction
{
/**
* 首页
*/
public function indexAction()
{
$data = array(
'swiper' => array(
array(
'url' => '',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/07/06/10/014fd517e2fe3f3e0dc3cbc3007d8093af.jpg?imageView/2/w/640/h/640'
),
array(
'url' => '',
'img' => 'http://img10.static.yhbimg.com/yhb-img01/2015/07/03/13/01a165dd33db8488edc741241950a596a8.jpg?imageView/2/w/640/h/640'
)
),
'navs' => array(
array(
'typeId' => 1,
'type' => '最新'
),
array(
'typeId' => 2,
'type' => '话题',
'focus' => true
),
array(
'typeId' => 3,
'type' => '搭配'
),
array(
'typeId' => 4,
'type' => '潮人'
),
array(
'typeId' => 5,
'type' => '潮物'
),
array(
'typeId' => 6,
'type' => '小贴士'
)
),
'infos' => array(
array(
'info' => array(
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionMan' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
)
)
),
array(
'show' => true,
'info' => array(
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
)
)
),
array(
'info' => array(
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
)
)
),
array(
'info' => array(
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
)
)
),
array(
'info' => array(
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
)
)
),
array(
'info' => array(
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
)
)
)
)
);
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', array('modulePath' => 'guang/home', 'guang' => $data));
}
/**
* 列表页
*/
public function listAction()
{
$data = array(
'infos' => array(
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionMan' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
),
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
)
)
);
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('list', array('modulePath' => 'guang/list', 'guang' => $data));
}
/**
* 编辑页
*/
public function editorAction()
{
$data = array(
'author' => array(
'avatar' => 'http://7xidk0.com1.z0.glb.clouddn.com/avater.png',
'name' => '山本耀司',
'info' => '设计理念:他以简洁而富有韵味,线条流畅,反时尚的设计风格而著称。'
),
'infos' => array(
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionMan' => true
),
array(
'id' => 1,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '1.副线不知为何总是好看点',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => true,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 459,
'isLiked' => true
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isTip' => true
),
array(
'id' => 2,
'img' => 'http://7xidk0.com1.z0.glb.clouddn.com/bg.png',
'title' => '2.副线不知为何总是好看点测试长度是否会被截取塞真的很恶心啊',
'text' => '具有绅士气质的英伦风格是永走前沿的经典,在众多的Made ' .
'In England中Panul Smith缔造了一个传奇',
'showTags' => false,
'publishTime' => '2月13日 12:34',
'pageView' => 3445,
'like' => array(
'count' => 100,
'isLiked' => false
),
'share' => true,
'url' => '',
'likeUrl' => '',
'isFashionGood' => true
)
)
);
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('list', array('modulePath' => 'guang/list', 'guang' => $data));
}
}
\ No newline at end of file
... ...