123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- var app = getApp();
- var that;
- Page({
- data: {
- num: 0,
- str: '企业信息同步中...',
- },
- onLoad() {
- that = this;
- that.loginAll();
- },
- loginAll() {
- app.login(app.globalData.corpId, function (is,is2) {
- if (is) {
- dd.reLaunch({
- url: '../../home/home/home'
- })
- } else {
- if(is2){
- dd.reLaunch({
- url: '../noJurisdiction/noJurisdiction?id=1'
- })
- }else{
- dd.reLaunch({
- url: '../noJurisdiction/noJurisdiction'
- })
- }
- }
- }, function (data) {
- if (data.code == 4000||data.code == 4001) {
- 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
- })
- }
- }, true)
- },
- });
|