Ben преди 7 години
родител
ревизия
a012eda1ad

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

xqd
@@ -1,11 +1,11 @@
 (function (app) {
     //全局配置 
     app.constant("config", {
-           server: 'http://q8.9026.com/',
-          // imgServer: 'http://q8.9026.com/attachment/'
+          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://miao.beiyuesi.com/',
+        //imgServer: 'http://miao.beiyuesi.com/attachment/'
     });
 })(angular.module('app'));

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

xqd xqd xqd xqd
@@ -369,11 +369,19 @@
     app.controller('personalLetterCtrl', ["$scope","$ionicTabsDelegate", '$location',"$state", "myService", "msg","storage"
         , function ($scope,$ionicTabsDelegate,$location, $state,myService, msg, storage) {
             $scope.$on('$ionicView.beforeEnter', function () {
+               $scope.loaddata(true);
+            });
+            $scope.loaddata = function(init){
                 myService.letter().then(function(result){
                     $scope.items = result.data.data;
+                    if (init) {
+                        $scope.$broadcast('scroll.refreshComplete');
+                    } else {
+                        $scope.$broadcast('scroll.infiniteScrollComplete');
+                    }
                 },function(error){
                 });
-            });
+            }
             $scope.toLetter = function(id){
                 if($location.path()=="/app/home/message/letter"){
                     console.log($location.path());
@@ -711,16 +719,24 @@
     app.controller('messageSysCtrl', ["$scope","common","config","$ionicPopup","$location", "$ionicTabsDelegate","$state", "myService", "msg"
        , function ($scope,common,config,$ionicPopup,$location,$ionicTabsDelegate, $state, myService, msg) {
             $scope.$on('$ionicView.beforeEnter', function () {
-                myService.systemInfo().then(function(result){
-                    $scope.sysInfos = result.data.data;
-                },function(error){
-                });
+                $scope.loaddata(true);
             });
             $scope.vm = {
                 content:""
             };
             $scope.imgs = [];
             $scope.video = {};
+            $scope.loaddata = function(init){
+                myService.systemInfo().then(function(result){
+                    $scope.sysInfos = result.data.data;
+                    if (init) {
+                        $scope.$broadcast('scroll.refreshComplete');
+                    } else {
+                        $scope.$broadcast('scroll.infiniteScrollComplete');
+                    }
+                },function(error){
+                });
+            }
             $scope.addpict = function () {
                 common.chooseImage().then(function (img) {
                     common.uploadFiles(img,1).then(function (result) {
@@ -866,11 +882,16 @@
     app.controller('messageReplyCtrl', ["$scope","$location","$ionicPopup","$ionicTabsDelegate", "$state","config", "myService", "msg", "$ionicModal"
        , function ($scope,$location,$ionicPopup,$ionicTabsDelegate, $state,config, myService, msg, $ionicModal) {
            $scope.$on('$ionicView.beforeEnter', function () {
-               $scope.load();
+               $scope.load(true);
            });
-           $scope.load = function () {
+           $scope.load = function (init) {
                myService.replyMy().then(function (result) {
                    $scope.comments = result.data.data;
+                   if (init) {
+                       $scope.$broadcast('scroll.refreshComplete');
+                   } else {
+                       $scope.$broadcast('scroll.infiniteScrollComplete');
+                   }
                }, function (error) {
                });
            };
@@ -894,7 +915,7 @@
                             '<p>'+info+'</p>' +
                             '</div>';
                     }
-                    msg.confirm('私信',letterTemplate,'梦想页').then(function(result){
+                    msg.confirm('私信',letterTemplate,'','梦想页').then(function(result){
                         if(result==true){
                             if($location.path()=="/app/home/message/reply"){
                                 $state.go('app.home_dreamdetail',{id:dream_id,type:2});

+ 6 - 0
miaomiao/www/js/filters/filter.js

xqd
@@ -60,6 +60,12 @@
             return input;
         };
     });
+    module.filter('videoPoster', function () {
+        return function (input) {
+            var input = input.replace('attachment','upload/vpic');
+            return input;
+        };
+    });
     module.filter('lastDate', function () {
         return function (end_time) {
             var end_time = new Date(end_time.replace(/-/g, "/"));

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

xqd
@@ -174,7 +174,7 @@
                                 <img class="slt" ng-click="openCommentPic(interaction.pic9,$event)" ng-src="{{interaction.pic9}}" ng-if="interaction.pic9" />
                             </div>
                             <div class="box banner" ng-if="interaction.video">
-                                <video ng-src="{{ imghost+interaction.video | trustUrl}}" poster="{{ host+'upload/vpic/'+interaction.video+'.jpg' | trustUrl}}" width="100%" style="max-height: 400px;" class="centerme" controls="controls"></video>
+                                <video ng-src="{{ interaction.video | trustUrl}}" poster="{{ interaction.video+'.jpg' | videoPoster | trustUrl}}" width="100%" style="max-height: 400px;" class="centerme" controls="controls"></video>
                             </div>
                         </div>
                         <div class="list">

+ 3 - 0
miaomiao/www/templates/my/my-message-reply.html

xqd
@@ -1,5 +1,8 @@
 <ion-view view-title="支持消息">
     <ion-content>
+        <!--下拉刷新-->
+        <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
+        </ion-refresher>
         <div class="list list-user-set" ng-click="goMes(item.info,item.image,item.is_max,item.message,item.video,item.attr_id,item.dream_id,item.user.id,item.is_end,item.is_url)" ng-repeat="item in comments" style="color: #737373; margin-bottom: 0">
             <a class="item" style="border-bottom: 1px solid #EAEAEA">
                 <p style="white-space: normal">{{item.message}}</p>

+ 4 - 2
miaomiao/www/templates/my/my-message-sys.html

xqd
@@ -1,12 +1,14 @@
 <ion-view view-title="梦想消息">
     <ion-content>
+        <!--下拉刷新-->
+        <ion-refresher pulling-text="下拉刷新" on-refresh="loaddata(true)">
+        </ion-refresher>
         <div style="color: #B3B3B3" ng-if="sysInfos==''">暂时还没有梦想消息哦</div>
         <div class="list" ng-repeat="sysInfo in sysInfos">
             <a ng-click="goMes(sysInfo.is_reply,sysInfo.is_url,sysInfo.dream_id,sysInfo.is_end,sysInfo.message,sysInfo.user_id,sysInfo.info,sysInfo.attr_id)" class="item item-icon-left">
                 <i class="icon ion-volume-medium"></i>
-                <p style="white-space: normal">{{sysInfo.message}}</p>
+                <p style="white-space: normal" ng-bind-html="sysInfo.message|trustHtml"></p>
             </a>
         </div>
-        <ion-infinite-scroll ng-if="filter.hasMore" on-infinite="load(false)" distance="10%"></ion-infinite-scroll>
     </ion-content>
 </ion-view>

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

xqd
@@ -16,7 +16,7 @@
                             <!--<div class="fr" ng-if="item.from_id!=item.to_id&&user.id==item.to_id" style="font-weight: bolder; font-size: 16px">+<span ng-if="item.from_type=='梦想币'">{{item.to_amount}}</span><span ng-if="item.from_type!='梦想币'">{{item.to_amount}}</span></div>-->
                             <!--<div class="fr" ng-if="item.from_id!=item.to_id&&user.id==item.from_id" style="font-weight: bolder; font-size: 16px">-<span ng-if="item.from_type=='梦想币'">{{item.to_amount}}</span><span ng-if="item.from_type!='梦想币'">{{item.to_amount}}</span></div>-->
                             <div class="fr" ng-if="item.from_id==item.to_id&&item.op=='充值'" style="font-weight: bolder; font-size: 16px">+{{item.to_amount}}</div>
-                            <div class="fr" ng-if="item.from_id==item.to_id" style="font-weight: bolder; font-size: 16px">-{{item.to_amount}}</div>
+                            <div class="fr" ng-if="item.from_id==item.to_id&&item.op!='充值'" style="font-weight: bolder; font-size: 16px">-{{item.to_amount}}</div>
                             <div class="fr" ng-if="item.from_id!=item.to_id&&user.id==item.to_id" style="font-weight: bolder; font-size: 16px">+{{item.to_amount}}</div>
                             <div class="fr" ng-if="item.from_id!=item.to_id&&user.id==item.from_id" style="font-weight: bolder; font-size: 16px">-{{item.to_amount}}</div>
                         </div>

+ 3 - 0
miaomiao/www/templates/my/personalLetter.html

xqd
@@ -1,5 +1,8 @@
 <ion-view view-title="通知">
     <ion-content>
+        <!--下拉刷新-->
+        <ion-refresher pulling-text="下拉刷新" on-refresh="loaddata(true)">
+        </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>