...
|
...
|
@@ -15,10 +15,26 @@ |
|
|
* 2. 查询字符串读取 请使用 yoho-qs
|
|
|
*/
|
|
|
const $ = require('jquery');
|
|
|
const yoho = require('yoho');
|
|
|
const Vue = require('vue');
|
|
|
const interceptClick = require('common/intercept-click');
|
|
|
|
|
|
// 隐藏 App 默认显示的 loading
|
|
|
Vue.mixin({
|
|
|
ready() {
|
|
|
if (this === this.$root && location.pathname !== '/sidebar') {
|
|
|
yoho.showLoading(false);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$(() => {
|
|
|
$('body').on('click', 'a[href]', function() {
|
|
|
const $body = $('body');
|
|
|
|
|
|
if ($body.hasClass('no-local-js')) {
|
|
|
yoho.showLoading(false); // 隐藏 App 默认显示的 loading
|
|
|
}
|
|
|
$body.on('click', 'a[href]', function() {
|
|
|
// 拦截跳转
|
|
|
if (!$(this).hasClass('no-intercept')) {
|
|
|
interceptClick($(this).attr('href'));
|
...
|
...
|
|