Browse Source

debug page conut

stanley-king 7 years ago
parent
commit
f7d2b6153e

+ 19 - 10
data/resource/mobile/ugc/js/main.js

@@ -1,6 +1,7 @@
 $('html').css('height','100%');
 $('body').css('height','100%');
-$.fn.autoTextarea = function(options) {
+$.fn.autoTextarea = function(options)
+{
     var defaults={
         maxHeight:null,
         minHeight:24
@@ -23,6 +24,7 @@ $.fn.autoTextarea = function(options) {
         });
     });
 };
+
 $('.thumbnail img').picLazyLoad();
 var specialId = (function () {
     var special_id = $('body').attr('data-special_id');
@@ -184,14 +186,16 @@ var Vote = function (type) {
 };
 
 
-var Question = function (obj, handleType) {
+var Question = function (obj, handleType)
+{
     this.obj = obj;
     this.handleType = handleType;
     this.answer = [];
     this.getAnswer = function () {
         return this.answer;
     };
-    this.C = function () {
+    this.C = function ()
+    {
         var _self = this;
         _self.obj.on('change', function () {
             switch (_self.handleType) {
@@ -725,16 +729,21 @@ $('#submit_btn').on('click', function () {
         }
 
         var answerDiff = data.datas['answer_diff'];
-        if ($('.question_list').length > 0) {
-            for (var i = 0; i < answerDiff.length; i++) {
+        if ($('.question_list').length > 0)
+        {
+            for (var i = 0; i < answerDiff.length; i++)
+            {
                 if (answerDiff[i]['correct']) {
                     for (var j = 0; j < answerDiff[i]['origin'].length; j++) {
                         $('.question_options').eq(answerDiff[i]['index']).find('.label').eq(answerDiff[i]['origin'][j]).css('color', 'green');
                     }
                 }
-                else {
-                    for (var u = 0; u < answerDiff[i]['origin'].length; u++) {
-                        for (var g = 0; g < answerDiff[i]['submit'].length; g++) {
+                else
+                {
+                    for (var u = 0; u < answerDiff[i]['origin'].length; u++)
+                    {
+                        for (var g = 0; g < answerDiff[i]['submit'].length; g++)
+                        {
                             if (answerDiff[i]['origin'][u] == answerDiff[i]['submit'][g]) {
                                 $('.question_options').eq(answerDiff[i]['index']).find('.label').eq(answerDiff[i]['origin'][u]).css('color', 'green');
                             }
@@ -787,8 +796,8 @@ event($('.like_btn'), 'click', function () {
         });
     }
     else {
-        //window.location.protocol + "//" + window.location.host
-        url = window.location.protocol + "//" + window.location.host + '/mobile/index.php?act=member_ugc&op=support&client_type=ajax&special_id=' + specialId;
+        var host = window.location.protocol + "//" + window.location.host;
+        url = host + '/mobile/index.php?act=member_ugc&op=support&client_type=ajax&special_id=' + specialId;
         ajax(url, function (data) {
             $('.loader').hide();
             if (data.code !== 200) {

+ 6 - 3
mobile/control/member_ugc.php

@@ -294,7 +294,7 @@ class member_ugcControl extends specialControl
             $uids = $comments_obj->users();
             $members = $this->users($uids);
 
-            return self::outsuccess(['comments' => $comments,'members' => $members,'mobile_page' => mobile_page($pages)]);
+            return self::outsuccess(['total_count' => $count,'comments' => $comments,'members' => $members,'mobile_page' => mobile_page($pages)]);
         }
         else
         {
@@ -312,7 +312,7 @@ class member_ugcControl extends specialControl
             $uids = $comments_obj->users();
             $members = $this->users($uids);
 
-            return self::outsuccess(['comments' => $comments,'members' => $members,'mobile_page' => mobile_page($pages)]);
+            return self::outsuccess(['total_count' => $count,'comments' => $comments,'members' => $members,'mobile_page' => mobile_page($pages)]);
         }
     }
 
@@ -389,6 +389,9 @@ class member_ugcControl extends specialControl
 
     public function appreciateOp()
     {
-
+        $this->need_login();
+        $special_id = intval($_GET['special_id']);
+        $rate  = intval($_GET['rate']);
+        $money = intval($_GET['money']);
     }
 }

+ 0 - 1
mobile/framework/function/function.php

@@ -90,7 +90,6 @@ function joutput_error($code,$message = '',$type='')
 
 function mobile_page($page_count) 
 {
-    //输出是否有下一页
     $extend_data = array();
     $current_page = intval($_GET['curpage']);
     if($current_page <= 0) {