YanaDH 7 anni fa
parent
commit
0e9363d27e

+ 1 - 1
miaomiao/www/css/style.css

xqd
@@ -566,7 +566,7 @@ a:visited,a:link{
 }
     .hdcontent .slt {
         width:31%;
-        /*max-height:95px;*/
+        max-height:95px;
         float:left;
         /*border: 1px solid #B5B5B5;*/
         margin:5px 5px 5px 0;

+ 163 - 118
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -357,26 +357,31 @@
             // 举报或拉黑(互动页面)
             $scope.report = function(ev,dream_id,interaction_id,user_id){
                 ev.stopPropagation();
+                $scope.toshare  = false;
                 if($scope.user.id != $scope.dream.user_id){
-                    msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
+                    msg.confirm('举报或拉黑该用户','','取消','举报拉黑').then(function(result){
                         if(result==true){
-                            msg.confirm('确定拉黑?').then(function(result){
+                            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);
+                                    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();
-                msg.confirm('举报或拉黑该用户','','举报','拉黑').then(function(result){
+                $scope.toshare  = false;
+                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('已拉黑');
-                            }
-                        })
+                        $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.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.toRecharge = function(){
                 $state.go("app.recharge")
             };
 
+            $scope.cacheShare = function(ev){
+                ev.stopPropagation();
+                debugger;
+                $scope.toshare = false;
+            };
+
             $scope.share = function (type,$event) {
                 $scope.toshare = true;
                 if (type==0) {
@@ -520,14 +558,15 @@
                         },
                         scene: Wechat.Scene.SESSION
                     }, function () {
-                        //msg.alert('分享','分享成功');
+                        $scope.toshare = false;
                         msg.success('分享成功');
                     }, function (reason) {
-                        //msg.alert('分享','分享失败');
+                        $scope.toshare = false;
                         msg.error('分享失败');
                     });
                 }
                 if(type==1){
+                    // 分享到朋友圈
                     Wechat.share({
                         message: {
                             title: $scope.dream.name,
@@ -540,8 +579,10 @@
                         },
                         scene: Wechat.Scene.TIMELINE
                     }, function () {
+                        $scope.toshare = false;
                         msg.success('分享成功');
                     }, function (reason) {
+                        $scope.toshare = false;
                         msg.error('分享失败');
                     });
                 }
@@ -553,6 +594,7 @@
         $scope.changeType = function (type) {
             $ionicScrollDelegate.scrollTop(true);
             $scope.type = type;
+            $scope.toshare = false;
         };
         $scope.index = 0;
 
@@ -625,7 +667,9 @@
                 });
                 $interval.cancel($scope.multi.promise);
                 msg.text("发送成功",1000);
+
             });
+            $scope.collectionDream(1);
 
         };
 
@@ -680,6 +724,7 @@
             $event.stopPropagation();
             $scope.input.focus = true;
             $scope.input.show = true;
+            $scope.toshare = false;
             angular.forEach($scope.dream.interactions, function (item) {
                 item.show = false;
             });
@@ -692,6 +737,7 @@
         };
         $scope.replayOther = function ($event, name, to_userid, index,currentindex) {
             $event.stopPropagation();
+            $scope.toshare = false;
             if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
                 $scope.input.focus = true;
                 $scope.input.show = true;
@@ -1055,7 +1101,6 @@
 
             };
             $scope.toshare = false;
-            $scope.toshare = false;
             $scope.toRecharge = function(){
                 $state.go("app.recharge")
             };

+ 3 - 5
miaomiao/www/templates/home/dream-detail.html

xqd xqd xqd
@@ -64,7 +64,6 @@
                     <div class="col dreamButton">
                         <button ng-click="openSupport()" class="button button-outline button-calm" style="border: 1px solid #00C3DA">
                             支持乘数<br>
-                            <!--×{{multi.result}}-->
                             ×{{dream.number}}
                         </button>
                     </div>
@@ -85,15 +84,15 @@
                                 </div>
                             </ion-slide-page>
                             <ion-slide-page ng-repeat="img in dream.imgs">
-                                    <div class="box banner" style="width: 100%"><img ng-src="{{img.pic}}" style="width: 100%;" /></div>
+                                <div class="box banner" style="width: 100%"><img ng-src="{{img.pic}}" style="width: 100%;" /></div>
                             </ion-slide-page>
                         </ion-slides>
                     </div>
                     <div class="item" style="padding: 0 16px;">
                         <p style="font-size: 17px; color: #000;">{{dream.name}}</p>
                         <p style="text-align: right;">
-                            <span style="padding:2px;font-size: 10px;border:1px solid #b2b2b2;color: #b2b2b2;border-radius: 12px;" ng-if="user.id != dream.user_id" ng-click="reportUser($event)">举报或拉黑</span> 
-                            <!-- <span ng-click="reportUser($event)">{{dream.user_id}}举报或拉黑</span>  -->
+                            <span style="padding:2px 5px;font-size: 10px;border:1px solid #b2b2b2;color: #b2b2b2;border-radius: 12px;" ng-if="user.id != dream.user_id" ng-click="detailReport($event)">举报</span> 
+                            <span style="padding:2px 5px;font-size: 10px;border:1px solid #b2b2b2;color: #b2b2b2;border-radius: 12px;" ng-if="user.id != dream.user_id" ng-click="detailDelete($event)">拉黑</span> 
                         </p>
                         <p style="font-size: 13px;" ng-style="aboutStyle" ng-bind-html="dream.about | trustHtml">
                         </p>
@@ -221,7 +220,6 @@
                                     </div>
                                 </div>
                             </div>
-                            <!--<p ng-click="replay($event,dream.user.nickname,$index)" style="margin: 10px 0 0 50px; color: #00C3DA">评论</p>-->
                             <div class="item item-input" ng-if="input.show&&interaction.show">
                                 <textarea name="comment" focus-me="input.focus" placeholder="{{input.placeholder}}" ng-model="vm.comment" style="padding: 0 20px;"></textarea>
                                 <a class="button button-calm" style="padding: 0; min-width: 54px;" ng-click="submitComment($index,to_userid)">

+ 1 - 1
miaomiao/www/templates/my/care.html

xqd
@@ -36,7 +36,7 @@
                 <textarea autofocus rows="5" style="width:100%; padding: 5px" ng-model="vm.content" placeholder="请输入私信内容"></textarea>
                 <div class="padding">
                     <button class="button button-full button-calm" ng-click="closeModal()">
-                        回复
+                        发送
                     </button>
                 </div>
             </ion-content>

+ 1 - 1
miaomiao/www/templates/my/personalLetter.html

xqd
@@ -5,7 +5,7 @@
         </ion-refresher>
         <div class="list list-user-set" ng-repeat="item in items" style="color: #737373">
             <a class="item" style="border-bottom: 1px solid #EAEAEA">
-                <em style="color: #000">{{item.message}}</em>
+                <p style="white-space: normal">{{item.message}}</p>
             </a>
         </div>
     </ion-content>

+ 4 - 4
server/resources/views/admin/share1.blade.php

xqd xqd
@@ -277,7 +277,7 @@
 </head>
 <body>
 <div style="height: 50px">
-    <a href="      " style="height: 50px; background: #00c3da; position: fixed; z-index: 99; width: 100%">
+    <a href="https://fir.im/jt4h" style="height: 50px; background: #00c3da; position: fixed; z-index: 99; width: 100%">
         <div style="float: left;color: #fff;line-height: 50px;padding-left: 5px">支持({{empty($dream->user) ? '' : $dream->user->nickname}})的梦想!现在就下载瞄喵</div>
         <div style="float: right;padding: 5px">
             <img style="width: 40px;height: 40px;" src="http://firicon.fir.im/396004d5e7b572efbefdfee976338331a457282b" alt="">
@@ -295,13 +295,13 @@
                 <div class="swiper-wrapper">
                     @if($dream['video'])
                         <div class="swiper-slide" style="width: 320px;height: 200px;">
-                            {{--poster="{{$dream->poster}}"--}}
-                            <video poster="{{env('APP_URL').'/upload/vpic/'.$dream->dream_md5.'.jpg'}}"  style="width: 100%;height:200px;" src="{{(mb_substr( $dream['video'], 0, 4 )=='http') ? $dream['video']:env('APP_URL').'/attachment/'.$dream['video']}}" controls >
+                            {{--poster="{{$dream->poster}}"--}}                            
+                            <video poster="{{env('APP_URL').'/upload/vpic/'.$dream->dream_md5.'.jpg'}}"  style="width: 100%;height:350px;" src="{{(mb_substr( $dream['video'], 0, 4 )=='http') ? $dream['video']:env('APP_URL').'/attachment/'.$dream['video']}}" controls >
                             </video>
                         </div>
                     @endif
                     @foreach($dream->imgs as $banner)
-                        <div class="swiper-slide" style="width: 320px;height: 200px;"><img src="{{$banner->pic}}" style="width: 100%;height: 100%;" alt=""></div>
+                        <div class="swiper-slide" style="width: 100%;"><img src="{{$banner->pic}}" style="width: 100%;height: 100%;" alt=""></div>
                     @endforeach
                 </div>
             </div>