| xqd
@@ -2,7 +2,7 @@
|
|
|
app.controller('myCtrl', ["$scope", "$state", "$http", "storage", "myService", "common", "config", "msg"
|
|
|
, function ($scope, $state, $http, storage, myService, common, config, msg) {
|
|
|
$scope.$on('$ionicView.beforeEnter', function (viewResult) {
|
|
|
- myService.myIndex().then(function(result){
|
|
|
+ myService.myInfo().then(function(result){
|
|
|
console.log(result.data.data);
|
|
|
$scope.user = result.data.data
|
|
|
});
|
| xqd
@@ -22,30 +22,18 @@
|
|
|
$state.go('app.my_profile');
|
|
|
};
|
|
|
|
|
|
- //我的设置
|
|
|
- $scope.setting = function(){
|
|
|
- myService.setting().then(function(result){
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- //修改个人信息
|
|
|
- $scope.myMaterial = function(){
|
|
|
- myService.myMaterial().then(function(result){
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
app.controller('profileCtrl', ["$scope", "$state","$filter", "storage", "myService", "msg", "common"
|
|
|
, function ($scope, $state, $filter, storage, myService, msg, common) {
|
|
|
$scope.setAvator = function () {
|
|
|
common.setAvator().then(function (result) {
|
|
|
- debugger;
|
|
|
var response = JSON.parse(result.response);
|
|
|
$timeout(function () {
|
|
|
$scope.vm.user.avatar = response.data.md5;
|
|
|
});
|
|
|
- }, function (error) {
|
|
|
- msg.error(JSON.stringify(error));
|
|
|
});
|
|
|
};
|
|
|
|
| xqd
@@ -60,7 +48,7 @@
|
|
|
};
|
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
|
msg.loading();
|
|
|
- myService.myIndex().then(function(result){
|
|
|
+ myService.myInfo().then(function(result){
|
|
|
// alert(JSON.stringify(result.data.data));
|
|
|
$scope.vm = result.data.data;
|
|
|
$scope.vm.sex = $scope.vm.sex+'';
|
| xqd
@@ -72,7 +60,7 @@
|
|
|
msg.hide();
|
|
|
},function(error){
|
|
|
msg.hide();
|
|
|
- msg.error(error.data.message);
|
|
|
+ // msg.error(error.data.message);
|
|
|
})
|
|
|
});
|
|
|
|
| xqd
@@ -117,7 +105,10 @@
|
|
|
app.controller('rechargeCtrl', ["$scope", "$state", "myService", "msg"
|
|
|
, function ($scope, $state, myService, msg) {
|
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
|
-
|
|
|
+ myService.myInfo().then(function(result){
|
|
|
+ // alert(JSON.stringify(result.data.data));
|
|
|
+ $scope.vm = result.data.data;
|
|
|
+ })
|
|
|
$scope.vm = {
|
|
|
money:"",
|
|
|
}
|