|
@@ -20,17 +20,9 @@
|
|
//收到新消息
|
|
//收到新消息
|
|
alert('收到新消息,改变样式');
|
|
alert('收到新消息,改变样式');
|
|
$scope.showMessage = 1;
|
|
$scope.showMessage = 1;
|
|
- })
|
|
|
|
|
|
+ });
|
|
$scope.type = 'hot';//tab切换
|
|
$scope.type = 'hot';//tab切换
|
|
|
|
|
|
- //$scope.chosedIndex = 0;
|
|
|
|
- $scope.clickAvatar = function(id){
|
|
|
|
- homeService.toUserDetail(id).then(function(result){
|
|
|
|
- $state.go('app.home_dreamdetail',{id:id,type:2});
|
|
|
|
- },function(error){
|
|
|
|
- //msg.error(msg.data.error)
|
|
|
|
- });
|
|
|
|
- };
|
|
|
|
$ionicPopover.fromTemplateUrl('my-popover.html', {
|
|
$ionicPopover.fromTemplateUrl('my-popover.html', {
|
|
scope: $scope
|
|
scope: $scope
|
|
}).then(function (popover) {
|
|
}).then(function (popover) {
|
|
@@ -106,6 +98,7 @@
|
|
for(var i=0; i<obj.length; i++){
|
|
for(var i=0; i<obj.length; i++){
|
|
if(obj[i].checked){
|
|
if(obj[i].checked){
|
|
$scope.filter.age+=obj[i].value+',';
|
|
$scope.filter.age+=obj[i].value+',';
|
|
|
|
+ obj[i].checked=false;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
debugger;
|
|
debugger;
|
|
@@ -160,6 +153,15 @@
|
|
msg.hide();
|
|
msg.hide();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+ $scope.clickAvatar = function(id){
|
|
|
|
+ if($scope.index.users.dream_number<1){
|
|
|
|
+ $state.go('app.home_dreamdetail',{id:id,type:2});
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $scope.toUserDetail(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ };
|
|
$scope.qrscan = function () {
|
|
$scope.qrscan = function () {
|
|
cordova.plugins.barcodeScanner.scan(
|
|
cordova.plugins.barcodeScanner.scan(
|
|
function (result) {
|
|
function (result) {
|
|
@@ -235,6 +237,14 @@
|
|
|
|
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ $scope.toUserDetail = function (id) {
|
|
|
|
+ homeService.toUserDetail(id).then(function(result){
|
|
|
|
+ $scope.items = result.data.data;
|
|
|
|
+ $state.go('app.home_userDetail',{id:id,items:$scope.items});
|
|
|
|
+ },function(error){
|
|
|
|
+ //msg.error(msg.data.error)
|
|
|
|
+ })
|
|
|
|
+ };
|
|
$scope.$on('$ionicView.leave', function () {
|
|
$scope.$on('$ionicView.leave', function () {
|
|
if($scope.multi.promise)$interval.cancel($scope.multi.promise);
|
|
if($scope.multi.promise)$interval.cancel($scope.multi.promise);
|
|
if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
if($scope.leftTimer)$interval.cancel($scope.leftTimer);
|
|
@@ -491,20 +501,20 @@
|
|
} else {
|
|
} else {
|
|
$scope.dream.interactions[index].showmore = true;
|
|
$scope.dream.interactions[index].showmore = true;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ };
|
|
$scope.replay = function ($event, name, index) {
|
|
$scope.replay = function ($event, name, index) {
|
|
$event.stopPropagation();
|
|
$event.stopPropagation();
|
|
$scope.input.focus = true;
|
|
$scope.input.focus = true;
|
|
$scope.input.show = true;
|
|
$scope.input.show = true;
|
|
angular.forEach($scope.dream.interactions, function (item) {
|
|
angular.forEach($scope.dream.interactions, function (item) {
|
|
item.show = false;
|
|
item.show = false;
|
|
- })
|
|
|
|
|
|
+ });
|
|
$scope.dream.interactions[index].show = true;
|
|
$scope.dream.interactions[index].show = true;
|
|
$scope.dream.interactions[index].focus = true;
|
|
$scope.dream.interactions[index].focus = true;
|
|
$scope.input.placeholder = "评论" + name+":";
|
|
$scope.input.placeholder = "评论" + name+":";
|
|
$scope.vm.title='';
|
|
$scope.vm.title='';
|
|
$scope.vm.comment='';
|
|
$scope.vm.comment='';
|
|
- }
|
|
|
|
|
|
+ };
|
|
$scope.replayOther = function ($event, name, index,currentindex) {
|
|
$scope.replayOther = function ($event, name, index,currentindex) {
|
|
$event.stopPropagation();
|
|
$event.stopPropagation();
|
|
if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
|
|
if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
|
|
@@ -549,7 +559,7 @@
|
|
$scope.user = result.data.data;
|
|
$scope.user = result.data.data;
|
|
});
|
|
});
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ };
|
|
//充值
|
|
//充值
|
|
$scope.charge = function(number){
|
|
$scope.charge = function(number){
|
|
if (!number) {
|
|
if (!number) {
|
|
@@ -623,8 +633,7 @@
|
|
$scope.vm.comment = '' ;
|
|
$scope.vm.comment = '' ;
|
|
$scope.load(id);
|
|
$scope.load(id);
|
|
$scope.closeModal();
|
|
$scope.closeModal();
|
|
- })
|
|
|
|
- debugger;
|
|
|
|
|
|
+ });
|
|
};
|
|
};
|
|
$scope.bigImage = false;
|
|
$scope.bigImage = false;
|
|
$scope.showBigImage = function ($event, imageName) {
|
|
$scope.showBigImage = function ($event, imageName) {
|