Authored by 沈志敏

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

@@ -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 +};
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 const Vue = require('vue'); 1 const Vue = require('vue');
2 -const $ = require('jquery');  
3 -const app = require('product/detail/index.vue');  
4 -const loading = require('common/loading');  
5 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');
6 5
7 require('common/vue-filter'); 6 require('common/vue-filter');
8 -require('common/overlay');  
9 -  
10 Vue.use(lazyload); 7 Vue.use(lazyload);
11 -  
12 -(() => {  
13 - let stop = 0;  
14 -  
15 - $(document).ajaxStart(()=> {  
16 - // start = new Date().getTime();  
17 -  
18 - // setTimeout(()=> {  
19 - if (stop === 0) { // 超过100ms请求仍未结束则显示  
20 - loading.show();  
21 - }  
22 -  
23 - // }, 100);  
24 - });  
25 -  
26 - $(document).ajaxStop(()=> {  
27 - stop = new Date().getTime();  
28 - loading.hide();  
29 - });  
30 -})();  
31 -  
32 -Vue.directive('lazy-html', function(html) {  
33 - html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');  
34 - this.el.innerHTML = html;  
35 - this.vm.$compile(this.el);  
36 -}); 8 +Vue.use(directive);
37 9
38 new Vue({ 10 new Vue({
39 el: '#app', 11 el: '#app',
@@ -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%;