|
@@ -357,26 +357,31 @@
|
|
// 举报或拉黑(互动页面)
|
|
// 举报或拉黑(互动页面)
|
|
$scope.report = function(ev,dream_id,interaction_id,user_id){
|
|
$scope.report = function(ev,dream_id,interaction_id,user_id){
|
|
ev.stopPropagation();
|
|
ev.stopPropagation();
|
|
|
|
+ $scope.toshare = false;
|
|
if($scope.user.id != $scope.dream.user_id){
|
|
if($scope.user.id != $scope.dream.user_id){
|
|
- msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
|
|
|
|
|
|
+ msg.confirm('举报或拉黑该用户','','取消','举报拉黑').then(function(result){
|
|
if(result==true){
|
|
if(result==true){
|
|
- msg.confirm('确定拉黑?').then(function(result){
|
|
|
|
|
|
+ msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
|
|
if(result==true){
|
|
if(result==true){
|
|
- homeService.report(dream_id,interaction_id,user_id).then(function(result){
|
|
|
|
- if(result.data.status_code==0){
|
|
|
|
- msg.text('已拉黑');
|
|
|
|
- $scope.load(dream_id);
|
|
|
|
|
|
+ msg.confirm('确定拉黑?').then(function(result){
|
|
|
|
+ if(result==true){
|
|
|
|
+ homeService.report(dream_id,interaction_id,user_id).then(function(result){
|
|
|
|
+ if(result.data.status_code==0){
|
|
|
|
+ msg.text('已拉黑');
|
|
|
|
+ $scope.load(dream_id);
|
|
|
|
+ }
|
|
|
|
+ },function(error){
|
|
|
|
+
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- },function(error){
|
|
|
|
-
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- })
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- msg.confirm('确定举报?').then(function(result){
|
|
|
|
- if(result==true){
|
|
|
|
- $state.go('app.homeContact');
|
|
|
|
|
|
+ else {
|
|
|
|
+ msg.confirm('确定举报?').then(function(result){
|
|
|
|
+ if(result==true){
|
|
|
|
+ $state.go('app.homeContact');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -385,125 +390,158 @@
|
|
};
|
|
};
|
|
|
|
|
|
// 举报或拉黑(主页)
|
|
// 举报或拉黑(主页)
|
|
- $scope.reportUser = function(ev,user_id){
|
|
|
|
|
|
+ $scope.detailReport = function(ev){
|
|
ev.stopPropagation();
|
|
ev.stopPropagation();
|
|
- msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
|
|
|
|
|
|
+ $scope.toshare = false;
|
|
|
|
+ msg.confirm('确定举报?').then(function(result){
|
|
if(result==true){
|
|
if(result==true){
|
|
- msg.confirm('确定拉黑?').then(function(result){
|
|
|
|
- if(result==true){
|
|
|
|
- var res = typeof(storage.getObject('reportUser'));
|
|
|
|
- if(res != 'object'){
|
|
|
|
- var reportUser = storage.getObject('reportUser');
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- var reportUser = [];
|
|
|
|
- }
|
|
|
|
- reportUser.push($scope.dream.user_id);
|
|
|
|
- storage.setObject('reportUser',reportUser);
|
|
|
|
- msg.text('已拉黑');
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ $state.go('app.homeContact');
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- msg.confirm('确定举报?').then(function(result){
|
|
|
|
- if(result==true){
|
|
|
|
- $state.go('app.homeContact');
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ $scope.detailDelete = function(ev,user_id){
|
|
|
|
+ ev.stopPropagation();
|
|
|
|
+ $scope.toshare = false;
|
|
|
|
+ msg.confirm('确定拉黑?').then(function(result){
|
|
|
|
+ if(result==true){
|
|
|
|
+ var res = typeof(storage.getObject('reportUser'));
|
|
|
|
+ if(res != 'object'){
|
|
|
|
+ var reportUser = storage.getObject('reportUser');
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ var reportUser = [];
|
|
|
|
+ }
|
|
|
|
+ reportUser.push($scope.dream.user_id);
|
|
|
|
+ storage.setObject('reportUser',reportUser);
|
|
|
|
+ msg.text('已拉黑');
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ // $scope.reportUser = function(ev,user_id){
|
|
|
|
+ // ev.stopPropagation();
|
|
|
|
+ // msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
|
|
|
|
+ // if(result==true){
|
|
|
|
+ // msg.confirm('确定拉黑?').then(function(result){
|
|
|
|
+ // if(result==true){
|
|
|
|
+ // var res = typeof(storage.getObject('reportUser'));
|
|
|
|
+ // if(res != 'object'){
|
|
|
|
+ // var reportUser = storage.getObject('reportUser');
|
|
|
|
+ // }
|
|
|
|
+ // else{
|
|
|
|
+ // var reportUser = [];
|
|
|
|
+ // }
|
|
|
|
+ // reportUser.push($scope.dream.user_id);
|
|
|
|
+ // storage.setObject('reportUser',reportUser);
|
|
|
|
+ // msg.text('已拉黑');
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // else {
|
|
|
|
+ // msg.confirm('确定举报?').then(function(result){
|
|
|
|
+ // if(result==true){
|
|
|
|
+ // $state.go('app.homeContact');
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
|
|
- $scope.load = function (id,dream_user_id,interaction_id) {
|
|
|
|
- homeService.dreamDetail(id,dream_user_id,interaction_id).then(function (result) {
|
|
|
|
- console.log(result);
|
|
|
|
- $scope.showCode = function(codeName){
|
|
|
|
- $scope.url = codeName;
|
|
|
|
- $scope.code = true;
|
|
|
|
- };
|
|
|
|
- $scope.hideCode = function(){
|
|
|
|
- $scope.code = false;
|
|
|
|
- };
|
|
|
|
- $scope.dream = result.data.data;
|
|
|
|
- //if($scope.timer=='已结束'|| 100*$scope.dream.get_coin/$scope.dream.coin>=100){
|
|
|
|
- // $scope.codeBtn = true;
|
|
|
|
- //}
|
|
|
|
- if($scope.timer=='已结束'){
|
|
|
|
- $scope.codeBtn = true;
|
|
|
|
- }
|
|
|
|
- if($scope.dream.video){
|
|
|
|
- if($scope.dream.video.indexOf('http')<0){
|
|
|
|
- $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
|
|
|
|
- $scope.dream.video = config.imgServer+$scope.dream.video;
|
|
|
|
|
|
+ $scope.load = function (id,dream_user_id,interaction_id) {
|
|
|
|
+ homeService.dreamDetail(id,dream_user_id,interaction_id).then(function (result) {
|
|
|
|
+ console.log(result);
|
|
|
|
+ $scope.showCode = function(codeName){
|
|
|
|
+ $scope.url = codeName;
|
|
|
|
+ $scope.code = true;
|
|
|
|
+ };
|
|
|
|
+ $scope.hideCode = function(){
|
|
|
|
+ $scope.code = false;
|
|
|
|
+ };
|
|
|
|
+ $scope.dream = result.data.data;
|
|
|
|
+ //if($scope.timer=='已结束'|| 100*$scope.dream.get_coin/$scope.dream.coin>=100){
|
|
|
|
+ // $scope.codeBtn = true;
|
|
|
|
+ //}
|
|
|
|
+ if($scope.timer=='已结束'){
|
|
|
|
+ $scope.codeBtn = true;
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- //$scope.dream.vpic = $scope.dream.video+'upload/vpic/'+'.jpg';
|
|
|
|
- $scope.dream.vpic = $scope.dream.video.replace(/attachment/,'upload/vpic/')+'.jpg';
|
|
|
|
- $scope.dream.video = $scope.dream.video;
|
|
|
|
|
|
+ if($scope.dream.video){
|
|
|
|
+ if($scope.dream.video.indexOf('http')<0){
|
|
|
|
+ $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
|
|
|
|
+ $scope.dream.video = config.imgServer+$scope.dream.video;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ //$scope.dream.vpic = $scope.dream.video+'upload/vpic/'+'.jpg';
|
|
|
|
+ $scope.dream.vpic = $scope.dream.video.replace(/attachment/,'upload/vpic/')+'.jpg';
|
|
|
|
+ $scope.dream.video = $scope.dream.video;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- 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 date = new Date();
|
|
|
|
- var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
|
|
- leftTimer(inter);
|
|
|
|
- $scope.multi.a = $scope.dream.a;
|
|
|
|
- $scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
|
|
|
|
- $scope.multi.c = $scope.dream.c;
|
|
|
|
- $scope.multi.promise = $scope.dream.a;
|
|
|
|
- var newtop3user = '' ;
|
|
|
|
- angular.forEach($scope.dream.top3user, function(user) {
|
|
|
|
- newtop3user= newtop3user +user.id+","
|
|
|
|
- });
|
|
|
|
- if(top3user!=''&&newtop3user!=top3user){
|
|
|
|
- //测试动画切换
|
|
|
|
- $timeout(function() {
|
|
|
|
- $scope.sort.slide1 = 'list-grow-animation';
|
|
|
|
- $scope.sort.slide2 = 'slide-in-both-ways';
|
|
|
|
- $scope.sort.slide3 = 'bounce-animation';
|
|
|
|
- }, 50);
|
|
|
|
- }
|
|
|
|
- top3user = newtop3user;
|
|
|
|
- if($scope.dream.top3user[0])$scope.sort.first = $scope.dream.top3user[0].avatar;
|
|
|
|
- if($scope.dream.top3user[1])$scope.sort.second = $scope.dream.top3user[1].avatar;
|
|
|
|
- if($scope.dream.top3user[2])$scope.sort.third = $scope.dream.top3user[2].avatar;
|
|
|
|
- //$scope.calcmultiplier();
|
|
|
|
- msg.hide();
|
|
|
|
- }, function (error) {
|
|
|
|
- msg.hide();
|
|
|
|
- });
|
|
|
|
- };
|
|
|
|
|
|
+ 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 date = new Date();
|
|
|
|
+ var inter = (end_time.getTime() - date.getTime()) / 1000;
|
|
|
|
+ leftTimer(inter);
|
|
|
|
+ $scope.multi.a = $scope.dream.a;
|
|
|
|
+ $scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
|
|
|
|
+ $scope.multi.c = $scope.dream.c;
|
|
|
|
+ $scope.multi.promise = $scope.dream.a;
|
|
|
|
+ var newtop3user = '' ;
|
|
|
|
+ angular.forEach($scope.dream.top3user, function(user) {
|
|
|
|
+ newtop3user= newtop3user +user.id+","
|
|
|
|
+ });
|
|
|
|
+ if(top3user!=''&&newtop3user!=top3user){
|
|
|
|
+ //测试动画切换
|
|
|
|
+ $timeout(function() {
|
|
|
|
+ $scope.sort.slide1 = 'list-grow-animation';
|
|
|
|
+ $scope.sort.slide2 = 'slide-in-both-ways';
|
|
|
|
+ $scope.sort.slide3 = 'bounce-animation';
|
|
|
|
+ }, 50);
|
|
|
|
+ }
|
|
|
|
+ top3user = newtop3user;
|
|
|
|
+ if($scope.dream.top3user[0])$scope.sort.first = $scope.dream.top3user[0].avatar;
|
|
|
|
+ if($scope.dream.top3user[1])$scope.sort.second = $scope.dream.top3user[1].avatar;
|
|
|
|
+ if($scope.dream.top3user[2])$scope.sort.third = $scope.dream.top3user[2].avatar;
|
|
|
|
+ //$scope.calcmultiplier();
|
|
|
|
+ msg.hide();
|
|
|
|
+ }, function (error) {
|
|
|
|
+ msg.hide();
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
|
|
- $scope.openSupport = function () {
|
|
|
|
- msg.alert("支持乘数","为了支持您的梦想者,乘数越高,得到的梦想分越高,抓紧机会哟~喵!(梦想币x支持乘数=梦想分)");
|
|
|
|
- };
|
|
|
|
- $scope.multi = {
|
|
|
|
- a: '',
|
|
|
|
- b: '',
|
|
|
|
- c: '',
|
|
|
|
- result: 1,
|
|
|
|
- promise:null
|
|
|
|
- };
|
|
|
|
|
|
+ $scope.openSupport = function () {
|
|
|
|
+ msg.alert("支持乘数","为了支持您的梦想者,乘数越高,得到的梦想分越高,抓紧机会哟~喵!(梦想币x支持乘数=梦想分)");
|
|
|
|
+ };
|
|
|
|
+ $scope.multi = {
|
|
|
|
+ a: '',
|
|
|
|
+ b: '',
|
|
|
|
+ c: '',
|
|
|
|
+ result: 1,
|
|
|
|
+ promise:null
|
|
|
|
+ };
|
|
|
|
|
|
- $scope.tosupport = false;
|
|
|
|
- $scope.support = function ($event) {
|
|
|
|
- $event.stopPropagation();
|
|
|
|
- $scope.tosupport = true;
|
|
|
|
- $scope.vm.coin = 0;
|
|
|
|
- $scope.index = 0;
|
|
|
|
- };
|
|
|
|
- $scope.cancelSupport = function () {
|
|
|
|
$scope.tosupport = false;
|
|
$scope.tosupport = false;
|
|
- $scope.toshare = false;
|
|
|
|
- $scope.input.show = false;
|
|
|
|
|
|
+ $scope.support = function ($event) {
|
|
|
|
+ $event.stopPropagation();
|
|
|
|
+ $scope.tosupport = true;
|
|
|
|
+ $scope.vm.coin = 0;
|
|
|
|
+ $scope.index = 0;
|
|
|
|
+ };
|
|
|
|
+ $scope.cancelSupport = function () {
|
|
|
|
+ $scope.tosupport = false;
|
|
|
|
+ $scope.toshare = false;
|
|
|
|
+ $scope.input.show = false;
|
|
|
|
|
|
- };
|
|
|
|
|
|
+ };
|
|
$scope.toshare = false;
|
|
$scope.toshare = false;
|
|
$scope.toRecharge = function(){
|
|
$scope.toRecharge = function(){
|
|
$state.go("app.recharge")
|
|
$state.go("app.recharge")
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ $scope.cacheShare = function(ev){
|
|
|
|
+ ev.stopPropagation();
|
|
|
|
+ debugger;
|
|
|
|
+ $scope.toshare = false;
|
|
|
|
+ };
|
|
|
|
+
|
|
$scope.share = function (type,$event) {
|
|
$scope.share = function (type,$event) {
|
|
$scope.toshare = true;
|
|
$scope.toshare = true;
|
|
if (type==0) {
|
|
if (type==0) {
|
|
@@ -520,14 +558,15 @@
|
|
},
|
|
},
|
|
scene: Wechat.Scene.SESSION
|
|
scene: Wechat.Scene.SESSION
|
|
}, function () {
|
|
}, function () {
|
|
- //msg.alert('分享','分享成功');
|
|
|
|
|
|
+ $scope.toshare = false;
|
|
msg.success('分享成功');
|
|
msg.success('分享成功');
|
|
}, function (reason) {
|
|
}, function (reason) {
|
|
- //msg.alert('分享','分享失败');
|
|
|
|
|
|
+ $scope.toshare = false;
|
|
msg.error('分享失败');
|
|
msg.error('分享失败');
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if(type==1){
|
|
if(type==1){
|
|
|
|
+ // 分享到朋友圈
|
|
Wechat.share({
|
|
Wechat.share({
|
|
message: {
|
|
message: {
|
|
title: $scope.dream.name,
|
|
title: $scope.dream.name,
|
|
@@ -540,8 +579,10 @@
|
|
},
|
|
},
|
|
scene: Wechat.Scene.TIMELINE
|
|
scene: Wechat.Scene.TIMELINE
|
|
}, function () {
|
|
}, function () {
|
|
|
|
+ $scope.toshare = false;
|
|
msg.success('分享成功');
|
|
msg.success('分享成功');
|
|
}, function (reason) {
|
|
}, function (reason) {
|
|
|
|
+ $scope.toshare = false;
|
|
msg.error('分享失败');
|
|
msg.error('分享失败');
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -553,6 +594,7 @@
|
|
$scope.changeType = function (type) {
|
|
$scope.changeType = function (type) {
|
|
$ionicScrollDelegate.scrollTop(true);
|
|
$ionicScrollDelegate.scrollTop(true);
|
|
$scope.type = type;
|
|
$scope.type = type;
|
|
|
|
+ $scope.toshare = false;
|
|
};
|
|
};
|
|
$scope.index = 0;
|
|
$scope.index = 0;
|
|
|
|
|
|
@@ -625,7 +667,9 @@
|
|
});
|
|
});
|
|
$interval.cancel($scope.multi.promise);
|
|
$interval.cancel($scope.multi.promise);
|
|
msg.text("发送成功",1000);
|
|
msg.text("发送成功",1000);
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
+ $scope.collectionDream(1);
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -680,6 +724,7 @@
|
|
$event.stopPropagation();
|
|
$event.stopPropagation();
|
|
$scope.input.focus = true;
|
|
$scope.input.focus = true;
|
|
$scope.input.show = true;
|
|
$scope.input.show = true;
|
|
|
|
+ $scope.toshare = false;
|
|
angular.forEach($scope.dream.interactions, function (item) {
|
|
angular.forEach($scope.dream.interactions, function (item) {
|
|
item.show = false;
|
|
item.show = false;
|
|
});
|
|
});
|
|
@@ -692,6 +737,7 @@
|
|
};
|
|
};
|
|
$scope.replayOther = function ($event, name, to_userid, index,currentindex) {
|
|
$scope.replayOther = function ($event, name, to_userid, index,currentindex) {
|
|
$event.stopPropagation();
|
|
$event.stopPropagation();
|
|
|
|
+ $scope.toshare = false;
|
|
if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
|
|
if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
|
|
$scope.input.focus = true;
|
|
$scope.input.focus = true;
|
|
$scope.input.show = true;
|
|
$scope.input.show = true;
|
|
@@ -1055,7 +1101,6 @@
|
|
|
|
|
|
};
|
|
};
|
|
$scope.toshare = false;
|
|
$scope.toshare = false;
|
|
- $scope.toshare = false;
|
|
|
|
$scope.toRecharge = function(){
|
|
$scope.toRecharge = function(){
|
|
$state.go("app.recharge")
|
|
$state.go("app.recharge")
|
|
};
|
|
};
|