Authored by 陈轩

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

... ... @@ -43,7 +43,7 @@ module.exports = {
order: req.query.order || 's_t_desc',
limit: req.query.limit || '60',
color: req.query.color,
price: req.query.price,
price: req.query.priceRange,
size: req.query.size,
pd: req.query.pd,
tagsFilter: req.query.tagsFilter
... ...
... ... @@ -34,19 +34,21 @@ Vue.mixin({
$(() => {
const $body = $('body');
// 页面内无 JS 时, 自动隐藏 App 显示的 Loading
if ($body.hasClass('no-local-js')) {
yoho.showLoading(false); // 隐藏 App 默认显示的 loading
util.visibilitychange();
}
// 拦截页面内所有 a 标签的跳转
$body.on('click', 'a[href]', function() {
// 拦截跳转
if (!$(this).hasClass('no-intercept')) {
interceptClick.intercept($(this).attr('href'));
return false;
}
});
// App 发送给 H5 的事件,统一转为 Vue-bus 的事件
yoho.addNativeMethod('triggerH5Event', (eventName) => {
alert(eventName);
bus.$emit(eventName);
... ...
... ... @@ -233,7 +233,7 @@ const yoho = {
*/
goSearch(args, success, fail) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.search',
arguments: args
});
... ... @@ -250,7 +250,7 @@ const yoho = {
*/
goSetting(args, success, fail) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.setting',
arguments: args
});
... ... @@ -267,7 +267,7 @@ const yoho = {
*/
goSetAvatar(args, success, fail) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.setAvatar',
arguments: args
});
... ... @@ -284,7 +284,7 @@ const yoho = {
*/
goPageView(args, success, fail) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.pageView',
arguments: args
});
... ... @@ -301,7 +301,7 @@ const yoho = {
*/
showLoading(args, success, fail) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.loading',
arguments: {
show: args ? 'yes' : 'no'
... ...