Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -46,7 +46,7 @@ const _getInfoNumData = (uid) => {
method: 'app.address.gethidden' // 用户地址的数据
}, {
code: 200
}), singleAPI.get('brower', {
}), singleAPI.get('favorite', {
method: 'app.favorite.getFavoriteCount', // 获取用户收藏商品总数
uid: uid
}, {
... ...
... ... @@ -15,9 +15,9 @@
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
{{#if devEnv}}
<link rel="stylesheet" href="//localhost:5004/css/index.css">
<link rel="stylesheet" media="all" href="//localhost:5004/css/index.css">
{{#unless noLocalCSS}}
<link rel="stylesheet" href="//localhost:5004/{{module}}.{{page}}.css">
<link rel="stylesheet" media="all" href="//localhost:5004/{{module}}.{{page}}.css">
{{/unless}}
{{^}}
<link rel="stylesheet" href="//cdn.yoho.cn/yohoblk-wap/{{version}}/index.css">
... ...
... ... @@ -37,14 +37,14 @@
"serve-favicon": "^2.3.0",
"uuid": "^2.0.2",
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.1.4",
"winston-daily-rotate-file": "^1.3.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "0.0.40"
"yoho-node-lib": "0.0.41"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"babel-core": "^6.13.2",
"babel-loader": "^6.2.4",
"babel-loader": "^6.2.5",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-preset-es2015": "^6.13.2",
"babel-runtime": "^6.11.6",
... ... @@ -61,7 +61,7 @@
"handlebars-loader": "^1.3.0",
"husky": "^0.11.6",
"jquery": "2.2.4",
"nodemon": "^1.10.0",
"nodemon": "^1.10.2",
"postcss-assets": "^4.0.1",
"postcss-cachebuster": "^0.1.3",
"postcss-calc": "^5.2.1",
... ... @@ -82,12 +82,12 @@
"stylelint-processor-html": "^1.0.0",
"vue": "1.0.26",
"vue-infinite-scroll": "0.2.3",
"vue-lazyload": "0.4.5",
"vue-lazyload": "^0.5.0",
"vue-loader": "^8.5.3",
"vue-swipe": "0.2.6",
"vue-touch": "1.1.0",
"webpack": "^1.13.1",
"webpack-dashboard": "0.0.1",
"webpack": "^1.13.2",
"webpack-dashboard": "^0.1.1",
"webpack-dev-server": "^1.14.1",
"webpack-stream": "^3.1.0",
"yoho-cookie": "1.2.0",
... ...
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
... ... @@ -25,14 +25,12 @@ class Modal {
styleClass: '',
title: '',
text: '',
buttons: [
{
text: '好',
handler: () => {
this.hide();
}
buttons: [{
text: '好',
handler: () => {
this.hide();
}
]
}]
};
// 初始化参数
... ... @@ -69,10 +67,7 @@ class Modal {
}
// 居中显示
this.elem.css({
left: ($(window).width() - this.elem.outerWidth()) / 2,
top: ($(window).height() - this.elem.outerHeight()) / 2 + $(window).scrollTop()
}).show().addClass('animation-target');
this.elem.show().addClass('animation-target');
}
hide() {
... ... @@ -82,7 +77,7 @@ class Modal {
}
Object.assign(Modal, {
alert: (text, title)=> {
alert: (text, title) => {
const modal = new Modal({
text: text,
title: title
... ... @@ -90,22 +85,19 @@ Object.assign(Modal, {
modal.show();
},
confirm: (text, title, callback)=> {
confirm: (text, title, callback) => {
const modal = new Modal({
text: text,
title: title,
buttons: [
{
text: '取消',
handler: function() {
this.hide();
}
},
{
text: '好',
handler: callback || $.noop
buttons: [{
text: '取消',
handler: function() {
this.hide();
}
]
}, {
text: '好',
handler: callback || $.noop
}]
});
modal.show();
... ...
... ... @@ -10,12 +10,10 @@
const $ = require('jquery');
const ANIMATIONS = {
none: {
in: 'overlay-in',
none: { in : 'overlay-in',
out: 'overlay-out'
},
fade: {
in: 'overlay-fade-in',
fade: { in : 'overlay-fade-in',
out: 'overlay-fade-out'
}
};
... ... @@ -28,16 +26,15 @@ class Overlay {
this.defaults = {
className: 'overlay',
clickToClose: true, // 点击关闭
onClose: $.noop, // 关闭回调函数
animation: 'fade', // 动画效果
onClose: $.noop, // 关闭回调函数
animation: 'fade', // 动画效果
disableScrolling: true // 是否禁止
};
// 初始化参数
this.settings = Object.assign({}, this.defaults, opts);
this.settings.animationClasses = {
in: ANIMATIONS[this.settings.animation].in,
this.settings.animationClasses = { in : ANIMATIONS[this.settings.animation].in,
out: ANIMATIONS[this.settings.animation].out
};
... ... @@ -46,20 +43,20 @@ class Overlay {
});
// 点击关闭
this.elem.click(()=> {
this.elem.click(() => {
if (this.settings.clickToClose) {
this.hide();
}
});
// if (this.settings.disableScrolling) {
// // 覆盖层出现时阻止滚动
// $(window).on('touchmove', (e)=> {
// if (this.isVisible) {
// e.preventDefault();
// }
// });
// }
if (this.settings.disableScrolling) {
// 覆盖层出现时阻止滚动
document.body.addEventListener('touchmove', (e) => {
if (this.isVisible) {
e.preventDefault();
}
})
}
this.elem[0].addEventListener('webkitTransitionEnd', this._cleanup.bind(this));
}
... ... @@ -78,8 +75,8 @@ class Overlay {
this.elem.appendTo('body');
this.elem.css({
visibility: 'visible'
}).show()
visibility: 'visible'
}).show()
.removeClass(this.settings.animationClasses.out)
.addClass(this.settings.animationClasses.in);
... ... @@ -108,7 +105,7 @@ class Overlay {
});
}
setTimeout(()=> {
setTimeout(() => {
this._cleanup();
}, 200);
... ...
... ... @@ -17,7 +17,7 @@ html,
body {
width: 100%;
font-size: 24px;
font-family: Helvetica, Roboto, "Heiti SC", "黑体", Arial;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
line-height: 1.4;
}
... ...
/* BrownStd standard */
@font-face {
font-family: "BrownStd";
src: resolve("brownstd/BrownStd-Regular.eot"); /* IE9 */
src: resolve("brownstd/BrownStd-Regular.eot?#iefix") format("embedded-opentype"), resolve("brownstd/BrownStd-Regular.woff") format("woff"), resolve("brownstd/BrownStd-Regular.ttf") format("truetype"), resolve("brownstd/BrownStd-Regular.svg#iconfont") format("svg"); /* iOS 4.1- */
}
/* BrownStd-Bold */
@font-face {
font-family: "BrownStd-Bold";
src: resolve("brownstd/BrownStd-Bold.eot"); /* IE9 */
src: resolve("brownstd/BrownStd-Bold.eot?#iefix") format("embedded-opentype"), resolve("brownstd/BrownStd-Bold.woff") format("woff"), resolve("brownstd/BrownStd-Bold.ttf") format("truetype"), resolve("brownstd/BrownStd-Bold.svg#iconfont") format("svg"); /* iOS 4.1- */
}
.brown-bold {
font-family: "BrownStd-Bold" !important;
}
/* BrownStd-Italic */
@font-face {
font-family: "BrownStd-Italic";
src: resolve("brownstd/BrownStd-Italic.eot"); /* IE9 */
src: resolve("brownstd/BrownStd-Italic.eot?#iefix") format("embedded-opentype"), resolve("brownstd/BrownStd-Italic.woff") format("woff"), resolve("brownstd/BrownStd-Italic.ttf") format("truetype"), resolve("brownstd/BrownStd-Italic.svg#iconfont") format("svg"); /* iOS 4.1- */
}
.brown-italic {
font-family: "BrownStd-Italic" !important;
}
/* BrownStd-Light */
@font-face {
font-family: "BrownStd-Light";
src: resolve("brownstd/BrownStd-Light.eot"); /* IE9 */
src: resolve("brownstd/BrownStd-Light.eot?#iefix") format("embedded-opentype"), resolve("brownstd/BrownStd-Light.woff") format("woff"), resolve("brownstd/BrownStd-Light.ttf") format("truetype"), resolve("brownstd/BrownStd-Light.svg#iconfont") format("svg"); /* iOS 4.1- */
}
.brown-light {
font-family: "BrownStd-Light" !important;
}
... ...
@import "reset";
@import "common";
@import "color";
@import "font";
@import "list";
@import "icon";
@import "tip";
... ...
@import "overlay";
.modal {
position: absolute;
position: fixed;
margin: 0 auto;
background: #fcfcfc;
width: 512px;
z-index: 1001;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
h2 {
font-size: 32px;
text-align: center;
margin-top: 50px;
margin-top: 80px;
margin-bottom: 0;
}
... ... @@ -37,11 +40,15 @@
height: 100%;
display: inline-block;
text-align: center;
color: $blue;
color: #4a90e2;
font-size: 30px;
line-height: 88px;
}
a.modal-button:first-of-type {
color: #b0b0b0;
}
:not(:first-child) {
border-left: 1px solid #e0e0e0;
}
... ... @@ -57,43 +64,43 @@
/* Generated with Bounce.js. Edit at http://goo.gl/W7f9he */
@keyframes animation {
0% {
transform: matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
4.3% {
transform: matrix3d(0.757, 0, 0, 0, 0, 0.757, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(0.757, 0, 0, 0, 0, 0.757, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
8.61% {
transform: matrix3d(0.939, 0, 0, 0, 0, 0.939, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(0.939, 0, 0, 0, 0, 0.939, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
12.91% {
transform: matrix3d(1.026, 0, 0, 0, 0, 1.026, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1.026, 0, 0, 0, 0, 1.026, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
17.22% {
transform: matrix3d(1.047, 0, 0, 0, 0, 1.047, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1.047, 0, 0, 0, 0, 1.047, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
28.33% {
transform: matrix3d(1.01, 0, 0, 0, 0, 1.01, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1.01, 0, 0, 0, 0, 1.01, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
39.44% {
transform: matrix3d(0.997, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(0.997, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
61.66% {
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
83.98% {
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
100% {
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
transform: translate(-50%, -50%) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
}
... ...
... ... @@ -91,7 +91,7 @@
padding-left: 25px;
border-radius: 20px;
font-size: 26px;
color: #b0b0b0;
color: #444;
background: #eee;
border: none;
}
... ... @@ -99,11 +99,13 @@
input::-webkit-input-placeholder {
/* WebKit browsers */
text-align: center;
color: #b0b0b0;
}
input:-ms-input-placeholder {
/* Internet Explorer 10+ */
text-align: center;
color: #b0b0b0;
}
}
... ...
... ... @@ -13,7 +13,6 @@ $white: #fff;
.order-item {
background: $white;
margin-top: 20px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
&:first-child {
... ... @@ -157,6 +156,11 @@ $white: #fff;
border: 0 none;
background: $white;
font-size: 28px;
float: left;
&.leftpad {
padding-right: 42px;
}
}
button {
... ... @@ -169,6 +173,7 @@ $white: #fff;
border: 0 none;
background: $white;
font-size: 28px;
float: left;
&.black {
width: 192px;
... ... @@ -182,12 +187,16 @@ $white: #fff;
}
&.normal {
width: 188px;
width: 192px;
padding: 0;
border: 1px solid $black;
color: $black;
}
&.leftpad {
padding-right: 42px;
}
&:focus {
outline: none;
}
... ...
... ... @@ -7,7 +7,7 @@
</div>
</template>
<a class="item ellipsis" href="{{item.sortUrl}}">
{{item.sortNameEn}}{{item.sortName}}
{{(item.sortNameEn || '').trim()}}{{item.sortName}}
</a>
</template>
</div>
... ... @@ -63,10 +63,17 @@
position: relative;
display: block;
padding: 0 30px;
height: 126px;
line-height: 126px;
font-size: 30px;
height: 124px;
line-height: 124px;
font-size: 36px;
font-weight: bold;
font-family: "BrownStd-Bold", "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
&:first-child {
height: 142px;
line-height: 142px;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
}
&:after {
content: "";
... ... @@ -84,11 +91,18 @@
}
.sep {
margin-top: -1px;
width: 100%;
height: 22px;
height: 20px;
background: #f6f6f6;
border-top: 2PX solid #eee;
border-bottom: 2PX solid #eee;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
& + .item {
height: 142px;
line-height: 142px;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
}
}
}
... ...
... ... @@ -89,7 +89,7 @@
},
methods: {
reload() {
$('#address').off('click', this.addressClick)
$('#address').off('click', this.addressClick);
$('.auth').off('click', this.authClick);
$('.auth').removeClass('no-intercept');
... ... @@ -103,7 +103,7 @@
$('#address').on('click', this.addressClick);
} else {
this.data = {
nickName : '登录/注册'
nickName: '登录/注册'
};
$('.auth').addClass('no-intercept');
... ... @@ -120,7 +120,7 @@
const id = $(e.target).attr('id');
const href = $(e.target).attr('href');
yoho.goLogin(null, () => {
yoho.goLogin('', () => {
this.reload();
setTimeout(() => {
... ... @@ -147,7 +147,7 @@
window.addEventListener('scroll', () => {
let transparent = true;
if (window.scrollY > 20 ) {
if (window.scrollY > 20) {
transparent = false;
}
... ... @@ -216,7 +216,8 @@
height: 170px;
border-radius: 50%;
margin: 0 auto;
/*border: 3px solid #b0b0b0;*/
/* border: 3px solid #b0b0b0; */
background: resolve("me/user-icon.png");
background-size: 100%;
}
... ...
... ... @@ -34,11 +34,11 @@
<div class="options">
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order,index)" class="normal">删除订单</button>
<template v-else>
<button v-if="order.status == 0" @click="cancelOrder(order.orderCode)">取消订单</button>
<button v-if="order.status == 0" @click="cancelOrder(order.orderCode)" class="leftpad">取消订单</button>
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order)">去支付
<span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span>
</button>
<a v-if="order.status == 4 || order.status == 5 "
<a v-if="order.status == 4 || order.status == 5 " class="leftpad"
href="/me/logistic?order_code={{order.orderCode}}">查看物流</a>
<button v-if="order.status == 4 || order.status == 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
<button v-if="order.status == 6" @click="deleteOrder(order,index)" class="normal">删除订单</button>
... ...