Authored by ccbikai

增加校验

... ... @@ -40,7 +40,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goTab(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.tab',
arguments: args
... ... @@ -57,7 +57,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goLogin(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.login',
arguments: args
... ... @@ -74,7 +74,7 @@ const yoho = {
* @param fail
*/
goLogout(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.loginout',
arguments: args
... ... @@ -92,7 +92,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goShopingKey(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.shoppingkey',
arguments: args
... ... @@ -110,7 +110,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goShopingCart(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.shopingCart',
arguments: args
... ... @@ -127,7 +127,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goAddress(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.address',
arguments: args
... ... @@ -144,7 +144,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goImageBrowser(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.imageBrowser',
arguments: args
... ... @@ -162,7 +162,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goNewPage(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.newPage',
arguments: args
... ... @@ -181,7 +181,7 @@ const yoho = {
* @param fail 调用失败的回调方法
*/
goPay(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.pay',
arguments: args
... ... @@ -198,7 +198,7 @@ const yoho = {
* @param fail
*/
goBack(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.back',
arguments: args
... ... @@ -215,7 +215,7 @@ const yoho = {
* @param fail
*/
goShare(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.share',
arguments: args
... ... @@ -232,7 +232,7 @@ const yoho = {
* @param fail
*/
goSearch(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.search',
arguments: args
... ... @@ -249,7 +249,7 @@ const yoho = {
* @param fail
*/
goSetting(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.setting',
arguments: args
... ... @@ -266,7 +266,7 @@ const yoho = {
* @param fail
*/
goSetAvatar(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.setAvatar',
arguments: args
... ... @@ -283,7 +283,7 @@ const yoho = {
* @param fail
*/
goPageView(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.pageView',
arguments: args
... ... @@ -300,7 +300,7 @@ const yoho = {
* @param fail
*/
showLoading(args, success, fail) {
if (this.isApp) {
if (this.isApp && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.loading',
arguments: {
... ...