|
@@ -53,15 +53,24 @@
|
|
$scope.modal2.remove();
|
|
$scope.modal2.remove();
|
|
});
|
|
});
|
|
}]);
|
|
}]);
|
|
- app.controller('mySetPasswordCtrl', ['$scope', '$state', function ($scope,$state) {
|
|
|
|
|
|
+ app.controller('mySetPasswordCtrl', ['$scope', '$state', 'myService', 'msg', function ($scope, $state, myService, msg) {
|
|
$scope.vm = {
|
|
$scope.vm = {
|
|
|
|
+ oldpassword:'',
|
|
password: '',
|
|
password: '',
|
|
- password2: '',
|
|
|
|
|
|
+ password1: '',
|
|
isloading: false,
|
|
isloading: false,
|
|
|
|
|
|
};
|
|
};
|
|
$scope.submit = function () {
|
|
$scope.submit = function () {
|
|
-
|
|
|
|
|
|
+ msg.loading('保存中...');
|
|
|
|
+ var model = { old_password: $scope.vm.oldpassword, password: $scope.vm.password, password_confirmation: $scope.vm.password1 };
|
|
|
|
+ myService.resetPassword(model).then(function () {
|
|
|
|
+ msg.hide();
|
|
|
|
+ msg.success('密码修改成功');
|
|
|
|
+ }, function (erro) {
|
|
|
|
+ msg.hide();
|
|
|
|
+ msg.error(erro);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
|
|
|
|
@@ -158,7 +167,9 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- $scope.load(true);
|
|
|
|
|
|
+ $scope.$on('$ionicView.enter', function (viewResult) {
|
|
|
|
+ $scope.load(true);
|
|
|
|
+ });
|
|
}]);
|
|
}]);
|
|
app.controller('myTruckAddCtrl', ['$scope', 'myService', 'msg', '$state', '$stateParams', 'camera', 'config', '$timeout', function ($scope, myService, msg, $state, $stateParams, camera, config, $timeout) {
|
|
app.controller('myTruckAddCtrl', ['$scope', 'myService', 'msg', '$state', '$stateParams', 'camera', 'config', '$timeout', function ($scope, myService, msg, $state, $stateParams, camera, config, $timeout) {
|
|
$scope.vm = {};
|
|
$scope.vm = {};
|
|
@@ -268,7 +279,12 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
$scope.close = function () {
|
|
$scope.close = function () {
|
|
- $scope.shouldShowDelete = true;
|
|
|
|
|
|
+ if ($scope.shouldShowDelete) {
|
|
|
|
+ $scope.shouldShowDelete = false;
|
|
|
|
+ } else {
|
|
|
|
+ $scope.shouldShowDelete = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
$scope.detail = function (item) {
|
|
$scope.detail = function (item) {
|
|
$state.go('wl.my_message_detail', { item: item });
|
|
$state.go('wl.my_message_detail', { item: item });
|
|
@@ -281,7 +297,9 @@
|
|
msg.error(erro.data.message);
|
|
msg.error(erro.data.message);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- $scope.load(true);
|
|
|
|
|
|
+ $scope.$on('$ionicView.enter', function (viewResult) {
|
|
|
|
+ $scope.load(true);
|
|
|
|
+ });
|
|
}]);
|
|
}]);
|
|
app.controller('myMessageDetailCtrl', ['$scope', '$stateParams', function ($scope, $stateParams) {
|
|
app.controller('myMessageDetailCtrl', ['$scope', '$stateParams', function ($scope, $stateParams) {
|
|
$scope.vm = $stateParams.item;
|
|
$scope.vm = $stateParams.item;
|
|
@@ -347,7 +365,9 @@
|
|
$scope.detail = function (item) {
|
|
$scope.detail = function (item) {
|
|
$state.go('wl.my_order_detail', { item: item });
|
|
$state.go('wl.my_order_detail', { item: item });
|
|
}
|
|
}
|
|
- $scope.load(true);
|
|
|
|
|
|
+ $scope.$on('$ionicView.enter', function (viewResult) {
|
|
|
|
+ $scope.load(true);
|
|
|
|
+ });
|
|
}]);
|
|
}]);
|
|
app.controller('myOrderDetailCtrl', ['$scope', '$stateParams', function ($scope, $stateParams) {
|
|
app.controller('myOrderDetailCtrl', ['$scope', '$stateParams', function ($scope, $stateParams) {
|
|
$scope.vm = $stateParams.item;
|
|
$scope.vm = $stateParams.item;
|