|
@@ -1,6 +1,6 @@
|
|
(function (app) {
|
|
(function (app) {
|
|
- app.controller('myCtrl', ["$scope", "$state", "$http", "storage", "myService", "common", "config", "msg"
|
|
|
|
- , function ($scope, $state, $http, storage, myService, common, config, msg) {
|
|
|
|
|
|
+ app.controller('myCtrl', ["$scope", "$state", "$http", "storage", "myService", "common", "config", "msg","$timeout"
|
|
|
|
+ , function ($scope, $state, $http, storage, myService, common, config, msg, $timeout) {
|
|
$scope.$on('$ionicView.beforeEnter', function (viewResult) {
|
|
$scope.$on('$ionicView.beforeEnter', function (viewResult) {
|
|
myService.myInfo().then(function(result){
|
|
myService.myInfo().then(function(result){
|
|
console.log(result.data.data);
|
|
console.log(result.data.data);
|
|
@@ -14,7 +14,7 @@
|
|
common.setAvator().then(function (result) {
|
|
common.setAvator().then(function (result) {
|
|
var response = JSON.parse(result.response);
|
|
var response = JSON.parse(result.response);
|
|
$timeout(function () {
|
|
$timeout(function () {
|
|
- $scope.vm.user.avatar = response.data.md5;
|
|
|
|
|
|
+ $scope.vm.avatar = response.data.file;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -32,7 +32,7 @@
|
|
common.setAvator().then(function (result) {
|
|
common.setAvator().then(function (result) {
|
|
var response = JSON.parse(result.response);
|
|
var response = JSON.parse(result.response);
|
|
$timeout(function () {
|
|
$timeout(function () {
|
|
- $scope.vm.user.avatar = response.data.md5;
|
|
|
|
|
|
+ $scope.vm.avatar = response.data.file;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
};
|