Selaa lähdekoodia

Merge branch 'web_sannong_fr'

rkljw 4 kuukautta sitten
vanhempi
sitoutus
086abd3fa8
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      app/JsonRpc/WebsiteService.php

+ 5 - 2
app/JsonRpc/WebsiteService.php

@@ -771,8 +771,11 @@ class WebsiteService implements WebsiteServiceInterface
                 });
             } else {
                 $pidMap = $pidResults->keyBy('pid');
-                $result->each(function ($record) use ($pidMap) {
-                    $record->aLIas_pinyin = $record->path;
+                $result->each(function ($record) use ($pidMap,$data) {
+                    if($data['pid'] == 0){
+                        $record->aLIas_pinyin = $record->path;
+                    }
+                    // $record->aLIas_pinyin = $record->path;
                     if ($pidMap->has($record->category_id)) {
                         $pidResult = $pidMap->get($record->category_id);
                         $record->chilid_id = $pidResult->category_id;