Browse Source

Merge branch 'test' of git.oschina.net:yiguanjia/php into test

洪海涛 8 năm trước cách đây
mục cha
commit
b452a3bce1
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      www/protected/commands/GetKennelWorkCommand.php

+ 3 - 1
www/protected/commands/GetKennelWorkCommand.php

@@ -17,7 +17,6 @@ class GetKennelWorkCommand extends CConsoleCommand {
     public function getKennel(){
         $count = 0;
         $page = intval(Yii::app()->redis->get('page'));
-        $page = 0;
         if (empty($page)) $page =1;
         while($page) {
             if ($count >= 1000) {
@@ -56,6 +55,9 @@ class GetKennelWorkCommand extends CConsoleCommand {
                             $kennel->tags[$k] = $v;
                         $kennel->desc = $tmp['desc'];
                         foreach ($tmp['desc_pics'] as $k => $v) {
+                            if (!empty($v['url'])){
+                                $v['url'] = str_replace('wozhua-pics.qiniudn.com','pics.maiyizhi.cn',$v['url']);
+                            }
                             $kennel->desc_pics[$k] = $v;
                         }
                         $kennel->address = $tmp['address'];