Authored by 郭成尧

空方法提示信息修改

... ... @@ -11,6 +11,12 @@
const tip = require('common/tip');
/* 空方法 */
const nullFun = () =>{};
/* 提示信息 */
const tipInfo = '暂不支持,请在BLK应用中打开';
const yoho = {
/**
* 判断是否是 APP
... ... @@ -30,12 +36,12 @@ const yoho = {
*/
goTap(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.tab',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -47,12 +53,12 @@ const yoho = {
*/
goLogin(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.login',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -64,12 +70,12 @@ const yoho = {
*/
goLogout(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.loginout',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -81,12 +87,12 @@ const yoho = {
*/
goShopingKey(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.shoppingkey',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -98,12 +104,12 @@ const yoho = {
*/
goShopingCart(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.shopingCart',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -115,12 +121,12 @@ const yoho = {
*/
goAddress(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.address',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -132,12 +138,12 @@ const yoho = {
*/
goImageBrowser(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.imageBrowser',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -149,12 +155,12 @@ const yoho = {
*/
goNewPage(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.newPage',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -166,29 +172,29 @@ const yoho = {
*/
goPay(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.pay',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
/**
* 返回上一级页面
* @param args {}
* @param args {""}
* @param success
* @param fail
*/
goBack(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.back',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ... @@ -200,18 +206,18 @@ const yoho = {
*/
goShare(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.share',
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
/**
* 跳转到搜索页面
* @param args {}
* @param args {""}
* @param success
* @param fail
*/
... ... @@ -222,13 +228,13 @@ const yoho = {
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
/**
* 跳转到设置页面
* @param args {}
* @param args {""}
* @param success
* @param fail
*/
... ... @@ -239,7 +245,7 @@ const yoho = {
arguments: args
});
} else {
tip('暂不支持,请在BLK应用中打开');
tip(tipInfo);
}
},
... ...