Authored by hf

do goods detail page

Showing 42 changed files with 1687 additions and 1078 deletions
... ... @@ -15,7 +15,7 @@
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeSemicolon": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionDeclaration": {
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
... ...
... ... @@ -17,19 +17,19 @@ use Plugin\Cache;
class Yohobuy
{
// /* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://test2.open.yohobuy.com/';
const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页
const API_URL = 'http://test2.open.yohobuy.com/';
const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页
/**
* 私钥列表
... ...
... ... @@ -322,6 +322,25 @@ class UserData
}
/**
* 意见靠谱,不靠谱接口
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @return array 接口返回的数据
*/
public static function upAndDown($uid, $udid, $suggest_id)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['content'] = $suggest_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/is_reliable', $param);
}
/**
* 提交意见反馈接口
*
* @param int $uid 用户ID
... ...
... ... @@ -247,20 +247,20 @@ class DetailData
"commentBoWrapper": {
"commentBoList": [
{
"productId": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"id": "2012-05-02 15:10:08",
"uid": "请问 这件的灰色的L码还会不会补货?",
"content": "2012-05-02 14:23:09",
"createTime": "2012-05-02 14:23:09",
"sizeName":"L",
"colorName":"red",
"nickName":"xieyong",
"headIcon":"http://dddd"
"productId":"您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"id":"2012-05-02 15:10:08",
"uid":"请问 这件的灰色的L码还会不会补货?",
"content":"2012-05-02 14:23:09",
"createTime":"2012-05-02 14:23:09",
"sizeName":"L",
"colorName":"red",
"nickName":"xieyong",
"headIcon":"http://dddd"
}
],
"commentTotal": 5
}
"productUrl": "http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
},
"productUrl":"http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
"salableTime": "0",
"salesPhrase": "",
"seasons": "summer",
... ... @@ -278,14 +278,6 @@ class DetailData
}', true);
return $data;
$result = array();
if (is_numeric($productId)) {
$result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array('productId' => $productId) );
}
return $result;
}
/**
... ... @@ -422,14 +414,6 @@ class DetailData
}', true);
return $data;
$result = array();
if (is_numeric($productSkn)) {
$result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array('productSkn' => $productSkn) );
}
return $result;
}
}
... ...
... ... @@ -13,10 +13,8 @@ var $nav = $('.category-nav'),
$subLevelItem = $categoryContainer.find('.sub-level li'),
$primaryItem = $categoryContainer.find('.primary-level li');
var $curContent = $contents.not('.hide');
var navHammer;
var $curContent = $contents.not('.hide'),
navHammer;
//初始化container高度
(function() {
... ...
... ... @@ -214,7 +214,7 @@ function tsAnimate() {
setTimeout(tsAnimate, 3000);
$('.home-header .search-btn').on('touchstart', function() {
$('.home-header .iconfont').on('touchstart', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
... ...
... ... @@ -15,7 +15,9 @@ var $action = $('.action'),
$addressListPage = $('.my-address-list-page'),
$area = $('.area'),
$footer = $('#yoho-footer'),
$confim = $('.confim-mask'),
isSubmiting,
deleteId,
newArea = [];
function editAddress(data) {
... ... @@ -32,9 +34,32 @@ function editAddress(data) {
// $addressForm.find('[name="consignee"]').focus();
}
function deleteAddress(data) {
}
$confim.on('touchend', '.cancel', function() {
deleteId = null;
$confim.hide();
}).on('touchend', '.confim', function() {
$.ajax({
method: 'POST',
url: '/home/deladdress',
data: {
id: deleteId
}
}).then(function(res) {
if ($.type(res) !== 'object') {
res = {};
}
if (res.code !== 200) {
tip.show(res.message || '网络出了点问题~');
} else {
window.location.reload();
}
}).fail(function() {
tip.show('网络出了点问题~');
}).always(function() {
deleteId = null;
$confim.hide();
});
});
// 添加地址
$addAddress.on('touchend', function() {
... ... @@ -45,7 +70,8 @@ $addAddress.on('touchend', function() {
$action.on('touchend', '.edit', function() {
editAddress($(this).data());
}).on('touchend', '.del', function() {
deleteAddress();
deleteId = $(this).data('id');
$confim.show();
});
$submit.on('touchend', function() {
... ... @@ -57,6 +83,28 @@ $addressForm.on('submit', function() {
if (isSubmiting) {
return false;
}
// 简单的表单校验
if (!$(this).find('[name="consignee"]').val()) {
tip.show('收件人不能为空');
$(this).find('[name="consignee"]').focus();
return false;
}
if (!$(this).find('[name="mobile"]').val()) {
tip.show('手机号不能为空');
$(this).find('[name="mobile"]').focus();
return false;
}
if (!$(this).find('[name="area_code"]').val() || !$(this).find('[name="area"]').val()) {
tip.show('省市区不能为空');
return false;
}
if (!$(this).find('[name="address"]').val()) {
tip.show('地址不能为空');
$(this).find('[name="address"]').focus();
return false;
}
isSubmiting = true;
$.ajax({
method: 'POST',
... ...
... ... @@ -3,5 +3,12 @@
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/12
*/
var $ = require('jquery');
var $userAvatar = $('.user-avatar');
var myImage = new Image();
require('../product/recommend-for-you.js');
\ No newline at end of file
require('../product/recommend-for-you.js');
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
};
... ...
/**
* 个人信息
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/19
*/
var $ = require('jquery');
var $userAvatar = $('.user-avatar');
var myImage = new Image();
myImage.src = $userAvatar.attr('src');
myImage.onerror = function() {
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
};
... ...
... ... @@ -13,9 +13,9 @@ var goodsSwiper,
// winH = $(window).height(),
sizeSwiper,
refSwiper,
commentsNum,
handleHelper;
lazyLoad($('img.lazy'));
goodsSwiper = new Swiper('.banner-swiper', {
... ... @@ -24,26 +24,60 @@ goodsSwiper = new Swiper('.banner-swiper', {
loop: true,
paginationClickable: true,
pagination: '.banner-top .pagination-inner',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev'
nextButton: '.my-swiper-button-next',
prevButton: '.my-swiper-button-prev'
});
//初始化tab
(function() {
var consultsNum = $('#nav-tab .consults-num').html() - 0;
$('#nav-tab li').on('click', function() {
var index = $(this).index();
commentsNum = $('#nav-tab .comments-num').html() - 0;
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
if (0 !== commentsNum) {
$('#nav-tab .comment-nav').addClass('focus');
$('#feedback-content .comment-content').removeClass('hide');
} else if (0 !== consultsNum) {
$('#nav-tab .consult-nav').addClass('focus');
$('#feedback-content .consult-content').removeClass('hide');
}
})();
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$('#nav-tab li').on('click', function() {
var index = $(this).index();
if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
alert('暂无商品评价');
} else {
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
}
}
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
$('.goodsDiscount .dropdown').on('click', function() {
if ($('.goodsDiscount .discount-folder').is(':hidden')) {
$('.goodsDiscount .discount-folder').slideDown();
} else {
$('.goodsDiscount .discount-folder').slideUp();
}
});
... ...
/**
* 提取URL中的参数
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/19
*/
var opt = {};
var paramStr = window.location.search.split('?')[1];
var keyVal = paramStr.split('&');
var i, key, val;
for (i = keyVal.length; i > 0; i--) {
key = keyVal[i - 1].split('=');
val = key[1];
key = key[0];
//初始化默认参数
switch (key) {
case 'gender':
opt.gender = val;
break;
case 'brand':
opt.brand = val;
break;
case 'sort':
opt.sort = val;
break;
case 'msort':
opt.msort = val;
break;
case 'misort':
opt.misort = val;
break;
case 'color':
opt.color = val;
break;
case 'size':
opt.size = val;
break;
case 'price':
opt.price = val;
break;
case 'discount':
opt.discount = val;
break;
case 'query':
opt.query = val;
break;
case 'style':
opt.style = val;
break;
case 'limit':
opt.limit = val;
break;
case 'channel':
opt.channel = val;
break;
case 'p_d':
opt.p_d = val;
break;
case 'dayLimit':
opt.dayLimit = val;
break;
}
}
module.exports = opt;
\ No newline at end of file
... ...
... ... @@ -31,19 +31,7 @@ var $input = $('#search-input input'),
$clear = $('#search-input .clear-input');
//默认筛选条件
var defaultOpt = {
gender: $('#gender').val(),
brand: $('#brand').val(),
sort: $('#sort').val(),
msort: $('#msort').val(),
misort: $('#misort').val(),
color: $('#color').val(),
size: $('#size').val(),
price: $('#price').val(),
discount: $('#discount').val(),
query: $('#query').val(),
style: $('#style').val()
};
var defaultOpt = require('./extract-url');
var $listNav = $('#list-nav'),
... ...
... ... @@ -25,18 +25,7 @@ var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
gender: $('#gender').val(),
brand: $('#brand').val(),
sort: $('#sort').val(),
msort: $('#msort').val(),
misort: $('#misort').val(),
color: $('#color').val(),
size: $('#size').val(),
price: $('#price').val(),
discount: $('#discount').val(),
style: $('#style').val()
};
var defaultOpt = require('../extract-url');
var $listNav = $('#list-nav'),
... ...
... ... @@ -28,22 +28,7 @@ var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
gender: $('#gender').val(),
brand: $('#brand').val(),
sort: $('#sort').val(),
msort: $('#msort').val(),
misort: $('#misort').val(),
color: $('#color').val(),
size: $('#size').val(),
price: $('#price').val(),
discount: $('#discount').val(),
limit: $('#limit').val(),
channel: $('#channel').val(),
p_d: $('#p_d').val(),
dayLimit: 1,
style: $('#style').val()
};
var defaultOpt = require('../extract-url');
var storeOpt = $.extend({}, defaultOpt); //存储默认筛选条件以便重置
... ...
... ... @@ -9,9 +9,10 @@ var Swiper = require('yoho.iswiper');
var recommendSwiper;
recommendSwiper = new Swiper('.swiper-recommend', {
// lazyLoading: true,
// lazyLoadingInPrevNext: true,
slidesPerView: 'auto'
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'li',
lazyLoading: true,
watchSlidesVisibility: true
});
\ No newline at end of file
... ...
... ... @@ -75,10 +75,10 @@
font-size: 40rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
}
}
&.highlight {
background: rgba(200,200,200,.4);
}
.iconfont.highlight {
background: rgba(200,200,200,.4);
}
}
... ...
... ... @@ -153,6 +153,7 @@ a {
@import "home/index";
@import "category/index";
@import "product/index";
@import "product/comments-consults";
@import "index/index";
@import "shopping-cart/index";
@import "me/index"; //个人中心
... ...
... ... @@ -52,6 +52,19 @@
}
}
.login-btn {
display: block;
position: absolute;
top: pxToRem(40px);
left: pxToRem(194px);
width: pxToRem(244px);
height: pxToRem(82px);
line-height: pxToRem(82px);
color: #fff;
border: pxToRem(4px) solid #fff;
text-align: center;
}
.my-link {
margin-bottom: pxToRem(30px);
padding: pxToRem(6px) 0;
... ... @@ -60,12 +73,35 @@
height: pxToRem(76px);
.link-item {
position: relative;
float: left;
color: #fff;
font-size: pxToRem(22px);
line-height: pxToRem(38px);
width: pxToRem(213px);
&:after {
content: '';
position: absolute;
right: 0;
top: pxToRem(24px);
width: 0;
height: pxToRem(44px);
border-right: 1px solid #fff;
}
&:last-of-type:after {
content: none;
}
}
&.no-login {
padding: 0;
height: pxToRem(88px);
.link-item {
font-size: pxToRem(32px);
line-height: pxToRem(88px);
}
}
}
... ...
.goods-comments-page{
.goods-comments{
.comment-item{
border: 1px solid $borderC;
padding: 0 pxToRem(28px);
.user-name{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(28px);
line-height: pxToRem(36px);
}
.goods-spec,
.detail-content{
color:$mainFontC;
}
.comment-time{
color:#c1c1c1;
}
}
}
}
.goods-consults-page{
.goto-consult{
padding: 0 pxToRem(28px);
height: pxToRem(120px);
background-color: #ffffff;
i,span{
line-height: pxToRem(120px);
font-size: pxToRem(28px);
color:$mainFontC;
}
.consult-logo{
padding-right: pxToRem(15px);
}
.enter-consult-page{
float: right;
color:$subFontC;
}
}
.goods-consults{
.consult-item{
padding: pxToRem(20px) pxToRem(28px);
background-color: #fff;
.question{
font-size: pxToRem(24px);
color:$mainFontC;
span{
display: block;
float: left;
font-size: inherit;
padding-right: pxToRem(15px);
}
p{
overflow: hidden;
padding-bottom: pxToRem(15px);
border-bottom: 1px solid $borderC;
}
}
.time{
font-size: pxToRem(22px);
color:$subFontC;
}
.answer{
font-size: pxToRem(24px);
line-height: pxToRem(36px);
color:$subFontC;
margin-top: pxToRem(14px);
span{
display: block;
float: left;
font-size: inherit;
color:$mainFontC;
padding-right: pxToRem(15px);
}
p{
overflow: hidden;
}
}
}
}
.gap-block{
min-height: 30rem/$pxConvertRem;
background-color: #f0f0f0;
}
}
.consult-form-page{
padding: pxToRem(28px);
text-align: center;
textarea{
box-sizing:border-box;
width: 100%;
height: pxToRem(400px);
font-size: pxToRem(28px);
padding:pxToRem(10px);
color:$mainFontC;
}
a{
display: inline-block;
height: pxToRem(80px);
width: pxToRem(360px);
color: #fff;
background-color: #444;
font-size: pxToRem(40px);
line-height: pxToRem(80px);
text-align: center;
margin-top: pxToRem(20px);
}
}
\ No newline at end of file
... ...
... ... @@ -4,536 +4,608 @@ $borderC:#e0e0e0;
$tableCellC:#eee;
$basicBtnC:#eb0313;
.good-detail-page {
overflow: hidden;
/* basic component */
.page-block{
box-sizing:border-box;
width: 100%;
border-bottom: 2px solid $borderC;
border-top: 1px solid $borderC;
padding: 0 pxToRem(28px);
>.title{
line-height: pxToRem(88px);
color: $mainFontC;
font-size : pxToRem(28px);
border-bottom: 1px solid $borderC;
span{
color:#a0a0a0;
font-size:pxToRem(18px);
}
}
.detail{
margin-top: pxToRem(20px);
margin-bottom: pxToRem(20px);
font-size: pxToRem(24px);
line-height: pxToRem(36px);
&.table{
display: table;
width: 100%;
.row{
display: table-row;
.column{
display: table-cell;
padding: 0.4em 0.8em;
border:1px solid #fff;
font-size: pxToRem(24px);
background-color: $tableCellC;
}
}
}
}
.my-swiper-button-prev,
.my-swiper-button-next {
position: absolute;
top: 50%;
width: pxToRem(48px);
height: pxToRem(48px);
margin-top: pxToRem(-44px);
cursor: pointer;
-moz-background-size: pxToRem(48px) pxToRem(48px);
-webkit-background-size: pxToRem(48px) pxToRem(48px);
background-size: pxToRem(48px) pxToRem(48px);
background-position: center;
background-repeat: no-repeat;
}
.next-grey {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23f0f0f0'%2F%3E%3C%2Fsvg%3E");
right: pxToRem(30px);
left: auto;
}
.gap-block{
min-height: 30rem/$pxConvertRem;
background-color: #f0f0f0;
.prev-grey {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23f0f0f0'%2F%3E%3C%2Fsvg%3E");
left: pxToRem(30px);
right: auto;
}
.banner-container{
position: relative;
// overflow: hidden;
.is-new-lable{
position: absolute;
left: pxToRem(108px);
top:pxToRem(40px);
height: pxToRem(35px);
width:pxToRem(70px);
color:#fff;
text-align: center;
font-size: pxToRem(20px);
line-height: pxToRem(35px);
background-color: #7cd881;
z-index: 16;
}
}
.banner-top{
// width: 100%;
min-height: 660rem / $pxConvertRem;
overflow: hidden;
position: relative;
.swiper-pagination{
position:absolute;
bottom: pxToRem(40px);
.swiper-pagination-bullet {
margin-right: 2px;
.good-detail-page {
overflow: hidden;
.page-block{
box-sizing:border-box;
width: 100%;
border-bottom: 2px solid $borderC;
border-top: 1px solid $borderC;
padding: 0 pxToRem(28px);
>.title{
line-height: pxToRem(88px);
color: $mainFontC;
font-size : pxToRem(28px);
border-bottom: 1px solid $borderC;
span{
color:#a0a0a0;
font-size:pxToRem(18px);
}
.swiper-pagination-bullet-active {
background-color: #000;
}
}
}
.banner-swiper {
min-height: pxToRem(600px);
min-width: pxToRem(448px);
margin: pxToRem(30px) pxToRem(96px);
// position: relative;
overflow: hidden;
ul {
position: relative;
height: 100%;
li {
float: left;
height: 100%;
}
}
}
.goodsName {
min-height: pxToRem(83px);
font-size: pxToRem(28px);
color: #fff;
padding-left: pxToRem(25px);
padding-right: pxToRem(25px);
line-height: pxToRem(36px);
background-color: #515150;
}
.goodsSubtitle{
min-height: pxToRem(87px);
font-size: pxToRem(24px);
line-height: pxToRem(36px);
color:$subFontC;
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
border-bottom:1px solid $borderC;
background-color: #f4f4f4;
}
.price-date{
// width: 100%;
color:$subFontC;
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
border-bottom: 1px solid $borderC;
}
.detail{
margin-top: pxToRem(20px);
margin-bottom: pxToRem(20px);
font-size: pxToRem(24px);
line-height: pxToRem(36px);
&.table{
display: table;
width: 100%;
.row{
display: table-row;
.column{
display: table-cell;
padding: 0.4em 0.8em;
border:1px solid #fff;
font-size: pxToRem(24px);
background-color: $tableCellC;
}
}
}
}
}
.gap-block{
min-height: 30rem/$pxConvertRem;
background-color: #f0f0f0;
}
.banner-container{
position: relative;
// overflow: hidden;
.is-new-lable{
position: absolute;
left: pxToRem(108px);
top:pxToRem(40px);
height: pxToRem(35px);
width:pxToRem(70px);
color:#fff;
text-align: center;
font-size: pxToRem(20px);
line-height: pxToRem(35px);
background-color: #7cd881;
// z-index: 16;
}
}
.banner-top{
// width: 100%;
min-height: 660rem / $pxConvertRem;
overflow: hidden;
position: relative;
.swiper-pagination{
position:absolute;
bottom: pxToRem(40px);
.swiper-pagination-bullet {
margin-right: 2px;
}
.swiper-pagination-bullet-active {
background-color: #000;
}
}
}
.banner-swiper {
min-height: pxToRem(600px);
min-width: pxToRem(448px);
margin: pxToRem(30px) pxToRem(96px);
// position: relative;
overflow: hidden;
ul {
position: relative;
height: 100%;
li {
float: left;
height: 100%;
}
}
}
.goodsName {
min-height: pxToRem(83px);
font-size: pxToRem(28px);
color: #fff;
padding-left: pxToRem(25px);
padding-right: pxToRem(25px);
line-height: pxToRem(36px);
background-color: #515150;
}
.goodsSubtitle{
min-height: pxToRem(87px);
font-size: pxToRem(24px);
line-height: pxToRem(36px);
color:$subFontC;
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
border-bottom:1px solid $borderC;
background-color: #f4f4f4;
}
.price-date{
// width: 100%;
color:$subFontC;
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
border-bottom: 1px solid $borderC;
}
.goodsPrice{
float: left;
font-size: pxToRem(34.59px);
h1{
display: inline-block;
line-height: pxToRem(88px);
}
.currentPrice{
color:red;
margin-right: pxToRem(10px);
}
.previousPrice{
text-decoration:line-through;
}
}
.periodOfMarket{
font-size: pxToRem(24px);
float: right;
h1{
display: inline-block;
line-height: pxToRem(88px);
}
}
.goodsName,
.goodsSubtitle{
// width: 100%;
display:table;
span{
display: table-cell;
vertical-align: middle;
}
}
.goodsPrice{
float: left;
font-size: pxToRem(34.59px);
h1{
display: inline-block;
line-height: pxToRem(88px);
}
.currentPrice{
color:red;
margin-right: pxToRem(10px);
}
.previousPrice{
text-decoration:line-through;
}
}
.periodOfMarket{
font-size: pxToRem(24px);
float: right;
h1{
display: inline-block;
line-height: pxToRem(88px);
}
}
.goodsName,
.goodsSubtitle{
// width: 100%;
display:table;
span{
display: table-cell;
vertical-align: middle;
}
}
.vipLevel {
width: 100%;
box-sizing:border-box;
display: table;
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
font-size: pxToRem(22px);
color: #999999;
border-bottom: 1px solid $borderC;
span{
display: table-cell;
vertical-align: middle;
}
.vip-img{
padding-right: pxToRem(22px);
img{
width: pxToRem(52px);
height: pxToRem(32px);
}
}
.vip-price{
padding-right: pxToRem(55px);
}
.vip-price:last-child{
padding-right: 0;
}
}
.goodsDiscount{
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
font-size: pxToRem(28px);
color: $mainFontC;
line-height: pxToRem(88px);
border-bottom: 1px solid $borderC;
.iconfont{
display: inline-block;
width: pxToRem(35px);
font-size: pxToRem(45px);
float: right;
color:#e0e0e0;
// padding-left:pxToRem(50px);
}
}
.goodsSubtitle,
.goodsDiscount{
text-indent: pxToRem(-14px);
}
.feedback-list-page {
padding-top: pxToRem(30px);
background-color: #f0f0f0;
.nav-tab{
width: 100%;
}
.nav-tab {
height: pxToRem(60px);
padding: pxToRem(10px) 0;
background-color: #fff;
border-top: 1px solid $borderC;
border-bottom: 1px solid $borderC;
}
.comment-nav, .consult-nav {
box-sizing: border-box;
float: left;
width: 50%;
height: pxToRem(60px);
line-height: pxToRem(60px);
font-size: pxToRem(28px);
text-align: center;
color: #ccc;
&.focus {
color: #000;
}
}
.comment-nav {
border-right: 1px solid #ccc;
}
.comment-content{
.comment-content-main{
background-color: #fff;
border-bottom: 1px solid $borderC;
.user-name{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(28px);
line-height: pxToRem(36px);
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(28px);
line-height: pxToRem(36px);
}
.goods-spec,
.detail-content{
color:$mainFontC;
}
.detail-content,
.comment-time{
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
}
.comment-time{
color:#c1c1c1;
}
}
.comment-content-footer{
min-height: pxToRem(88px);
text-align: center;
background-color: #fff;
border-bottom: 1px solid $borderC;
line-height: pxToRem(88px);
font-size: pxToRem(28px);
a{
color: #e0e0e0;
.iconfont{
font-size: inherit;
}
}
}
.vipLevel {
width: 100%;
box-sizing:border-box;
display: table;
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
font-size: pxToRem(22px);
color: #999999;
border-bottom: 1px solid $borderC;
span{
display: table-cell;
vertical-align: middle;
}
.vip-img{
padding-right: pxToRem(22px);
img{
width: pxToRem(52px);
height: pxToRem(32px);
}
}
.vip-price{
padding-right: pxToRem(55px);
}
.vip-price:last-child{
padding-right: 0;
}
}
.goodsDiscount{
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
font-size: pxToRem(28px);
color: $mainFontC;
line-height: pxToRem(88px);
border-bottom: 1px solid $borderC;
.iconfont{
display: inline-block;
width: pxToRem(35px);
font-size: pxToRem(45px);
float: right;
color:#e0e0e0;
// padding-left:pxToRem(50px);
}
}
.goodsSubtitle,
.goodsDiscount{
text-indent: pxToRem(-14px);
}
.feedback-list-page {
padding-top: pxToRem(30px);
background-color: #f0f0f0;
.nav-tab{
width: 100%;
}
.nav-tab {
height: pxToRem(60px);
padding: pxToRem(10px) 0;
background-color: #fff;
border-top: 1px solid $borderC;
border-bottom: 1px solid $borderC;
}
.comment-nav, .consult-nav {
box-sizing: border-box;
float: left;
width: 50%;
height: pxToRem(60px);
line-height: pxToRem(60px);
font-size: pxToRem(28px);
text-align: center;
color: #ccc;
&.focus {
color: #000;
}
}
.comment-nav {
border-right: 1px solid #ccc;
}
.content{
.content-main{
background-color: #fff;
border-bottom: 1px solid $borderC;
&.comment-content-main{
.user-name{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
// font-size: pxToRem(28px);
// line-height: pxToRem(36px);
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(28px);
line-height: pxToRem(36px);
}
.goods-spec,
.detail-content{
color:$mainFontC;
}
.detail-content,
.comment-time{
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
}
.comment-time{
color:#c1c1c1;
}
}
&.consult-content-main{
padding-right: pxToRem(28px);
padding-left: pxToRem(28px);
padding-top: pxToRem(20px);
padding-bottom: pxToRem(20px);
.question{
font-size: pxToRem(24px);
color:$mainFontC;
span{
display: block;
float: left;
font-size: inherit;
padding-right: pxToRem(15px);
}
p{
overflow: hidden;
}
}
.time{
font-size: pxToRem(22px);
color:$subFontC;
}
.answer{
font-size: pxToRem(24px);
line-height: pxToRem(36px);
color:$subFontC;
margin-top: pxToRem(14px);
span{
display: block;
float: left;
font-size: inherit;
color:$mainFontC;
padding-right: pxToRem(15px);
}
p{
overflow: hidden;
}
}
}
}
}
.content.hide {
display: none;
}
}
.enter-store{
min-height: pxToRem(100px);
display: table;
a{
display: table-cell;
vertical-align: middle;
text-align: left;
}
.store-logo{
// padding-right: 35rem/$pxConvertRem;
img{
width: pxToRem(109px);
height: pxToRem(68px);
margin-left: 0;
margin-right: pxToRem(-25px);
}
}
.store-name{
font-size: pxToRem(34px);
color:$mainFontC;
}
.store-link{
font-size:pxToRem(28px) ;
color:$subFontC;
text-align: right;
span{
font-size: inherit;
}
}
}
.goods-desc{
.service{
width: pxToRem(489px);
height: pxToRem(28px);
margin-top: pxToRem(22px);
}
}
.tips{
color:$subFontC;
font-size: pxToRem(18px);
margin-top: pxToRem(20px);
}
.materials{
.detail{
img{
display: block;
overflow: hidden;
width: pxToRem(90px);
height: pxToRem(120px);
padding-right: pxToRem(20px);
float: left;
}
.material-desc{
font-size: pxToRem(24px);
overflow: hidden;
}
}
.material-type{
width: pxToRem(581px);
height: pxToRem(99px);
border-top: 1px solid $borderC;
padding: pxToRem(17px) 0;
}
}
.product-detail{
.detail{
img{
margin-top: pxToRem(20px);
width: pxToRem(581px);
height: pxToRem(772px);
}
}
margin-bottom: pxToRem(120px);
}
.detail-swiper{
.swiper-wrapper{
.swiper-slide{
width: pxToRem(114px);
div{
text-align: center;
&.cell{
font-size: pxToRem(24px);
background-color: $tableCellC;
padding:pxToRem(15px) 0;
border: 1px solid #fff;
}
}
}
}
}
#reference-swiper-container{
.first-group{
width: pxToRem(70px);
margin-top: pxToRem(66px);
.avatar{
line-height: pxToRem(40px);
width: pxToRem(40px);
height: pxToRem(40px);
margin: pxToRem(18px) 0;
}
}
}
.measurement-method{
.detail{
width: 100%;
// height: pxToRem(300px);
img{
float:left;
width: pxToRem(270px);
height: pxToRem(239px);
margin-top: pxToRem(18px);
margin-right: pxToRem(28px);
}
.right-part{
overflow: hidden;
.title{
>h1{
margin-top: pxToRem(10px);
display: inline-block;
padding-right: pxToRem(10px);
border-right: 1px solid $borderC;
line-height: 100%;
}
>span{
font-size: pxToRem(12px);
}
}
ul.items{
margin-top: pxToRem(20px);
padding: 0;
line-height: pxToRem(30px);
font-size: pxToRem(13px);
li{
span{
display: inline-block;
width: pxToRem(15px);
height: pxToRem(15px);
background-color: $basicBtnC;
border-radius: 50%;
color:#fff;
text-align: center;
line-height: pxToRem(15px);
font-size: pxToRem(13px);
margin-right: pxToRem(12px);
vertical-align: text-bottom;
}
}
.comment-content-footer,
.consult-content-footer{
min-height: pxToRem(88px);
text-align: center;
background-color: #fff;
border-bottom: 1px solid $borderC;
line-height: pxToRem(88px);
font-size: pxToRem(28px);
a{
color: #e0e0e0;
.iconfont{
font-size: inherit;
}
}
}
clear:both;
}
}
.cart-bar{
position: relative;
box-sizing:border-box;
width: 100%;
height: pxToRem(120px);
position:fixed;
bottom: 0;
background-color: #fff;
z-index: 64;
padding:pxToRem(20px) pxToRem(28px);
text-align: center;
a{
display: inline-block;
&.num-incart{
font-size: pxToRem(47px);
color:#444;
}
&.favorite{
font-size: pxToRem(34px);
color:$basicBtnC;
}
&.addto-cart{
height: pxToRem(80px);
width: pxToRem(260px);
margin:0 pxToRem(100px) 0 pxToRem(115px);
color: #fff;
background-color: $basicBtnC;
font-size: pxToRem(40px);
line-height: pxToRem(80px);
text-align: center;
}
}
.num-tag{
position: absolute;
left:pxToRem(66px);
height: pxToRem(20px);
display: block;
width: pxToRem(36px);
height: pxToRem(36px);
background-color: $basicBtnC;
border-radius: 50%;
color:#fff;
font-size: pxToRem(24px);
}
}
}
.content.hide {
display: none;
}
}
.enter-store{
min-height: pxToRem(100px);
display: table;
a{
display: table-cell;
vertical-align: middle;
text-align: left;
}
.store-logo{
// padding-right: 35rem/$pxConvertRem;
img{
width: pxToRem(109px);
height: pxToRem(68px);
margin-left: 0;
margin-right: pxToRem(-25px);
}
}
.store-name{
font-size: pxToRem(34px);
color:$mainFontC;
}
.store-link{
font-size:pxToRem(28px) ;
color:$subFontC;
text-align: right;
span{
font-size: inherit;
}
}
}
.goods-desc{
.service{
width: pxToRem(489px);
height: pxToRem(28px);
margin-top: pxToRem(22px);
}
}
.tips{
color:$subFontC;
font-size: pxToRem(18px);
margin-top: pxToRem(20px);
}
.materials{
.detail{
img{
display: block;
overflow: hidden;
width: pxToRem(90px);
height: pxToRem(120px);
padding-right: pxToRem(20px);
float: left;
}
.material-desc{
font-size: pxToRem(24px);
overflow: hidden;
}
}
.material-type{
width: pxToRem(581px);
height: pxToRem(99px);
border-top: 1px solid $borderC;
padding: pxToRem(17px) 0;
}
}
.product-detail{
.detail{
img{
margin-top: pxToRem(20px);
width: pxToRem(581px);
height: pxToRem(772px);
}
}
margin-bottom: pxToRem(120px);
}
.detail-swiper{
.swiper-wrapper{
.swiper-slide{
width: pxToRem(114px);
div{
text-align: center;
&.cell{
font-size: pxToRem(24px);
background-color: $tableCellC;
padding:pxToRem(15px) 0;
border: 1px solid #fff;
}
}
}
}
}
#reference-swiper-container{
.first-group{
width: pxToRem(70px);
margin-top: pxToRem(66px);
.avatar{
line-height: pxToRem(40px);
width: pxToRem(40px);
height: pxToRem(40px);
margin: pxToRem(18px) 0;
}
}
}
.measurement-method{
.detail{
width: 100%;
// height: pxToRem(300px);
img{
float:left;
width: pxToRem(270px);
height: pxToRem(239px);
margin-top: pxToRem(18px);
margin-right: pxToRem(28px);
}
.right-part{
overflow: hidden;
.title{
>h1{
margin-top: pxToRem(10px);
display: inline-block;
padding-right: pxToRem(10px);
border-right: 1px solid $borderC;
line-height: 100%;
}
>span{
font-size: pxToRem(12px);
}
}
ul.items{
margin-top: pxToRem(20px);
padding: 0;
line-height: pxToRem(30px);
font-size: pxToRem(13px);
li{
span{
display: inline-block;
width: pxToRem(15px);
height: pxToRem(15px);
background-color: $basicBtnC;
border-radius: 50%;
color:#fff;
text-align: center;
line-height: pxToRem(15px);
font-size: pxToRem(13px);
margin-right: pxToRem(12px);
vertical-align: text-bottom;
}
}
}
}
clear:both;
}
}
.cart-bar{
position: relative;
box-sizing:border-box;
width: 100%;
height: pxToRem(120px);
position:fixed;
bottom: 0;
background-color: #fff;
z-index:2;
padding:pxToRem(20px) pxToRem(28px);
text-align: center;
a{
display: inline-block;
&.num-incart{
font-size: pxToRem(47px);
color:#444;
}
&.favorite{
font-size: pxToRem(34px);
color:$basicBtnC;
}
&.addto-cart{
height: pxToRem(80px);
width: pxToRem(260px);
margin:0 pxToRem(100px) 0 pxToRem(115px);
color: #fff;
background-color: $basicBtnC;
font-size: pxToRem(40px);
line-height: pxToRem(80px);
text-align: center;
}
}
.num-tag{
position: absolute;
left:pxToRem(66px);
height: pxToRem(20px);
display: block;
width: pxToRem(36px);
height: pxToRem(36px);
background-color: $basicBtnC;
border-radius: 50%;
color:#fff;
font-size: pxToRem(24px);
}
}
}
... ...
... ... @@ -12,25 +12,28 @@
font-weight: bold;
}
.swiper-recommend {
.swiper-container {
padding: pxToRem(20px) 0;
width: 100%;
height: pxToRem(252px);
overflow: hidden;
.swiper-slider {
margin: 0 pxToRem(10px);
.swiper-slide {
padding: 0 pxToRem(10px);
float: left;
width: pxToRem(156px);
&:first-child {
margin-left: pxToRem(30px);
padding-left: pxToRem(30px);
}
&:last-child {
margin-right: pxToRem(30px);
padding-right: pxToRem(30px);
}
img {
width: pxToRem(156px);
max-width: none;
width: 100%;
height: pxToRem(208px);
}
}
}
... ... @@ -42,19 +45,21 @@
line-height: 1;
span {
display: block;
// chrome 最小支持12px, 设计图是 10px ,用CSS3变换
@include transform(scale(0.875));
}
.sale-price {
color: #d9134f;
margin-left: pxToRem(-10px);
}
.old-price {
position: absolute;
top: 0;
right: 0;
color: #ededed;
right: pxToRem(-6px);
color: #b0b0b0;
}
.no-price {
... ...
... ... @@ -21,7 +21,7 @@
你确定要删除地址吗?
</div>
<div class="action">
<span class="cencel">
<span class="cancel">
取消
</span>
<span class="confim">
... ...
{{> layout/header}}
<div class="my-page yoho-page">
<div class="my-header">
{{#isLogin}}
<a class="user-info" href="/home/personaldetails">
<img class="user-avatar" src="{{head_ico}}">
<span class="username">{{profile_name}}</span>
... ... @@ -9,18 +10,26 @@
{{/vip_info}}
<div class="iconfont more-icon">&#xe604;</div>
</a>
{{/isLogin}}
{{^isLogin}}
<div class="user-info">
<a class="login-btn" href="http://m.dev.yohobuy.com/signin.html">
登录/注册
</a>
</div>
{{/isLogin}}
</div>
<div class="my-link clearfix">
<div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}">
<a class="link-item" href="/home/favorite">
{{product_favorite_total}}
{{#isLogin}}{{product_favorite_total}}{{/isLogin}}
<p>收藏的商品</p>
</a>
<a class="link-item" href="/home/favorite?tab=brand">
{{brand_favorite_total}}
{{#isLogin}}{{brand_favorite_total}}{{/isLogin}}
<p>收藏的品牌</p>
</a>
<a class="link-item" href="/home/">
{{product_browse}}
{{#isLogin}}{{product_browse}}{{/isLogin}}
<p>浏览记录</p>
</a>
</div>
... ... @@ -50,26 +59,26 @@
<a class="list-item" href="/home/address">
<span class="iconfont icon">&#xe637;</span>
地址管理
<span class="iconfont num">{{address_num}} &#xe604;</span>
<span class="iconfont num">{{#if address_num}}{{address_num}}{{/if}} &#xe604;</span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/coupons">
<span class="iconfont icon">&#xe63a;</span>
优惠券
<span class="iconfont num">{{coupon_num}} &#xe604;</span>
<span class="iconfont num">{{#if coupon_num}}{{coupon_num}}{{/if}} &#xe604;</span>
</a>
<a class="list-item" href="/home/currency">
<span class="iconfont icon">&#xe635;</span>
YOHO
<span class="iconfont num">{{yoho_coin_num}} &#xe604;</span>
<span class="iconfont num">{{#if yoho_coin_num}}{{yoho_coin_num}}{{/if}} &#xe604;</span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/message">
<span class="iconfont icon">&#xe636;</span>
消息
<span class="iconfont num">{{inbox_total}} &#xe604;</span>
<span class="iconfont num">{{#if inbox_total}}{{inbox_total}}{{/if}} &#xe604;</span>
</a>
</div>
<div class="group-list">
... ... @@ -86,7 +95,9 @@
<span class="iconfont num">&#xe604;</span>
</a>
</div>
{{#isLogin}}
{{> product/recommend-for-you}}
{{/isLogin}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="personal-details">
<ul>
<li><span>头像</span><span><i class="head-portrait"><img src="{{ head_ico }}"></i></span></li>
<li><span>头像</span><span><i class="head-portrait"><img class="user-avatar" src="{{ head_ico }}"></i></span></li>
<li><span>昵称</span><span>{{ username }}</span></li>
<li><span>性别</span><span>{{ gender }}</span></li>
<li><span>生日</span><span>{{ birthday }}</span></li>
... ...
{{> layout/header}}
<div class="goods-comments-page yoho-page">
{{#comments}}
<div class="goods-comments">
{{#list}}
<div class="comment-item">
<span class="user-name">
{{userName}}
</span>
<span class="goods-spec">
{{desc}}
</span>
<p class="detail-content">
{{content}}
</p>
<span class="comment-time">
{{time}}
</span>
</div>
{{/list}}
</div>
{{/comments}}
</div>
{{> layout/footer}}
... ...
{{> layout/header}}
<div class="consult-form-page">
<form class="consult-form">
<textarea>这款衣服有WS吗?</textarea>
<a href="" type="submit">提交</a>
</form>
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="goods-consults-page yoho-page">
<div class="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<i class="iconfont enter-consult-page">&#xe604;</i>
</div>
{{# consults}}
<div class="goods-consults">
{{#list}}
<div class="gap-block"></div>
<div class="consult-item">
<div class="question">
<span class="iconfont">&#xe639;</span>
<p>
{{question}}
<span class="time">
{{time}}
</span>
</p>
</div>
<div class="answer">
<span class="iconfont">&#xe63c;</span>
<p>{{answer}}</p>
</div>
</div>
{{/list}}
</div>
{{/ consults}}
</div>
{{> layout/footer}}
... ...
... ... @@ -43,19 +43,36 @@
{{#goodsDiscount}}
<div class="goodsDiscount">
<h1>{{.}}<span class="iconfont">&#xe609;</span></h1>
{{#each list}}
{{#if @first}}
<h1>{{this}}<span class="iconfont dropdown">&#xe609;</span></h1>
<div class="discount-folder">
{{else}}
<h1 class="folder-item">{{this}}</h1>
{{/if}}
{{/list}}
</div>
</div>
{{/goodsDiscount}}
<div class="feedback-list-page ">
<div class="feedback-list ">
{{# feedbacks}}
{{#if nodata}}
<div class="nodata">
<span>暂无商品评价和咨询</span>
<a class="go-consult">我要咨询<i class="iconfont"><span class="iconfont">&#xe604;</span></a>
</div>
{{else}}
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav focus">{{commentName}}</li>
<li class="consult-nav">{{consultName}}</li>
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
<div class="comment-content content ">
<div class="comment-content-main">
{{#if commentsNum}}
<div class="comment-content-main content-main">
{{# comments}}
<span class="user-name">
{{userName}}
... ... @@ -71,16 +88,55 @@
</span>
{{/ comments}}
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无评论
</div>
{{/if}}
<div class="comment-content-footer">
<a href="{{moreComments}}">查看更多 <span class="iconfont">&#xe604;</span></a>
</div>
</div>
<div class="consult-content content hide">
{{# consults}}
<!-- {{> guang/ps_item}} -->
{{/ consults}}
<div class="consult-content content hide ">
{{#if consultsNum}}
<div class="consult-content-main content-main">
{{# consults}}
<div class="question">
<span class="iconfont">&#xe639;</span>
<p>{{question}}
<span class="time">
{{time}}
</span>
</p>
</div>
<div class="answer">
<span class="iconfont">&#xe63c;</span>
<p>{{answer}}</p>
</div>
{{/ consults}}
</div>
<div class="consult-content-footer">
<a href="{{moreConsults}}">
查看更多
<span class="iconfont">&#xe604;</span></a>
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="{{gotoConsults}}">
我要咨询
<span class="iconfont">&#xe604;</span></a>
</div>
{{/if}}
</div>
</div>
{{/if}}
{{/ feedbacks}}
</div>
... ... @@ -141,7 +197,7 @@
<div class="swiper-container detail-swiper" id="size-swiper-container">
<div class="swiper-wrapper">
{{#list}}
<div class="swiper-slide blue-slide" >
<div class="swiper-slide " >
<div class="size-name cell">{{name}}</div>
<div class="size-m cell">{{sizem}}</div>
<div class="size-xl cell">{{sizexl}}</div>
... ... @@ -255,7 +311,11 @@
<div class="cart-bar">
<span class="num-tag">{{numInCart}}</span>
<a href="" class="num-incart iconfont">&#xe62c;</a>
{{#if goodsInstore}}
<a href="" class="addto-cart ">加入购物车</a>
{{else}}
<a href="" class="sold-out">已售罄</a>
{{/if}}
<a href="" class="favorite iconfont">&#xe605;</a>
</div>
{{/cartInfo}}
... ...
... ... @@ -37,59 +37,6 @@
<div class="container hide clearfix"></div>
{{> filter}}
</div>
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
{{#if gender}}
<input id="gender" type="hidden" value={{gender}}>
{{/if}}
{{#if sort}}
<input id="sort" type="hidden" value={{sort}}>
{{/if}}
{{#if msort}}
<input id="msort" type="hidden" value={{msort}}>
{{/if}}
{{#if misort}}
<input id="misort" type="hidden" value={{misort}}>
{{/if}}
{{#if color}}
<input id="color" type="hidden" value={{color}}>
{{/if}}
{{#if size}}
<input id="size" type="hidden" value={{size}}>
{{/if}}
{{#if price}}
<input id="price" type="hidden" value={{price}}>
{{/if}}
{{#if p_d}}
<input id="p_d" type="hidden" value={{p_d}}>
{{/if}}
{{#if channel}}
<input id="channel" type="hidden" value={{channel}}>
{{/if}}
{{#if dayLimit}}
<input id="dayLimit" type="hidden" value={{dayLimit}}>
{{/if}}
{{#if limit}}
<input id="limit" type="hidden" value={{limit}}>
{{/if}}
{{#if style}}
<input id="style" type="hidden" value={{style}}>
{{/if}}
{{> product/suspend-cart}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -48,59 +48,6 @@
{{> filter}}
</div>
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
{{#if gender}}
<input id="gender" type="hidden" value={{gender}}>
{{/if}}
{{#if sort}}
<input id="sort" type="hidden" value={{sort}}>
{{/if}}
{{#if msort}}
<input id="msort" type="hidden" value={{msort}}>
{{/if}}
{{#if misort}}
<input id="misort" type="hidden" value={{misort}}>
{{/if}}
{{#if color}}
<input id="color" type="hidden" value={{color}}>
{{/if}}
{{#if size}}
<input id="size" type="hidden" value={{size}}>
{{/if}}
{{#if price}}
<input id="price" type="hidden" value={{price}}>
{{/if}}
{{#if p_d}}
<input id="p_d" type="hidden" value={{p_d}}>
{{/if}}
{{#if channel}}
<input id="channel" type="hidden" value={{channel}}>
{{/if}}
{{#if limit}}
<input id="limit" type="hidden" value={{limit}}>
{{/if}}
{{#if discount}}
<input id="discount" type="hidden" value={{discount}}>
{{/if}}
{{#if style}}
<input id="style" type="hidden" value={{style}}>
{{/if}}
{{> product/suspend-cart}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -16,8 +16,8 @@
<script src="http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index-debug.js"></script>
{{/if}}
{{#if devEnv}}
<script src="http://172.16.6.204:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://172.16.6.204:8000/'});</script>
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://localhost:8000/'});</script>
{{/if}}
<script type="text/javascript">
(function(w,d,s,j,f){
... ...
... ... @@ -163,6 +163,12 @@
seajs.use('js/product/detail/detail');
</script>
{{/if}}
{{!-- 商品详情评论 --}}
{{#if goodsCommentsPage}}
<script>
seajs.use('js/product/detail/comments');
</script>
{{/if}}
{{!-- 品类 --}}
{{#if categoryPage}}
<script>
... ... @@ -247,4 +253,9 @@
<script>
seajs.use('js/me/my-guang');
</script>
{{/if}}
{{#if personalDetailsPage}}
<script>
seajs.use('js/me/personal-details');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -16,6 +16,6 @@
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev prev-grey"></div>
<div class="swiper-button-next next-grey"></div>
</div>
\ No newline at end of file
... ...
... ... @@ -89,50 +89,5 @@
{{> filter}}
</div>
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
{{#if gender}}
<input id="gender" type="hidden" value={{gender}}>
{{/if}}
{{#if sort}}
<input id="sort" type="hidden" value={{sort}}>
{{/if}}
{{#if msort}}
<input id="msort" type="hidden" value={{msort}}>
{{/if}}
{{#if misort}}
<input id="misort" type="hidden" value={{misort}}>
{{/if}}
{{#if color}}
<input id="color" type="hidden" value={{color}}>
{{/if}}
{{#if size}}
<input id="size" type="hidden" value={{size}}>
{{/if}}
{{#if price}}
<input id="price" type="hidden" value={{price}}>
{{/if}}
{{#if discount}}
<input id="discount" type="hidden" value={{discount}}>
{{/if}}
{{#if query}}
<input id="query" type="hidden" value={{query}}>
{{/if}}
{{#if style}}
<input id="style" type="hidden" value={{style}}>
{{/if}}
{{> product/suspend-cart}}
{{/ goodList}}
\ No newline at end of file
... ...
{{# recommendForYou}}
<div class="recommend-for-you">
<div class="title">为您优选新品</div>
<div class="swiper-recommend">
<ul class="swiper-wrapper">
<div id="swiper-recommend" class="swiper-container">
<ul class="swiper-wrapper swiper-wrapper-recommend">
{{#recommendList}}
<li class="swiper-slider">
<img class="img-box" src="{{thumb}}">
<li class="swiper-slide">
<img class="swiper-lazy img-box" data-src="{{thumb}}">
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}"{{salePrice}}</span>
{{#price}}<span class="old-price"{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</li>
{{/recommendList}}
</ul>
... ...
... ... @@ -27,7 +27,8 @@ class HomeController extends AbstractAction
// {
// // 检查用户是否登录, 未登录则跳转到登录页
// $uid = $this->getUid(true);
// if (!$uid) {
// $action = $this->getRequest()->getActionName();
// if (!$uid && $action !== 'index') {
// $this->go(Helpers::url('/signin.html'));
// }
//
... ... @@ -43,17 +44,21 @@ class HomeController extends AbstractAction
$this->setTitle('个人中心');
$this->setNavHeader('个人中心');
$uid = $this->getUid();
$data = \Index\UserModel::getUserProfileData($uid);
$data += \Index\UserModel::getInfoNumData($uid);
// 优选新品数据
$channel = Helpers::getChannelByCookie();
$data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
// print_r($data);
$data = array(
'myIndexPage' => true,
'pageFooter' => true
);
$uid = $this->getUid();
if ($uid) {
$data['isLogin'] = true;
$uid = 8826435;
$data += \Index\UserModel::getUserProfileData($uid);
$data += \Index\UserModel::getInfoNumData($uid);
$data['myIndexPage'] = true;
$data['pageFooter'] = true;
// 优选新品数据
$channel = Helpers::getChannelByCookie();
$data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
}
$this->_view->display('index', $data);
}
... ... @@ -69,6 +74,7 @@ class HomeController extends AbstractAction
$tab = $this->get('tab', '');
$uid = $this->getUid();
$uid = 8826435;
$gender = Helpers::getGenderByCookie();
$favProducts = \Index\UserModel::getFavProductData($uid);
... ... @@ -125,6 +131,7 @@ class HomeController extends AbstractAction
// $uid = $this->getUid();
$uid = 967016;
$data = \Index\UserModel::getUserProfileData($uid);
$data['personalDetailsPage'] = true;
$data['pageFooter'] = true;
$this->_view->display('personal-details', $data);
}
... ... @@ -264,7 +271,7 @@ class HomeController extends AbstractAction
/**
* 删除地址
*/
public function addressDelAction()
public function delAddressAction()
{
$result = array();
... ... @@ -422,6 +429,22 @@ class HomeController extends AbstractAction
}
/**
* 异步点击靠谱或者不靠谱
*/
public function upAndDownAction()
{
if ($this->isAjax())
{
$uid = $this->getUid();
$udid = $this->getUdid();
$suggest_id = $this->post('suggest_id', 0);
$result = \Index\UserModel::upAndDown($uid, $udid, $suggest_id);
$this->echoJson($result);
}
}
/**
* 会员等级展示页
*/
public function gradeAction()
... ... @@ -518,7 +541,7 @@ class HomeController extends AbstractAction
{
echo " ";
}
elseif ($page = 1)
elseif ($page == 1)
{
$order['walkwayUrl'] = self::strollAction();
}
... ...
... ... @@ -423,13 +423,13 @@ class UserModel
// 调用接口获取地址数据
$suggest = UserData::suggestData($udid, $page, $limit);
//print_r($suggest);
// 处理意见反馈数据
if (isset($suggest['data']) && !empty($suggest['data'])) {
$one = array();
foreach ($suggest['data']['list'] as $val) {
$one = array();
$one['suggest_id'] = $val['id'];
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
... ... @@ -486,6 +486,34 @@ class UserModel
}
/**
* 处理意见靠谱,不靠谱接口返回结果
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @return array|mixed 处理之后的数据
*/
public static function upAndDown($uid, $udid, $suggest_id)
{
$result = array('code' => 400, 'message' => '出错啦');
if (empty($suggest_id)) {
$result['code'] = 401;
$result['message'] = '指定意见不存在';
} else {
// 调用接口
$save = UserData::upAndDown($uid, $udid, $suggest_id);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '操作成功';
}
}
return $result;
}
/**
* 处理我的消息数据
*
* @param int $uid 用户ID
... ...
... ... @@ -3,6 +3,7 @@
namespace Product;
use LibModels\Wap\Product\DetailData;
use Plugin\Helpers;
/**
* 商品详情页模板相关的数据模型
... ... @@ -20,21 +21,23 @@ class DetailModel
* 商品基本信息
*
* @param int $productId 商品ID
* @param int $goodsId 某个颜色的商品
* @param int $uid 当前登录用户ID, 未登录为0
* @return array
*/
public static function getBaseInfo($productId, $uid)
public static function getBaseInfo($productId, $goodsId, $uid)
{
$result = array();
if (is_numeric($productId)) {
if (is_numeric($productId) && is_numeric($goodsId)) {
// 调用接口
$baseInfo = DetailData::baseInfo($productId, $uid);
// 商品名称
if (isset($baseInfo['productName'])) {
$result['goodsName'] = $baseInfo['productName'];
}
// 商品价格
if (isset($baseInfo['productPriceBo'])) {
$result['goodsPrice'] = array();
... ... @@ -52,18 +55,37 @@ class DetailModel
$result['vipLevel']['list'][] = $build;
}
}
// 上市期
if (isset($baseInfo['expectArrivalTime'])) {
$result['periodOfMarket'] = date('n', $baseInfo['firstShelveTime']) . '月';
}
// 促销信息
if (isset($baseInfo['promotionBoList'])) {
$build = array();
foreach ($baseInfo['promotionBoList'] as $value) {
$build['title'] = $value['promotionTitle'];
$build['type'] = $value['promotionType'];
$result['goodsDiscount']['list'][] = $build;
}
}
// 商品咨询和商品评价
$result['feedbacks'] = array();
if (isset($baseInfo['consultBoWrapper'])) {
$result['feedbacks']['consultTotal'] = $baseInfo['consultBoWrapper']['consultTotal'];
if (!empty($baseInfo['consultBoWrapper'])) {
$result['feedbacks']['consultNum'] = $baseInfo['consultBoWrapper']['consultTotal'];
$result['feedbacks']['consults'] = array();
$build = array();
foreach ($baseInfo['consultBoWrapper']['consultBoList'] as $value) {
$build['question'] = $value['ask'];
$build['time'] = $value['askTime'];
$build['answer'] = $value['answer'];
$result['feedbacks']['consults'][] = $build;
}
}
if (isset($baseInfo['commentBoWrapper'])) {
$result['feedbacks']['commentTotal'] = $baseInfo['commentBoWrapper']['commentTotal'];
if (!empty($baseInfo['commentBoWrapper'])) {
$result['feedbacks']['commentNum'] = $baseInfo['commentBoWrapper']['commentTotal'];
$result['feedbacks']['comments'] = array();
$build = array();
foreach ($baseInfo['commentBoWrapper']['commentBoList'] as $value) {
... ... @@ -74,37 +96,76 @@ class DetailModel
$result['feedbacks']['comments'][] = $build;
}
}
// 品牌信息
if (!empty($baseInfo['brand'])) {
$result['enterStore'] = array(
'img' => Helpers::getImageUrl($baseInfo['brand']['brandIco'], 47, 47),
'storeName' => $baseInfo['brand']['brandName'],
'url' => Helpers::url('', array(), $baseInfo['brand']['brandDomain'])
);
}
// 商品信息
if (!empty($baseInfo['goodsList'])) {
$colorGroup = array();
$sizeGroup = array();
$goodsList = array();
$goodsGroup = array();
$colorId = 0;
foreach ($baseInfo['goodsList'] as $value) {
foreach ($value['goodsImagesList'] as $image) {
$colorId = intval($value['colorId']);
// 商品按颜色进行分类分组
foreach ($value['goodsImagesList'] as $goods) {
$goodsList[ $goods['goodsId'] ] = $colorId;
$goodsGroup[$colorId][] = array(
'goodsId' => $goods['goodsId'],
'img' => $goods['imageUrl'],
);
$colorGroup[$colorId] = array(
'colorId' => $colorId,
'colorName' => $value['colorName'],
'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
);
}
// 商品的尺码列表
foreach ($value['goodsSizeBoList'] as $size) {
$sizeGroup[ $colorId ] = array(
'sizeName' => $size['sizeName'],
'sizeSku' => $size['goodsSizeSkuId'],
'sizeStorage' => $size['goodsSizeStorageNum'],
);
}
}
// 多个
if (isset($baseInfo['goodsList'][1])) {
$result['bannerTop']['list'] = array();
foreach ($baseInfo['goodsList'][1] as $value) {
// 商品图
$goodsId = intval($goodsId);
if (isset($goodsList[$goodsId])) {
$colorId = $goodsList[$goodsId];
// 多个
if (isset($goodsGroup[$colorId][1])) {
foreach ($goodsGroup[$colorId] as $value) {
$result['bannerTop']['list'][] = array(
'img' => Helpers::getImageUrl($value['img'], 450, 600)
);
}
}
// 单个
elseif (isset($goodsGroup[$colorId][0])) {
$result['bannerTop'] = array(
'img' => Helpers::getImageUrl($goodsGroup[$colorId][0]['img'], 450, 600)
);
}
}
// 单个
else {
$result['bannerTop'] = array();
$result['bannerTop']['img'] = '';
}
}
// 调用尺码需要的SKN号
if (isset($baseInfo['erpProductId'])) {
$result['skn'] = $baseInfo['erpProductId'];
}
}
return $result;
var_dump($baseInfo);
}
/**
... ...
... ... @@ -9,235 +9,352 @@ class DetailController extends AbstractAction
/**
* 商品详情
*
* @param
* @param int productId
* @param int goodsId
*/
public function indexAction()
{
$productId = $this->param('productId');
$goodsId = $this->param('goodsId');
{
$productId = $this->param('productId', 123);
$goodsId = $this->param('goodsId', 3241);
$uid = $this->getUid();
$data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
$data['goodsDetailPage'] = true;
if (isset($data['goodsName'])) {
$this->setTitle($data['goodsName']);
}
$this->setNavHeader('商品详情');
$result = array();
$result['goodsDetailPage'] = true;
$baseInfo = \Product\DetailModel::getBaseInfo($productId, $uid);
$data = array (
'goodsDetailPage' => true,
'pageHeader' => array (
'navBack' => 'sss ',
'navHome' => 'sss ',
'navTitle' => '商品详情TEST'
),
'bannerTop' => array (
'list' => array (
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
),
array (
'url' => '',
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
)
)
),
'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
SHOE BQT KEN BLOCK',
'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
9.9元,拼购时代High起来。',
// $data = array (
// 'goodsDetailPage' => true,
// 'pageHeader' => array (
// 'navBack' => 'sss ',
// 'navHome' => 'sss ',
// 'navTitle' => '商品详情TEST'
// ),
//
// 'bannerTop' => array (
// 'list' => array (
// array (
// 'url' => '',
// 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// ),
// array (
// 'url' => '',
// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// ),
// array (
// 'url' => '',
// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// )
// )
// ),
// 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
//SHOE BQT KEN BLOCK',
// 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
//9.9元,拼购时代High起来。',
//
// 'goodsPrice' =>array(
// 'currentPrice'=>'¥298.00',
// 'previousPrice'=>'¥598.00'
// ),
// 'periodOfMarket'=>'11月',
// 'goodsTitle' => '¥298.00',
// 'vipLevel' => array (
// 'list' => array (
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
// 'text' => '¥284.00'
// ),
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
// 'text' => '¥269.00'
// ),
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
// 'text' => '¥263.00'
// )
// )
// ),
// 'goodsDiscount'=>array(
// 'list'=>array(
// '【summer final sale】满¥499立享6.8折',
// '【BACK TO SCHOOL】满¥499赠送Paul
// Franke帽子一个,多买多送!',
// '【BACK TO SCHOOL】满¥499赠送Paul
// Franke帽子一个,多买多送!'
// )
// ),
// 'feedbacks'=>array(
// 'commentsNum'=>0,
// 'consultsNum'=>1,
// // 'commentName'=>'商品评价',
// // 'consultName' =>'购买咨询',
// 'link'=>'',
// 'comments'=>array(
// array(
// 'userName'=>'Lynnic',
// 'desc'=>'购买了白色Mate7',
// 'content'=>'活动时买的,挺超值。上身效果也不错。质量
//很好,买送人的,很满意。而且物流相当给...',
// 'time'=>'2014-08-12 10:24:26'
// )
// ),
// 'consults'=>array(
// array(
// 'question' =>'您好 我一米七七 140斤 穿M的行吗',
// 'time'=>'2014-08-12 10:24:26',
// 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
// )
// )
// ),
//
// 'enterStore'=>array(
// 'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
// 'storeName'=>'Stussy',
// 'url'=>'http://stussy.m.yohobuy.com/'
// ),
//
// 'goodsDescription'=>array(
// 'title' =>'商品描述',
// 'enTitle'=>'DESCRIPTON',
//
// 'detail'=>array(
// 'nubmer' =>'51018059',
// 'color' =>'黑',
// 'type' =>'帽子',
// 'gender' =>'女款',
// 'hatType' =>'棒球帽',
// 'bongrace' =>'平檐款式',
// 'goodsDetail'=>'字母图案',
// 'style'=>'街头'
// )
// ),
//
// 'sizeInfo'=>array(
// 'title' => '尺码信息',
// 'enTitle' =>'xSIZE INFO',
//
// 'detail' =>array(
// 'list'=>array(
// array(
// 'name'=>'尺寸',
// 'sizem'=>'m',
// 'sizexl' =>'XL'
// ),
// array(
// 'name'=>'肩宽',
// 'sizem'=>'43',
// 'sizexl' =>'46'
// ),
// array(
// 'name'=>'衣长',
// 'sizem'=>'102',
// 'sizexl' =>'106'
// ),
// array(
// 'name'=>'肩宽',
// 'sizem'=>'90',
// 'sizexl' =>'96'
// ),
// array(
// 'name'=>'胸围',
// 'sizem'=>'90',
// 'sizexl' =>'96'
// ),
// array(
// 'name'=>'xx',
// 'sizem'=>'xx',
// 'sizexl' =>'xx'
// )
// )
// )
// ),
//
// 'measurementMethod'=>array(
// 'title' => '测量方式',
// 'enTitle' =>'MEASUREMENT METHOD',
//
// 'detail'=>array(
// 'sort' =>'上衣' ,
// 'enSort'=>'TOPS',
// 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',
// 'items'=>array(
// '肩宽(两端肩线间的直线长度)',
// '胸围(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)'
// )
// )
// ),
//
// 'reference' => array(
// 'title' => '模特试穿',
// 'enTitle' =>'REFERENCE',
//
// 'detail' =>array(
// 'list'=>array(
// array(
// 'fieldName'=>'1 ',
// 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',
// 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
// ),
// array(
// 'fieldName'=>'模特',
// 'firstModel'=>'Oliver',
// 'secondModel' =>'Jvly'
// ),
// array(
// 'fieldName'=>'身高',
// 'firstModel'=>'175',
// 'secondModel' =>'170'
// ),
// array(
// 'fieldName'=>'体重',
// 'firstModel'=>'53',
// 'secondModel' =>'59'
// ),
// array(
// 'fieldName'=>'三围',
// 'firstModel'=>'78/70/87',
// 'secondModel' =>'78/70/87'
// ),
// array(
// 'fieldName'=>'吊牌尺',
// 'firstModel'=>'S',
// 'secondModel' =>'L'
// )
// )
// )
// ),
//
// 'materials' => array(
// 'title' => '商品材质',
// 'enTitle' =>'MATERIALS',
// 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
// 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',
// 'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'
// ),
//
// 'productDetail' =>array(
// 'title' => '商品详情',
// 'enTitle' =>'DETAILS',
// 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
// 'img' =>'http://static.dev.yohobuy.com/img/product/product.png'
// ),
//
// 'cartInfo' =>array(
// 'numInCart' => 3,
// 'goodsInstore'=>0
// )
//
// );
'goodsPrice' =>array(
'currentPrice'=>'¥298.00',
'previousPrice'=>'¥598.00'
),
'periodOfMarket'=>'11月',
'goodsTitle' => '¥298.00',
'vipLevel' => array (
'list' => array (
array (
'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
'text' => '¥284.00'
),
array (
'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
'text' => '¥269.00'
),
array (
'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
'text' => '¥263.00'
)
)
),
'goodsDiscount'=>'【summer final sale】满¥499立享6.8折',
'feedbacks'=>array(
'commentTotal'=>'15',
'consultTotal' =>'2',
'moreComments'=>'http://www.baidu.com',
'comments'=>array(
// 渲染模板
$this->_view->display('index', $data);
}
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
)
),
'consults'=>array(
)
),
'enterStore'=>array(
'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
'storeName'=>'Stussy',
'url'=>'http://stussy.m.yohobuy.com/'
),
public function commentsAction(){
$data = array(
'goodsDescription'=>array(
'title' =>'商品描述',
'enTitle'=>'DESCRIPTON',
'goodsCommentsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买评价(6)'
),
'pageFooter' => true,
'comments'=>array(
'list' =>array(
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
)
)
),
);
'detail'=>array(
'nubmer' =>'51018059',
'color' =>'黑',
'type' =>'帽子',
'gender' =>'女款',
'hatType' =>'棒球帽',
'bongrace' =>'平檐款式',
'goodsDetail'=>'字母图案',
'style'=>'街头'
)
),
$this->_view->assign('title', '购买评价');
//$this->_view->display('brand', compact('brands'));
'sizeInfo'=>array(
'title' => '尺码信息',
'enTitle' =>'xSIZE INFO',
// 渲染模板
$this->_view->display('comments', $data);
}
'detail' =>array(
'list'=>array(
array(
'name'=>'尺寸',
'sizem'=>'m',
'sizexl' =>'XL'
),
array(
'name'=>'肩宽',
'sizem'=>'43',
'sizexl' =>'46'
),
array(
'name'=>'衣长',
'sizem'=>'102',
'sizexl' =>'106'
),
array(
'name'=>'肩宽',
'sizem'=>'90',
'sizexl' =>'96'
),
array(
'name'=>'胸围',
'sizem'=>'90',
'sizexl' =>'96'
),
array(
'name'=>'xx',
'sizem'=>'xx',
'sizexl' =>'xx'
)
)
)
),
'measurementMethod'=>array(
'title' => '测量方式',
'enTitle' =>'MEASUREMENT METHOD',
'detail'=>array(
'sort' =>'上衣' ,
'enSort'=>'TOPS',
'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',
'items'=>array(
'肩宽(两端肩线间的直线长度)',
'胸围(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)'
)
)
),
'reference' => array(
'title' => '模特试穿',
'enTitle' =>'REFERENCE',
public function consultsAction(){
$data = array(
'goodsConsultsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买咨询(6)'
),
'pageFooter' => true,
'consults'=>array(
'list' =>array(
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
)
),
);
'detail' =>array(
'list'=>array(
array(
'fieldName'=>'1 ',
'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',
'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
),
array(
'fieldName'=>'模特',
'firstModel'=>'Oliver',
'secondModel' =>'Jvly'
),
array(
'fieldName'=>'身高',
'firstModel'=>'175',
'secondModel' =>'170'
),
array(
'fieldName'=>'体重',
'firstModel'=>'53',
'secondModel' =>'59'
),
array(
'fieldName'=>'三围',
'firstModel'=>'78/70/87',
'secondModel' =>'78/70/87'
),
array(
'fieldName'=>'吊牌尺',
'firstModel'=>'S',
'secondModel' =>'L'
)
)
)
),
'materials' => array(
'title' => '商品材质',
'enTitle' =>'MATERIALS',
'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',
'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'
),
$this->_view->assign('title', '购买咨询');
//$this->_view->display('brand', compact('brands'));
'productDetail' =>array(
'title' => '商品详情',
'enTitle' =>'DETAILS',
'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
'img' =>'http://static.dev.yohobuy.com/img/product/product.png'
),
// 渲染模板
$this->_view->display('consults', $data);
}
'cartInfo' =>array(
'numInCart' => 3
)
public function consultformAction(){
$data = array(
'consultform' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '我要咨询'
)
);
);
$this->_view->assign('title', '商品详情');
//$this->_view->display('brand', compact('brands'));
$this->_view->assign('title', '我要咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('index', $data);
}
// 渲染模板
$this->_view->display('consultform', $data);
}
}
\ No newline at end of file
... ...
... ... @@ -10,13 +10,13 @@ routes.product.match = "#/product/pro_([0-9]+)_([0-9]+)/(.*)#"
routes.product.route.module = Product
routes.product.route.controller = Detail
routes.product.route.action = Index
routes.product.map.1 = product_id
routes.product.map.2 = goods_id
routes.product.map.1 = productId
routes.product.map.2 = goodsId
routes.buy.type = "regex"
routes.buy.match = "#/product/buy_([0-9]+)_([0-9]+).html#"
routes.buy.route.module = Product
routes.buy.route.controller = Detail
routes.buy.route.action = Index
routes.buy.map.1 = product_id
routes.buy.map.2 = goods_id
\ No newline at end of file
routes.buy.map.1 = productId
routes.buy.map.2 = goodsId
\ No newline at end of file
... ...