123456789101112131415161718192021222324252627282930313233343536373839 |
- var app = getApp();
- var that;
- Page({
- data: {
- num:0,
- str:'企业信息同步中...',
- },
- onLoad() {
- that = this;
- that.loginAll();
- },
- loginAll(){
- app.login(app.globalData.corpId, function (is) {
- if(is){
- dd.reLaunch({
- url: '../workbench/index/index'
- })
- } else {
- dd.reLaunch({
- url: '../workbench/noJurisdiction/noJurisdiction'
- })
- }
- },function(data){
- if(data.code==3000){
- if(that.data.num==3){ return false}
- setTimeout(function(){
- let num=that.data.num;
- that.setData({ num:num+1 })
- that.loginAll();
- }, 3000);
- }else{
- that.setData({
- num:0,
- str:data.msg
- })
- }
- })
- },
- });
|