|
|
@@ -677,14 +677,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
|
|
|
});
|
|
|
var applyPromise = deferred1.promise;
|
|
|
|
|
|
- // 是否pcb
|
|
|
- var deferred2 = $q.defer();
|
|
|
- StoreInfo.isPcb({enuu: $rootScope.userInfo.enterprise.uu}, function (result) {
|
|
|
- deferred1.resolve(result);
|
|
|
- }, function (error) {
|
|
|
- deferred1.reject(error);
|
|
|
- });
|
|
|
- $rootScope.pcbPromise = deferred2.promise;
|
|
|
+ // console.log($rootScope.userInfo);
|
|
|
|
|
|
// 合并多个Promise对象
|
|
|
$q.all([storePromise, applyPromise]).then(function (result) {
|
|
|
@@ -710,9 +703,11 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
|
|
|
$state.go('vendor_store_maintain');
|
|
|
}
|
|
|
}
|
|
|
- $q.all[$rootScope.pcbPromise].then(function (res) {
|
|
|
- $rootScope.isPcbStore = res == 1;
|
|
|
- })
|
|
|
+ // 是否pcb
|
|
|
+ StoreInfo.isPcb({enuu: $rootScope.userInfo.enterprise.uu}, function (res) {
|
|
|
+ $rootScope.isPcbStore = res.data == 1;
|
|
|
+ }, function (error) {
|
|
|
+ });
|
|
|
}).error(function (error) {
|
|
|
toaster.pop('error', '获取登录信息失败');
|
|
|
})
|