|
@@ -4,13 +4,43 @@
|
|
$state.go('wl.my_profile');
|
|
$state.go('wl.my_profile');
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
- app.controller('mySettingCtrl', ['$scope', 'data', '$state', '$http', function ($scope, data, $state, $http) {
|
|
|
|
|
|
+ app.controller('mySettingCtrl', ['$scope', 'data', '$state', '$http','$ionicModal', function ($scope, data, $state, $http,$ionicModal) {
|
|
$scope.logout = function () {
|
|
$scope.logout = function () {
|
|
data.remove('user');
|
|
data.remove('user');
|
|
data.remove('token');
|
|
data.remove('token');
|
|
$http.defaults.headers.common["Authorization"] =undefined;
|
|
$http.defaults.headers.common["Authorization"] =undefined;
|
|
$state.go('login');
|
|
$state.go('login');
|
|
}
|
|
}
|
|
|
|
+ $ionicModal.fromTemplateUrl('low.html', {
|
|
|
|
+ scope: $scope,
|
|
|
|
+ animation: 'slide-in-up'
|
|
|
|
+ }).then(function(modal) {
|
|
|
|
+ $scope.modal1 = modal;
|
|
|
|
+ });
|
|
|
|
+ $ionicModal.fromTemplateUrl('compay.html', {
|
|
|
|
+ scope: $scope,
|
|
|
|
+ animation: 'slide-in-up'
|
|
|
|
+ }).then(function(modal) {
|
|
|
|
+ $scope.modal2 = modal;
|
|
|
|
+ });
|
|
|
|
+ $scope.openModal1 = function() {
|
|
|
|
+ $scope.modal1.show();
|
|
|
|
+ };
|
|
|
|
+ $scope.closeModal1 = function() {
|
|
|
|
+ $scope.modal1.hide();
|
|
|
|
+ };
|
|
|
|
+ $scope.openModal2 = function() {
|
|
|
|
+ alert(111);
|
|
|
|
+ $scope.modal2.show();
|
|
|
|
+ };
|
|
|
|
+ $scope.closeModal2 = function() {
|
|
|
|
+ $scope.modal2.hide();
|
|
|
|
+ };
|
|
|
|
+ // Cleanup the modal when we're done with it!
|
|
|
|
+ $scope.$on('$destroy', function() {
|
|
|
|
+ $scope.modal1.remove();
|
|
|
|
+ $scope.modal2.remove();
|
|
|
|
+ });
|
|
}]);
|
|
}]);
|
|
app.controller('mySetPasswordCtrl', ['$scope', '$state', function ($scope,$state) {
|
|
app.controller('mySetPasswordCtrl', ['$scope', '$state', function ($scope,$state) {
|
|
$scope.vm = {
|
|
$scope.vm = {
|
|
@@ -94,7 +124,7 @@
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
}
|
|
}
|
|
}, function (erro) {
|
|
}, function (erro) {
|
|
- msg.error(JSON.stringify(erro.data));
|
|
|
|
|
|
+ msg.error(erro.data.message);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
$scope.add = function () {
|
|
$scope.add = function () {
|
|
@@ -138,7 +168,7 @@
|
|
$state.go('wl.my_truck');
|
|
$state.go('wl.my_truck');
|
|
}, function (erro) {
|
|
}, function (erro) {
|
|
msg.hide();
|
|
msg.hide();
|
|
- msg.error(JSON.stringify(erro.data));
|
|
|
|
|
|
+ msg.error(erro.data.message);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -169,7 +199,7 @@
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
}
|
|
}
|
|
}, function (erro) {
|
|
}, function (erro) {
|
|
- msg.error(JSON.stringify(erro.data));
|
|
|
|
|
|
+ msg.error(erro.data.message);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -205,7 +235,7 @@
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
}
|
|
}
|
|
}, function (erro) {
|
|
}, function (erro) {
|
|
- msg.error(JSON.stringify(erro.data));
|
|
|
|
|
|
+ msg.error(erro.data.message);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|