Authored by xuqi

Merge branch 'feature/plus-star' into develop

Conflicts:
	yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
@@ -26,17 +26,9 @@ @@ -26,17 +26,9 @@
26 }, 26 },
27 { 27 {
28 isReNew: true //再到着 28 isReNew: true //再到着
29 - },  
30 - {  
31 - isYearEndPromotion: true //年终大促  
32 - },  
33 - {  
34 - isYearMidPromotion: false //年中热促  
35 } 29 }
36 ], 30 ],
37 - isFew: true, //即将售罄  
38 - isLike: false, //是否显示收藏  
39 - likeUrl: '' //收藏的URL 31 + isFew: true //即将售罄
40 } 32 }
41 33
42 ### 侧栏导航 34 ### 侧栏导航
@@ -405,7 +397,33 @@ @@ -405,7 +397,33 @@
405 397
406 ### PLUS+STAR 398 ### PLUS+STAR
407 399
  400 + //列表页
  401 + {
  402 + ps: {
  403 + star: [
  404 + {
  405 + deps: '',
  406 + //情况1:一张图
  407 + url: '',
  408 + img: '',
  409 + //情况2:多张图
  410 + imgs: [
408 { 411 {
  412 + url: '',
  413 + img: ''
  414 + },
  415 + ...
  416 + ]
  417 + }
  418 + ],
  419 + plus: [
  420 + ...
  421 + ]
  422 + }
  423 + }
  424 + //详情页
  425 + {
  426 + ps: {
409 id: 1, 427 id: 1,
410 banner: '', 428 banner: '',
411 log: '', 429 log: '',
@@ -420,9 +438,8 @@ @@ -420,9 +438,8 @@
420 ... 438 ...
421 ] 439 ]
422 }, 440 },
423 - article: {  
424 - info: [  
425 - {...}, //标签 441 + infos: [
  442 + {...}, //资讯
426 ... 443 ...
427 ] 444 ]
428 } 445 }
No preview for this file type
  1 +<?xml version="1.0" standalone="no"?>
  2 +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
  3 +<svg xmlns="http://www.w3.org/2000/svg">
  4 +<metadata>
  5 +Created by FontForge 20120731 at Wed Apr 22 10:54:24 2015
  6 + By Ads
  7 +</metadata>
  8 +<defs>
  9 +<font id="iconfont" horiz-adv-x="1024" >
  10 + <font-face
  11 + font-family="iconfont"
  12 + font-weight="500"
  13 + font-stretch="normal"
  14 + units-per-em="1024"
  15 + panose-1="2 0 6 3 0 0 0 0 0 0"
  16 + ascent="812"
  17 + descent="-212"
  18 + x-height="792"
  19 + bbox="0 -224 5637 800"
  20 + underline-thickness="50"
  21 + underline-position="-100"
  22 + unicode-range="U+0078-E60A"
  23 + />
  24 +<missing-glyph horiz-adv-x="374"
  25 +d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
  26 + <glyph glyph-name=".notdef" horiz-adv-x="374"
  27 +d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
  28 + <glyph glyph-name=".null" horiz-adv-x="0"
  29 + />
  30 + <glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
  31 + />
  32 + <glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
  33 +d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
  34 +t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
  35 +t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
  36 + <glyph glyph-name="uniE600" unicode="&#xe600;" horiz-adv-x="1463"
  37 +d="M798 -160q0 -46 25 -58t61 16l537 420q36 28 36 68t-36 68l-537 424q-36 29 -61 16.5t-25 -57.5v-238q-138 0 -252.5 -24.5t-192 -63.5t-137.5 -94t-94.5 -109t-57.5 -117t-31.5 -109.5t-11 -94t-1.5 -63.5t2 -25q47 62 87 104t90 78t103.5 57.5t127 36.5t161.5 21t207 6
  38 +v-262z" />
  39 + <glyph glyph-name="uniE601" unicode="&#xe601;"
  40 +d="M281 372q-9 -6 -16.5 -14.5t-11.5 -18t-4 -18.5v-7v-483h1q4 -15 13.5 -28t24 -20t30.5 -7h582q28 0 48.5 20t20.5 49t-20.5 49t-48.5 20h41q35 0 59 24.5t24 58.5t-24 58.5t-59 24.5q35 0 59 24t24 59q0 16 -6.5 31.5t-17.5 26.5t-26.5 17.5t-32.5 6.5h-48q21 0 38 10.5
  41 +t27.5 27.5t10.5 38v-13q0 31 -22.5 54t-53.5 24q-125 6 -259 9q40 148 16 278q-4 25 -13.5 44.5t-22 31.5t-27 19.5t-29.5 8t-29.5 -2.5t-27.5 -12t-23 -21t-15.5 -30t-5.5 -38q-3 -19 -4.5 -36.5t-2.5 -28.5v-22q-1 -11 -2 -18.5t-2 -16t-3 -16.5t-5.5 -18t-8.5 -23
  42 +q-24 -60 -133 -115q-4 -1 -7 -2.5t-6 -3.5l-2 -1v0zM60 356q-25 0 -42.5 -17.5t-17.5 -42.5v-405q0 -25 17.5 -42.5t42.5 -17.5h134v525h-134z" />
  43 + <glyph glyph-name="uniE602" unicode="&#xe602;" horiz-adv-x="1323"
  44 +d="M643 472q0 -68 -47.5 -116t-113.5 -48q0 -68 47 -116t113.5 -48t113.5 48t47 116t-47 116t-113 48zM643 800q-68 0 -139.5 -21.5t-133 -57t-119 -80.5t-102.5 -93t-79 -94t-52 -84t-18 -62q0 -28 25 -75t68 -102t105 -111t131 -101.5t152 -74.5t161.5 -29t161.5 29
  45 +t152 74.5t131 101.5t105 111t68 102t25 75t-25 75t-68 101.5t-105 110.5t-131 102t-152 74.5t-161 28.5zM643 -21q-88 0 -162 44t-117 120t-43 165q0 66 25.5 127t68.5 105t102.5 70t125.5 26q131 0 225 -94q94 -99 96 -234q0 -30 -5.5 -59t-15 -55.5t-23.5 -51.5t-32 -46
  46 +t-38.5 -39.5t-44.5 -32.5t-50 -24t-54.5 -15.5t-57.5 -5.5z" />
  47 + <glyph glyph-name="uniE603" unicode="&#xe603;"
  48 +d="M512 286v343h85v-426h-81v-2h-256v85h252zM512 -224q139 0 257 68.5t186.5 186.5t68.5 257t-68.5 257t-186.5 186.5t-257 68.5t-257 -68.5t-186.5 -186.5t-68.5 -257t68.5 -257t186.5 -186.5t257 -68.5z" />
  49 + <glyph glyph-name="uniE604" unicode="&#xe604;"
  50 +d="M774 324q6 -9 9.5 -19t2.5 -20.5t-5.5 -20.5t-12.5 -18l-1 -1l-427 -428q-18 -17 -42.5 -17t-41.5 17q-12 12 -16 27t0 30.5t15 26.5l387 387l-387 387q-17 17 -17 41.5t17.5 42t42 17.5t42.5 -17l427 -428q1 0 1 -1q2 -1 3.5 -2.5t2.5 -3.5z" />
  51 + <glyph glyph-name="uniE605" unicode="&#xe605;"
  52 +d="M707 748q-55 0 -105 -20.5t-90 -56.5q-40 36 -90 56.5t-105 20.5q-34 0 -67 -8t-62 -23t-54.5 -35.5t-45.5 -46.5t-34.5 -55.5t-22 -63t-7.5 -68.5q0 -110 69 -194l2 -2l344 -391q30 -33 73 -33t73 33l344 391q0 1 1 2h1q22 27 37.5 58.5t23.5 66t8 69.5q0 49 -14.5 94.5
  53 +t-42 82.5t-63.5 64.5t-80.5 43t-92.5 15.5z" />
  54 + <glyph glyph-name="uniE606" unicode="&#xe606;" horiz-adv-x="5632"
  55 +d="M4316.5 156q54.5 0 93 38.5t38.5 93.5t-38.5 93.5t-93 38.5t-93.5 -38.5t-39 -93.5t39 -93.5t93.5 -38.5zM4910 156q27 0 51.5 10.5t42.5 28t28 42t10 51.5q0 55 -38.5 93.5t-93 38.5t-93.5 -38.5t-39 -93.5t39 -93.5t93 -38.5zM5504.5 156q54.5 0 93.5 38.5t39 93.5
  56 +t-39 93.5t-93.5 38.5t-93 -38.5t-38.5 -93.5t38.5 -93.5t93 -38.5z" />
  57 + <glyph glyph-name="uniE607" unicode="&#xe607;" horiz-adv-x="1643"
  58 +d="M547 190h-1l45 -46l248 239l-45 46l-201 -194l-195 201l-46 -44z" />
  59 + <glyph glyph-name="uniE608" unicode="&#xe608;" horiz-adv-x="1821"
  60 +d="M930 135q-14 -13 -33.5 -13t-33.5 13l-252 242q-14 13 -14 32t14 32t34 13t34 -13l251 -242q6 -5 9.5 -11.5t4.5 -13.5t0 -14t-4.5 -13.5t-9.5 -11.5zM360 135q-14 13 -14 32t14 32l251 242q14 13 34 13t34 -13q6 -6 9.5 -15t3.5 -17.5t-3.5 -17t-9.5 -14.5l-252 -242
  61 +q-14 -13 -33.5 -13t-33.5 13z" />
  62 + <glyph glyph-name="uniE609" unicode="&#xe609;" horiz-adv-x="1821"
  63 +d="M930 377l-251 -242q-14 -13 -34 -13t-34 13q-9 9 -12 20.5t0 23.5t12 20l252 242q14 13 33.5 13t33.5 -13t14 -32t-14 -32zM427 441l252 -242q9 -8 12 -20t0 -23.5t-12 -20.5q-14 -13 -34 -13t-34 13l-251 242q-14 13 -14 32t14 32q6 7 15 10.5t18 3.5t18 -3.5t16 -10.5z
  64 +" />
  65 + <glyph glyph-name="uniE60A" unicode="&#xe60a;"
  66 +d="M1024 288q0 -139 -68.5 -257t-186.5 -186.5t-257 -68.5t-257 68.5t-186.5 186.5t-68.5 257t68.5 257t186.5 186.5t257 68.5t257 -68.5t186.5 -186.5t68.5 -257zM801 498l-365 -366l-156 156l-37 -37l193 -193l403 403z" />
  67 + </font>
  68 +</defs></svg>
No preview for this file type
No preview for this file type
1 var yohobuy; 1 var yohobuy;
2 2
3 require('./js/passport/index'); 3 require('./js/passport/index');
  4 +require('./js/guang/index');
4 5
5 module.exports = yohobuy; 6 module.exports = yohobuy;
  1 +/**
  2 + * 逛打包入口
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/10/9
  5 + */
  6 +
  7 +require('./plus-star/list');
  8 +require('./plus-star/detail');
  1 +/**
  2 + * 资讯相关API
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/10/10
  5 + */
  6 +
  7 +var $ = require('yoho.zepto'),
  8 + ellipsis = require('mlellipsis'),
  9 + lazyLoad = require('yoho.lazyload');
  10 +
  11 +var tip = require('../plugin/tip');
  12 +
  13 +ellipsis.init();
  14 +
  15 +/**
  16 + * 初始化资讯列表事件绑定
  17 + * @params $container 逛资讯列表容器
  18 + */
  19 +function initInfosEvt($container) {
  20 + $container.delegate('.like-btn', 'touchstart', function(e) {
  21 + var $likeBtn = $(e.currentTarget),
  22 + $info = $likeBtn.closest('.guang-info');
  23 +
  24 + $.ajax({
  25 + type: 'GET',
  26 + url: '/guang/info/prise', //TODO:cancelPrise
  27 + data: {
  28 + id: $info.data('id')
  29 + }
  30 + }).then(function(data) {
  31 + var code = data.code;
  32 +
  33 + if (code === 200) {
  34 + $likeBtn.next('.like-count').text(data.data);
  35 + } else if (code === 400) {
  36 + tip.show('未登录');
  37 + }
  38 + }, function() {
  39 + tip.show('网络断开连接了~');
  40 + });
  41 + });
  42 +}
  43 +
  44 +/**
  45 + * 设置指定资讯项的Lazyload和文字截取
  46 + * @params $infos 资讯项
  47 + */
  48 +function setLazyLoadAndMellipsis($infos) {
  49 + lazyLoad($infos.find('img.lazy'));
  50 +
  51 + $infos.each(function() {
  52 + var $this = $(this);
  53 +
  54 + $this.find('.info-title')[0].mlellipsis(2);
  55 + $this.find('.info-text')[0].mlellipsis(2);
  56 + });
  57 +}
  58 +
  59 +exports.initInfosEvt = initInfosEvt;
  60 +exports.setLazyLoadAndMellipsis = setLazyLoadAndMellipsis;
  1 +/**
  2 + * PLUS+STAR详情页
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/10/10
  5 + */
  6 +
  7 +var $ = require('yoho.zepto'),
  8 + ellipsis = require('mlellipsis'),
  9 + lazyLoad = require('yoho.lazyload');
  10 +
  11 +var $intro = $('#intro'),
  12 + $imt = $('#intro-more-txt'),
  13 + $infosContainer = $('#related-infos-container');
  14 +
  15 +var info = require('../info');
  16 +
  17 +var mIntro, aIntro;
  18 +
  19 +ellipsis.init();
  20 +
  21 +//Init LazyLoad
  22 +lazyLoad($('img.lazy'));
  23 +
  24 +//文字介绍文字截取
  25 +$intro[0].mlellipsis(3);
  26 +
  27 +//获取截取文字和完整文字
  28 +setTimeout(function() {
  29 + mIntro = $intro.text();
  30 + aIntro = $intro.attr('title');
  31 +});
  32 +
  33 +info.initInfosEvt($infosContainer);
  34 +info.setLazyLoadAndMellipsis($infosContainer.find('.guang-info'));
  35 +
  36 +//文字介绍收起与展开
  37 +$('#more-intro').bind('touchstart', function() {
  38 + var $this = $(this);
  39 +
  40 + $this.toggleClass('spread');
  41 +
  42 + if ($this.hasClass('spread')) {
  43 +
  44 + //显示
  45 + $intro.text(aIntro);
  46 + $imt.text('收起');
  47 + } else {
  48 +
  49 + //隐藏
  50 + $intro.text(mIntro);
  51 + $imt.text('more');
  52 + }
  53 +});
  54 +
  55 +//品牌收藏
  56 +$('#brand-like').bind('touchstart', function(e) {
  57 + e.preventDefault();
  58 +});
  1 +/**
  2 + * PLUS+STAR列表页
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/10/10
  5 + */
  6 +
  7 +var $ = require('yoho.zepto'),
  8 + lazyLoad = require('yoho.lazyload'),
  9 + Swiper = require('yoho.iswiper');
  10 +
  11 +var $navs = $('#nav-tab > li'),
  12 + $contents = $('#ps-content > .content');
  13 +
  14 +var mySwiper;
  15 +
  16 +lazyLoad($('img.lazy'));
  17 +
  18 +mySwiper = new Swiper('.swiper-container', {
  19 + lazyLoading: true,
  20 + pagination: '.swiper-pagination'
  21 +});
  22 +
  23 +$('#nav-tab').delegate('li', 'touchstart', function() {
  24 + if ($(this).hasClass('focus')) {
  25 + return;
  26 + }
  27 + $navs.toggleClass('focus');
  28 + $contents.toggleClass('hide');
  29 +});
@@ -25,46 +25,6 @@ var phoneRegx = { @@ -25,46 +25,6 @@ var phoneRegx = {
25 '+61': /^[0-9]{11}$/ 25 '+61': /^[0-9]{11}$/
26 }; 26 };
27 27
28 -//错误验证  
29 -var $errTip,  
30 - tipTime;  
31 -  
32 -/**  
33 - * 初始化错误提示  
34 - */  
35 -function initErrTip() {  
36 - var errTipHtml = '<div id="err-tip" class="err-tip"></div>';  
37 -  
38 - //插入错误提示HTML  
39 - $('.passport-page').append(errTipHtml);  
40 -  
41 - $errTip = $('#err-tip');  
42 - $errTip.on('touchstart', function() {  
43 - $errTip.fadeOut();  
44 -  
45 - //清除Timeout  
46 - clearTimeout(tipTime);  
47 - });  
48 -}  
49 -  
50 -/**  
51 - * 显示错误提示  
52 - */  
53 -function showErrTip(content) {  
54 - if (typeof $errTip === 'undefined') {  
55 - return;  
56 - }  
57 -  
58 - $errTip.text(content).show();  
59 -  
60 - //若2秒内未点击则自动消失  
61 - tipTime = setTimeout(function() {  
62 - if ($errTip.css('display') === 'block') {  
63 - $errTip.fadeOut();  
64 - }  
65 - }, 2000);  
66 -}  
67 -  
68 //密码显示隐藏 28 //密码显示隐藏
69 function bindEyesEvt() { 29 function bindEyesEvt() {
70 var $hasEye = $('.has-eye'), 30 var $hasEye = $('.has-eye'),
@@ -161,8 +121,6 @@ function selectCssHack($countrySelect) { @@ -161,8 +121,6 @@ function selectCssHack($countrySelect) {
161 module.exports = { 121 module.exports = {
162 emailRegx: emailRegx, 122 emailRegx: emailRegx,
163 phoneRegx: phoneRegx, 123 phoneRegx: phoneRegx,
164 - initErrTip: initErrTip,  
165 - showErrTip: showErrTip,  
166 bindEyesEvt: bindEyesEvt, 124 bindEyesEvt: bindEyesEvt,
167 bindClearEvt: bindClearEvt, 125 bindClearEvt: bindClearEvt,
168 pwdValidate: pwdValidate, 126 pwdValidate: pwdValidate,
@@ -8,10 +8,8 @@ var $ = require('yoho.zepto'); @@ -8,10 +8,8 @@ var $ = require('yoho.zepto');
8 8
9 var $resend = $('#resend'); 9 var $resend = $('#resend');
10 10
11 -var api = require('../api'),  
12 - showErrTip = api.showErrTip;  
13 -  
14 -api.initErrTip(); 11 +var tip = require('../../plugin/tip'),
  12 + showErrTip = tip.show;
15 13
16 $resend.on('touchstart', function(e) { 14 $resend.on('touchstart', function(e) {
17 e.preventDefault(); 15 e.preventDefault();
@@ -9,11 +9,10 @@ var $email = $('#email'), @@ -9,11 +9,10 @@ var $email = $('#email'),
9 $btnSure = $('#btn-sure'); 9 $btnSure = $('#btn-sure');
10 10
11 var api = require('../api'); 11 var api = require('../api');
  12 +var tip = require('../../plugin/tip');
12 13
13 var trim = $.trim; 14 var trim = $.trim;
14 -var showErrTip = api.showErrTip;  
15 -  
16 -api.initErrTip(); 15 +var showErrTip = tip.show;
17 16
18 api.bindClearEvt(); 17 api.bindClearEvt();
19 18
@@ -11,11 +11,10 @@ var $phoneNum = $('#phone-num'), @@ -11,11 +11,10 @@ var $phoneNum = $('#phone-num'),
11 $btnNext = $('#btn-next'); 11 $btnNext = $('#btn-next');
12 12
13 var api = require('../api'); 13 var api = require('../api');
  14 +var tip = require('../../plugin/tip');
14 15
15 var trim = $.trim; 16 var trim = $.trim;
16 -var showErrTip = api.showErrTip;  
17 -  
18 -api.initErrTip(); 17 +var showErrTip = tip.show;
19 18
20 api.bindClearEvt(); 19 api.bindClearEvt();
21 20
@@ -9,11 +9,10 @@ var $pwd = $('#pwd'), @@ -9,11 +9,10 @@ var $pwd = $('#pwd'),
9 $btnOk = $('#btn-ok'); 9 $btnOk = $('#btn-ok');
10 10
11 var api = require('../api'); 11 var api = require('../api');
  12 +var tip = require('../../plugin/tip');
12 13
13 var trim = $.trim; 14 var trim = $.trim;
14 -var showErrTip = api.showErrTip;  
15 -  
16 -api.initErrTip(); 15 +var showErrTip = tip.show;
17 16
18 api.bindEyesEvt(); 17 api.bindEyesEvt();
19 18
@@ -11,9 +11,10 @@ module.exports = function(useInRegister) { @@ -11,9 +11,10 @@ module.exports = function(useInRegister) {
11 $captchaTip = $('#captcha-tip'); 11 $captchaTip = $('#captcha-tip');
12 12
13 var api = require('./api'); 13 var api = require('./api');
  14 + var tip = require('../plugin/tip');
14 15
15 var trim = $.trim; 16 var trim = $.trim;
16 - var showErrTip = api.showErrTip; 17 + var showErrTip = tip.show;
17 18
18 var urlMid = useInRegister ? 'register' : 'back'; 19 var urlMid = useInRegister ? 'register' : 'back';
19 20
@@ -31,8 +32,6 @@ module.exports = function(useInRegister) { @@ -31,8 +32,6 @@ module.exports = function(useInRegister) {
31 }, 1000); 32 }, 1000);
32 } 33 }
33 34
34 - api.initErrTip();  
35 -  
36 api.bindClearEvt(); 35 api.bindClearEvt();
37 36
38 $captcha.bind('input', function() { 37 $captcha.bind('input', function() {
@@ -15,9 +15,10 @@ var $phoneNum = $('#phone-num'), @@ -15,9 +15,10 @@ var $phoneNum = $('#phone-num'),
15 pwdPass = false; 15 pwdPass = false;
16 16
17 var api = require('../api'); 17 var api = require('../api');
  18 +var tip = require('../../plugin/tip');
18 19
19 var trim = $.trim; 20 var trim = $.trim;
20 -var showErrTip = api.showErrTip; 21 +var showErrTip = tip.show;
21 22
22 //登录按钮状态切换 23 //登录按钮状态切换
23 function switchLoginBtnStatus() { 24 function switchLoginBtnStatus() {
@@ -31,9 +32,6 @@ function switchLoginBtnStatus() { @@ -31,9 +32,6 @@ function switchLoginBtnStatus() {
31 //Android-UC下显示select的direction:rtl无效的临时解决办法 32 //Android-UC下显示select的direction:rtl无效的临时解决办法
32 api.selectCssHack($countrySelect); 33 api.selectCssHack($countrySelect);
33 34
34 -//初始化ErrTip  
35 -api.initErrTip();  
36 -  
37 //显示隐藏密码 35 //显示隐藏密码
38 api.bindEyesEvt(); 36 api.bindEyesEvt();
39 37
@@ -16,9 +16,10 @@ var $account = $('#account'), @@ -16,9 +16,10 @@ var $account = $('#account'),
16 pwdPass = false; 16 pwdPass = false;
17 17
18 var api = require('../api'); 18 var api = require('../api');
  19 +var tip = require('../../plugin/tip');
19 20
20 var trim = $.trim; 21 var trim = $.trim;
21 -var showErrTip = api.showErrTip; 22 +var showErrTip = tip.show;
22 23
23 //登录按钮状态切换 24 //登录按钮状态切换
24 function switchLoginBtnStatus() { 25 function switchLoginBtnStatus() {
@@ -41,9 +42,6 @@ function hideRetrivePanel() { @@ -41,9 +42,6 @@ function hideRetrivePanel() {
41 $ways.slideUp(); 42 $ways.slideUp();
42 } 43 }
43 44
44 -//初始化ErrTip  
45 -api.initErrTip();  
46 -  
47 //密码显示与隐藏 45 //密码显示与隐藏
48 api.bindEyesEvt(); 46 api.bindEyesEvt();
49 47
@@ -9,11 +9,10 @@ var $pwd = $('#pwd'), @@ -9,11 +9,10 @@ var $pwd = $('#pwd'),
9 $btnSure = $('#btn-sure'); 9 $btnSure = $('#btn-sure');
10 10
11 var api = require('../api'); 11 var api = require('../api');
  12 +var tip = require('../../plugin/tip');
12 13
13 var trim = $.trim; 14 var trim = $.trim;
14 -var showErrTip = api.showErrTip;  
15 -  
16 -api.initErrTip(); 15 +var showErrTip = tip.show;
17 16
18 api.bindEyesEvt(); 17 api.bindEyesEvt();
19 18
@@ -11,11 +11,10 @@ var $phoneNum = $('#phone-num'), @@ -11,11 +11,10 @@ var $phoneNum = $('#phone-num'),
11 $btnNext = $('#btn-next'); 11 $btnNext = $('#btn-next');
12 12
13 var api = require('../api'); 13 var api = require('../api');
  14 +var tip = require('../../plugin/tip');
14 15
15 var trim = $.trim; 16 var trim = $.trim;
16 -var showErrTip = api.showErrTip;  
17 -  
18 -api.initErrTip(); 17 +var showErrTip = tip.show;
19 18
20 api.bindClearEvt(); 19 api.bindClearEvt();
21 20
  1 +/**
  2 + * 弹框提示
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/10/10
  5 + */
  6 +var $ = require('yoho.zepto');
  7 +
  8 +var $tip, tipItime;
  9 +
  10 +/**
  11 + * 初始化提示框
  12 + */
  13 +(function() {
  14 + var tipHtml = '<div id="yoho-tip" class="yoho-tip"></div>';
  15 +
  16 + //插入提示HTML
  17 + $('.yoho-page').append(tipHtml);
  18 +
  19 + $tip = $('#yoho-tip');
  20 + $tip.on('touchstart', function() {
  21 + $tip.hide();
  22 +
  23 + //清除Timeout
  24 + clearTimeout(tipItime);
  25 + });
  26 +}());
  27 +
  28 +/**
  29 + * 显示提示
  30 + */
  31 +function show(con, dur) {
  32 + var content, duration;
  33 +
  34 + if (typeof con === 'undefined') {
  35 + return;
  36 + }
  37 +
  38 + content = con.toString();
  39 + duration = (dur && dur > 0) ? dur : 2000;
  40 +
  41 + $tip.text(content).show();
  42 +
  43 + tipItime = setTimeout(function() {
  44 + if ($tip.css('display') === 'block') {
  45 + $tip.hide();
  46 + }
  47 + }, duration);
  48 +}
  49 +
  50 +exports.show = show;
@@ -17,7 +17,10 @@ @@ -17,7 +17,10 @@
17 "main": "index.js", 17 "main": "index.js",
18 "dependencies": { 18 "dependencies": {
19 "yoho.zepto": "1.1.60", 19 "yoho.zepto": "1.1.60",
20 - "yoho.jquery": "1.8.3" 20 + "yoho.jquery": "1.8.3",
  21 + "yoho.lazyload": "1.1.0",
  22 + "mlellipsis": "0.0.6",
  23 + "yoho.iswiper": "3.0.1"
21 }, 24 },
22 "devDependencies": { 25 "devDependencies": {
23 "expect.js": "0.3.1" 26 "expect.js": "0.3.1"
  1 +.good-info {
  2 + float: left;
  3 + width: 276rem / $pxConvertRem;
  4 + height: 486rem / $pxConvertRem;
  5 + margin: 28rem / $pxConvertRem (15rem / $pxConvertRem) 0;
  6 +
  7 +
  8 + .tag-container {
  9 + height: 28rem / $pxConvertRem;
  10 + width: 100%;
  11 +
  12 + .good-tag {
  13 + display: block;
  14 + float: left;
  15 + height: 28rem / $pxConvertRem;
  16 + font-size: 18rem / $pxConvertRem;
  17 + text-align: center;
  18 + line-height: 32rem / $pxConvertRem;
  19 + margin-right: 4rem / $pxConvertRem;
  20 +
  21 + &:last-child {
  22 + margin-right: 0;
  23 + }
  24 + }
  25 + .new-tag {
  26 + width: 60rem / $pxConvertRem;
  27 + background-color: #78dc7e;
  28 + color: #fff;
  29 + }
  30 + .renew-tag {
  31 + width: 90rem / $pxConvertRem;
  32 + background-color: #78dc7e;
  33 + color: #fff;
  34 + }
  35 + .sale-tag {
  36 + width: 60rem / $pxConvertRem;
  37 + background-color: #ff575c;
  38 + color: #fff;
  39 + }
  40 + .new-festival-tag {
  41 + width: 90rem / $pxConvertRem;
  42 + background-color: #000;
  43 + color: #fff;
  44 + }
  45 + .limit-tag {
  46 + box-sizing: border-box;
  47 + width: 90rem / $pxConvertRem;
  48 + border: 1px solid #000;
  49 + color: #000;
  50 + line-height: 24rem / $pxConvertRem;
  51 + }
  52 + }
  53 +}
  54 +
  55 +.good-detail-img {
  56 + position: relative;
  57 + img {
  58 + display: block;
  59 + width: 100%;
  60 + height: 366rem / $pxConvertRem;
  61 + }
  62 +
  63 + .few-tag {
  64 + position: absolute;
  65 + bottom: 0;
  66 + width: 100%;
  67 + height: 28rem / $pxConvertRem;
  68 + background: #ffac5b;
  69 + font-size: 18rem / $pxConvertRem;
  70 + color: #fff;
  71 + line-height: 28rem / $pxConvertRem;
  72 + text-align: center;
  73 + }
  74 +}
  75 +
  76 +.good-detail-text {
  77 + .name a {
  78 + display: block;
  79 + line-height: 56rem / $pxConvertRem;
  80 + overflow: hidden;
  81 + white-space: nowrap;
  82 + text-overflow: ellipsis;
  83 + text-decoration: none;
  84 + font-size: 22rem / $pxConvertRem;
  85 + color: #444;
  86 + }
  87 + .price {
  88 + line-height: 22rem / $pxConvertRem;
  89 + font-size: 22rem / $pxConvertRem;
  90 + .sale-price {
  91 + color: #d62927;
  92 + }
  93 + .sale-price.no-price {
  94 + color: #000;
  95 + }
  96 + .market-price {
  97 + margin: 0 0 0 (5rem / $pxConvertRem);
  98 + color: #b0b0b0;
  99 + text-decoration: line-through;
  100 + }
  101 + }
  102 +}
  1 +@import "tvls", "info", "plus-star";
  1 +.guang-info {
  2 + margin: 30rem / $pxConvertRem 0 0 0;
  3 + padding: 0 0 24rem / $pxConvertRem 0;
  4 + border-top: 1px solid #e0e0e0;
  5 + border-bottom: 1px solid #e0e0e0;
  6 + background: #fff;
  7 +
  8 + .info-img {
  9 + position: relative;
  10 + width: 100%;
  11 +
  12 + img {
  13 + display: block;
  14 + width: 100%;
  15 + }
  16 + }
  17 +
  18 + .info-match {
  19 + position: absolute;
  20 + top: 0;
  21 + left: 0;
  22 + width: 130rem / $pxConvertRem;
  23 + height: 50rem / $pxConvertRem;
  24 + line-height: 50rem / $pxConvertRem;
  25 + font-size: 28rem / $pxConvertRem;
  26 + color: #fff;
  27 + background: #000;
  28 + text-align: center;
  29 + text-decoration: none;
  30 + }
  31 +
  32 + .tag-tag {
  33 + position: absolute;
  34 + top: 0;
  35 + left: 105rem / $pxConvertRem;
  36 + height: 50rem / $pxConvertRem;
  37 + width: 50rem / $pxConvertRem;
  38 +
  39 + &.collocation {
  40 + background: image-url('guang/info/collocation.png');
  41 + background-size: 100% 100%;
  42 + }
  43 +
  44 + &.fashion-good {
  45 + background: image-url('guang/info/fashion-good.png');
  46 + background-size: 100% 100%;
  47 + }
  48 +
  49 + &.fashion-man {
  50 + background: image-url('guang/info/fashion-man.png');
  51 + background-size: 100% 100%;
  52 + }
  53 +
  54 + &.tip {
  55 + background: image-url('guang/info/tip.png');
  56 + background-size: 100% 100%;
  57 + }
  58 +
  59 + &.topic {
  60 + background: image-url('guang/info/topic.png');
  61 + background-size: 100% 100%;
  62 + }
  63 + }
  64 +
  65 + .info-deps {
  66 + margin: 32rem / $pxConvertRem 0 0 0;
  67 + padding: 0 40rem / $pxConvertRem 0 30rem / $pxConvertRem;
  68 +
  69 + .info-title-container {
  70 + text-decoration: none;
  71 + color: #000;
  72 + }
  73 +
  74 + .info-title{
  75 + line-height: 44rem / $pxConvertRem;
  76 + color: #000;
  77 + font-size: 40rem / $pxConvertRem;
  78 + font-weight:bold;
  79 +
  80 + }
  81 +
  82 + .info-text {
  83 + margin: 16rem / $pxConvertRem 0 0 0;
  84 + line-height: 46rem / $pxConvertRem;
  85 + font-size: 28rem / $pxConvertRem;
  86 + color: #444;
  87 + }
  88 +
  89 + .time-view-like-share {
  90 + margin-top: 16rem / $pxConvertRem;
  91 + }
  92 + }
  93 +}
  1 +.ps-list-page {
  2 + background-color: #f0f0f0;
  3 +
  4 + .nav-tab, .ps-content {
  5 + width: 100%;
  6 + }
  7 +
  8 + .nav-tab {
  9 + height: 60rem / $pxConvertRem;
  10 + padding: 10rem / $pxConvertRem 0;
  11 + background-color: #fff;
  12 + }
  13 +
  14 + .star-nav, .plus-nav {
  15 + box-sizing: border-box;
  16 + float: left;
  17 + width: 50%;
  18 + height: 60rem / $pxConvertRem;
  19 + line-height: 60rem / $pxConvertRem;
  20 + font-size: 16px;
  21 + text-align: center;
  22 + color: #ccc;
  23 +
  24 + &.focus {
  25 + color: #000;
  26 + }
  27 + }
  28 +
  29 + .star-nav {
  30 + border-right: 1px solid #ccc;
  31 + }
  32 +
  33 + .plus-star-row {
  34 + margin-bottom: 10rem / $pxConvertRem;
  35 +
  36 + &:last-child {
  37 + margin-bottom: 0;
  38 + }
  39 + }
  40 +
  41 + .content.hide {
  42 + display: none;
  43 + }
  44 +
  45 + .swiper-container {
  46 + height: 310rem / $pxConvertRem;
  47 + }
  48 +
  49 + .swiper-pagination-bullet-active {
  50 + background: #fff;
  51 + }
  52 +
  53 + .brand-deps {
  54 + height: 40rem / $pxConvertRem;
  55 + line-height: 40rem / $pxConvertRem;
  56 + padding-left: 10rem / $pxConvertRem;
  57 + font-size: 14px;
  58 + background: #fff;
  59 + max-width: 100%;
  60 + overflow: hidden;
  61 + white-space: nowrap;
  62 + text-overflow: ellipsis;
  63 + }
  64 +}
  65 +
  66 +.ps-detail-page {
  67 + background-color: #f0f0f0;
  68 +
  69 + .ps-block {
  70 + margin-bottom: 30rem / $pxConvertRem;
  71 + border-bottom: 1px solid #e0e0e0;
  72 + border-top: 1px solid #e0e0e0;
  73 + background-color: #fff;
  74 +
  75 + &.header, &.related-infos {
  76 + border-top: none;
  77 + }
  78 +
  79 + &.related-infos {
  80 + margin-bottom: 0;
  81 + background-color: #f0f0f0;
  82 + }
  83 + }
  84 +
  85 + .header {
  86 + position: relative;
  87 +
  88 + .banner {
  89 + width: 100%;
  90 + height: 310rem / $pxConvertRem;
  91 + }
  92 +
  93 + .logo {
  94 + position: absolute;
  95 + border: 1px solid #b5b5b5;
  96 + height: 168rem / $pxConvertRem;
  97 + width: 168rem / $pxConvertRem;
  98 + top: 226rem / $pxConvertRem;
  99 + left: 50rem / $pxConvertRem;
  100 + }
  101 +
  102 + .header-content {
  103 + padding: 0 30rem / $pxConvertRem;
  104 + }
  105 +
  106 + .name-islike-container {
  107 + padding-left: 248rem / $pxConvertRem;
  108 + margin-top: 24rem / $pxConvertRem;
  109 + font-size: 34rem / $pxConvertRem;
  110 + }
  111 +
  112 + .name {
  113 + color: #000;
  114 + height: 41rem / $pxConvertRem;
  115 + width: 295rem / $pxConvertRem;
  116 + }
  117 +
  118 + .brand-islike {
  119 + position: relative;
  120 + float: right;
  121 + color: #b0b0b0;
  122 + height: 1.5rem;
  123 + width: 1.5rem;
  124 + line-height: 1.5rem;
  125 + text-align: center;
  126 + top: -0.25rem;
  127 + left: -0.25rem;
  128 +
  129 + &.like {
  130 + color: #f00;
  131 + }
  132 + }
  133 + }
  134 +
  135 + .intro {
  136 + margin-top: 49rem / $pxConvertRem;
  137 + font-size: 24rem / $pxConvertRem;
  138 + color: #444;
  139 + line-height: 150%;
  140 + }
  141 +
  142 + .more-intro {
  143 + padding: 30rem / $pxConvertRem 0;
  144 + font-size: 28rem / $pxConvertRem;
  145 + line-height: 104%;
  146 + color: #bbb;
  147 + float: right;
  148 +
  149 + .icon {
  150 + -webkit-transition: -webkit-transform .1s ease-in;
  151 + -moz-transition: -moz-transform .1s ease-in;
  152 + -ms-transition: -ms-transform .1s ease-in;
  153 + -o-transition: -o-transform .1s ease-in;
  154 + transition: transform .1s ease-in;
  155 + }
  156 +
  157 + &.spread .icon {
  158 + -webkit-transform: scale(0.83) rotate(-180deg);
  159 + -moz-transform: scale(0.83) rotate(-180deg);
  160 + -ms-transform: scale(0.83) rotate(-180deg);
  161 + -o-transform: scale(0.83) rotate(-180deg);
  162 + transform: scale(0.83) rotate(-180deg);
  163 + }
  164 + }
  165 +
  166 + .new-arrival {
  167 + padding-left: 0 30rem / $pxConvertRem;
  168 +
  169 + .new-arrival-content {
  170 + padding: 20rem / $pxConvertRem 14rem / $pxConvertRem;
  171 + }
  172 +
  173 + .more-goods-container {
  174 + height: 90rem / $pxConvertRem;
  175 + padding: 0 30rem / $pxConvertRem;
  176 + border-top: 1px solid #e0e0e0;
  177 + color: #000;
  178 + }
  179 +
  180 + .mg-text {
  181 + height: 100%;
  182 + line-height: 90rem / $pxConvertRem;
  183 + color: #000;
  184 + text-decoration: none;
  185 + display: block;
  186 + font-size: 16px;
  187 + }
  188 +
  189 + .more-prods {
  190 + float: right;
  191 + color: #b0b0b0;
  192 + }
  193 +
  194 + .new-arrival-header .more-prods {
  195 + margin-right: 30rem / $pxConvertRem;
  196 + margin-top: 10rem / $pxConvertRem;
  197 + }
  198 +
  199 + }
  200 +
  201 + .new-arrival-header {
  202 + padding-left: 222rem / $pxConvertRem;
  203 + padding-top: 33rem / $pxConvertRem;
  204 +
  205 + .header-text {
  206 + font-size: 28rem / $pxConvertRem;
  207 + color: #000;
  208 + line-height: 122%;
  209 + font-weight: bold;
  210 + }
  211 + }
  212 +
  213 +
  214 + .related-info-title {
  215 + margin: 0 29rem / $pxConvertRem;
  216 + border: 1px solid #e0e0e0;
  217 + border-bottom: none;
  218 + line-height: 72rem / $pxConvertRem;
  219 + font-size: 30rem / $pxConvertRem;
  220 + color: #b0b0b0;
  221 + text-align: center;
  222 + background-color: #fff;
  223 + }
  224 +
  225 + .related-infos-container .guang-info:first-child {
  226 + margin-top: 0;
  227 + }
  228 +}
  1 +.time-view-like-share {
  2 + color: #b0b0b0;
  3 + line-height: 38rem / $pxConvertRem;
  4 + height: 38rem / $pxConvertRem;
  5 + font-size: 24rem / $pxConvertRem;
  6 +
  7 + .iconfont {
  8 + vertical-align: 9%;
  9 + margin-right: 4rem / $pxConvertRem;
  10 + font-size: 24rem / $pxConvertRem;
  11 + }
  12 +
  13 + .like-share-container {
  14 + display: inline-block;
  15 + float: right;
  16 +
  17 + > * {
  18 + float: left;
  19 + }
  20 +
  21 + .like-btn, .share-btn {
  22 + position: relative;
  23 + height: 60rem / $pxConvertRem;
  24 + line-height: 60rem / $pxConvertRem;
  25 + display: inline-block;
  26 +
  27 + color: #b0b0b0;
  28 + width: 60rem / $pxConvertRem;
  29 + top: -14rem / $pxConvertRem;
  30 + font-size: 34rem / $pxConvertRem;
  31 + text-align: center;
  32 + margin-right: 0;
  33 + outline: none;
  34 + }
  35 +
  36 + .share-btn {
  37 + margin-left: 20rem / $pxConvertRem;
  38 + }
  39 +
  40 + .like-btn.like {
  41 + color: #444;
  42 + }
  43 + }
  44 +}
@@ -47,4 +47,41 @@ a { @@ -47,4 +47,41 @@ a {
47 color: #000; 47 color: #000;
48 } 48 }
49 49
50 -@import "layout/header", "layout/footer", "passport/index";  
  50 +@font-face {
  51 + font-family: "iconfont";
  52 + src: font-url('iconfont.eot'); /* IE9*/
  53 + src: font-url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
  54 + font-url('iconfont.woff') format('woff'), /* chromefirefox */
  55 + font-url('iconfont.ttf') format('truetype'), /* chromefirefoxoperaSafari, Android, iOS 4.2+*/
  56 + font-url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
  57 +}
  58 +
  59 +.iconfont {
  60 + font-family: "iconfont" !important;
  61 + font-size: 16px;
  62 + font-style: normal;
  63 + text-decoration: none;
  64 + -webkit-font-smoothing: antialiased;
  65 + -webkit-text-stroke-width: 0.2px;
  66 + -moz-osx-font-smoothing: grayscale;
  67 +}
  68 +
  69 +.yoho-tip {
  70 + position: absolute;
  71 + display: none;
  72 + text-align: center;
  73 + width: 70%;
  74 + padding: 34px 0;
  75 + top: 50%;
  76 + left: 50%;
  77 + margin-left: -35%;
  78 + margin-top: -45px;
  79 + background-color: #000;
  80 + opacity: 0.7;
  81 + color: #fff;
  82 + font-size: 18px;
  83 + border: none;
  84 + @include border-radius(10px);
  85 +}
  86 +
  87 +@import "layout/header", "layout/footer", "good", "passport/index", "guang/index";
@@ -159,22 +159,4 @@ body.passport-body { @@ -159,22 +159,4 @@ body.passport-body {
159 .row { 159 .row {
160 margin-bottom: 10px; 160 margin-bottom: 10px;
161 } 161 }
162 -  
163 - .err-tip {  
164 - position: absolute;  
165 - display: none;  
166 - text-align: center;  
167 - width: 70%;  
168 - padding: 34px 0;  
169 - top: 50%;  
170 - left: 50%;  
171 - margin-left: -35%;  
172 - margin-top: -45px;  
173 - background-color: #000;  
174 - opacity: 0.7;  
175 - color: #fff;  
176 - font-size: 18px;  
177 - border: none;  
178 - @include border-radius(10px);  
179 - }  
180 } 162 }
  1 +{{>layout/header}}
  2 +<div class="ps-detail-page ps-page yoho-page">
  3 + {{# ps}}
  4 + <div class="header brand-info ps-block" data-id="{{id}}">
  5 + <img class="banner lazy" data-original="{{banner}}">
  6 + <img class="logo lazy" data-original="{{logo}}">
  7 + <div class="header-content clearfix">
  8 + <p class="name-islike-container">
  9 + <span class="name">{{name}}</span>
  10 + <a id="brand-like" class="brand-islike iconfont {{# isLike}}like{{/ isLike}}" href="{{likeUrl}}">
  11 + &#xe605;
  12 + </a>
  13 + </p>
  14 + <p id="intro" class="intro">
  15 + {{intro}}
  16 + </p>
  17 + <span id="more-intro" class="more-intro">
  18 + <span id="intro-more-txt">more</span>
  19 + <i class="icon iconfont">&#xe609;</i>
  20 + </span>
  21 + </div>
  22 + </div>
  23 + {{# newArrival}}
  24 + <div class="new-arrival ps-block">
  25 + <div class="new-arrival-header">
  26 + <span class="header-text">NEW ARRIVAL</span>
  27 + <a class="more-prods iconfont" href="{{moreUrl}}">&#xe606;</a>
  28 + </div>
  29 + <div class="new-arrival-content clearfix">
  30 + {{# naList}}
  31 + {{> good}}
  32 + {{/ naList}}
  33 + </div>
  34 + <div class="more-goods-container">
  35 + <a class="mg-text" href="{{moreUrl}}">
  36 + 更多商品
  37 + <span class="more-prods iconfont">&#xe604;</span>
  38 + </a>
  39 + </div>
  40 + </div>
  41 + {{/ newArrival}}
  42 + {{#if infos}}
  43 + <div class="related-infos ps-block">
  44 + <div>
  45 + <h2 class="related-info-title">相关资讯</h2>
  46 + </div>
  47 + <div id="related-infos-container" class="related-infos-container">
  48 + {{# infos}}
  49 + {{> guang/info}}
  50 + {{/ infos}}
  51 + </div>
  52 + </div>
  53 + {{/if}}
  54 + {{/ ps}}
  55 +</div>
  56 +{{>layout/footer}}
1 {{>layout/header}} 1 {{>layout/header}}
2 -  
3 -This is a test {{test}}  
4 - 2 +<div class="ps-list-page ps-page yoho-page">
  3 + {{# ps}}
  4 + <ul id="nav-tab" class="nav-tab clearfix">
  5 + <li class="star-nav focus">明星潮品</li>
  6 + <li class="plus-nav">原创潮牌</li>
  7 + </ul>
  8 + <div id="ps-content" class="ps-content">
  9 + <ul class="star-content content">
  10 + {{# star}}
  11 + {{> guang/ps_item}}
  12 + {{/ star}}
  13 + </ul>
  14 + <ul class="plus-content content">
  15 + {{# plus}}
  16 + {{> guang/ps_item}}
  17 + {{/ plus}}
  18 + </ul>
  19 + </div>
  20 + {{/ ps}}
  21 +</div>
5 {{>layout/footer}} 22 {{>layout/footer}}
  1 +<div class="good-info" data-id="{{id}}">
  2 + <div class="tag-container clearfix">
  3 + {{# tags}}
  4 + {{# isNew}}
  5 + <p class="good-tag new-tag">NEW</p>
  6 + {{/ isNew}}
  7 + {{# isReNew}}
  8 + <p class="good-tag renew-tag">再到着</p>
  9 + {{/ isReNew}}
  10 + {{# isSale}}
  11 + <p class="good-tag sale-tag">SALE</p>
  12 + {{/ isSale}}
  13 + {{# isNewFestival}}
  14 + <p class="good-tag new-festival-tag">新品节</p>
  15 + {{/ isNewFestival}}
  16 + {{# isLimit}}
  17 + <p class="good-tag limit-tag">限量商品</p>
  18 + {{/ isLimit}}
  19 + {{/ tags}}
  20 + </div>
  21 + <div class="good-detail-img">
  22 + <a class="good-thumb" href="{{url}}">
  23 + <img class="lazy" data-original="{{thumb}}">
  24 + </a>
  25 + {{# isFew}}
  26 + <p class="few-tag">即将售罄</p>
  27 + {{/ isFew}}
  28 + </div>
  29 + <div class="good-detail-text">
  30 + <div class="name">
  31 + <a href="{{url}}">{{name}}</a>
  32 + </div>
  33 + <div class="price">
  34 + <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
  35 + {{#price}}
  36 + <span class="market-price">¥{{.}}</span>
  37 + {{/price}}
  38 + </div>
  39 + </div>
  40 +</div>
  1 +<div class="guang-info" data-id="{{id}}">
  2 + <div class="info-img">
  3 + {{#if showTags}}
  4 + <a href="javascript:;" class="info-match">
  5 + {{# isTip}}
  6 + 小贴士
  7 + <div class="info-tag tip"></div>
  8 + {{/ isTip}}
  9 + {{# isCollocation}}
  10 + 搭配
  11 + <div class="info-tag collocation"></div>
  12 + {{/ isCollocation}}
  13 + {{# isFashionMan}}
  14 + 潮人
  15 + <div class="info-tag fashion-man"></div>
  16 + {{/ isFashionMan}}
  17 + {{# isFashionGood}}
  18 + 潮品
  19 + <div class="info-tag fashion-good"></div>
  20 + {{/ isFashionGood}}
  21 + {{# isTopic}}
  22 + 话题
  23 + <div class="info-tag topic"></div>
  24 + {{/ isTopic}}
  25 + </a>
  26 + {{/if}}
  27 + <a href="{{url}}">
  28 + <img class="lazy" data-original="{{img}}" alt="{{alt}}">
  29 + </a>
  30 + </div>
  31 +
  32 + <div class="info-deps">
  33 + <a class="info-title-container" href="{{url}}">
  34 + <h2 class="info-title">{{title}}</h2>
  35 + </a>
  36 + <p class="info-text">{{text}}</p>
  37 + {{> guang/tvls}}
  38 + </div>
  39 +</div>
  1 +<li class="plus-star-row">
  2 + {{#if imgs}}
  3 + <div class="swiper-container">
  4 + <div class="swiper-wrapper">
  5 + {{# imgs}}
  6 + <div class="swiper-slide">
  7 + <a href={{url}}>
  8 + <img class="swiper-lazy" data-src={{img}}>
  9 + </a>
  10 + </div>
  11 + {{/ imgs}}
  12 + </div>
  13 + <div class="swiper-pagination"></div>
  14 + </div>
  15 + {{^}}
  16 + <a href={{url}}>
  17 + <img class="lazy" data-original={{img}}>
  18 + </a>
  19 + {{/if}}
  20 + {{# deps}}
  21 + <p class="brand-deps">{{.}}</p>
  22 + {{/ deps}}
  23 +</li>
  1 +<div class="time-view-like-share clearfix">
  2 + <i class="iconfont">&#xe603;</i>
  3 + {{publishTime}}&nbsp;&nbsp;&nbsp;&nbsp;
  4 + <i class="iconfont">&#xe602;</i>
  5 + <span class="page-view">{{pageView}}</span>
  6 + <div class="like-share-container">
  7 + {{# like}}
  8 + <a href="javascript:;" class="iconfont like-btn{{#isLiked}} like{{/isLiked}}">&#xe601;</a>
  9 + <span class="like-count">{{count}}</span>
  10 + {{/ like}}
  11 + {{# share}}
  12 + <a href="{{.}}" class="iconfont share-btn">&#xe600;</a>
  13 + {{/ share}}
  14 + </div>
  15 +</div>
@@ -13,6 +13,29 @@ class PlusstarController extends AbstractAction @@ -13,6 +13,29 @@ class PlusstarController extends AbstractAction
13 */ 13 */
14 public function listAction() 14 public function listAction()
15 { 15 {
  16 + $data = array(
  17 + 'star' => array(
  18 + array(
  19 + 'imgs' => array(
  20 + array(
  21 + 'url' => 'http://stussy.m.yohobuy.com',
  22 + 'img' => 'http://ad.yoho.cn/yohobuy/newfestival/img/brandsmap/6KTZ_01.jpg'
  23 + ),
  24 + array(
  25 + 'url' => 'http://stussy.m.yohobuy.com',
  26 + 'img' =>'http://ad.yoho.cn/yohobuy/newfestival/img/brandsmap/5HUF_01.jpg'
  27 + )
  28 + )
  29 + ),
  30 + array(
  31 + 'url' => 'http://stussy.m.yohobuy.com',
  32 + 'img' => 'http://ad.yoho.cn/yohobuy/newfestival/img/brandsmap/4STAYREAL_02.jpg',
  33 + 'deps' => '优秀的自助品牌,高瞻远瞩的建设性意见来测试文字溢出后的处理问题'
  34 + )
  35 + ),
  36 + 'plus' => array(
  37 + )
  38 + );
16 $this->_view->assign('title', 'YOHO!有货'); 39 $this->_view->assign('title', 'YOHO!有货');
17 $this->_view->display('list', array('test' => 'hello world')); 40 $this->_view->display('list', array('test' => 'hello world'));
18 41