zhuxc 7 years ago
parent
commit
7be5cbc25c

+ 2 - 18
www/apps/authuser/js/factory.js

@@ -13,25 +13,9 @@ starter.factory('User', function ($resource, $q, $filter, cfg, formatFilter, glo
     $httpProvider.interceptors.push(function ($q, cfg, global) {
         return {
             'request': function (config) {
-                if (config.url != null && (global.refresh || global.debug)) { //if the call is not for an asset file
-                    config.url += (config.url.indexOf("?") === -1 ? "?" : "&") + "v=" + Date.now();
-                    if (global.refresh)
-                        global.refresh = false;
-                }
-
-                if (config.url.startsWith(cfg.api) || config.url.indexOf(global.api) == 0) {//分页时自带了请求路径
-                    if (config.url.startsWith(cfg.api)) config.url = global.api + config.url;
-                    console.log(angular.lowercase(config.method) + " url: " + config.url);
-                    if (global.user.token) {
-                        config.headers['authorization'] = 'Token ' + global.user.token;
-                        console.log(' authorization:' + config.headers['authorization']);
-                    }
-                }
-                config.timeout = 60000;
-
-                if (config.url.indexOf("ext_erp") != -1) {//分页时自带了请求路径
+                if (config.url.indexOf("ext_erp") != -1) {
                     config.headers['cid'] = JSON.stringify({"linkid": global.user.compno, "langid": "TW", "phone": global.user.cellphone});
-                    config.headers['sn'] = global.sn;
+                    // config.headers['sn'] = global.sn;
                 }
                 return config;
             }

+ 1 - 1
www/apps/compmanage/js/controllers.js

@@ -1,5 +1,5 @@
 starter.controller('CompConnectCtrl', function ($scope, $state, $ionicSlideBoxDelegate, $rootScope, $ionicHistory, $window, $location, formatFilter, showPopup, global, Comp) {
-    $scope.activeIndex = 3;
+    $scope.activeIndex = 0;
     $scope.titleName = ['填写序列号', '选择公司', '用户信息', '导入部门'];
     var compmodal = showPopup.modalTemplate('templates/modal-selectcomp.html', 'slide-in-up', $scope);
 

+ 0 - 16
www/apps/compmanage/js/factory.js

@@ -16,22 +16,6 @@ starter.factory('Comp', function ($resource, $q, $filter, cfg, formatFilter, glo
     $httpProvider.interceptors.push(function ($q, cfg, global) {
         return {
             'request': function (config) {
-                if (config.url != null && (global.refresh || global.debug)) { //if the call is not for an asset file
-                    config.url += (config.url.indexOf("?") === -1 ? "?" : "&") + "v=" + Date.now();
-                    if (global.refresh)
-                        global.refresh = false;
-                }
-
-                if (config.url.startsWith(cfg.api) || config.url.indexOf(global.api) == 0) {//分页时自带了请求路径
-                    if (config.url.startsWith(cfg.api)) config.url = global.api + config.url;
-                    console.log(angular.lowercase(config.method) + " url: " + config.url);
-                    if (global.user.token) {
-                        config.headers['authorization'] = 'Token ' + global.user.token;
-                        console.log(' authorization:' + config.headers['authorization']);
-                    }
-                }
-                config.timeout = 60000;
-
                 if (config.url.indexOf("ext_erp") != -1) {
                     config.headers['cid'] = JSON.stringify({"linkid": global.user.compno, "langid": "TW", "phone": global.user.cellphone});
                     config.headers['sn'] = global.sn;