Ben 7 rokov pred
rodič
commit
a30e6d6621

BIN
.vs/miaomiao/v14/.suo


+ 4 - 5
miaomiao/www/js/config/config.js

xqd
@@ -3,10 +3,9 @@
     app.constant("config", {
         // server: 'http://q8.9026.com/',
         // imgServer: 'http://q8.9026.com/attachment/'
-        server: 'http://localhost:8092/',
-        imgServer: 'http://localhost:8092/attachment/'
-
-        // server: 'http://miao.beiyuesi.com/',
-        // imgServer: 'http://miao.beiyuesi.com/attachment/'
+       // server: 'http://localhost:8092/',
+      //  imgServer: 'http://localhost:8092/attachment/',
+         server: 'http://miao.beiyuesi.com/',
+          imgServer: 'http://miao.beiyuesi.com/attachment/'
     });
 })(angular.module('app'));

+ 37 - 36
miaomiao/www/js/controllers/my.js

xqd xqd
@@ -310,7 +310,7 @@
         }]);
     app.controller('messageReplyCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg","storage"
         , function ($scope,$ionicTabsDelegate, $state,myService, msg, storage) {
-
+            
         }]);
     app.controller('personalLetterCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg","storage"
         , function ($scope,$ionicTabsDelegate, $state,myService, msg, storage) {
@@ -690,47 +690,48 @@
 
     app.controller('messageReplyCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg", "$ionicModal"
        , function ($scope,$ionicTabsDelegate, $state, myService, msg, $ionicModal) {
-            $scope.$on('$ionicView.beforeEnter', function () {
-                myService.replyMy().then(function(result){
-                    $scope.comments = result.data.data;
-                },function(error){
-                });
+           $scope.$on('$ionicView.beforeEnter', function () {
+               $scope.load();
+           });
+           $scope.load = function () {
+               myService.replyMy().then(function (result) {
+                   $scope.comments = result.data.data;
+               }, function (error) {
+               });
+           }
+           //我的回复
+           $scope.vm = {
+               content: "" 
+           };
+            $ionicModal.fromTemplateUrl('my-modal.html', {
+                scope: $scope,
+                animation: 'slide-in-up'
+            }).then(function (modal) {
+                $scope.modal = modal;
             });
-            //$ionicModal.fromTemplateUrl('my-modal.html', {
-            //    scope: $scope,
-            //    animation: 'slide-in-up'
-            //}).then(function (modal) {
-            //    $scope.modal = modal;
-            //});
-            //$scope.openModal = function () {
-            //    $scope.modal.show();
-            //};
-            //$scope.closeModal = function () {
-            //    $scope.modal.hide();
-            //
-            //};
-
-            $scope.goDetail =  function (){
-                $state.go('app.home_dreamdetail',{id:$scope.comments.dream_id,type:2});
-            };
-
-            //我的回复
-            $scope.vm={
-                content:"",
-                comment_id:""
-            };
-            $scope.myReplay = function(){
+             
+            $scope.closeModal = function () {
                 var data = {
-                    content:$scope.vm.content,
-                    comment_id:$scope.vm.id
+                    content: $scope.vm.content,
+                    comment_id: $scope.item.id,
+                    interaction_id: $scope.item.interaction_id
                 };
-                myService.myReplay(data).then(function(result){
-
-                },function(error){
-
+                myService.myReplay(data).then(function (result) {
+                    msg.success('回复成功');
+                    $scope.load();
+                }, function (error) {
+                    msg.error('回复失败');
                 });
+                $scope.vm.content = '';
+                $scope.item = null;
                 $scope.modal.hide();
+            };
+
+            $scope.reply = function (item) {
+                $scope.item = item;
+                $scope.modal.show();
             }
+            
        }]);
    
 })(angular.module('app.controllers'));

+ 8 - 43
miaomiao/www/templates/my/my-message-reply.html

xqd
@@ -1,60 +1,25 @@
 <ion-view view-title="回复我的">
     <ion-content>
         <div class="list list-user-set" ng-click="goDetail()" ng-repeat="item in comments" style="color: #737373; margin-bottom: 0">
-            <a class="item" style="border-bottom: 1px solid #EAEAEA">
+            <a class="item" ng-click="reply(item)" style="border-bottom: 1px solid #EAEAEA">
                 <em style="color: #000">{{item.user_nickname}} </em> 回复你:
                 <p>{{item.content}}</p>
             </a>
         </div>
     </ion-content>
-    <!--<ion-content>
-        <div class="list">
-            <div class="item reply-item">
-                <div class="row">
-                    <div class="col">
-                        <img  class="reply-head" src="../../img/demo/head1.jpg" />
-                        <div class="reply-info">
-                            <div>林更新</div>
-                            <div>2016-08-08 11:00</div>
-                        </div>
-                    </div>
-                    <div class="col reply-hf">
-                        <button class="button icon-left ion-ios-redo-outline" ng-click="openModal()">回复</button>
-                    </div>
-                </div>
-                <span class="reply-line">回复<span>@韩庚</span>:你确定是去那里吗?</span>
-                <div class="item item-thumbnail-left reply-content">
-                    &lt;!&ndash;<img ng-src="img/demo/head7.jpg" />&ndash;&gt;
-                    <img ng-src="{{item.dream_pic}}">
-                    <h2>{{item.dream_name}}</h2>
-                    <p>在斯德哥尔摩,那个只有黑白和灰色的咖啡馆里面坐下,喝一杯地道的北欧咖啡。享受难得的北欧时光!</p>
-                </div>
-                <div class="reply-bar">
-                    <div style="width: 30%;">
-                    </div>
-                </div>
-                <div class="reply-sx"><span class="calm">30%</span> 目前实现</div>
-            </div>
-        </div>
-    </ion-content>
     <script id="my-modal.html" type="text/ng-template">
         <ion-modal-view>
             <ion-header-bar class="bar-calm">
-                <button class="button button-clear icon ion-ios-arrow-back" ng-click="closeModal()">返回</button>
-                <h1 class="title">我的回复</h1>
-                <button class="button button-clear" ng-click="myReplay()">确定</button>
+                <h1 class="title">消息回复</h1>
             </ion-header-bar>
             <ion-content>
-                <div class="addmodal">
-                    <textarea placeholder="回复内容" ng-model="vm.content"></textarea>
-                </div>
-                <div class="addfoot">
-                    <img ng-src="img/图片.png" />
-                    <img ng-src="img/相机.png" />
-                    <img ng-src="img/表情.png" />
+                <textarea rows="5" style="width:100%" ng-model="vm.content" placeholder="请输入回复内容"></textarea>
+                <div class="padding">
+                    <button class="button button-full button-calm" ng-click="closeModal()">
+                        回复
+                    </button>
                 </div>
             </ion-content>
-
         </ion-modal-view>
-    </script>-->
+    </script>
 </ion-view>