Procházet zdrojové kódy

去掉多余转换

duqinya před 6 roky
rodič
revize
ea50eb5261

+ 0 - 19
app/Http/Controllers/ConfigCityManagementController.php

@@ -29,29 +29,10 @@ class ConfigCityManagementController extends Controller
 
         $cityList = $this->configCityManagementRepository->index($request->all());
 
-        if (count($cityList) > 0) {
-            foreach ($cityList as $k => $v) {
-                if ($v->status == 0) {
-                    $cityList[$k]->status = '启用';
-                } else {
-                    $cityList[$k]->status = '禁用';
-                }
-
-                if ($v->express_type == "0"){
-                    $cityList[$k]->express_type = '快递';
-                }elseif ($v->express_type == "1"){
-                    $cityList[$k]->express_type = '自提';
-                }elseif ($v->express_type === "0,1" || $v->express_type === "1,0"){
-                    $cityList[$k]->express_type = '快递,自提';
-                }
-            }
-        }
-
         $fractal = new Manager();
         $resource = new Collection($cityList, new CityTransformer());
         $resource->setPaginator(new IlluminatePaginatorAdapter($cityList));
         $data = $fractal->createData($resource)->toArray();
-
         $data['extra'] = [
             'filters' => [
                 'id'