|
@@ -74,29 +74,40 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
-
|
|
|
|
|
|
+ msg.loading();
|
|
|
|
+ myService.myIndex().then(function(result){
|
|
|
|
+ // alert(JSON.stringify(result.data.data.user));
|
|
|
|
+ $scope.vm = result.data.data.user;
|
|
|
|
+ msg.hide();
|
|
|
|
+ },function(error){
|
|
|
|
+ msg.hide();
|
|
|
|
+ msg.error(error.data.message);
|
|
|
|
+ })
|
|
});
|
|
});
|
|
- $scope.vm={
|
|
|
|
- //pic:"",
|
|
|
|
- sex:"",
|
|
|
|
- signture:"",
|
|
|
|
- emotion:"",
|
|
|
|
- job:"",
|
|
|
|
- tall:""
|
|
|
|
- };
|
|
|
|
|
|
+ // $scope.vm={
|
|
|
|
+ // //pic:"",
|
|
|
|
+ // sex:"1",
|
|
|
|
+ // signture:"",
|
|
|
|
+ // emotion:"1",
|
|
|
|
+ // job:"",
|
|
|
|
+ // tall:""
|
|
|
|
+ // };
|
|
$scope.saveMaterial = function(){
|
|
$scope.saveMaterial = function(){
|
|
var data = {
|
|
var data = {
|
|
- pic:['http://img.taopic.com/uploads/allimg/130103/240435-1301030P33161.jpg'],
|
|
|
|
|
|
+ pic:'http://img.taopic.com/uploads/allimg/130103/240435-1301030P33161.jpg',
|
|
sex:$scope.vm.sex,
|
|
sex:$scope.vm.sex,
|
|
signture:$scope.vm.signture,
|
|
signture:$scope.vm.signture,
|
|
emotion:$scope.vm.emotion,
|
|
emotion:$scope.vm.emotion,
|
|
job:$scope.vm.job,
|
|
job:$scope.vm.job,
|
|
tall:$scope.vm.tall
|
|
tall:$scope.vm.tall
|
|
}
|
|
}
|
|
|
|
+ msg.loading('提交中...');
|
|
myService.saveMaterial(data).then(function(result){
|
|
myService.saveMaterial(data).then(function(result){
|
|
-
|
|
|
|
|
|
+ msg.hide();
|
|
|
|
+ msg.success("保存成功!");
|
|
},function(error){
|
|
},function(error){
|
|
-
|
|
|
|
|
|
+ msg.hide();
|
|
|
|
+ msg.error(error.data.message);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|