YanaDH hace 8 años
padre
commit
2d5196c20c

+ 2 - 1
miaomiao/www/css/ionic.app.css

xqd
@@ -5921,7 +5921,8 @@ ion-tabs.tabs-color-active-dark .tab-item {
 .item-content p {
   overflow: hidden;
   text-overflow: ellipsis;
-  white-space: nowrap; }
+  white-space: nowrap;
+}
 
 a.item {
   color: inherit;

+ 5 - 5
miaomiao/www/js/controllers/add.js

xqd xqd xqd xqd
@@ -24,7 +24,7 @@
                 isOK: false,
                 path: '',
                 server:''
-            }
+            };
             
             $scope.addpict = function () {
                 common.chooseImage().then(function (img) {
@@ -38,7 +38,7 @@
                 }, function (error) {
                     msg.error('图片选择失败');
                 });
-            }
+            };
             $scope.addvideo = function () {
                 var options = { limit: 1, duration:20};
                 navigator.device.capture.captureVideo(function (videos) {
@@ -54,13 +54,13 @@
                 }, function (error) {
                     msg.error('视频上传失败');
                 }, options);
-            }
+            };
             $scope.deletefile = function (file) {
                 var index = $scope.imgs.indexOf(file);
                 $scope.imgs.splice(index, 1);
                 common.deletefile(file).then(function () {
                 })
-            }
+            };
             $scope.add = function () {
                 var data = {
                     pics: $scope.imgs,
@@ -78,7 +78,7 @@
                     msg.hide();
                     msg.error(error.data.message);
                 });
-            }
+            };
             $scope.$on('$ionicView.beforeEnter', function (viewResult) {
                 $ionicTabsDelegate.showBar(false);
                 $ionicNavBarDelegate.showBackButton(true);

+ 4 - 0
miaomiao/www/js/controllers/home.js

xqd
@@ -93,6 +93,10 @@
                 },function(erro){
 
                 })
+            };
+            $scope.show = function(){
+                var obj = document.getElementById("box");
+                obj.style = "white-space: normal;";
             }
         }]);
     app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"

+ 25 - 8
miaomiao/www/js/controllers/my.js

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -26,10 +26,12 @@
                 console.log("attachment upload error:"+JSON.stringify(error));
 
             })
-        }
+        };
             $scope.toprofile = function () {
                 $state.go('app.my_profile');
             };
+
+            //我的设置
         $scope.setting = function(){
             myService.setting().then(function(result){
 
@@ -37,6 +39,8 @@
 
             });
         };
+
+            //我的收藏
             $scope.collect = function(){
                 myService.collect().then(function(result){
 
@@ -44,13 +48,17 @@
 
                 });
             };
+
+            //我的梦想
             $scope.myDream = function(){
                 myService.myDream().then(function(result){
 
                 },function(error){
 
                 });
-            }
+            };
+
+            //修改个人信息
             $scope.myMaterial = function(){
                 myService.myMaterial().then(function(result){
 
@@ -76,8 +84,10 @@
             $scope.$on('$ionicView.beforeEnter', function () {
 
             });
+
+            //保存个人信息
             $scope.vm={
-                //pic:"",
+                pic:"",
                 sex:"",
                 signture:"",
                 emotion:"",
@@ -87,12 +97,13 @@
             $scope.saveMaterial = function(){
                 var data = {
                     pic:['http://img.taopic.com/uploads/allimg/130103/240435-1301030P33161.jpg'],
+                    //pic:$scope.vm.user.avatar,
                     sex:$scope.vm.sex,
                     signture:$scope.vm.signture,
                     emotion:$scope.vm.emotion,
                     job:$scope.vm.job,
                     tall:$scope.vm.tall
-                }
+                };
                 myService.saveMaterial(data).then(function(result){
 
                 },function(error){
@@ -105,6 +116,7 @@
          $scope.$on('$ionicView.beforeEnter', function () {
 
          });
+            //退出登陆
             $scope.logout = function(){
                 storage.remove("token");
                 storage.remove("user");
@@ -117,6 +129,7 @@
       $scope.$on('$ionicView.beforeEnter', function () {
 
       });
+            //充值
             $scope.recharge = function(){
                 myService.recharge().then(function(result){
 
@@ -131,6 +144,7 @@
       $scope.$on('$ionicView.beforeEnter', function () {
 
       });
+            //系统消息
             $scope.systemInfo = function(){
                 myService.systemInfo().then(function(result){
 
@@ -138,9 +152,10 @@
 
                 });
             };
+            //回复我的
             $scope.replyMy = function(){
                 myService.replyMy().then(function(result){
-
+                    //$scope.comments = result;
                 },function(error){
 
                 });
@@ -187,19 +202,21 @@
 
            });
 
+            //我的回复
             $scope.vm={
-                content:""
+                content:"",
+                comment_id:""
             };
             $scope.myReplay = function(){
                 var data = {
                     content:$scope.vm.content,
-                    comment_id:'11'
+                    comment_id:$scope.vm.id
                 };
                 myService.myReplay(data).then(function(result){
 
                 },function(error){
 
-                })
+                });
                 $scope.modal.hide();
             }
        }]);

+ 0 - 7
miaomiao/www/js/services/myservice.js

xqd
@@ -8,16 +8,9 @@
                     data: { password: password }
                 })
             },
-<<<<<<< HEAD
             add:function (data){
                 return $http({
                     url:config.server + 'api/my/add_dream',
-=======
-           
-            reset:function(data){
-                return $http({
-                    url:config.server + "api/auth/avatar",
->>>>>>> 257ac8c26b1de045fb0ce6844de33ff94a5763f8
                     method:"post",
                     data:data
                 })

+ 0 - 5
miaomiao/www/templates/add/index.html

xqd
@@ -17,12 +17,7 @@
             </div>
             <div class="item">我的梦想介绍</div>
             <div class="item itemjs">
-                <!--<a class="button button-outline button-block button-calm button-icon" ng-model="vm.about" ng-click="openModal()">
-                    <i class="icon ion-plus"></i>
-                    添加梦想介绍
-                </a>-->
                 <textarea rows="4" cols="50" placeholder="添加梦想介绍" ng-model="vm.about" style="border: 1px solid #FF4B82;padding: 10px;width: 98%;"></textarea>
-
             </div>
             <div class="item">上传图片和视频,让别人更好的了解你</div>
             <div class="item itemjs">

+ 31 - 2
miaomiao/www/templates/home/user-detail.html

xqd xqd
@@ -32,7 +32,12 @@
             <div class="list detail-list">
                 <div class="item">
                     <h2>斯德哥尔摩奇遇</h2>
-                    <p>在斯德哥尔摩,那个只有黑白和灰色的咖啡馆里面坐下,喝一杯地道的北欧咖啡。享受难得的北欧时光!</p>
+                    <p id="box">
+                        在斯德哥尔摩,那个只有黑白和灰色的咖啡馆里面坐下,喝一杯地道的北欧咖啡。享受难得的北欧时光!在斯德哥尔摩,那个只有黑白和灰色的咖啡馆里面坐下,喝一杯地道的北欧咖啡。享受难得的北欧时光!
+                    </p>
+                    <div style="text-align: center">
+                        <i class="icon ion-chevron-down" style="color: #FE4B82" ng-click="show()"></i>
+                    </div>
                 </div>
                 <div class="item row detail-item2">
                     <div class="col" style="text-align:left">
@@ -262,5 +267,29 @@
             <a class="button button-calm" style="height:100%;border-radius:0;width:80px;font-size:1.2em " ng-click="supportDream()">发送</a>
         </div>
     </div>
-  
+    <script>
+        function show(){
+            alert("lll");
+            var box = document.getElementById("box");
+            var text = box.innerHTML;
+            var newBox = document.createElement("div");
+            var btn = document.createElement("a");
+            newBox.innerHTML = text.substring(0,200);
+            btn.innerHTML = text.length > 200 ? "...显示全部" : "";
+            btn.href = "###";
+            btn.onclick = function(){
+                if (btn.innerHTML == "...显示全部"){
+                    btn.innerHTML = "收起";
+                    newBox.innerHTML = text;
+                }else{
+                    btn.innerHTML = "...显示全部";
+                    newBox.innerHTML = text.substring(0,200);
+                }
+            }
+            box.innerHTML = "";
+            box.appendChild(newBox);
+            box.appendChild(btn);
+        }
+        show();
+    </script>
 </ion-view>

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

xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <ion-view view-title="回复我的">
     <ion-content>
         <div class="list">
-            <div class="item reply-item">
+            <div class="item reply-item" ng-repeat="item in comments">
                 <div class="row">
                     <div class="col">
                         <img  class="reply-head" src="../../img/demo/head1.jpg" />
@@ -14,10 +14,11 @@
                         <button class="button icon-left ion-ios-redo-outline" ng-click="openModal()">回复</button>
                     </div>
                 </div>
-                <span class="reply-line">回复<span>@韩庚</span>:你确定是去那里吗? </span>
+                <span class="reply-line">回复<span>@韩庚</span>:你确定是去那里吗?</span>
                 <div class="item item-thumbnail-left reply-content">
-                    <img ng-src="img/demo/head7.jpg" />
-                    <h2>有人能带我去瑞典吗?</h2>
+                    <!--<img ng-src="img/demo/head7.jpg" />-->
+                    <img ng-src="{{item.dream_pic}}">
+                    <h2>{{item.dream_name}}</h2>
                     <p>在斯德哥尔摩,那个只有黑白和灰色的咖啡馆里面坐下,喝一杯地道的北欧咖啡。享受难得的北欧时光!</p>
                 </div>
                 <div class="reply-bar">
@@ -26,7 +27,8 @@
                 </div> 
                 <div class="reply-sx"><span class="calm">30%</span> 目前实现</div>
             </div>
-            <div class="item reply-item">
+
+            <!--<div class="item reply-item">
                 <div class="row">
                     <div class="col">
                         <img class="reply-head" src="../../img/demo/head1.jpg" />
@@ -75,7 +77,7 @@
                     </div>
                 </div>
                 <div class="reply-sx"><span class="calm">30%</span> 目前实现</div>
-            </div>
+            </div>-->
         </div>
     </ion-content>
     <script id="my-modal.html" type="text/ng-template">

+ 7 - 5
miaomiao/www/templates/my/my-profile.html

xqd xqd xqd
@@ -2,7 +2,8 @@
     <ion-content>
      <div class="list">
          <a class="item item-avatar-right" ng-click="setAvator()">
-             <img  src="img/demo/head5.jpg"  ng-model="vm.pic"/>
+             <img  src="img/demo/head5.jpg"/>
+             <!--<img ng-src="{{ vm.user.avatar | avator }}">-->
              <h2>头像</h2>
              <p style="font-size:12px">点击上传</p>
          </a>
@@ -18,8 +19,8 @@
                  性别
              </span>
              <select name="sex" ng-model="vm.sex">
-                 <option>男</option>
-                 <option>女</option>
+                 <option value="0">男</option>
+                 <option value="1">女</option>
              </select>
          </label>
          <label class="item item-input ">
@@ -31,8 +32,9 @@
                  情感状态
              </span>
              <select name="emotion" ng-model="vm.emotion">
-                 <option>未婚</option>
-                 <option>已婚</option>
+                 <option value="1">未婚</option>
+                 <option value="2">已婚</option>
+                 <option value="3">离异</option>
              </select>
          </label>