begin.js 612 B

123456789101112131415161718192021222324252627282930
  1. var app = getApp();
  2. var that;
  3. Page({
  4. data: {},
  5. onLoad() {
  6. that = this;
  7. that.loginAll();
  8. },
  9. loginAll(){
  10. // dd.showLoading();
  11. app.login(app.globalData.corpId, function (is) {
  12. if(is){
  13. // dd.hideLoading();
  14. dd.reLaunch({
  15. url: '../workbench/index/index'
  16. })
  17. } else {
  18. dd.reLaunch({
  19. url: '../workbench/noJurisdiction/noJurisdiction'
  20. })
  21. }
  22. },function(code){
  23. if(code==2001){
  24. setTimeout(function(){
  25. that.loginAll();
  26. }, 3000);
  27. }
  28. })
  29. },
  30. });