Browse Source

TechHomeController

DengTao 8 years ago
parent
commit
a69acbbfbb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      www/protected/components/O2oApp.php

+ 2 - 0
www/protected/components/O2oApp.php

@@ -201,6 +201,7 @@ class O2oApp {
         $keys = array('user' => 1);
         $initial = array('sum' => 0.0, 'order' => 0, 'append' => 0);
         $reduce  = 'function (obj, prev) {';
+        $reduce  = 'alert(obj.commision);';
         $reduce .= 'prev.sum += obj.commision;';
         $reduce .= 'if(obj.type == 0){prev.order++};';
         $reduce .= 'if(obj.type == 1){prev.append++};';
@@ -225,6 +226,7 @@ class O2oApp {
         }
 
         $parsedRows = Commision::model()->parse($rows);
+
         $data = array(
             'userid' => $this->userid, // 用户企业号内ID
             'sum'    => $sum,          // 总提成数