Procházet zdrojové kódy

商户后台-设置-运费模板-修改配送地址城市编码

sunxbiao před 11 měsíci
rodič
revize
3843b4c6be

+ 10 - 0
app/controller/merchant/store/shipping/City.php

@@ -54,6 +54,16 @@ class City extends BaseController
54 54
         return app('json')->success(formatCategory($regions));
55 55
     }
56 56
 
57
+    public function newList()
58
+    {
59
+        $regions = Db::name('regions')
60
+            ->where('level', '<=', 2)
61
+            ->field('id,name,pid')
62
+            ->select()
63
+            ->toArray();
64
+        return app('json')->success(formatCategory($regions));
65
+    }
66
+
57 67
     public function getNewFiveList()
58 68
     {
59 69
         $code_list=[];

+ 1 - 1
route/merchant.php

@@ -352,7 +352,7 @@ Route::group(config('admin.api_merchant_prefix') . '/', function () {
352 352
 
353 353
         //地址信息
354 354
         Route::get('system/city/lst', 'merchant.store.shipping.City/lst');
355
-        Route::get('system/city/new_lst', 'merchant.store.shipping.City/newgetlist');
355
+        Route::get('system/city/new_lst', 'merchant.store.shipping.City/newList');
356 356
         //运费模板
357 357
         Route::group('store/shipping', function () {
358 358
             Route::get('lst', '/lst')->name('merchantStoreShippingTemplateLst');