|
@@ -142,6 +142,38 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
}]);
|
|
}]);
|
|
|
|
+ app.controller('interactionAddCtrl', ["$scope","homeService", "$state", "msg","config","common", "$ionicTabsDelegate", "$ionicNavBarDelegate"
|
|
|
|
+ , function ($scope,homeService, $state, msg,config,common, $ionicTabsDelegate, $ionicNavBarDelegate) {
|
|
|
|
+ $scope.$on('$ionicView.beforeEnter', function () {
|
|
|
|
+ $ionicTabsDelegate.showBar(false);
|
|
|
|
+ $ionicNavBarDelegate.showBackButton(false);
|
|
|
|
+ $scope.vm={
|
|
|
|
+ dream:'',
|
|
|
|
+ about:'',
|
|
|
|
+ money:''
|
|
|
|
+ };
|
|
|
|
+ $scope.imgServer = config.imgServer;
|
|
|
|
+ $scope.imgs = [];
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $scope.addpict = function () {
|
|
|
|
+ common.chooseImage().then(function (img) {
|
|
|
|
+ common.uploadFiles(img,1).then(function (result) {
|
|
|
|
+ var response = JSON.parse(result.response);
|
|
|
|
+ var file = response.data.file;
|
|
|
|
+ $scope.imgs.push(file);
|
|
|
|
+ }, function (error) {
|
|
|
|
+ msg.error('图片上传失败');
|
|
|
|
+ });
|
|
|
|
+ }, function (error) {
|
|
|
|
+ console.log('图片选择失败');
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ $scope.add = function () {
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ }]);
|
|
|
|
|
|
|
|
|
|
})(angular.module('app.controllers'));
|
|
})(angular.module('app.controllers'));
|