Authored by 陈轩

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

@@ -32,7 +32,7 @@ const refund = { @@ -32,7 +32,7 @@ const refund = {
32 code: 200 32 code: 200
33 }); 33 });
34 }, 34 },
35 - setexpress(applyid, uid, expressCompany, expressNumber, expressId) { 35 + setexpress(applyid, uid, expressCompany, expressId, expressNumber) {
36 return api.get('', { 36 return api.get('', {
37 method: 'app.refund.setexpress', 37 method: 'app.refund.setexpress',
38 id: applyid, 38 id: applyid,
@@ -45,33 +45,33 @@ @@ -45,33 +45,33 @@
45 </div> 45 </div>
46 </div> 46 </div>
47 <div class="group-list"> 47 <div class="group-list">
48 - <a class="list-item auth" id="address"> 48 + <a class="glist-item auth" id="address">
49 地址管理 49 地址管理
50 <span class="num">{{address_num}} <span class="icon icon-right"></span></span> 50 <span class="num">{{address_num}} <span class="icon icon-right"></span></span>
51 </a> 51 </a>
52 </div> 52 </div>
53 <div class="group-list"> 53 <div class="group-list">
54 - <a class="list-item auth" href="/me/collection"> 54 + <a class="glist-item auth" href="/me/collection">
55 收藏的商品 55 收藏的商品
56 <span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span> 56 <span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span>
57 </a> 57 </a>
58 - <a class="list-item auth" href="/me/collection?tab=brand"> 58 + <a class="glist-item auth" href="/me/collection?tab=brand">
59 收藏的品牌 59 收藏的品牌
60 <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span> 60 <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
61 </a> 61 </a>
62 </div> 62 </div>
63 <div class="group-list"> 63 <div class="group-list">
64 - <a class="list-item auth" href="/me/mycurrency"> 64 + <a class="glist-item auth" href="/me/mycurrency">
65 YOHO 币 65 YOHO 币
66 <span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span> 66 <span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span>
67 </a> 67 </a>
68 </div> 68 </div>
69 <div class="group-list"> 69 <div class="group-list">
70 - <a class="list-item" href="/help"> 70 + <a class="glist-item" href="/help">
71 帮助中心 71 帮助中心
72 <span class="num"><span class="icon icon-right"></span></span> 72 <span class="num"><span class="icon icon-right"></span></span>
73 </a> 73 </a>
74 - <a class="list-item" href="/me/service"> 74 + <a class="glist-item" href="/me/service">
75 在线客服 75 在线客服
76 <span class="num"><span class="icon icon-right"></span></span> 76 <span class="num"><span class="icon icon-right"></span></span>
77 </a> 77 </a>
1 <div class="logistics-page" id="logistics"> 1 <div class="logistics-page" id="logistics">
2 - <components :is="currentView" :applyid="applyid" :company_id="company_id" :company_name="company_name" company_list='{{company_list}}' keep-alive></components> 2 + <components :is="currentView" :company_id="company_id" :company_name="company_name" applyid='{{applyid}}' company_list='{{company_list}}' keep-alive></components>
3 </div> 3 </div>
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 第一步:注册&登录 3 第一步:注册&登录
4 <ul> 4 <ul>
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 1、Yoho!BLK全部采用顺丰速运,保证货物快速、安全地送达您的手中。 3 1、Yoho!BLK全部采用顺丰速运,保证货物快速、安全地送达您的手中。
4 <br> 4 <br>
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 <h4>商品到达以后可以当场验收商品吗?</h4> 3 <h4>商品到达以后可以当场验收商品吗?</h4>
4 商品支持当面验收,如配送人员不配合您可以选择拒收商品。商品送达后您可当场确认商品与您订购的是否一致。您在验收商品时如发现商品短缺、配送错误、包装破损、商品存在质量问题等,请您向配送人员指出,并当场拒收全部商品,并在送货单上注明原因。相应的赠品和优惠商品应同时拒收,并请您在24小时内与客服联系进一步处理。 4 商品支持当面验收,如配送人员不配合您可以选择拒收商品。商品送达后您可当场确认商品与您订购的是否一致。您在验收商品时如发现商品短缺、配送错误、包装破损、商品存在质量问题等,请您向配送人员指出,并当场拒收全部商品,并在送货单上注明原因。相应的赠品和优惠商品应同时拒收,并请您在24小时内与客服联系进一步处理。
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 <h4>服务承诺</h4> 3 <h4>服务承诺</h4>
4 如果您在购物过程中有任何建议或者意见,您可以通过在线客服与我们联系沟通,我们承诺在24小时内与您联系。 4 如果您在购物过程中有任何建议或者意见,您可以通过在线客服与我们联系沟通,我们承诺在24小时内与您联系。
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 1、为节省您的宝贵时间及保证账户安全,现Yoho!BLK官网已开通《自助退换货》功能,您可在签收商品的7天内进入官网“我的订单”页面操作退货申请。 3 1、为节省您的宝贵时间及保证账户安全,现Yoho!BLK官网已开通《自助退换货》功能,您可在签收商品的7天内进入官网“我的订单”页面操作退货申请。
4 <br> 4 <br>
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 <h3>7天无理由退货条例总则</h3> 3 <h3>7天无理由退货条例总则</h3>
4 <br> 4 <br>
1 -<div class="deal_main"> 1 +<div class="deal-main">
2 <section class="detail"> 2 <section class="detail">
3 <h4>支付说明</h4> 3 <h4>支付说明</h4>
4 1、Yoho!BLK为您提供支付宝进行在线支付,APP另可通过微信支付进行在线支付; 4 1、Yoho!BLK为您提供支付宝进行在线支付,APP另可通过微信支付进行在线支付;
@@ -55,7 +55,7 @@ module.exports = { @@ -55,7 +55,7 @@ module.exports = {
55 /* 收藏店铺 */ 55 /* 收藏店铺 */
56 collectShop: (req, res, next) => { 56 collectShop: (req, res, next) => {
57 if (!req.user.uid) { 57 if (!req.user.uid) {
58 - res.json({ 58 + return res.json({
59 code: 403, 59 code: 403,
60 message: '未登录' 60 message: '未登录'
61 }); 61 });
@@ -118,6 +118,6 @@ module.exports = { @@ -118,6 +118,6 @@ module.exports = {
118 method: 'app.favorite.add' 118 method: 'app.favorite.add'
119 }); 119 });
120 } 120 }
121 - return api.get('', finalParams, {code: 200, cache: false}); 121 + return api.get('', finalParams);
122 } 122 }
123 }; 123 };
@@ -18,7 +18,7 @@ exports.notFound = () => { @@ -18,7 +18,7 @@ exports.notFound = () => {
18 return res.render('error/404', { 18 return res.render('error/404', {
19 module: 'common', 19 module: 'common',
20 page: 'error', 20 page: 'error',
21 - title: '页面不存在 | Yoho!Buy有货 | 潮流购物逛不停', 21 + title: '页面不存在 | YOHO!BLK | 潮流购物逛不停',
22 pageFooter: true, 22 pageFooter: true,
23 isErr: true 23 isErr: true
24 }); 24 });
@@ -48,7 +48,7 @@ exports.serverError = () => { @@ -48,7 +48,7 @@ exports.serverError = () => {
48 err: err, 48 err: err,
49 module: 'common', 49 module: 'common',
50 page: 'error', 50 page: 'error',
51 - title: '服务器错误 | Yoho!Buy有货 | 潮流购物逛不停', 51 + title: '服务器错误 | YOHO!BLK | 潮流购物逛不停',
52 pageFooter: true, 52 pageFooter: true,
53 isErr: true 53 isErr: true
54 }); 54 });
@@ -45,10 +45,10 @@ @@ -45,10 +45,10 @@
45 }, 45 },
46 "devDependencies": { 46 "devDependencies": {
47 "autoprefixer": "^6.4.0", 47 "autoprefixer": "^6.4.0",
48 - "babel-core": "^6.13.0", 48 + "babel-core": "^6.13.2",
49 "babel-loader": "^6.2.4", 49 "babel-loader": "^6.2.4",
50 "babel-plugin-transform-runtime": "^6.12.0", 50 "babel-plugin-transform-runtime": "^6.12.0",
51 - "babel-preset-es2015": "^6.13.0", 51 + "babel-preset-es2015": "^6.13.2",
52 "babel-runtime": "^6.11.6", 52 "babel-runtime": "^6.11.6",
53 "eslint": "^3.2.2", 53 "eslint": "^3.2.2",
54 "eslint-config-yoho": "^1.0.1", 54 "eslint-config-yoho": "^1.0.1",
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 "shelljs": "^0.7.3", 79 "shelljs": "^0.7.3",
80 "style-loader": "^0.13.1", 80 "style-loader": "^0.13.1",
81 "stylelint": "^7.1.0", 81 "stylelint": "^7.1.0",
82 - "stylelint-config-yoho": "^1.2.6", 82 + "stylelint-config-yoho": "^1.2.7",
83 "stylelint-processor-html": "^1.0.0", 83 "stylelint-processor-html": "^1.0.0",
84 "vue": "1.0.26", 84 "vue": "1.0.26",
85 "vue-infinite-scroll": "0.2.3", 85 "vue-infinite-scroll": "0.2.3",
@@ -273,9 +273,6 @@ const intercept = (url) => { @@ -273,9 +273,6 @@ const intercept = (url) => {
273 273
274 // 首页 274 // 首页
275 if (/\/$/.test(path)) { 275 if (/\/$/.test(path)) {
276 - yoho.goSetChannel({  
277 - channel: qs.channel || 'men'  
278 - });  
279 return yoho.goTab({ 276 return yoho.goTab({
280 index: 0 277 index: 0
281 }); 278 });
@@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
5 * @Last Modified time: 2016-08-02 17:42:26 5 * @Last Modified time: 2016-08-02 17:42:26
6 */ 6 */
7 7
8 -let Vue = require('vue');  
9 -  
10 -Vue.directive('lazy-html', function(html) {  
11 - html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');  
12 - this.$el.innerHTML = html;  
13 - this.$vm.$compile(this.$el);  
14 -}); 8 +module.exports = (Vue) => {
  9 + Vue.directive('lazy-html', function(html) {
  10 + html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');
  11 + this.el.innerHTML = html;
  12 + this.vm.$compile(this.el);
  13 + });
  14 +};
@@ -104,6 +104,13 @@ Vue.filter('convertOrderState', (value) => { @@ -104,6 +104,13 @@ Vue.filter('convertOrderState', (value) => {
104 return stateTxt; 104 return stateTxt;
105 }); 105 });
106 106
  107 +Vue.filter('toFixed', (value, num) => {
  108 + if (typeof value === 'undefined') {
  109 + return;
  110 + }
  111 + return Number(value).toFixed(num || 2);
  112 +});
  113 +
107 /** 114 /**
108 * 转换时间 115 * 转换时间
109 * yyyy-MM-dd hh:mm:ss 116 * yyyy-MM-dd hh:mm:ss
1 const Vue = require('vue'); 1 const Vue = require('vue');
2 const lazyload = require('vue-lazyload'); 2 const lazyload = require('vue-lazyload');
3 -  
4 -const app = require('editorial/detail.vue'); 3 +const directive = require('common/vue-directive');
  4 +const app = require('product/detail/index.vue');
5 5
6 require('common/vue-filter'); 6 require('common/vue-filter');
7 -require('common/vue-directive');  
8 -  
9 Vue.use(lazyload); 7 Vue.use(lazyload);
  8 +Vue.use(directive);
10 9
11 new Vue({ 10 new Vue({
12 el: '#app', 11 el: '#app',
1 var yoho = require('yoho'); 1 var yoho = require('yoho');
2 var $ = require('jquery'); 2 var $ = require('jquery');
3 const util = require('common/util'); 3 const util = require('common/util');
  4 +
4 if (!yoho.isLogin) { 5 if (!yoho.isLogin) {
5 $('.auth').addClass('no-intercept'); 6 $('.auth').addClass('no-intercept');
6 $('.auth').on('click', function() { 7 $('.auth').on('click', function() {
1 const Vue = require('vue'); 1 const Vue = require('vue');
2 -const app = require('product/detail/index.vue');  
3 const lazyload = require('vue-lazyload'); 2 const lazyload = require('vue-lazyload');
  3 +const directive = require('common/vue-directive');
  4 +const app = require('product/detail/index.vue');
4 5
5 require('common/vue-filter'); 6 require('common/vue-filter');
6 -require('common/overlay');  
7 -  
8 Vue.use(lazyload); 7 Vue.use(lazyload);
9 -  
10 -Vue.directive('lazy-html', function(html) {  
11 - html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');  
12 - this.el.innerHTML = html;  
13 - this.vm.$compile(this.el);  
14 -}); 8 +Vue.use(directive);
15 9
16 new Vue({ 10 new Vue({
17 el: '#app', 11 el: '#app',
@@ -17,6 +17,6 @@ @@ -17,6 +17,6 @@
17 position: absolute; 17 position: absolute;
18 top: -5px; 18 top: -5px;
19 left: 100%; 19 left: 100%;
20 - transform: translate3d(-60%,0,0); 20 + transform: translate3d(-60%, 0, 0);
21 margin: 0; 21 margin: 0;
22 } 22 }
@@ -93,6 +93,7 @@ ul { @@ -93,6 +93,7 @@ ul {
93 @for $i from 1 to 3 { 93 @for $i from 1 to 3 {
94 .line-clamp-$i { 94 .line-clamp-$i {
95 -webkit-line-clamp: $(i); 95 -webkit-line-clamp: $(i);
96 - @mixin line-clamp; 96 +
  97 + @mixin line-clamp ;
97 } 98 }
98 } 99 }
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 } 7 }
8 8
9 .icon { 9 .icon {
10 -  
11 /* use !important to prevent issues with browser extensions that change fonts */ 10 /* use !important to prevent issues with browser extensions that change fonts */
12 font-family: "iconfont" !important; 11 font-family: "iconfont" !important;
13 speak: none; 12 speak: none;
1 .select { 1 .select {
2 position: fixed; 2 position: fixed;
3 - bottom: 0px; 3 + bottom: 0;
4 width: 100%; 4 width: 100%;
5 background: #fff; 5 background: #fff;
6 z-index: 1001; 6 z-index: 1001;
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 text-align: right; 79 text-align: right;
80 color: #b0b0b0; 80 color: #b0b0b0;
81 background: transparent; 81 background: transparent;
82 - border: 1px solid #ffffff; 82 + border: 1px solid #fff;
83 height: 100%; 83 height: 100%;
84 flex-direction: row-reverse; 84 flex-direction: row-reverse;
85 } 85 }
1 -.deal_main { 1 +.deal-main {
2 margin: 20px 3%; 2 margin: 20px 3%;
3 font-size: 30px; 3 font-size: 30px;
4 width: 94%; 4 width: 94%;
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 border-bottom: 1px solid #e0e0e0; 123 border-bottom: 1px solid #e0e0e0;
124 background: #fff; 124 background: #fff;
125 125
126 - .list-item { 126 + .glist-item {
127 display: block; 127 display: block;
128 position: relative; 128 position: relative;
129 padding: 0 30px; 129 padding: 0 30px;
@@ -142,7 +142,7 @@ @@ -142,7 +142,7 @@
142 bottom: 0; 142 bottom: 0;
143 width: 100%; 143 width: 100%;
144 height: 0; 144 height: 0;
145 - border-top: 1px solid #f0f0f0; 145 + border-top: 1px solid #e0e0e0;
146 } 146 }
147 147
148 &:last-child:after { 148 &:last-child:after {
@@ -52,6 +52,9 @@ @@ -52,6 +52,9 @@
52 .num { 52 .num {
53 width: 440px; 53 width: 440px;
54 text-align: right; 54 text-align: right;
  55 + margin-top: 20px;
  56 + height: 50px;
  57 + line-height: 50px;
55 } 58 }
56 } 59 }
57 60
@@ -84,24 +87,22 @@ @@ -84,24 +87,22 @@
84 border-bottom: 1px solid #e6e6e6; 87 border-bottom: 1px solid #e6e6e6;
85 88
86 input { 89 input {
87 - height: 56px; 90 + height: 60px;
88 width: 100%; 91 width: 100%;
89 padding-left: 25px; 92 padding-left: 25px;
90 border-radius: 20px; 93 border-radius: 20px;
91 - font-size: 22px; 94 + font-size: 26px;
92 color: #b0b0b0; 95 color: #b0b0b0;
93 background: #eee; 96 background: #eee;
94 border: none; 97 border: none;
95 } 98 }
96 99
97 input::-webkit-input-placeholder { 100 input::-webkit-input-placeholder {
98 -  
99 /* WebKit browsers */ 101 /* WebKit browsers */
100 text-align: center; 102 text-align: center;
101 } 103 }
102 104
103 input:-ms-input-placeholder { 105 input:-ms-input-placeholder {
104 -  
105 /* Internet Explorer 10+ */ 106 /* Internet Explorer 10+ */
106 text-align: center; 107 text-align: center;
107 } 108 }
@@ -236,12 +236,12 @@ $white: #fff; @@ -236,12 +236,12 @@ $white: #fff;
236 color: #b0b0b0; 236 color: #b0b0b0;
237 } 237 }
238 238
239 - p:first-of-type{ 239 + p:first-of-type {
240 font-size: 34px; 240 font-size: 34px;
241 margin: 50px 0 20px; 241 margin: 50px 0 20px;
242 } 242 }
243 243
244 - a{ 244 + a {
245 display: inline-block; 245 display: inline-block;
246 width: 414px; 246 width: 414px;
247 height: 94px; 247 height: 94px;
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 padding-top: 50px; 76 padding-top: 50px;
77 } 77 }
78 .header-gap { 78 .header-gap {
79 - height: calc(70 + 50+ 10)px; 79 + height: calc(70 + 50 + 10)px;
80 } 80 }
81 } 81 }
82 </style> 82 </style>
@@ -11,8 +11,8 @@ @@ -11,8 +11,8 @@
11 <h2 class="card-label"> 11 <h2 class="card-label">
12 <a href="{{item.productId | goodsUrl}}" class="line-clamp-2">{{item.productName}}</a> 12 <a href="{{item.productId | goodsUrl}}" class="line-clamp-2">{{item.productName}}</a>
13 </h2> 13 </h2>
14 - <span class="good-price" :class="{'old-price': item.marketPrice}" v-if="item.marketPrice">¥ {{item.marketPrice}}</span>  
15 - <span class="good-price" :class="{'sale-price': item.marketPrice}">¥ {{item.salesPrice}}</span> 14 + <span class="good-price" :class="{'old-price': item.marketPrice}" v-if="item.marketPrice">¥ {{item.marketPrice | toFixed}}</span>
  15 + <span class="good-price" :class="{'sale-price': item.marketPrice}">¥ {{item.salesPrice | toFixed}}</span>
16 </div> 16 </div>
17 </li> 17 </li>
18 </ul> 18 </ul>
1 <template> 1 <template>
2 <ul class="list-box"> 2 <ul class="list-box">
3 - <li v-for="item in items"><a href="#{{item.index}}">{{item.name}}</a></li> 3 + <li v-for="item in items"><a class="no-intercept" href="#{{item.index}}">{{item.name}}</a></li>
4 </ul> 4 </ul>
5 </template> 5 </template>
6 <style> 6 <style>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <img :src="item.imgUrl | resize 152 203" alt=""/> 13 <img :src="item.imgUrl | resize 152 203" alt=""/>
14 </div> 14 </div>
15 <div class="fav-info-list"> 15 <div class="fav-info-list">
16 - <span class="title">{{item.title}}</span> 16 + <span class="title line-clamp-2">{{item.title}}</span>
17 <br/> 17 <br/>
18 <div class="fav-price"> 18 <div class="fav-price">
19 <span class="new-price" v-if="item.discountPrice">{{item.discountPrice}}</span> 19 <span class="new-price" v-if="item.discountPrice">{{item.discountPrice}}</span>
@@ -334,10 +334,10 @@ @@ -334,10 +334,10 @@
334 position: relative; 334 position: relative;
335 335
336 .title { 336 .title {
337 - width: 430px; 337 + width: 98%;
338 text-overflow: ellipsis; 338 text-overflow: ellipsis;
339 font-size: 28px; 339 font-size: 28px;
340 - margin: 0; 340 + margin-top: 10px;
341 } 341 }
342 342
343 .fav-price { 343 .fav-price {
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 </label> 7 </label>
8 <label> 8 <label>
9 快递单号 9 快递单号
10 - <input class="num" type="number" v-model='num'> 10 + <input class="num" maxlength="20" v-model='num'>
11 </label> 11 </label>
12 </form> 12 </form>
13 <div class="submit" @click="submit">确认</div> 13 <div class="submit" @click="submit">确认</div>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 // query 32 // query
33 url: '/search.json', 33 url: '/search.json',
34 order: '', 34 order: '',
35 - query: qs.query, 35 + query: decodeURIComponent(qs.query),
36 page: 0, // 未搜索 page=0; 全部加载完 page = totalPage; 无数据: page !=0 && productList.length=0 36 page: 0, // 未搜索 page=0; 全部加载完 page = totalPage; 无数据: page !=0 && productList.length=0
37 totalPage: null, 37 totalPage: null,
38 38
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 color: #fff; 17 color: #fff;
18 background-color: #ccc; 18 background-color: #ccc;
19 position: relative; 19 position: relative;
  20 + background-size: cover;
20 21
21 .brand-bottom { 22 .brand-bottom {
22 width: 100%; 23 width: 100%;