moonsflyer vor 3 Monaten
Ursprung
Commit
4c13449d79

+ 10 - 0
app/shopapi/controller/UserAddressController.php

@@ -158,4 +158,14 @@ class UserAddressController extends BaseShopController
 	public function getSpecialAreaList(){
 		return $this->data(UserAddressLogic::getSpecialAreaLists());
 	}
+
+    /**
+     * 获取指定地区配送费信息
+     *
+     * */
+    public function getSpecialAreaShipFeeInfo(){
+        $id = $this->request->get('district_id',0);
+        $lists = UserAddressLogic::getSpecialAreaInfo($id);
+        return $this->data($lists);
+    }
 }

+ 6 - 0
app/shopapi/logic/UserAddressLogic.php

@@ -225,4 +225,10 @@ class UserAddressLogic extends BaseLogic
 		$list  = SpecialArea::field('id,name')->where($where)->order('sort desc,id desc')->select()->toArray();
 		return $list;
 	}
+    public static function getSpecialAreaInfo($id){
+        $where[]=['id','=',$id];
+        $info  = SpecialArea::where($where)->findOrEmpty();
+        return $info;
+    }
+
 }