| xqd
@@ -369,11 +369,19 @@
|
|
|
app.controller('personalLetterCtrl', ["$scope","$ionicTabsDelegate", '$location',"$state", "myService", "msg","storage"
|
|
|
, function ($scope,$ionicTabsDelegate,$location, $state,myService, msg, storage) {
|
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
|
+ $scope.loaddata(true);
|
|
|
+ });
|
|
|
+ $scope.loaddata = function(init){
|
|
|
myService.letter().then(function(result){
|
|
|
$scope.items = result.data.data;
|
|
|
+ if (init) {
|
|
|
+ $scope.$broadcast('scroll.refreshComplete');
|
|
|
+ } else {
|
|
|
+ $scope.$broadcast('scroll.infiniteScrollComplete');
|
|
|
+ }
|
|
|
},function(error){
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
$scope.toLetter = function(id){
|
|
|
if($location.path()=="/app/home/message/letter"){
|
|
|
console.log($location.path());
|
| xqd
@@ -711,16 +719,24 @@
|
|
|
app.controller('messageSysCtrl', ["$scope","common","config","$ionicPopup","$location", "$ionicTabsDelegate","$state", "myService", "msg"
|
|
|
, function ($scope,common,config,$ionicPopup,$location,$ionicTabsDelegate, $state, myService, msg) {
|
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
|
- myService.systemInfo().then(function(result){
|
|
|
- $scope.sysInfos = result.data.data;
|
|
|
- },function(error){
|
|
|
- });
|
|
|
+ $scope.loaddata(true);
|
|
|
});
|
|
|
$scope.vm = {
|
|
|
content:""
|
|
|
};
|
|
|
$scope.imgs = [];
|
|
|
$scope.video = {};
|
|
|
+ $scope.loaddata = function(init){
|
|
|
+ myService.systemInfo().then(function(result){
|
|
|
+ $scope.sysInfos = result.data.data;
|
|
|
+ if (init) {
|
|
|
+ $scope.$broadcast('scroll.refreshComplete');
|
|
|
+ } else {
|
|
|
+ $scope.$broadcast('scroll.infiniteScrollComplete');
|
|
|
+ }
|
|
|
+ },function(error){
|
|
|
+ });
|
|
|
+ }
|
|
|
$scope.addpict = function () {
|
|
|
common.chooseImage().then(function (img) {
|
|
|
common.uploadFiles(img,1).then(function (result) {
|
| xqd
@@ -866,11 +882,16 @@
|
|
|
app.controller('messageReplyCtrl', ["$scope","$location","$ionicPopup","$ionicTabsDelegate", "$state","config", "myService", "msg", "$ionicModal"
|
|
|
, function ($scope,$location,$ionicPopup,$ionicTabsDelegate, $state,config, myService, msg, $ionicModal) {
|
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
|
- $scope.load();
|
|
|
+ $scope.load(true);
|
|
|
});
|
|
|
- $scope.load = function () {
|
|
|
+ $scope.load = function (init) {
|
|
|
myService.replyMy().then(function (result) {
|
|
|
$scope.comments = result.data.data;
|
|
|
+ if (init) {
|
|
|
+ $scope.$broadcast('scroll.refreshComplete');
|
|
|
+ } else {
|
|
|
+ $scope.$broadcast('scroll.infiniteScrollComplete');
|
|
|
+ }
|
|
|
}, function (error) {
|
|
|
});
|
|
|
};
|
| xqd
@@ -894,7 +915,7 @@
|
|
|
'<p>'+info+'</p>' +
|
|
|
'</div>';
|
|
|
}
|
|
|
- msg.confirm('私信',letterTemplate,'梦想页').then(function(result){
|
|
|
+ msg.confirm('私信',letterTemplate,'','梦想页').then(function(result){
|
|
|
if(result==true){
|
|
|
if($location.path()=="/app/home/message/reply"){
|
|
|
$state.go('app.home_dreamdetail',{id:dream_id,type:2});
|