stanley-king пре 8 година
родитељ
комит
4dd6292b86
3 измењених фајлова са 13 додато и 2 уклоњено
  1. 1 1
      helper/special_helper.php
  2. 2 1
      mobile/framework/function/function.php
  3. 10 0
      test/activity_helperTest.php

+ 1 - 1
helper/special_helper.php

@@ -723,7 +723,7 @@ class special_manager
         else
         {
 
-            $formater = new special_formater($special_id,$this->old_version());
+            $formater = new special_formater($special_id,$this->old_version($special_id));
             $data = $formater->format($goods_ids);
 
             $this->mContents[$special_id]['data'] = $data;

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

@@ -43,7 +43,8 @@ function joutput_data($datas,$type='')
     $data['code'] = $code;
     $data['message'] = errcode::msg($code);
     $data['datas'] = $datas;
-//    ob_clean();
+
+    ob_clean();
     if(!empty($type) && $type == 'web') {
         echo(json_encode($data,JSON_UNESCAPED_UNICODE));
     } else {

+ 10 - 0
test/activity_helperTest.php

@@ -42,6 +42,16 @@ class activity_helperTest extends PHPUnit_Framework_TestCase
         $ret = $helper->get_spu(2629,4182,$err);
     }
 
+    public function testTesterConfig()
+    {
+        $config['old_tabs'] = array(
+            array('special_id' => 110,'name' => "home3"),
+            array('special_id' => 181,'name' => "美妆教学"),
+            array('special_id' => 161,'name' => "公司动态"),
+            array('special_id' => 184,'name' => "热销榜单"));
+        $config['old_specials'] = array(0,23,74,87,105,110,182,184,186,187);
+    }
+
     public function testFull()
     {
         $contents = activity\full_sent::instance()->rules();