Mike 7 роки тому
батько
коміт
6f8cf70195

+ 10 - 2
miaomiao/www/js/controllers/account.js

xqd xqd
@@ -1,6 +1,6 @@
 (function (app) {
-    app.controller('wechatLoginCtrl', ["$scope","userService","$ionicNavBarDelegate","$ionicModal", "storage", "$state", "msg", "$http", "util","common","config",
-    function ($scope, userService, $ionicNavBarDelegate,$ionicModal, storage, $state, msg, $http, util, common, config) {
+    app.controller('wechatLoginCtrl', ["$scope","userService","$ionicHistory","$ionicNavBarDelegate","$ionicModal", "storage", "$state", "msg", "$http", "util","common","config",
+    function ($scope, userService,$ionicHistory,$ionicNavBarDelegate,$ionicModal, storage, $state, msg, $http, util, common, config) {
             //$ionicNavBarDelegate.showBackButton(false);
             $scope.addvideo = function () {
                 common.chooseVideo().then(function (file) {
@@ -89,6 +89,14 @@
                 
 
             };
+        userService.isTest().then(function(res){
+            if(res.data.data){
+              $state.go('login');
+            }else{
+              $state.go("loginAccount",{wechat:'orrk51inhmfmQRXA8VvGEQfow3Es'});
+        $ionicHistory.clearHistory();
+            }
+          })
     }]);
     app.controller('loginCtrl', ["$scope", "userService","$stateParams","$ionicNavBarDelegate", "$ionicModal","storage", "$state", "msg", "$http", "util","$timeout",
         function ($scope, userService,$stateParams,$ionicNavBarDelegate,$ionicModal, storage, $state, msg, $http, util, $timeout) {

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

xqd xqd
@@ -724,12 +724,17 @@
             focus: false,
             show:false
         };
+        var getScrollPosition = {left: 0, top: 0, zoom: 1};
         $scope.showmore = function (index) {
             if ($scope.dream.interactions[index].showmore) {
+                $ionicScrollDelegate.scrollTo(getScrollPosition.left, getScrollPosition.top);
                 $scope.dream.interactions[index].showmore = false;
             } else {
+                getScrollPosition = $ionicScrollDelegate.getScrollPosition();
+                console.log(getScrollPosition);
                 $scope.dream.interactions[index].showmore = true;
             }
+            $ionicScrollDelegate.resize();
         };
         $scope.replay = function ($event, name, to_userid, index) {
             $event.stopPropagation();
@@ -749,6 +754,8 @@
         $scope.replayOther = function ($event, name, to_userid, index,currentindex) {
             $event.stopPropagation();
             $scope.toshare = false;
+            console.log(index);
+            console.log(currentindex);
             if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
                 $scope.input.focus = true;
                 $scope.input.show = true;

+ 1 - 1
miaomiao/www/templates/account/loginAccount.html

xqd
@@ -1,4 +1,4 @@
-<ion-view view-title="瞄喵">
+<ion-view view-title="瞄喵" hide-back-button="true">
     <ion-content style="padding: 10%;overflow: hidden" overflow-scroll="true">
         <div  style="padding:0 0 30px 0">
             <img ng-src="img/icon_login.svg"  style="margin:0 auto;display:block;width:100px;border-radius:50px"/>

+ 2 - 2
miaomiao/www/templates/home/dream-detail.html

xqd xqd
@@ -195,7 +195,7 @@
                                 </div>
                             </div>
                             <div class="list">
-                                <div class="item" ng-repeat="c in interaction.comments" ng-if="interaction.showmore||$index<4">
+                                <div class="item" ng-repeat="c in interaction.comments" ng-show="interaction.showmore||$index<4">
                                     <div class="row">
                                         <div class="col-20" style="text-align: right">
                                             <img ng-click="report($event,dream.id,interaction.id,c.user_id)" class="head" ng-src="{{c.user_avatar | avator}}" />
@@ -203,7 +203,7 @@
                                         <div class="col-80" style="border-bottom: 1px solid #E6E6E6">
                                             <span style="margin-top: 10px; display: inline-block;font-size: 12px">{{c.user_nickname}}</span>
                                             <span style="font-size: 12px" class="utitle kz">{{c.updated_at}}</span>
-                                            <div ng-click="replayOther($event,c.user_nickname,c.user_id,$parent.$parent.$index,$index)" style="text-align: right; padding-right: 10px;"><span style="color: #00C3DA; padding: 1px 12px; border-radius: 10px; font-size: 12px;">回复</span></div>
+                                            <div ng-click="replayOther($event,c.user_nickname,c.user_id,$parent.$index,$index)" style="text-align: right; padding-right: 10px;"><span style="color: #00C3DA; padding: 1px 12px; border-radius: 10px; font-size: 12px;">回复</span></div>
                                             <p style="white-space:normal; color: #666666;font-size: 12px">
                                                 <span ng-if="c.to_user_nickname&&c.to_user_nickname!=''&&c.to_user_nickname!=dream.user.nickname" style="font-size: 12px">
                                                     回复<span style="color:#333333;font-size: 12px"> {{c.to_user_nickname}}</span> :