Ver código fonte

Merge branch 'master' of https://git.97admin.com:433/chendeben/taoqu

chendeben 6 anos atrás
pai
commit
209fa27faa
1 arquivos alterados com 13 adições e 4 exclusões
  1. 13 4
      App/Api/Model/Dataoke.php

+ 13 - 4
App/Api/Model/Dataoke.php

@@ -31,15 +31,24 @@ class Dataoke
 
             $t = parse_query($query['query']);
             if ($t['kw']) {
-//                if ($t['bids']){
-//                    $new_url="/kw/" . $t['kw'] . ".html?bids=".$t['bids'];
-//                }elseif ($t['cid']){
+                $q=[];
+                if ($t['cid']){
+                    $q['cid']=$t['cid'];
+                }
+                if ($t['pid']){
+                    $q['pid']=$t['pid'];
+                }
+                if ($t['bids']){
+                    $q['bids']=$t['bids'];
+                }
+
+                //elseif ($t['cid']){
 //                    $new_url="/kw/" . $t['kw'] . ".html?cid=".$t['cid'];
 //                } else{
 //                    $d=$t;
 //                    unset($d['kw']);
 //                }
-                $new_url="/kw/" . $t['kw'] . ".html?".http_build_query($t);
+                $new_url="/kw/" . $t['kw'] . ".html?".http_build_query($q);
 
                 $content = str_replace($url, $new_url, $content);
             }else{