|
@@ -125,8 +125,8 @@
|
|
});
|
|
});
|
|
}]);
|
|
}]);
|
|
|
|
|
|
- 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) {
|
|
|
|
|
|
+ app.controller('dreamDetailCtrl', ["$scope", "$state", "$ionicModal","storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams","$ionicBackdrop", "$timeout", "$ionicScrollDelegate", "$interval"
|
|
|
|
+ , function ($scope, $state,$ionicModal, storage , msg, common, config, homeService, $ionicTabsDelegate, $stateParams,$ionicBackdrop, $timeout, $ionicScrollDelegate, $interval) {
|
|
var id = $stateParams.id;
|
|
var id = $stateParams.id;
|
|
var top3user = '';
|
|
var top3user = '';
|
|
$scope.chosedIndex = 0;
|
|
$scope.chosedIndex = 0;
|
|
@@ -154,6 +154,8 @@
|
|
msg.hide();
|
|
msg.hide();
|
|
console.log(result);
|
|
console.log(result);
|
|
$scope.dream = result.data.data;
|
|
$scope.dream = result.data.data;
|
|
|
|
+ var reg = new RegExp("\n", "g");
|
|
|
|
+ $scope.dream.about = $scope.dream.about.replace(reg, "<br/>");
|
|
var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
|
|
var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
|
|
var date = new Date();
|
|
var date = new Date();
|
|
var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
@@ -255,16 +257,19 @@
|
|
var h=parseInt(countDown/(60*60)%24);
|
|
var h=parseInt(countDown/(60*60)%24);
|
|
var m=parseInt(countDown/60%60);
|
|
var m=parseInt(countDown/60%60);
|
|
var s=parseInt(countDown%60);
|
|
var s=parseInt(countDown%60);
|
|
- $scope.timer=(h<10?'0'+h:h)+'时'+(m<10?'0'+m:m)+'分'+(s<10?'0'+s:s)+'秒';
|
|
|
|
- if(day>0) $scope.timer = day+'天'+ $scope.timer;
|
|
|
|
|
|
+ //$scope.timer=(h<10?'0'+h:h)+'时'+(m<10?'0'+m:m)+'分'+(s<10?'0'+s:s)+'秒';
|
|
|
|
+ if(day>0) $scope.timer = day+'天';
|
|
|
|
+ if(day<0 && h>0) $scope.timer = h+'小时';
|
|
|
|
+ if(day<0 && h<0 && m>0) $scope.timer = m+'分钟';
|
|
|
|
+ if(day<0 && h<0 && m<0) $scope.timer = '结束';
|
|
|
|
|
|
- if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
|
|
|
|
+ /* if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
$scope.leftTimer = $interval(function () {
|
|
$scope.leftTimer = $interval(function () {
|
|
if (countDown >= 1) leftTimer(countDown - 1);
|
|
if (countDown >= 1) leftTimer(countDown - 1);
|
|
- },1000);
|
|
|
|
- if(countDown<=0){
|
|
|
|
|
|
+ },1000);*/
|
|
|
|
+ /* if(countDown<=0){
|
|
$scope.timer='结束';
|
|
$scope.timer='结束';
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
};
|
|
};
|
|
$scope.changeIndex = function (index) {
|
|
$scope.changeIndex = function (index) {
|
|
$scope.index = index;
|
|
$scope.index = index;
|
|
@@ -372,7 +377,15 @@
|
|
$scope.closeModal();
|
|
$scope.closeModal();
|
|
})
|
|
})
|
|
};
|
|
};
|
|
- $scope.addpict = function () {
|
|
|
|
|
|
+ $scope.bigImage = false;
|
|
|
|
+ $scope.showBigImage = function(imageName){
|
|
|
|
+ $scope.url = imageName;
|
|
|
|
+ $scope.bigImage = true;
|
|
|
|
+ };
|
|
|
|
+ $scope.hideBigImage = function(){
|
|
|
|
+ $scope.bigImage = false;
|
|
|
|
+ };
|
|
|
|
+ $scope.addpict = function () {
|
|
common.chooseImage().then(function (img) {
|
|
common.chooseImage().then(function (img) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
var response = JSON.parse(result.response);
|
|
var response = JSON.parse(result.response);
|
|
@@ -453,6 +466,8 @@
|
|
msg.hide();
|
|
msg.hide();
|
|
console.log(result);
|
|
console.log(result);
|
|
$scope.dream = result.data.data;
|
|
$scope.dream = result.data.data;
|
|
|
|
+ var reg = new RegExp("\n", "g");
|
|
|
|
+ $scope.dream.about = $scope.dream.about.replace(reg, "<br/>");
|
|
var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
|
|
var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
|
|
var date = new Date();
|
|
var date = new Date();
|
|
var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
@@ -515,6 +530,7 @@
|
|
$scope.cancelSupport = function () {
|
|
$scope.cancelSupport = function () {
|
|
$scope.tosupport = false;
|
|
$scope.tosupport = false;
|
|
$scope.toshare = false;
|
|
$scope.toshare = false;
|
|
|
|
+ $scope.input.show = false;
|
|
|
|
|
|
};
|
|
};
|
|
$scope.toshare = false;
|
|
$scope.toshare = false;
|
|
@@ -526,7 +542,7 @@
|
|
$state.go("app.recharge")
|
|
$state.go("app.recharge")
|
|
};
|
|
};
|
|
$scope.shareDream = function(){
|
|
$scope.shareDream = function(){
|
|
- $state.go("app.my_shareDream",{item:$scope.dream});
|
|
|
|
|
|
+ $state.go("app.shareDream",{item:$scope.dream});
|
|
};
|
|
};
|
|
|
|
|
|
//实时排行
|
|
//实时排行
|
|
@@ -553,16 +569,19 @@
|
|
var h=parseInt(countDown/(60*60)%24);
|
|
var h=parseInt(countDown/(60*60)%24);
|
|
var m=parseInt(countDown/60%60);
|
|
var m=parseInt(countDown/60%60);
|
|
var s=parseInt(countDown%60);
|
|
var s=parseInt(countDown%60);
|
|
- $scope.timer=(h<10?'0'+h:h)+'时'+(m<10?'0'+m:m)+'分'+(s<10?'0'+s:s)+'秒';
|
|
|
|
- if(day>0) $scope.timer = day+'天'+ $scope.timer;
|
|
|
|
-
|
|
|
|
- if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
|
|
- $scope.leftTimer = $interval(function () {
|
|
|
|
- if (countDown >= 1) leftTimer(countDown - 1);
|
|
|
|
- },1000);
|
|
|
|
- if(countDown<=0){
|
|
|
|
- $scope.timer='结束';
|
|
|
|
- }
|
|
|
|
|
|
+ //$scope.timer=(h<10?'0'+h:h)+'时'+(m<10?'0'+m:m)+'分'+(s<10?'0'+s:s)+'秒';
|
|
|
|
+ if(day>0) $scope.timer = day+'天';
|
|
|
|
+ if(day<0 && h>0) $scope.timer = h+'小时';
|
|
|
|
+ if(day<0 && h<0 && m>0) $scope.timer = m+'分钟';
|
|
|
|
+ if(day<0 && h<0 && m<0) $scope.timer = '结束';
|
|
|
|
+
|
|
|
|
+ /* if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
|
|
+ $scope.leftTimer = $interval(function () {
|
|
|
|
+ if (countDown >= 1) leftTimer(countDown - 1);
|
|
|
|
+ },1000);*/
|
|
|
|
+ /* if(countDown<=0){
|
|
|
|
+ $scope.timer='结束';
|
|
|
|
+ }*/
|
|
};
|
|
};
|
|
$scope.changeIndex = function (index) {
|
|
$scope.changeIndex = function (index) {
|
|
$scope.index = index;
|
|
$scope.index = index;
|
|
@@ -640,12 +659,14 @@
|
|
};
|
|
};
|
|
$scope.input = {
|
|
$scope.input = {
|
|
placeholder: '评论',
|
|
placeholder: '评论',
|
|
- focus:false
|
|
|
|
|
|
+ focus: false,
|
|
|
|
+ show:false
|
|
};
|
|
};
|
|
-
|
|
|
|
$scope.replay = function ($event, name) {
|
|
$scope.replay = function ($event, name) {
|
|
|
|
+
|
|
$event.stopPropagation();
|
|
$event.stopPropagation();
|
|
$scope.input.focus = true;
|
|
$scope.input.focus = true;
|
|
|
|
+ $scope.input.show = true;
|
|
$scope.input.placeholder = "回复" + name;
|
|
$scope.input.placeholder = "回复" + name;
|
|
$scope.vm.title='';
|
|
$scope.vm.title='';
|
|
};
|
|
};
|
|
@@ -668,6 +689,14 @@
|
|
$scope.closeModal();
|
|
$scope.closeModal();
|
|
})
|
|
})
|
|
};
|
|
};
|
|
|
|
+ $scope.bigImage = false;
|
|
|
|
+ $scope.showBigImage = function(imageName){
|
|
|
|
+ $scope.url = imageName;
|
|
|
|
+ $scope.bigImage = true;
|
|
|
|
+ };
|
|
|
|
+ $scope.hideBigImage = function(){
|
|
|
|
+ $scope.bigImage = false;
|
|
|
|
+ };
|
|
$scope.addpict = function () {
|
|
$scope.addpict = function () {
|
|
common.chooseImage().then(function (img) {
|
|
common.chooseImage().then(function (img) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
@@ -717,7 +746,7 @@
|
|
$scope.modal.remove();
|
|
$scope.modal.remove();
|
|
});
|
|
});
|
|
$scope.toMessage = function(){
|
|
$scope.toMessage = function(){
|
|
- $state.go("app.my_message");
|
|
|
|
|
|
+ $state.go("app.message");
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
app.controller('userDetailCtrl', ["$scope", "$state", "$ionicModal","storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams", "$ionicModal", "$timeout", "$ionicScrollDelegate", "$interval"
|
|
app.controller('userDetailCtrl', ["$scope", "$state", "$ionicModal","storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams", "$ionicModal", "$timeout", "$ionicScrollDelegate", "$interval"
|
|
@@ -787,11 +816,15 @@
|
|
}]);
|
|
}]);
|
|
app.controller('oldDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
app.controller('oldDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
, function ($scope,homeService,$stateParams, $state, msg) {
|
|
, function ($scope,homeService,$stateParams, $state, msg) {
|
|
-
|
|
|
|
|
|
+ $scope.toDetail = function(){
|
|
|
|
+ $state.go("app.home_userDetail")
|
|
|
|
+ }
|
|
}]);
|
|
}]);
|
|
app.controller('supportDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
app.controller('supportDreamCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
|
|
, function ($scope,homeService,$stateParams, $state, msg) {
|
|
, function ($scope,homeService,$stateParams, $state, msg) {
|
|
-
|
|
|
|
|
|
+ $scope.toDetail = function(){
|
|
|
|
+ $state.go("app.home_userDetail")
|
|
|
|
+ }
|
|
}]);
|
|
}]);
|
|
app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"
|
|
app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"
|
|
, function ($scope,homeService, $state, msg, $ionicTabsDelegate, $ionicNavBarDelegate) {
|
|
, function ($scope,homeService, $state, msg, $ionicTabsDelegate, $ionicNavBarDelegate) {
|