Authored by 梁志锋

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

... ... @@ -107,7 +107,7 @@
}
## 首页
{
headerDownload: {
img: '',
... ... @@ -249,7 +249,7 @@
## 逛
### 资讯(公用)
{
id: 1,
showTags: true/false, //是否显示标签
... ... @@ -305,9 +305,9 @@
}
### 逛列表页
{
infos:
infos:
[
{...}, //标签
...
... ... @@ -724,7 +724,7 @@
},
...
]
}
## 商品列表页
... ... @@ -987,14 +987,14 @@
canceled: true, //已取消
unpaid: true, //or 未支付
unreceived: '', //or 待收货(未发货/未收货),查看物流URL
//待收货时传递物流参数
logisticsUrl: ''
}
### 订单详情页
{
orderDetail: {
orderNum: '', //订单号
... ... @@ -1006,7 +1006,7 @@
orderStatus: '订单成功', //订单取消...等订单状态
orderNum: '',
orderTime: '',
//订单状态
canceled: true, //是否是取消的订单
completed: true, //是否是已完成订单
... ... @@ -1060,7 +1060,7 @@
'navHome': 'sss ',
'navTitle': '商品详情'
},
'bannerTop': {
'list': [
{
... ... @@ -1090,7 +1090,7 @@
is_soon_sold_out: true //即将售罄
}
],
'goodsName' : 'Stussy No. 4 BOX TEE ',
'goodsSubtitle' : '【全民拼抢购】经典印花T恤,满4件免一件!',
... ... @@ -1166,25 +1166,25 @@
'detail' : {
'list' : [
{
{
'params' : [
{
{
'param' : '尺寸'
},
...
...
]
},
...
]
}
},
'measurementMethod' : {
'title': '测量方式',
'enTitle': 'MEASUREMENT METHOD',
'img' : '',
},
'reference' : {
'title' : '模特试穿',
'enTitle' : '',
... ... @@ -1243,6 +1243,32 @@
'cartInfo' : {
'numInCart' : 3,
'goodsInstore' : 0,
'isCollect':true//
'isCollect':true//
}
}
### 支付中心
{
'payAppInfo' : {
'appIcon' : 'http://static.yohobuy.com/images/icon.png',
'payLink' : '/weixin/pay/'
'app' : '微信支付',
'hint' : '需下载微信客户端',
'subHint' : '推荐使用'
}
}
### 物流详情
{
'logisticImg' : 'http://static.yohobuy.com/images/icon.png',
'logisticUrl' : 'http://www.shunfeng.com',
'logisticCompany' : '顺丰',
'logisticNumber' : '1231231231',
'logisticDetail' : {
'status' : '南京市 派送中',
'date' : '2015-12-03'
}
}
... ...
... ... @@ -81,4 +81,4 @@ exports.showDialog = function(data, callback) {
exports.hideDialog = function() {
$dialogWrapper.fadeOut();
};
\ No newline at end of file
};
... ...
... ... @@ -15,3 +15,5 @@ require('./address');
require('./suggest');
require('./browse-record');
require('./address-act');
require('./logistic');
require('./pay');
... ...
... ... @@ -127,10 +127,22 @@ orderHammer.on('tap', function(e) {
},
success: function(data) {
if (data.code === 200) {
dialog.showDialog({
dialogText: '删除订单成功',
autoHide: true,
fast: true
});
//删除订单页面刷新
history.go(0);
}
},
error: function() {
dialog.showDialog({
dialogText: '删除订单失败',
autoHide: true,
fast: true
});
}
});
});
... ... @@ -152,10 +164,22 @@ orderHammer.on('tap', function(e) {
},
success: function(data) {
if (data.code === 200) {
dialog.showDialog({
dialogText: '取消订单成功',
autoHide: true,
fast: true
});
//取消订单页面刷新
history.go(0);
}
},
error: function() {
dialog.showDialog({
dialogText: '取消订单失败',
autoHide: true,
fast: true
});
}
});
});
... ... @@ -184,4 +208,4 @@ $(window).scroll(function() {
});
//初始化请求第一页数据
getOrders();
\ No newline at end of file
getOrders();
... ...
... ... @@ -3,12 +3,11 @@
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/03
*/
var loading = require('../plugin/loading');
function isWXOpen() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) === 'micromessenger') {
return true;
} else {
... ... @@ -19,7 +18,6 @@ function isWXOpen() {
function hideWeChatPay() {
var payApps = document.getElementsByClassName('app');
[].forEach.call(payApps, function(app, index) {
if (app.innerHTML.indexOf('微信') !== -1) {
app.parentNode.style.display = 'none';
... ... @@ -29,9 +27,61 @@ function hideWeChatPay() {
}
function handleForWX() {
if (isWXOpen()) {
if (!isWXOpen()) {
hideWeChatPay();
}
}
window.onload = handleForWX;
function setIcon(div, appName) {
if (appName.indexOf('百度') !== -1) {
div.style.backgroundPositionY = '-2.7rem';
return false;
}
if (appName.indexOf('微信') !== -1) {
div.style.backgroundPositionY = '-1.2rem';
return false;
}
if (appName.indexOf('银联') !== -1) {
div.style.backgroundPositionY = '-4rem';
return false;
}
if (appName.indexOf('QQ') !== -1) {
div.style.backgroundPositionY = '-5.4rem';
return false;
}
}
function loadIcon() {
var boxs = document.getElementsByClassName('box');
var div = null;
var appName = null;
[].forEach.call(boxs, function(box, index) {
div = box.getElementsByClassName('icon')[0].getElementsByTagName('div')[0];
if (div) {
appName = box.getElementsByClassName('app')[0].innerHTML;
setIcon(div, appName);
}
});
}
function showPage() {
var pageList = document.getElementsByClassName('payapp-list')[0];
pageList.style.visibility = 'visible';
}
function main() {
handleForWX();
loading.hideLoadingMask();
showPage();
loadIcon();
}
loading.showLoadingMask();
window.onload = main;
... ...
... ... @@ -82,6 +82,9 @@ headerNavHammer.on('tap', function(e) {
autoHide: true,
dialogText: '提交成功'
});
setTimeout(function() {
location.pathname = 'home/suggest';
}, 2000);
}
}).fail(function() {
... ...
... ... @@ -5,9 +5,8 @@
* @date: 2015/10/19
*/
var $ = require('jquery');
// Hammer = require('yoho.hammer');
var $ = require('jquery'),
Hammer = require('yoho.hammer');
var $filter;
... ... @@ -113,8 +112,7 @@ function subClassifyTapEvt($this) {
//初始化筛选
function initFilter(opt) {
// var filterHammer;
var filterHammer;
//注册回调
fCbFn = opt.fCbFn;
... ... @@ -127,8 +125,8 @@ function initFilter(opt) {
$filter = $('.filter-mask');
// filterHammer = new Hammer($filter[0]);
$filter.on('touchend', function(e) {
filterHammer = new Hammer($filter[0]);
filterHammer.on('tap', function(e) {
var $this = $(e.target),
$cur;
... ... @@ -147,7 +145,7 @@ function initFilter(opt) {
//tap classify
$cur = $this.closest('.classify-item');
e.stopPropagation();
e.srcEvent.stopPropagation();
classifyTapEvt($cur);
}
... ... @@ -183,4 +181,4 @@ exports.showFilter = showFilter;
exports.hideFilter = hideFilter;
exports.resetFilter = resetFilter;
\ No newline at end of file
exports.resetFilter = resetFilter;
... ...
... ... @@ -157,6 +157,9 @@
margin-top: -$height / 2;
}
.del-fav {
text-indent: 0;
}
}
span {
... ...
$vip: sprite-map("me/vip/*.png", $spacing: 10px);
$fav: sprite-map("me/fav/*.png", $spacing: 5px);
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record";
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record", "pay";
... ...
.pay-page {
padding: (40rem / $pxConvertRem) (20rem / $pxConvertRem) 0;
.payapp-list {
visibility: hidden;
}
.box {
border: 1px solid #eee;
border-radius: 10rem / $pxConvertRem;
... ... @@ -16,31 +20,37 @@
}
.icon {
flex-grow: 0.3;
width: 15%;
img {
width: 60rem / $pxConvertRem;
margin: 0;
}
> div {
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
background-image: url(http://localhost:8000/img/layout/pay-icon.png);
background-size: 90%;
background-position-y: 8rem / $pxConvertRem;
background-position-x: center;
background-repeat: no-repeat;
}
}
.app {
flex-grow: 3;
width: 40%;
font-size: 32rem / $pxConvertRem;
color: #414141;
//padding-left: 20rem/$pxConvertRem
}
.hint {
flex-grow: 4;
width: 40%;
font-size: 24rem / $pxConvertRem;
color: #4b4b4b;
}
.iconfont {
flex-grow: 1;
width: 5%;
justify-content: flex-end;
color: #e0e0e0;
font-size: 28rem / $pxConvertRem;
... ...
... ... @@ -114,6 +114,10 @@ $basicBtnC:#eb0313;
background-color: #000;
color: #fff;
}
.yohood-tag {
background-color: #000;
color: #fff;
}
.limit-tag {
border: 1px solid #000;
background-color: #fff;
... ... @@ -131,7 +135,7 @@ $basicBtnC:#eb0313;
// overflow: hidden;
}
.banner-top-single{
height:pxToRem(600px);
width: pxToRem(448px);
margin:pxToRem(30px) pxToRem(72px);
overflow: hidden;
... ... @@ -177,8 +181,8 @@ $basicBtnC:#eb0313;
min-height: pxToRem(83px);
font-size: pxToRem(28px);
color: #fff;
padding-left: pxToRem(25px);
padding-right: pxToRem(25px);
padding-left: pxToRem(28px);
padding-right: pxToRem(28px);
line-height: pxToRem(36px);
background-color: #515150;
}
... ...
... ... @@ -130,9 +130,10 @@
div {
text-align: center;
&.cell {
line-height: pxToRem(53px);
font-size: pxToRem(24px);
background-color: $tableCellC;
padding: pxToRem(15px) pxToRem(40px);
padding: 0 pxToRem(40px);
border: 1px solid #fff;
}
}
... ... @@ -143,14 +144,15 @@
#reference-swiper-container {
.first-group {
width: pxToRem(70px);
margin-top: pxToRem(66px);
.avatar {
// line-height: pxToRem(40px);
display: inline-block;
width: pxToRem(40px);
border-radius: 50%;
height: pxToRem(40px);
margin: pxToRem(12px) 0;
margin-top: pxToRem(55px);
div{
height: pxToRem(55px);
.avatar {
display: inline-block;
width: pxToRem(40px);
border-radius: 50%;
margin-top:pxToRem(7px);
}
}
}
}
... ...
{{> layout/header}}
<div class="logistic-page yoho-page">
<div class="overview">
<div class="left" >
<div class="icon" style='background-image:url("{{logisticImg}}")'> </div>
</div>
<div class="right">
<div>
<span class='info'>物流公司:</span>
<span >{{logisticCompany}}</span>
</div>
<div>
<span class='info'>快递单号:</span>
<span>{{logisticNumber}}</span>
</div>
</div>
</div>
<div class="title">
<span>物流详情</span>
</div>
<div class="detail">
{{# logisticDetail}}
<div class="timeline-box ">
<span class="timeline-node"></span>
<div class="timeline-info">
<div class="timeline-info-row">
{{ city}}&nbsp;&nbsp;&nbsp;{{ status}}
</div>
<div class="timeline-info-row">
{{date}}
</div>
</div>
</div>
{{/ logisticDetail}}
</div>
</div>
{{> layout/footer}}
{{> layout/header}}
<div class="pay-page yoho-page">
{{# payAppInfo}}
<div class="box">
<div class="icon">
<img src="{{appIcon}}" alt="app图标">
</div>
<div class="app">{{app}}</div>
<div class="hint">
{{hint}}
{{#if subHint}}
<br>
{{subHint}}
{{/if}}
</div>
<div class="iconfont">&#xe604</div>
<div class="payapp-list">
{{# payAppInfo}}
<a href="{{payLink}}">
<div class="box">
<div class="icon">
{{#if appIcon}}
<img src="{{appIcon}}" alt="app图标">
{{else}}
<div></div>
{{/if}}
</div>
<div class="app">{{app}}</div>
<div class="hint">
{{hint}}
{{#if subHint}}
<br>
{{subHint}}
{{/if}}
</div>
<div class="iconfont">&#xe604</div>
</div>
</a>
{{/ payAppInfo}}
</div>
{{/ payAppInfo}}
</div>
{{> layout/footer}}
... ...
... ... @@ -13,7 +13,7 @@
<p class="good-tag sale-tag">SALE</p>
{{/ is_discount}}
{{# is_yohoood}}
<div class="good-tag yohood-tag"></div>
<div class="good-tag yohood-tag">新品节</div>
{{/ is_yohoood}}
{{# is_limited}}
<p class="good-tag limit-tag">限量商品</p>
... ... @@ -113,6 +113,7 @@
{{/ enterStore}}
<div id="productDesc"> </div>
<!-- {{> product/product-description}} -->
{{> product/recommend-for-you}}
{{#cartInfo}}
... ...
... ... @@ -288,7 +288,10 @@
</script>
{{/if}}
{{#if logisticInfoPage}}
<script>
seajs.use('js/me/logistic');
{{/if}}
{{#if payCenterPage}}
<script>
seajs.use('js/me/pay');
</script>
{{/if}}
... ...
... ... @@ -72,7 +72,9 @@
{{#params}}
{{#if @first}}
{{else}}
<img class="avatar lazy" data-original="{{param}}" alt="">
<div>
<img class="avatar lazy" data-original="{{param}}" alt="">
</div>
{{/if}}
{{/params}}
</div>
... ...
... ... @@ -104,7 +104,7 @@ class SideModel
'textCn' => '查看全部',
'textEn' => '',
'back' => false,
'isSelect' => ($guangChoosed === 'all') ? true : false,
'isSelect' => ($guangChoosed === 'lifestyle' || $guangChoosed === 'kids') ? true : false,
'url' => Helpers::url('', array('gender' => '1,2,3'), 'guang')
),
2 => array(
... ...
... ... @@ -239,8 +239,8 @@ class UserModel
$product = array();
$product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] . '.00' : 0;
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] . '.00' : 0;
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0;
$brand['productList'][] = $product;
}
... ...