|
|
@@ -639,10 +639,9 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- app.run(['$rootScope', '$state', '$q', 'BaseService', 'StoreInfo', '$location', function($rootScope, $state, $q, BaseService, StoreInfo, $location) {
|
|
|
+ app.run(['$rootScope', '$state', '$q', 'BaseService', 'StoreInfo', '$location', 'AuthenticationService', 'toaster', function($rootScope, $state, $q, BaseService, StoreInfo, $location, AuthenticationService, toaster) {
|
|
|
$rootScope.rootPath = BaseService.getRootPath();
|
|
|
$rootScope.page = 'vendor';// 导航栏状态,'个人中心'状态激活
|
|
|
-
|
|
|
var getToStateName = function () {
|
|
|
if ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')) {
|
|
|
return 'vendor_store_maintain';
|
|
|
@@ -690,7 +689,13 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
|
|
|
}
|
|
|
|
|
|
if ($rootScope.applyStatus === 'NONE' && $location.$$path === '/index') {
|
|
|
- $state.go('vendor_store_apply');
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (!(!data.pwdEnable || !data.haveUserQuestion||!data.emailValidCode || data.emailValidCode != 2)) {
|
|
|
+ $state.go('vendor_store_apply');
|
|
|
+ }
|
|
|
+ }).error(function (error) {
|
|
|
+ toaster.pop('error', '获取登录信息失败');
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
$rootScope.$on('$stateChangeStart', function (event, toState) {
|