| 
					
				 | 
			
			
				@@ -2,8 +2,8 @@ import { showToast } from './utils/feedback' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { formatTime, arrRemoveObj, getTypeItem,setCache } from './utils/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // import * as socketApi from './utils/websocket' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const baseUrl = "https://dp-test.g107.com/";//测试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// const baseUrl = "https://app109758.eapps.dingtalkcloud.com/";//正式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// const baseUrl = "https://dp-test.g107.com/";//测试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const baseUrl = "https://app109758.eapps.dingtalkcloud.com/";//正式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var that; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var yearArr = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 var year = formatTime(new Date()).year; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -14,8 +14,8 @@ App({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //自定义全局变量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   globalData: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     baseUrl: baseUrl, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    webScoketUrl: "test-ding.g107.com",//webScoket测试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // webScoketUrl: "app109758.eapps.dingtalkcloud.com", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // webScoketUrl: "test-ding.g107.com",//webScoket测试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    webScoketUrl: "app109758.eapps.dingtalkcloud.com/pc", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     showToast: showToast,//提示框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     arrRemoveObj: arrRemoveObj,//删除数组的某一项 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     year: formatTime(new Date()).year,//当前年 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,7 +68,7 @@ App({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               that.globalData.token = res.data.refresh_token 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             resolve(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (res.data.code == 2001) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else if (res.data.code == 5555) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             that.globalData.showToast(res.data.msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dd.reLaunch({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               url: `../../index/excessive/excessive` 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -114,7 +114,7 @@ App({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               that.globalData.token = res.data.refresh_token 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             resolve(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (res.data.code == 2001) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else if (res.data.code == 5555) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             that.globalData.showToast(res.data.msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dd.reLaunch({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               url: `../../index/excessive/excessive` 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -162,13 +162,13 @@ App({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               that.globalData.token = res.data.refresh_token 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             resolve(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (res.data.code == 2001) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else if (res.data.code == 5555) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             that.globalData.showToast(res.data.msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dd.reLaunch({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               url: `../../index/excessive/excessive` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             reject(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (res.data.code == 3000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else if (res.data.code == 4000||res.data.code == 4001) { //企业未初始化 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             reject(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             that.globalData.showToast(res.data.msg); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,25 +221,27 @@ App({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           that.$post('api/ding/login', { authCode: res.authCode, corpId: corpId }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.data.code == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               let user = res.data.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              console.log(JSON.stringify(user)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              if (user.is_official == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              // console.log(JSON.stringify(user)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if (user.is_official == 1&&user.is_scope == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 that.globalData.token = user.token; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 that.globalData.userData = user; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 that.setRouters(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 callBack(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                callBack(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(user.is_official == 0){//用户未启用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    callBack(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(user.is_scope == 0){//用户未授权 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    callBack(false,true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else if (res.data.code == 3000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              that.globalData.showToast("员工信息同步中,请稍后进入") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              console.log(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               that.globalData.showToast(res.msg) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }).catch(err => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             errBack(err.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (err.data.code == 2001) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (err.data.code == 5555) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               dd.confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 title: '尊敬的用户', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 content: '你当前的套餐已到期', 
			 |