|
@@ -3,13 +3,11 @@
|
|
, function ($scope, $http, config, $state, msg, $ionicPopover, homeService) {
|
|
, function ($scope, $http, config, $state, msg, $ionicPopover, homeService) {
|
|
$scope.type = 'hot';//tab切换
|
|
$scope.type = 'hot';//tab切换
|
|
|
|
|
|
- $scope.width = function() {
|
|
|
|
- var height = window.screen.width /20;
|
|
|
|
- $scope.heightStyle = {
|
|
|
|
- "height": "height" ,
|
|
|
|
- "border": "1px solid red"
|
|
|
|
- };
|
|
|
|
- };
|
|
|
|
|
|
+ $scope.chosedIndex = 0;
|
|
|
|
+ $scope.clickAvatar = function(index){
|
|
|
|
+ $scope.chosedIndex = index;
|
|
|
|
+ };
|
|
|
|
+
|
|
$ionicPopover.fromTemplateUrl('my-popover.html', {
|
|
$ionicPopover.fromTemplateUrl('my-popover.html', {
|
|
scope: $scope
|
|
scope: $scope
|
|
}).then(function (popover) {
|
|
}).then(function (popover) {
|
|
@@ -41,6 +39,7 @@
|
|
users: [],
|
|
users: [],
|
|
dreams:[]
|
|
dreams:[]
|
|
};
|
|
};
|
|
|
|
+
|
|
$scope.load = function (init) {
|
|
$scope.load = function (init) {
|
|
if (init) {
|
|
if (init) {
|
|
$scope.filter.pageIndex = 1;
|
|
$scope.filter.pageIndex = 1;
|
|
@@ -60,6 +59,7 @@
|
|
} else {
|
|
} else {
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
}
|
|
}
|
|
|
|
+
|
|
}, function (error) {
|
|
}, function (error) {
|
|
msg.hide();
|
|
msg.hide();
|
|
});
|
|
});
|
|
@@ -100,8 +100,8 @@
|
|
});
|
|
});
|
|
}]);
|
|
}]);
|
|
|
|
|
|
- app.controller('dreamDetailCtrl', ["$scope", "$state", "storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams", "$ionicModal", "$timeout", "$ionicScrollDelegate", "$interval"
|
|
|
|
- , function ($scope, $state, storage , msg, common, config, homeService, $ionicTabsDelegate, $stateParams, $ionicModal, $timeout, $ionicScrollDelegate, $interval) {
|
|
|
|
|
|
+ app.controller('dreamDetailCtrl', ["$scope", "$state", "$ionicModal","storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams", "$ionicModal", "$timeout", "$ionicScrollDelegate", "$interval"
|
|
|
|
+ , function ($scope, $state,$ionicModal, storage , msg, common, config, homeService, $ionicTabsDelegate, $stateParams, $ionicModal, $timeout, $ionicScrollDelegate, $interval) {
|
|
var id = $stateParams.id;
|
|
var id = $stateParams.id;
|
|
var top3user = '';
|
|
var top3user = '';
|
|
// id=5;
|
|
// id=5;
|
|
@@ -119,6 +119,7 @@
|
|
$scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
|
|
$scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
|
|
$scope.multi.c = $scope.dream.c;
|
|
$scope.multi.c = $scope.dream.c;
|
|
$scope.multi.promise = $scope.dream.a;
|
|
$scope.multi.promise = $scope.dream.a;
|
|
|
|
+ debugger;
|
|
var newtop3user = '' ;
|
|
var newtop3user = '' ;
|
|
angular.forEach($scope.dream.top3user, function(user) {
|
|
angular.forEach($scope.dream.top3user, function(user) {
|
|
newtop3user= newtop3user +user.id+","
|
|
newtop3user= newtop3user +user.id+","
|
|
@@ -139,14 +140,25 @@
|
|
}, function (error) {
|
|
}, function (error) {
|
|
msg.hide();
|
|
msg.hide();
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ };
|
|
|
|
+ $ionicModal.fromTemplateUrl('supportExplain.html', {
|
|
|
|
+ scope: $scope
|
|
|
|
+ }).then(function(modal) {
|
|
|
|
+ $scope.supportmodal = modal;
|
|
|
|
+ });
|
|
|
|
+ $scope.openSupportmodal = function() {
|
|
|
|
+ $scope.supportmodal.show();
|
|
|
|
+ };
|
|
|
|
+ $scope.closeSupportmodal = function() {
|
|
|
|
+ $scope.supportmodal.hide();
|
|
|
|
+ };
|
|
$scope.multi = {
|
|
$scope.multi = {
|
|
a: '',
|
|
a: '',
|
|
b: '',
|
|
b: '',
|
|
c: '',
|
|
c: '',
|
|
result: 1,
|
|
result: 1,
|
|
promise:null
|
|
promise:null
|
|
- }
|
|
|
|
|
|
+ };
|
|
$scope.type = 1;//tab切换
|
|
$scope.type = 1;//tab切换
|
|
$scope.tosupport = false;
|
|
$scope.tosupport = false;
|
|
$scope.support = function ($event) {
|
|
$scope.support = function ($event) {
|
|
@@ -222,7 +234,8 @@
|
|
if (number<=1) {
|
|
if (number<=1) {
|
|
number = 1;
|
|
number = 1;
|
|
}
|
|
}
|
|
- $scope.multi.result = Math.round(number * 100) / 100;
|
|
|
|
|
|
+ //$scope.multi.result = Math.round(number * 100) / 100;
|
|
|
|
+ $scope.multi.result = Math.round(number * 100 / 100);
|
|
},1000);
|
|
},1000);
|
|
// 点击支持取消 $interval.cancel($scope.multi.promise); 获取数据后重新开始执行
|
|
// 点击支持取消 $interval.cancel($scope.multi.promise); 获取数据后重新开始执行
|
|
}
|
|
}
|
|
@@ -365,6 +378,22 @@
|
|
$scope.toDetail = function (id) {
|
|
$scope.toDetail = function (id) {
|
|
$state.go('app.home_dreamdetail',{id:id});
|
|
$state.go('app.home_dreamdetail',{id:id});
|
|
};
|
|
};
|
|
|
|
+ $scope.toOldDream = function(){
|
|
|
|
+ $state.go("app.oldDream");
|
|
|
|
+ }
|
|
|
|
+ $scope.toSupportDream = function(){
|
|
|
|
+ $state.go("app.supportDream");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }]);
|
|
|
|
+ app.controller('oldDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
|
|
+ , function ($scope,homeService,$stateParams, $state, msg) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }]);
|
|
|
|
+ app.controller('supportDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
|
|
+ , function ($scope,homeService,$stateParams, $state, msg) {
|
|
|
|
+
|
|
|
|
|
|
}]);
|
|
}]);
|
|
app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"
|
|
app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"
|