浏览代码

[Backend] API adresses : correctif

develop
Guillaume 3 年前
父节点
当前提交
a47ce16cbb
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      ShopBundle/Controller/AddressApiController.php

+ 8
- 1
ShopBundle/Controller/AddressApiController.php 查看文件

@@ -42,8 +42,15 @@ class AddressApiController extends AbstractController

$codesPostaux = $city->codesPostaux ;

if($context == 'frontend') {
$label = '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>' ;
}
else {
$label = $city->nom.' - '.$codesPostaux[0] ;
}

$return[] = [
'label' => '<span class="city">'.$city->nom.'</span> <span class="zip">'.$codesPostaux[0].'</span>',
'label' => $label,
'city' => $city->nom,
'value' => $city->code
] ;

正在加载...
取消
保存