detail.page.js 703 Bytes
const Vue = require('yoho-vue');
const app = require('product/detail/index.vue');
const loading = require('common/loading');
const lazyload = require('yoho-vue-lazyload');

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();
    });
})();

new Vue({
    el: '#app',
    components: {
        app: app
    }
});