Authored by 沈志敏

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

... ... @@ -273,9 +273,6 @@ const intercept = (url) => {
// 首页
if (/\/$/.test(path)) {
yoho.goSetChannel({
channel: qs.channel || 'men'
});
return yoho.goTab({
index: 0
});
... ...
... ... @@ -5,10 +5,10 @@
* @Last Modified time: 2016-08-02 17:42:26
*/
let Vue = require('vue');
Vue.directive('lazy-html', function(html) {
html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');
this.$el.innerHTML = html;
this.$vm.$compile(this.$el);
});
module.exports = (Vue) => {
Vue.directive('lazy-html', function(html) {
html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');
this.el.innerHTML = html;
this.vm.$compile(this.el);
});
};
... ...
const Vue = require('vue');
const lazyload = require('vue-lazyload');
const app = require('editorial/detail.vue');
const directive = require('common/vue-directive');
const app = require('product/detail/index.vue');
require('common/vue-filter');
require('common/vue-directive');
Vue.use(lazyload);
Vue.use(directive);
new Vue({
el: '#app',
... ...
const Vue = require('vue');
const $ = require('jquery');
const app = require('product/detail/index.vue');
const loading = require('common/loading');
const lazyload = require('vue-lazyload');
const directive = require('common/vue-directive');
const app = require('product/detail/index.vue');
require('common/vue-filter');
require('common/overlay');
Vue.use(lazyload);
(() => {
let stop = 0;
$(document).ajaxStart(()=> {
// start = new Date().getTime();
// setTimeout(()=> {
if (stop === 0) { // 超过100ms请求仍未结束则显示
loading.show();
}
// }, 100);
});
$(document).ajaxStop(()=> {
stop = new Date().getTime();
loading.hide();
});
})();
Vue.directive('lazy-html', function(html) {
html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-lazy="\'$1\'">');
this.el.innerHTML = html;
this.vm.$compile(this.el);
});
Vue.use(directive);
new Vue({
el: '#app',
... ...
... ... @@ -17,6 +17,7 @@
color: #fff;
background-color: #ccc;
position: relative;
background-size: cover;
.brand-bottom {
width: 100%;
... ...