通知客服端(后台)调取方法 (App)

            如果我们需要通知后台调取前端方法
            if(token){
             ////逻辑
             }else  if (window.jsObj) {
                      window.jsObj.getToken();  //安卓
                } else {
                      if(window.webkit){
                 window.webkit.messageHandlers.getToken.postMessage(null);   // ios
              } else {
                dispatch(routerRedux.push('/'));
              }
            }
            通知完后台之后
            getToken(t){
                调取后台接口
                callback:()=>{
                    //业务逻辑
                }
            }

猜你喜欢

转载自blog.csdn.net/weixin_42046201/article/details/81301327